Expose level flags to ZScript

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

Expose level flags to ZScript

Postby JPL » Sat Mar 16, 2019 6:23 pm

I have some special handling in my mod Mr. Friendly for map07/E1M8/E4M6/E4M8-like cases where a monster's death does something to a sector, but it's all hard-coded based on the map name and doesn't work for maps that define eg "map07special" in their mapinfo. If a level's flags were exposed to ZScript, I could check them and handle such situations in a more robust way.
User avatar
JPL
 
 
 
Joined: 09 Apr 2012

Re: Expose level flags to ZScript

Postby Graf Zahl » Sat Mar 16, 2019 6:43 pm

I do not want to expose these old flags. They won't tell you the entire story anyway because you can also use the SpecialAction feature in which case you still won't be able to see if the map has special actions.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Expose level flags to ZScript

Postby JPL » Sat Mar 16, 2019 7:40 pm

Hmm, is there any other more robust way I could detect "this level has sectors that will change when (for example) Mancubi die" then?
User avatar
JPL
 
 
 
Joined: 09 Apr 2012

Re: Expose level flags to ZScript

Postby Graf Zahl » Sun Mar 17, 2019 2:41 am

Not yet. That's what I meant here. The flags are only a subset of means to change sectors. Even the special actions are only a subset. You'll also have to examine each monster's special, too, and let's not even start talking about scripts that trigger an action if a certain group of monsters is dead.

So as a first step here I need a bit of background info what precisely this mod wants to check.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Expose level flags to ZScript

Postby JPL » Sun Mar 17, 2019 1:25 pm

I don't care about my mod working with every map ever created, and ACS scripting especially means all bets are off re: knowing what a monster's death will trigger. I mainly just want to provide generic best-effort handling of map07/E1M8/E4M6/E4M8-like cases without having to hardcode those specific map slots + specific enemies, so that the player isn't locked out of continuing the level because eg a floor didn't lower. There will definitely be maps where it fails, my goal is the largest number of maps supported with the least amount of special case scripting, knowing that that's all careful tradeoff connected to complicated engine behaviors.

To provide some context, monsters aren't allowed to die in Mr Friendly, they just wander around so you can talk to them. Currently I handle map07 like cases from WorldThingSpawned, saying "if level.MapName is MAP07 and you're a mancubus or spider, set your health to 0 and call A_BossDeath (and then set your health back to full), so that any level specials fire and unblock the way forward".
User avatar
JPL
 
 
 
Joined: 09 Apr 2012

Re: Expose level flags to ZScript

Postby Graf Zahl » Sun Mar 17, 2019 1:39 pm

Ok. So in other words, what you really need is something telling the map to execute all non-level-ending special actions, correct?
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Expose level flags to ZScript

Postby JPL » Sun Mar 17, 2019 1:48 pm

Graf Zahl wrote:Ok. So in other words, what you really need is something telling the map to execute all non-level-ending special actions, correct?


Hmm, good idea. Yes I suppose that would do nicely.
User avatar
JPL
 
 
 
Joined: 09 Apr 2012


Return to Feature Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests