Author Topic: Dialog/Production.rsc  (Read 390 times)

0 Members and 1 Guest are viewing this topic.

Offline Discrepancy

  • Modders
  • Architect
  • *****
  • Posts: 551
Dialog/Production.rsc
« on: November 30, 2016, 01:38:31 AM »
Simply put,

I'm trying to make a production building call up a separate This Year / Previous Year UI file called 'DSSVProduction.rsc' instead of the games file: 'Production.rsc', calling up a longer RibbonDescription (production12), but in game as soon as I click on the toggle button it crashes the game. I make the same changes to  'Dialog/Production.rsc' file, and it also crashes.

But, if I make the changes to production4 in 'Dialog/Production.rsc' (making it display 12 items) the changes work perfect!  :o

I'm thinking this might be because of the way the coding works in bringing up statistical parameter numbers, and that it is hidden/not available to us.
It has caused me to waste the last few hours of my life.

Or am I doing something wrong?





I wanted this code to be a separate UI Check Production box, so adding this to a 'Dialog/Production.rsc' file seemed like a logical idea:

Code: [Select]
RibbonDescription production12  : "production"
{
ElementDescription _elements
[
"thisYear12"
"previousYear12"
]
}
RibbonDescription previousYear12 : "previousYear"
{
ElementDescription _elements
[
"textPrevYear"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
]
}
RibbonDescription thisYear12 : "previousYear"
{
ElementDescription _elements
[
"textThisYear"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
]
}

instead I just had to do this to 'Dialog/Production.rsc':

Code: [Select]
RibbonDescription production4  : "production"
{
ElementDescription _elements
[
"thisYear4"
"previousYear4"
]
}
RibbonDescription previousYear4 : "previousYear"
{
ElementDescription _elements
[
"textPrevYear"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
]
}
RibbonDescription thisYear4 : "previousYear"
{
ElementDescription _elements
[
"textThisYear"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
]
}

the downside?

this is going to conflict with many mods, and also look ridiculous...
- I think I need to spend some time and see if i can set a maximum size and add a vertical scroll-bar
- And I need to see what is the less used vanilla 'Check Production' table... which one should I alter?
« Last Edit: November 30, 2016, 03:11:41 AM by Discrepancy »

Offline Tom Sawyer

  • Modders
  • Architect
  • *****
  • Posts: 663
Re: Dialog/Production.rsc
« Reply #1 on: November 30, 2016, 03:12:37 AM »
I had the same problem because of gathered firewood. The only way was to add new items to the existing production4 section as you said. In the north it shows 6 lines and it works well. The only building that use this large list is the gatherer shelter. I also tried to make a new production section without success (crashes) but I did not need it and gave it up.

Offline Discrepancy

  • Modders
  • Architect
  • *****
  • Posts: 551
Re: Dialog/Production.rsc
« Reply #2 on: November 30, 2016, 03:21:43 AM »
 :)
thanks.

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 6265
Re: Dialog/Production.rsc
« Reply #3 on: November 30, 2016, 01:05:34 PM »
the very best specialist in this part of code is @kralyerg , ask him :)
> > > Support Mods Creation developments with Paypal Donations < < <
Click here to PayPal Donate.