custom common.lvl can be called via map lua
Posted: Sat Jul 14, 2012 9:44 pm
Once again, I don't know everything, and I have not seen this before (maybe this is old news to SWBF2 modders, I just don't follow SWBF2), but I have just found that SWBF (original) can call custom common.lvl by a map lua via a ReadDataFile command, such as this:
ReadDataFile("COMMON\\common-custom.lvl")
or
ReadDataFile("dc:common\\common.lvl")
This can be done client side for client side custom common.lvl modifications (e.g. different color explosions just for the client) or for server side only common.lvl modifications (e.g. making a negative health recharge rate for a health bot) or more importantly in my opinion, for modders that make custom common.lvl files for their mods, they can now just drop their new common in the Addon map folder, call it in the lua, and it will not affect any other maps.
Random custom common.lvl can also be implemented via the random lua commands I have discussed here previously.
A snippet from by bes2a.lua looks like this:
ReadDataFile("COMMON\\common-custom.lvl")
or
ReadDataFile("dc:common\\common.lvl")
This can be done client side for client side custom common.lvl modifications (e.g. different color explosions just for the client) or for server side only common.lvl modifications (e.g. making a negative health recharge rate for a health bot) or more importantly in my opinion, for modders that make custom common.lvl files for their mods, they can now just drop their new common in the Addon map folder, call it in the lua, and it will not affect any other maps.
Random custom common.lvl can also be implemented via the random lua commands I have discussed here previously.
A snippet from by bes2a.lua looks like this:
Code: Select all
ReadDataFile("sound\\bes.lvl;bes2gcw");
ReadDataFile("SIDE\\all.lvl",
"all_inf_basicurban",
"all_inf_lukeskywalker",
"all_inf_smuggler");
ReadDataFile("SIDE\\imp.lvl",
"imp_inf_basic_tie",
"imp_inf_dark_trooper",
"imp_inf_darthvader");
ReadDataFile("COMMON\\common-dot.lvl")