Page 1 of 1

Exvars

Posted: Mon Mar 11, 2013 6:46 pm
by terkio
How can I find the Exvars which are relevant to a specific object ( or should I say a specific archetype ?) ?
Is the dungeon_test giving an exhaustive answer ( all Exvars applicable to each available object ) ?

Here is the struggle I had with a floortext.
To enter a text, I saw ESB asking an Exvar name, then a string.
I managed to get txt = "WELCOME"
Of course it did not work ! The right name is text as I found later, in the dungeon_test.
ESB as well as the compiler are silent about this naming mistake.
Is there a way to have at least a verbose compilation, to know about wrong names ?
In the dungeon_test the floortext has three Exvars: text, disable_self, color. Is there more ?
The Exvar: color is not in "the list of Exvars used by the base code".

Re: Exvars

Posted: Mon Mar 11, 2013 6:47 pm
by Sophia
ESB and the compiler are silent because it's not really a "mistake," as such. The point of using exvars is to have an (almost) infinitely extensible architecture for defining the properties of a given instance of an object. Unfortunately, that's not too comfortable when you're new to the environment and don't know what to do, as you've noticed.

ESB provides a "nice" interface for many of the more complicated objects that automatically fill in the relevant exvars from a nice graphical editor, but not every archetype has one, yet.

So, yes, this is a problem, but doing something about it is an ongoing process.. :)

Re: Exvars

Posted: Mon Apr 08, 2013 9:23 pm
by Lord_BoNes
@Terkio: if you want to see a bit more on exvars... go here or check the Lua files in the base directory. Then there's also Ian Scho's "events" dungeon and Mon Ful Ir's "monster museum" dungeon... both of these dungeons have exvars used, so they make a good learning place.

Re: Exvars

Posted: Tue Apr 09, 2013 4:44 am
by terkio
Thanks, I' ll study these examples.

Where are the Exvars declared, defined ?
In which lua file(s) in base/ or events/ or mfi_dungeon/ ?

I had a look with ESB and DSB at the example dungeons.
"monster museum" dungeon is no problem. ( with ESB or DSB ).

"events" dungeon crashes ESB when opening events/dungeon.lua. Message is: Inst1 already allocated New: doorframe....Prev: eye....
Presumably, a bug in events/dungeon.lua, not a bug in ESB.
No problem visiting the "events" dungeon with DSB.

Re: Exvars

Posted: Tue Apr 09, 2013 6:40 am
by Lord_BoNes
Open the Lua files using wordpad... the files are in programming code, but by simply doing a search for the string "exvar" and looking at all the hits, you can see how each of the exvars are used.

And, yeah I noticed that about Ian's dungeon too... but, I was pointing you at the Lua contained in it.

Re: Exvars

Posted: Tue Apr 09, 2013 9:12 pm
by Sophia
Wordpad is ok, but if you're getting into Lua coding I'd definitely recommend an editor with syntax highlighting.
Notepad++, SciTE, or LuaEdit are all worthwhile.

Re: Exvars

Posted: Tue Apr 09, 2013 9:23 pm
by Lord_BoNes
I was only saying wordpad because it comes with Windoze... and it already has it's own start-menu shortcut and everything :P