Page 1 of 1

[ZScript] Monster Replacement On E1M8/MAP07 & Etc.

PostPosted: Sat Jul 31, 2021 11:00 am
by RastaManGames
Few days ago i started making my own monster pack on ZScript, but it only has modern DECORATE or something...
I have very rough replacer, that replace every Doom monster with one of several recently created actors with it's own chances.
Only Commander Keen, Romero's Head, Monster Spawner and Monster Target was not touched at all.

Now i have several problems:
1) MAP07 now has broken scripts ('cause there is no Mancubus now).
2) Either E1M8 now has same problem too, 'cause there is no any Barons Of Hell.
3) Monster Spawner on MAP30 spawning vanilla Doom monsters.

What do i need to know:
Can i replace all 18 vanilla Doom monsters with my own w/o breaking map special scripts?
Also i want to replace Monster Spawner roster as well.

Sorry for very dumb question about elementary thing...

Re: [ZScript] Monster Replacement On E1M8/MAP07 & Etc.

PostPosted: Sat Jul 31, 2021 11:19 am
by Graf Zahl
Your replacementd all will have to implement proper boss death semantics, i.e. they need the BOSSDEATH flag *and* they need to call A_BossDeath in their death animation. If this is done they should trigger the actions.

Re: [ZScript] Monster Replacement On E1M8/MAP07 & Etc.

PostPosted: Sat Jul 31, 2021 1:32 pm
by axredneck
RastaManGames wrote:...
3) Monster Spawner on MAP30 spawning vanilla Doom monsters.
...

Do you use `replaces` keyword?

Re: [ZScript] Monster Replacement On E1M8/MAP07 & Etc.

PostPosted: Sun Aug 01, 2021 5:34 pm
by Warden
If you're replacing monsters via CheckReplacement, you also need to make use of the CheckReplacee event if you want them to trigger boss actions.

Re: [ZScript] Monster Replacement On E1M8/MAP07 & Etc.

PostPosted: Sun Aug 01, 2021 9:48 pm
by Dan_The_Noob
the only map i've had issue with was the cyberdemon in Tower of Babel, which if it isn't replaced correctly will just instantly end the map

Re: [ZScript] Monster Replacement On E1M8/MAP07 & Etc.

PostPosted: Mon Aug 02, 2021 7:12 am
by RastaManGames
axredneck wrote:Do you use `replaces` keyword?


I am not really sure, `cause i am using some tricky method with ZMAPINFO DoomEdNums replacement that are referred to ZSCRIPT class with some kind of DropItem wall.

Re: [ZScript] Monster Replacement On E1M8/MAP07 & Etc.

PostPosted: Mon Aug 02, 2021 10:07 am
by axredneck
RastaManGames wrote:
axredneck wrote:Do you use `replaces` keyword?


I am not really sure, `cause i am using some tricky method with ZMAPINFO DoomEdNums replacement that are referred to ZSCRIPT class with some kind of DropItem wall.


Then try to use `replaces` in ZScript. Something like `class MyPiggyMonster : Demon replaces Demon`

Re: [ZScript] Monster Replacement On E1M8/MAP07 & Etc.

PostPosted: Tue Aug 03, 2021 3:03 am
by RastaManGames
axredneck wrote:Then try to use `replaces` in ZScript. Something like `class MyPiggyMonster : Demon replaces Demon`


Thanks for the tip! Now special map scripts (on MAP07 and etc.) are working now.

There is still one little tricky thing to do... When i am playing with one specific mod (this is "r6w.pk3"), monster replacements from it are higher in priority for MonsterSpawner on MAP30 (and for ACS scripts too) than mine. Is there any foxy method to rise my monster replacement in priority for GZDoom?

Re: [ZScript] Monster Replacement On E1M8/MAP07 & Etc.

PostPosted: Tue Aug 03, 2021 7:58 am
by axredneck
RastaManGames wrote:
axredneck wrote:Then try to use `replaces` in ZScript. Something like `class MyPiggyMonster : Demon replaces Demon`

Thanks for the tip! Now special map scripts (on MAP07 and etc.) are working now.

It was my suggestion for MAP30 but good to know that it works for MAP07 too.
RastaManGames wrote:There is still one little tricky thing to do... When i am playing with one specific mod (this is "r6w.pk3"), monster replacements from it are higher in priority for MonsterSpawner on MAP30 (and for ACS scripts too) than mine. Is there any foxy method to rise my monster replacement in priority for GZDoom?

Try to load mods in different order.

Re: [ZScript] Monster Replacement On E1M8/MAP07 & Etc.

PostPosted: Tue Aug 03, 2021 8:06 am
by RastaManGames
axredneck wrote:Try to load mods in different order.


Sad, but both orders (my mod -> r6w and r6w -> my mod) gives me same result: all monsters that are spawned from cubes are r6w variants. Same trouble with ACS scripts on custom maps, that are spawning r6w enemies for me, not my replacements...
UPD: Loading only my replacements gives a nice result without any problems. I still don't know how to mess with proprieties of replacements...