Back to the Vavoom Forum Archives


Forum

[Fixed] [SVN 4040] Strife: Acolyte wrong behavior

Thu, 30 Jul 2009 18:46:46

Crimson Wizard

Duh, I must say I never knew they behave so strange. <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) --> I had to specially make a test map and try both Vavoom and DOS Strife to make sure it is right. It appears acolytes only notice dagger/arrow attacks when they are in same sector. <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> Imagine small room consisting of 2 sectors. If there are 2 acolytes each in different sector, facing each other, player can kill one and another will just stand there watching and thinking that everything is allright <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
Thu, 30 Jul 2009 19:12:49

Firebrand

IMO the checks for this aren't the best, it would be better to check if Acolytes can see the target instead, but to keep compatibility I made it like that.
Thu, 30 Jul 2009 19:43:10

Crimson Wizard

[quote="Firebrand":2tup4b7g]IMO the checks for this aren't the best, it would be better to check if Acolytes can see the target instead, but to keep compatibility I made it like that. The check for Seeing is made; the weakness of this AI is caused by range limitation, that is how game determines which actors to test. Originally it looks only in one sector, in which player is positioned when attacks (that's what I described earlier); for better results it should test all actors in some range, using RoughBlockSearch for example, or AllThinkers iterator. But compatibility has higher priority here ofc.
Tue, 28 Jul 2009 16:28:43

Firebrand

IIRC there's a flag like bSeesDaggers or something like that related to this behavior, maybe it's missing implementation?
Tue, 28 Jul 2009 16:55:48

Crimson Wizard

[quote="Firebrand":1wsc7zsr]IIRC there's a flag like bSeesDaggers or something like that related to this behavior, maybe it's missing implementation? Yes, that's true. It is defined in vavoom_decorate_defs.xml as "unsupported flag".
Tue, 28 Jul 2009 17:22:08

Firebrand

Now it's supported <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) -->. Add bSeesDagger flag to the last of flags list in linespec->Entity.Head.vc. Then add this method to linespec::Actor.Strife:
//==========================================================================
//
//	A_DaggerAlert
//
//==========================================================================

final void A_DaggerAlert(EntityEx target, EntityEx emitter) self(Actor)
{
	Entity looker;

	if (emitter.LastHeard)
		return;
	if (emitter.Health <= 0)
		return;
	if (!emitter.bMonster)
		return;
	if (emitter.bInCombat)
		return;
	emitter.bInCombat = true;

	emitter.Target = target;
	emitter.SetState(emitter.FindState('Pain'));

	for (looker = Sector->ThingList; looker; looker = looker.SNext)
	{
		if (looker == emitter || looker == target)
			continue;

		if (looker.Health <= 0)
			continue;

		if (!EntityEx(looker).bSeesDaggers)
			continue;

		if (!EntityEx(looker).bInCombat)
		{
			if (!looker.CanSee(target) && !looker.CanSee(emitter))
				continue;

			EntityEx(looker).Target = target;
			looker.PlaySound(SightSound, CHAN_VOICE);
			looker.SetState(EntityEx(looker).SeeState);
			EntityEx(looker).bInCombat = true;
		}
	}
}
Then call the method from A_JabDagger method <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->, it seems this method wasn't implemented due to commented line on A_JabDagger <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->.
Tue, 28 Jul 2009 18:12:14

Crimson Wizard

Why cannot you update SVN if this is correct way to fix it? Also, what about Poison Arrows?
Wed, 29 Jul 2009 01:58:52

Firebrand

Submitted fixes for Poison Arrow and for the Dagger <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->.
Wed, 29 Jul 2009 14:04:23

Crimson Wizard

Looks like working now.
Tue, 28 Jul 2009 11:45:09

Crimson Wizard

In Strife Acolytes react wrongly on silent attacks, that is they don't react as needed. In original game, if there were several Acolytes standing in the sight of each other and player attacked one with dagger or poisonous arrow, general alarm was not sounded, but everyone who saw the attack were activated and attacked the player. Currently in Vavoom if you attack Acolyte in sight of another Acolyte with silent weapon nobody moves. This makes it possible (in theory) to kill all Acolytes around one by one. Also, I found that wandering Acolytes ignore the noise; that is if Acolyte is put into Walk state he will never look for enemies again. I noticed that Templar actor, for exmaple, has similar behavior to Acolyte, but he returns to Spawn state over time and that makes it possible for him to detect shooting player. I would suggest either to make Acolyte's behavior like Templar, or maybe add extra check for target in A_Wander (or maybe make another Wander method with such check specially for Acolytes/Templars).

Back to the Vavoom Forum Archives