Modding Builds.....mainly roads

javaDrummer

Chieftain
Joined
Feb 4, 2015
Messages
5
Location
Ohio
So I have been able to successfully mod a transporter orbital based off the phasal orbital, create a drone by adding artdefines of a lev_destroyer and scaling it back to really really tiny size and added a building (special modified launch pad) but I can not get any mods to BUILD_ROAD in the Builds XML to take. I am trying to do a bridge mod for water tiles. Yes, I think people 1000 years from now that managed to fly through space to find a different planet can manage to build a bridge across a large body of water.

I have added <Water>true</Water> and <CanBeEmbarked>true</CanBeEmbarked>
to the BUILD_ROADS XML but it never shows up as an option in water tiles.

Any help would be greatly appreciated. I have searched the internet for days on this topic and cannot find a solution.

I have onModActivated updatedatabase and have even tried adding <update> to the xml in mod buddy.

Thanks greatly
 
There was a Civ 5 mod that did this called pontoon bridge, or that might be a copy of the original.
Link to the steam files below
http://steamcommunity.com/sharedfiles/filedetails/?id=158739017

When you look at the files, it is much more than a simple XML mod as several scripts had to be altered and changed. you may be able to copy and paste this in (after altering a couple of things) I haven't tried yet.

I was thinking about doing a similar thing and bringing this mod back to create bridges over water, canyons and possibly tunnel through mountains. I think this would be handy but I haven't looked too much at it.
 
As pointed out in another thread, this is easily fixed by loading the mods and then exiting back into the menu and reloading the mods, so that the tables are loaded (but unsynchronized) and then reloaded (thus synchronising them). No fix for that yet then from Fraxis ... tut tut, still keyboard commands will work first time around so you could still perform quick test / compatibility tests without having to load mods twice.
 
I saw the pontoon bridge mod but I can not see the code. It downloads as a .civ5mod and not sure how that opens. I don't have civ 5 and it is not a project or solution so studio won't open it up. If I could get the code for that I would be set. Thanks for everyone's input so far.
 
A .civ5mod file is actially a .7zip archive with a renamed file extension, and can be opened with the free-to-download 7-Zip.

It's worth noting that firaxis made an official version of a pontoon bridge as part of the Civil War scenario in one of the Civ V expansions, which worked by using the variable "AllowsWalkWater" in its xml definition. The same variable is present in the schema in BE so (assuming this variable still functions in BE) making a bridge should be as simple as adding <AllowsWalkWater>true</AllowsWalkWater> to any improvement you can build on a water tile.



Mountain tunnels and canyon bridges may be significantly more difficult. :(
 
Thank you HandyVac! I should be able to figure it out from here. I haven't tried AllowsWalkWater yet but I may try that first. Thanks to all!
 
If the logic is the same as CivV, expect the AI to spam bridges all along the coasts. The original pontoon bridges were pre-placed in a scenario and IIRC couldn't actually be built. The code for evaluating bridge sites is flawed and only checks for hexes with N land sides, it doesn't care if they are adjacent, so don't need a bridge. This means you get lots of bridges built in bays. For example, consider a coastal hex surrounded by land - land - water - water - water - water, you don't need a bridge to move from one of the surrounding land hexes to the other, but the AI considers this (central) tile a good place to build a bridge anyway. If you increase the required number of surrounding land tiles to at least 4 (which I think is what CivV does) you then can't build a bridge to an island (eg land - water - water - land - water - water). This wasn't an issue in the scenario as there weren't any islands on the map.
 
The problem I have with AllowsWalkWater is once a unit comes in contact with any build that allows it they can walk on water everywhere until destroyed. The Pontoon bridge Lua code doesn't seem to work for Civ BE. The only mod I made to the code was IMPROVEMENT_BRIDGE, my improvement in my xml instead of his pontoon improvement. I think I need Civ BE lua API. A Lua script seems to be the way to go.
 
Back
Top Bottom