Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old July 7, 2010, 18:05   #1
ewert
Knight
 
Join Date: Jul 2009
Posts: 525
ewert is on a distinguished road
Bug or not in handling object.txt info?

Check http://angband.oook.cz/forum/showthread.php?t=3460

It seems:
If you have two lines with A:xx:yy to zz, only the latter one is handled. The same with E: lines, only the latter one is handled. I tried a E:xxx | yyy too, doesn't work.

Should having say:

A:100:1 to 29
A:20:30 to 100

work so that the item gets more rare at 30? It'd be useful for being able to finetune item rarities which I'm trying to do for myself. Also being able to add multiple effects would be nice. Seems most items are actually "hardcoded" effects not stuff you can edit in the object.txt, which is kinda sad considering "easyvariantsy" stuff for things like making different items in there.
ewert is offline   Reply With Quote
Old July 7, 2010, 20:58   #2
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,057
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Quote:
Originally Posted by ewert View Post
Check http://angband.oook.cz/forum/showthread.php?t=3460

It seems:
If you have two lines with A:xx:yy to zz, only the latter one is handled. The same with E: lines, only the latter one is handled. I tried a E:xxx | yyy too, doesn't work.

Should having say:

A:100:1 to 29
A:20:30 to 100

work so that the item gets more rare at 30? It'd be useful for being able to finetune item rarities which I'm trying to do for myself. Also being able to add multiple effects would be nice. Seems most items are actually "hardcoded" effects not stuff you can edit in the object.txt, which is kinda sad considering "easyvariantsy" stuff for things like making different items in there.
Interesting - quite a major bug, if it is confirmed. I have opened ticket #1173 to track this.

At the moment only one E: line is supported, but the effects framework is about to come under discussion and may end up moved to an external file as you (and others) have suggested.
Magnate is offline   Reply With Quote
Old July 8, 2010, 16:57   #3
Tiburon Silverflame
Swordsman
 
Join Date: Feb 2010
Posts: 405
Tiburon Silverflame is on a distinguished road
Over on the other thread, someone (Timo?) suggested that the format for the A: line is, one line only, using | as the separator. So I repeated the test I described in town, with pebbles set to

A:100:0 to 10 | 10:11 to 50

and iron shots set to A:100:0 to 100.

This loads, so clearly the code allows the format. In testing in town (where I have all the critters with DROP_4 and ONLY_ITEM for this) I was getting basically equal amounts of pebbles and shots...so that appears to be working correctly.

The second part is harder to test, simply because the drops are harder to narrow down...tried a couple things that didn't work, but I think I have a test that will work.

a) Read object.txt, and rewrite ALL A: lines as, say,
A:10:0 to 20 | 15:21 to 100
Easy to do this with a small chunk of code.

b) Then hand-edit in the various types so that specific weapons, armors, etc. get specific tweaks, to either
A:100:0 to 20 | 15:21 to 100 or
A:10:0 to 20 | 100:21 to 100

This should create radical distribution shifts.
Tiburon Silverflame is offline   Reply With Quote
Old July 8, 2010, 17:21   #4
ewert
Knight
 
