First Modding Adventure - NS2:Team Arena

KartoshkaKartoshka Join Date: 2012-01-13 Member: 140302Members, Reinforced - Shadow
Hey guys,

I have been wanting to get into Modding NS2 for a while now. I am a web programmer, so this is a bit of a different paradigm for me and I am learning lots of cool new things.

I thought I would start off trying to build an idea that I have had running around in my head. Basically, one of the problems I have seen is that there is a lack of a bridging game mode for NS2, meaning that the only context in which most new comers have to learn combat mechanics for lifeforms is the vanilla game mode, which is obviously very punishing ("Oh hey I'm a lerk! This is cool I can fly" *Shotgun bang dead*).

In a nutshell, I want to build a round-based, arena style mod played on heavily down-scaled maps and balanced around 3 v 3 combat. If you have ever played clan arena in quake, this is the kind of style I would be thinking. The twist is that each team at the beginning of the round has a certain amount of points to spend on either lifeforms (aliens), weapons (marines) or upgrades/evolutions (both) which increases each round independent of win or lose (so not like the CS:GO economy system). So the first round each team gets 100 units to spend on these things, the next round, 200, then 400, etc. In this way, the game mode kind of exposes the phases of the game that you might find in an actual vanilla match. i.e. the first round would be skulks vs lmgs, then maybe by round 5 you are looking at fades vs shotguns etc. To mix things up a bit players are able to donate their points to a teammate in order to "stack" a player, so in the first round you might get a gorge with an un-upgraded skulk if you so desired. I am hoping that this idea might appeal to both new players and vets a like (this mode would be great combat practice for teams etc). Obviously, marines have the advantage in a lot of combat situations where there isn't an element of surprise, but this would be balanced by the units/points system that each team get. The aim would be to keep all the values the same however lifeforms, so that the combat mechanics are as close to vanilla as possible.

I don't really mind if this isn't something that takes off, its more an exercise in learning the modding system, so that maybe in the future I can contribute in different ways if needed. I am hoping it is all right for me to open this thread so that I can post occasional questions about how to best implement certain features. The questions might be quite basic, but I guess you have to start somewhere. The only feature I have implemented so far is a simple round counter to keep track of the current round and display a message in the console regarding who won it.

Anyway, would love some (any) feedback on the idea itself and will update the thread if I come across any hurdles while actually making the thing! If there is a better way to access help please let me know.

Regards,

Kartoshka
«1

