View previous topic :: View next topic |
Author |
Message |
Your Imaginary Enemy is connecting to Doom3world.org
Joined: 19 Dec 2004 Posts: 23
|
Posted: Sun Mar 06, 2005 3:55 pm Post subject: locking g_armorprotection |
|
|
I want to change the amount of damage that armor absorbs.
I have modified doom_main.script by adding the following line:
void doom_main() {
sys.print( "Entering doom_main()\n");
//
// Do any script setup here
//
sys.setcvar( "g_armorprotection", "0.65" );
sys.print( "Exiting doom_main()\n" );
}
This does a fine job of locking g_armorprotection on skill levels 0 and
1. Unfortunately, when I set the skill to 2 or 3 and load a new level
the g_armorprotection drops to 0.2. I need to know how to lock
g_armorprotection at 0.65 on all skill levels.
I also read somewhere that on skill 0 the player takes 0.8x damage,
on skill 2 the player takes 1.8x damage, and on skill 3 the player
takes 3.5x damage. Does anybody know how I can change these numbers for
my mod?
By the way, the mod I am finishing up is called Infernal Death Orgy and I will submit it to d3files.com real soon! |
|
Back to top |
|
 |
rich_is_bored a gun & a nice word

Joined: 11 Jan 2003 Posts: 4792 Location: Orlando, FL
|
Posted: Sun Mar 06, 2005 5:16 pm Post subject: |
|
|
This value is set when a player is spawned...
line 1543 player.cpp...
Code: | if ( !gameLocal.isMultiplayer ) {
if ( g_skill.GetInteger() < 2 ) {
if ( health < 25 ) {
health = 25;
}
if ( g_useDynamicProtection.GetBool() ) {
g_damageScale.SetFloat( 1.0f );
}
} else {
g_damageScale.SetFloat( 1.0f );
g_armorProtection.SetFloat( ( g_skill.GetInteger() < 2 ) ? 0.4f : 0.2f );
#ifndef ID_DEMO_BUILD
if ( g_skill.GetInteger() == 3 ) {
healthTake = true;
nextHealthTake = gameLocal.time + g_healthTakeTime.GetInteger() * 1000;
}
#endif
}
} |
_________________
Staff
Learn something today? Why not write an article about it on D3 Wiki? |
|
Back to top |
|
 |
Your Imaginary Enemy is connecting to Doom3world.org
Joined: 19 Dec 2004 Posts: 23
|
Posted: Mon Mar 07, 2005 7:00 am Post subject: |
|
|
I downloaded the sdk and opened src/game/player.cpp.
I changed the following line:
g_armorProtection.SetFloat( ( g_skill.GetInteger() < 2 ) ? 0.4f : 0.2f );
into
g_armorProtection.SetFloat( ( g_skill.GetInteger() < 2 ) ? 0.65f : 0.65f );
then I put my modified player.cpp file into C:\Doom
3\mymod\src\game folder. I was uncertain if this would work because
C:\Doom 3\base does not contain a src folder. But I tried it anyway.
This did not fix the problem. I looked around iddevnet.com/doom3 and
think I found something interesting that might be related to what I am
trying to do. The following is from The Code section.
COMPILING
The first thing you're going to need to do is make sure you can
build and run the code. We developed it using Visual Studio.Net, it may
or may not work in 6.0. Ideally all you have to do is double-click the
solution file and hit build. It will create a gamex86.dll in the output
folder. You're going to want to move this to your mod folder with
either a batch file, a post build step, or just by changing the linker
output directory.
Since I am making this mod mostly through trial and error and
reading these forums, I don't know about programming. So I don't know
how to do this compiling, solution file and gamex86.dll making.
I hope there is a simple solution to this because all I am after is a small but very important change. |
|
Back to top |
|
 |
Primal_Freeze picked up 75 health
Joined: 23 Feb 2005 Posts: 87 Location: Brisbane - Australia
|
Posted: Mon Mar 07, 2005 12:57 pm Post subject: |
|
|
Unfortunately
you WILL need to get a programmer to compile this for you. If i knew
where my unedited src was, i would chuck it in, edit and give you the
DLL, but alas, i do not. Email me in 12 hours and i'll see what i can
do. U can find my addy at www.skumindustries.com _________________ Metroid : Evolved - The Doom3 Mod - http://www.skumindustries.com |
|
Back to top |
|
 |
|