With cordite in the air, splintered steel, shell casings and powder burns, there’s only one explanation...
Discuss & improve the game engine.

Moderators: sparcdr, torhu, Tequila

Compile a Mod

Postby /dev/random » Mon Mar 23, 2009 5:52 pm

Aloha hey!

I hope this is the right category for this post. I haven't seen anything related to SG mods?

As the title already says, I'd like to create a (or more :D ) Mod for SG. I don't have problems with coding, they start at compiling.

First I grabbed the ioQuake-based version from the SVN and tried to run make, which failed. I think the Makefile has some mistakes (like SMOKINGUNSS (no typo) and baseq3 instead of $(GAMEDIR) ).
Then I tried to use the normal code which seems to use cons for the qvms. This didn't work either, but might be a problem with my installation. Which packets do I need? Are there any parameters I need to use?

I'd really appreciate if there were a seperate download of the gamecode which includes the tools to compile it. Take a look at how the "World of Padman" team handled it.


Edit: I almost forgot to mention; OS is x86 Linux.
User avatar
/dev/random
Smokin' Amigo!
 
Posts: 410
Joined: Thu Jan 22, 2009 1:58 pm



Re: Compile a Mod

Postby Tequila » Mon Mar 23, 2009 11:16 pm

Hello,
/dev/random wrote:I hope this is the right category for this post. I haven't seen anything related to SG mods?

As the title already says, I'd like to create a (or more :D ) Mod for SG. I don't have problems with coding, they start at compiling.

As you still should know, Smokin' Guns is a standalone game based on a modified Quake3 engine. We don't really expect SG Mods to be produced, but why not ? But you should know if you just want to help us to make the engine better, just do it and propose your updates. Your work won't be ignored and we won't forget to say who done what ;)

/dev/random wrote:First I grabbed the ioQuake-based version from the SVN and tried to run make, which failed. I think the Makefile has some mistakes (like SMOKINGUNSS (no typo) and baseq3 instead of $(GAMEDIR) ).

Firstly, SMOKINGUNSS is not a mistake, that's something I forget to remove...
Secondly, about "baseq3 instead of $(GAMEDIR)", in fact the lines with "baseq3" are no more used. They are just there to keep the Makefile as near as possible from the official ioQuake3 Makefile. As I said, SG is StandAlone, and only the part of the Makefile to build the "Missionpack" is really important, and then has been updated. So don't worry, for that.
Finally, if you have "run make, which failed", you can propose the output of your console and we will help you to build that branch.

/dev/random wrote:Then I tried to use the normal code which seems to use cons for the qvms. This didn't work either, but might be a problem with my installation. Which packets do I need? Are there any parameters I need to use?

You need Perl and some other Perl librairies for Scons. We can also help you to build this if you propose your output too. Btw, we hope to get rid of this engine and finally use the branch 1.1... but the game code needs to be back ported completly and that's a very long task for just contributors like us.
8)
User avatar
Tequila
SG Team
 
Posts: 1100
Joined: Thu Nov 15, 2007 11:33 pm
Location: Montpellier, France



Postby /dev/random » Tue Mar 24, 2009 12:31 am

Well, then I'll try to stick to 1.1.

First, I defined BUILD_GAME_QVM = 1 inside Makefile.local.
Now when I run make, I get
...

Output:
./build/release-linux-i386/smokinguns/vm/cgame.qvm
./build/release-linux-i386/smokinguns/vm/qagame.qvm
./build/release-linux-i386/smokinguns/vm/ui.qvm

make[2]: Entering directory `/home/random/Desktop/ioSG/smokinguns-1.1'
make[2]: *** No rule to make target `build/release-linux-i386/smokinguns/vm/cgame.qvm'. Stop.
make[2]: Leaving directory `/home/random/Desktop/ioSG/smokinguns-1.1'
make[1]: *** [targets] Error 2
make[1]: Leaving directory `/home/random/Desktop/ioSG/smokinguns-1.1'
make: *** [release] Error 2
User avatar
/dev/random
Smokin' Amigo!
 
Posts: 410
Joined: Thu Jan 22, 2009 1:58 pm



Postby Tequila » Tue Mar 24, 2009 12:40 am

Okay, you want to build the QVM game. As I told, it is still not backported to ioQ3, so the 1.1 branch won't work. Then for the game QVM, you have to build from current trunk and start "make" to build all or just "make mod" to only build QVM. What's your output there ?
User avatar
Tequila
SG Team
 
Posts: 1100
Joined: Thu Nov 15, 2007 11:33 pm
Location: Montpellier, France



Postby /dev/random » Tue Mar 24, 2009 12:59 am

Now that's more how I like it.
No errors, compiles flawlessly :D

Thank you very much :)

By the way; which parts of the engine did you modify? World of Padman could need a more recent engine aswell :evil:
User avatar
/dev/random
Smokin' Amigo!
 
Posts: 410
Joined: Thu Jan 22, 2009 1:58 pm



Postby Tequila » Tue Mar 24, 2009 1:03 am

In the engine, very few things. Essentially we added few functions used only by SG. Btw, you can try to "diff" between SG engine code and ioQ3 code and you'll find what we changed.
User avatar
Tequila
SG Team
 
Posts: 1100
Joined: Thu Nov 15, 2007 11:33 pm
Location: Montpellier, France



Postby /dev/random » Thu Mar 26, 2009 2:10 pm

