Author Topic: More Limits in UI  (Read 1116 times)

0 Members and 1 Guest are viewing this topic.

Offline embx61

  • Modders
  • Banished Expert
  • *****
  • Posts: 1275
  • You are always on my mind, Forever in my heart
More Limits in UI
« on: April 10, 2017, 09:15:13 PM »
Hi guys

Can someone show me how do you do this?

It comes from one of Necora's mod.

A double entrée for the limits in the UI?

http://worldofbanished.com/gallery/474_10_04_17_9_12_41.jpeg
More Limits in UI


Thanks :)
My beloved Kathy
As you were you will always be
Treasured forever in my memory

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 7455
Re: More Limits in UI
« Reply #1 on: April 10, 2017, 09:26:29 PM »
it is in your UI. you need to spot the UI that call the resource limit and make a double, a triple ...

      {
         ObjectType _type = ResourceLimitUI;
         ElementDescription _element = "resourceLimit";
         String _insertAt = "userButton1";
         DialogControllerConfig _config = "resourceLimitConfig";   
      }


you add a 2nd or a 3rd.... depending the number you need ..
resourceLimit2
resourceLimitConfig2

resourceLimit3
resourceLimitConfig3

etc

and then below you put new paragraph 2 and 3 to print them where you want  on the form and what type they should limit ...


quite easy but alot of paragraphs copied and numbered.
i never did but this is how it is made


---------------

not sure if userbutton1 too need be numbered too ... it is possible.


      {
         ObjectType _type = ResourceLimitUI;
         ElementDescription _element = "resourceLimit2";
         String _insertAt = "userButton2";
         DialogControllerConfig _config = "resourceLimitConfig2";   
      }
      {
         ObjectType _type = ResourceLimitUI;
         ElementDescription _element = "resourceLimit3";
         String _insertAt = "userButton3";
         DialogControllerConfig _config = "resourceLimitConfig3";   
      }
....
each of those need their 4 paragraphs numbered 2 3 each
« Last Edit: April 10, 2017, 09:34:24 PM by RedKetchup »
> > > Support Mods Creation developments with Paypal Donations < < <
Click here to PayPal Donate.

Offline embx61

  • Modders
  • Banished Expert
  • *****
  • Posts: 1275
  • You are always on my mind, Forever in my heart
Re: More Limits in UI
« Reply #2 on: April 10, 2017, 09:37:06 PM »
Thanks Red.

I was able to get that far with the source from DS mine.

But the UI for the mine is a bit different then a Inventory/Consume Produce menu.

I get this, I have to move the inventory window down somehow.

http://worldofbanished.com/gallery/474_10_04_17_9_33_40.jpeg
More Limits in UI
My beloved Kathy
As you were you will always be
Treasured forever in my memory

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 7455
Re: More Limits in UI
« Reply #3 on: April 10, 2017, 09:44:37 PM »
the inventory window is very hard to move i think, i suggest you to make the window bigger vertically and put them at bottom like 1 to the left, 1 to the right .

or check the vanilla mine.
> > > Support Mods Creation developments with Paypal Donations < < <
Click here to PayPal Donate.

Offline embx61

  • Modders
  • Banished Expert
  • *****
  • Posts: 1275
  • You are always on my mind, Forever in my heart
Re: More Limits in UI
« Reply #4 on: April 10, 2017, 10:03:55 PM »
Thanks Red,

Necora is able to do it as is seen in the first picture.

I keep trying as I think I have to copy a file, or two, from Luke's Dialog Folder, rename those so not other buildings are affected.

I shall check the storage.rsc file to see if I see something there I can change.

The UI is complicated.
My beloved Kathy
As you were you will always be
Treasured forever in my memory

Offline QueryEverything

  • Advisor
  • Banished Expert
  • *****
  • Posts: 1064
Re: More Limits in UI
« Reply #5 on: April 10, 2017, 10:43:57 PM »
Looks great :)  Well done!!  :D
~ QE, I query because I like learning new things. 

Banished pinterest & Banished mod ideas
(Gently) Please: if you download mods please rate them, this helps & encourages the modders. :)

Offline Discrepancy

  • Modders
  • Architect
  • *****
  • Posts: 571
Re: More Limits in UI
« Reply #6 on: April 11, 2017, 01:23:26 AM »
to change the inventory part of the UI - I move it downwards.

