What to do first before changing any code?
<div class="IPBDescription">looking for a way to get started in NS2-scripting</div>Some days ago I disovered a bug (<a href="http://getsatisfaction.com/unknownworlds/topics/_176_wont_pick_up_grenade_launcher_ammo" target="_blank">this one</a>), took a look at the code and suggested a solution. However I didn't try it out because backing up the script-file and the overwriting it with my edited file seems somewhat impractical. I would have to replace my file with the backup everytime I want to play the game online. (does the game think you are cheating if you play with modified scripts?)
Maybe Builder could help me out here. (somebody please explain what it does)
But the best solution I could imagine is writing own functions that override the original functions if I'm loading my "costum game" and use all the other original functions otherwise, the same thing thing the overmind mod is doing. (It leaves all the original files untouched)
So basically what I'm looking for is a step-by-step guide on what to do before messing around with the code.
Maybe Builder could help me out here. (somebody please explain what it does)
But the best solution I could imagine is writing own functions that override the original functions if I'm loading my "costum game" and use all the other original functions otherwise, the same thing thing the overmind mod is doing. (It leaves all the original files untouched)
So basically what I'm looking for is a step-by-step guide on what to do before messing around with the code.
Comments
In that folder make a folder named "lua".
Now if you modifiy Player.lua for example you can save the edited version in mymod/lua.
To load the game with your modified Player.lua make a shortcut to NS2.exe and add -game "mymod" to the end of the target of the shortcut. The game should now launch like normal but it'll load the files you've put in your mymod directory if they exist.
(If you want the game to load a new lua file take a look at Shared.lua)
Hope this helps!
And I saw the video in which the devs were experimenting with the alien-vision, changing code while the game was running in a window. I tried it and it works, too! Changing the code and seeing the effect immediately is so cool.