After some difficulties, the mod is now in beta status :D

I ran into the problem that boiler plate doesn't have a real giTag. Knives and Scope on the other hand both have the same giTag.
Solved this by checking for giType == IT_ARMOR for plate, since it's the only armor, and additionally checking for giType != IT_POWERUP for knives, since they are either IT_WEAPON or IT_AMMO.

For those that didn't understand any of this:
With my little mod you can only use/buy boiler plate, knives, molotov and dynamite. At least that's how it should work. If you encounter a bug, please tell me!
Since it's a serverside mod, you don't have to download anything. Just connect to the "Smokin' CPU Server" :)

By the way, there should be some ingame option to set cl_allowDownload. Or maybe there is one but I didn't find it :roll:

Edit: Is there a way to use the duel maps in another gametype than duel?
User avatar
/dev/random
Smokin' Amigo!
 
Posts: 410
Joined: Thu Jan 22, 2009 1:58 pm



Postby Tequila » Thu Mar 26, 2009 4:36 pm

Hey can we have a look on your patch ? ;)

On the server side you can "+set sv_pure 0" so any one could connect without to download your QVM. But that 's not really secure as some kind of cheater would be able to connect too...
User avatar
Tequila
SG Team
 
Posts: 1100
Joined: Thu Nov 15, 2007 11:33 pm
Location: Montpellier, France



Postby torhu » Thu Mar 26, 2009 11:46 pm

Nice idea with the mod. :D

You should change the name to advertise that the server is special, I think some players would want to play a game like that.

I seem to remember that a trick to get a server-side mod with the server still being pure and without triggering autodownload is to compile to a shared library instead of qvm. But your server seems to work fine. :wink:
In game: =SG=monSter
Monster Browser
User avatar
torhu
SG Team
 
Posts: 1125
Joined: Thu Jan 06, 2005 8:12 pm
Location: Norway



Postby /dev/random » Thu Mar 26, 2009 11:46 pm

I only edited parts of game, so no dowload required. I could actually enable autodownload on the server, but since autodownload is disabled by default on the clientside that's rather useless.

If you really want to see the code, PM me :D
It's far from being finished or even being well commented.

Any idea about the duel maps? They are small enough for a small amount of players, but I'd like to use them for (t)dm.

Another side note: It seems one can't unset sv_voip? It always stays latched. But this is rather a bug in ioQuake's enginecode.
(As you can see, I like to hijack threads I started :evil: )
User avatar
/dev/random
Smokin' Amigo!
 
Posts: 410
Joined: Thu Jan 22, 2009 1:58 pm



Postby Redwing » Fri Mar 27, 2009 2:55 am

/dev/random wrote:I only edited parts of game, so no dowload required. I could actually enable autodownload on the server, but since autodownload is disabled by default on the clientside that's rather useless.

If you really want to see the code, PM me :D
It's far from being finished or even being well commented.

Any idea about the duel maps? They are small enough for a small amount of players, but I'd like to use them for (t)dm.

Another side note: It seems one can't unset sv_voip? It always stays latched. But this is rather a bug in ioQuake's enginecode.
(As you can see, I like to hijack threads I started :evil: )

I have autodownload enabled :D What server is this again?
DeviantArt|Music
Jesus wrote:Blessed are the Peacemakers, for they will be called the sons of God
User avatar
Redwing
Shootist
 
Posts: 99
Joined: Sun Mar 22, 2009 8:50 pm



Postby nraven » Fri Mar 27, 2009 6:29 am

Server side mods can just be naked qagame.qvm in the /vm/ folder path instead of packing a real pk3. qagame is only for the server so it wont force it onto the client. Obviously you can't put in a modified cgame nor ui without causing a problem with purity.
nraven
Drifter
 
Posts: 9
Joined: Fri Jan 02, 2009 6:35 am



Postby /dev/random » Fri Mar 27, 2009 2:55 pm

That's what I'm talking about all the time. Thanks for writing it out :D

Since I only modified parts of game (and not cgame or ui) the mod is only serversided. This means, like paulR said, that only the server needs the qvm to operate and clients don't have to download it.

The current method is a bit rough, so I might need to modify ui. In this case, one would need to either download or already have the qvms in a pk3 when the server is running pure.

Right now, simply connect to the "Smokin' CPU Server". It might be down from time to time due to performace or maintaining issues :wink:
User avatar
/dev/random
Smokin' Amigo!
 
Posts: 410
Joined: Thu Jan 22, 2009 1:58 pm



Postby ReD NeCKersoN » Sat Apr 04, 2009 1:37 am

/dev/random wrote:Is there a way to use the duel maps in another gametype than duel?

Renaming the duel maps might work. For instance, changing du_showdown to dm_showdown. Corresponding files in the pk3 would also have to be renamed accordingly. However... spawnpoints were placed with duel mode in mind, there are no items/pickups in the duel levels, & renaming them would force the client to download something he already has albeit renamed. To do what you suggest (and make it worthwhile) would require a level editor.
Btw, this isn't the first time the idea has been proposed. Personally I don't think the duel maps would be good for anything other than duel.
User avatar
ReD NeCKersoN
SG Team
 
Posts: 3245
Joined: Wed Mar 27, 2002 6:22 am
Location: VA, USA




Return to Code

Show Sidebar
Show Sidebar

User Control Panel