Help with a few code lines

Joined
Feb 3, 2011
Messages
608
Hello

If anyone could help me to add a few code lines to my xml files.

I have already did a number of successful alterations, but mostly in a form of copy and paste, but what I am looking for now, a bit more complex.

1) It seems like game only allows you to build a Lighthouse when city sitting on a ocean coast, but I also would to allow it to build a Lighthouse when its sitting on inner Lake


2) I would like to add to Harbor a +1 Coins bonus for each water tile, but ONLY after Corporations have been discovered. I figured out how to add it permanently, but I want to insert tech check there somehow too.

3) I also can't seem to find where Ivory and Whaling Boats obsolete checks are stored???!!!


4) Is it possible to make that any given nation can discover only ONE Religion? And then, if it already has a religion when it triggers one of the tech's that lets you get another religion, the new religion is not triggered, and another nation, even if it discovers that tech 2nd, gets the 2nd religion, etc?


thank you!
 
Hello

If anyone could help me to add a few code lines to my xml files.

I have already did a number of successful alterations, but mostly in a form of copy and paste, but what I am looking for now, a bit more complex.

1) It seems like game only allows you to build a Lighthouse when city sitting on a ocean coast, but I also would to allow it to build a Lighthouse when its sitting on inner Lake


2) I would like to add to Harbor a +1 Coins bonus for each water tile, but ONLY after Corporations have been discovered. I figured out how to add it permanently, but I want to insert tech check there somehow too.

3) I also can't seem to find where Ivory and Whaling Boats obsolete checks are stored???!!!


4) Is it possible to make that any given nation can discover only ONE Religion? And then, if it already has a religion when it triggers one of the tech's that lets you get another religion, the new religion is not triggered, and another nation, even if it discovers that tech 2nd, gets the 2nd religion, etc?


thank you!

3) is in the Bonus Infos file in terrain - the bonus goes obsolete not the improvement.

4)There is a python mod for limited religions by OrionVetran.
 
1) The lighthouse has
PHP:
<iMinAreaSize>10</iMinAreaSize>

set.
Because it's also a building for only coastal cities, this means it can only be built if the city is located at an "ocean" with at least 10 tiles.

3) what D H said, + it's a warlords file.
 
thank on the Lighthouse info!

on obsolete Ivory - there is no "bonus" file in BTS folder, but there was one in main game folder. I edited it and replaced tech that makes Ivory obsolete with NONE - as I have seen in other examples for other resources - but it still appears as obsolete in game

anyone on #2?
 
thank on the Lighthouse info!

on obsolete Ivory - there is no "bonus" file in BTS folder, but there was one in main game folder. I edited it and replaced tech that makes Ivory obsolete with NONE - as I have seen in other examples for other resources - but it still appears as obsolete in game

anyone on #2?

You should only change files in your mod not the main BtS files.

2)I think there is a tech bonus yield tag in the building infos which may do this. However I expect that you may need to make a building like the harbour but requires corporations.
 
If you are saying that you actually changed the file in the vanilla game's assets then that was a bad plan. It would also explain why it didn't work: there is one in Warlords that overrides the one in vanilla (expansionless Civ).

The game looks for files in CustomAssets (unless you are playing a mod that has No Custom Assets activated in its .ini file), then the mod you are playing (if any - you should be making one, not changing the regular game's files), then BtS, then Warlords, then vanilla. It uses the first one that it finds.
 
It would also explain why it didn't work: there is one in Warlords that overrides the one in vanilla (expansionless Civ).

As The J said...

The game looks for files in CustomAssets (unless you are playing a mod that has No Custom Assets activated in its .ini file), then the mod you are playing (if any - you should be making one, not changing the regular game's files), then BtS, then Warlords, then vanilla. It uses the first one that it finds.

I thought Mod files are prioritized before custom assets files... Are you sure about this order?
 
I thought Mod files are prioritized before custom assets files... Are you sure about this order?

Loading priority is Custom Assets -> Mod folder -> BtS -> Warlords -> Civ4. For this reason you should always set your mod's ini file to not load custom assets.
 
Loading priority is Custom Assets -> Mod folder -> BtS -> Warlords -> Civ4. For this reason you should always set your mod's ini file to not load custom assets.

So if I want to change something in BUG's interface for my mod, how can I do that without including all the BUG files in it?
 
So if I want to change something in BUG's interface for my mod, how can I do that without including all the BUG files in it?

You can't, but you should never rely on periphery files in the custom assets folder. What if a user doesn't install BUG, what if they update BUG to a new version which makes changes to something your mod relies on, what if the user installs the wrong version of BUG, or modifies their custom assets? BUG is small, if you want to use it, put it in your mod's folder, don't rely on custom assets. Also, you never know what a user is going to put in custom assets. What if they start making small tweaks to units/techs and stuff, and plop those files in custom assets?
 
well I created Custom Assets folder inside BTS folder and moved my modified files there (restoring the originals) - they not working - the game is not reading any of my changes from there...

You really should avoid custom assets, it'll lead into problems in the future. Also the custom assets folder already exists, you don't create it, it's along the My Documents path. But again, I suggest you don't do things this way, and instead create a proper mod.
 
You can't, but you should never rely on periphery files in the custom assets folder. What if a user doesn't install BUG, what if they update BUG to a new version which makes changes to something your mod relies on, what if the user installs the wrong version of BUG, or modifies their custom assets? BUG is small, if you want to use it, put it in your mod's folder, don't rely on custom assets. Also, you never know what a user is going to put in custom assets. What if they start making small tweaks to units/techs and stuff, and plop those files in custom assets?

Got it. Thanks.
 
Back
Top Bottom