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

Post edit history

unit_cannot_Damage_unit.lua

To display differences between versions, select one or more edits in the list using checkboxes and click "diff selected"
Post edit history
Date Editor Before After
9/10/2018 10:19:03 PMPLrankAdminSprung before revert after revert
Before After
1 [quote]Do Lua scripts need to be compiled for the game to read them?[/quote] 1 [quote]Do Lua scripts need to be compiled for the game to read them?[/quote]
2 You don't need to compile Lua scripts, the engine interprets them. 2 You don't need to compile Lua scripts, the engine interprets them.
3 \n 3 \n
4 [quote]Where would I put the modified lua file after editing it? [/quote] 4 [quote]Where would I put the modified lua file after editing it? [/quote]
5 In the gadgets folder. Check out http://zero-k. info/mediawiki/index. php?title=Mod_Creation for info on what goes where. 5 In the gadgets folder. Check out http://zero-k. info/mediawiki/index. php?title=Mod_Creation for info on what goes where and how to set up a local development copy.
6 \n 6 \n
7 [quote]Would <unit_cannot_damage_unit.lua> be the correct place to put my code to multiply damage?[/quote] 7 [quote]Would <unit_cannot_damage_unit.lua> be the correct place to put my code to multiply damage?[/quote]
8 That gadget is for relationships between two units (in particular Starlight and Glint) so it would probably be ideal to make a new gadget. 8 That gadget is for relationships between two units (in particular Starlight and Glint) so it would probably be ideal to make a new gadget.
9 \n 9 \n
10 Damage modification is specific though because it is part of unit definitions which can be post-processed, see the `gamedata/{weapon,unit}defs_post.lua`. In particular check their contents for `damagemult` - this is an old modoption that acted as a general multiplier for most damage sources (caveats: didn't affect environmental damage and wasn't configurable per-team), it was removed because `hpmult` does the same but if you're messing around in your local copy might as well try it out. 10 Damage modification is specific though because it is part of unit definitions which can be post-processed, see the `gamedata/{weapon,unit}defs_post.lua`. In particular check their contents for `damagemult` - this is an old modoption that acted as a general multiplier for most damage sources (caveats: didn't affect environmental damage and wasn't configurable per-team), it was removed because `hpmult` does the same but if you're messing around in your local copy might as well try it out.