Pain chance factor on weapons

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Pain chance factor on weapons

Re: Pain chance factor on weapons

by De-M-oN » Mon Dec 09, 2024 12:18 pm

ahh yes that might work. thank you

Re: Pain chance factor on weapons

by Zhs2 » Fri Dec 06, 2024 8:45 pm

De-M-oN wrote: Mon Dec 02, 2024 10:26 am But that would disable pain entirely.
Yes. You do not want to place it in a puff or projectile's default field, but rather randomize whether it is true at the puff or projectile's creation, as per the above post. Just replace bFORCEPAIN with bPAINLESS.

Re: Pain chance factor on weapons

by Rachael » Thu Dec 05, 2024 8:23 am

Professor Hastig wrote: Thu Dec 05, 2024 5:37 am Aren't there enough questionable pain flags already? The code looks horrendously convoluted to handle all the special exceptions that were added to it.
Actually I agree. There's absolutely *WAY* too much override-of-override-of-override-of-override-of-override cruft in the Actor class as it is and this post reminded me of that.

Re: Pain chance factor on weapons

by Professor Hastig » Thu Dec 05, 2024 5:37 am

Aren't there enough questionable pain flags already? The code looks horrendously convoluted to handle all the special exceptions that were added to it.

Re: Pain chance factor on weapons

by Rachael » Tue Dec 03, 2024 3:58 am

The flag can be applied randomly based on chance. In the case of puffs you can use inheritance and swap a painless puff out for another when you need a lower pain chance for the puff.

I know this is far from ideal, it's a bit hacky, but a proper implementation ("fix" if you prefer) for this will require a full flag anyway because it would require overriding behavior that would likely break old mods without it.

Re: Pain chance factor on weapons

by De-M-oN » Mon Dec 02, 2024 10:26 am

But that would disable pain entirely.

Re: Pain chance factor on weapons

by Zhs2 » Sun Dec 01, 2024 11:39 am

The PAINLESS flag on your puffs or projectiles can be used to achieve the opposite effect.

Re: Pain chance factor on weapons

by De-M-oN » Fri Nov 29, 2024 3:22 pm

Is it also possible the opposite way?
So that I can have a faster chaingun, but the painchance stays same/similar?

Re: Pain chance factor on weapons

by Rowsol » Thu May 02, 2024 10:16 pm

Appreciate the help.

Re: Pain chance factor on weapons

by Zhs2 » Thu May 02, 2024 8:59 pm

This is a "just" tier solution but here's how you can legally hack it:

Code: Select all

// Do this on a puff or projectile.
override void BeginPlay()
{
	Super.BeginPlay();
	if(random(1, 100) <= 40) // 40% chance to commit pain, which of course stacks on top of any current painchances. Edit to fit your needs.
	{
		bFORCEPAIN = true;
	}
}

Pain chance factor on weapons

by Rowsol » Thu May 02, 2024 12:20 am

I could really use a way to adjust pain chance on weapons, without the need to edit monsters. A setting like PainChanceFactor would work wonders. Currently, if I want a powerful weapon to have a higher chance of stunning, my only recourse is adding a bunch of mini a_explodes to the impact.

Top