• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

unobtanium

Recruit
6 Badges
Apr 2, 2015
7
0
  • Cities: Skylines
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Surviving Mars
  • Stellaris: Distant Stars
Hello everyone,

i am the developer behind the mod BetterBudget. It is a simple UI modification, where the service info and its budget and sliders are accessible directly in the service info views in the top left.

I usually just created a copy of the service from the "UIView.FullScreenContainer.EconomyPanel.Budget" budget entities and attached them to the InfoViewPanels of the respective service (e.g. Electricity slider to Electricity InfoViewPanel). In order to create a copy of the service info I did the following to do that:
UIPanel panelCopy = InstanceManager.Instantiate(panelOriginal);

It worked great. Everything got copied, even the interactions (data bindings) for the expenses, percentages, sliders, ect. So everthing was linked and values updated back and forth perfectly.

But since update 1.10 something had changed (earlier this year). The interactions are not copied anymore. So today I did some digging to fix this issue, since it basically made my mod useless and people were letting me know how much they depend on the mod.

I noticed that a new "BudgetItem" entry in the budget services (i am pretty sure it wasnt there before in the past). It also gets copied over. It also has some values. When I compared the original with my copy, i noticed that some of my values were different.
"m_BudgetExpensePollIndex=0" instead of 1 for Electricity or 2 for Water & Sewage, etc.
"m_Initialized=false" instead of true
"m_Service=None" instead of "Electricity" or "Water", etc.

Changing some of these values accually create a link to the budget expenses. But nothing more.

This is how far I have gotten today. I tried a few things to get it to work, but if I am honest I must admit that I have no clue what to do at this point.

I am using ModTools to get a grasp on what is going on in the entities. Which is great, but it gives limited information about interactions between multiple entities. I would love to hear from someone who knows more about the data binding and what has changed that specific 1.10 update (maybe even a developer).

I hope someone has some ideas on how to solve this :)
 
Last edited: