Getting a Mod Running.


(kamikazee) #61

Checked the VM_Create on UI failed topic?


(Raedwulf) #62

Hmmmmm…doesn’t apply to what I have.

My problem is getting my Mod running, the other Mods and etmain work fine, but my compilation doesn’t…don’t know what it is. Yes its the compilation I’ve made, it doesn’t work correctly, I’ll try and recompile again…


(kamikazee) #63

Are you using the correct source version for the right game version?


(=>ETK<=Elite) #64

Ok, forget about the mp_bin file for a minute. Try this:

Compile, Place files in mymod.pk3 to include these files (and any extra media):[ul]cgame.mp.i386.so
cgame.mp.i386.dll
ui.mp.i386.so
ui.mp.i386.dll[/ul]After that is done place either qagame.mp.i386.so for linux or qagame.mp.i386.dll for windows in your et/27960/mod folder along with the mymod.pk3. Don’t place the qagame files in mymod.pk3, but make sure they are on the server so it can run.

Server Layout (as if we are looking at a folder view inside the et folder):


27960
      etmain
            <maps>
            <cfg's>
      mymod
            mymod.pk3
                  cgame.mp.i386.so
                  cgame.mp.i386.dll
                  ui.mp.i386.so
                  ui.mp.i386.dll
            qagame.mp.i386.so OR qagame.mp.i386.dll
      pb

Startup should be like this:

Windows
CD "C:\Program Files\Wolfenstein - Enemy Territory\"
START ETDED.exe +set net_port 27960 +set com_hunkmegs 128 +set com_zoneMegs 64 +set dedicated 2 +set fs_homepath 27960 +set sv_punkbuster 1 +exec server.cfg 
Linux
cd /usr/local/games/enemy-territory
etded +set vm_game 0 +set net_port 27960 +set com_hunkmegs 128 +set com_zoneMegs 64 +set fs_homepath 27960 +set sv_punkbuster 1 +exec server.cfg

(Raedwulf) #65

Haha, I solved it !

It was me being an idiot somewhere along the line. I forgot that the CodeBlocks IDE doesn’t import the ‘def’ file into the project compilation when you try and load a sln/vcproj project :stuck_out_tongue:
So it was compiling DLLs without the exports - which explained everything :slight_smile:

Thanks for your help anyway, and probably this will help those ‘idiots’ like me to remember to link with the DEF file :D.

Cheers.


(Sypher2) #66

ok, ive never done scripting, or even started doing a mod…what goes in the mymod.pk3, mp_bun.pk3, *.dll, and *.so ?


(=>ETK<=Elite) #67

Look up at my server layout…


(Xterm1n8or) #68

Hi all :smiley:

Feeling a little frustrated in not getting very far with my mod, i wanted to see SOMETHING working. The only modification i have made to ET so far does not require any changes to the .dlls. So to see any changes i make to the .dlls i followed a suggestion to look at fixes made by Chruker. I chose the easiest, getting the Garand to reload mid clip. If you’re not familiar or can’t remember, here is the link: http://games.chruker.dk/enemy_territory/modding_project_bugfix.php?bug_id=098

I made this change to a fresh copy of the SDK. I compilled it and then put the c_game and ui_mp dlls into a folder called outpost. This folder is in the same directory as etmain and other mods. I also packed them both into a mp_bin.pk3 and put this in the outpost folder. I have outpost.pk3 containing a few changes in the ui (different background, outpost logo and menu etc) also in the outpost folder.

To see this work, i start a listen server on this computer. I was doing it the long way of starting the game, going to the mods, selecting outpost etc., but now i use ‘+set fs_game outpost’ on a new desktop shortcut. The changes i made in outpost.pk3 work, no doubt about that, however the Garand still does not reload mid clip which leads me to believe that the dlls do not work. Indeed, looking at the server info, it says etmain.

Guess i should have tried this first before spending days trying to make a mod that i can’t run :roll:

Hope you can help, many thanks. :slight_smile:

Ps. I know i need .so files aswell, but i would be happy to be able to do something on just windows for now. :banghead:


(kamikazee) #69

Did you think about the qagame dll? It does not need to be packaged into a pk3 and needs to be in your mod folder.

This binary is used for the server, and I’m pretty sure the Garand reloading code was server-side.


(Elite) #70

I helped him with this in a private messages. Hopefully that is enough. Hit me with another private message if you need help compiling the .so modules or if I wasn’t clear enough Xterminator :slight_smile:


(Xterm1n8or) #71

Hi :smiley:

Sorry about the post and PM, i wasn’t sure that the PM worked. It was in my outbox but not my sentbox, i also tried to save it but it didn’t appear in my savebox either. Anyway, i got your reply so it obviously does work, thankyou :slight_smile:

Ok, so i did this batch file which incidently didn’t work until i put it in the same directory as etmain and outpost. If i put this in a shortcut, on my desktop, will it do the same thing?

Now, from here, make sure you have your outpost folder contains outpost.pk3, and somewhere in the etmain folder you have a server.cfg.

Done that and have server.cfg in etmain, do i do anything with it?

You can place cgame and ui modules in the outpost.pk3 file, as well as any extra media…Just place qagame module in the outpost folder, not in any pk3, just the file itself.

