Jump to content

A few modding related questions.


ILOVEDOOM!

Recommended Posts

First of all i'd like to apologize for only asking for/about things and not actually giving anything to the table. I'm not really a modder so asking is all i can really do. Anyways, i've got two questions:

1. How do i increase how much damage armor can take? I understand that i need to edit the pk4 files but im not sure which ones and what folders that code is in.

2. I've found a really cool mod today, haven't tested it out yet but what it says is that it uses the first 5 levels of the campaign(that's because it's unfinished) and makes a few pre-generated versions of them with "randomized" enemies(and weapons if i recognize correctly) to simulate a randomizer mod for the game. The description said that it doesn't use any scripts. Here's my question: could it be possible to actually make it use scripts so that it will be different each time and be compatible with custom maps?  Im really eager to expierience something new in doom 3 again and I'd really love if someone helped me with this.

 

Cheers and have a good day.

 

Share this post


Link to post

I can only answer the first question, but the way I change the armor percentage without using the console every time is to add a few if else statements to the player's idle torso (the main place you take damage) in ai_player.script, located in pak006.pk4 of Doom 3's base folder.

Spoiler

void player::Torso_Idle() {
	playCycle( ANIMCHANNEL_TORSO, "idle" );

	eachFrame {
		if ( sys.getcvar( "si_gameType" ) == "singleplayer" )

		{
		if ( sys.getcvar ( "g_skill" ) == "0")
			{
			sys.setcvar( "g_armorProtection", "0.8" );
			sys.setcvar( "g_damageScale", "0.5" );
			sys.setcvar( "g_doubleVision", "0" );
			}
		else
		if ( sys.getcvar ( "g_skill" ) == "1")
			{
			sys.setcvar( "g_armorProtection", "0.6" );
			sys.setcvar( "g_doubleVision", "0" );
			}
		else
		if ( sys.getcvar ( "g_skill" ) == "2")
			{
			sys.setcvar( "g_armorProtection", "0.6" );
			sys.setcvar( "g_damageScale", "1.5" );
			sys.setcvar( "g_doubleVision", "0" );
			}
		}
		if ( AI_TELEPORT ) {
			animState( ANIMCHANNEL_TORSO, "Torso_Teleport", 0 );
		}
		if ( weapon.WEAPON_NETFIRING ) {
		   if ( start_fire ) {
				animState( ANIMCHANNEL_TORSO, "Torso_Fire_StartFire", 2 );
		   } else {
				animState( ANIMCHANNEL_TORSO, "Torso_Fire", 2 );
		   }
		}
		if ( AI_WEAPON_FIRED || weapon.WEAPON_START_FIRING ) {
			animState( ANIMCHANNEL_TORSO, "Torso_Fire", 2 );
		}
		if ( AI_ATTACK_HELD && start_fire ) {
			animState( ANIMCHANNEL_TORSO, "Torso_Fire_StartFire", 2 );
		}
		if ( AI_PAIN ) {
			animState( ANIMCHANNEL_TORSO, "Torso_Pain", 0 );
		}
	}
}

 

If you want to load this without editing the game's original files (highly recommended), extract ai_player.script from the pk4 into a new folder called "script", open the file with a text editor and replace the original Torso_Idle with the new code, and zip the folder as a pk4 with something like 7-Zip. Then you can put the pk4 in Doom 3's base folder and it should work, though I'd recommend starting a new game as changing scripts will restart the level and change the difficulty to the game's default. You can call the zipped file anything you want, as long as it sits after all the original files alphabetically.

 

I've left the "damageScale" and "doubleVision" lines in the code to show that other things can be changed as well, but you can delete the lines if you don't want those parameters to be affected.

 

There was a website I used to go to last year that had loads of documentation and explanations on all the ways to tweak Doom 3, but the link seems to be dead now.

 

Edit: found it on wayback machine https://web.archive.org/web/20200613234848/https://www.iddevnet.com/doom3/

Edited by Lippeth

Share this post


Link to post
On 5/23/2021 at 10:26 AM, Lippeth said:

I can only answer the first question, but the way I change the armor percentage without using the console every time is to add a few if else statements to the player's idle torso (the main place you take damage) in ai_player.script, located in pak006.pk4 of Doom 3's base folder.

  Reveal hidden contents


void player::Torso_Idle() {
	playCycle( ANIMCHANNEL_TORSO, "idle" );

	eachFrame {
		if ( sys.getcvar( "si_gameType" ) == "singleplayer" )

		{
		if ( sys.getcvar ( "g_skill" ) == "0")
			{
			sys.setcvar( "g_armorProtection", "0.8" );
			sys.setcvar( "g_damageScale", "0.5" );
			sys.setcvar( "g_doubleVision", "0" );
			}
		else
		if ( sys.getcvar ( "g_skill" ) == "1")
			{
			sys.setcvar( "g_armorProtection", "0.6" );
			sys.setcvar( "g_doubleVision", "0" );
			}
		else
		if ( sys.getcvar ( "g_skill" ) == "2")
			{
			sys.setcvar( "g_armorProtection", "0.6" );
			sys.setcvar( "g_damageScale", "1.5" );
			sys.setcvar( "g_doubleVision", "0" );
			}
		}
		if ( AI_TELEPORT ) {
			animState( ANIMCHANNEL_TORSO, "Torso_Teleport", 0 );
		}
		if ( weapon.WEAPON_NETFIRING ) {
		   if ( start_fire ) {
				animState( ANIMCHANNEL_TORSO, "Torso_Fire_StartFire", 2 );
		   } else {
				animState( ANIMCHANNEL_TORSO, "Torso_Fire", 2 );
		   }
		}
		if ( AI_WEAPON_FIRED || weapon.WEAPON_START_FIRING ) {
			animState( ANIMCHANNEL_TORSO, "Torso_Fire", 2 );
		}
		if ( AI_ATTACK_HELD && start_fire ) {
			animState( ANIMCHANNEL_TORSO, "Torso_Fire_StartFire", 2 );
		}
		if ( AI_PAIN ) {
			animState( ANIMCHANNEL_TORSO, "Torso_Pain", 0 );
		}
	}
}

 

If you want to load this without editing the game's original files (highly recommended), extract ai_player.script from the pk4 into a new folder called "script", open the file with a text editor and replace the original Torso_Idle with the new code, and zip the folder as a pk4 with something like 7-Zip. Then you can put the pk4 in Doom 3's base folder and it should work, though I'd recommend starting a new game as changing scripts will restart the level and change the difficulty to the game's default. You can call the zipped file anything you want, as long as it sits after all the original files alphabetically.

 

I've left the "damageScale" and "doubleVision" lines in the code to show that other things can be changed as well, but you can delete the lines if you don't want those parameters to be affected.

 

There was a website I used to go to last year that had loads of documentation and explanations on all the ways to tweak Doom 3, but the link seems to be dead now.

 

Edit: found it on wayback machine https://web.archive.org/web/20200613234848/https://www.iddevnet.com/doom3/

Thank you! I personally found the armor in Doom 3 originally pretty useless and "exploring" for armor shards and armor itself didnt feel worth it, this will greatly improve the expierience.

Edited by ILOVEDOOM!

Share this post


Link to post

Happy to help! I definitely feel a little insulted when I die with over 100 armor. It should at least absorb half damage, but I opt for 0.6, as present in multiplayer. It does make armor much more valuable to find.

 

I also found this website that has tons of modding resources: https://modwiki.dhewm3.org/Doom_3

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...