In the UI section of code, find:
TabDescription inventoryTab

I then insert this code into the section int _topPad = 28; (increase or lower number to suit)

here is the UI code for my workshop included in DS Wagon Vendor:
It has 3 resource limit spinners.
Code: [Select]
UIDescription ui
{
Dialog _dialog = "Dialog/StandardDialog.rsc:entity";

ElementController _controllers
[
{
ObjectType _type = ControlUI;
ElementDescription _element = "enableToolMakerWorkButton";
String _insertAt = "userButton0";
DialogControllerConfig _config = "workButtonConfig";
}
{
ObjectType _type = StorageUI;
ElementDescription _element = "inventoryTab2";
String _insertAt = "userButton1";
}
{
ObjectType _type = ProductionUI;
ElementDescription _element = "Dialog/DSSVGathererProduction.rsc:production4";
String _insertAt = "pageUser";
}
{
ObjectType _type = PageToggleUI;
ElementDescription _element = "Dialog/Production.rsc:checkProduction";
String _insertAt = "userTitle0";
}
{
ObjectType _type = WorkPlaceUI;
ElementDescription _element = "Dialog/Work.rsc:workPlace";
String _insertAt = "userTitle1";
}
{
ObjectType _type = StatusIconUI;
ElementDescription _element = "Dialog/Building.rsc:icons";
String _insertAt = "userTitle2";
}
{
ObjectType _type = ResourceLimitUI;
ElementDescription _element = "resourceLimit";
String _insertAt = "userButton1";
DialogControllerConfig _config = "resourceLimitConfig";
}
{
ObjectType _type = ResourceLimitUI;
ElementDescription _element = "resourceLimit2";
String _insertAt = "userButton1";
DialogControllerConfig _config = "resourceLimitConfig2";
}
{
ObjectType _type = ResourceLimitUI;
ElementDescription _element = "resourceLimit3";
String _insertAt = "userButton1";
DialogControllerConfig _config = "resourceLimitConfig3";
}
{
ObjectType _type = ConsumeProduceUI;
ElementDescription _element = "Dialog/DSSVConsumeProduce.rsc";
String _insertAt = "userGroup0";
}
{
ObjectType _type = BuildUI;
ElementDescription _element = "Dialog/Build.rsc:build";
String _insertAt = "pageBuild";
}
{
ObjectType _type = DestroyUI;
ElementDescription _element = "Dialog/Destroy.rsc:destroy";
String _insertAt = "pageDestroy";
}
]
}

ControlUIConfig workButtonConfig
{
ObjectType _type = ConsumeProduceComponent;
int _controlId = 0;
}

CheckDescription enableToolMakerWorkButton : "Dialog/Work.rsc:enableWorkCheck"
{
int _leftPad = 16;
ElementDescription _content = "labelToolMakerWorkUncheck";
ElementDescription _check = "labelToolMakerWorkCheck";
}

LabelDescription labelToolMakerWorkCheck : "Dialog/Work.rsc:labelEnableWork"
{
SpriteSheet _spriteSheet = "Dialog/SpriteSheet.rsc";
String _spriteName = "ToolMakerWork";
}

LabelDescription labelToolMakerWorkUncheck : "labelToolMakerWorkCheck"
{
Color _color = 0xFF2E2B28;
}

TabDescription inventoryTab
{
int _topPad = 4;
int _leftPad = 8;

ElementDescription _outerBorderTop = "Dialog/SharedElements.rsc:tabBorderTop";
ElementDescription _outerBorderBottom = "Dialog/SharedElements.rsc:tabBorderBottom";
ElementDescription _innerBorder = "Dialog/SharedElements.rsc:raisedBorder";

SpriteSheet _spriteSheet = "Dialog/SpriteSheet.rsc";
String _connectStart = "TabStart";
String _connectMid = "TabMid";
String _connectEnd = "TabEnd";

int _elementPad = 4;

Tab _tabs
[
{
ElementDescription _button = "Dialog/DSSVStorage.rsc:buttonTabStorage";
ElementDescription _content = "Dialog/DSSVStorage.rsc:storageTiny";
}
]
}

