Getting up and running with NS2/Decoda
ReK
Join Date: 2004-08-30 Member: 31058Members, Constellation, Reinforced - Shadow, WC 2013 - Silver
in Modding
So, here's what I've done:
- Created a mod in Launchpad
- Copied all of steamapps\common\natural selection 2 to it's dir
- Ran Decoda (I've tried from Launchpad and from the exe in the new location)
- Loaded ns2.deproj
- Modified BiteLeap.lua to make leap (secondary) cost 0 energy as a test
- Saved changes
- Debug->Start without Debugging, change isn't there
- Ran NS2 shortcut from Launchpad with mod selected, change isn't there
- Ran NS2.exe from the project folder, change isn't there
Halp?
It's lua so I shouldn't have to be rebuilding anything, but every way I try to run the game it just runs it vanilla.
I'm quite sure I'm missing something easy and obvious, or I'm just doing it wrong completely, but half an hour of trolling forums hasn't found me any answers, and no one seems to be on IRC at the moment.
- Created a mod in Launchpad
- Copied all of steamapps\common\natural selection 2 to it's dir
- Ran Decoda (I've tried from Launchpad and from the exe in the new location)
- Loaded ns2.deproj
- Modified BiteLeap.lua to make leap (secondary) cost 0 energy as a test
- Saved changes
- Debug->Start without Debugging, change isn't there
- Ran NS2 shortcut from Launchpad with mod selected, change isn't there
- Ran NS2.exe from the project folder, change isn't there
Halp?
It's lua so I shouldn't have to be rebuilding anything, but every way I try to run the game it just runs it vanilla.
I'm quite sure I'm missing something easy and obvious, or I'm just doing it wrong completely, but half an hour of trolling forums hasn't found me any answers, and no one seems to be on IRC at the moment.
Comments
Change line 51 in BiteLeap.lua from
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->function BiteLeap:GetSecondaryEnergyCost(player)
return 40
end<!--c2--></div><!--ec2-->
to
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->function BiteLeap:GetSecondaryEnergyCost(player)
return 0
end<!--c2--></div><!--ec2-->
and restart the server
If by having the new game selected in the drop box and then running NS2, that's exactly what I did.
<!--quoteo(post=1787026:date=Jul 27 2010, 04:37 PM:name=toAzron)--><div class='quotetop'>QUOTE (toAzron @ Jul 27 2010, 04:37 PM) <a href="index.php?act=findpost&pid=1787026"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I haven't actually used the launch pad yet (besides looking at it). Opened the ded server via command line and opened the game though steam and connected via lan<!--QuoteEnd--></div><!--QuoteEEnd-->
Haven't tried that, will do when I get home.
1) Is there a specific lua file I need to make that is auto executed by the mod?
2) How do I configure the mod settings (friendly name etc)
3) If I copy a ns2 lua file into my mod\lua directory, will mine overwrite it?
4) Can you make server-side only mods?
*Sigh* I wanna play :)
Copy the ns2 folder in your Natural Selection 2 directory to a new folder with a new name (eg mod)
Run ns2.exe -game mod
It showed the code changes I'd made only to the code in the mod directory (adding Flashlight to the bindings menu by editing Bindings.lua)
Not sure how to selectively override code from ns2 directory... perhaps it does it by default?
Copy the ns2 folder in your Natural Selection 2 directory to a new folder with a new name (eg mod)
Run ns2.exe -game mod
It showed the code changes I'd made only to the code in the mod directory (adding Flashlight to the bindings menu by editing Bindings.lua)
Not sure how to selectively override code from ns2 directory... perhaps it does it by default?<!--QuoteEnd--></div><!--QuoteEEnd-->
thank you! i was using the pre-alpha /game switch: "\path\to\ns2\exe /game \path\to\mod\folder" on a shortcut and that didn't work.
I switched it to "\path\to\ns2\exe -game \path\to\mod\folder" and it worked perfectly!