[Col2] JTradeRoutes: Project Discussion

Can't wait to try your mod!
(to be true, I check this thread every day :blush:... twice :drool:)
 
Hey Jeckel,

I've been having a problem and I'm wondering if you've had to deal with it too. I want to make it so that when you mouse over a transport, the plot list help will include the list of routes assigned to that unit. It seemed like a fairly straight forward process when I first thought of it, but there's no easy way to get the trade routes a unit is assigned to. The only way I can see to do it is to cycle through all the player's trade routes and pull out the ones that are assigned to that unit rather than accessing the unit's trade routes list directly. Of course, with potentially hundreds of trade routes, that's just too much processing time for such a tiny modification.
 
Hmm, no, can't think of anything off the top of my head. Like alot of things in the Civ4 engine, I think you just have to do a loop through all the Trade Routes. I think as long as you wrap it in the proper if statements, you should be able to keep the excess proccessing to a minimum.

EDIT: One thing that came to mind as soon as I posted this. They don't usually loop through Units, it seems they always loop through SelectionGroups. Maybe that saves proccessing time.
 
Can't wait to try your mod!
(to be true, I check this thread every day :blush:... twice :drool:)

Thanx man, support is a Modder's life blood. :goodjob:
 
Hey Jeckel,

I've been having a problem and I'm wondering if you've had to deal with it too. I want to make it so that when you mouse over a transport, the plot list help will include the list of routes assigned to that unit. It seemed like a fairly straight forward process when I first thought of it, but there's no easy way to get the trade routes a unit is assigned to. The only way I can see to do it is to cycle through all the player's trade routes and pull out the ones that are assigned to that unit rather than accessing the unit's trade routes list directly. Of course, with potentially hundreds of trade routes, that's just too much processing time for such a tiny modification.

Yeah I actually wondered about this in general. Firaxis doesn't seem to like local variables that link objects in both directions which is why they waste a ton of time (both CPU and memory access). I wondered stuff like that might be one of the reasons that both Col and Civ4 hugely slow down later on. Retrieving this kind of stuff from RAM must be a lot faster than cycling through all trade routes at the very low cost in terms of memory (I don't think pointers need a lot, do they?)
It's a lot of work to add that in your case for the tiny modification, though.

By the by, the whole system of having all trade routes exist as game objects needs to go. They should have an in potentia existence when a wagon is assigned but right now, the game creates n*m new trade routes for each good where n is the number of export and m the number of import orders, and puts them on the interface - insane! The worst is you can't use the domestic advisor anymore...
 
By the by, the whole system of having all trade routes exist as game objects needs to go. They should have an in potentia existence when a wagon is assigned but right now, the game creates n*m new trade routes for each good where n is the number of export and m the number of import orders, and puts them on the interface - insane! The worst is you can't use the domestic advisor anymore...

I SOOOOOOOOO agree! Route spam is horrendous in this game.
 
I haven't tracked down why it spams those Europe Routes, but when you create Routes using my new screen no extra Routes are created. :)
 
I SOOOOOOOOO agree! Route spam is horrendous in this game.
Weren't you the guy defending the trade route system like two weeks ago? ;)
 
This looks like it will help make trade a lot more precise without having to do so much manual stuff.

I really like the idea of being able to prevent warehouse overflow and sending goods wherever they're needed most at the time, which would be very useful for shipyard cities.


the game creates n*m new trade routes for each good where n is the number of export and m the number of import orders, and puts them on the interface - insane! The worst is you can't use the domestic advisor anymore...
OMFG thank you, I had no idea why the domestic advisor was taking two minutes to open and now I think I can solve that problem, at least most of the way.
 
Good update this time.

I got quite a bit done these past few days.

First, I added a Button to the Main Interface that will allow you to raise the Trade Routes Advisor Screen, Shift + T will also still work.

I added fields to the Create and Edit Trade Route Popups that will allow you to control the Stored Yield Maintain Level of the Source City. I also added some text to the Delete Trade Route Popup that will display the Maintain Level of the Source City, but that Maintain Level is NOT auto-magically removed when the Trade Route is Deleted.

Lastly, and of most excitement to me, I got Flying Help Texts working on my Screens. This allows you to see things like what Transport Units are Assigned to a Trade Route or what Trade Routes are Assigned to a Transport Unit.

I have updated all the Screen Shots in the 2nd and 3rd posts in this thread. They show the new Flying Help Texts and the other new things in action.

I am just finishing up the last Popup Screen that will allow you to Assign Trade Routes to Units. It is over half done and I accually hope to have some Screen Shots of it up by the day after tomorrow.

Once that is done, it will just be a little Beta Testing, then the mod will be ready for release. :band:
 
Great work :thumbsup:, I'll try it on my next game!

About distance, please make it so we do not lose any piece of information (e.g. if a transport works on a 5 tiles route, even if it will take 3 turns, there will still be a movement left on the last turn). Also, it'd be great to know how many transports are needed for a given trade route and to be able to synchronize their departure. For instance,
If you produce your cigars in your capital,
and harvest tobacco from a city which has a simple warehouse (Marathon: 300 units max) and is 10 turns away (~ 20 tiles) from your capital,
then you need two wagons.
It'd be nice to be able to set complex routes like
  • Turn 1: First wagon leaves the capital.
  • Turn 10: First wagon arrives in harvesting city and loads tobacco. Second wagon leaves the capital.
  • Turn 11: First wagon leaves harvesting city.
  • Turn 20: First wagon arrives in the capital and unloads tobacco. Second wagon arrives in harvesting city and loads Tobacco.
  • Turn 21: First wagon leaves the capital. Second wagon leaves harvesting city.
  • etc.

Also, features such as:
  • the possibility to ask a transport to be full prior to move to the next stop,
  • the possibility to set up multiple stops on a single Trade Route.
would be most useful.
 
Small Update.

I have basicly finished the last Popup Screen that will allow you to Assign and Unassign Trade Routes from a specific Transport Unit. I have uploaded and added two Screen Shots to the 2nd post showing this new Popup Screen.

I am now moving to a Testing and Polishing Phase. I'll give another update in a few days. :king:
 
Weren't you the guy defending the trade route system like two weeks ago? ;)

I was defending wagon automation, which in my opinion isn't totally useless (unlike pioneer automation). But route spam is still horrendous. :p
 
If you added some custom artwork too, that would be great.
Y'know, like fingerpaintings and stuff made with macaroni and glue?

Don't know about macaroni and glue, it is messy and might get on the furniture, but how about a cat colored with crayons and a paper plate Abe Lincoln? :lol:
 
I was defending wagon automation, which in my opinion isn't totally useless (unlike pioneer automation). But route spam is still horrendous.
I believe you were touting the virtues of being able to assign multiple trade routes to Wagon Trains...

But yes, the import/export system should probably be scrapped. A trade route should only be created when you create one with a source city, a destination city and a yield (and probably how much to move/keep).
 
Back
Top Bottom