TabDescription inventoryTab2 : "inventoryTab"
{
int _topPad = 30;
int _leftPad = 34;
int _rightPad = 4;
Tab _tabs
[
{
ElementDescription _button = "Dialog/DSSVStorage.rsc:buttonTabStorage";
ElementDescription _content = "Dialog/DSSVStorage.rsc:storageTiny4";
}
]
}


ResourceLimitUIConfig resourceLimitConfig
{
ResourceLimit _resourceLimit = Tools;
}

RibbonDescription resourceLimit
{
Alignment _alignment = TopLeft;
bool vertical = false;
int _topPad = 8;
int _cellPad = 8;

ElementDescription _elements
[
"labelLimit",
"editLimit",
]

Dialog _toolTipDialog = "Dialog/ToolTip.rsc";
StringTable _toolTipStringTable = "Dialog/StringTable.rsc:gameDialogs";
String _toolTipText = "ToolLimitTip";
}

LabelDescription labelLimit
{
Alignment _alignment = MidLeft;

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

StringTable _stringTable = "Dialog/StringTable.rsc:gameDialogs";
String _text = "ToolLimit";
SpriteSheet _spriteSheet = "Dialog/SpriteSheet.rsc";
String _spriteName = "Tool";
}

ResourceLimitUIConfig resourceLimitConfig2
{
ResourceLimit _resourceLimit = Custom0;
}

RibbonDescription resourceLimit2
{
Alignment _alignment = TopRight;
bool vertical = false;
int _topPad = 8;
int _cellPad = 8;

ElementDescription _elements
[
"labelLimit2",
"editLimit",
]

Dialog _toolTipDialog = "Dialog/ToolTip.rsc";
StringTable _toolTipStringTable = "Dialog/NewLimitStringTable.rsc:gameDialogs";
String _toolTipText = "Custom0LimitTip";
}

LabelDescription labelLimit2
{
Alignment _alignment = MidLeft;

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

StringTable _stringTable = "Dialog/NewLimitStringTable.rsc:gameDialogs";
String _text = "Custom0Limit";
SpriteSheet _spriteSheet = "Dialog/NewLimitSpriteSheet.rsc";
String _spriteName = "LimitCrafted";
}

ResourceLimitUIConfig resourceLimitConfig3
{
ResourceLimit _resourceLimit = Custom5;
}

RibbonDescription resourceLimit3
{
Alignment _alignment = TopRight;
bool vertical = false;
int _topPad = 34;
int _cellPad = 8;

ElementDescription _elements
[
"labelLimit3",
"editLimit",
]

Dialog _toolTipDialog = "Dialog/ToolTip.rsc";
StringTable _toolTipStringTable = "Dialog/NewLimitStringTable.rsc:gameDialogs";
String _toolTipText = "Custom5LimitTip";
}

LabelDescription labelLimit3
{
Alignment _alignment = MidLeft;

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

StringTable _stringTable = "Dialog/NewLimitStringTable.rsc:gameDialogs";
String _text = "Custom5Limit";
SpriteSheet _spriteSheet = "Dialog/NewLimitSpriteSheet.rsc";
String _spriteName = "LimitConstruction";
}

SpinnerDescription editLimit : "Dialog/SharedElements.rsc:spinnerSmall6"
{
int _increment = 50;
ElementDescription _border = "Dialog/SharedElements.rsc:flatButtonEnabledBorder";
}

Offline Necora

  • Modders
  • Trader
  • *****
  • Posts: 482
Re: More Limits in UI
« Reply #7 on: April 11, 2017, 08:37:08 AM »
Bit late to the party but yeah, I think I stole that from the Iron Mine code which I believe had two limits. It works well for something that has no inventory tab, but as soon as you put the inventory tab in things get real hard to make look good, hence why mine overlap when you have one of the longer limits in there (construction or industrial seem to be the longest).

The problem is, there are so many places you can put some tab spaces in, some do things, some don't seem to or do the opposite. Plus, there is the storage.rsc that you might be able to edit too, but I could not find the correct place to put it. I need to spend some time playing with it to get the lay out nicer.

What I really want to do now is change the size of the individual tables in the inventory tab, but no idea what to edit in the storage.rsc. If anyone knows, I'd like to learn!

Here is the pitch kiln code if you want to see.

