Compiling and running a mod under Windows

(Paul) #1

Hello all,

Because the old “Compiling a mod under Windows” thread was not very well explained. i’m making a new one here now.
I included a link with the source also, wich i uploaded myself. The things i edited was only the workspace files,
as they are now directly openable in Visual Studo Express 2008.

On the bottom of this post i included some extra’s!

Also, maybe this is sometimes some ‘childy’ but i wanted to explain it as best, so even beginners can do it. (And we don’t get extra extra extra questions about where a particular button is)
I Also made a fast VIDEO show so if you don’t know where to click or something you can just look at it and watch what you do wrong. - Watch in HD only!

If you already have Visual C++ Express Edition (2008) or Visual Studio you can Skip Step 1

[anchorlink=#step1]Step 1) Downloading Visual Studio[/anchorlink]
[anchorlink=#step2]Step 2) Getting the source[/anchorlink]
[anchorlink=#step3]Step 3) Editing some code to test[/anchorlink]
[anchorlink=#step4]Step 4) Building the source[/anchorlink]
[anchorlink=#step5]Step 5) Packing up[/anchorlink]
[anchorlink=#step6]Step 6) Going in-game[/anchorlink]
[anchorlink=#extra1]Extra 1) Adding MP40 to ALLIES and THOMPSON to AXIS[/anchorlink]
[anchorlink=#extra2]Extra 2) Getting ETPUB[/anchorlink]

[anchor]step1[/anchor]Step 1) Downloading Visual Studio - [anchorlink=#index]To Top[/anchorlink]
Download Visual C++ 2008 Express Edition here.
Scroll down to the bottom and select language you like and press Download.

Save it and run it (File is about 2,6MB).
Just press overall next and accept license just as normal setup.

There are 2 optional products: Microsoft Silverlight and SQL Server. I recommend NOT to install them by now, as you don’t need them and it takes extra time.
Now it’s downloading all the needed stuff - Wich is around 92MB.

After installing the installer asks if you want to register, it’s not necessary now but it’s an advice to do it because then you can use it for more then 30 days.

Congratulations, you installed Visual Studio 2008 :slight_smile:

[anchor]step2[/anchor]Step 2) Getting the source - [anchorlink=#index]To Top[/anchorlink]
When you are serious gonna make a mod, i recommend that you use the ETPUB source (found in Extra - 2) as this already contains killing sprees and much more. Also NoQuarter and Jaymod are build on it so :slight_smile:

Download the Source HERE:
This is 100% trustable file, it’s just latests ET source but i converted it already to Studio 2008 files so you don’t have to do the conversion.

Extract the .ZIP anywhere you want, but a suggestion is NOT TO extract it in one of your ET directories.
Open up /src/wolf.sln

Oke, you can skip Step 3 if you just want to go now with no modification, else i will make an example of changing a clip size from a MP40. It is recommended, as you can quickly see later or it worked out or not.

[anchor]step3[/anchor]Step 3) Editing some code to test - [anchorlink=#index]To Top[/anchorlink]
Here I’m showing how to change the clip size from MP40 and Thompson to 32
Expand cgame and then expand source files and search for bg_misc.c
Press Control+G (Goto) and type 148. This will bring you directly to the line of the MP40 section.
Change the numbers 30 to 32 there. May also do this in line 153 (Thompson)

[anchor]step4[/anchor]Step 4) Building the source - [anchorlink=#index]To Top[/anchorlink]

Press right mouse on Solution ‘wolf’ and press Build Solution. Just ignore all the warnings for now, those doesn’t matter.

Now you just made a DEBUG build, if you are releasing your mod set the build option to Release.

[anchor]step5[/anchor]Step 5) Packing up - [anchorlink=#index]To Top[/anchorlink]
Testing your mod, you first have to pack up 2 files. It can be done with winrar or any other program that supports packing of ZIP.
The files to pack up are: cgame_mp_x86.dll and ui_mp_x86.dll those are both client files.
The qagame_mp_x86.dll is a server file, you don’t packup that file.
Just change the extension from .zip to .pk3.
Then just call it something like mymod.pk3 for now.

Now go to your ET installation, although it’s not recommend to use your ET-Play installation it’s possible.
Make a new directory, for example mymod.

Place the mymod.pk3 and the qagame_mp_x86.dll in your mod folder.

[anchor]step6[/anchor]Step 6) Going in-game - [anchorlink=#index]To Top[/anchorlink]
I’m not gonna do it the hard way so: make a extra shortcut to ET.exe and give it an extra parameter: +set fs_game mymod where mymod is the folder where you placed in your mod.
Then just press HOST GAME ans START SERVER.

Just join a team now, if you did step 3 you see now that the clip size is 32 in stead of reguler 30.

CONGRATULATIONS, You just build your own mod!


[anchor]extra1[/anchor]Extra 1) Adding MP40 to ALLIES and THOMPSON to AXIS - [anchorlink=#index]To Top[/anchorlink]
Oke here i will explain how to add MP40 to Allies and Thompson to Axis, it’s actually quite easy.
At first, expand game, then expand source files and open up bg_classes.c

Basicly under every WP_THOMPSON, add WP_MP40 and under every WP_MP40 in the next section add WP_THOMPSON.
Compile everything and redo earlier steps.
IN-game result is now this:
The code gets this:

[anchor]extra2[/anchor]Extra 2) Getting ETPUB - [anchorlink=#index]To Top[/anchorlink]
First install SVN:,
Then make a new folder, for example ETPUB en press right mouse button->SVN Checkout
THen give this link:

Open src/wolf-vs2k8.sln and do the Build step again.
Now goto the folder /Debug of /Release (Depending on what kind of build you made.
And voila - There are the .dll’s again!
Don’t forget to also include the etpub pk3 (client) and replace your dlls by them, else you have much missing files :slight_smile:

(Pegazus) #2

Nice work you got there scary. You found time off your ET Dutch project to write a tutorial for other new mod makers. It’s alot more easier to understand then the earlier sticky. Hopefully this will get to be a sticky.

(nUllSkillZ) #3

Thanks for the tutorial.

As far as I know it’s not possible to crosscompile for Linux under Windows.
Whereas under Linux it’s possible to compile the source for Linux and crosscompile the source for Windows.

(Paul) #4

Yes under windows you actually CAN compile a .so :wink:
I will make that later, it’s really possible!.

(stealth6) #5

wow cool, I was thinking of trying some of this stuff so this will help alot thanks!

(trAnc3) #6

Nice tutor!

(Paul) #7

Some people asked so i will try to explain these things:
How to compile ETPUB
How to add mp40 to allies and visa-versa.

(hellreturn) #8

Awesome post. Will be waiting for more tutorials. :slight_smile:

(Paul) #9

I added the ETPUB Piece, i’m now cleaning up the thread a bit so it’s more clear (parts).

(hellreturn) #10

Thank you for adding Etpub and thompson/mp40 thing on my request. Much appreciated. I am sure it will be helpful to many admins.

Thanks once again. :slight_smile:

(Paul) #11

No problem, at your service :slight_smile:

(kamikazee) #12

[QUOTE=Scary;195247]Yes under windows you actually CAN compile a .so :wink:
I will make that later, it’s really possible!.[/QUOTE]Ah, I guess you installed a full Cygwin installation then?

(Salteh) #13

The anchor links make it extra awesome! :slight_smile:

(Paul) #14

No but, updated my thread.


(shagileo) #15

omg, now I see what you mean with anchors :eek:
cool indeed and veeery handy

(kamikazee) #16

[QUOTE=Scary;195467]No but, updated my thread.

THX TO SALTEH FOR MAKING A NEW FUNCTION![/QUOTE]So where is your build-for-Linux tutorial, or did you mean something else?
I’m just curious how you pulled it off, you see.

(Sabayon) #17

Thanks! The tutorial worked flawlessly for me! I’ve only done the ammo change. Going to try extras now then figure out some other stuff :slight_smile:

thanks for taking time to make such great topic.

(hellreturn) #18

Mp40/Thompson thing doesn’t work for Etpub when I follow your tutorial. Is their anyway to fix it? Thing is i no matter what i choose mp40/thompson as an allies but i will only get thompson and as axis i will only get mp40 although it shows both in menu.


(-IronMonkey-) #19

[QUOTE=Scary;195247]Yes under windows you actually CAN compile a .so

this is what I’m looking for :smiley:

(Sabayon) #20

I’m having same problem as hell monkey also with that mp40 and thompson not working with etpub. I’d also be looking forward to figure out how to compile .so under windows too :cool: