Logo Platform
logo amplifiers simplified

Modulo Operation

Reply
Copied to clipboard!
0Send private message
12 years ago
Aug 24, 2012, 8:44:00 AM
No you cannot for now. Did this feature interest any other modders?

How would you use it?

(example of modifier could be interesting for us to understand what you really need ^^)



Cheers,

Flo
0Send private message
12 years ago
Aug 24, 2012, 9:10:23 AM
I am creating traits that allow me to change what different races prefer for planets, to do this I set base FIDS to 0 and each size of planet to a set number of pop no matter the planet type. Now in the trait I change each stat specifically to the Trait.



[CODE]





































[/CODE]



The problem I run into is population, as its very hard to change each different size with the same number. To get around this I used percents but this causes the max pop to often be a decimal number. This really doesn't cause any game issues as far as I see, but when you look at a planet that say its max population is 8.2 it is not a very clean solution.



If I could use modulo in a binary operation on population I believe I could make it a whole number easily.





Hope that answers your question.
0Send private message
12 years ago
Aug 24, 2012, 9:26:18 AM
Can a "round" function be more usable for you? or the Modulo is clearly a must have?



I think we could quite easily force some of the properties to be "int" instead of "float" by adding a "round" attribute on the simulationObjectPropertyDescriptor element. You could say the property to "Round", "Floor", "Ceil", etc...



Did this solution be a good one for you? Does any other modders who want this kind of possibilities?
0Send private message
12 years ago
Aug 24, 2012, 9:32:56 AM
That would work.



Another thing that would be awesome is a small guide to what you can actually do in simulationObjectPropertyDescriptor and other useful stuff.
0Send private message
12 years ago
Aug 24, 2012, 9:38:20 AM
Yea, I'm working on writing a guide like this. The more we get specific modding demands, the more it becomes "urgent" to have a mini-guide, other than the modding tutorials.
0Send private message
12 years ago
Aug 24, 2012, 12:48:24 PM
Omg yes INT () is definately needed - I want all m advanced math commands muhaha... I actually worked up a scaling formula for ship engine speed based on tonnage. 0.5+257.1478/tonnage = and maintaining a constant speed curve between classes would have been easier due to round to nearest whole number nature.
0Send private message
?

Click here to login

Reply
Comment