Page 6 of 6

Posted: 02 Sep 2007, 21:56
by trepan
From lobby #lua:

Code: Select all

[5:02:37 PM] <tombom> why is the luaparser system better than the one we had before?
[5:09:26 PM] <trepan> 1. it's faster
[5:09:31 PM] <trepan> 2. it's safer
[5:09:37 PM] <trepan> 3. it's way more flexible
[5:09:46 PM] <tombom> oh ok
[5:09:55 PM] <tombom> safer?
[5:10:06 PM] <trepan> to explain #2 ... it's already setup to cancel unitdefs with invalid models/scripts
[5:10:17 PM] <trepan> so ".give all" is more likely to work
[5:10:26 PM] <trepan> see  gamedata/unitdefs.lua
[5:10:45 PM] <trepan> for #3, you can use flatfile format, multiple unitdefs in a single file
[5:10:52 PM] <trepan> sub-classed unitdefs
[5:11:12 PM] <trepan> you can read unitdef files to determine featuredef metal values ...
[5:11:19 PM] <tombom> ah i see
[5:11:20 PM] <trepan> etc...
[5:11:21 PM] <tombom> thanks
[5:11:54 PM] <trepan> for #1 ... it's a little faster currently ... could probably be improved with a better lua parser
[5:12:10 PM] <trepan> (there's a note in gamedata/parse_tdf.lua about it)
[5:12:41 PM] <trepan> (note that the C++ TDFParser could also have been improved  ;-)
[5:13:27 PM] <trepan> 4. the C++ code is much easier to look at   :)
[5:14:27 PM] <trepan> TDFParser's template casting just annoyed me... and looked ugly   (handling LuaTable classes is also much nicer then the string paths, imo)
[5:14:49 PM] <trepan> ciao, dinner
[5:14:58 PM] <tombom> bye
P.S. I've also go a patch that replaces the explosion_alias.tdf and
explosions/*.tdf files, and moves the buildOrders into the unitDefs
(gamestate/unitdefs.lua is setup to pull them from SIDEDATA.TDF
when using FBI files). Note the the [SIDE#] information has not
been moved out of SIDEDATA.TDF, so you'll still need that file.

Posted: 22 Sep 2007, 21:50
by TradeMark