Zandronum Chat on our Discord Server Get the latest version: 3.1
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002715Zandronum[All Projects] Suggestionpublic2016-04-30 12:372024-01-02 04:37
ReporterDusk 
Assigned ToKaminsky 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version3.2Fixed in Version3.2 
Summary0002715: Scripting access to dmflags and co
DescriptionOne of the major uses of ConsoleCommand is to have mods set dmflags. So in order to remove ConsoleCommand we need to provide a proper way for mods to affect gameplay settings.

I managed to put together an interface that allows mods to specify values for gameplay settings while allowing the server admin to override the mods' choices. ACS can set a dmflag to be either enabled, disabled or leave it as it is (leave it as "default", which means it falls back to the actual CVar value).

Example:

script 1 OPEN
{
        SetGameplaySetting(GS_NOMONSTERS, GS_ENABLED);
        SetGameplaySetting(GS_INFINITEAMMO, GS_DISABLED);
        SetGameplaySetting(GS_NOJUMP, GS_DISABLED);
        SetGameplaySetting(GS_COMPAT_LIMITEDAIRMOVEMENT, GS_ENABLED);
}


This enables no-monsters mode and limited airmovement. It also disables infinite ammo and no jump.

Some issues, though:
* should the mod really be allowed to disable a setting like this? Maybe all we should provide is default and enabled.
* I still think that compat_limitedairmovement should be inverted. We should really decide on dmflags because this will sort of lock them
* The patch currently needs to change all declarations of the affected flag CVars, because C++03 doesn't have constructor deferring (I could add a constructor overload to FFlagCVar otherwise).
Additional Information'https://wiki.zandronum.com/SetGameplaySetting [^]'
Attached Files

- Relationships
has duplicate 0003558closed Letting modders change DM/DM2/Compat/Zandro etc. flags without ConsoleCommand 
child of 0001070newDusk Phasing out the dangerous ConsoleCommand for various additional/improved ACS commands 

-  Notes
User avatar (0014781)
Blzut3 (administrator)
2016-04-30 23:50

Summary of IRC discussion with Dusk:

I really question a need to change dmflags on the fly. The few that might make sense, for example infinite ammo, could make even more sense as a per-player effect (i.e. powerup) in my opinion. So with that said I think ACS is not the place to do this.

The primary purpose of this feature is to provide suggestions for server configuration (or server autoconfig) which is essentially what CMPGNINF does for invasion and single player. I see no reason this can't be logically used to provide map settings that the server operator can choose to opt out of.

On the other hand CMPGNINF and MAPINFO both serve the exact same purpose once you really think about it. While I personally kind of like the logical separation of types there's no technical reason for it. With that said I can get behind deprecating CMPGNINF and moving everything to MAPINFO.

ZDoom already allows maps to set compat flags through MAPINFO. These should not be ignored (not sure off hand if they can be ignored in ZDoom). There are some zacompat flags that can be easily argued to be ignorable, and I think this is where we should be talking about Skulltag/Zandronum's abuse of the "compatibility" flag. Most of the zacompat flags should be dmflags and few really old ones should really just be client options.

As for dmflags in MAPINFO, ZDoom already has nojump for example which of course the user/server operator can override, so there is precedent here. (Note: I don't think all the other dmflags need to be individual three way toggles. A blanket ignore is enough.)
User avatar (0014783)
Dusk (developer)
2016-05-01 10:21

The three-way toggle is for the mods. Basically the third option here is "disable this flag even if the cvar is enabled". Which I'm getting less and less convinced is a good idea.
User avatar (0022619)
Kaminsky (developer)
2023-01-01 16:38

3.2-alpha added the ACS function "SetGameplaySetting":'https://wiki.zandronum.com/SetGameplaySetting [^]'

This function works differently than what's shown above. The CVar to be set must be passed by name, and includes anything that's supported in the GAMEMODE lump except sv_maxlives and sv_maxteams:'https://wiki.zandronum.com/GAMEMODE#Gameplay_and_Compatibility_Settings [^]'

The new value should correspond with the CVar's data type. So, use whole numbers for int CVars, true/false for bool or flag CVars, and fixed-point numbers for float CVars.
User avatar (0022958)
Ru5tK1ng (updater)
2024-01-02 04:36

Tested the new ACS function with r231220. I was able to change specific flags with the function both online and offline. I was able to change locked game settings as defined with GAMEMODE lump. The function worked with the bool, int, and fixed-point data types.

Issue Community Support
This issue is already marked as resolved.
If you feel that is not the case, please reopen it and explain why.
Supporters: No one explicitly supports this issue yet.
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2016-04-30 12:37 Dusk New Issue
2016-04-30 12:38 Dusk Relationship added child of 0001070
2016-04-30 12:38 Dusk Assigned To => Dusk
2016-04-30 12:38 Dusk Status new => needs review
2016-04-30 12:41 Dusk Description Updated View Revisions
2016-04-30 23:50 Blzut3 Note Added: 0014781
2016-05-01 10:21 Dusk Note Added: 0014783
2018-10-21 12:23 Leonard Relationship added has duplicate 0003558
2023-01-01 16:38 Kaminsky Note Added: 0022619
2023-01-01 16:38 Kaminsky Assigned To Dusk => Kaminsky
2023-01-01 16:38 Kaminsky Status needs review => needs testing
2023-01-01 16:38 Kaminsky Target Version => 3.2
2023-01-01 16:38 Kaminsky Additional Information Updated View Revisions
2024-01-02 04:36 Ru5tK1ng Note Added: 0022958
2024-01-02 04:37 Ru5tK1ng Status needs testing => resolved
2024-01-02 04:37 Ru5tK1ng Resolution open => fixed
2024-01-02 04:37 Ru5tK1ng Fixed in Version => 3.2






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2024 MantisBT Team
Powered by Mantis Bugtracker