Author Topic: Extended production window UI  (Read 655 times)

0 Members and 1 Guest are viewing this topic.

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 7455
Extended production window UI
« on: January 29, 2017, 08:23:48 PM »
Hey guys, i saw at some point some screenshots od some extended production window UI up to ... 8 items ?

i searched 1 hour scrolling all the pages and didnt found who posted that :S

i am planing to try the random stuff production and there will be alot of randow stuff so.... i wish to add a big extended production UI... but i have no idea how you guys did it.

Can I have some help on how you guys did it ?
> > > Support Mods Creation developments with Paypal Donations < < <
Click here to PayPal Donate.

Offline Discrepancy

  • Modders
  • Architect
  • *****
  • Posts: 571
Re: Extended production window UI
« Reply #1 on: January 29, 2017, 09:56:56 PM »
It seems Banished won't allow for you to make your own 'Dialog/Production.rsc' file.

So you must just alter the original, don't rename and include in your mod.

You also cannot add a new production window, so must alter one of the existing.

I altered the 'production4' code to allow 12 lines:

my Production.rsc file from stythe tower:

Code: [Select]
CheckDescription checkProduction : "Dialog/StandardDialog.rsc:checkPin"
{
String _toolTipText = "ProductionTip";

ElementDescription _check = "imageProduction";
ElementDescription _content = "imageProduction";
}
ImageDescription imageProduction : "Dialog/StandardDialog.rsc:titleImage" { String _spriteName = "ProductionTab"; }

RibbonDescription production
{
bool _vertical = false;
int _cellPad = 4;
int _topPad = 4;
ElementDescription _elements
[
"thisYear"
"previousYear"
]
}

RibbonDescription production3 : "production"
{
ElementDescription _elements
[
"thisYear3"
"previousYear3"
]
}

RibbonDescription production4  : "production"
{
ElementDescription _elements
[
"thisYear4"
"previousYear4"
]
}

RibbonDescription previousYear
{
ElementDescription _border = "SharedElements.rsc:sunkenRaisedBorder";
bool _vertical = true;
int _cellPad = 2;
int _leftPad = 8;
int _rightPad = 8;
int _topPad = 8;
int _bottomPad = 8;

ElementDescription _elements
[
"textPrevYear"
"storageItem"
"storageItem"
]
}

RibbonDescription previousYear3 : "previousYear"
{
ElementDescription _elements
[
"textPrevYear"
"storageItem"
"storageItem"
"storageItem"
]
}

RibbonDescription previousYear4 : "previousYear"
{
ElementDescription _elements
[
"textPrevYear"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
]
}

RibbonDescription thisYear : "previousYear"
{
ElementDescription _elements
[
"textThisYear"
"storageItem"
"storageItem"
]
}

RibbonDescription thisYear3 : "previousYear"
{
ElementDescription _elements
[
"textThisYear"
"storageItem"
"storageItem"
"storageItem"
]
}

RibbonDescription thisYear4 : "previousYear"
{
ElementDescription _elements
[
"textThisYear"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
"storageItem"
]
}

RibbonDescription storageItem
{
ElementDescription _border = "SharedElements.rsc:flatButtonEnabledBorder";
bool _vertical = false;
int _minWidth = 130;
ElementDescription _elements
[
"labelStorage"
"numberCount"
]
}

LabelDescription labelStorage
{
int _leftPad = 2;

Alignment _alignment = MidLeft;

int _minWidth = 90;
Font _font = "Font\FontSmall.rsc";
int _imageWidth = 20;
int _imageHeight = 20;
int _spacing = 4;
LabelPosition _labelPosition = TextRight;
Alignment _textAlignment = MidLeft;
}

NumberDescription numberCount
{
int _rightPad = 2;

Alignment _alignment = MidRight;
NumberType _numberType = Integer;
int _minWidth = 40;

Font _font = "Font\FontSmall.rsc";
}

TextDescription textThisYear
{
Alignment _alignment = MidLeft;
int _topPad = 2;
Font _font = "Font\FontSmall.rsc";
StringTable _stringTable = "Dialog/StringTable.rsc:gameDialogs";
String _text = "ThisYear";
}

TextDescription textPrevYear : "textThisYear"
{
String _text = "PrevYear";
}

It is an easy change to make, you can see where I simply added the '"storageItem"' to increase the size.

You can also change the width of the production chart.

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 7455
Re: Extended production window UI
« Reply #2 on: January 29, 2017, 09:59:58 PM »
thanks you !!! i needed it desperately :S
« Last Edit: January 29, 2017, 10:04:25 PM by RedKetchup »
> > > Support Mods Creation developments with Paypal Donations < < <
Click here to PayPal Donate.

Offline kid1293

  • Modders
  • Banished Expert
  • *****
  • Posts: 2017
  • Never confuse movement with progress
Re: Extended production window UI
« Reply #3 on: January 29, 2017, 10:18:00 PM »


It seems Banished won't allow for you to make your own 'Dialog/Production.rsc' file.

So you must just alter the original, don't rename and include in your mod.


I copied the production file and renamed it when making my Magical Garden.
It works without disturbing other buildings.


Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 7455
Re: Extended production window UI
« Reply #4 on: January 29, 2017, 10:58:21 PM »
really ? did you tried to make a "thisYear12/previousYear12" something like that ? or you did kept the "previousYear4/thisYear4" names ?

(i found 12 items extremely big and long.... i did a 8 items for myself)
« Last Edit: January 29, 2017, 10:59:55 PM by RedKetchup »
> > > Support Mods Creation developments with Paypal Donations < < <
Click here to PayPal Donate.

Offline kid1293

  • Modders
  • Banished Expert
  • *****
  • Posts: 2017
  • Never confuse movement with progress
Re: Extended production window UI
« Reply #5 on: January 30, 2017, 01:38:39 AM »
I made 12 and it was under previousYear4/thisYear4

Offline Discrepancy

  • Modders
  • Architect
  • *****
  • Posts: 571
Re: Extended production window UI
« Reply #6 on: January 30, 2017, 02:54:50 AM »
 :)

ahh, very helpful.
I stand corrected. Not sure why it didn't work for me last time.

It will make for such a cleaner game.