Doom Marine
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Special Interest > Eternity > Mapthing / EDF thing property access
 
Author
All times are GMT. The time now is 12:22. Post New Thread    Post A Reply
printz
CRAZY DUMB ZEALOT


Posts: 8885
Registered: 06-06


Is there a way, or will it be planned so I can set in the map editor (or ExtraData) custom variables for the thing, so they're accessible in EDF? Similar to how ZDoom's DECORATE allows access to a thing's args.

Old Post 09-10-10 12:13 #
printz is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Quasar
Moderator


Posts: 6085
Registered: 08-00



printz said:
Is there a way, or will it be planned so I can set in the map editor (or ExtraData) custom variables for the thing, so they're accessible in EDF? Similar to how ZDoom's DECORATE allows access to a thing's args.

That feature is planned for UDMF; but the parser used for EDF and ExtraData cannot tolerate field keys that it doesn't know about a priori. libConfuse is a "strongly typed" system in that when it sees a key, it assumes it already knows what kind of value will come on the other half of the assignment, be it a simple value, list, section, function call, or multi-valued field. This would force some kind of less natural syntax if it were to be supported there, such as:
code:
customfield("name", "value")

Old Post 09-10-10 14:13 #
Quasar is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Gez
Why don't I have a custom title by now?!


Posts: 11202
Registered: 07-07


Couldn't they all be declared in one of the core EDF files, so that libconfuse knows about them? That's what ZDoom does (check the code for the Actor class).

Old Post 09-10-10 14:19 #
Gez is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
printz
CRAZY DUMB ZEALOT


Posts: 8885
Registered: 06-06



Quasar said:

That feature is planned for UDMF; but the parser used for EDF and ExtraData cannot tolerate field keys that it doesn't know about a priori.

What about making EDF codepointers have access to the five args that are already known by the parser in the mapthing block? Or even some way (flag, codepointer) that copies the mapthing args data into the actor's counters.

Old Post 09-10-10 15:09 #
printz is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Quasar
Moderator


Posts: 6085
Registered: 08-00



Gez said:
Couldn't they all be declared in one of the core EDF files, so that libconfuse knows about them? That's what ZDoom does (check the code for the Actor class).

Would require creating the cfg_opt_t at runtime, which is certainly not impossible. Really what I should do is add support for this at the library level, within libConfuse (something such as cfg_appendopts or cfg_dynamicopt, etc.), since it's already semi-capable of dealing with it.

This would allow libConfuse to become sort of introspective, as it would be defining the syntax to parse a language within a language which it parses.

It would require declaring the types as well as the names, however. Basically what you'd end up with would be very similar to the cfg_opt_t in C:
code:
cfg_opt_t opts[] = { CFG_STR("blah", "", CFGF_NONE), CFG_INT("foo", 0, CFGF_LIST), CFG_END() };

In libConfuse "metaprogramming" this would end up probably looking like:
code:
entity blarg { option blah, string, "", NONE option foo, int, 0, LIST }

An interesting idea. The properties declared as such could be metatabled under the same keys and become accessible to anything in the game engine... ::drools::

Old Post 09-10-10 15:51 #
Quasar is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
All times are GMT. The time now is 12:22. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Special Interest > Eternity > Mapthing / EDF thing property access

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.