General Modding/Scripting questions

VaiN474VaiN474 USA Join Date: 2013-10-12 Member: 188664Members
Hello, everyone. Sorry for the long post from a noob, but I wanted to give an introduction to let you know that I'm serious about my modding.

( TL;DR: I'm an experienced Lua scripter and host of other games. Where can I find detailed info on server-side scripting for NS2? )

I've had NS2 for a long time but as I spend most of my time in Linux I hadn't really played it much, so very happy to have native Linux support now. When first playing the game I hadn't even considered hosting as I wouldn't want to pay the cost of a windows server. Plus I've been running Linux VPS's for a long time now. I look forward to hosting a custom NS2 server in the near future.

I'm a Lua fanatic and have created custom script systems for Counter-Strike 2D which were quite successful. I hosted the Rewards Gaming Community and servers and utilized my scripts to provide a unique experience for players. Basically we had a leveling system based on kills/stats and offered rewards with each level, had GUI display of stats and requirements for next level, custom game modes, and even created a Admin Control Panel for the web using CGILua. This was months of work, and no one really appreciated it as CS2D is a small community of mostly immature kids. As such I've also hosted servers for Minecraft, CS 1.6, and Terraria. Been modding games since the late 90's. I'm a grown-ass-man, and I thinks it's time for an upgrade. :P

NS2 really peeked my interest when reading up on it's extensive use of Lua during development, but I since haven't been able to find many details on the ins-and-outs of it's implementation for servers. I've tried looking through the wiki but it doesn't really go into detail. I will likely dive in and try things, but I thought I'd reach out for some general info so as not to go hypothermic and die before getting anywhere.

Is it possible to create a server-side script system?
Can scripts track events (via hooks) such as kills, respawns, building creation/destruction?
Can you trigger actions such as equipping/spawning weapons, displaying GUI text/images, kill players?
Can you interrupt events such as preventing a player from joining the server, weapon damage adjustments per player, ect?
Any specific and reliable ways of identifying players other than IP?
I've seen some client-side mods, but what are the limitations for server-side mods? Does NS2 support servers with client-side changes of some sort?
Are there any limitations to the Lua sandbox (i.e. disabled libraries, inability to import external libraries), or any other general info that I should be aware of before getting started?

I love hosting game servers, but I never like to be a host that just tosses up another vanilla server, I prefer to have something unique to offer. If someone could point me to some details, or even some basic tutorials, it would be much appreciated. I understand how scripts work, I just need some basics on how they work for this game (specifically a linux dedicated server). Who knows, I may be able to create some interesting new features.

Thanks

Comments

  • SamusDroidSamusDroid Colorado Join Date: 2013-05-13 Member: 185219Members, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Playtester, NS2 Community Developer, Pistachionauts
    1) From what I understand you want to do, yes.
    2) You can pretty much do whatever you can imagine.
    3) Yes
    4) Server code is not loaded until a person joins the server.
    5) You can get player names, ip's, etc...
    6) None. Client is the one limited.
    7) Probably but don't know.

    There...is no documentation, other than find in files feature. The code is your documentation. There is an "API" but it is not helpful.
  • VaiN474VaiN474 USA Join Date: 2013-10-12 Member: 188664Members
    Good enough for me. Thanks for the info.
  • JimWestJimWest Join Date: 2010-01-03 Member: 69865Members, Reinforced - Silver
    Server code not loaded until user joins ???
    Wtf thats completly wrong dude...

    Our combat started as a comeptly server only mod (before workshop was there), buts its limitated (you can send any gui infos to the client etc.)
  • SamusDroidSamusDroid Colorado Join Date: 2013-05-13 Member: 185219Members, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Playtester, NS2 Community Developer, Pistachionauts
    edited October 2013
    Well, you can't stop a person from joining until they join the ready room, at least from what I've seen. As mods activate when you join the ready room.
  • 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 October 2013
    SamusDroid wrote: »
    Well, you can't stop a person from joining until they join the ready room, at least from what I've seen. As mods activate when you join the ready room.

    Actuall you can now. Take a look at the shine reserved slot plugin. There is a function now called before a client starts precaching. You can use that to add your check.
  • SamusDroidSamusDroid Colorado Join Date: 2013-05-13 Member: 185219Members, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Playtester, NS2 Community Developer, Pistachionauts
    edited October 2013
    SamusDroid wrote: »
    Well, you can't stop a person from joining until they join the ready room, at least from what I've seen. As mods activate when you join the ready room.
    Actuall you can now.

    Well...yes but no. If you count reserved slots, yes. But you can't do anything during client loading.
  • JimWestJimWest Join Date: 2010-01-03 Member: 69865Members, Reinforced - Silver
    Thought you meant you can't load any code before a player joins ^^
  • RedSwordRedSword Join Date: 2006-12-07 Member: 58947Members, Reinforced - Shadow, WC 2013 - Supporter
    VaiN474 wrote: »
    Hello, everyone. Sorry for the long post from a noob, but I wanted to give an introduction to let you know that I'm serious about my modding.

    ( TL;DR: I'm an experienced Lua scripter and host of other games. Where can I find detailed info on server-side scripting for NS2? )

    I've had NS2 for a long time but as I spend most of my time in Linux I hadn't really played it much, so very happy to have native Linux support now. When first playing the game I hadn't even considered hosting as I wouldn't want to pay the cost of a windows server. Plus I've been running Linux VPS's for a long time now. I look forward to hosting a custom NS2 server in the near future.

    I'm a Lua fanatic and have created custom script systems for Counter-Strike 2D which were quite successful. I hosted the Rewards Gaming Community and servers and utilized my scripts to provide a unique experience for players. Basically we had a leveling system based on kills/stats and offered rewards with each level, had GUI display of stats and requirements for next level, custom game modes, and even created a Admin Control Panel for the web using CGILua. This was months of work, and no one really appreciated it as CS2D is a small community of mostly immature kids. As such I've also hosted servers for Minecraft, CS 1.6, and Terraria. Been modding games since the late 90's. I'm a grown-ass-man, and I thinks it's time for an upgrade. :P

    NS2 really peeked my interest when reading up on it's extensive use of Lua during development, but I since haven't been able to find many details on the ins-and-outs of it's implementation for servers. I've tried looking through the wiki but it doesn't really go into detail. I will likely dive in and try things, but I thought I'd reach out for some general info so as not to go hypothermic and die before getting anywhere.

    Is it possible to create a server-side script system?
    Can scripts track events (via hooks) such as kills, respawns, building creation/destruction?
    Can you trigger actions such as equipping/spawning weapons, displaying GUI text/images, kill players?
    Can you interrupt events such as preventing a player from joining the server, weapon damage adjustments per player, ect?
    Any specific and reliable ways of identifying players other than IP?
    I've seen some client-side mods, but what are the limitations for server-side mods? Does NS2 support servers with client-side changes of some sort?
    Are there any limitations to the Lua sandbox (i.e. disabled libraries, inability to import external libraries), or any other general info that I should be aware of before getting started?

    I love hosting game servers, but I never like to be a host that just tosses up another vanilla server, I prefer to have something unique to offer. If someone could point me to some details, or even some basic tutorials, it would be much appreciated. I understand how scripts work, I just need some basics on how they work for this game (specifically a linux dedicated server). Who knows, I may be able to create some interesting new features.

    Thanks

    Might want to read http://forums.unknownworlds.com/discussion/130605/general-questions#latest
Sign In or Register to comment.