Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Integer status flags #1856

Open
dorkster opened this issue May 16, 2023 · 1 comment
Open

Integer status flags #1856

dorkster opened this issue May 16, 2023 · 1 comment

Comments

@dorkster
Copy link
Collaborator

I think it would be a good idea to implement some way of storing/checking arbitrary integer values. The syntax could look something like this:

# general syntax is <ID>,<OPERATOR><VALUE>
# for setting values, valid operators would be =,+=,-=

# set my_status to 10. The = operator should be optional, so these two statements would be the same
set_int_status=my_status,=10
set_int_status=my_status,10

# increment my_status to 12
set_int_status=my_status,+=2

# decrement my_status to 11
set_int_status=my_status,-=1

# for checking values, valid operators would be <,>,<=,>=,==,!=
# Because we can use these operators, we don't need to have "not" variants of these attributes
# as with requires_status.

# true if my_status is 10. We can probably allow omitting this operator like we do with assignment
requires_int_status=my_status,==10
requires_int_status=my_status,10

# true is my_status is less than or equal to 10
requires_int_status=my_status,<=10

# For multiple values (e.g. save file storage), I think we can just string them together with semicolons.
# Commas will also work with our parser, but semicolons are easier for human reading.
campaign_int_status=my_status_a,10;my_status_b,5
@CaptainFluffy1903
Copy link

CaptainFluffy1903 commented Jul 29, 2023

Maybe we can use them like % percent of a quest, for an example the quest would be hunt 10 goblin, while this quest is active that status will be increase when a goblin killed by player.That would be useful for modders I think.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants