What is the standard, modern way to create a mod in Build 257
Hello, everyone!
I see many resources that describe methods of hooking up LUA mods in NS2, but what is the proper, modern method of creating a mod that includes code changes as of build 257? Everything seems to date back to build 147 or some such and hasn't been updated since.
Can someone link me to the definitive build 257 starting point? I'm sorry for making this thread, but nothing seems particularly intuitive to me.
Thanks a lot!
I see many resources that describe methods of hooking up LUA mods in NS2, but what is the proper, modern method of creating a mod that includes code changes as of build 257? Everything seems to date back to build 147 or some such and hasn't been updated since.
Can someone link me to the definitive build 257 starting point? I'm sorry for making this thread, but nothing seems particularly intuitive to me.
Thanks a lot!
Comments
I recommend taking a look at:
http://forums.unknownworlds.com/discussion/128106/how-to-make-a-mod-for-natural-selection-2#latest
This will at least get you pointed in the right direction. Yes, this does it the "Old Way", but in practice it's not the "Wrong Way" to go about it. Frankly, there is no wrong way. It's just a matter of picking the trade-offs you're comfortable with.
In some ways, the "modern" (if you can call it that) way is to use Sewlek's mod framework approach, see this workshop item:
http://steamcommunity.com/sharedfiles/filedetails/?id=137123467
Simply overriding files by adding stuff to default code and put that in your mod works too. Some things you have to do that in where you can't hook into functions, like most GUI files.
So hackish, though.
Because instead of overriding files you should use hooks and the entry system. game_setup.xml should only be used for new gamemodes changing the game in a huge way (like the faded, mvm, combat, xenoswarm)
Overriding game files is not the optimal way to go and should only be used if there is no other way to do it.
Thanks for stopping me/walking me through this, btw.
Just put some code in a myCode.entry to link to a .lua file and put it in the lua/entry/ and lua/ folder respectively. It should load automatically.
http://wiki.unknownworlds.com/ns2/Modding_Framework
Example program:
./lua/entry/HPK.entry ./lua/HPK.lua