Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
SynarchyBattleDoge

Issues making Lost Soul kind of monster with DecoHACK [MBF21]

Question

Sup. I continued working with monsters with DecoHACK but now there are some problems that doesn't let me create new lost souls for Doom. I'm trying to add the Lost Soul from the Famine monster in Realm667, so, I tried using the original Lost Soul code as a reference:
 

Spoiler

class LostSoul : Actor
{
	// Just the states part is relevant in my issue, complete code can be found in Zdoom wiki
	States
	{
	Spawn:
		SKUL AB 10 BRIGHT A_Look;
		Loop;
	See:
		SKUL AB 6 BRIGHT A_Chase;
		Loop;
	Missile:
		SKUL C 10 BRIGHT A_FaceTarget;
		SKUL D 4 BRIGHT A_SkullAttack;
		SKUL CD 4 BRIGHT;
		Goto Missile+2;
	Pain:
		SKUL E 3 BRIGHT;
		SKUL E 3 BRIGHT A_Pain;
		Goto See;
	Death:
		SKUL F 6 BRIGHT;
		SKUL G 6 BRIGHT A_Scream;
		SKUL H 6 BRIGHT;
		SKUL I 6 BRIGHT A_NoBlocking;
		SKUL J 6;
		SKUL K 6;
		Stop;
	}
}

There is the original code

 

So based on that code, I made one for the Famine soul in DecoHACK

Spoiler

thing 161 "FamineSoul"
{
	//$Color 5
	//$Category Monsters
	EdNum 15005

	Health 50
	Speed 12
	Radius 12
	Height 24

	+SHOOTABLE
	+SOLID
	+NOGRAVITY
	+FLOAT

	AttackSound "FMNATK"
	SeeSound "FMNSOL"
	PainSound "DMPAIN"
	DeathSound "FIRXPL"
	ActiveSound "DMACT"

	states
	{
		Spawn:
			HLLS AB 10 Bright A_Look
			Loop
		See:
			HLLS AB 6 Bright A_Chase
			Loop
		Missile:
			HLLS C 10 Bright A_FaceTarget
			HLLS D 4 Bright A_SkullAttack
			HLLS CD 4 Bright
			Goto Missile
		Pain:
			HLLS E 3 Bright
			HLLS E 3 Bright A_Pain
			Goto See
		Death:
			HLLS F 6 Bright
			HLLS G 6 Bright A_Scream
			HLLS H 6 Bright
			HLLS I 6 Bright A_Fall
			HLLS J 6
			HLLS K 6
			Stop
	}
}

 

 

At first, everything seems to be great, but Missile code has a difference, and I don't know if that's the issue, but DecoHACK doesn't allow me to add "Goto Missile+2" state.

Btw, if I run the DeHackEd patch with my wad, in the map the monsters work correctly, and also attack me (But they cannot low my health, idk why) but it's like random, but in any moment DSDA-Doom just crashes with the signal 8 (0x0000).

 

At first, I thought it was because of sound format, Idk why, but exporting those sounds gave me a different result, but they still wav and 11025 hz, alike the other custom sounds. Then, I tried making a Missile2 state, but I don't get really why missile state is like that, I see it kinda infinite. As I said, I tried adding Missile+2, but DecoHACK just doesn't let me. 

 

In Zdoom code, it has these flags: +MISSILEMORE +DONTFALL +NOICEDEATH +ZDOOMTRANS +RETARGETAFTERSLAM

But as I was expecting tho, neither DecoHACK nor MBF21 support these flags.

 

The game usually crashes just when they're close and trying to attack me, but sometimes when I shot them, it also crashed. So I commented A_SkullAttack lines and then they didn't crashed the game UNTIL I shot them.

 

So I'm really lost about the solution, because it looks like it might happen when they're close, but also when they're damaged, also when they're attacking but it just suddendly happens, the only clue that I may have is the missing Missile+2 state, but as I've said, DecoHACK just doesn't support this.

Share this post


Link to post

16 answers to this question

Recommended Posts

  • 1

You can add an arbitrary label into code like this

Blablahbla:
	SKUL A 4

And use it as an argument in goto.

You need to give a monster non-zero mass, so it doesn't divide by zero when hit. You can inherit from ordinary lost soul and only change what is needed.

 

