Cromcrom
Hi all,
my rigale mod uses a lot of random checks through tables.
For example:
my problem is that if I want to change the chance of (whatever_1), occuring, I will have to change almost all the (is_between) numbers.
What I am looking for is a way to simply set a range to (whatever_1), and then have the game sum all the ranges, and then check the random chance of one of the (whatever_x) occuring.
It would look like this ?
I think I could probably code this function, but I was wondering if there is a header_operation.py function that would do this for me ?
I am vastly underexploiting this game because of the lack of header_operation.py various functions explanations.
So any tips or hints or links or bits of code would be vastly appreciated.
Thanks in advance, and take care.
my rigale mod uses a lot of random checks through tables.
For example:
Code:
(store_random_in_range,":whatever",1,101),
(try_begin),
(is_between,":whatever",1,30),
(whatever_1),
(else_try),
(is_between,":whatever",30,60),
(whatever_2),
(else_try),
(is_between,":whatever",60,101),
(whatever_3),
(try_end),
my problem is that if I want to change the chance of (whatever_1), occuring, I will have to change almost all the (is_between) numbers.
What I am looking for is a way to simply set a range to (whatever_1), and then have the game sum all the ranges, and then check the random chance of one of the (whatever_x) occuring.
It would look like this ?
Code:
(assign,":whatever_1_chance_to_occur",30),
(assign,":whatever_2_chance_to_occur",30),
(assign,":whatever_3_chance_to_occur",40),
(function_to_check/return_the_result),
I am vastly underexploiting this game because of the lack of header_operation.py various functions explanations.
So any tips or hints or links or bits of code would be vastly appreciated.
Thanks in advance, and take care.