Quake3World.com Forums
     Programming Discussion
        Creating Quake3 Modifications: Basics?


Post new topicReply to topic
Login | Profile | | FAQ | Search | IRC




Print view Previous topic | Next topic 
Topic Starter Topic: Creating Quake3 Modifications: Basics?

The hell good boy
The hell good boy
Joined: 22 Jun 2011
Posts: 1574
PostPosted: 01-25-2017 01:08 PM           Profile Send private message  E-mail  Edit post Reply with quote


Hello. Some members here created some Quake3 modifications. Eraser made single player mod with suppression of default gametypes (g_gametype is ignored and forced to set to value “8”), for example.

I want to make simple modification: Infected game mode (like the one from Quake Live). The reason is simple. Make it available for original oldschool Quake 3 players. The game mode would be new gametype (named Infected). But the modification should support only THIS gametype, so I need to supress the other gametypes. In order to avoid violation (just for sure), the gametype would be value “10” (yes, values “5”, “6”, “7”, “8” and “9” are missing).

What this modification will bring? Well, not much. Only the new game mode and few supporting assets (infected indicator, new skins for default players plus new cover texture - like quad or enviro suit creates a flashy coat around player, so will be for infected players), maybe some maps with Halloween theme (obtained in lvlworld.com and maybe I'll make one myself some day).

The gametype may be team based (players can't attack each other except for the other side, so survivals will be able to attack only zombies and vice versa). Red team will hold zombies, Blue team will hold survivals. When survival frags a zombie, the zombie will respawn again as zombie, but when zombie frags a survival, he becomes a zombie. That way the Infected mode is moreless a “Survival” mode or “Zombie” mode. Last standing wins the round. The game behaves like team game, but it's not a team game (each player gets points separately). To be exact, players are split between teams, but scoring is like in FFA. Also, start of the game is with all players on the survivals side (except one that is spread origin, which may be eighter one of the active players if played alternative, or Mastermind - a bot with Plasmagun, that is automatically member of zombie team and spreads the infection).

Bot play may be possible (for testing), but bots may behave like in original TDM, which may be a bit trouble. As you may know, the QL's Infected is a Red Rover gametype modification, which spawns all players with Machineguns and Shotguns and also removes all items from the map (including healths and armors). Players' healths are at initial point 100 and armor also at 100 (except for zombies which are geared at 125% amount of these and the countdown does not work)

But there's a little problem. The source code is very vast and I need to change bits of code that control g_gametype usage, skins for teams, gametype names assigned to their id numbers, behaviour of team games and of course scoring code (to make team game with FFA scoring). I was unable to find g_gametype cvar usage in downloaded (forked) code. Does anywhere exist some guide on how to get oriented in the Q3 source code to make neccessary changes? Because I'm lost :( I can see the protocol number, if statements for Team Arena, but that's pretty much everything :( Standard Find feature of Visual Studio does not work :(

I obtained a source code at GitHub. I forked it to my own repository (with the Fork feature, obviously) and prepared for edits. Here are links to both repositories at GitHub:

At the time of writing this question, the fork and original are the same. As you may realise, my GitHub nickname is Polda18 (that's because I'd like to share not only game related content, but also some future content for Windows applications, maybe possibly some Linux/Mac apps, and some mobile devices apps, such as iOS, Android or Windows Phone apps; also I use this nickname in various internet discussions that are not games related).

So if anybody has some great guide on how to get oriented in the vast source code, please, tell me. I'd like to start building the modification soon, it's impossible to make useful changes without being oriented in source code.



_________________
[ Quake III Arena by CZghost | Facebook | Twitter | YouTube | Google+ ]
While you feel the worst ever, turn around facing to Sun and all shadows will pass behind you.” - John Lennon


Top
                 

Cool #9
Cool #9
Joined: 01 Dec 2000
Posts: 41655
PostPosted: 01-26-2017 02:31 PM           Profile   Send private message  E-mail  Edit post Reply with quote


See if you can follow and understand this first:
http://theenginesofcreation.com/Content ... myfirstmod




Top
                 

The hell good boy
The hell good boy
Joined: 22 Jun 2011
Posts: 1574
PostPosted: 01-26-2017 02:43 PM           Profile Send private message  E-mail  Edit post Reply with quote


Thank you :) Will read through later when I will have more time :)



_________________
[ Quake III Arena by CZghost | Facebook | Twitter | YouTube | Google+ ]
While you feel the worst ever, turn around facing to Sun and all shadows will pass behind you.” - John Lennon


Top
                 

The Afflicted
The Afflicted
Joined: 21 Apr 2005
Posts: 502
PostPosted: 01-27-2017 08:24 AM           Profile Send private message  E-mail  Edit post Reply with quote


Did you use "Look in: Entire Solution?" in the find menu? It might be set to "Current Document" or "Current Project" by default.

Make sure that you have opened the Quake 3 sln file, instead of individual c or h files.

in G_main if you search for it, you'll find it. If you right click it and then click "find all references" it will tell you everywhere it's used. Most of the time. If it's a string in quotes, then it won't work. For instance, you can't use "find all references" on the line that says #include "g_local.h"

Did you manage to get the solution to compile, and were you able to apply code changes so that you can change code while debugging? That's super important.




Top
                 

The hell good boy
The hell good boy
Joined: 22 Jun 2011
Posts: 1574
PostPosted: 01-27-2017 08:55 AM           Profile Send private message  E-mail  Edit post Reply with quote


It can search trough entire solution with one click? Didn't know that :) Thanks for suggestion :)



_________________
[ Quake III Arena by CZghost | Facebook | Twitter | YouTube | Google+ ]
While you feel the worst ever, turn around facing to Sun and all shadows will pass behind you.” - John Lennon


Top
                 

The Afflicted
The Afflicted
Joined: 21 Apr 2005
Posts: 502
PostPosted: 06-03-2017 11:21 AM           Profile Send private message  E-mail  Edit post Reply with quote


Also, I would definitely recommend using a tool like Doxygen to map the entire source code. It will save you a ton of time if you need to figure out what you need to change.




Top
                 

The hell good boy
The hell good boy
Joined: 22 Jun 2011
Posts: 1574
PostPosted: 06-08-2017 02:00 PM           Profile Send private message  E-mail  Edit post Reply with quote


Thanks. Is Doxygen free? I will try out all suggestions later when I will have more time. At the time being I have pretty hard time with studying...



_________________
[ Quake III Arena by CZghost | Facebook | Twitter | YouTube | Google+ ]
While you feel the worst ever, turn around facing to Sun and all shadows will pass behind you.” - John Lennon


Top
                 

The Afflicted
The Afflicted
Joined: 21 Apr 2005
Posts: 502
PostPosted: 06-11-2017 10:07 AM           Profile Send private message  E-mail  Edit post Reply with quote


Yeah! You can get it from here:
https://www.stack.nl/~dimitri/doxygen/m ... grams.html

You need the dot plugin from graphviz.

When you get doxy set up and actually creating graphs it just generates a graph of how all the functions connect. It's great!

LMK if you're able to set it up. There are tutorials on youtube, but they may be out of date.




Top
                 
Quake3World.com | Forum Index | Programming Discussion


Post new topic Reply to topic


cron
Quake3World.com
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group