Better Trade Screen

Better Trade Screen - Gathering Storm update released! 4.4

I've got some issues. The tab Available Routes is empty. My Routes and Routes to my Cities are OK (filled with correct data).
The radio buttons for sorting are not working (i.e. yields, turns). But drop-down lists for sorting work.
Also shows turns-to-complete 3x-4x longer than it should be (I have TRs in range 25-40, it shows 80-140).
 
I've got some issues. The tab Available Routes is empty. My Routes and Routes to my Cities are OK (filled with correct data).
The radio buttons for sorting are not working (i.e. yields, turns). But drop-down lists for sorting work.
Also shows turns-to-complete 3x-4x longer than it should be (I have TRs in range 25-40, it shows 80-140).
Among all my mods BTS should have the least issues, since I changed very little in it. Can you post you Lua.log file, after you open the TradeOverview panel and then sort it? One thing you should know is if you have no free trader then the available routes tab will be empty. It is the limitation of the base game code that returns false anytime I check if a route is possible. Hence for the Available routes tab to have anything you must have a free trader slot. As for the last one, can you post a screenshot of the tooltip you get when you hover above the turns-to-complete. The final amount of turns depends also on game speed, so let me know if the game is on Quick or Marathon etc.
 
Among all my mods BTS should have the least issues, since I changed very little in it. Can you post you Lua.log file, after you open the TradeOverview panel and then sort it? One thing you should know is if you have no free trader then the available routes tab will be empty. It is the limitation of the base game code that returns false anytime I check if a route is possible. Hence for the Available routes tab to have anything you must have a free trader slot. As for the last one, can you post a screenshot of the tooltip you get when you hover above the turns-to-complete. The final amount of turns depends also on game speed, so let me know if the game is on Quick or Marathon etc.
1. Re: Available TRs. The original window displays routes even if at limit. I have 14/14 now and it shows them. Takes a lot of time (60+ cities on the map) but they appear (see screenshot). Maybe Firaxis fixed something here.
2. Re: Turns. Here you have - one from the mod, and one with orginal window.
3. Re: Sorting. Scratch that. I have not noticed that sorting is done within groups. And most of my TRs within a group provide the same yields and that is why it appeared as if not sorted.
 

Attachments

  • 20180219164002_1.jpg
    20180219164002_1.jpg
    567.9 KB · Views: 189
  • 20180219164503_1.jpg
    20180219164503_1.jpg
    671.4 KB · Views: 178
  • 20180219164913_1.jpg
    20180219164913_1.jpg
    726.4 KB · Views: 189
1. I should retest this. Thank you for telling me.
2. The turns make sense, the distance the trader travels is 70 hexes, one round trip, hence the massive 140 turns.
3. I can give an example on how sorting works if routes are grouped (it is confusing). If you sort by descending gold, then all routes within a group are sorted by 1. Gold (descending) 2. Turns-to-complete (ascending). Then the groups themselves are sorted by 1. Gold (ascending). This way the best gold route is always the first entry, and so is the best "destination/origin" group.
 
2. The turns make sense, the distance the trader travels is 70 hexes, one round trip, hence the massive 140 turns.
No, it doesn't make sense. I've played this game and I know how often they finish and how often I need to set a new TR. The values from original window are correct.

And as a side note - I understand now how that sorting works. But I would much prefer to have them sorted ALL, without those groups. I am really interested in best routes, not n-best routes.
 
The base game kind of lies to you. It shows the distance to city, and not the turns-to-complete. You can see it in the game code:

Code:
-- Update distance to city
local distanceToDestination:number = Map.GetPlotDistance(originCity:GetX(), originCity:GetY(), destinationCity:GetX(), destinationCity:GetY());
routeInstance.RouteDistance:SetText(distanceToDestination);

My code actually calculates the turns taken based on the traders actual path, number of round trips (based on game speed) etc. You can see a detailed right up here: https://forums.civfanatics.com/resources/trade-routes-guide.25529/#q8
 
@Infixo One thing I failed to mention is if you add this mod to already running game (with routes already active) then the turns-to-complete is not subtracted by the turns already completed by trader. What you are seeing maybe the amount of turns if the trader starts a brand new route would take, but your trader is already half way through his route. hence the confusion. Also you just disable grouping with the pulldown, that way it shows all routes, with no grouping based on origin/destination.
 
@InfixoAlso you just disable grouping with the pulldown, that way it shows all routes, with no grouping based on origin/destination.
What exactly should I choose? Because I've checked all combinations and none removes grouping by civ. Specifically Group Setting = "None" doesn't remove it.
 
