SC4 Devotion Forum Archives

Sim City 4 Devotion Tools => Tools - General Discussion => Ilives Reader => Topic started by: MoltresRider on October 01, 2021, 09:05:08 PM

Title: Decoding the "Goofy Stat Response Curve" data?
Post by: MoltresRider on October 01, 2021, 09:05:08 PM
I have been playing around with ilives and I started to get familiar with query editing as well as adding more functionality to lots.

One thing that I have been experimenting with lately is the Goofy Stat Response Curve data. However, I have yet to fully understand it.

I have some knowledge of programming from way back in high school and I am the family's tech guy. I also have been able to do very complex things with various computer programs that most did not think was possible. I know my way around computer logic but I kinda do not understand this one. Looking for some help.

From a post already on the forums:

Quote from: RippleJet on March 16, 2010, 01:47:44 PM

That requires the property Goofy Stat Response Curve.
E.g, if you want "Engines Repaired" to be, say somewhere between 0 and 10,
you could give the Goofy Response Curve the following four values:

-100, 0, 0, 2, 50, 5, 100, 10

Mathematically that would first generate a random number between -100 and 100,
which would then be mapped to a number between 0 and 10 with the following chances:


  • 50% chance for a number between 0 and 2
  • 25% chance for a number between 2 and 5
  • 25% chance for a number between 5 and 10

That mapped number can then be referred to in a query with the id=0x0000106b

I studied "-100, 0, 0, 2, 50, 5, 100 10" for days and some things do not add up for me on how the calculations works. I am requesting some elaboration.

Other than what is explained, the best that I could come up with was:


What I have yet to figure out is, why is 0 repeated twice in a row. I do not understand the purpose of the second 0. I assumed that the first 0 means 0%

I attempted to create a goofy stat with the following:


by entering the following values: "-100, 0, 70, 80, 70, 85, 100, 90" and I tested the query.

However, I was given a value of 42 so my logic was incorrect. So then I assumed that the first 0 was lowest value and second 0 was a %.

So I changed the values around: "-100, 70, 0, 80, 70, 85, 100, 90" and tested the query.

I was given a result of exactly 80. While yes, this IS within range but to me, getting 80 on the first try seems kinda weird. I have no clue if I got it right or not

So I decided to break down and separate values from both the OP and my attempt to further figure out what they mean:

This is how I ended up doing that:


Followed by trying to figure them out using my attempt"


Am I getting warmer? Can I further explanation to help better understand this?

If "-100, 70, 0, 80, 70, 85, 100, 90" is correct for the percentages listed above, say that I wanted it to be


instead. What do I need to change/add to make that happen?

Any help would be appreciated.