Code: [Select]
UIDescription ui
{
int _displayPage = 0; // set to 1 for tab layout
Dialog _dialog = "Dialog/StandardDialog.rsc:entity";

ElementController _controllers
[
{
ObjectType _type = ControlUI;
ElementDescription _element = "enableWorkButton";
String _insertAt = "userButton0";
DialogControllerConfig _config = "workButtonConfig";
}
{
ObjectType _type = StorageUI;
ElementDescription _element = "inventoryTab";
String _insertAt = "userButton1";
}
{
ObjectType _type = ProductionUI;
ElementDescription _element = "Dialog/Production.rsc:production";
String _insertAt = "pageUser";
}
{
ObjectType _type = PageToggleUI;
ElementDescription _element = "Dialog/Production.rsc:checkProduction";
String _insertAt = "userTitle0";
}
{
ObjectType _type = WorkPlaceUI;
ElementDescription _element = "Dialog/Work.rsc:workPlace";
String _insertAt = "userTitle1";
}
{
ObjectType _type = StatusIconUI;
ElementDescription _element = "Dialog/Building.rsc:icons";
String _insertAt = "userTitle2";
}
{
ObjectType _type = ResourceLimitUI;
ElementDescription _element = "resourceLimit";
String _insertAt = "userButton1";
DialogControllerConfig _config = "resourceLimitConfig";
}
{
ObjectType _type = ResourceLimitUI;
ElementDescription _element = "resourceLimit2";
String _insertAt = "userButton1";
DialogControllerConfig _config = "resourceLimitConfig2";
}
{
ObjectType _type = BuildUI;
ElementDescription _element = "Dialog/Build.rsc:build";
String _insertAt = "pageBuild";
}
{
ObjectType _type = DestroyUI;
ElementDescription _element = "Dialog/Destroy.rsc:destroy";
String _insertAt = "pageDestroy";
}
{
ObjectType _type = ConsumeProduceUI;
ElementDescription _element = "Dialog/ConsumeProduce.rsc";
String _insertAt = "userGroup0";
}
]
}

ControlUIConfig workButtonConfig
{
ObjectType _type = ConsumeProduceComponent;
int _controlId = 0;
}

CheckDescription enableWorkButton : "Dialog/SharedElements.rsc:checkSimple"
{
int _topPad = 4;

Dialog _toolTipDialog = "Dialog/ToolTip.rsc";
StringTable _toolTipStringTable = "Dialog/StringTable.rsc:gameDialogs";
String _toolTipText = "EnableWorkTip";

ElementDescription _content = "labelWorkUncheck";
ElementDescription _check = "labelWorkCheck";
int _leftPad = 20;
}

LabelDescription labelWorkCheck
{
int _topPad = 4;
int _leftPad = 4;
int _rightPad = 4;
int _bottomPad = 4;
int _minWidth = 61;
int _minHeight = 61;

Alignment _alignment = MidCenter;

Font _font = "Font\FontSmall.rsc";
StringTable _stringTable = "Dialog/StringTable.rsc:gameDialogs";
String _text = "EnableWork";

int _spacing = 2;
LabelPosition _labelPosition = TextBottom;
Alignment _textAlignment = MidCenter;

SpriteSheet _spriteSheet = "UI/MaritimesPineSetSpriteSheet.rsc";
String _spriteName = "PitchKilnWork";
}

LabelDescription labelWorkUncheck : "labelWorkCheck"
{
Color _color = 0xFF2E2B28;
}

TabDescription inventoryTab
{
int _topPad = 24;
int _leftPad = 20;

ElementDescription _outerBorderTop = "Dialog/SharedElements.rsc:tabBorderTop";
ElementDescription _outerBorderBottom = "Dialog/SharedElements.rsc:tabBorderBottom";
ElementDescription _innerBorder = "Dialog/SharedElements.rsc:raisedBorder";

SpriteSheet _spriteSheet = "Dialog/SpriteSheet.rsc";
String _connectStart = "TabStart";
String _connectMid = "TabMid";
String _connectEnd = "TabEnd";

int _elementPad = 4;

Tab _tabs
[
{
ElementDescription _button = "Dialog/Storage.rsc:buttonTabStorage";
ElementDescription _content = "Dialog/Storage.rsc:storageTiny";
}
]
}

