Jump to content

Home

Custom Mod Crashes Everytime


SecretChord

Recommended Posts

I've been trying to compile my own mod from the SDK using Visual Studio 2003. No matter what changes I make to the code (even literally just reocket velocity 900 -> 100) the game crashes when loading a map with the mod loaded. It says "Starting Up" then closes, and goes back to my desktop with no errors.

 

The only two things I can think would be causing this are: Doing something wrong with the DLL's, I've tried all combinations of jampgamex86.dll by itself, with the other two DLL's, inside .pk3 files and not inside them. I'm a bit confused about what I'm supposed to do with them, as the MakeAMod_readme.txt file instructs me to put only jampgamex86.dll in a pk3, however that seems to be very different to what all other modders do, they seem to have all 3 files outside of pk3s. The other thing that may be wrong is it doesn't work with Visual Studio 2003, because it does ask me to convert the format of it, which could be screwing things up somehow even though it's compiling without any errors.

 

Just to tell you how I'm loading the map, /devmap mp/ffa1 just as it says in the .txt file, although "Create A Game" doesn't seem to work either.

 

Thanks for any help you're able to provide.

Link to comment
Share on other sites

Thanks for the help, I tried starting up a game without the mod enabled and discovered that somewhere along the last year or so its been since I've reinstalled, my game has screwed up. I get the same problem without the mod, so what I'll do later is reinstall the game. For now I transferred the mod over to my other computer and used it as a server, works perfectly.

Link to comment
Share on other sites

Actually I do have a question now that I've started modding. I've been making some values in the game (such as rocket velocity) so that they are able to be set by Cvars such as g_rocketVelocity (great name, huh?). However I've hit a problem when trying to do this with values in bg_weapons.c first problem was that where I was declaring these Cvars (g_local.h) wasn't included, so I included it. I know that probably was a bad idea and would cause efficiency problems or even other things, but it didn't work anyway. I'll include the "extern vmCvar_t" in a file that actually is included in bg_weapons.c (unless there's a problem with doing that?).

 

Upon compiling I get "error C2099: initializer is not a constant" errors for all of my Cvars. I'm assuming it's because it doesn't allow these constants to be set like this, any ideas how I would be able to achieve this?

Link to comment
Share on other sites

Yeah I know, I've already changed some of the ones in g_weapons.c however I was hoping I'd be able to change some of the ones in bg_weapons.c. Obviously it's fine just changing straight values but it doesn't like it when I put g_customcvar.value in where it previously had an int.

Link to comment
Share on other sites

Like say you wanted to control rocket damage with a cvar, couldn't you go inside this function:

 

static void WP_FireRocket( gentity_t *ent, qboolean altFire )

 

and then replace the line:

 

missile->damage = damage;

 

with something like:

 

missile->damage = damage * g_rocketDamage.integer /*great name, huh?*/;

 

or

 

missile->damage = damage + g_rocketDamage.integer /*great name, huh?*/;

 

And you could do something like that for the rocketVelocity too.

Link to comment
Share on other sites

Something along those lines would work. I'm not sure if g_rocketDamage.integer would work, but g_rocketDamage.value would providing the Cvar had been set in the other files. The multiplication one would be more useful because you could just set it to a default of "1" and have it as a damage scale.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...