News:

Welcome to World of Banished!

Main Menu

Discrepancy work in progress

Started by Discrepancy, May 31, 2017, 04:43:52 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Maldrick

Looks amazing, Discrepancy.

Always like your UI work, too.
"We are the architects of our actions and we must live with their consequences, whether glorious or tragic."
― Ezio Auditore da Firenze

Kristahfer

Really like the info tab. Would like to see more of that.

Discrepancy

DS Thompson Trade Merchants is suffering from more post release bugs then i'd have liked ;)

Thanks to @wreckcelsior who pointed out to me about a crash to desktop occurring when pausing the construction of the Trade: Protein merchant.



Loading the mod up I also got the same experience. The normal construction works fine up until you might press the pause button, then CTD.

The problem in a way was it was the only trader crashing, and none of the code was different or incorrect that i thought would be causing it (a crash on press of pause button of build.rsc dialog). I logically thought the UIDescription code would be causing issues:
{
ObjectType _type = BuildUI;
ElementDescription _element = "Dialog/DSDialog/Build5DS.rsc:build";
String _insertAt = "pageBuild";
}


Yet all looked fine and was pointing to the same Build5DS.rsc that was used in a few of the other traders.
the crash though when in the modkit came up with the error the of a size index out of range...


So i looked around the CreatePlacedDescription and MapDescription code to see faults in map pathing and cell sizes, still none though.

Nothing worked so i replaced most of the template code, tried calling up different models, re-compiled the .fbx models... still would keep crashing, and being only on the build construction UI when pressing pause button I was at a loss.

Turns out i wasn't thinking logically enough, or perhaps this isn't logic at all. the protein trader is unique in that it only has 1 RawMaterialFlag listed in the TradeDescription, ResourceGroup code, and within the dialog file DSThompsonTradeMerchantProteinTrade.rsc is the purchase tabs TableDescription has an int _height = 1;
This is what is making the  purchase tab display just 1 rawmaterial (protein).
I didn't suspect this was originally playing a part as who would think this would effect the construction dialog box? besides, that dialog box should not use any of the code that is to do with the trade purchase table, I never thought as it is inserted at "pageBuild" which is a separate page within the StandardDialog.rsc file.

But I wasted hours when it indeed was the culprit. The real reasoning why this happens I do not know. But you need to have a minimum int _height of 2 within the purchase tabs TableDescription,
this means you also need to have 2 _resourceGroups listed within the template file TradeDescription code.

???  !

a success:  ?

not quite...


Why does this cause a crash with the building construction pause button?


So I'm stuck with minimum of 2...

And I've been at this for over 12hrs.

Discrepancy



[Option 1]
I split apart the meats and nuts, have a 'symbolic' (lol... some might say lying) split within the protein flag group, haha and moving one above the other in the list is not going to make a difference....


or

[Option 2]
As the purchase tab is useless anyway in the protein trader do i just 'hide' it like with the seed trader and livestock trader?


Tom Sawyer

That's really an oddity. We don't know what's going on when the internal code generates the UI and it was not made to have only 1 row. What you could try to hide the second row is making the container smaller..

ContainerDescription containerPurchase
{
   int _width = -1;
   int _height = ... //212;
   int _scrollSpacing = 4;

   ElementDescription _verticalScroll = "SharedElements.rsc:verticalScrollbar";
   ElementDescription _content = "tablePurchase";
}

Gatherer

I vote for option 2. Who in their right mind would autotrade for protein when that means you'd also be autopaying for processed meats worth 3 trade value.
There's never enough deco stuff!!!
Fiat panis.

elemental

If it serves no purpose then you might as well hide it.

RedKetchup

not easy sometime with this code. i know it is 4 days i am losing. first cause one of the tooltips got a : Tips: Use "R" or "T" to rotate. or Tips: Use "F" to switch between models.

the game doesnt like it at all and searching and expecting a " ; and crash. in a file that has 60,000 caracters.

then somewhere in my code now, i cannot see all my 40 different map. i only see the first 4. second day i am on this. i cant see the 36 others
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Discrepancy