TabDescription inventoryTab2 : "inventoryTab"
{
Tab _tabs
[
{
ElementDescription _button = "Dialog/Storage.rsc:buttonTabStorage";
ElementDescription _content = "Dialog/Storage.rsc:storageTiny4";
}
]
}

ResourceLimitUIConfig resourceLimitConfig
{
ResourceLimit _resourceLimit = Custom3;
}

ResourceLimitUIConfig resourceLimitConfig2
{
ResourceLimit _resourceLimit = Custom4;
}

RibbonDescription resourceLimit
{
Alignment _alignment = TopRight;
bool vertical = false;
int _topPad = 8;
int _cellPad = 8;

ElementDescription _elements
[
"labelLimit",
"editLimit",
]

Dialog _toolTipDialog = "Dialog/ToolTip.rsc";
StringTable _toolTipStringTable = "Dialog/StringTable.rsc:gameDialogs";
String _toolTipText = "Custom3LimitTip";
}

RibbonDescription resourceLimit2
{
Alignment _alignment = TopRight;
bool vertical = false;
int _topPad = 32;
int _cellPad = 8;

ElementDescription _elements
[
"labelLimit2",
"editLimit",
]

Dialog _toolTipDialog = "Dialog/ToolTip.rsc";
StringTable _toolTipStringTable = "Dialog/StringTable.rsc:gameDialogs";
String _toolTipText = "Custom4LimitTip";
}

LabelDescription labelLimit
{
Alignment _alignment = MidLeft;

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

StringTable _stringTable = "Dialog/NewLimitStringTable.rsc:gameDialogs";
String _text = "Custom3Limit";
SpriteSheet _spriteSheet = "UI/MaritimesPineSetSpriteSheet.rsc";
String _spriteName = "Charcoal";
}

LabelDescription labelLimit2
{
Alignment _alignment = MidLeft;

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

StringTable _stringTable = "Dialog/NewLimitStringTable.rsc:gameDialogs";
String _text = "Custom4Limit";
SpriteSheet _spriteSheet = "UI/MaritimesPineSetSpriteSheet.rsc";
String _spriteName = "PinePitch";
}

SpinnerDescription editLimit : "Dialog/SharedElements.rsc:spinnerSmall6"
{
int _increment = 100;
ElementDescription _border = "Dialog/SharedElements.rsc:flatButtonEnabledBorder";
}


Offline kid1293

  • Modders
  • Banished Expert
  • *****
  • Posts: 2017
  • Never confuse movement with progress
Re: More Limits in UI
« Reply #8 on: April 11, 2017, 09:30:00 AM »


Not easy to do here. But -
copy storage.rsc and rename it.


your code use
Code: [Select]
   {
         ObjectType _type = StorageUI;
         ElementDescription _element = "inventoryTab";
         String _insertAt = "userButton1";
      }


if you go to 'inventoryTab', it refers to


   ElementDescription _content = "Dialog/Storage.rsc:storageTiny";


there a 'storageTiny4' too, but thats for more inventory space. (4)


So in your XXXStorage.rsc you find 'storageTiny'
Code: [Select]
ContainerDescription storageTiny : "storageContainer"
{
 int _topPad = 4;
 int _leftPad = 0;
 int _bottomPad = 0;
 int _rightPad = 0;
 ElementDescription _verticalScroll = "";
 Alignment _alignment = TopLeft;
 int _height = 21;
 int _width = 214;
}


change the width to something higher. Maybe = 264 (+50)


you saw that 'storageTiny' had a reference?
ContainerDescription storageTiny : "storageContainer"


go back in code and find 'storageContainer'


nothing I can do here but you find
ElementDescription _content = "storageTable";


scroll down to 'storageTable'
nothing to do here BUT


  { int _x = -1; int _y = -1; ElementDescription _element = "storageItem"; }


go down to 'storageItem'
Code: [Select]
RibbonDescription storageItem
{
 ElementDescription _border = "SharedElements.rsc:flatButtonEnabledBorder";
 int _minWidth = 122;
 int _minHeight = 20;
 bool _vertical = false;
 ElementDescription _elements
 [
  "labelStorage"
  "numberCount"
 ]
}


Here you have to experiment with half the value you added earlier = +50
(two columns) so add 25 to 'minWidth' and try it out in game.


This is from my head. There are, as you can see, many places with 'width'
Experiment. It will become easier once you start digging deeper.


