1) Is it possible to document exvars, because that's the only thing you cannot guess by looking at dsb's code !
2)
When an item has exvar[the_item] = { opby = "key_ra" }
Is it possible to have : exvar[the_item] = { opby = { "key_ra", "key_gold" } }
so that one item is able to interact with several item types ?
I assumed so for RTSB. (because the feature already exists for :
exvar [tmp] = { target = { item1, item2 } }
even if it's not exactly the same ( because opby name an item_type, while target just targets a particular item in the dungeon )
and it's much more practical )
(done) Exvar feature questions
Moderator: Sophia
Forum rules
Please read the Forum rules and policies before posting.
Please read the Forum rules and policies before posting.
- Sophia
- Concise and Honest
- Posts: 4240
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
Re: Exvar feature questions
What do you mean? I agree with you that more documentation is probably a good idea, but anything that uses exvars makes reference to them in the code...Joramund wrote:1) Is it possible to document exvars, because that's the only thing you cannot guess by looking at dsb's code !
No, this isn't possible.Joramund wrote:Is it possible to have : exvar[the_item] = { opby = { "key_ra", "key_gold" } }
Already exists? Huh?Joramund wrote:(because the feature already exists for :
exvar [tmp] = { target = { item1, item2 } }
This isn't possible either.
The real problem is that exvars, currently, must be "flat." That is, they can store integers, strings, and whatnot, but tables inside of exvars are currently not saved in dungeon.dsb. I didn't really feel like getting into the potential for infinite recursion and the like.
- Sophia
- Concise and Honest
- Posts: 4240
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
Ok, this is all done for 0.8. I don't think allowing simple nested tables like exvar[x] = { target = { a, b, c } } will hurt my sanity too much.Joramund wrote:EDIT : but if this can still be added, i'd say hurray !
Named elements inside of exvar tables like exvar[x] = { something = { test = 1, stuff = 2 } }, etc. are still not allowed.
Multi-targeted switches etc. can now be done the way you said.
I also allowed multiple opbys because it wasn't that much trouble now that exvars have been expanded in this way, so even though I don't think the conversion from RTC will require it, that can be done now too.