Author Topic: Discrepancy work in progress  (Read 23265 times)

0 Members and 1 Guest are viewing this topic.

Offline Maldrick

  • Modders
  • Architect
  • *****
  • Posts: 629
  • Country: us
Re: Discrepancy work in progress
« Reply #225 on: December 29, 2018, 02:01:58 PM »
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

Offline Kristahfer

  • Trader
  • ****
  • Posts: 101
Re: Discrepancy work in progress
« Reply #226 on: December 29, 2018, 06:53:48 PM »
Really like the info tab. Would like to see more of that.

Offline Discrepancy

  • Modders
  • Architect
  • *****
  • Posts: 956
  • Country: au
Re: Discrepancy work in progress
« Reply #227 on: January 12, 2019, 04:53:39 AM »
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.
https://i.imgur.com/Hnz9ifC.jpg
Discrepancy work in progress

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:
Code: [Select]
{
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...
https://i.imgur.com/JrAadKJ.jpg
Discrepancy work in progress


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:  ?
https://i.imgur.com/LcS80dG.jpg
Discrepancy work in progress

not quite...
https://i.imgur.com/ebpUuAI.jpg
Discrepancy work in progress


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.

Offline Discrepancy

  • Modders
  • Architect
  • *****
  • Posts: 956
  • Country: au
Re: Discrepancy work in progress
« Reply #228 on: January 12, 2019, 04:57:12 AM »


[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....
https://i.imgur.com/L2BWUhF.jpg
Discrepancy work in progress


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?
https://i.imgur.com/8txFV8w.jpg
Discrepancy work in progress


Online Tom Sawyer

  • Modders
  • Architect
  • *****
  • Posts: 965
  • Country: is
Re: Discrepancy work in progress
« Reply #229 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. 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";
}

Offline Gatherer

  • Banished Expert
  • *****
  • Posts: 1185
  • Country: si
Re: Discrepancy work in progress
« Reply #230 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.
Fiat panis

Offline elemental

  • Architect
  • *****
  • Posts: 736
  • Country: au
Re: Discrepancy work in progress
« Reply #231 on: January 12, 2019, 01:11:01 PM »
If it serves no purpose then you might as well hide it.

Online RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 10060
  • Country: ca
Re: Discrepancy work in progress
« Reply #232 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
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Offline Discrepancy

  • Modders
  • Architect
  • *****
  • Posts: 956
  • Country: au
Re: Discrepancy work in progress
« Reply #233 on: January 12, 2019, 09:03:28 PM »
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.


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.
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.





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.
:)

Online RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 10060
  • Country: ca
Re: Discrepancy work in progress
« Reply #234 on: January 12, 2019, 10:45:57 PM »
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 .

Offline Discrepancy

  • Modders
  • Architect
  • *****
  • Posts: 956
  • Country: au
Re: Discrepancy work in progress
« Reply #235 on: January 13, 2019, 06:04:06 PM »
:) 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.