Roads/Railroads Interface Question

Rodman49

Chieftain
Joined
Nov 3, 2005
Messages
80
Phungus recommended that I ask this question here as he says you guys have a better handle on Civ4's interface than anyone else.

Currently I want to make a very small mod (for a map/scenario) which does two small things: adds +1 :commerce: to a tile when a road is built (like in Civ2) and adds +1 :hammers:to a plot when a railroad is built. I want these changes to show up in the bottom left when a player highlight roads or railroads.

Is there anyway to do this? Thanks in advance.
 
I suspect you'll need to build a custom DLL using the C++ SDK. Routes can add yields to improvements (RR add +1:hammers: to Mines, Quarries, and Lumbermills), but I don't think the basic game allows routes to add yields or commerce to any plot.

This is definitely a question for the SDK/Python forum. BUG doesn't have any game altering features like this, and you may find someone who's already built this themselves.

As for displaying the effect, that would be done in CvGameTextMgr.cpp in a function probably named setRouteHelp() to tell the player that building the route will have an effect. The yield for a plot is already handled by setPlotHelp(); as long as your mod changes the yield for the plot when the route is built, the game will take care of displaying it when the player hovers over the map.
 
Back
Top Bottom