Adjusting MinMissileChance

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
Ed the Bat
Posts: 3060
Joined: Thu May 03, 2012 1:18 pm
Graphics Processor: nVidia with Vulkan support
Location: Maryland, US
Contact:

Adjusting MinMissileChance

Post by Ed the Bat »

Could someone teach me some specifics on MinMissileChance? I know the default defined by ACTOR is 200. What value would I use if I wanted an enemy to be, for instance, half as aggressive? One quarter? Or even double? Is there a formula I can follow?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49247
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Adjusting MinMissileChance

Post by Graf Zahl »

The entire formula is far too complicated to define 'half as aggressive'.

Here's the code:

Code: Select all

	if (flags4 & MF4_MISSILEMORE) dist >>= 1;
	if (flags4 & MF4_MISSILEEVENMORE) dist >>= 3;
	
	int mmc = FixedMul(MinMissileChance, G_SkillProperty(SKILLP_Aggressiveness));
	return pr_checkmissilerange() >= MIN<int> (dist >> FRACBITS, mmc);
It's hard to define 'half' in that context.
User avatar
Ed the Bat
Posts: 3060
Joined: Thu May 03, 2012 1:18 pm
Graphics Processor: nVidia with Vulkan support
Location: Maryland, US
Contact:

Re: Adjusting MinMissileChance

Post by Ed the Bat »

Blast, that's the part I got stuck on... Alright, thanks anyway.
Locked

Return to “Editing (Archive)”