edit - I checked. You may have to edit 'labelStorage' too. You find it after 'storageItem'
edit2 - storageTiny is inventorytab. storageItem is one box in table. labelStorage is product name.
« Last Edit: April 11, 2017, 10:35:31 AM by kid1293 »

Offline embx61

  • Modders
  • Banished Expert
  • *****
  • Posts: 1275
  • You are always on my mind, Forever in my heart
Re: More Limits in UI
« Reply #9 on: April 11, 2017, 11:37:02 AM »
I did what you guys did by using the storage.rsc file.

But it can be done in the Template file only so no references are needed to the XXXStorage.rsc (At least not for what I wanted).

Code: [Select]
CheckDescription enableWorkButton : "Dialog/SharedElements.rsc:checkSimple"
{
int _topPad = 4;
int _bottomPad = 30;  <========================= Add this line if you want the work button higher otherwise it will be in the middle.

Dialog _toolTipDialog = "Dialog/ToolTip.rsc";
StringTable _toolTipStringTable = "Dialog/StringTable.rsc:gameDialogs";
String _toolTipText = "EnableWorkTip";

ElementDescription _content = "labelWorkUncheck";
ElementDescription _check = "labelWorkCheck";
}}

and some lower:

Code: [Select]
TabDescription inventoryTab
{
int _topPad = 30; //4 <========================= Change this value
ElementDescription _outerBorderTop = "Dialog/SharedElements.rsc:tabBorderTop";
ElementDescription _outerBorderBottom = "Dialog/SharedElements.rsc:tabBorderBottom";
ElementDescription _innerBorder = "Dialog/SharedElements.rsc:raisedBorder";

SpriteSheet _spriteSheet = "Dialog/SpriteSheet.rsc";
String _connectStart = "TabStart";
String _connectMid = "TabMid";
String _connectEnd = "TabEnd";

int _elementPad = 4;

Tab _tabs
[
{
ElementDescription _button = "Dialog/Storage.rsc:buttonTabStorage";
ElementDescription _content = "Dialog/Storage.rsc:storageTiny4";
}
]
}

Some of Luke's building Template files refer to his other buildings code.
Like the Tavern Button is referenced to in some other template files, same a Toolmaker Inventory.
I was always puzzled the compiler complaint it did not find the toolmaker.rsc file so I had to add that file to my template folder so it compiled.

This is how it looks

http://worldofbanished.com/gallery/474_11_04_17_11_44_39.jpeg
More Limits in UI


« Last Edit: April 11, 2017, 11:45:54 AM by embx61 »
My beloved Kathy
As you were you will always be
Treasured forever in my memory

Offline Necora

  • Modders
  • Trader
  • *****
  • Posts: 482
Re: More Limits in UI
« Reply #10 on: April 11, 2017, 01:37:11 PM »
That is beautiful! I wish my boxes were so neat! Time to dig into the code again...

Offline embx61

  • Modders
  • Banished Expert
  • *****
  • Posts: 1275
  • You are always on my mind, Forever in my heart
Re: More Limits in UI
« Reply #11 on: April 11, 2017, 01:57:50 PM »
Not much to dig Necora.

Just two edits in the Template File of the building you use :)

I have it a lot that I am looking to deep while there are way easier options available.

You only have to remove the references to Toolmaker in some files if you copied some of Luke's Template files to edit (What I do a lot).

The problem can be with making a Custom Storage File is that you have to make several of them for all the buildings where the UI has to be different from each other which reference to that file. will take over the values as I found out.

I just noticed your limits are wider because of the longer text so my solution is not enough and some other values (LeftPadding?, RightPadding? maybe) have to be set.

