[2.1.4] RandomSpawners, the customizable/classic way

Handy guides on how to do things, written by users for users.

Moderators: GZDoom Developers, Raze Developers

Forum rules
Please don't start threads here asking for help. This forum is not for requesting guides, only for posting them. If you need help, the Editing forum is for you.
Post Reply
User avatar
TDRR
Posts: 815
Joined: Sun Mar 11, 2018 4:15 pm
Operating System Version (Optional): Manjaro/Win 8.1
Graphics Processor: Intel (Modern GZDoom)
Location: Venezuela

[2.1.4] RandomSpawners, the customizable/classic way

Post by TDRR »

RandomSpawners, they are certainly a mixed blessing. On one hand, it transfers all map-set flags to the spawned object, for max compatibility with maps. But on the other hand, they aren't very customizable and can only spawn one object at a time without the ability to alter it's position.

But what if we went back to the old days before there were RandomSpawners to find a more customizable method? Well, that's exactly what i will do today.

Since it is a method from those days, i also took the chance to do a ZDoom Classic (2.1.4) compatible version.
Spoiler: Simple method (RECOMMENDED)
Spoiler: GZDoom 1.8.6 to current version
This GZDoom 1.8.6 method works with all modern versions too, i tried to make the spoiler title self-explanatory, but apparently it isn't obvious enough.
Spoiler: ZDoom 2.1.4 (OLD) version
Last edited by TDRR on Tue Dec 04, 2018 9:57 am, edited 4 times in total.
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: [2.1.4] RandomSpawners, the customizable/classic way

Post by Blue Shadow »

I have to admit, this tutorial makes me cringe in a way. Instead of teaching people how to do things the right way, it teaches you how to do things the inefficient and hacky way. And for what? For the sake of compatibility with ancient versions of ZDoom and GZDoom.

Missed opportunity, I'd say.
User avatar
TDRR
Posts: 815
Joined: Sun Mar 11, 2018 4:15 pm
Operating System Version (Optional): Manjaro/Win 8.1
Graphics Processor: Intel (Modern GZDoom)
Location: Venezuela

Re: [2.1.4] RandomSpawners, the customizable/classic way

Post by TDRR »

Blue Shadow wrote:I have to admit, this tutorial makes me cringe in a way. Instead of teaching people how to do things the right way, it teaches you how to do things the inefficient and hacky way. And for what? For the sake of compatibility with ancient versions of ZDoom and GZDoom.

Missed opportunity, I'd say.
I think you missed the point, RandomSpawner doesn't allow you to set your own offsets from the calling actor and only restricts you to one item at a time, nor allows you to have toggleable spawns (Want do disable that nasty monster or that boring weapon from spawning? No problem!)

It really wasn't for compatibility with ancient versions of ZDoom, but since the method already existed for that old ZDoom i added it, after all i'm going to be using it for a TC i'm working on (don't worry it will be 2 separate versions for modern and classic (G)ZDoom)

Now that you mention it, though, i may add a tutorial for the normal version of RandomSpawners so people don't get misleaded thinking this is the way they should do it for simple random spawns with no offsets or anything.
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: [2.1.4] RandomSpawners, the customizable/classic way

Post by Blue Shadow »

TDRR wrote:I think you missed the point, RandomSpawner doesn't allow you to set your own offsets from the calling actor and only restricts you to one item at a time, nor allows you to have toggleable spawns (Want do disable that nasty monster or that boring weapon from spawning? No problem!)
Use ZScript, then. The RandomSpawner class is fully exported, which means you could write your own spawners using its code.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [2.1.4] RandomSpawners, the customizable/classic way

Post by Graf Zahl »

Blue Shadow wrote: Missed opportunity, I'd say.

I have to agree. This will teach people all the wrong ways to do stuff, and in the end make things harder for everybody because hacky workarounds later always end up causing problems.
User avatar
TheMightyHeracross
Posts: 2100
Joined: Sun Aug 18, 2013 9:41 am
Location: Philadelphia, PA

Re: [2.1.4] RandomSpawners, the customizable/classic way

Post by TheMightyHeracross »