What exactly should I choose? Because I've checked all combinations and none removes grouping by civ. Specifically Group Setting = "None" doesn't remove it.
Which tab are you talking about? Some tabs are not affecting by the grouping setting. Are you talking about My Routes tab?
 
I have not added the feature to remove grouping in my routes tab, but can look into it. As for Available routes tab, it should still sort regardless of grouping. Maybe you are seeing a lot of yields being the same since the top destination leads to the same yield? Can you send me a screenshot of available routes after sorting.
 
@bladex Can you post your Lua.log file and Modding.log file? They can help me debug why you are getting them.
i found the problem though i was using old obsolete mod Sukritact's Simple UI Adjustments
 

Attachments

  • Lua.zip
    10.6 KB · Views: 138
  • Modding.zip
    11.9 KB · Views: 201
Last edited:
I have not added the feature to remove grouping in my routes tab, but can look into it. As for Available routes tab, it should still sort regardless of grouping. Maybe you are seeing a lot of yields being the same since the top destination leads to the same yield? Can you send me a screenshot of available routes after sorting.
Hm. It's working now, I mean sorting in Available Routes.
Thanks for your patience in explaning various details of the mod! Maybe this would be a little less confusing if all tabs worked in exactly the same way - that is my opinion.
 
I have a feeling the mod has broken something because I can no longer view the city details screen in my game. Nothing happens when i click the city details button.

Looking at the lua.log :

Runtime Error: D:\Steam\steamapps\common\Sid Meiers Civilization VI Rise and Fall\DLC\Expansion1\UI\Replacements\ReportScreen_Expansion1.lua:80: attempt to index a nil value
stack traceback:
D:\Steam\steamapps\common\Sid Meiers Civilization VI Rise and Fall\DLC\Expansion1\UI\Replacements\ReportScreen_Expansion1.lua:80: in function 'Initialize'
D:\Steam\steamapps\common\Sid Meiers Civilization VI Rise and Fall\DLC\Expansion1\UI\Replacements\ReportScreen_Expansion1.lua:89: in function '(main chunk)'
[C]: in function '(anonymous)'
Lua callstack:
- Error loading D:\Steam\steamapps\common\Sid Meiers Civilization VI Rise and Fall\DLC\Expansion1\UI\Replacements\ReportScreen_Expansion1.lua.
TradeRouteChooser: Initializing BTS Trade Route Chooser
TradeRouteChooser: Initializing BTS Trade Support Automater
TradeOriginChooser: Initializing BTS Trade Origin Chooser
 
BRS? You mean BTS right?

Im looking at the modding.log file but the only errors i see are for some localized text and i run in english mode :

[233043.378] LocalizedText - Loading Text/en_US/Macedonia_Persia_CivilopediaText.xml
[233043.379] LocalizedText - Loading Text/en_US/Macedonia_Persia_ConfigText.xml
[233043.380] LocalizedText - Loading Text/en_US/Macedonia_Persia_GameplayText.xml
[233043.383] LocalizedText - Loading Text/Macedonia_Persia_Translations_ConfigText.xml
[233043.388] LocalizedText - Loading Text/Macedonia_Persia_Translations_ConfigText_China.xml
[233043.388] Warning: LocalizedText - Error Loading XML.
[233043.388] LocalizedText - Loading Text/Macedonia_Persia_Translations_Text.xml
[233043.574] LocalizedText - Loading Text/Macedonia_Persia_Translations_Text_China.xml
[233043.574] Warning: LocalizedText - Error Loading XML.
 
Upon loading the bugged save again, I was able to view the city panels but the first city panel with the amenities is blank. Lua.log now shows :

D:\Steam\steamapps\common\Sid Meiers Civilization VI Rise and Fall\Base\Assets\UI\Panels\CityPanelOverview.lua:507: in function 'ViewPanelAmenities'
D:\Steam\steamapps\common\Sid Meiers Civilization VI Rise and Fall\DLC\Expansion1\UI\Replacements\CityPanelOverview_Expansion1.lua:133: in function 'ViewPanelAmenities'
D:\Steam\steamapps\common\Sid Meiers Civilization VI Rise and Fall\Base\Assets\UI\Panels\CityPanelOverview.lua:150: in function 'OnSelectHealthTab'
D:\Steam\steamapps\common\Sid Meiers Civilization VI Rise and Fall\Base\Assets\UI\TabSupport.lua:149: in function '(anonymous)'
Lua callstack:
 
Top Bottom