First Modding Adventure - NS2:Team Arena
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
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
Comments
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!
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.
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.
Hoping to get a working prototype up by the weekend.
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.
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.
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.
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.
Have you tried looking at scatter's NS2 Overhaul mod? It has user-purchasable armour.
http://steamcommunity.com/sharedfiles/filedetails/?id=534958983
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
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..
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?
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.
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.
Talking about your game with other people, is immensely helpful, and even more so when they are actually playing it.
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.
Here you go
The VOD will be auto-deleted by twitch though in a couple of weeks unless @Golden highlights it, FYI.
Golden kindly put it on Youtube as well for easy viewing:
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.