howdy all, I am wondering if it is possible to use upgrades to increase stats by a percentage. For example i have an income ability and would like it to increase the amount of minerals earned every period by 10% per upgrade level. Need anymore information just ask.
You could use a real variable (with array) or attribute behavior, your call.
Basically what you need to do is set thereal variable to 1.0 for each index.
Every period add .1 to the real and then multiply the variable and the income amount.
I would set up a little code for you but I'm not at home. So if you still need help, I'll be able to do more for you later on today.
If you edit the Effects + of an upgrade, you can select a field to change and an operation to execute. If you select Multiply, you should be able to modify the value by a percentage.
Unfortunately, as you say, some fields are integer-only, and you can only set them to integers (which makes sense) but also only multiply them with integers (which doesn't). You can try to modify the fields in Raw Data View or XML View; just set everything up as you want it to be except the number, then enter raw data view and adjust the number.
So i tried the XML view and as far as i can tell it also doesn't work. It does register that the value is a real number, but must round it to the nearest integer despite this.
Thanks for the help guys if i can't figure out a cleanish way to do this with ability costs or something, i shall just use dem triggers. =)
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
howdy all, I am wondering if it is possible to use upgrades to increase stats by a percentage. For example i have an income ability and would like it to increase the amount of minerals earned every period by 10% per upgrade level. Need anymore information just ask.
Cheers, TAZ
You could use a real variable (with array) or attribute behavior, your call.
Basically what you need to do is set thereal variable to 1.0 for each index. Every period add .1 to the real and then multiply the variable and the income amount.
I would set up a little code for you but I'm not at home. So if you still need help, I'll be able to do more for you later on today.
I was hoping to avoid triggers and use the data editor upgrade system
You can still do it with that . But it's a little more difficult to explain without it in front of me.
U can use variables in the data editor? I know how to make upgrades and stuff but the modifier for the upgrades is an integer.
If you edit the Effects + of an upgrade, you can select a field to change and an operation to execute. If you select Multiply, you should be able to modify the value by a percentage.
Unfortunately, as you say, some fields are integer-only, and you can only set them to integers (which makes sense) but also only multiply them with integers (which doesn't). You can try to modify the fields in Raw Data View or XML View; just set everything up as you want it to be except the number, then enter raw data view and adjust the number.
So i tried the XML view and as far as i can tell it also doesn't work. It does register that the value is a real number, but must round it to the nearest integer despite this.
Thanks for the help guys if i can't figure out a cleanish way to do this with ability costs or something, i shall just use dem triggers. =)