I post part of the effected code as the forum complianing I cannot exceed 10000 characters. Bottom Part of my Template File.
Code: [Select]
ConsumeProduceDescription consumeproduce
{
Product _products
[
{
ComponentDescription _produceMaterial = "Template/RawMaterialLinSeedOil.rsc";
ConsumeRawMaterial _consumeMaterials
[
{
ComponentDescription _material = "Template/RawMaterialFlax.rsc";
int _count = 50;
}
]

ResourceLimit _resourceLimit = Custom7; //misc
String _requirements = "EBLinSeedOilFlaxRequire";
}
{
ComponentDescription _produceMaterial = "Template/RawMaterialSeedOil.rsc";
ConsumeRawMaterial _consumeMaterials
[
{
ComponentDescription _material = "Template/RawMaterialPecan.rsc";
int _count = 50;
}
]

ResourceLimit _resourceLimit = Food;
String _requirements = "EBSeedOilPecanRequire";
}
{
ComponentDescription _produceMaterial = "Template/RawMaterialSeedOil.rsc";
ConsumeRawMaterial _consumeMaterials
[
{
ComponentDescription _material = "Template/RawMaterialSunflower.rsc";
int _count = 50;
}
]

ResourceLimit _resourceLimit = Food;
String _requirements = "EBSeedOilSunflowerRequire";
}
{
ComponentDescription _produceMaterial = "Template/RawMaterialSeedOil.rsc";
ConsumeRawMaterial _consumeMaterials
[
{
ComponentDescription _material = "Template/RawMaterialWalnut.rsc";
int _count = 50;
}
]

ResourceLimit _resourceLimit = Food;
String _requirements = "EBSeedOilWalnutRequire";
}
]

StringTable _stringTable = "Dialog/EBOilPressStringTable.rsc";
int _workRequired = 16;
float _workTime = 5.0;
ToolType _toolType = Hoe;
}


UIDescription ui
{
int _displayPage = 0; // set to 1 for tab layout
Dialog _dialog = "Dialog/StandardDialog.rsc:entity";

ElementController _controllers
[
{
ObjectType _type = ControlUI;
ElementDescription _element = "enableWorkButton";
String _insertAt = "userButton0";
DialogControllerConfig _config = "workButtonConfig";
}
{
ObjectType _type = StorageUI;
ElementDescription _element = "inventoryTab";
String _insertAt = "userButton1";
}
{
ObjectType _type = ProductionUI;
ElementDescription _element = "Dialog/Production.rsc:production";
String _insertAt = "pageUser";
}
{
ObjectType _type = PageToggleUI;
ElementDescription _element = "Dialog/Production.rsc:checkProduction";
String _insertAt = "userTitle0";
}
{
ObjectType _type = WorkPlaceUI;
ElementDescription _element = "Dialog/Work.rsc:workPlace";
String _insertAt = "userTitle1";
}
{
ObjectType _type = StatusIconUI;
ElementDescription _element = "Dialog/Building.rsc:icons";
String _insertAt = "userTitle2";
}
{
ObjectType _type = ResourceLimitUI;
ElementDescription _element = "resourceLimit";
String _insertAt = "userButton1";
DialogControllerConfig _config = "resourceLimitConfig";
}

{
ObjectType _type = ResourceLimitUI;
ElementDescription _element = "resourceLimit2";
String _insertAt = "userButton1";
DialogControllerConfig _config = "resourceLimitConfig2";
}

{
ObjectType _type = ConsumeProduceUI;
ElementDescription _element = "Dialog/ConsumeProduce.rsc";
String _insertAt = "userGroup0";
}
{
ObjectType _type = BuildUI;
ElementDescription _element = "Dialog/Build.rsc:build";
String _insertAt = "pageBuild";
}
{
ObjectType _type = DestroyUI;
ElementDescription _element = "Dialog/Destroy.rsc:destroy";
String _insertAt = "pageDestroy";
}
]
}

ControlUIConfig workButtonConfig
{
ObjectType _type = ConsumeProduceComponent;
int _controlId = 0;
}

CheckDescription enableWorkButton : "Dialog/SharedElements.rsc:checkSimple"
{
int _topPad = 4;
int _bottomPad = 30;

Dialog _toolTipDialog = "Dialog/ToolTip.rsc";
StringTable _toolTipStringTable = "Dialog/StringTable.rsc:gameDialogs";
String _toolTipText = "EnableWorkTip";

ElementDescription _content = "labelWorkUncheck";
ElementDescription _check = "labelWorkCheck";
}

LabelDescription labelWorkCheck
{
int _topPad = 4;
int _leftPad = 4;
int _rightPad = 4;
int _bottomPad = 4;
int _minWidth = 61;
int _minHeight = 61;

Alignment _alignment = MidCenter;

Font _font = "Font\FontSmall.rsc";
StringTable _stringTable = "Dialog/StringTable.rsc:gameDialogs";
String _text = "EnableWork";

int _spacing = 2;
LabelPosition _labelPosition = TextBottom;
Alignment _textAlignment = MidCenter;

SpriteSheet _spriteSheet = "UI/EBOilPressSpriteSheet.rsc";
String _spriteName = "EBOilPressWork";
}

