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

Prevent leaky radsuit?

Question

Simple question but probably a stupidly complex answer: I am experimenting with a new mode idea with instant death, which implies damaging floors are a problem. I have an infinite radsuit made but the highest damage floors still kill the player. Any way to fix this on the item side? I need to fix it without editing maps or making up all new damage types or effects.

Share this post


Link to post

7 answers to this question

Recommended Posts

  • 1

You could try using LOADACS with a script such as:

#library "SECTDMG0"
#include "zcommon.acs"

// This number should match the 'ACSReturn' property in the Skill definition.
#define SKILL_INSTADEATH 5

script "SectorDamageDisable" OPEN
{
  if (GameSkill() == SKILL_INSTADEATH)
  {
    // Disable sector damage for every tag available in doom & hexen format maps.
    // UDMF format maps have such a high tag limit, that looping through all of
    // them would not be reasonable. Just have to hope they fall within the range.
    for(int tag=0; tag<=32767; tag++)
    {
      Sector_SetDamage(tag, 0, MOD_UNKNOWN);
    }
  }
}

But it's not going to work well for maps that set sector damage with scripts. Though you could add a little delay in the beginning of the script to hopefully override any sector damage set right at the beginning of a level by possible map scripts.

 

Edit: This is assuming that you don't need the damaging floors hurting anyone while the skill is active.

Edited by Worst : clarification

Share this post


Link to post
  • 0

Here is how I handled that in my OPWeapons. Add this to your player class:

  DamageFactor "Slime", 0 // this and the Drowning immunity replace PermaRadsuit
  DamageFactor "Drowning", 0

There are still a couple special sector damage types that get through, so you might want to keep what you are currently doing as well.

Share this post


Link to post
  • 0

Is there any way to do this without affecting the player class? I still need damaging floors to damage on other skills, just not on this one.

Share this post


Link to post
  • 0

The "leakiness" is a sector property, not a player / powerup property. Classic 20% hurting floors have 5/256 chance of circumventing radsuit protection. GZDoom / EE support sector flags to disable / enable this behaviour.

 

I assume you want your mod to run on any random level?  That already sounds a bit iffy, since most (all?) levels aren't made with 'instant death' in mind so won't be balanced. Regardless, the only way to prevent deaths without level modifications would be to disable that sector effect like @Empyre demonstrated.  If you do have a selection of levels you want your mod to run on, you could attempt an automatic conversion of those levels with the Boom utility cled.exe prior to running, and change the 20% damage effect for specific sectors into less damaging ones that don't exhibit leakiness. Peeps won't like it if you attempt to do so on their IWADs.

Share this post


Link to post
  • 0
11 hours ago, Mordeth said:

The "leakiness" is a sector property, not a player / powerup property. Classic 20% hurting floors have 5/256 chance of circumventing radsuit protection. GZDoom / EE support sector flags to disable / enable this behaviour.

Let's say I could actually modify maps (I just preferred not to), is there a way to make a sector damage be the 20% but without the leakiness? Or what about the sector flags? That might be an option. Not sure I know about that flag.

 

I only said without editing maps as to have a global solution in the item itself (this would still be a good feature) as to avoid editing a bunch of maps checking for the 20% effect. I can edit my maps if I need to.

Share this post


Link to post
  • 0

You could combine my idea with Worst's and add those damage immunities to the player(s) if the skill level is your custom skill level.

 

EDIT: I was looking for how to do that, and it looks like you can set only the generic damage factor but not any specific damage factor, but i think I have found a solution. Make a custom player class with immunity to slime and drowning and don't add it to the class selection list. In ACS, if your custom skill level is selected, cycle through all the players and use MorphActor to change each player to your custom player class. Also give each player a permanent raduit (with Powerup.Color None) to take care of those very few sector damage types that are not covered by any damage factor.

Edited by Empyre

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
×