Loading...
  OR  Zero-K Name:    Password:   

ZK modders' dream

3 posts, 297 views
Post comment
Filter:    Player:  
sort
Should I make a mod "ZK modders'(my) dream"?

The aim of the mod is to get rid of the endless annoying replacing files,

let "a script contains tables" -> "a script that read files to gen tables",

makes zk more extensible, mb even multiple extension (aka combine mods.)

example:

LuaRules/Configs/drone_defs.lua is a script containing information about how units make drones.

If you want your new units to make drones, you need to override it (copy the file, put your addition in it, and replace the origin one).

ZK modders' dream will override it with the ability to read units make drones information from unitdefs, then you just need to add something in your UnitDefs.

(Actually I think they should be put in zk-stable, but zk updates is sloooow)
+1 / -0
Current tech:

(utils : Spring.Utilities.wacky_utils, utils_op : Spring.Utilities.to_make_op_things)

gamedata/unitdefs_post.lua:
run codes in gamedata/tweak_unit_defs,
utils_op .load_modoptions(): load optional things at lua_mods and mods.
utils_op .RunUnitDefsTweakFns(): run optional code for unitdefs.

gamedata/weapondefs_post.lua:
run codes in gamedata/tweak_weapon_defs,
utils_op.RunOrderedList(utils_op.weapon_defs_tweak_fns): run optional code for weapondefs.

gamedata/modularcomms:
put chassisdefs, moduledefs into files

gamedata/movedefs.lua:
utils_op.MoveDef_TryGen: automatically generate movedef for unknow movedef found in Unitdefs.


LuaRules/Configs/tactical_ai_defs.lua: load tactical_ai_defs from ud.customParams

LuaRules/Configs/drone_defs.lua: load carrierDefs from ud.customParams

LuaRules/Configs/oneclick_weapon_defs.lua: load oneClickWepDefs from ud.customParams

LuaRules/Utilities/unitDefReplacements.lua: use ud.customParams.custom_tooltip_simple as units tip, allow UnitRulesParam in it

LuaRules/Gadgets/unit_piece_info.lua: load units' pieces' info dynamically.

LuaRules/Gadgets/cmd_command.lua: a easy way to debug.

LuaRules/Gadgets/unit_weapon_charging_salvo.lua: a salvo system that can shot when it has ammo (charge).

LuaUI/Widgets/gui_chili_cheats.lua: put uds that ud.customParams.is_debug_unit into tab debug

ud.customParams.def_scale: a easy way to scale unitdefs

scripts/script_weapon_charging_salvo.lua: charging salvo for unit script

scripts/inertial_piece.lua: inertial piece that dont rotate together with unit itself (e.g. body)


TODO:

unit_attributes_generic.lua: load attribute handler from files.

LuaRules/Utilities/unitDefReplacements.lua: allow code.

LuaUI/cawidgets.lua: allow different ConfigData for different mods.

LuaRules/Gadgets/unit_piece_apply.lua: Use pieces of one unit to another, dynamically and pretty (facing engine problem.)

LuaRules/Gadgets/unit_carrier_drones.lua: Use Spring.UnitAttach

LuaRules/Gadgets/unit_start_state.lua: ud.customParams.has_start_state.

Feel free to add things

+2 / -0
nevermind
+0 / -0