1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. Photobucket has changed its policy concerning hotlinking images and now requires an account with a $399.00 annual fee to allow hotlink. More information is available at: this link.
    Dismiss Notice
  3. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  4. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  5. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  6. Dismiss Notice
  7. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

[MODCOMP] JTradeRoutes: An Improved Interface

Discussion in 'Civ4Col - Mods and Files' started by Jeckel, Oct 23, 2008.

  1. Jeckel

    Jeckel Great Reverend

    Joined:
    Nov 16, 2005
    Messages:
    1,637
    Location:
    Peoria, IL
    !! RELEASED !! - October 23, 2008

    The main problem with the Trade Route system in Colonization 2 is its interface. This not to say that the system itself is ideal, but for now I'm concentrating on a complete revamp of the interface to the system. After that is done, I will then focus on adding and enhancing the system itself.

    My first step, which is practically done, is to provide more straight forward access to the information of your Trade Routes. To that end, I have narrowed it down to 4 important elements.

    1) The Trade Routes themselves.
    2) The Transports to move along the Trade Routes.
    3) The Commodities to put in your Transports.
    4) The Data over Time of the various parts of your Trade System.

    This information can now be easyly accessed through a new Screen I have created. It has 5 different Pages.

    The first and second Pages, "Domestic Routes" and "Foreign Routes", address the first point and show the Trade Routes in your Colonies and the Trade Routes with Europe, respectively. This Page has Buttons that allow you to Create, Edit, and Delete Trade Routes. This Page also has a Button, Assign Units To Trade Route, that will all you tell Units to use the selected Trade Route. Also note that the Create Trade Route Button is on all Pages of the Screen.

    The third Page, "Transports", addresses the second important point. This Page has two Tables, the top one showing Land Cargo Transports and the bottom showing Sea Cargo Transports. I just made this Page tonight and it is basicly done. What isn't done is the popup that will allow you to assign Trade Routes to the Transport Units.

    The forth Page, "Commodities", addresses the third important point and gives a comprehensive overview of the Yields Stored in all your Cities. The Table at the top of this Page shows your totals for each Yield and the Table on the right shows the total for each City. I'm not sure what else I'm going to do with this Page, but it isn't quite done yet.

    The fifth and final Page, "Graphs", begins to address the forth important point, but is not near done. Currently it works similarly to the Info Screen, except better because I coded the screen correctly.. something it seems was not done with alot of the default screens... anyway.. It currently has two Graphs, one shows the History of Yields Stored in Cities and the other shows the History of Production Rates of each Yield.

    Most of the work so far has been done with Python to make the Screen, but I did add a few new helper functions to CvTradeRoute objects to make it easyer to determine if a Trade Route goes to Europe and if it is a Land or Sea Trade Route. I also added a little code to CvPlayer objects so that I could keep track of the data that is displayed in the new Graphs.




    Requires: Colonization v1.00
    Changes: Python, SDK
    Version: 1.002 - October 25, 2008
    Download: JTradeRoutes Mod
    Sources: http://forums.civfanatics.com/downloads.php?do=file&id=10999
     
  2. Jeckel

    Jeckel Great Reverend

    Joined:
    Nov 16, 2005
    Messages:
    1,637
    Location:
    Peoria, IL
    1: The new Button on the Main Interface that will bring up the Trade Routes Advisor Screen.

    Note the Button in the top left corner of the Trade Routes Advisor Screen. This button will close the Trade Routes Advisor Screen and open the Domestic Advisor Screen.

    2: The Domestic Routes Page with an example of Flying Help Text that shows the Transport Units assigned to the Trade Route the Cursor is hovering over.

    3: The Foreign Routes Page with an example of the Flying Help Text with no Transport Units assigned to a Trade Route.

    4: The Transports Page with an example of the Flying Help Text showing the Trade Routes assigned to the Transport Unit the Cursor is hovering over.

    5: The Commodities Page showing various information about the Yields stored in your Settlements. Notice the Flying Help Text that is displayed, all three Tables have Flying Help Text implemented.

    6: The Graph Page showing the Stored Yields Graph.

    7: The Graph Page showing the Yield Rates Graph.

    8: The Create Trade Route Popup. This Button appears on all the Trade Routes Advisor's Pages.

    9: The Edit Trade Route Popup. This Button only appears on the Domestic and Foreign Routes Pages of the Trade Routes Advisor Screen.

    10: The Delete Trade Route Popup. This Button only appears on the Domestic and Foreign Routes Pages of the Trade Routes Advisor Screen.
     

    Attached Files:

  3. Jeckel

    Jeckel Great Reverend

    Joined:
    Nov 16, 2005
    Messages:
    1,637
    Location:
    Peoria, IL
    11: This Screen Shot is an example of the Popup Screen that allows you to Assign Transport Units to a Trade Route. Note that it has both a Back and an Exit Button. One will return you to the Trade Routes Advisor Page you were just at and the other will drop you to the Main Interface. This Popup Screen can be accessed from the Domestic or Foreign Routes Page.

    12: This is another Screen Shot of the Assign Transports to Trade Route Popup. Note that the Wagon Train is now Unassigned from the Trade Route. Also note the Flying Help Test displaying the Wagon Train's basic info.

    13: This is an example of the Popup Screen that allows you to Assign Trade Routes to a Land Transport Unit. Note that it has both a Back and an Exit Button. One will return you to the Trade Routes Advisor Page you were just at and the other will drop you to the Main Interface. This Popup Screen can be accessed from the Transports Page.

    14: This is an example of the Popup Screen that allows you to Assign Trade Routes to a Sea Transport Unit. Note that it has both a Back and an Exit Button. One will return you to the Trade Routes Advisor Page you were just at and the other will drop you to the Main Interface. This Popup Screen can be accessed from the Transports Page.
     
  4. Jeckel

    Jeckel Great Reverend

    Joined:
    Nov 16, 2005
    Messages:
    1,637
    Location:
    Peoria, IL
    Known Glitches:

    Trade Routes don't assign/unassign right after a Table is sorted.
    -FIXED in Unreleased v1.003
    -Tables can not be sorted. Not ideal, but it removes the glitch until I can fix it.

    Only the first 12ish Land and Sea Routes can be assigned/unassigned in the Assign Routes Screens.
    -As near as I can tell, this error is in the Vanilla SDK code and is not caused by my mod. I am working on a fix for this.




    Known Quirks:

    The Graph Page gets real laggy after you've played a game for several hundred turns. I am looking into this and will try to bring the lag down some.

    The Lines on the Graph Page will go off the top of the Graph when they reach values higher then the top. I'm trying to decide how to fix this and make the whole Graph Zoomable.




    Planned Future Changes:

    None
     
  5. Dale

    Dale Chieftain

    Joined:
    Mar 14, 2002
    Messages:
    6,986
    Location:
    Melbourne
    [Woodelf spot]

    Well done. :)

    DL'ing now to check it out.
     
  6. Pilotis

    Pilotis Chieftain

    Joined:
    Jan 18, 2005
    Messages:
    481
    Jeckel and Dale ! The White Knights !

    The DomA was really driving me NUTS ! Thing just broke down completely once I got over about 12-18 routes.

    Jeckel. Do I install this as a mod ? Can it be integrated with Dale's AOD/patchmod mod ?

    Thank you. Thanks. Yes. Thanks ! :D
     
  7. Jeckel

    Jeckel Great Reverend

    Joined:
    Nov 16, 2005
    Messages:
    1,637
    Location:
    Peoria, IL
    Its a mod, its going to be up to Dale to combine it with PatchMod or AoDII.

    I'm curious to get some feed back on how my screens work with large amounts of Trade Routes. I my self rarely get more then 7 or 8 of them.

    Hope it helps people and let me know any feedback ya'll have. :)
     
  8. coreybowman

    coreybowman Chieftain

    Joined:
    Jul 15, 2008
    Messages:
    102
    what do we do with SDK file?
     
  9. Pilotis

    Pilotis Chieftain

    Joined:
    Jan 18, 2005
    Messages:
    481
    Just put the folder 'JTradeRoutes' into your Colonization mod folder.

    Copy or move the JTradeRoutes shortcut to your desktop or whereever (nice touch Jeckel!) to launch the mod. Or load it as normal from the Colonization advanced option on the main page.
     
  10. coreybowman

    coreybowman Chieftain

    Joined:
    Jul 15, 2008
    Messages:
    102
    so what do you do with sdk file.nothing?
     
  11. Dale

    Dale Chieftain

    Joined:
    Mar 14, 2002
    Messages:
    6,986
    Location:
    Melbourne
    The SDK file is only for people like me (modders) who wish to integrate this with their mods. For players it serves no purpose. :)
     
  12. Dale

    Dale Chieftain

    Joined:
    Mar 14, 2002
    Messages:
    6,986
    Location:
    Melbourne
    First thoughts:

    1. Looked through the files, and a couple of texts aren't setup for foreign lang usage. Small thing, but will annoy our non-Engrish speakers. :)
    2. Second thing I found is if you have "cheatcode = chipotle" in the ini file, SHIFT-T brings up the cheat menu not the trade menu. :D
    3. My initial guns and tools counted on the graph, should they count or should only moved goods be counted on the graph?
    4. On the route screens (tab 1 & 2) could have have a mark indicating that the route is already assigned? Say a small wagon or ship (depending on the type of route it is)?
    5. On the unit tab (tab 3) could we get a new column called "Routes" with the routes assigned marked? EG: My wagon has route 2 & 5 off tab 1.
    6. I think you should re-route (pun intended :p) the "trade route" button off the domestic advisor to your new screens. They sh1t all over Firaxis's screen. :)

    Thanks for making this. :)
     
  13. Jeckel

    Jeckel Great Reverend

    Joined:
    Nov 16, 2005
    Messages:
    1,637
    Location:
    Peoria, IL
    Thanx for the feedback Dale. :goodjob:

    1: Thanx, I will definetly fix that. I always try to move python coded text to the xml so that at some point I, or someone else, can put the proper translated text in.

    2: Oops, it shouldn't have been released with any ini file. I ment to remove it from the archive before I uploaded it.

    3: Not sure what you mean with this one. Could you elaborate or restate it, just not understaning what your saying.

    4: If you hold the Cursor over a Trade Route, then the Flying Help Text should list all the Units assigned to that Trade Route.

    5: Like wise, if you hold the Cursor over a Transport Unit, then all the Trade Routes it is assigned to should be listed in the Flying Help Text. It is not really practical to show this in a column on the table, Trade Route names are just to long and there is no Button Image unique to each Route.

    6: Well, I like the idea of hooking to button in the Domestic Advisor to bring up my new screen, but I want a direct button on the main interface. I've picked up on your dislike of new buttons on the main interface, and I can debate placement, but there are going to be too many new screens coming out and we are going to have to come up with some good way to add new buttons on the main interface screen.


    As for 1 and 2, I will get them fixed right now and upload a new version. :)
     
  14. Dale

    Dale Chieftain

    Joined:
    Mar 14, 2002
    Messages:
    6,986
    Location:
    Melbourne
    For 2, in my general ini file I have the cheatcode put in. There is no ini file in your mod as you stated. It's just that SHIFT-T is assigned to 2 screens (the cheat dialog and your screens) that is the problem. :)

    Didn't note the tooltips, thanks. :D

    Yeah, we are going to need a nice place to put advisor buttons. There's going to be a few: trade, technology, etc etc.
     
  15. Jeckel

    Jeckel Great Reverend

    Joined:
    Nov 16, 2005
    Messages:
    1,637
    Location:
    Peoria, IL
    Hehe, yea, I kinda relized what you ment with number 2 after I posted. I already changed it to Alt + T. ;)
     
  16. Jeckel

    Jeckel Great Reverend

    Joined:
    Nov 16, 2005
    Messages:
    1,637
    Location:
    Peoria, IL
    Uploaded a new version, v1.001, it fixes the TXT_KEY errors and I changed the Trade Routes Advisor Screen's Key Binding from Shift + T to Alt + T.

    If you don't need non English text and don't have the cheat code enabled, then you don't need the new version. :)
     
  17. Dale

    Dale Chieftain

    Joined:
    Mar 14, 2002
    Messages:
    6,986
    Location:
    Melbourne
    Awesome work! Now to implement it into AoD. :)
     
  18. Dom Pedro II

    Dom Pedro II Modder For Life

    Joined:
    Apr 3, 2002
    Messages:
    6,811
    Location:
    Exit 16, New Jersey
    Agreed. This will be going into Triangle Trade ASAP :)
     
  19. Jeckel

    Jeckel Great Reverend

    Joined:
    Nov 16, 2005
    Messages:
    1,637
    Location:
    Peoria, IL
    New Version Uploaded, v1.002.

    Added Advisor Menu Mod by Dale so the Trade Routes Advisor Button on the Main Interface will be shown in a second row on the top right of the monitor.

    Added a Button to the top left of the Trade Routes Advisor Screen. This button will close the Trade Routes Advisor and open the Domestic Advisor.

    In the Domestic Advisor, the Trade Routes Button will bring up the new Trade Routes Advisor instead of the default Domestic Advisor Trade Routes Page.

    The new version was acually uploaded last night, but I got side tracked by modding my new project that I forgot to post. :p
     
  20. Dale

    Dale Chieftain

    Joined:
    Mar 14, 2002
    Messages:
    6,986
    Location:
    Melbourne
    Haha good job! :D
     

Share This Page