What do I need to do to add a new thing to NS2?

rgbDreamerrgbDreamer Join Date: 2011-10-02 Member: 125190Members
edited October 2011 in Modding
<div class="IPBDescription">add kTechId entry, add kTechData entry...</div>I'm trying to add something to the game. I'm hoping someone has just a checklist of all the places I need to add it. So far I have:

In main file:
*inherit your class from an appropriate parent class
*MyClass.kMapName = "myclass"
*MyClass.LinkClassToMap("MyClass", MyClass.kMapName, {})

In other files:
*add its name to the kTechID enum in TechTreeConstants.lua
*add a table of its values to the buildTechData() function in TechData.lua
*add a button offset to TechTreeButtons.lua (use 22 for a ?)
*if you're working in new files, add them to the lists of loaded files in Client.lua, Server.lua, or Shared.lua
*add a line: self.techTree:AddTYPENode(kTechId.MyClass, kTechId.None, kTechId.None) in either AlienTeam.initTechTree or MarineTeam.initTechTree in AlienTeam.lua or MarineTeam.lua. TYPE should be "build", "research", etc. Look at the others there in the function to decide. The two fields here can be prerequisites.

EDIT: looks like things are working now with all this. These assume that you're inheriting from or copying values from another class; I'll try to add a complete list of things for making a new class from Entity later.
Sign In or Register to comment.