[4.5.0] - AirControl does not work on DefaultMap

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: [4.5.0] - AirControl does not work on DefaultMap

Re: [4.5.0] - AirControl does not work on DefaultMap

by Blue Shadow » Sun Dec 20, 2020 11:35 am

SanyaWaffles wrote:So I suppose the way defaultmap works should be added to the wiki.
That's been addressed.

Re: [4.5.0] - AirControl does not work on DefaultMap

by SanyaWaffles » Sun Dec 20, 2020 12:12 am

Okay, using gamedefaults works as intended. Thanks for clarifying that Graf.

So I suppose the way defaultmap works should be added to the wiki.

I suppose this is a chalk up of user error. Sorry about that.

Re: [4.5.0] - AirControl does not work on DefaultMap

by Graf Zahl » Thu Dec 17, 2020 4:24 am

That got added when I exported Hexen's default map settings to MAPINFO. That was 12 years ago when I encountered the same problem as you did now, i.e. that 'defaultmap' is a non-cumulative per-file setting and couldn't change it because existing mods were depending on this trait.

Re: [4.5.0] - AirControl does not work on DefaultMap

by SanyaWaffles » Thu Dec 17, 2020 4:03 am

Wait, so gamedefaults is a thing? I completely overlooked that.

I don't remember that being on the wiki last I checked. When the heck did that get added?

Re: [4.5.0] - AirControl does not work on DefaultMap

by Graf Zahl » Thu Dec 17, 2020 1:12 am

'Defaultmap 'is deliberately a per-file definition. If you need a global unconditional override use 'gamedefaults' instead. Its settings persist across files.

Re: [4.5.0] - AirControl does not work on DefaultMap

by SanyaWaffles » Wed Dec 16, 2020 11:18 pm

now that I actually have gotten a chance to play with the workaround, it seems everything in the defaultmap block is cleared as you said. Including the pixel ratio settings.

With the workaround everything is at the 1.0 pixel ratio, bnefore it was stretched.

So nothing was working.

I suppose this is just how Defaultmap is by design then?

Seems kind of bad for organization IMO, I prefer to keep things neat.

This way works, but I'll need to adjust it for all projects. Not a big deal, but I wonder how many projects were affected by this.

Re: [4.5.0] - AirControl does not work on DefaultMap

by Rachael » Wed Dec 16, 2020 11:07 pm

Okay, thanks.

From what you said here, it actually seems it's not a load order issue, so I may have been wrong about that. Seems like the defaultmap block gets cleared on every include.

Re: [4.5.0] - AirControl does not work on DefaultMap

by SanyaWaffles » Wed Dec 16, 2020 10:54 pm

Moving it into the same file (in this case, mapinfo/maps.txt) fixed it. Definitely a load order issue.

Moving it to the beginning of ZMAPINFO.txt did not fix it and exhibited the same problem as before.

Re: [4.5.0] - AirControl does not work on DefaultMap

by Rachael » Wed Dec 16, 2020 10:46 pm

If this is what I think it is - then there is definitely a bug here, but it's not exactly what we originally thought it was. Try moving the defaultmap block to the base zmapinfo.txt at the top of the file - if that works, then there's definitely an issue with include order parsing. Also, try fudging around with the include order too - put it both before and after your map includes.

Re: [4.5.0] - AirControl does not work on DefaultMap

by SanyaWaffles » Wed Dec 16, 2020 10:25 pm

Actually, now that I notice it, UsePlayerStartZ isn't carried over either. One of the later maps had at one point a higher start position.

However, others work fine, like Exitpic and Enterpic.

I don't know if Gravity works or not...

As I said, I do use include directives.

The actual ZMAPINFO is this:

Code: Select all

include "mapinfo/gi.txt"

include "mapinfo/damage.txt"

include "mapinfo/doomednum.txt"

include "mapinfo/spawnid.txt"

include "mapinfo/defaultmap.txt"

include "mapinfo/episodes.txt"

include "mapinfo/skills.txt"

include "mapinfo/cluster.txt"

include "mapinfo/titlemap.txt"

include "mapinfo/maps.txt"

include "mapinfo/intro.txt"

include "mapinfo/end_ep1.txt"

include "mapinfo/end_ep2.txt"

include "mapinfo/preboss3.txt"