Most codepointers called while skull is charging crash the game, so don't have that. That's all I remember from my brief brush with lost soul coding.

Share this post


Link to post
  • 0
Just now, ViolentBeetle said:

You can add an arbitrary label into code like this


Blablahbla:
	SKUL A 4

And use it as an argument in goto.

You need to give a monster non-zero mass, so it doesn't divide by zero when hit. You can inherit from ordinary lost soul and only change what is needed.

 

Most codepointers called while skull is charging crash the game, so don't have that. That's all I remember from my brief brush with lost soul coding.

Dude, I really hate when I finally got enough brave to ask, and while someone answers I just got it.

 

Anyways, I understood the problem, it probably was because of the abessive mass. Thanks!

Share this post


Link to post
  • 0
Just now, ViolentBeetle said:

You can add an arbitrary label into code like this


Blablahbla:
	SKUL A 4

And use it as an argument in goto.

You need to give a monster non-zero mass, so it doesn't divide by zero when hit. You can inherit from ordinary lost soul and only change what is needed.

 

Most codepointers called while skull is charging crash the game, so don't have that. That's all I remember from my brief brush with lost soul coding.

Ok, now I have a different problem.

Have you ever had problems with Lost Souls turning into unkillable ghosts? Xd

Share this post


Link to post
  • 0
9 minutes ago, SynarchyBattleDoge said:

Have you ever had problems with Lost Souls turning into unkillable ghosts? Xd

No, everyone I wanted killable were.

Share this post


Link to post
  • 0
Just now, ViolentBeetle said:

No, everyone I wanted killable were.

By some reason, in the same code here there is a probability where Souls turn into inmortal ghosts. They're unshootable and unkillable, and if they are counted in the kill count, they're going to be dead there, but still attacking in the game tho.

 

How do I inherit lost soul things into my lost soul? DecoHACK wasn't supposed to be intelligent with inheritance, purposely.

Share this post


Link to post
  • 0

Just add : thing <Whatever lost soul is, I don't remember> to inherit.

What's your current code is? Maybe I'll see something you've done wrong.

Share this post


Link to post
  • 0
Just now, ViolentBeetle said:

Just add : thing <Whatever lost soul is, I don't remember> to inherit.

What's your current code is? Maybe I'll see something you've done wrong.

Spoiler

thing 161 "FamineSoul"
{
	//$Color 5
	//$Category Monsters
	EdNum 15005

	Health 100
	Speed 8
	Radius 16
	Height 56
	PainChance 256
	Mass 100
	Damage 5

	+SHOOTABLE
	+SOLID
	+NOGRAVITY
	+FLOAT
	+NORADIUSDMG

	AttackSound "FMNATK"
	SeeSound "FMNSOL"
	PainSound "FMNSPA"
	DeathSound "FMNSDH"
	ActiveSound "FMNSAC"

	states
	{
		Spawn:
			HLLS AB 10 Bright A_Look
			Loop
		See:
			HLLS AB 6 Bright A_Chase
			Loop
		Missile:
			HLLS C 10 Bright A_FaceTarget
			HLLS D 4 Bright A_SkullAttack
			HLLS CD 4 Bright
			Goto Missile
		Pain:
			HLLS F 3 Bright
			HLLS F 3 Bright A_Pain
			Goto See
		Death:
			HLLS F 6 Bright 
			HLLS G 6 Bright A_Scream
			HLLS H 6 Bright A_RadiusDamage(20, 128)
			HLLS I 6 Bright
			HLLS J 6
			HLLS K 6
			Stop
	}
}

 

 

Here it is. I added NORADIUSDMG flag because that was the problem. But now they're like pretty immune to rockets. But they're not becoming ghosts.

 

Idk if you know about a better solution.

Share this post


Link to post
  • 0

I don't know how NORADIUSDMG would help, since by the time it does any radius DMG, it's dead. But I noticed you are looping the attack back to missile instead of going back to HLLS CD 4 like you probably should.

Share this post


Link to post
  • 0
Just now, ViolentBeetle said:

I don't know how NORADIUSDMG would help, since by the time it does any radius DMG, it's dead. But I noticed you are looping the attack back to missile instead of going back to HLLS CD 4 like you probably should.

The ghosts were created when they exploded and killed each other, by any reason, some died, some became ghosts, it's just random Ig. And I have that missile loop as the original Lost Soul does, but there it jumps into SkullAttack again. And I don't get why I should put attack loop again on HLLS CD4, wouldn't that create an infinite loop where the Soul is just going to hang around until player activates its pain state?

Share this post


Link to post
  • 0
Just now, SynarchyBattleDoge said:

The ghosts were created when they exploded and killed each other, by any reason, some died, some became ghosts, it's just random Ig. And I have that missile loop as the original Lost Soul does, but there it jumps into SkullAttack again. And I don't get why I should put attack loop again on HLLS CD4, wouldn't that create an infinite loop where the Soul is just going to hang around until player activates its pain state?

As far as I understand lost soul logic, it needs to avoid any codepointers while it charges until it stops charging and automatically return to Spawn state. What turns it into a ghost I have no clue however.

Share this post


Link to post
  • 0
Just now, ViolentBeetle said:

As far as I understand lost soul logic, it needs to avoid any codepointers while it charges until it stops charging and automatically return to Spawn state. What turns it into a ghost I have no clue however.

Ok, I gotta try, but how do I do that? Because no Missile+2 is allowed and also Goto HLLS CD 4 won't work.

Share this post


Link to post
  • 0
2 minutes ago, SynarchyBattleDoge said:

Ok, I gotta try, but how do I do that? Because no Missile+2 is allowed and also Goto HLLS CD 4 won't work.

Like I mentioned in the very first post, while the decohack expects you to put labels corresponding with the states, the labels can be anything. So you just add something like KeepFlying: in the same style as you do Spawn, See and Missile, and use it as an argument for Goto.

 

There's also an issue that by defaout MBF21 expects sprites to be called SP01 and so on, but I think it can be set to auto-replace somehow; I never learned how, but I got the impression you did that.

Share this post


Link to post
  • 0
Just now, ViolentBeetle said:

Like I mentioned in the very first post, while the decohack expects you to put labels corresponding with the states, the labels can be anything. So you just add something like KeepFlying: in the same style as you do Spawn, See and Missile, and use it as an argument for Goto.

 

There's also an issue that by defaout MBF21 expects sprites to be called SP01 and so on, but I think it can be set to auto-replace somehow; I never learned how, but I got the impression you did that.

If that's what you mean, I just saw how Doom listed sprites with 4 characters and then A0 or B0 and so on... Ig is that the issue with auto replacing sprites.

Share this post


Link to post
  • 0
13 minutes ago, SynarchyBattleDoge said:

If that's what you mean, I just saw how Doom listed sprites with 4 characters and then A0 or B0 and so on... Ig is that the issue with auto replacing sprites.

There's a limited set of 4 letter prefixes accepted, MBF21 expands them to SP00 through SP99 (99 seems to be bugged in some places though).

I believe there's a way to swap those prefixes, but not sure how.

Share this post


Link to post
  • 0

The unkillable-ghosts thing is probably because the A_RadiusDamage call is dealing damage to the FamineSoul itself, making it randomly jump to the Pain state. Try giving it the NORADIUSDMG flag -- or if you want the explosions to be able to kill other FamineSouls nearby (i.e. to set off a fun chain reaction), use A_AddFlags to give NORADIUSDMG in the death state just before calling A_RadiusDamage. That should fix that up.

Share this post


Link to post
  • 0
Just now, ViolentBeetle said:

There's a limited set of 4 letter prefixes accepted, MBF21 expands them to SP00 through SP99 (99 seems to be bugged in some places though).

I believe there's a way to swap those prefixes, but not sure how.

Then I'm not sure what do you mean. But here I'll leave the current DecoHack file if that may help you.

 

Just now, Xaser said:

The unkillable-ghosts thing is probably because the A_RadiusDamage call is dealing damage to the FamineSoul itself, making it randomly jump to the Pain state. Try giving it the NORADIUSDMG flag -- or if you want the explosions to be able to kill other FamineSouls nearby (i.e. to set off a fun chain reaction), use A_AddFlags to give NORADIUSDMG in the death state just before calling A_RadiusDamage. That should fix that up.

I did both, but by no reason I thought leaving the soul almost invulnerable to rockets was something different, so I'll let that monster like that, even if it is going to be hated. Thx btw!

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×