Newb modder


(Skunk) #1

I don’t know if I am gonna be blasted for this but it’s my first post here and I need some help.

I have been programming in C/C++ for years without ever looking at game programming. I also been playing Quake III/mods for a couple of years. Now I am curious about how creating a mod works and I would like to try a few things.

Yesterday, I downloaded ET and ET sources, installed them both, copied the resulting content of Wet_Sources in a newly created folder (mymod in the ET folder), openned the workspace in Visual C, made a Build All command and got 0 error and about 180 warnings. But I don’t know what’s next to do or even if I did things right.

Is what I’ve done so far OK? And, if so, how do I test the thing. Plus, what’s next? Just writing my own code and that’s it?

Thanks!


(MuffinMan) #2

everything ok, now you will hopefully have an directory named release with 3 .dll files in it, copy them to a new folder within your et directory (besides etmain and other mod-dirs) and start ET in your mod-mode (fsbasepath… don’t know the exact string now, just do a search or look how they do it in etpro…) that’s it, now change the code as you like


(Salteh) #3

Compile the code, copy the .dlls to your mod directory… like… /pai/, then start the game/mod by doing: et.exe +set fs_Game pai.
Example:

Mod files:
c:\program files\wolfenstein - enemy territory\myMod<something>.dll

Shortcut:
“c:\program files\wolfenstein - enemy territory\et.exe” +set fs_Game myMod

This should work…
You might have to set sv_pure to 0… but I’m not 100% sure about this.


(Skunk) #4

When I use +set fs_basepath mymod, I get that in the console:

Couldn't load default.cfg - I am missing essential files - verify your installation?

Now, I changed this constant in ui_main.c


static const char *netSources[] = {
	"Local",
	"Internet",
	"Favorites"
};

to


static const char *netSources[] = {
	"Something",
	"Internet",
	"Favorites"
};

and, when I execute the program with +set fs_game mymod, I still get Local, Internet and Favorites as choices. So my guess would be that the base et is executed rather than my mod.


(SCDS_reyalP) #5

use fs_game, not fs_basepath. See the sticky thread about getting your mod running.


(Skunk) #6

I read the sticky “Getting your mod running”, did what it said and still don’t see the changes I made to the strings appear while I run the game.


(Salteh) #7

You might have to set sv_pure to 0… but I’m not 100% sure about this

Tried that :?


(Skunk) #8

Quote:

You might have to set sv_pure to 0… but I’m not 100% sure about this

Tried that :?

Yes I did. Same result. I’m just trying to check If the mod is running. Any suggestion as to what part of code can easily be changed with evident results?


(SCDS_reyalP) #9

First, make sure ET isn’t copying the client and ui dlls from etmain into your mod folder. You verify this by checking time/date stamps on the .dlls. You files will match those in the compile directory under the source tree (eg release) while the etmain files will be have whatever time they were copied over.

Changing the GAMEVERSION define (in src/game/g_local.h) is good way to tell if your mod is running. You should do this for any mod, since server browers often use this to determine what mod is running. gamename in game should show this. gamedate will show you when the game dll was compiled.

Note that gamename only tells you about the game dll. It is possible to have the game dll from your mod loaded, but the client and/or ui dlls from etmain loaded (as described in the sticky thread, et will copy these over if they don’t match what is in the pk3s)

There are apperently issues with running mod with sv_pure 0 (as mentioned by bani a number of times). If you want to change the client or ui, I suggest putting the client and ui dlls in a .pk3 in your mod directory and running with sv_pure 1. This is described in the sticky thread. I’m not sure if the name mp_bin is special, but using it for your mod dll pk3 shouldn’t hurt. Note this goes in your mod directory (where you set fs_game to point to) NOT replacing the mp_bin.pk3 in your etmain.

Adding cvars is a good way to make sure each module (game, client and ui) of your mod is getting loaded. I.e. if you add g_mymod to game, cl_mymod to cgame and ui_mymod to ui, then simply checking for that cvar will show you if those parts of the mod are loaded. You should be able to figure out how to add a cvar without much trouble. You can look at the code I posted for headshot mod for an example of how to do it in game. cgame and ui should be similar.

http://www.splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&t=6519&highlight=quick+dirty


(Skunk) #10

Thanks! that helped to show me that my mod was running. I wonder why, though, the change I made in the ui_main.c file don’t have any impact.

One more question. Am I too optimistic to think about begin works on a total conversion mod with the ET engine?


(SCDS_reyalP) #11

That only depends on your skill and available time. I suggest you start with some smaller, experimental mods to get a feeling for how things work. Search the web for documentation and Q3 code samples.

It should be no harder with ET than any other Q3 engine game. A true TC (with all new textures, models, maps and gamecode) is a huge amount of work for one person…


(MuffinMan) #12

what mod idea do u have in mind?


(Rain) #13

netSources isn’t used in ET. Instead, the server browser source description is set in playonline.menu:

playonline.menu:98:     MULTIACTIONLEFT( 8, 80, .5*((FILTERS_WIDTH)-6), 10, "Source:", .2, 8, "ui_netSource", cvarFloatList { "Local" 0 "Internet" 1 "Favorites" 2 }, uiScript UpdateFilter, "Choose the type of game servers to display, from Internet, local and the favorites list" )

(Skunk) #14

I’ve been playing Navy Seals - Covert Operation (a q3 mod) for a couple of years now and I don’t enjoy it as much as I used to. The game was, at one point, very distinct but the dev team is locking/removing many nice features in every new release. There were talks about porting it to ET ever since Silicon Ice decided to port their Urban Terror but the head of the dev team gave a categoric NO. I’m just a fan and I never was involved in the dev team but I’ve been messing around with mapping and my project, if I decide to go ahead with it, would be highly inspired by that game. Also, I may have contacts for the artistic side of the project (models, sounds, textures, etc.). I may eventually need a few more people in my yet to be created dev team. But keep in mind that right now, I’m just checking that out of curiosity. I’ll know for sure in about a month or so (when I’m on my summer vacations).

BTW, thanks to the people who answered my posts so quickly. Seeing the cooperation here, makes me want to investigate further into the project since it gives me more confidence.


(TFate) #15

Here’s what might be a totally useless tip but… you can check whether or not vanilla ET or your mod is being executed by opening the console and typing /fs_game… it should say something like “default is pai, current is pai”


(SCDS_reyalP) #16

That doesn’t actually tell you, it is just the fs_game you set on the command line. ET may still have copied the standard cgame and ui .dlls into that directory, overwriting your own.

mmmm pai!


(Skunk) #17

Is there some kind of technical reference doc about the SDK or is it browse-through-all-the-code-only?


(Salteh) #18

Browse-Throught-all-the-code as far as I know.
There are a lot of quake3 code tutorials up at www.planetquake.com/code3arena
Obviously ET is not quake3, but most of the code form code3arena can be used in et mods… if you edit it a bit.

I recommend just playing with the code though… after a few hours / days it gets pretty…easy to find your way :slight_smile:


(SCDS_reyalP) #19

http://www.planetquake.com/alternatefire/ some nicely documented source available too. Again, that is for Q3, but the concepts and many of the interfaces are the same.