Comments

  • PelargirPelargir Join Date: 2013-07-02 Member: 185857Members, Forum Moderators, NS2 Playtester, Squad Five Blue, Squad Five Silver, NS2 Map Tester, Reinforced - Supporter, Reinforced - Silver, WC 2013 - Silver, Forum staff
    Sounds like a very nice idea. Seems also a mix up between Combat and Last Stand. I'm pretty sure lots of people would try it out just to practice, including competitive players.

    One thing that might be hard to work on is balance. It doesn't have to be perfectly balanced I assume but it has to be somehow fun to play both sides. But honestly, your project has some great potential. Good luck!
  • YojimboYojimbo England Join Date: 2009-03-19 Member: 66806Members, NS2 Playtester, NS2 Map Tester, Reinforced - Supporter, Reinforced - Silver, Reinforced - Shadow
    Still waiting for Lerks with Railguns, maybe you are the one the finally realise the idea :smiley:
  • KartoshkaKartoshka Join Date: 2012-01-13 Member: 140302Members, Reinforced - Shadow
    Thanks for the encouragement @Pelargir . Yeah the balance is always going to be a big one, but I suppose for now I just need to get a working prototype up that has the bare minimun features required to see if its actually an interesting game mode.

    Haha @Yojimbo that would be insane. Maybe that will be my second venture into modding. Railgun lerks actually sound really fun and challenging in all honesty.
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    Sounds good, I wish you luck, lots of it :D
  • FlaterectomyFlaterectomy Netherlandistan Join Date: 2005-02-03 Member: 39643Members, NS2 Playtester, Squad Five Blue, Squad Five Silver, NS2 Map Tester, Reinforced - Shadow, WC 2013 - Shadow, Subnautica Playtester, NS2 Community Developer, Pistachionauts
    This sounds like a fun idea! Once you have something running we'll definitely give it a go at SCC sundays.
  • KartoshkaKartoshka Join Date: 2012-01-13 Member: 140302Members, Reinforced - Shadow
    Hey guys,

    I have spent about a day so far attempting to prototype the mod. So far I have managed to implement round based gameplay as well as other simple but necessary parts. I thought I would put out there a question that I have (it may sound quite simple):

    - Currently the rounds are being tracked in variables inside of my modified version of NS2Gamerules. Now this might be the completely wrong way to keep track of this state. But say this is ok to do, how would I expose these variables to the GUI? From what I can see, the gamerules are only available to server code, but I am guessing the GUI is all client? Hope this makes even a little sense.

    Much appreciation for any help or suggestion on how I might store and access this stuff appropriately.
  • KartoshkaKartoshka Join Date: 2012-01-13 Member: 140302Members, Reinforced - Shadow
    OK, I discovered that GameInfo does exactly what I was needing so we are all good!

    Hoping to get a working prototype up by the weekend.
  • KartoshkaKartoshka Join Date: 2012-01-13 Member: 140302Members, Reinforced - Shadow
    Hi guys,

    Just a quick technical issue that i need help with that i thought i would throw out there before going to bed.

    So part of the mod I am making is being able to allow players to purchase armor/weapon upgrades independent of the rest of the team. I got this working, but I can't for the life of me get the upgrade icons to show on the hud :(

    This issue is that to allow individual armor/weapon upgrade purchases, i initialised a version of the tech tree that is specific to each marine ( as opposed to each marine team as armor weapon upgrades would usually work). I got the idea from the combat mod, and it worked like a charm. The problem is I don't know how to access the players marine specific properties on the client. I have access to Client.GetLocalPlayer() of course, but this does not seem to give me the marine entity, so I am unable to retrieve the individuals version of the tech tree that i need in order to get the current armor level which would in turn allow me to display the correct armor/weapons icons.

    Oh well, gonna sleep on it but if you have any hints, please don't hold back.

  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    edited December 2015
    I haven't modded in a long time, but making Armour/Damage upgrades for individuals is a monumental pain as it breaks the 'team' ethos that the Marines are built around. It is a result of the Asymmetrical design of the two teams, the asymmetry is definitely more noticeable in code than it maybe is in the game.

    If you have given each marine it's own version of Techtree, that will still be both server and client. You will need to make sure the changes are happening on both.

    If I remember correctly, you would then just use the local gameinfo file to hold the data you need to display, although that might be the scoreboard. As I said it's been a long time. Although if the problem is literally just displaying the HUD icon, then you could clone the health/armour code, and re-purpose it to display upgrades, as the code for health etc is n the marine player, which is where their local tech tree will also be.

    There is one comment I would make on your solution, if you have indeed initialised a new tech tree for each player, that is going to eat through server and client cycles everytime you add an additional marine player, as well as the memory cost involved in storing an additional tech tree for each player.

    While it may get around your problem, it will make your code scale extremely badly. I know you plan to balance for 3v3 combat, but the most vocal people complaining and downvoting your mod on steam will be the people who are trying to play this on 18v18 servers.

    Although you don't plan scale, I would certainly look at another way of doing it. Combat redesigned the whole upgrade system, it is completely custom and in no way related to any NS2 code, they had to do that to avoid the kind of issues you are/will be facing.
  • KartoshkaKartoshka Join Date: 2012-01-13 Member: 140302Members, Reinforced - Shadow
    Good points @Soul_Rider with regard to performance and the team aspect of the game. Maybe I could just simplify things a bit and just have armor and weapons scale statically with the round number. Because another problem with this is the kharaa not knowing what armor or weapons a marine has chosen as there is no visual indicator for them, which could be confusing ("Why did that marine take 4 bites!"). I guess at this stage, it is in the prototyping phase so all these ideas will get hashed out. It took a while to figure out how to get the individual armor/weapons thing to work, which is always a trap when developing something cause its hard to let it go when you think "I spent so long developing that". But you are right, i either need to go the whole hog to avoid performance issues or just do something simpler.

    I have considered taking a bit of a different angle with the mod, but not sure. It was clear as soon as I started making it that the lack of a clear objective really would make the gameplay boring. Without something to force the action, even just a simple thing, it was going to be pretty stale. I still want to maintain the short round based nature of the game (1 - 2 minute rounds) with an emphasis on the combat side of things and also supporting small player counts, but here is what I came up with. I am thinking about making it a VIP protection sort of mod similar to the assassination maps in cs 1.6. So, to explain, a random marine player is chosen to to be the VIP. The aim is for the marine team to escort the VIP to the other side of the map to the enemy tech point. He has armor that scales accordingly with the number of marines alive so that he can't just be sniped. Initially I will apply the nano shield affect to him so that the aliens know who he is. Depending on the player count, the marine team will have to enable a certain amount of "keys" (powernodes) to enable the extraction point. This is to encourage the marine team to split up and not just be in a big deathball. Given the round based nature, there will be no respawning.

    One of the reasons I am thinking about taking this approach is that combat and engagements in NS2 are kind of situational. Rarely do you see a big clash between 4 marines and 4 aliens, usually the aliens would split push or go base or something. So naturally there would be an imbalance. I would still love to make the more arena style mod, but i am just stuck for ideas on how best to force the action and give the teams objectives rather than just pure elimination. I feel like a fun and engaging game mode for rookies, that exposes them to the combat mechanics of the game while still having an objective is more beneficial right now than just a pure combat focused mode (hence the VIP suggestion). But I just don't know. I am and will be developing this pretty actively atleast until I can see that it will or won't work, so now is the time for ideas I guess.

    Thanks again Soul_Rider, I think you saved me a lot of pain running into those performance issues! It would have been a shame to get it all working and then find out that it doesn't support other player counts.
  • xDragonxDragon Join Date: 2012-04-04 Member: 149948Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow
    When I added combat to classic (confusing right?) I used the already existing vanilla upgrades system (what aliens use to buy carapace etc). I rewrote how almost all of it works, but the core concept is mostly the same. This is a mixin which is applied to every player entity, and basically just consists of a table of netvars that tracks purchased techIds. Since each team had unique upgrades offered, but not upgrades which were player specific it seemed the easiest to do. I use the techtree to see what can be purchased, and upgrades to track was is already purchased. Since the techids are just numbers, you are talking about a networking cost of what I assume is ~2 bytes for each added upgrade 'slot' (given that you can restrict the range to the enum). If you wanted to compress it even further you could use a bitmask of all the upgrades and then network just that.

    When it comes to LUA stuff, I really wouldnt worry about memory consumption unless your tracking some pretty crazy things. I used to store arrays for all the light and prop data in each map twice and never ran into any issues. The tech table is just a big string array, what you do need to be careful of is CPU cost however. I would suggest just writing it however you can get it work, and place profile tags in functions which you think might be costly. Later on you can do testing to see if thats the case, and optimize from there. I do remember tech tree updates being somewhat slow in the past, so I think its probably best to avoid once for each player if possible.

    For anything you might want to be visible to other players, you will need to network it on the player entity most likely in some fashion. If there are things which are not relevant in that fashion, you can use a 'private' netvar.
  • ceribikceribik Join Date: 2009-11-24 Member: 69492Members, Reinforced - Supporter, Reinforced - Silver
    Kartoshka wrote: »
    Hi guys,

    Just a quick technical issue that i need help with that i thought i would throw out there before going to bed.

    So part of the mod I am making is being able to allow players to purchase armor/weapon upgrades independent of the rest of the team. I got this working, but I can't for the life of me get the upgrade icons to show on the hud :(

    This issue is that to allow individual armor/weapon upgrade purchases, i initialised a version of the tech tree that is specific to each marine ( as opposed to each marine team as armor weapon upgrades would usually work). I got the idea from the combat mod, and it worked like a charm. The problem is I don't know how to access the players marine specific properties on the client. I have access to Client.GetLocalPlayer() of course, but this does not seem to give me the marine entity, so I am unable to retrieve the individuals version of the tech tree that i need in order to get the current armor level which would in turn allow me to display the correct armor/weapons icons.

    Oh well, gonna sleep on it but if you have any hints, please don't hold back.

    Have you tried looking at scatter's NS2 Overhaul mod? It has user-purchasable armour.

    http://steamcommunity.com/sharedfiles/filedetails/?id=534958983
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    The funny thing is scatter asked me almost exactly the same question as was posted by the OP, earlier that same day. That's why I chimed in with an Answer, more than coincidence when 2 modders ask the same question on the same day...
  • ScatterScatter Join Date: 2012-09-02 Member: 157341Members, Squad Five Blue
    edited December 2015
    It's no coincidence, Kartoshka and I are working on different mods but with some overlap which is not surprising when you ditch the RTS mechanics of the game. Theres some aspect of not reinventing the wheel if it isn't necessary.
  • KartoshkaKartoshka Join Date: 2012-01-13 Member: 140302Members, Reinforced - Shadow
    Yes, us Aussies like to band together on occasion. It has been really helpful so far having access to someone working on overlapping aspects of the modding process. In my web development career, I have gotten too used to using google to solve all my problems which is unfortunately not possible when modding NS2! Although the forums are also a good resource.

    I created a small update video that discusses some of the thinking behind the mod I am working on. At this stage I am going full throttle towards prototyping this idea of an assassination type game mode which involves getting the marine VIP to the extraction point (enemy tech point), but I am confident that even if the mod doesn't work then maybe there is still something I can make from the pieces I have put together so far. In the future, and if all goes well I would like to expand the mod to encompass a variety of round based minigames. If nothing else, this project is preparing me for the real project - lerks with railguns ( @Yojimbo ). As a disclaimer, the following video does not demonstrate any of the flow of the actual game, its just more me running round the map explaining things and shooting skulks with my top secret VIP weapon. So watch if you have a spare ten minutes that you are willing to never get back:



  • YojimboYojimbo England Join Date: 2009-03-19 Member: 66806Members, NS2 Playtester, NS2 Map Tester, Reinforced - Supporter, Reinforced - Silver, Reinforced - Shadow
    Kartoshka wrote: »
    Yes, us Aussies like to band together on occasion. It has been really helpful so far having access to someone working on overlapping aspects of the modding process. In my web development career, I have gotten too used to using google to solve all my problems which is unfortunately not possible when modding NS2! Although the forums are also a good resource.

    I created a small update video that discusses some of the thinking behind the mod I am working on. At this stage I am going full throttle towards prototyping this idea of an assassination type game mode which involves getting the marine VIP to the extraction point (enemy tech point), but I am confident that even if the mod doesn't work then maybe there is still something I can make from the pieces I have put together so far. In the future, and if all goes well I would like to expand the mod to encompass a variety of round based minigames. If nothing else, this project is preparing me for the real project - lerks with railguns ( @Yojimbo ). As a disclaimer, the following video does not demonstrate any of the flow of the actual game, its just more me running round the map explaining things and shooting skulks with my top secret VIP weapon. So watch if you have a spare ten minutes that you are willing to never get back:



    Remember if you ever get disheartened, Exosuit boxing is also another idea, @Scatter and his modular exos will be able to tell you more about it though :smiley:
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    I always found I'd throw myself into a project with a big idea, then as I was developing it, something would cause me to go off at a tangent, a particular element I added, or a suggestion from someone. As such, I have learned to not plan too many specifics at the start of the project.

    I have a feeling/vision of what I want to create. No details, but the concept and the main driving force behind the game, then I spill out a load of ideas and start work. I very quickly find myself changing and branching down routes, but the key is to keep the overall vision in your mind at all times.

    For example, my current game is a 'spiritual' sequel to GorgeCraft. My vision is to enable players creativity and allow them to produce art to their hearts content. I want to make people interested enough in art/game creation, that they go on and learn how to make usable art for in the real world. Either that, or just have fun when playing with the game.

    This makes it easier on myself to go with the flow, instead of holding onto specific mechanics or ideas that I don't want to let go of, even though ultimately, I should..
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    edited December 2015
    Exosuits - Boxing (and shooting, in fact, more shooting than boxing.)

    Yeah it was a quick thing, but I really think it could have worked, however I was too invested in PG and GorgeCraft at the time to take it any further. Over 3 years ago already, where does time go?
  • KartoshkaKartoshka Join Date: 2012-01-13 Member: 140302Members, Reinforced - Shadow
    I can definitely relate to that concept of ideas changing and going down tangents. One of the things I wasn't expecting when I started modding was just how draining it can be when you spend a lot of time on an idea and then you begin to have doubts as to whether it will work or not, leading to a dip in motivation. Maybe that's just something that happens whenever we do something creative with the intention that it will be consumable by other people.

    I guess one of the primary goals I have is to create a game mode that exposes the combat layers of the game so that players have an opportunity to play lifeforms and use equipment in a much more risk free environment. As long as I am keeping that goal in mind, I am not too concerned about what the objective of the game is and how the rest of it looks.
  • FlaterectomyFlaterectomy Netherlandistan Join Date: 2005-02-03 Member: 39643Members, NS2 Playtester, Squad Five Blue, Squad Five Silver, NS2 Map Tester, Reinforced - Shadow, WC 2013 - Shadow, Subnautica Playtester, NS2 Community Developer, Pistachionauts
    The only experience I have to share in that regard is when we made Skulks With Shotguns. The motivating factor there was largely the people I was making it with, and the clear aim of simple, uncomplicated gameplay.

    1. Skulks have shotguns
    2. There are two teams
    3. Capture the flag

    I suppose what can help is, once you have a basic playable structure, to get the mod out there so people can play it. Playing it with people and talking about it helps immensely. Both SWS and Caged have taught me that, at least.
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    I have to agree 10000000%

    Talking about your game with other people, is immensely helpful, and even more so when they are actually playing it.
  • KartoshkaKartoshka Join Date: 2012-01-13 Member: 140302Members, Reinforced - Shadow
    edited December 2015
    Hey guys,

    Just an update on where things are up too. Had some good playtests over the last week or so thanks to Kid letting me use one of his aussie-based ns2 servers.

    Yesterday we played the mod for the first time on 9 v 9 and we discovered it was nearly impossible for the aliens to lose after about round 3 or 4 due to too many higher lifeforms! So I have some balancing and bug fix work to do for the next little while.

    Golden happened to stumble on the mod and was streaming at the time, so I will provide a link below of the VOD if anyone is interested. I think it gets played on about 3-4 maps. It was really interesting to experience someone elses first time with the mod. One of my biggest challenges I think is communicating what the heck people are supposed to be doing!

    Does anyone have any ideas on how to best communicate the objective of a new game mode? Or is it just part of the discovery process? I have updated relevant game strings, but i dont think people really pay attention to them all that much.

    *edit* ok turns out i don't know how to properly link to a twitch VOD. will try get the proper link when possible.
  • twilitebluetwiliteblue bug stalker Join Date: 2003-02-04 Member: 13116Members, NS2 Playtester, Squad Five Blue
    Big flashing signs, minimap icons and waypoints are probably the best at directing players to objectives. I remember first playing Dirty Bomb and getting overwhelmed that I felt annoyed by the audio directions. It takes some new players a while to learn the objectives, even if you throw it in their face. You need to be quite forceful for them to learn fast. :P
  • CmdrKeenCmdrKeen Join Date: 2013-05-21 Member: 185321Members, Reinforced - Shadow
    Kartoshka wrote: »
    *edit* ok turns out i don't know how to properly link to a twitch VOD. will try get the proper link when possible.

    Here you go

    The VOD will be auto-deleted by twitch though in a couple of weeks unless @Golden highlights it, FYI.

  • KartoshkaKartoshka Join Date: 2012-01-13 Member: 140302Members, Reinforced - Shadow
    Thanks @CmdrKeen.

    Golden kindly put it on Youtube as well for easy viewing:
  • digitaldigital Join Date: 2011-01-30 Member: 79669Members
    edited February 2016
    Would you be interested in making a multiplayer mod in which gorges rule in place of a commander ala Natural Selection Original? The good old days of gorges rushing to drop the next hive from their own player res. Could call it the Sovereign Gorge mod.
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    @digital the mod already exists. It's called NS2c (classic) and is NS1 in NS2 skin, as much as is feasibly possible.
  • deathshrouddeathshroud Join Date: 2010-04-10 Member: 71291Members
    what we the people want is gorge wars, 2 alien teams going at it where all players are gorges
  • KasharicKasharic Hull, England Join Date: 2013-03-27 Member: 184473Members, Forum Admins, NS2 Playtester, NS2 Map Tester, NS2 Community Developer
    Based off of what Golden said in the video about each round progressively getting harder for marines, wouldn't it make sense to have the length of time a round lasts increase with every round, starting at like 90 seconds and increasing to give the marines a chance against the lerks/fades etc?
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    what we the people want is gorge wars, 2 alien teams going at it where all players are gorges

    I began work on that while making gorgecraft. I reckon it would only take a couple of weeks to write the old mod again, but I have other projects and don't feel all that inspired to code in the NS2 universe currently, as I'm working on personal Unity projects.

    If the urge to mod NS2 resurfaces, I can assure you whole-heartedly that GorgeForts will become a reality.
Sign In or Register to comment.