Cargo ships getting bonuses from its position?

Uighur_Caesar

Comandante en Jefe
Joined
Mar 14, 2015
Messages
1,227
Location
Florida
I wanted to make a unique cargo ship with the following abilities: "Generates Science while outside your territory. +1 Gold for each Sea Resource along their route." I want to make the amount of science gained in the first half proportional to the distance of the cargo ship from its originating city. How would I determine the city from which this cargo ship is originating from? Also how do I determine how many sea resources are along the trade route of the cargo ship?
 
The standard trade route Lua API is very limited - it only relates to the start and destination cities.

Given a trade route, there is no way to ascertain the plots it passes through. Also, there is no way for a player to influence the pathing of a trade route - so if you can get to C from A as A-B1-C or as A-B2-C the player cannot opt to pass through B2 if that has a resource and B1 does not.

Also, given a trade unit, there is no way to get the trade route details for it (without a modded DLL)

W
 
Back
Top Bottom