SecretChord Posted October 17, 2006 Share Posted October 17, 2006 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 More sharing options...
razorace Posted October 17, 2006 Share Posted October 17, 2006 Try adding "+set viewlog 1" as program argument. That will make the game display the a seperate window of the console that stays open when the game drops out like that. Link to comment Share on other sites More sharing options...
SecretChord Posted October 17, 2006 Author Share Posted October 17, 2006 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 More sharing options...
razorace Posted October 17, 2006 Share Posted October 17, 2006 Great. I'm glad I could help. Link to comment Share on other sites More sharing options...
SecretChord Posted October 18, 2006 Author Share Posted October 18, 2006 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 More sharing options...
ensiform Posted October 18, 2006 Share Posted October 18, 2006 Then just skip the things in bg_weapons because those are no easy task to allow you to change via cvar and definately not meant for a server mod because bg_weapons.c and .h are shared with cgame and ui. Link to comment Share on other sites More sharing options...
Tinny Posted October 18, 2006 Share Posted October 18, 2006 What you might want to do is go in g_weapons.c and when a weapon is fired, the function multiplies the damage by a cvar. Link to comment Share on other sites More sharing options...
ensiform Posted October 18, 2006 Share Posted October 18, 2006 Well the velocity and damages are controlled all in g_weapon.c anyway. Link to comment Share on other sites More sharing options...
SecretChord Posted October 18, 2006 Author Share Posted October 18, 2006 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 More sharing options...
ensiform Posted October 19, 2006 Share Posted October 19, 2006 Of course it doesn't because the bg_weapons files are shared between the different modules and you can't just use a cvar from the server in the other modules and it takes some serious hackage to make it work. Link to comment Share on other sites More sharing options...
Tinny Posted October 19, 2006 Share Posted October 19, 2006 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 More sharing options...
SecretChord Posted October 19, 2006 Author Share Posted October 19, 2006 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.