PDA

View Full Version : Change to Default Value



Blackfoot
February 6th, 2022, 21:04
I'm not sure when exactly this happened but at some point fields stopped resetting to the "default" value when cleared. Now they seem to reset to 0 regardless of what the "default" is set to.

What is the work around for this now?

Trenloe
February 6th, 2022, 21:38
Moved from the laboratory forum to the workshop forum. The laboratory forum is for discussions regarding the latest beta test.

Moon Wizard
February 6th, 2022, 21:41
There's nothing that has been changed in this regard that I'm aware of.

What do you mean when you say "when cleared"? How is the "clearing" triggered?

NOTE: If you are referring to pressing Delete/Backspace on a field, the number fields will reset to the default value specified; but not string fields. They never did. I confirmed that this is the exact same behavior as programmed in FGC as well.

Regards,
JPG

Blackfoot
February 6th, 2022, 22:17
I am talking about number fields.
These are now all resetting to 0 rather than -999 like they are supposed to.
It worked fine in classic... I'm not sure if it is a more recent development than that or not.

Blackfoot
February 6th, 2022, 22:18
And yes I mean backspace or delete.

Blackfoot
February 6th, 2022, 22:22
My ruleset uses positive values for current status rather than negative ones.
The onValueChanged checks for -999 and then checks the max value for body/stun/endurance and resets it to those values... at least that is what it used to do.

Now clear sets them to zero.

Moon Wizard
February 6th, 2022, 22:28
Are you sure that the default value is being read correctly? (i.e. if database node created by control when window opened, is it set to -999?)
(Should be <default>-999</default> or <default value="-999" />)

Other than that, I would have to see an example that isn't working to dig into.

Regards,
JPG

Moon Wizard
February 6th, 2022, 22:33
Nevermind, I think I see the issue. I just checked the code history; and it's been that way in FGU the entire time. (even during alpha/beta)

Regards,
JPG

jharp
February 6th, 2022, 23:42
Don't know if it is related but after discussions with Celestian it seems that core changed recently regarding default values.

It used to be that if you clicked on a field that was empty (but had a default) and typed a character you would get what you typed. So for AC field in 2e you would see it blank and type "-1" and it would get "-1". But now if you type "-1" you get "-111" because it takes the default value and makes it negative with the "-" key and then appends the "1".

Maybe this relates?

Jason

Blackfoot
February 7th, 2022, 15:12
Nevermind, I think I see the issue. I just checked the code history; and it's been that way in FGU the entire time. (even during alpha/beta)

Regards,
JPG

Cool, do you have a solution?

Moon Wizard
February 7th, 2022, 16:15
@jharp,
I have no idea what you are specifically referring to; it hasn't been reported or reproduced in any workshop or house of healing threads.

@Blackfoot,
It will require a client update; so it will be in the next update.

Regards,
JPG

Blackfoot
February 7th, 2022, 16:31
@Blackfoot,
It will require a client update; so it will be in the next update.

Regards,
JPG

Great. Thanks!

Moon Wizard
February 7th, 2022, 16:43
@jharp,
I wasn't sure if I understood the issue you reported completely; but I did find some unexpected behavior if the first character you type is a minus sign and the field already contains data. (Basically, the minus sign would start "append" mode, but not reset to zero first.) If that's what you are referring to, then I'll get that in next client push as well.

Regards,
JPG

jharp
February 7th, 2022, 17:07
@jharp,
I wasn't sure if I understood the issue you reported completely; but I did find some unexpected behavior if the first character you type is a minus sign and the field already contains data. (Basically, the minus sign would start "append" mode, but not reset to zero first.) If that's what you are referring to, then I'll get that in next client push as well.

Regards,
JPG

You've got it. Thanks.

Blackfoot
February 11th, 2022, 04:55
Looks like the update resolves the issue.
Thanks MW.