lfnetwork.com mark read register faq members calendar

Thread: Custom Mod Crashes Everytime
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 10-16-2006, 10:37 PM   #1
SecretChord
Rookie
 
Join Date: Oct 2006
Posts: 23
Custom Mod Crashes Everytime

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.
SecretChord is offline   you may: quote & reply,
Old 10-17-2006, 01:22 AM   #2
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,172
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.


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 10-17-2006, 01:43 AM   #3
SecretChord
Rookie
 
Join Date: Oct 2006
Posts: 23
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.
SecretChord is offline   you may: quote & reply,
Old 10-17-2006, 04:34 AM   #4
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,172
Great. I'm glad I could help.


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 10-18-2006, 06:19 AM   #5
SecretChord
Rookie
 
Join Date: Oct 2006
Posts: 23
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?
SecretChord is offline   you may: quote & reply,
Old 10-18-2006, 11:28 AM   #6
ensiform
The Stig
 
ensiform's Avatar
 
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,241
Current Game: Borderlands 2
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.


iojamp project lead / coder
ensiform is offline   you may: quote & reply,
Old 10-18-2006, 01:25 PM   #7
Tinny
 
Tinny's Avatar
 
Join Date: Apr 2002
Posts: 1,188
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.


Redeemed!

An old school mod for jedi academy.
Tinny is offline   you may: quote & reply,
Old 10-18-2006, 02:46 PM   #8
ensiform
The Stig
 
ensiform's Avatar
 
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,241
Current Game: Borderlands 2
Well the velocity and damages are controlled all in g_weapon.c anyway.


iojamp project lead / coder
ensiform is offline   you may: quote & reply,
Old 10-18-2006, 07:50 PM   #9
SecretChord
Rookie
 
Join Date: Oct 2006
Posts: 23
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.
SecretChord is offline   you may: quote & reply,
Old 10-18-2006, 08:27 PM   #10
ensiform
The Stig
 
ensiform's Avatar
 
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,241
Current Game: Borderlands 2
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.


iojamp project lead / coder
ensiform is offline   you may: quote & reply,
Old 10-19-2006, 12:09 AM   #11
Tinny
 
Tinny's Avatar
 
Join Date: Apr 2002
Posts: 1,188
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.


Redeemed!

An old school mod for jedi academy.
Tinny is offline   you may: quote & reply,
Old 10-19-2006, 03:40 AM   #12
SecretChord
Rookie
 
Join Date: Oct 2006
Posts: 23
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.
SecretChord is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > JediKnight Series > Editing Central > JA Coding > Custom Mod Crashes Everytime

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:59 PM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.