Todd Mitchell wrote: > Better than a new field would be to standardize around a single method > for adding inventory. Arguably, the treasure list syntax already supports that. > What would be fantastic would be to be able to > add treasure list notation in the arch file directly *and/or* use a > list(s) from a .trs file or the treasures file - the same sort of thing > you can do with animation - use anim/mina in the arch file or call > animation from a .face file. Since the .trs files are collected and > collection is not done during game time I don't see a big problem with > having it parse treasures from .arc files as well as .trs files (?). It could be done, but a little more complicated than the animation stuff. The animation stuff is easy - the collection code basically says 'one I find a anim, just collect all the data until I get a mina. This works fine because mina is not used anyplace for the archs. The treasurelists use an 'end' to denote the end of the list, which also happens to match the tag for ending an object. Fortunately, the treasurelist doesn't nest those, so the collect could basically do something like 'once I see a treasure line, collect all until I see an end line'. > This would let you grandfather out the randomitems field so that > inventory is done a single way and get rid of the limitation where you > can only have one entry in the randomitems. It would be great to be > able to spice up a chest or a mob by adding an additional treasure list > or two or even a single item (or chance for an item) without having to > make treasurelists for every permutation. Well, you're asking for something completely different now. You can't, for example, add animations in the archs on maps - the collect script does the work of sorting out the fields at collection time and putting them in the right place. And doing something like that for treasurelists wouldn't be hard. But you are describing the ability to have treasurelists embedded in objects in maps - this is doable, but would require a bit more work. The code would probably have to do something like generate the name of the treasurelist at load time to make sure it is unique (could just keep a global counter, and do something like dynamiclist_1, dynamiclist_2, etc). When the object is then swapped out, the treasurelist could be freed. However, it would still be a requirement that only 1 treasurelist is allowed per object, and you can't reference other objects treasurelists. Eg, you couldn't do something like: object orc ... treasure blah ... end treasure blah2 list blah .. end end OR something like: object orc treasure blah .. end object orc randomitems blah .. end > I know you can do this in > maps with the editor by adding inventory manually but this leaves you > out in the cold for arches that are spawned or created and you can't put > in a possibility for an item this way. Spawned objects don't necessarily get fixed by the above - in many cases, such automatically created objects are created just by an 'other_arch' field. Unless those are all changed, you don't gain anything, because the other_arch can only point at a generic arch. And note that treasurelists can also only point at the same generic arch's - you can not for example have that treasurelist contain a customized object, unless that object is an official arch. It is certainly a good idea to have the treasurelists be customizable within objects - I think that has been on the TODO list for a long time, but it really doesn't have anything to do with having healing potions work - that is 100% of having the appropriate functions (command_create, move_creator) do the right thing - no matter whatever archetype/treasurelist/etc changes are made, unless the code in the functions is also changed, things still won't work. _______________________________________________ crossfire-devel mailing list crossfire-devel at lists.real-time.com https://mailman.real-time.com/mailman/listinfo/crossfire-devel