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

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

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

Postby RastaManGames » Sat Jul 31, 2021 11:00 am

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...
User avatar
RastaManGames
Syberian Doom Fan
 
Joined: 13 Mar 2014
Location: Russian Federation, Krasnoyarsk
Discord: ℝ𝕒𝕀π•₯π•’π•„π•’π•Ÿπ”Ύπ•’π•žπ•–π•€#4168
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

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

Postby Graf Zahl » Sat Jul 31, 2021 11:19 am

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.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

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

Postby axredneck » Sat Jul 31, 2021 1:32 pm

RastaManGames wrote:...
3) Monster Spawner on MAP30 spawning vanilla Doom monsters.
...

Do you use `replaces` keyword?
User avatar
axredneck
excuse me for my bad English
 
Joined: 11 Dec 2017
Location: Russia
Github ID: axredneck
Operating System: Other Linux 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

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

Postby Warden » Sun Aug 01, 2021 5:34 pm

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.
Warden
 
Joined: 24 May 2020

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

Postby Dan_The_Noob » Sun Aug 01, 2021 9:48 pm

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
User avatar
Dan_The_Noob
 
Joined: 07 May 2019
Twitch ID: Dan_The_Noob
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: nVidia with Vulkan support

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

Postby RastaManGames » Mon Aug 02, 2021 7:12 am

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.
User avatar
RastaManGames
Syberian Doom Fan
 
Joined: 13 Mar 2014
Location: Russian Federation, Krasnoyarsk
Discord: ℝ𝕒𝕀π•₯π•’π•„π•’π•Ÿπ”Ύπ•’π•žπ•–π•€#4168
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

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

Postby axredneck » Mon Aug 02, 2021 10:07 am

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`
User avatar
axredneck
excuse me for my bad English
 
Joined: 11 Dec 2017
Location: Russia
Github ID: axredneck
Operating System: Other Linux 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

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

Postby RastaManGames » Tue Aug 03, 2021 3:03 am

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?
User avatar
RastaManGames
Syberian Doom Fan
 
Joined: 13 Mar 2014
Location: Russian Federation, Krasnoyarsk
Discord: ℝ𝕒𝕀π•₯π•’π•„π•’π•Ÿπ”Ύπ•’π•žπ•–π•€#4168
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

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

Postby axredneck » Tue Aug 03, 2021 7:58 am

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.
User avatar
axredneck
excuse me for my bad English
 
Joined: 11 Dec 2017
Location: Russia
Github ID: axredneck
Operating System: Other Linux 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

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

Postby RastaManGames » Tue Aug 03, 2021 8:06 am

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...
User avatar
RastaManGames
Syberian Doom Fan
 
Joined: 13 Mar 2014
Location: Russian Federation, Krasnoyarsk
Discord: ℝ𝕒𝕀π•₯π•’π•„π•’π•Ÿπ”Ύπ•’π•žπ•–π•€#4168
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support


Return to Scripting

Who is online

Users browsing this forum: [_ilystra_] and 0 guests