Quote from: Tom Sawyer on January 12, 2019, 05:23:39 AM
That's really an oddity. We don't know what's going on when the internal code generates the UI and it was not made to have only 1 row.

It is weird though because the building itself does work with just the one row. As long as you do not press the pause button on the dialog box during construction, the building gets built and you can then use it normally like any other trader. I just don't know why the trade purchase has anything to do with the construction pause button.

I also thought about making another dialog/build.rsc file that did not have the option of the pause button at all. But like with the other 2 options, there is still a loss in function.


Quote from: Gatherer on January 12, 2019, 05:29:54 AM
I vote for option 2. Who in their right mind would autotrade for protein when that means you'd also be autopaying for processed meats worth 3 trade value.
Quote from: elemental on January 12, 2019, 01:11:01 PM
If it serves no purpose then you might as well hide it.

Though not useful in the split between the protein/nuts, some players may still have a use of having the purchase tab for setting the trader to autotrade if letting the game play while away from keyboard.

But poll results are pointing more to hiding it though.

I have a couple of other changes to do in code that I have noticed while playing long games with the mod:
- increase the max. number of workers at each trader.
- a few construction cost alterations.
- and i'm going to split the recently added ghosted deco pieces into separate toolbar buttons.





Quote from: RedKetchup on January 12, 2019, 01:24:05 PM
not easy sometime with this code. i know it is 4 days i am losing. first cause one of the tooltips got a : Tips: Use "R" or "T" to rotate. or Tips: Use "F" to switch between models.

the game doesnt like it at all and searching and expecting a " ; and crash. in a file that has 60,000 caracters.

then somewhere in my code now, i cannot see all my 40 different map. i only see the first 4. second day i am on this. i cant see the 36 others

Wow, yes I have had similar experiences when adding the wrong characters to stringtables or inadvertently deleting parts of code in other files.


RK, I know you have said that you don't run your mods through the modkit environment much, but instead compile and test.
But I suggest you do when writing/adding to the stringtables and making dialog/UI changes. I find it very useful as I can have the game in windowed mode and alter texts at same time and can easily see changes with every click of the save button. If a mistake has been made you will know about it straight away.
:)

RedKetchup

yeah i do some sometimes. it is good for numbers. but nothing prevent me from typo errors.
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Discrepancy

:) thanks everyone who did vote.

But, I have removed the poll and decided that a loss of function is not acceptable for the trader so have went with the suggestion from @Tom Sawyer (thank you).

I have got it all working and extensively tested these last 24hrs by building everything, pressing/using all the function buttons on all traders, trading with all boats and then deleting them all and all seems to be working correctly at all stages.

I have a few minor adjustments to undertake and then I will compile the mod for upload to the site.
This will be v2.2 of DS Thompson Trade Merchants. To update the mod within a save-game you will once again need to delete all the traders while playing v2.1.1,  also any ghosted deco pieces that I added last update will need to be removed, sorry for the inconvenience but most of the changes were important bugs with traders as there were some issues with pathing.
As a bonus I have also made a Stone Road matching the trader/dock texture.

taniu

@Discrepancy ;D ;D ;Dthank you for your hard work in creating new mods - I love your mods- it's a lot of fun for us players - attractions - I think your add new mods? Cheers

Discrepancy

It has been a little while since my last update.
I've been working almost exclusively on DS Industry Mining (expansion to Blast Furnace), the mod has grown even more since I released the north advanced version. It now encompasses a lot more supporting industries to get the mines running smoothly. I still have a lot more building and production balancing to do as well finishing the model of a stone mine and of course more UI work...

Lately I've just finished making a Charcoal-pile... has been a long time in the making, scrapped my original model and started over. It's not a constant production building but must be managed (see bottom screenshot for how the UI changes over the course of its life), total production output is based on the quantity of Logs that is used to build the pile.

Another large Industrial Mine, it is a lot bigger than the other mine behind it:

I've been putting together an info dialog box:



paralias

when you say you've seen them all in Banished .. @Discrepancy apears with something completely new and exciting. thank you and congratulations once more

Artfactial

Brilliant! I had just added the old version.
We really do need some more early industrial scale recourse extraction and fabrication. Smoke stack horizons!
Thanks for doing this.:)