Jump to content
DeeKayOut

Commuters from/to SimNation

133 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 
On 12/27/2024 at 8:23 AM, CorinaMarie said:

Have you tested game_trends.G_INCOME = hex2dec('6a51178b')?

  • Like this: #game.trend_value(game_trends.G_INCOME,0)#

Well, this works to update it on the first of each month so that's good.  Unfortunately, the number is not entirely accurate.  It's off by a factor that I can't figure out.  In small cities, the difference is like 4 dollars (simoleons?) off.  In medium size cities (200,000+ people), that difference increases to 7-10.  I can only guess that in larger cities of 1 million or more, the difference will possibly grow. 

I also discovered that, like #game.g_income_monthly#, the Maxis variable #game.g_expenses_monthly also updates on the 28th.  I was sloppy and forgot to check that one out.  So I converted that one to a game.trend_value function, and now it updates on the 1st also.  However, like the game.trends Income function, it is not entirely accurate and is off by some unknown factor.  

It's also possible that the difference might be a function of the change between the prior month and the current month, although I'm not entirely sure.  In any event, this is all very bothersome since the numbers don't agree with what's in the budget window.

On 12/27/2024 at 12:56 AM, Null 45 said:

If you are only using them in the UI, I could add new occupant query variables (similar to growth_stage, building_summary, etc.). But IIUC the new total income/expense variable could function as 'total to date', instead of 'total per-month'. As I mentioned above, the result is calculated when the methods are called.

New query variables would be ideal in this case.  I'm not sure if there's really a difference between total-per-date vs total-per-month, since the current ones you made for zone tax revenues are on-demand calculations but they also align with the regular budget window.  I haven't seen the RCI tax values different at all from the budget window, even when new growth occurs in various zones mid-month.  But if there's any difference at all or if it's possible, alignment with the budget window would be ideal.  Maybe the following: Total monthly income, total monthly other expenses, and heck if possible total non-RCI income (if at all possible, otherwise I can just do the math)?  

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
Currently: Viewing Forums Index
 
9 hours ago, Kel9509 said:

Total monthly income, total monthly other expenses, and heck if possible total non-RCI income (if at all possible, otherwise I can just do the math)?

What is 'total monthly other expenses'?

SC4's total monthly income calculation is the sum of 4 different values: RCI tax income, budget department income (e.g. mass transit fees), ordinance income, and neighbor deal income. SC4's total monthly expense calculation is the sum of 4 different values: budget department expenses, ordinance expenses, neighbor deal expenses, and bond expenses.

I am not sure if all of those individual totals are needed as variables, because at that point you would just be duplicating the game's budget panel.

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
1 hour ago, Null 45 said:

What is 'total monthly other expenses'?

It's just the combination of the expenses that you listed.  Same with total income, it's the combination of the income values you listed.

The issue is that the existing Maxis variables for monthly income and monthly expense do not update on the time frame as the other ones you made, and also on top of that seem to have inaccuracies.  It's very odd that their own variables are like that for some reason.  Otherwise I'd use them.

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
15 hours ago, Kel9509 said:

I can only guess that in larger cities of 1 million or more, the difference will possibly grow.

Can I test this? I have cities with more than a mil in population. Head over to PM if you'd like.

The better solution would be to standardize Budget API. The problem is, there's so much we don't know with the budget code that we probably can't make it. The other way would be to enforce a certain guideline to budgeting so if other mods add other budget sections, it'll automatically be accounted to the calculation.

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
Currently: Viewing Forums Index
 
5 hours ago, Kel9509 said:

The issue is that the existing Maxis variables for monthly income and monthly expense do not update on the time frame as the other ones you made, and also on top of that seem to have inaccuracies.

I am not seeing any difference between the Maxis income totals and the version I calculate myself.

1 hour ago, Jidan said:

The other way would be to enforce a certain guideline to budgeting so if other mods add other budget sections, it'll automatically be accounted to the calculation.

The game already accounts for any buildings or custom budget departments that mods add.

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
7 hours ago, Null 45 said:

I am not seeing any difference between the Maxis income totals and the version I calculate myself.

That's correct, although it depends on when you look at it.  The Maxis variable, game.g_income_monthly, is accurate and consistent with the budget window numbers but only when it updates in the Query on the 28th and through the 31st.  Then of course, on the 1st of the new month, the numbers update in the budget but not in the Query until the 28th again.  Same for the Maxis variable game.g_expense_monthly, which also follows the same  time frame.  

If I use the game.trends function that Cori suggested, those numbers update not on the 28th but on the first of the month.  However, they appear to be an average or have a differential applied to them based on the difference from the prior month, so that the amounts are slightly higher than the amounts shown in the budget window.  This difference is probably inherent in the game.trends function.

Your new variables that show the revenue for each specific zone update on the first of the month and when they update they are consistent with the budget window numbers.  But in testing, I've also noticed that sometimes they skip a month in updating, and will update every other month on the first of the month.  I don't want to bog this thread down in screenshots unless absolutely necessary but it is something I've seen and taken notice of.  It's hard to tell if it's because the city zones are growing and changing as the time passes, or if the budget window assumes a building's growth before your new variables do, or something like that.  Even the main budget window says that the amounts are estimates, after all.  

Part of the problem is that I use your RCI zone totals to figure out "Other Income" by taking game.g_income monthly and subtracting the total RCI zone revenues from your variables to get an "Other income" amount, which if  you look at it matches the total amount for ordinances, business deals, neighbor deals, and transportation.  But since I use game.g_income_monthly, that calculation is only accurate from the 28th through the 31st.  On the first, the RCI zone totals update but game.g_income_monthly doesn't, and so from the 1st through the 27th the numbers are mismatched.  If I use game.trend_value(game_trends.G_INCOME,0) instead, it will update on the first but will not be accurate since the trends function is not precise.

I also calculate "Net income" by taking a total income minus total expenses.  At first I used the Maxis variables for this, which was accurate on the 28th and then when the new month occurred it became a month old.  Using a game.trends function for each caused the numbers to update on the first, but the inherent average or differential from the trends function made it an unappealing choice since it was basically inaccurate when compared to the budget window.

So I'm not sure what to do here.  One option is to use the Maxis variables and provide documentation explaining this a bit.  The other is to use game.trends and explain that the difference is because of Maxis math or averages or something.  I was hoping that new variables could also be made to provide monthly income and monthly expense that updates on the first of each month, as in the budget window, but it doesn't appear that's an option.

  • Like 1

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

I suppose I'll go with using the Maxis variables and adding a short description.  In the tooltips overview of "City Finances", I've added the following tooltip:

 

City finances includes:
Tax revenues from all Residential, Commercial and Industrial (RCI) zones (updated on the first of the month)
Other income from non-zone sources
All expenses of the city
Total net income
These numbers are most accurate on the 28th through the end of the month, when the bookkeepers realize they need to actually do their jobs!

I'll also note for each of the individual line-item tooltips when the numbers are updated so people are aware.

@CorinaMarie once these changes are made I think this will be done unless you have anything else?

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
Currently: Viewing Forums Index
 
32 minutes ago, Kel9509 said:

@CorinaMarie once these changes are made I think this will be done unless you have anything else?

I can tentatively say yes, but there's been a million things so I'm uncertain. If I could have a day or two with it before posting live, I can likely test in the game and see how it goes.

  • Like 2

Chance favors the prepared mind. ― Louis Pasteur  
Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

Are you new here? Check out the Introduction and Guide to Simtropolis.

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
1 hour ago, CorinaMarie said:

I can tentatively say yes, but there's been a million things so I'm uncertain. If I could have a day or two with it before posting live, I can likely test in the game and see how it goes.

That works.  Let me know how your review goes!

  • Thanks 1

Share this post


Link to post
Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    I gotta say, I’m following this post with rapt fascination and bewilderment. The extent you all have been able to reach into the bowels of the game and do all this stuff is amazing, but goes right over my head 🤣🤣.

    But please let me know if I can help with anything :-)

    • Like 2

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    I'll just toss my two euro-cents with an observation I made.

    I tried to build up a town that was two tiles away from any other. Things were very sleepy. The moment I made a road connection outside, to an empty tile, the demand bars skyrocketed and stabilized at, roughly, regional averages. The development was so dramatic that I could barely keep up with the power and water demand.

    I also noticed that connecting town through a NAM highway neighbor connector did not cause this effect, unless I used it incorrectly. *:???:

    Long story short, neighbor connections can sometimes have more influence than we think. Even if the towns are isolated, it seems they can still benefit from connections to seemingly "empty" areas.

    • Like 1
    • Thanks 1

    The "SimCity 4" vanilla Opera House is the most evil thing in existence. Avoid.

     

    My city journals! *:read:
    - SimCity: Tribalism - seven urbanization concepts clashed together
    Saving Magnasanti... - the most depressing city in history being revitalized

    Also worth checking...
    - "TMC's Drawing Board" - my city designs and plans.
     

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    1 hour ago, TheMurderousCricket said:

    I also noticed that connecting town through a NAM highway neighbor connector did not cause this effect, unless I used it incorrectly. *:???:

    RHW NC is a lil bit buggy, and nope, the NC piece doesn't really solve the neighbor deals problem since it's the issue of the immediate connectivity, not the path loop. It's best to have a backup road if you want to have a neighboring connection. Especially with the fact if you can build a large enough RHW, you should have at least a tile for bypass road. Another way is to transition it/them into ground/elevated highway or avenue or NWM.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    25 minutes ago, Jidan said:

    RHW NC is a lil bit buggy, and nope, the NC piece doesn't really solve the neighbor deals problem since it's the issue of the immediate connectivity, not the path loop. It's best to have a backup road if you want to have a neighboring connection. Especially with the fact if you can build a large enough RHW, you should have at least a tile for bypass road. Another way is to transition it/them into ground/elevated highway or avenue or NWM.

    I once had a trouble of traffic not crossing over RHWs from one tile to another. When I used connectors on both sides of the border, the problem was solved.

    This is why I am certain that connector pieces do work as intended. I'm just saying that I might have misused them this time, since it's been a while since I utilized them.


    The "SimCity 4" vanilla Opera House is the most evil thing in existence. Avoid.

     

    My city journals! *:read:
    - SimCity: Tribalism - seven urbanization concepts clashed together
    Saving Magnasanti... - the most depressing city in history being revitalized

    Also worth checking...
    - "TMC's Drawing Board" - my city designs and plans.
     

    Share this post


    Link to post
    Share on other sites

    Sign In or register to comment...

    To comment in reply, you must be a community member

    Sign In  

    Already have an account? Sign in here.

    Sign In Now

    Create an Account  

    Sign up to join our friendly community. It's easy!  

    Register a New Account


    ×

    Thank You for the Continued Support!

    Simtropolis depends on donations to fund site maintenance costs.
    Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

    But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

    Make a Donation, Get a Gift!

    Expand your city with the best from the Simtropolis Exchange.
    Make a Donation and get one or all three discs today!

    STEX Collections

    By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

    Each donation helps keep Simtropolis online, open and free!

    Thank you for reading and enjoy the site!

    More About STEX Collections