Pre-modding questions
_INTER_
Join Date: 2009-08-08 Member: 68392Members, NS2 Playtester, Reinforced - Shadow
Hello mod geniuses, now that the community is asked to advance NS2 I thought about getting into modding myselfe. I've got a few questions though I wanted to pose, so I can evaluate if its worth pursuing
the idea I have or not:
- Is it possible to send and receive network messages to specific servers / ip from NS2 client and server. I saw some .json files in the game folder. Can I send, receive and then parse my own .json to / from a server (with RESTful interface)?
- Do modders have access to the "Gather" part of NS2. Specifically to the server creation and player assigning process?
- What player data and stats do modders have access to before, during and after a game?
Thanks in advance
(you probably figured out my idea from these questions already )
the idea I have or not:
- Is it possible to send and receive network messages to specific servers / ip from NS2 client and server. I saw some .json files in the game folder. Can I send, receive and then parse my own .json to / from a server (with RESTful interface)?
- Do modders have access to the "Gather" part of NS2. Specifically to the server creation and player assigning process?
- What player data and stats do modders have access to before, during and after a game?
Thanks in advance
(you probably figured out my idea from these questions already )
Comments
1.Yes you can do that via HTTPRequests. Shine allready does this if you look for a example (https://github.com/Person8880/Shine/blob/master/lua/shine/core/server/config.lua)
2. Yes all gameplay elements are done via lua and therefor moddable. Search for Sabot (codename of Gather) in ns2/lua
3. As i said in 2 everything of ns2 is done via lua so you have 100% access to the game code. So you have access to basically all roundstats + hivestats. Have a look at the PayerInfoEntity
If something is missing you can get those data aswell via creating count functions. example the ns2stats mod (https://github.com/BrightPaul/NS2Stats.com/blob/master/lua/shine/extensions/ns2stats/server.lua)
Overall i wouldn't recommend you to start with such a big modding project if you don't have any ns2 modding experiment.
First try to understand how the gamecode works by doing some smaller stuff as training and reading other mods source (all major mods are avaible at github, you can get every mods code from the workshop folder after subscribing to it anyway )
Hope this answers your questions
The advice given above is sound (apart from that should be PlayerInfoEntity :P) and there is not really a lot more to add other than welcome to the wonderful world of NS2 modding
If you run into any problem or have more questions just ask them here. I think someone of us other modders will be happy to help you out.
Don't use hotload that feature is pretty broken.
"Small" post to read about this: http://forums.unknownworlds.com/discussion/comment/2189892/#Comment_2189892
There is another good thread where we ( most ns2 modders ) debated about different ways of modding ns2 more in detail but can't find it atm.
Would you know a good small one? It's really a pain to load tram all the time.
I'm also trying to setup LuaEclipse and hope autocorrection / -completion works well there.
Edit: LuaEclipse seems not to be working on 64bit Windows architecture...
I wouldn't use Eclipse for Lua, try some Lua IDEs like Decoda (incuded in ns2), notepad++ or ZeroBrane Studio