Pre-modding questions

_INTER__INTER_ Join Date: 2009-08-08 Member: 68392Members, NS2 Playtester, Reinforced - Shadow
edited May 2014 in Modding
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 :) )

Comments

  • GhoulofGSG9GhoulofGSG9 Join Date: 2013-03-31 Member: 184566Members, Super Administrators, Forum Admins, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, Reinforced - Supporter, WC 2013 - Supporter, Pistachionauts
    edited May 2014
    _INTER_ wrote: »
    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 :) )

    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 :)
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    While modding NS2 is relatively easy, I would agree that familiarising yourself with the gamecode is a good first step before undertaking any major mod projects. Doing some smaller mods that incorporate elements of what you want to do in the bigger mod, is always a good way to go when starting out.

    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 :D
  • _INTER__INTER_ Join Date: 2009-08-08 Member: 68392Members, NS2 Playtester, Reinforced - Shadow
    edited May 2014
    Thanks for the quick answer both of you, I appreciate it. Yes, I will start with small steps :) Don't expect anything all too soon, kek
  • GhoulofGSG9GhoulofGSG9 Join Date: 2013-03-31 Member: 184566Members, Super Administrators, Forum Admins, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, Reinforced - Supporter, WC 2013 - Supporter, Pistachionauts
    edited May 2014
    _INTER_ wrote: »
    Thanks for the quick answer both of you, I appreciate it. Yes, I will start with small steps :) Don't expect anything all too soon, kek

    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.
  • _INTER__INTER_ Join Date: 2009-08-08 Member: 68392Members, NS2 Playtester, Reinforced - Shadow
    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.
    Ughh I already fail at the "HelloUnknownWorlds"... Just nothing happens if I try to hotload the mod.
  • GhoulofGSG9GhoulofGSG9 Join Date: 2013-03-31 Member: 184566Members, Super Administrators, Forum Admins, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, Reinforced - Supporter, WC 2013 - Supporter, Pistachionauts
    edited May 2014
    _INTER_ wrote: »
    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.
    Ughh I already fail at the "HelloUnknownWorlds"... Just nothing happens if I try to hotload the mod.

    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.
  • _INTER__INTER_ Join Date: 2009-08-08 Member: 68392Members, NS2 Playtester, Reinforced - Shadow
    edited June 2014
    @GhoulofGSG9‌
    Tip: to speed things up i really suggest to use a dev map. Those can be found in this forum or some major mods.
    I couldn't find one. :(
    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...
  • GhoulofGSG9GhoulofGSG9 Join Date: 2013-03-31 Member: 184566Members, Super Administrators, Forum Admins, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, Reinforced - Supporter, WC 2013 - Supporter, Pistachionauts
    About the testmap: http://steamcommunity.com/sharedfiles/filedetails/?id=113181405 The watermod contains for e.g samusdroids testmap ;)

    I wouldn't use Eclipse for Lua, try some Lua IDEs like Decoda (incuded in ns2), notepad++ or ZeroBrane Studio
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    I have many different testmaps for different things, they contain the basic elements to get the game running, but nothing else.. If you haven't got one, just give me a shout and i'll send you one..
Sign In or Register to comment.