While looking something up in GZDoom.pk3 for someone, I noticed this new keyword - I immediately tested it to see if it worked outside of GZDoom.pk3, and it does. So, is it okay for mods to use it?
(This is more of a question for Graf, btw, since he's pretty much the only one who can really say if it's okay for mods to use it)
Tangentially related: Is it really necessary for "property prefix: <identifier>;" to be locked to GZDoom.pk3? That would be really useful for mods with somewhat lenghty base actor class names...
Is the new flagdef property okay for mods to use?
Moderator: GZDoom Developers
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
- phantombeta
- Posts: 2084
- Joined: Thu May 02, 2013 1:27 am
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: Brazil
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49056
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Is the new flagdef property okay for mods to use?
Yes, it is.phantombeta wrote:While looking something up in GZDoom.pk3 for someone, I noticed this new keyword - I immediately tested it to see if it worked outside of GZDoom.pk3, and it does. So, is it okay for mods to use it?
The main problem here is that careless use of this feature can cause serious problems with property visibility. I only needed it because PlayerPawn properties were historically prefixed with 'player.' which in hindsight was a bad choice. The feature is also not very robustly implemented which with the limitation in place is ok, but not for general use.Tangentially related: Is it really necessary for "property prefix: <identifier>;" to be locked to GZDoom.pk3? That would be really useful for mods with somewhat lenghty base actor class names...
- Matt
- Posts: 9696
- Joined: Sun Jan 04, 2004 5:37 pm
- Preferred Pronouns: They/Them
- Operating System Version (Optional): Debian Bullseye
- Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
- Contact:
Re: Is the new flagdef property okay for mods to use?
Is there a significant functional difference between the new flagdef property and doing boolean properties the old-fashioned way, i.e. if I've already got a few cases of the latter is it worth converting them?
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49056
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Is the new flagdef property okay for mods to use?
Flags consume less memory, because you can pack 32 flags into a single integer.
Aside from that, it was added so that they can defined with flag syntax.
Aside from that, it was added so that they can defined with flag syntax.
- Matt
- Posts: 9696
- Joined: Sun Jan 04, 2004 5:37 pm
- Preferred Pronouns: They/Them
- Operating System Version (Optional): Debian Bullseye
- Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
- Contact:
Re: Is the new flagdef property okay for mods to use?
So how do you use this? I can't come up with any variant on the syntax "flagdef CheatNotWeapon: WeaponFlags, 18;" that even compiles.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49056
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Is the new flagdef property okay for mods to use?
I cannot tell you what you did wrong. The syntac is 'flagdef <flagname>, <variablename>, bitnumber.
The variable must be defined explicitly before defining a flag.
The variable must be defined explicitly before defining a flag.
- Matt
- Posts: 9696
- Joined: Sun Jan 04, 2004 5:37 pm
- Preferred Pronouns: They/Them
- Operating System Version (Optional): Debian Bullseye
- Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
- Contact:
Re: Is the new flagdef property okay for mods to use?
Code: Select all
int hdwflags;
flagdef weaponbusy,hdwflags,1;
Code: Select all
Unexpected integer constant
Expecting identifier