[Added] Block walking monsters only line flag.

Moderator: GZDoom Developers

Block walking monsters only line flag.

Postby Enjay » Sun Nov 29, 2020 2:12 pm

There are lots of blocking (and other) line flags available in UDMF for GZDoom
Image
But there is one that has not been implemented which I would find very useful, more so than some of the ones that do exist. Specifically, I am referring to "block walking monsters" so that a line could be set up that allows floating monsters to cross but not walking ones. I have had situations where such a feature would have been very useful on several occasions but I don't think, for example, that I have ever needed the block floating monster flag (not saying it wouldn't have its uses, just that I have never needed it).

At present, mappers resort to tricks like making a very narrow invisible deep trench that is deeper than a walking monster's step height, or sometimes invisible mid textures set to act as walkable textures are used if also blocking the player is desirable, or abusing the CANTLEAVEFLOORPIC actor flag. In fact, it's one of the few things left in mapping that requires a "hack" rather than being done with proper built-in features.

So it would be nice to have this flag if it can be done.

Thank you for reading.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: Block walking monsters only line flag.

Postby Rachael » Sun Nov 29, 2020 2:57 pm

I think this would be easy enough to add, I just need an "ok" to do it because it involves modifying the UDMF map reader.
User avatar
Rachael
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Debian-like Linux (Debian, Ubuntu, Mint, etc) 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Block walking monsters only line flag.

Postby Graf Zahl » Sun Nov 29, 2020 3:58 pm

Why do you need an 'ok'? Of course adding new properties requires modifying the map reader so what's so special here?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Block walking monsters only line flag.

Postby Rachael » Sun Nov 29, 2020 4:21 pm

Changing the UDMF spec?
User avatar
Rachael
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Debian-like Linux (Debian, Ubuntu, Mint, etc) 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Block walking monsters only line flag.

Postby Graf Zahl » Sun Nov 29, 2020 4:47 pm

Yeah, add a new entry to the spec, same as everybody who ever added something before had to do as well.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Block walking monsters only line flag.

Postby Enjay » Sun Oct 24, 2021 6:09 am

Much as it pains me to bump this, I just came across another mapping situation where this would be useful to me - a bunch of flying robots who should be able to enter/leave a dangerous area by passing through a forcefield, but normal humans would not want to enter the dangerous area, so they don't cross the forcefield.

If anyone feels like tackling this, it would be much appreciated.

BTW, I have tried various combinations of setting blocking types (e.g. monsters) and then specifically unblocking floating monsters but that didn't work.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: Block walking monsters only line flag.

Postby Rachael » Sun Oct 24, 2021 6:27 am

Damn. I can't believe I forgot about this for a whole damn year. lol. And this is one of those things that can be done pretty easily in under an hour too.
User avatar
Rachael
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Debian-like Linux (Debian, Ubuntu, Mint, etc) 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Block walking monsters only line flag.

Postby Gez » Sun Oct 24, 2021 6:47 am

Isn't this part of MBF21 and therefore [Already In]?
https://github.com/kraflab/mbf21/blob/m ... cs/spec.md
Code: Select allExpand view
Linedef Flags
Dec    Bit    Description
4096    12    Block land monsters
8192    13    Block players
Gez
 
 
 
Joined: 06 Jul 2007

Re: Block walking monsters only line flag.

Postby Enjay » Sun Oct 24, 2021 10:41 am

So it's already in?

OK, embarrassing question - how do I apply linedef flag numeric values directly to a line in UDB? I know how to do it in DeePsea, but I can't see anything obvious in UDB - only tick boxes and no numeric entry field. Do I have to add a custom field for the line or something? (In fact, I can't really find any meaningful end-user documentation for how to use MBF21.)
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: Block walking monsters only line flag.

Postby Gez » Sun Oct 24, 2021 11:36 am

In udmf, flags have been turned into separate Boolean variables instead of being bunched into a single flag field. The new flag (since "block players" was already in for a long, long while) is called "blocklandmonsters". So yes, add a custom field, Boolean type, with that name. Though it probably should be added to the UDB config files to save people from having to use the custom tab.
https://github.com/coelckers/gzdoom/com ... 1519c43633
Gez
 
 
 
Joined: 06 Jul 2007

Re: Block walking monsters only line flag.

Postby Enjay » Sun Oct 24, 2021 1:08 pm

Thanks for the help and explanation.

Image
Yes! it works perfectly. I do find it weird that it was something that was omitted from the original UDMF setup where flying monsters were explicitly blockable but walking ones were not, but it can be done now. :biggrin:

I agree that it would be more useful to be added to the UDB config files. The custom tab is useful, but cumbersome compared to a tick box. I'll open an issue/request on UDB's github for it. [edit] Done [/edit] [edit]and it's been added. Cheers Boris. :thumb: [/edit]

Just thinking ahead, I take it that there is not support for Line_SetBlocking... or maybe 4096 can be used (or a flag defined for it)? I'll have to check. [edit] No, that doesn't seem to work. [/edit]
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: Block walking monsters only line flag.

Postby drfrag » Mon Oct 25, 2021 3:22 am

I've merged this but not the MBF21 stuff. It's preferable that someone (Enjay for instance) tries it.
https://github.com/drfrag666/gzdoom/commits/g3.3mgw

BTW in xlat/defines.i it says ML_BLOCKLANDMONSTERS and not ML2_BLOCKLANDMONSTERS i guess it doesn't matter.
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666

Re: Block walking monsters only line flag.

Postby Graf Zahl » Mon Oct 25, 2021 3:29 am

No, in this context it does not matter and the distinction isn't even desired.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Block walking monsters only line flag.

Postby Enjay » Mon Oct 25, 2021 6:03 am

drfrag wrote:I've merged this but not the MBF21 stuff. It's preferable that someone (Enjay for instance) tries it.

Seems to work just fine. :thumb: The attached simple demo shows that lost souls and cacodemons (and the player) can move out and in to the central area whereas the imps and hell knights cannot. It works just fine in GZDoom and in the latest git build of LZDoom.

BlockLand.pk3

The MAPINFO is primarily there to stop infighting because, without it, the enemies were so preoccupied with killing each other that they hardly bothered to leave the central area even if they could.
You do not have the required permissions to view the files attached to this post.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: Block walking monsters only line flag.

Postby drfrag » Mon Oct 25, 2021 6:16 am

Graf Zahl wrote:No, in this context it does not matter and the distinction isn't even desired.

Okay then.
Enjay wrote:Seems to work just fine.

Fine thanks.
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests