Closed DelusionalBear closed 5 years ago
Same goes for floats.
This works for me:
@PointClass base(Appearflags, Targetname, Target) size(-8 -8 -32, 8 8 32) = puzzle_piece : "Puzzle piece" [ spawnflags(Flags) = [ 1 : "Spawn" : 0 2 : "Floating" : 2 4 : "Auto get" : 0 ] puzzle_id(choices) : "Puzzle id" : : "keep3" = [ "keep3" : "Mill key" "cskey" : "Castle key" "scrol" : "Disrupt Magic Scroll" ] message(string) : "Message" netname(string) : "Puzzle piece name" //Name of piece, displayed when picked up style(integer) : "Light Style" ]
No idea how or why but when using strings with (choices) the double : : is required to make it work.
@eGax its working fine with only one ':' for integers tho, so this is definitely some kind of error.
Also, you can create default string value hints/comments for keys as well inside the : : like this modified line from your puzzle_piece entity setup above like:
message(string) : "Message" : "Hello World ! ! !" : "..a message to the player"
I know about default values, but here is an interesting idea - what if that ": :" is being treated as an empty default value?
...umm it is as far as I know. You can use then in integers.
So this line from obj_ballista
by default is:
cnt(integer) : "Degrees of pitch off start" : 30
Changing to this make it's default value blank:
cnt(integer) : "Degrees of pitch off start" : : "def=30"
Integers are working fine, 30 is being read as default value and long description is just skipped. But with strings and floats its actually expecting long description to be present, otherwise it doesn't load FGD at all.
edited to remove offensive (it seems) bits.
So I'm trying to edit Hexen II .fgd file and add a drop down list for "puzzle_piece" entities that will let mappers just choose puzzle piece they need from a list, instead of remembering that "keep3" is actually a "Mill key". According to FGD file format specs here https://developer.valvesoftware.com/wiki/FGD I can do drop down lists for integers, floats and strings. So I'm editing puzzle_piece like this:
the problem area here is "puzzle_id(choices)". If I do something like this:
then its working, but I need strings, not numbers. And if I try strings, .fgd file just doesn't seem to load at all.
System Information
TrenchBroom 2019.3 on Windows 7