Friendly morphed monster

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

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: Friendly morphed monster

Re: Friendly morphed monster

by drfrag » Wed May 31, 2017 3:01 am

Okay, understood.

Re: Friendly morphed monster

by Graf Zahl » Wed May 31, 2017 2:55 am

Morphing is designed to preserve any allegiance the monster-to-be-morphed has.

Re: Friendly morphed monster

by drfrag » Wed May 31, 2017 2:45 am

Graf Zahl wrote:Morphing transfers friendliness forth and back to and from the morphed monster
Then why is the +FRIENDLY flag ignored? Right now there's no way to implement friendly morphed monsters in DECORATE without that override.

Re: Friendly morphed monster

by Graf Zahl » Wed May 31, 2017 2:24 am

Looking through the code in detail I think I see where the actual problem lies:

Morphing transfers friendliness forth and back to and from the morphed monster. but the FriendlyBeast overrides the original setting - and that override gets transferred back to the main version of the monster. Looking through the entire change history this is entirely by design and not a bug.

Whether this warrants a new feature is another discussion, though. It may require a scripted callback but it hasn't been decided how to handle that.

Re: Friendly morphed monster

by Graf Zahl » Tue May 30, 2017 4:49 am

Yes, what happens is that morphing does not transfer this flag to the morphed monster.
Unmorphing, on the other hand, transfers the flag from the morphed monster to the unmorphed one.

This was most certainly intended as a bugfix, but only half of that fix was actually implemented

Re: Friendly morphed monster

by drfrag » Tue May 30, 2017 4:28 am

Graf Zahl wrote:Unmorphing preserves the FRIENDLY flag, but morphing does not. It should be consistent, but what way?
Both? The original monster was not friendly, only the morphed monster is.

Re: Friendly morphed monster

by Rachael » Tue May 30, 2017 4:24 am

Shouldn't it follow Hexen's behavior?

I think the ultimate answer would be is if Mr. Minotaur tries to kill you after you hit him with a porkalator in Vanilla Hexen. :P In which case - if he does, then FRIENDLY flag should only be preserved for the unmorphed actor - and if he doesn't, then it needs to be transferred while morphing. (AFAIR, Hexen had no idea of a 'friendly' flag as such, so the morphed minotaurs will probably try to kill you)

Considering the age of this bug, though, a compatibility fix may be required in order to preserve this buggy behavior since there's been many mods released since ZDoom 2.3.1.

Re: Friendly morphed monster

by Graf Zahl » Tue May 30, 2017 4:21 am

This looks a bit odd. Unmorphing preserves the FRIENDLY flag, but morphing does not. It should be consistent, but what way?

Friendly morphed monster

by drfrag » Tue May 30, 2017 3:53 am

At least since ZDoom 2.3.1 to GZDoom 3.0.1. When you morph someone into a friendly monster the guy is still friendly after unmorphing, since the friendly flag is ignored you must use changeflag in the see states. In 3.0.1 sometimes the guy stays morphed and plays the pain sound instead. Please see code. To reproduce load morphfriendtest.wad in Heretic and type 'summon artiegg2'. Now i've noticed that may be you were never intended to morph someone into a friendly monster (this decorate code was really old). So not a bug but a feature request then?

Code: Select all

ACTOR ArtiEgg2 : CustomInventory
{
  +COUNTITEM
  +FLOATBOB
  +INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTIEGGC"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Alternate Morph Ovum"
  Inventory.DefMaxAmount
  Tag "$TAG_ARTIEGG"
  States
  {
  Spawn:
    EGGC ABCB 6
    Loop
  Use:
    TNT1 A 0 A_FireCustomMissile("EggFX2", -15, 0, 0, 0, 1)
    TNT1 A 0 A_FireCustomMissile("EggFX2", -7.5, 0, 0, 0, 1)
    TNT1 A 0 A_FireCustomMissile("EggFX2", 0, 0, 0, 0, 1)
    TNT1 A 0 A_FireCustomMissile("EggFX2", 7.5, 0, 0, 0, 1)
    TNT1 A 0 A_FireCustomMissile("EggFX2", 15, 0, 0, 0, 1)
    Stop
  }
}

ACTOR EggFX2 : MorphProjectile
{
  Radius 8
  Height 8
  Speed 18
  MorphProjectile.MonsterClass "FriendlyBeast"
  MorphProjectile.MorphStyle MRF_FULLHEALTH
  MorphProjectile.Duration 1000
  States
  {
  Spawn:
    EGGM ABCDE 4
    Loop
  Death:
    FX01 F 3 Bright
    FX01 FGH 3 Bright
    Stop
  }
}

ACTOR FriendlyBeast : MorphedMonster
{
	Health 220
	Radius 32
	Height 74
	Mass 200
	Speed 14
	Painchance 100
	Monster
	+FLOORCLIP
	+FRIENDLY // this is ignored
	+DROPOFF
	+NOBLOCKMONST
	-COUNTKILL
	SeeSound "beast/sight"
	AttackSound "beast/attack"
	PainSound "beast/pain"
	DeathSound "beast/death"
	ActiveSound "beast/active"
	Obituary "$OB_BEAST"
	States
	{
	Spawn:
		BEAS AB 10 A_Look
		Loop
	See:
		BEAS A 0 // this line can be commented out but must exist
		BEAS A 0 A_ChangeFlag("FRIENDLY",1) // hack
		BEAS ABCDEF 3 A_Chase
		Loop
	Melee:
	Missile:
		BEAS H 10 A_FaceTarget
		BEAS I 10 A_CustomComboAttack("BeastBall", 32, random[BeastAttack](1,8)*3, "beast/attack")
		Goto See
	Pain:
		BEAS G 3
		BEAS G 3 A_Pain
		Goto See
	Death:
		BEAS R 6
		BEAS S 6 A_Scream
		BEAS TUV 6
		BEAS W 6 A_NoBlocking
		BEAS XY 6
		BEAS Z -1
		Stop
	XDeath:
		BEAS J 5
		BEAS K 6 A_Scream
		BEAS L 5
		BEAS M 6
		BEAS N 5
		BEAS O 6 A_NoBlocking
		BEAS P 5
		BEAS Q -1
		Stop
	}
}

Top