Mikoportal Compatibility Thing

Post your example zscripts/ACS scripts/etc here.
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.
Post Reply
User avatar
Kinsie
Posts: 7399
Joined: Fri Oct 22, 2004 9:22 am
Graphics Processor: nVidia with Vulkan support
Location: MAP33
Contact:

Mikoportal Compatibility Thing

Post by Kinsie »

Download!

These scripts make seperate attempts at adding support for the Mikoportal vanilla trick to GZDoom via ZScript nonsense.

mikocompat_class.wad replaces the player class with one that imitates the wraparound effect. It seems to work better, but also it replaces the player class so it probably won't play nice with gameplay mods et. al. I tried to move the functionality to an inventory item, but never figured it out.

mikocompat_post.wad uses LevelPostProcessor to change the friction settings of sectors that are set up for Mikoportals. I admittedly kind of fudged the numbers a bunch, though...

Both are imperfect in different ways, but someone way smarter than me can hopefully take this cue and make them so.

Tested with the original demo wad (miko_01.wad) and Jon's example map (brexit.wad).

I take no responsibility for any source port authors, level designers or deities horrified by this file's presence. :wink:
User avatar
Fishytza
Posts: 781
Joined: Wed Feb 23, 2011 11:04 am
Preferred Pronouns: No Preference
Contact:

Re: Mikoportal Compatibility Thing

Post by Fishytza »

I hope you don't mind if I take a crack at the compatibility thing.

I've managed to make it work (more or less) with just a event handler and a thinker. I was going to use an inventory item for this (so it doesn't have to be a custom player class) but for some reason any attempts to give the voodoo dolls an item just ends up in the real player's inventory. So to hell with that I'm using a simple thinker instead.

I have tested this with both brexit.wad and miko_01.wad. It seems to work as expected.
Also made a test map, trying to replicate the infinite falling more than the "conveyor belt voodoo doll scripting" trick.

I've tried to make it behave as close as it would in Chocolate Doom.
fcw_mikocompat-take2.pk3
Contains the ZScript
(1.41 KiB) Downloaded 16 times
mikoportaltest.wad
Replaces MAP01. Try to get the Soulsphere and shoot the shotgunner and see what happens!
(3.32 KiB) Downloaded 25 times

The test map is in the old Doom format so it runs in Chocolate Doom too.

EDIT: I forgot to mention this affects every actor on the map, not just the player.
EDIT2: Replaced the first attachment with the "take2" version
Last edited by Fishytza on Sun Dec 18, 2022 4:31 am, edited 1 time in total.
User avatar
Fishytza
Posts: 781
Joined: Wed Feb 23, 2011 11:04 am
Preferred Pronouns: No Preference
Contact:

Re: Mikoportal Compatibility Thing

Post by Fishytza »

Did some more testing. For cases of infinite falling it works pretty well.

But for conveyor belt voodoo doll scripting replacing this bit:

Code: Select all

// Keep the Z velocity reasonable - if we don't do this then we'll
// start floating downward very slowly (despite the downward velocity being much greater)
// No, I'm not kidding.
owner.vel.z = max(owner.vel.z, -180);

if (owner.ceilingZ - owner.floorZ - 16 < owner.height)
{
	//For miko_01.wad's voodoo doll - if the vertical space is too small
	//then just keep it slightly above its "floorz" - this allows it to
	//slide across the floor.
	owner.SetZ(owner.floorZ + 1);
}
else if (owner.pos.z + owner.vel.z <= FLOOR_THRESHOLD && owner.pos.xy != owner.spawnPoint.xy)
{
	//For miko_01.wad's health bonus next to the voodoo doll - check if the actor has
	//moved away from its "spawnPoint" before setting Z.
	//If this isn't done, that health bonus would start teleporting to the ceiling constantly.
	//
	//Notice the "owner.pos.z + owner.vel.z" check. We're trying to teleport to the ceiling
	//*before* hitting the floor - that way we avoid hearing DoomGuy's unf sound
	//and the result is much closer to what you would get in Chocolate Doom.
	owner.SetZ(owner.ceilingZ);
}
with this:

Code: Select all

if (owner.pos.z <= FLOOR_THRESHOLD)
    owner.SetZ(owner.ceilingZ);
Makes it go faster, at least on brexit.wad (which is closer to Chocolate Doom behaviour)
Basically how Kinsie did it.

Oh boy.
User avatar
Fishytza
Posts: 781
Joined: Wed Feb 23, 2011 11:04 am
Preferred Pronouns: No Preference
Contact:

Re: Mikoportal Compatibility Thing

Post by Fishytza »

Okay, this is the same as before but should make the voodoo doll scripting events a bit faster for brexit.wad
fcw_mikocompat-take2.pk3
(1.41 KiB) Downloaded 31 times

Unless something else comes up, I think I'm done here.
Post Reply

Return to “Script Library”