include "mapinfo/end_ep3a.txt"

include "mapinfo/end_ep3b.txt"
And the defaultmap block in "mapinfo/defaultmap.txt"

Code: Select all

defaultmap
{
	Cluster = 1
	
	// Time
	Par = 70
	SuckTime = 0	// We don't need no stinkin SuckTime

	// Physics...
	AirControl = 0.6
	Gravity = 768
	
	Sky1 = "SKY1"
	
	Music = ""
	
	ExitPic = "INTERPIC"
	EnterPic = "INTERPIC"
	
	// Lightning/Appearance of Level
	SmoothLighting
	ClipMidTextures
	
	UsePlayerStartZ

	// Player Properties
	AllowJump
	AllowCrouch
	AllowFreelook
	AirSupply = 0

	// Monster/Activation Properties
	LaxMonsterActivation
	MissilesActivateImpactLines
	
	// OpenGL Only Options (GZDoom)
	PixelRatio = 1.0	// 1.2 is Mode X (320x200 streched vertically to 320x240)
	/* *************************
	0 (Standard): bright lighting model and stronger fading in bright sectors.
	1 (Bright): bright lighting model and weaker fading in bright sectors.
	2 (Doom): dark lighting model and weaker fading in bright sectors but brightness nearby (req. GLSL)
	3 (Dark): dark lighting model and weaker fading in bright sectors.
	4 (Legacy): Emulates lighting of Legacy 1.4's GL renderer.
	8 (Software): Emulates Doom software lighting, Requires GLSL 1.30 or greater (OpenGL 3.0+).
	************************* */
	LightMode = 0
}

Re: [4.5.0] - AirControl does not work on DefaultMap

by Arctangent » Wed Dec 16, 2020 9:46 pm

Do other properties break when put in this specific defaultmap?

Because if this is in a separate MAPINFO than the actual map definitions, I could imagine this being a load order thing where this defaultmap entry is being processed after all the map entries.

Re: [4.5.0] - AirControl does not work on DefaultMap

by SanyaWaffles » Wed Dec 16, 2020 9:20 pm

As far as I know, none are being manipulated. I don't call level.aircontrol or use SetAirControl() or any of the sort directly in SHDX's code, and I recall it being an issue early on.

I'm not using any other mapinfo properties that seem to break.

I'm not really sure what's going on here, me and the dev team have been scratching our heads.

The only thing I can think of is it's related to another bug that Nash and I discovered, but I haven't been able to make a minimal example of because it requires an IWAD/IPK3 involving CVARDEFS. Basically alot of CVARs don't seem to be set by default when you use them (like disabiling texture filtering doesn't work for me).

I dunno, that's all I got.

Re: [4.5.0] - AirControl does not work on DefaultMap

by Rachael » Wed Dec 16, 2020 7:52 pm

Are there any other properties which break in a similar fashion, that you know about? I am looking at the code here (in GZDoom) and I cannot find the exact cause of this, but I am seeing a lot of conditionals which either change or involve the variable it gets saved to after it is read from mapinfo.

I think what is also notable is the following actions will affect Level->aircontrol directly, so it's possible one of these could be tripping up the system:
  • Any possible SetAirControl() ACS calls
  • Any changes to sv_aircontrol cvar
  • Changing Level.aircontrol directly using ZScript
  • Loading/saving a game (possibly even hub transitions)

Re: [4.5.0] - AirControl does not work on DefaultMap

by SanyaWaffles » Wed Dec 16, 2020 5:10 pm

that's how I use it though and it doesn't work as intended with aircontrol - defining it before. I'm using includes and a standalone IPK3 if that helps anything.

It also doesn't work with adddefaultmap.

https://www.dropbox.com/s/u3gxxnuwbygpp ... .ipk3?dl=1

It becomes apparent with this build of SHDX which has an aircontrol in defaultmap but not in the subsequent definitions.

Re: [4.5.0] - AirControl does not work on DefaultMap

by Blue Shadow » Wed Dec 16, 2020 10:56 am

That's not how the defaultmap block is to be used:
ZDoom Wiki wrote:defaultmap { properties }

Sets the defaults that will be automatically used for all subsequent map definitions. It resets the default information so anything specified in previous defaultmap sections is lost.

Top