"Our Hero" during Cast Call

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:

"Our Hero" during Cast Call

Post by Ed the Bat »

I've noticed that, during the cast call at the end of Doom II (and other games that use it), when "Our Hero" appears at the end, it will conform to the original Vanilla animations. That is to say, even if I was playing with a custom character class, it will still call the same animation frames that it would have by default, even if those aren't the frames used in this class' standard animations. It will also ignore properties such as Scale. What I'm seeing isn't the class I played as, but rather the "DoomPlayer" class using sprites from the class I played. And in most cases, it looks incorrect and downright nasty. In fact, the only method I've seen for changing this animation is to modify the player with DeHackEd -- the animation will conform to those changes. But that's still not a solution to what I'm aiming for.

I've even tried using MAPINFO to change the Intermission Doom2Cast to call other player classes instead of DoomPlayer, but I saw no change.

Is there something I'm doing incorrectly? Is there even a way to have it display the actual player's class?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: "Our Hero" during Cast Call

Post by Graf Zahl »

Post your MAPINFO, then someone might tell you. The rest you described is just an inevitable limitation of the engine's inner workings. The class is DoomPlayer, after all, and if you use another, incompatible player class, it logically won't match if you replace the PLAY sprites.
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: "Our Hero" during Cast Call

Post by Ed the Bat »

Hmm... either some of my information is outdated or I was simply mistaken. Now I'm finding that the animations are being honored properly if I specify the playerclass explicitly. I quickly drummed up a custom player and had the intermission explicitly call this class.

Code: Select all

ACTOR TheFatGuy : PlayerPawn
{
	Scale .25
	Speed 1
	Health 100
	Radius 16
	Height 56
	Mass 100
	PainChance 255
	Player.DisplayName "Lardo"
	Player.StartItem "Pistol"
	Player.StartItem "Fist"
	Player.StartItem "Clip", 50
	Player.WeaponSlot 1, Fist, Chainsaw
	Player.WeaponSlot 2, Pistol
	Player.WeaponSlot 3, Shotgun, SuperShotgun
	Player.WeaponSlot 4, Chaingun
	Player.WeaponSlot 5, RocketLauncher
	Player.WeaponSlot 6, PlasmaRifle
	Player.WeaponSlot 7, BFG9000
	States
	{
	Spawn:
		FATT AB 15
		Loop
	See:
		FATT ABCDEF 8
		Loop
	Missile:
		FATT G 20
	Melee:
		FATT H 10 BRIGHT
		FATT I 5
		FATT G 6
		Goto Spawn
	Pain:
		FATT J 3
		FATT J 3 A_Pain
		Goto Spawn
	Death:
		FATT K 6
		FATT L 6 A_Scream
		FATT M 6 A_NoBlocking
		FATT NOPQRS 6
		FATT T -1
		Stop
	}
}
I set it to use the Mancubus sprites, including their animations (his walk goes ABCDEF, as opposed to the Marine's ABCD, and the frames run for 8 tics instead of 4). I left most other things identical to a standard playerclass for the sake of simplicity.

My MAPINFO includes only a rewrite of the Doom II Cast Call, like so:

Code: Select all

Intermission Doom2Cast
{
	Cast
	{
		CastClass = "Zombieman"
		CastName = "$CC_ZOMBIE"
		AttackSound = "Missile",1,"grunt/attack"
	}
	Cast
	{
		CastClass = "ShotgunGuy"
		CastName = "$CC_SHOTGUN"
		AttackSound = "Missile",1,"shotguy/attack"
	}
	Cast
	{
		CastClass = "ChaingunGuy"
		CastName = "$CC_HEAVY"
		AttackSound = "Missile",1,"chainguy/attack"
		AttackSound = "Missile",2,"chainguy/attack"
		AttackSound = "Missile",3,"chainguy/attack"
	}
	Cast
	{
		CastClass = "DoomImp"
		CastName = "$CC_IMP"
		AttackSound = "Missile",2,"imp/attack"
	}
	Cast
	{
		CastClass = "Demon"
		CastName = "$CC_DEMON"
		AttackSound = "Melee",1,"demon/melee"
	}
	Cast
	{
		CastClass = "LostSoul"
		CastName = "$CC_LOST"
		AttackSound = "Missile",1,"skull/melee"
	}
	Cast
	{
		CastClass = "Cacodemon"
		CastName = "$CC_CACO"
		AttackSound = "Missile",1,"caco/attack"
	}
	Cast
	{
		CastClass = "HellKnight"
		CastName = "$CC_HELL"
		AttackSound = "Missile",1,"baron/attack"
	}
	Cast
	{
		CastClass = "BaronOfHell"
		CastName = "$CC_BARON"
		AttackSound = "Missile",1,"baron/attack"
	}
	Cast
	{
		CastClass = "Arachnotron"
		CastName = "$CC_ARACH"
		AttackSound = "Missile",1,"baby/attack"
	}
	Cast
	{
		CastClass = "PainElemental"
		CastName = "$CC_PAIN"
		AttackSound = "Missile",2,"skull/melee"
	}
	Cast
	{
		CastClass = "Revenant"
		CastName = "$CC_REVEN"
		AttackSound = "Missile",1,"skeleton/attack"
		AttackSound = "Melee",1,"skeleton/swing"
		AttackSound = "Melee",3,"skeleton/melee"
	}
	Cast
	{
		CastClass = "Fatso"
		CastName = "$CC_MANCU"
		AttackSound = "Missile",1,"fatso/attack"
		AttackSound = "Missile",4,"fatso/attack"
		AttackSound = "Missile",7,"fatso/attack"
	}
	Cast
	{
		CastClass = "Archvile"
		CastName = "$CC_ARCH"
		AttackSound = "Missile",1,"vile/start"
	}
	Cast
	{
		CastClass = "SpiderMastermind"
		CastName = "$CC_SPIDER"
		AttackSound = "Missile",1,"spider/attack"
		AttackSound = "Missile",2,"spider/attack"
	}
	Cast
	{
		CastClass = "Cyberdemon"
		CastName = "$CC_CYBER"
		AttackSound = "Missile",1,"weapons/rocklf"
		AttackSound = "Missile",3,"weapons/rocklf"
		AttackSound = "Missile",5,"weapons/rocklf"
	}
	Cast
	{
		CastClass = "TheFatGuy"
		CastName = "This fat thing"
		AttackSound = "Missile", 0, "weapons/sshotf"
	}
	Link = Doom2Cast	// restart cast call
}
The only change is that I changed "DoomPlayer" to my new character. When done like this, the only error I'm seeing is that when he comes up in the cast call he's not at .25 scale like he is in the game. His walk is still correct, though (six frames, ABCDEF, at 8 tics each).

However, if I were to forego the MAPINFO, thus running with the default cast call (therefore, have "DoomPlayer" called), what I see is a character using the sprites of the guy I played as (So, Lardo's sprites), but at the animation of DoomPlayer (ABCD, 4 tics each), and once again not scaled to .25. If I had given him his own SoundClass, those sound effects would play instead of the Marine's voice.

I did not alter the PLAY sprites at all, so it must not be using those for this thing I'm seeing.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: "Our Hero" during Cast Call

Post by Graf Zahl »

Sounds like the skin code is getting in the way. Try giving your player the +NOSKIN flag.
Scaling is not implemented for the cast call though.
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: "Our Hero" during Cast Call

Post by Ed the Bat »

Adding +NOSKIN didn't help. Though it seems to me that's not the problem; as I understand it, that flag prevents skins from being applied to Lardo, but it seems more like the engine is trying to use him AS a skin for DoomPlayer. I would think DoomPlayer is the one who would need the flag added for this to have an effect, meaning I'd have to break open the ZDoom resources and change it there, which is something I never want to have to do.

As for scaling, I can understand. I'll test it out later but I've already begun thinking that I can use TEXTURES to make the sprites themselves smaller without trying to scale the actor itself.

Personally, what I would really love is to be able to set the cast call to dynamically choose and display whatever playerclass was being played as, so everyone in the game would see 'himself' at the end. But I imagine that's a separate issue entirely, and likely not possible at this time.
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: "Our Hero" during Cast Call

Post by Ed the Bat »

I just tried editing my version of ZDoom.pk3 and giving DoomPlayer the +NOSKIN flag. It still didn't change things, so there must be more at work than I know.

Of course, even if this DID fix it, changing the internal classes like that would undoubtedly break a lot of other things, meaning it's definitely not a viable solution to the issue.
Locked

Return to “Editing (Archive)”