Join Date: Jul 2009
Posts: 525
ewert is on a distinguished road
I'm currently using a file that has the edits changed into the | format, it loads, but not sure if it is just RNG or what messing with me, I'm seeing zero stat potions, augmentation, even though for example have seen lots of xp potions, lots of rare rods etc. Difference is, stat potions are in after the | defined level range, whereas those already rare and deep level items have only the basic A: line. (I'm farming around dlvl96)

So far it just feels it is not working right. My char is a mage, and you'd think I would see more healing and augmentation potions, as I had healing allocation up to 200 (twice that of enlightenment and augment), and I stair scummed with detect enchantment a LOOOOOT of vaults, and zero stat potions, aug potions, healing potions.

Something is still wacky, or then RNG is reallllly messing with me.

edit: Just farmed some more, and remembered that there was something wrong with chests about item generation. So THAT is how I've seen those low lvl items, not because they still had some allocation in the deep levels, but because the chests spawned them. I'm now 90+% sure that using the A: line with | does not work properly. It ignores the rest and uses only the first x:y to z range.

Last edited by ewert; July 8, 2010 at 17:38.
ewert is offline   Reply With Quote
Old July 8, 2010, 18:58   #5
Tiburon Silverflame
Swordsman
 
Join Date: Feb 2010
Posts: 405
Tiburon Silverflame is on a distinguished road
That's why I'm suggesting what I do. You make ONE armor common, and ONE weapon, and ONE...etc. at depth 20, then make something different common at depth 21. This will put things into extremely sharp focus, hopefully no matter what the RNG wants to do.

Don't have time for this right now; I have the file re-written, the code's trivial for that, but I don't have time to hand-edit it. Should be able to get to it later.
Tiburon Silverflame is offline   Reply With Quote
Old July 8, 2010, 20:28   #6
ewert
Knight
 
Join Date: Jul 2009
Posts: 525
ewert is on a distinguished road
Erm, me thinks the message did not get across, so I will put it in short:

A:x:y to z | a:b to c

does not work currently. Only x:y to z gets processed. The item stops appearing after z, because the code does not recognize or use "b to c" at all.
ewert is offline   Reply With Quote
Old July 8, 2010, 20:32   #7
PowerDiver
Prophet
 
Join Date: Mar 2008
Posts: 2,712
PowerDiver is on a distinguished road
I don't think you need to experiment. The item generation accesses k_ptr->alloc_prob to do its work. So either the code needs to generate multiple separate item kinds for the multiple A: possibilities or that value needs to change depending on the drop level. I believe that kind numbers are hard coded, and there is no direct way to change things if the ranges overlap, not to mention Tak has been trying to make k_info be const, so I don't see how multiple alloc probs are even possible in the current codebase unless you hardcode multiple kinds with separate alloc_probs. Well, maybe hardcode is not the precisely correct word and multiple entries in k_info.txt would work, but that way leads to things horrible.
PowerDiver is offline   Reply With Quote
Old July 8, 2010, 21:06   #8
Tiburon Silverflame
Swordsman
 
Join Date: Feb 2010
Posts: 405
Tiburon Silverflame is on a distinguished road
If it's not possible, there are some serious design flaws. This should not be hard.
Tiburon Silverflame is offline   Reply With Quote
Old July 8, 2010, 21:20   #9
ewert
Knight
 
Join Date: Jul 2009
Posts: 525
ewert is on a distinguished road
I didn't quite follow that. Anyways, what I got from perusing the code is that it creates an allocation "tablethingy" somehow using the alloc info, and just picks the item from there. =P A separate "tablethingy" (array whatever pointer gaga) for kind_is_good stuff.

Anyways, my gut feeling would point to a somewhat simple parsing code problem instead of a big coding issue in being able to use multiple depth & rarity settings, heck even the object.txt file comments at start imply so ... but I am prolly totally wrong and it is something awful instead.
ewert is offline   Reply With Quote
Old July 8, 2010, 21:37   #10
PowerDiver
Prophet
 
Join Date: Mar 2008
Posts: 2,712
PowerDiver is on a distinguished road
Quote:
Originally Posted by ewert View Post
I didn't quite follow that. Anyways, what I got from perusing the code is that it creates an allocation "tablethingy" somehow using the alloc info, and just picks the item from there. =P A separate "tablethingy" (array whatever pointer gaga) for kind_is_good stuff.
Maybe I misread the code. Always a strong possibility.
PowerDiver is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Inconsistency in object.txt? Tiburon Silverflame Vanilla 14 May 22, 2010 15:45
object list possible bug PowerDiver Vanilla 14 February 2, 2010 17:16
Display price in object info? Tobias Vanilla 9 January 1, 2010 19:59
Obliterating k_idx from the savefiles and object.txt zaimoni Development 0 April 30, 2009 02:37
'object.txt' format suggestion PaulBlay Development 3 March 30, 2009 03:23


All times are GMT +1. The time now is 00:03.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.