1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

[MODCOMP] JTradeRoutes: An Improved Interface

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

  1. Rhodes

    Rhodes Chieftain

    Joined:
    Jun 22, 2009
    Messages:
    14
    HI

    This MOD is amazing, but im having some problems when using it.

    When i create a route, and assign a transport to do it, it comes to the city but doesn't go to its destination. stays resting showing if it be assigned into a route.

    A doubt: there is a way to put the MOD definitely in the main game?


    THX
     
  2. Famyen

    Famyen Chieftain

    Joined:
    Aug 18, 2005
    Messages:
    7
    Hi,

    I used this fantastic mod when I played COL, right after I bought it last winter.
    I decided to give COL another chance, after the the new patch came out. BUT I cannot get JTrade to work.

    When I load JTrade I get a error saying something like this:

    Anyone know what that means?

    And what can I do to fix it?

    Any help is appreciated. :)
     
  3. TC01

    TC01 Deity

    Joined:
    Jun 28, 2009
    Messages:
    2,216
    Location:
    Irregularly Online
    Modeltrainman got this error when loading a mod that used the 1.01f patch without that patch installed.

    I don't know if JTradeRoutes is 1.01f compatible, but if it is then you need to download the patch, not from the in-game updater, but from the CFC Download Database.

    If it is not, then you would have to reinstall Col and not apply the patch (assuming you already applied it). If you did already apply it, I have no idea.
     
  4. Famyen

    Famyen Chieftain

    Joined:
    Aug 18, 2005
    Messages:
    7
    Thanks for the reply.

    I think I have 1.01F installed.
    I did run the file that I downloaded from the CFC download database. But in the game it still says that it is version 1.01. So I am not sure if it worked.

    I guess I have to live with the ingame TradeRoutes :(

    /Famy
     
  5. TC01

    TC01 Deity

    Joined:
    Jun 28, 2009
    Messages:
    2,216
    Location:
    Irregularly Online
    v1.01 = v1.01f.

    I guess that means, then, that JTradeRoutes is broken by the 1.01f/1.01 patch. So you'd have to uninstall Col, reinstall Col, and then install JTradeRoutes without installing the patch... or possibly wait for Jeckel to update it.
     
  6. Karstedt

    Karstedt Warlord

    Joined:
    Nov 3, 2002
    Messages:
    107
    I'm getting the same XML error, "more siblings than memory allocated....". Using 1.01f patch downloaded from here. I despise the DA's trade routes and really hope this mod gets a 1.01 update.
     
  7. wj_webhog

    wj_webhog Chieftain

    Joined:
    Jan 24, 2010
    Messages:
    1
    Hello,

    Been playing long hours on my third attempt at colonization but now have reached a stage where trade is starting to be really problematic.
    I have probably 12 colonies which all need to perform a big deal of domestic trade.
    Unfortunately I am scattered on 3 different parts of the continent, which means I have to define various "groups" of colonies which should trade together with wagons.
    Then each group is set to trade with the other with vessels.
    The issue I have now is that to add a wagon it takes 5 minutes to configure it, not to mention it takes 3 minutes to open the trade window...

    So I am very interested in this mod and was wondering if there is any chance I can force my current saves to run with it?
    I have tried to add the files properly in each subfolder of the custom asset folder. Now I can start a new game with all the JTradeRoute features without having to load it as a mod.
    However I can no longer load an existing savegame which is a pitty since that's exactly what I wanted to do.

    Is there a way to force my savegames to work? Maybe forcing them through the mod?

    Anyway I wish I knew from the beginning that the trade feature is problematic in this game, I would have loaded the mod right from the start!!!

    Regards,
     
  8. bivision

    bivision Chieftain

    Joined:
    Jul 4, 2008
    Messages:
    66
    I merged Jeckel's MOD with Col 1.01f (using alpaca's split cpp files) and created new dll file (attached). You just need to replace only this file. Python and XML files remain same.

    (Thanks to Jeckel for the mod, and to Refar, Fagan for the compilation steps and alpaca for the colonization makefile)

    I could not use the debuggable DLL though, it gives this error -

    If anybody needs the changed codes, and/or like to use it in debug mode; I will share the files and details.

    EDIT: Looks like Python/XML files also needed merging as discussing following threads. Merging yet to be done.
    UPDATE: The original DLL I posted here has a Europe Interface screen problem (I guess my edits were not correct). I compiled the DLL again, this time I just merged JTradeRoute changed SDK files to 1.01 source files, without using the split source files (supposed to be used for debuggable DLL, so this source may not be debug friendly).
    The attachment also contains the merged Python and SDK files.
     

    Attached Files:

  9. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,095
    Location:
    Marooned, Y'isrumgone
    I'd like the changed codes :)
     
  10. Aymerick

    Aymerick Warlord

    Joined:
    Dec 26, 2008
    Messages:
    233
    Location:
    Ville de Québec
    To fix the COLOR_FONT_CREAM error, edit the "def getText" function in both "CvAssignTradeRoutesToUnitPopup.py" and "CvAssignUnitsToTradeRoutePopup.py" from this:

    Code:
    def getText(self, sText, tArgs = (), iColor = gc.getInfoTypeForString("COLOR_FONT_CREAM")):
    	#sText = u"%s" %(sText)
    	try:
    		sText = oLocalText.getText(sText, tArgs)
    	except:
    		pass
    	sText = oLocalText.changeTextColor(sText, iColor)
    	return sText
    
    to this :

    Code:
    def getText(self, sText, tArgs = (), iColor = -2):
    	if (type(sText) != str) and (type(sText) != unicode):
    		sText = str(sText)
    	try:
    		sText = oLocalText.getText(sText, tArgs)
    	except:
    		pass
    	if (iColor == -2):
    		iColor = gc.getInfoTypeForString("COLOR_FONT_CREAM")
    	sText = oLocalText.changeTextColor(sText, iColor)
    	return sText
    
    Aymerick
     
  11. bivision

    bivision Chieftain

    Joined:
    Jul 4, 2008
    Messages:
    66
    Thanks Aymerick for the fix. I applied it with Final_Release DLL; it works fine; I did not notice any difference. I am yet to try this with debug DLL.

    Attaching edited DLL source code here (I did not separate out only changed files though).

    UPDATE: I have posted new working DLL in post #68 along with the changed source files. Hence removing the source codes from here which did not work propery (Europe screen canSailEurope function seems to have corrupted)
     
  12. Karstedt

    Karstedt Warlord

    Joined:
    Nov 3, 2002
    Messages:
    107
    Any chance of a compiled dll?
     
  13. bivision

    bivision Chieftain

    Joined:
    Jul 4, 2008
    Messages:
    66
    @Karstedt, Use the playable DLL I posted in #68 and apply python fixes from Aymerick (post #70)

    Though I am facing problem with Domestic Advisor window (It went blank) in Vista. I think the DLL worked in XP without this issue, but I will check again.
    I am no expert on modding, I blindly followed instructions to compile it. Experts advice are welcome to fix it.
     
  14. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,095
    Location:
    Marooned, Y'isrumgone
    You ever figure out the "blank" domestic advisor, mine is blank as well and I have Vista too? I'll look into it when I get a chance.
     
  15. Karstedt

    Karstedt Warlord

    Joined:
    Nov 3, 2002
    Messages:
    107
    Well, it runs at least. I'm using XP and the DA is blank for me too. So it's not limited to Vista. Is that dll theoretically the same as the one with only the source posted?
     
  16. bivision

    bivision Chieftain

    Joined:
    Jul 4, 2008
    Messages:
    66
    Yes Karstedt, the same code that I posted is compiled to create the DLL. Sorry for the buggy DLL; but am clueless how to fix it :(. Even sometimes Europe is going blank, re-starting the game fixing it though.
     
  17. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,095
    Location:
    Marooned, Y'isrumgone
    It may actually be a "buggy" python file or both. As a buggy DLL often times causes a crash. Where as when there is an error in Python the code just stops drawing the screen. So, if the screen is blank as I noticed in the DA then there is somekind of error early on. When I get the chance I'll run debug diagnostics on this if someone doesn't beat me to it.
     
  18. w2w2w

    w2w2w Warlord

    Joined:
    Jul 26, 2009
    Messages:
    120
    wow nice thx I like it
     
  19. Karstedt

    Karstedt Warlord

    Joined:
    Nov 3, 2002
    Messages:
    107
    Knowing nothing about python, there does appear to be a syntax error at line 413 where:

    Code:
    if (SelectionGroup.canAssignTradeRoute(-1)):
    Should have a boolean like:

    Code:
    if (SelectionGroup.canAssignTradeRoute(-1, false)):
    I used false because it's false in the unmodified version and the DA screen shows as the trade route grid as normal. I've done no further testing though.

    UPDATE: The Europe screen gets messed up when a ship is in port too. The ship will be displayed, but all the stuff like trade goods and colonists disappear until the ship leaves port. I have no idea if that is a result of the change I made above but I doubt it. The python error points to the europe screen but since there is no europe screen in the mod I have no clues. It also says something about the unit not having sail_to_europe set.. but again, that is outside the scope of the mod as far as I can tell.
     
  20. bivision

    bivision Chieftain

    Joined:
    Jul 4, 2008
    Messages:
    66
    Thanks Karstedt, this fixes the DA screen. And you are right, the Europe screen goes blank when it is needed most - when the ship is in port. This problem is not related to your fix. I get it without that.

    Now I realize that, like the DLL source code, we need to merge the Mod with 1.01 version for the python / xml codes too. Which I didnt think of doing. There may be more such small bugs lurking there. Need to sit and spend good time to do a proper merger of python/xml. I am out of it for next two weeks, hoping someone will do it by then. Otherwise I will give it a shot (w/o knowing python, so it will be blind merge)
     

Share This Page