Ok, to sum up, i have an outpost folder in the same directory as etmain. In this folder are qagame and outpost.pk3. This pk3 contains cgame and ui_mp. There is also the ui folder which has a few minor changes in it.

Now, double click the .bat file you created above to start the server. You should see the server console start and some stuff will scroll through telling you basically it’s loading everything. Once it calms down and looks like it’s running, enter the command “gamename” into the console and see what appears. If it says outpost (or w/e your modname is) then you are doing good. If not, it will say etmain and it hasn’t loaded.

Did that, but it says etmain :frowning:
I now have etserver.log in my outpost foder, and i changed bat file to E: as that is where ET is installed.

Kamikazee:

Did you think about the qagame dll? It does not need to be packaged into a pk3 and needs to be in your mod folder.

I didn’t overlook the qagame, it’s just that none of the other mods have this in them.

Many thanks :slight_smile:


(Elite) #72

Ok, so i did this batch file which incidently didn’t work until i put it in the same directory as etmain and outpost. If i put this in a shortcut, on my desktop, will it do the same thing?

Batch file can be placed anywhere, I usually just make the file right on my desktop and leave it their because it is quicker. Just make sure the firts line changes directory (perhaps in the example I gave you a bad directory):

CD "wolfenstein dir"

Done that and have server.cfg in etmain, do i do anything with it?

No, all done here (unless your server.cfg is just an empty file)

Ok, to sum up, i have an outpost folder in the same directory as etmain. In this folder are qagame and outpost.pk3. This pk3 contains cgame and ui_mp. There is also the ui folder which has a few minor changes in it.

Looks good.

Did that, but it says etmain
I now have etserver.log in my outpost foder, and i changed bat file to E: as that is where ET is installed.

Ok, the drive lettering is why above you have problems with the bat file. Change the drive I listed in the example bat file to reflect this.


(Xterm1n8or) #73

Hi :smiley:

I’ve put the bat file back on the desktop and this is what is in it:

CD "E:\Program Files\Wolfenstein - Enemy Territory\" 
START etded.exe +set dedicated 2 +set net_port 27960 +set fs_game outpost +set sv_punkbuster 1 +exec server.cfg

That is definately the directory of my ET install, but like before, it says it can’t find etded.exe. It suggests doing a search and sure enough it is there where it should be. I don’t understand, this should be working shouldn’t it?


(SCDS_reyalP) #74

Make sure your current drive is E:

as in


e:
CD "E:\Program Files\Wolfenstein - Enemy Territory\"
START etded.exe +set dedicated 2 +set net_port 27960 +set fs_game outpost +set sv_punkbuster 1 +exec server.cfg


(Xterm1n8or) #75

Hello :smiley:

That done the trick :slight_smile: My OS is on C: and my games are on E:

Thanks very much :smiley:

gamename is still etmain though :frowning:


(Elite) #76

Ok, just to double check, in the file g_local.h, you did enter the name of your mod right (outpost) at about line 13?

// the "gameversion" client command will print this plus compile date
#ifndef PRE_RELEASE_DEMO
#define GAMEVERSION			"outpost"
#else
//#define GAMEVERSION			"You look like you need a monkey!"
#define GAMEVERSION			"ettest"
#endif // PRE_RELEASE_DEMO

(Xterm1n8or) #77

YES :smiley: , I mean no, i hadn’t done that. Must have overlooked that 1 somewhere along the line but gamename is now outpost :stuck_out_tongue:

How do you guys actually SEE the changes in game. Surely i don’t have to pay for a server just yet? I started a listen server but the Garand still does not reload mid clip. Is there something i’m still missing?

Many many thanks for the help so far by the way :smiley:


(Elite) #78

No you don’t have to pay for a server. All most people rent servers for is because they don’t have the connection speed (internet) to host the games locally. Anyone can run a server for testing though, or even for playing, and have it exposed on the internet and show up in the ET browser.

==========

I would recommend checking this site. Maybe something was overlooked in your server configuration.
http://www.rtcw.jolt.co.uk/content/enemy_territory/server_guide/

==========

Also, other things that may be overlooked:

  • First up we allready took care of above, the mod name in g_local, we can move forward
  • Next is the code change for the reloading midclip, double check in the file bg_pmove.c near line 2315 in the function PM_BeginWeaponReload that you made the following change to the 2nd if statement in the function (please note that if you want to reload your mg42 as well, just delete the entire if statement altogether):

if(((weapon == WP_MOBILE_MG42 || weapon == WP_MOBILE_MG42_SET) && pm->ps->ammoclip[WP_MOBILE_MG42] != 0)) {
   return; // Gordon: no reloading of the carbine until clip is empty
}

  • Next on the list is to just recompile, and replace the newly compiled qagame, cgame, and ui modules where they belong

(Xterm1n8or) #79

Hi :smiley:

Thanks for all your help. It seems everything is now ok. Ive taken the 2 dlls from the outpost.pk3 and put them in mp_bin.pk3. I did this because i’m going to make alot of changes (hopefully), and it seems silly to have to download everything each time. This will still work properly, right?

Just 1 more question please, how do you test your mod? Currently i start the game with fs_game outpost, i then goto host game and start a listen server. Will everything still work properly this way?

Now i can get back to that Connect to IP thing again.

Many many thanks :smiley:


(Elite) #80

Yes, everything will work properly.