Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
TendaMonsta

Modifying Rocket splash for Zdoom

Recommended Posts

Here's the problem.

The player isn't launched high at all when I lower "explosiondamage"
Increasing the radius does nothing

ACTOR Rocket
{
Game Doom
SpawnID 127
Radius 11
Height 8
Speed 20
Damage 20
Projectile
+RANDOMIZE
+DEHEXPLOSION
+ROCKETTRAIL
explosiondamage "25"
explosionradius "50"
SeeSound "weapons/rocklf"
DeathSound "weapons/rocklx"
Obituary "$OB_MPROCKET" // "%o rode %k's rocket."
States
{
Spawn:
MISL A 1 Bright
Loop
Death:
MISL B 8 Bright A_Explode
MISL C 6 Bright
MISL D 4 Bright
Stop
}
}

Did I do something wrong?

Share this post


Link to post

I'm pretty sure the explosion damage is directly tied to how far you're launched.

Skulltag (and Zandronum with the Skulltag pk3s loaded) has a Red Armour powerup that greatly reduces splash damage; you might just want to make a map for that. Alternately this post by Gez suggests you can create a similar effect using the DamageFactor on some armour.

For reference, here's Skulltag's Red Armour DECORATE.

ACTOR RedArmor : BasicArmorPickup 5040
{
	Game Doom
	SpawnID 168
	Radius 20
	Height 16
	Armor.Savepercent 66.66666
	Armor.Saveamount 200
	Inventory.Icon "ARM3A0"
	Inventory.Pickupmessage "$PICKUP_REDARMOR"
	DamageFactor "Fire", 0.125
	DamageFactor "Rocket", 0.125
	DamageFactor "Grenade", 0.125
	States
	{
	Spawn:
		ARM3 A 6
		ARM3 B 6 bright
		goto Spawn
	}
}
If you change that to replace the Green Armour, and use the Green Armour sprites, you might get something similar. I have not tested this out.

It might even be possible to modify a weapon to use DamageFactor and get the effect you're after directly, but maybe not, I don't really know.

Share this post


Link to post
TendaMonsta said:

Here's the problem.

The player isn't launched high at all when I lower "explosiondamage"
Increasing the radius does nothing


Did I do something wrong?


Yeah.

Try

Actor MyRocket : Rocket replaces Rocket
{
	States
	{
	Death:
		MISL B 0 Bright A_Explode(32, 128)
		MISL B 0 Bright A_Explode(96, 128, 0)
		MISL B 8 Bright A_RadiusThrust(96, 128, RTF_AFFECTSOURCE)
		Goto Super::Death+1
	}
}
Now how does this work?
Actor MyRocket - you shouldn't redefine standard actors, so here we give it a different name.
: Rocket - we use inheritance because this way, this new actor will be just like the standard rocket except for what we specifically change.
replaces Rocket - we want the standard rockets to be replaced.

MISL B 0 Bright A_Explode(32, 128) - we specify parameters so that the rocket will deal less damage, here we go with only 25% damage. We use a state with 0 tic length so that the next state is entered immediately
MISL B 0 Bright A_Explode(96, 128, 0) - to make it still useful against enemy, we add in 75% of the original damage back, but in a way that'll be only inflicted to enemies, not to the player who fired the rocket. Using 0 as the third parameter negates the XF_HURTSOURCE which is set by default.
MISL B 8 Bright A_RadiusThrust(96, 128, RTF_AFFECTSOURCE) - we want the player to be affected by a blast that corresponds to 75% of a rocket blast, in addition to the 25% already used by the actual explosion that should be enough. (This will also affect enemies, so they'll get a boost compared to normal rockets. Shouldn't be a problem though.) This state has a normal tic length because it's the last in our series of three.
Goto Super::Death+1 - play the rest of the explosion animation as normal by going back to the Rocket's death state sequence. +1 means skipping the first state in the sequence, since it's what we've replaced with our three states above.

Share this post


Link to post

Welp. I tried that Decorate script Gez and he still does pussy rocket jumps.

At least the monsters are affected(effected?) by it though.

Share this post


Link to post

Now I would like to do the exact opposite than TendaMonsta. I want to "disable" rocket jump, in that manner that the splash damage will be the same lethal for the player as normally, but he won't be thrust upwards even if he fires below himself (or at least not that much). And I want it without side effects, like forcing infinitely tall actors or enabling OLD radius damage (which would affect monsters and other undesired objects too). Is there a possibility to achieve so?

Share this post


Link to post

Plums would be right about DamageFactor.

I came up with this and it *seems* to work correctly.

ACTOR DoomPlayer2 : DoomPlayer
{
DamageFactor "Rocket", 0
}

Actor Rocket2 : Rocket replaces Rocket
{
States
 {
Death:
    MISL B 0 Bright A_SpawnItem(BOOMY,0)
    MISL B 8 Bright A_Explode(64,128)
    MISL C 6 Bright
    MISL D 4 Bright
    Stop
 }

}


ACTOR BOOMY
{
+PAINLESS 
DamageType "Rocket"
  States
  {
  Spawn:
    TNT1 A 0
  Death:
    TNT1 A 0 A_Explode(64,128)
    Stop
  }
}
And in the KEYCONF lump:
clearplayerclasses

addplayerclass DoomPlayer2
The rocket does half splash damage, but makes another explosion (BOOMY) doing half aswell.

I've used DamageType to make BOOMY do a certain type of damage (Rocket), and DamageFactor to make the player immune to such damage.

So the player should be taking about half as much from the splash but has the same knockback.

@scifista42 you could use something similar, it should keep the damage but lower the knockback, not sure its what your after though.
Actor Rocket2 : Rocket replaces Rocket
{
States
 {
Death:
    MISL B 0 Bright A_SpawnItem(BOOMY,0)
    MISL B 8 Bright A_Explode(96,128)
    MISL C 6 Bright
    MISL D 4 Bright
    Stop
 }

}

ACTOR BOOMY
{
+NODAMAGETHRUST
+PAINLESS 
  States
  {
  Spawn:
    TNT1 A 0
  Death:
    TNT1 A 0 A_Explode(32,128)
    Stop
  }
}

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×