There's no reason for ZDoom 2.1.4 compatibility, even Zandronum is more up to date than that.
User avatar
TDRR
Posts: 815
Joined: Sun Mar 11, 2018 4:15 pm
Operating System Version (Optional): Manjaro/Win 8.1
Graphics Processor: Intel (Modern GZDoom)
Location: Venezuela

Re: [2.1.4] RandomSpawners, the customizable/classic way

Post by TDRR »

Okay, if Graf said it, then maybe he's right.

Anyways i will use this in my mods (but sparingly and when necessary) because i already know what are the downsides and (few) upsides of this method.
I added warnings to the main post. If you still don't want this code anywhere near these forums, then alright, delete this thread.

And yeah i know there's not much reason to do ZDoom 2.1.4 compatibility, but i want to do it and it doesn't harm anyone, so why not? I already have a couple 2.1.4 compatible mods but i won't upload them for reasons already said in this thread.
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3141
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: [2.1.4] RandomSpawners, the customizable/classic way

Post by drfrag »

TDRR wrote:It runs on more computers, for instance, a 486 40MHz is able to run ZDoom Classic at 320x200 in low detail mode.
Really? I got a report from someone saying it ran at 10 fps on a 100 MHz DX4 and the last version is not even optimized for 486. But may be without sound and 4x4 low detail mode... :mrgreen:
But hey i think i should release a new version with a new 3x1 low detail mode, that really would be useful. :lol:
And the new Normal Nx scalers too. Besides i want to revert a few things.
I could update it to 2.1.7 but there was a nasty crash related to some decorate thing.
But that engine was mostly to play limit removing wads, runs on win95 and GL 1.1 (not all cards) and has the 1.0.17a renderer. Also has a preliminary previously unreleased D3D backend. I added some cheats and resurrect fixes among other things, i think i included wad compatibility fixes too.
User avatar
TDRR
Posts: 815
Joined: Sun Mar 11, 2018 4:15 pm
Operating System Version (Optional): Manjaro/Win 8.1
Graphics Processor: Intel (Modern GZDoom)
Location: Venezuela

Re: [2.1.4] RandomSpawners, the customizable/classic way

Post by TDRR »

drfrag wrote:
TDRR wrote:It runs on more computers, for instance, a 486 40MHz is able to run ZDoom Classic at 320x200 in low detail mode.
Really? I got a report from someone saying it ran at 10 fps on a 100 MHz DX4 and the last version is not even optimized for 486. But may be without sound and 4x4 low detail mode... :mrgreen:
But hey i think i should release a new version with a new 3x1 low detail mode, that really would be useful. :lol:
And the new Normal Nx scalers too. Besides i want to revert a few things.
I could update it to 2.1.7 but there was a nasty crash related to some decorate thing.
But that engine was mostly to play limit removing wads, runs on win95 and GL 1.1 (not all cards) and has the 1.0.17a renderer. Also has a preliminary previously unreleased D3D backend. I added some cheats and resurrect fixes among other things, i think i included wad compatibility fixes too.
I never said it ran well :D

Thanks for the heads up on ZDoom Classic, really hope you update to 2.1.7.
User avatar
StroggVorbis
Posts: 866
Joined: Wed Nov 08, 2017 4:23 pm
Graphics Processor: nVidia with Vulkan support
Location: Germany

Re: [2.1.4] RandomSpawners, the customizable/classic way

Post by StroggVorbis »

@TDRR

Thanks for directing me here, but I have one question. Forgive my ignorance, but why does CustomSpawner inherit from Inventory and not CustomInventory?
User avatar
TDRR
Posts: 815
Joined: Sun Mar 11, 2018 4:15 pm
Operating System Version (Optional): Manjaro/Win 8.1
Graphics Processor: Intel (Modern GZDoom)
Location: Venezuela

Re: [2.1.4] RandomSpawners, the customizable/classic way

Post by TDRR »

DabbingSquidward wrote:@TDRR

Thanks for directing me here, but I have one question. Forgive my ignorance, but why does CustomSpawner inherit from Inventory and not CustomInventory?
There's no need to, Inventory works perfectly fine for this purpose. Also, i think custominventory adds a minuscule amount of CPU burden so why bother.
Post Reply

Return to “Tutorials”