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: 1922
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.



_________________
[ Websites | Facebook | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon


Top
                 

Cool #9
Cool #9
Joined: 01 Dec 2000
Posts: 44131
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://www.theenginesofcreation.com/con ... myfirstmod




Last edited by Eraser on 06-09-2022 11:30 PM, edited 1 time in total.

Top
                 

The hell good boy
The hell good boy
Joined: 22 Jun 2011
Posts: 1922
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 :)



_________________
[ Websites | Facebook | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon


Top
                 

The Afflicted
The Afflicted
Joined: 21 Apr 2005
Posts: 563
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: 1922
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 :)



_________________
[ Websites | Facebook | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon


Top
                 

The Afflicted
The Afflicted
Joined: 21 Apr 2005
Posts: 563
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: 1922
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...



_________________
[ Websites | Facebook | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon


Top
                 

The Afflicted
The Afflicted
Joined: 21 Apr 2005
Posts: 563
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
                 

Commander
Commander
Joined: 08 Jun 2022
Posts: 100
PostPosted: 06-09-2022 11:19 PM           Profile Send private message  E-mail  Edit post Reply with quote


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


The link is down, but with wayback machine there is a screenshot saved of this link:
https://web.archive.org/web/20160915055 ... myfirstmod




Top
                 

Cool #9
Cool #9
Joined: 01 Dec 2000
Posts: 44131
PostPosted: 06-09-2022 11:29 PM           Profile   Send private message  E-mail  Edit post Reply with quote


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


The link is down, but with wayback machine there is a screenshot saved of this link:
https://web.archive.org/web/20160915055 ... myfirstmod


I'm the owner of the website. Between posting that link and now, the URL has changed a bit:
http://www.theenginesofcreation.com/con ... myfirstmod
That one should work. I'll edit the original post to update the link.




Top
                 

Commander
Commander
Joined: 08 Jun 2022
Posts: 100
PostPosted: 06-09-2022 11:47 PM           Profile Send private message  E-mail  Edit post Reply with quote


Eraser wrote:
I'm the owner of the website. Between posting that link and now, the URL has changed a bit:
http://www.theenginesofcreation.com/con ... myfirstmod
That one should work. I'll edit the original post to update the link.


Oh, thanks! ;) :up:
I was digging up and retrieving lost info.




Top
                 
Quake3World.com | Forum Index | Programming Discussion


Post new topic Reply to topic


cron
Quake3World.com
© ZeniMax. Zenimax, QUAKE III ARENA, Id Software and associated trademarks are trademarks of the ZeniMax group of companies. All rights reserved.
This is an unofficial fan website without any affiliation with or endorsement by ZeniMax.
All views and opinions expressed are those of the author.