EDITING COMPANION MOD ZSCRIPT AND ACS

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
Post Reply
Psychojack88
Posts: 2
Joined: Sat May 07, 2022 10:12 pm
Graphics Processor: nVidia (Modern GZDoom)

EDITING COMPANION MOD ZSCRIPT AND ACS

Post by Psychojack88 »

Been downloading some companion mods to learn more about making mods that allies into the game via Slade. The one I've been using is Call of Doom Black Warfare companions which is found here as I found the companions to be some of the more cool and efficient ones as it was based on NeenerWiener's code template and expanded further.

https://www.moddb.com/games/doom-ii/add ... -companion

The thing is I would like to balance them or make them weaker so the game is much more balanced and not just me watching from the sidelines as they breeze through the enemies and seem unkillable, rising up in less than five seconds after losing health. Anyone know Slade enough to help me with the balancing aspect of this mod? I only need to edit one of the companions and can simply repeat the steps for the others to balance things out. Much appreciated to anyone who can offer some advice.

NOTE: I have tried using Slade and was able to reduce health, but not the damage or the immediate revival of characters. It seems to be something that is deeply ingrained into the character, and disabling the ACS doesn't seem to change this, and I can't seem to access the .o file within the code.
Proydoha
Posts: 87
Joined: Thu Jan 21, 2016 2:25 am

Re: EDITING COMPANION MOD ZSCRIPT AND ACS

Post by Proydoha »

Okay, I've downloaded files and opened FriendSoapMactavish.pk3
Psychojack88 wrote: Mon May 05, 2025 3:28 pm and I can't seem to access the .o file within the code.
This is because .o file is compiled ACS. When you right click on .acs file in Slade and go Script -> Compile ACS it will create .o file.
From the looks of it all ACS script does in this mod is it gives protection item to a player that prevents friendly fire from companion characters. I don't think this is useful in balancing this mod.
Psychojack88 wrote: Mon May 05, 2025 3:28 pm rising up in less than five seconds after losing health
To edit how long they stay dead go into file NNR_<character name>Friend.zsc, search for FakeDeath: state.

Code: Select all

	FakeDeath:
		TNT1 A 0 
		{
			bSHOOTABLE = false;
		}
		Soap H 5;
		TNT1 A 0 A_StartSound("FriendSoap/Death");
		Soap IJK 5;
		Soap L 100; // <----- This is how long will character 'stay dead' before raising
	FakeRaise:
		TNT1 A 0 
Try changing that 100 to something bigger if you want them to be out for longer.
Psychojack88 wrote: Mon May 05, 2025 3:28 pm or make them weaker
In the same file there are Melee: and Missile: states.
Inside of a Melee state you can see A_CustomMeleeAttack. You can tune it down to deal less damage by changing first parameter.

In Missile state there will be a list of possible other states that character can jump to that fire different weapons. You will need to locate those states and tune down damage inside of them.
I can see A_CustomBulletAttack in some of them. 4th parameter should be responsible for how much damage that attack deals.

I also see A_SpawnProjectile("FriendSoapRocketProjectile");
This one spawns an actor projectile as opposed to hitscan attacks of A_CustomBulletAttack. To change damage of a rocket you'll need to find definition of that actor and change damage there. For Soap I can find FriendSoapRocketProjectile in DECORATE.Other and it has Damage 20 on line 21.
User avatar
Enjay
 
 
Posts: 27043
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: EDITING COMPANION MOD ZSCRIPT AND ACS

Post by Enjay »

Proydoha wrote: Tue May 06, 2025 1:04 am From the looks of it all ACS script does in this mod is it gives protection item to a player that prevents friendly fire from companion characters. I don't think this is useful in balancing this mod.
Yes, I noticed that too.

Perhaps a better way to do that would be to create a custom player class that has the protection item by default and do away with the ACS entirely? As you said, it's pretty minimal - I think just three simple scripts to give the item for the different ways that the the player could enter/re-enter the map. If it was a default undroppable item in the player class, I don't think they would be needed at all.

Mind you, if it ain't broke...

and I think that there is one item type per ally. So, giving them all to the player could be messy.
Post Reply

Return to “General”