[Unanswered] How can I make a simple mod?
TooMuchFun
NunyaBiznizz Join Date: 2014-04-28 Member: 195653Members
Heya fellow NS2 players and modders! I'm new to NS2 modding and I understand a good portion of Lua but what I don't understand is how to do anything with it. The wiki modding guide is obsolete from what I can tell and Rio's tutorial is either too old to be relevant (he left out section 3... very annoying) or just plain wrong.
I haven't figured out how to print a message to the console.
My general question is how do I examine the lua files and determine what modules to include in my mod so that I can use them? I understand that everything in the game is connected. That means I have to at least understand the modules that I am using if not the whole game. Rio's tutorial mentioned using the find in files feature of Decoda.
I don't know how useful that technique is because I've tried it but I don't know what files are relevant to search for what I want to do.
I haven't figured out how to print a message to the console.
My general question is how do I examine the lua files and determine what modules to include in my mod so that I can use them? I understand that everything in the game is connected. That means I have to at least understand the modules that I am using if not the whole game. Rio's tutorial mentioned using the find in files feature of Decoda.
I don't know how useful that technique is because I've tried it but I don't know what files are relevant to search for what I want to do.
Comments
or Print(string)
or Print(ToString(notastringthatwillbecomeastring))
You just make a new mod, and put relevant files in the lua directory, and then it will override them, or you can use hooks, look at existing mods to do this.
Futhermore we had some other thread here where we explained different ways of modding (hooks, overriding vanilla files, the entry system, the gamesetup.xml etc.) , use the search function to find them.
If you still have any question after read some other mods sources ask them here.
While more seasoned developers will probably use some other kind of Lua editor; for starting ns2 modding (assuming no real programming experience) I recommend you stick with the tools provided with the game.
Also, checkout this thread: http://forums.unknownworlds.com/discussion/128106/how-to-make-a-mod-for-natural-selection-2
Just about everything in that thread still applies, and the things that are wrong are mentioned.
Good luck, and remember to have fun! It can get frustrating some times, but stick with it and the satisfaction of seeing your own creation come to "life" will pay off!
I'm fairly certain the modding tools nearly destroyed my computer because I didn't realize I had about ten instances of the builder running and then I fired up NS2. All of a sudden my computer shutdown NS2 and all of my programs, and proceeded with shutdown without warning. It shut down normally but I think it may have overheated... Its still functioning now though.
One last thing how come when I use Decoda's debugging tool or even start without debugging my framerate is abysmal?
Just don't use the builder if you don't need. What you won't do if you aren't creating some new models etc. . Just place all your mod files directly into the output folder.
Also i never really needed my editors lua vm debugger, most bugs i run over are kinda game play related or don't show up by just running the code with a simple test case.
Just use the game directly to debug ( safest way ). Maybe not so fast if you do alot of typos etc. but otherwise it should be no issue.
Maybe you try to explain us then what exactly is your issue and post your code here or at sites like gihub