LabelDescription labelWorkUncheck : "labelWorkCheck"
{
Color _color = 0xFF2E2B28;
}

TabDescription inventoryTab
{
int _topPad = 30;

ElementDescription _outerBorderTop = "Dialog/SharedElements.rsc:tabBorderTop";
ElementDescription _outerBorderBottom = "Dialog/SharedElements.rsc:tabBorderBottom";
ElementDescription _innerBorder = "Dialog/SharedElements.rsc:raisedBorder";

SpriteSheet _spriteSheet = "Dialog/SpriteSheet.rsc";
String _connectStart = "TabStart";
String _connectMid = "TabMid";
String _connectEnd = "TabEnd";

int _elementPad = 4;

Tab _tabs
[
{
ElementDescription _button = "Dialog/Storage.rsc:buttonTabStorage";
ElementDescription _content = "Dialog/Storage.rsc:storageTiny4";
}
]
}

ResourceLimitUIConfig resourceLimitConfig
{
ResourceLimit _resourceLimit = Food;
}


ResourceLimitUIConfig resourceLimitConfig2
{
ResourceLimit _resourceLimit = Custom7;
}


RibbonDescription resourceLimit
{
Alignment _alignment = TopRight;
bool vertical = false;
int _topPad = 8;
int _cellPad = 8;
//int _minWidth = 232; //222

ElementDescription _elements
[
"labelLimit",
"editLimit",
]

Dialog _toolTipDialog = "Dialog/ToolTip.rsc";
StringTable _toolTipStringTable = "Dialog/StringTable.rsc:gameDialogs";
String _toolTipText = "FoodLimitTip";
}

RibbonDescription resourceLimit2
{
Alignment _alignment = TopRight;
bool vertical = false;
int _topPad = 32;
int _cellPad = 8;

ElementDescription _elements
[
"labelLimit2",
"editLimit",
]

Dialog _toolTipDialog = "Dialog/ToolTip.rsc";
StringTable _toolTipStringTable = "Dialog/EBOilPressStringTable.rsc";
String _toolTipText = "Custom7LimitTip";
}


LabelDescription labelLimit
{
Alignment _alignment = MidLeft;

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

StringTable _stringTable = "Dialog/StringTable.rsc:gameDialogs";
String _text = "FoodLimit";
SpriteSheet _spriteSheet = "Dialog/SpriteSheet.rsc";
String _spriteName = "Potato"; 
}


LabelDescription labelLimit2
{
Alignment _alignment = MidLeft;

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

StringTable _stringTable = "Dialog/EBOilPressStringTable.rsc";
String _text = "Custom7Limit";
SpriteSheet _spriteSheet = "UI/EBOilPressSpriteSheet.rsc";
String _spriteName = "LimitMisc";
}


SpinnerDescription editLimit : "Dialog/SharedElements.rsc:spinnerSmall6"
{
int _increment = 100;
ElementDescription _border = "Dialog/SharedElements.rsc:flatButtonEnabledBorder";
}



« Last Edit: April 11, 2017, 02:04:12 PM by embx61 »
My beloved Kathy
As you were you will always be
Treasured forever in my memory

Offline embx61

  • Modders
  • Banished Expert
  • *****
  • Posts: 1275
  • You are always on my mind, Forever in my heart
Re: More Limits in UI
« Reply #12 on: April 11, 2017, 03:36:08 PM »
This is what I came up with.

http://worldofbanished.com/gallery/474_11_04_17_3_30_10.jpeg
More Limits in UI


It needs the Storage.rsc and the Consumproduce.rsc files if the width has to be altered too and line it all up nicely.
I tsted by  temporarily using the long Industral Fuel limit in my oilpress file.

I was done testing but the RibbonDescription storageItem can be increased by one pixel but I did not bother as I have to put back to my Misc Limit.

I put some <============== where I made changes in my three files and rarred them in a little package for those who want the files.

Download



« Last Edit: April 11, 2017, 03:48:23 PM by embx61 »
My beloved Kathy
As you were you will always be
Treasured forever in my memory