(3UC) 3rd Unique Component Project

You can do it all entirely within your mod via SQL by making a reference to 3rd/4th UC in your mod, so that 3rd/4th US loads 1st, and then within your SQL using something that is unique to 3rd/4th UC to control whether your mod's info is left intact or removed from the Database.

So your procedure within your mod's XML/SQL files is:
  1. In either SQL or XML, add the new units, improvements, buildings for compatibility with 3rd/4th uniques mod.
  2. Add an SQL file to the mod, and make sure its 'OnModActivated' is lower down the list of stuff your mod has than the code mentioned in step #1. The SQL code of this file then deletes back out of the game's database the unwanted units, buildings, or improvements if 3rd/4th uniques is not active.

    You need to find one 'thing' that is completely unique to 3rd UC to control your SQL 'Delete'. Here is an example where I am deleting a building if Enlightenment Era is not active (ie, there is no 'ERA_ENLIGHTENMENT' in the game's Eras table):
    Code:
    DELETE FROM Buildings WHERE Type = 'BUILDING_LRS_SCIENCE_EE_MARKER' 
    AND NOT EXISTS (SELECT 1 FROM Eras WHERE Type = 'ERA_ENLIGHTENMENT');
    In my mod, I force Enlightenment Era mod to load 1st when both are enabled. This is what is meant by a mod 'Reference'. You set this up in the mod's "Associations" tab of the mod's "Properties". See this post.

    The trick may be in finding something from 3rd UC to 'hang' your SQL delete on
  3. Add a stand-alone xml file and make it the very last thing in your mod that loads into the game's database. If your component is a Building, you then add this code to that final 'clean-up' file:
    Code:
    <GameData>
    	<DeleteMissingReferences table="Buildings" column="Type"/>
    </GameData>
    You only want the commands to delete the missing references in this final file of your mod. Do not place anything else in the same file.
 
@Ajsieg, I kind of just realized that the method I linked in the post above will only work in Lua (since that post was using a lua function), and therefore obviously won't work for XML... oops, my bad... I hope I didn't confuse you too much...
 
@Ajsieg, I kind of just realized that the method I linked in the post above will only work in Lua (since that post was using a lua function), and therefore obviously won't work for XML... oops, my bad... I hope I didn't confuse you too much...

No worries. Heck I might need to use Lua, so thank
 
You can do it all entirely within your mod via SQL by making a reference to 3rd/4th UC in your mod, so that 3rd/4th US loads 1st, and then within your SQL using something that is unique to 3rd/4th UC to control whether your mod's info is left intact or removed from the Database.

So your procedure within your mod's XML/SQL files is:
  1. In either SQL or XML, add the new units, improvements, buildings for compatibility with 3rd/4th uniques mod.
  2. Add an SQL file to the mod, and make sure its 'OnModActivated' is lower down the list of stuff your mod has than the code mentioned in step #1. The SQL code of this file then deletes these back out of the game's database the unwanted units, buildings, or improvements if 3rd/4th uniques is not active.

    You need to find one 'thing' that is completely unique to 3rd UC to control your SQL 'Delete'. Here is an example where I am deleting a building if Enlightenment Era is not active (ie, there is no 'ERA_ENLIGHTENMENT' in the game's Eras table):
    Code:
    DELETE FROM Buildings WHERE Type = 'BUILDING_LRS_SCIENCE_EE_MARKER' 
    AND NOT EXISTS (SELECT 1 FROM Eras WHERE Type = 'ERA_ENLIGHTENMENT');
    In my mod, I force Enlightenment Era mod to load 1st when both are enabled. This is what is meant by a mod 'Reference'. You set this up in the mod's "Associations" tab of the mod's "Properties". See this post.

    The trick may be in finding something from 3rd UC to 'hang' your SQL delete on
  3. Add a stand-alone xml file and make it the very last thing in your mod that loads into the game's database. If your component is a Building, you then add this code to that final 'clean-up' file:
    Code:
    <GameData>
    	<DeleteMissingReferences table="Buildings" column="Type"/>
    </GameData>
    You only want the commands to delete the missing references in this final file of your mod. Do not place anything else in the same file.

Thanks for this great tutorial! :thumbsup:
 
Nice mod but I do have a couple of things to point out. Some of the weaker civs don't really get much out of their 2 extra uniques to at least help their inherent weaknesses.

Rome for instance - There Unique Buildings don't seem all that useful to me. Rome really suffers from the lack of early game gold to pay for all their roads and buildings which you are encouraged to build from the UA. When the devs removed gold from river tiles in BNW civs like Rome that are encouraged to expand got hit really hard.

I think the forum (market) should grant +3 gold (up 2) or change the +25% to +50% gold and also add 1 happiness.

Roman Forums were some of the largest and most spectacular markets in antiquity. This encourage commerce so they should be able to make more gold to pay for all those buildings they'll be constructing.

The Thermae should probably add 1 happiness and be situated at the Engineering technology (this is more suitable then Theology). Rome does need some additional sources of happiness to augment their expansion.

The other civ was Portugal. I think the Casa da Índia (East India Company) should instead of granting additional gold from your trade routes grant an additional +2 trade routes. Portugal is a trading civ and the number of trade routes is generally quite limiting so an extra trade route or 2 would certainly help them.
Quite often you'll need to send trade routes internally for food or production so your not really getting anything from your UA in such circumstances.
They are not a strong civ by any means so I think 2 extra trade routes when they get their UB would be quite suitable.
 
@ Devilous,
The original post should be up-to-date with all the correct information.

@ Redaxe,
Thanks for the input. It might be worthwhile to make one or both of the Roman buildings maintenance-free to offset the road costs. That being said, I have never had a game where August Caesar *didn't* completely dominate after mid-game.

As for Portugal, I like your extra trade routes idea. It's certainly more interesting than a simple Gold buff. I will consider it for any future updates. Thanks!
 

First of all thank you so much for making this mod it is one of my favorite mods of all time, yet may I make a suggestion, for the CSA, maybe the Rifled Cannon should replace the field gun when Enlightenment era is installed and adjust the stats accordingly, because that would actually mean that with enlightenment era installed the Cannon actually comes after the thing that it is supposed to be upgraded from. Also perhaps you could find inspiration for 5th and 6th from other modded civs and taking inspiration from them. Again thank you so much for the work that you and the rest of the modding community do!
 
Hello,

First off, I would like to say that I love these mods! Great work!

But, now it seems that some icons do not show and some civs have duplicate UBs.

For example, Korea has two Seowon UBs and England has the Textile Mill and Steam Mill which both replace the Factory.

For the icons, Ethiopia is missing the icons for both the Oromo Warrior and Monolithic Church, and The Shoshone are missing the icon for Encampment

Here was how my mod installations went:

Installed 3UC/4UC. Both were version 3, so much older than these new ones.
Installed the entire Community Patch mods (there's 6 or so of them)
*I would like to add that everything worked great with the old 3UC/4UC mods*
Deleted 3UC/4UC folders from my MODS folder.
Installed 3UC/4UC, new versions.

Are these new mods no longer compatible with the CPP or did I do something wrong?

Thank you,
Jewnior
 
Hello,

First off, I would like to say that I love these mods! Great work!

But, now it seems that some icons do not show and some civs have duplicate UBs.

For example, Korea has two Seowon UBs and England has the Textile Mill and Steam Mill which both replace the Factory.

For the icons, Ethiopia is missing the icons for both the Oromo Warrior and Monolithic Church, and The Shoshone are missing the icon for Encampment

Here was how my mod installations went:

Installed 3UC/4UC. Both were version 3, so much older than these new ones.
Installed the entire Community Patch mods (there's 6 or so of them)
*I would like to add that everything worked great with the old 3UC/4UC mods*
Deleted 3UC/4UC folders from my MODS folder.
Installed 3UC/4UC, new versions.

Are these new mods no longer compatible with the CPP or did I do something wrong?

Thank you,
Jewnior


It sounds like you have the Community Balance Patch installed. This mod is not, and has never been, compatible with the Community Balance Patch.
 
Hello!

Thank you for creating this&#8212;you've done a fantastic job. I've been playing it quite a bit as Siam, and I have to say I love having the crossbow elephant to go with the knight elephant. The Sala seems out of place, though, as Siam has no particular synergy with great people. Instead, it would be great to see Siam's 4th unique interact with City-States in some way. For example, consider the following additional text for a market replacement:

+2 gold for each trade route between this city and a city-state, and gain one influence per turn with that city-state

in addition to the normal text for a market, this would give Siam a little bit of extra gold to work with, which they tend to need to spend on CS relations. Note that influence degrades at a rate of 1.00 per turn for a Neutral CS, so the market would allow you to halt influence degradation with no other bonuses. By stacking it with other methods of reducing influence degradation, however (for example, a shared religion or the Patronage opener), the Siam player would actually be able to achieve a passive increase in CS influence. Furthermore, it would be hard for this bonus to get out of hand, as the number of CS's it would work on would be limited by trade route slots, and each one would come at the expense of an internal trade route or a more profitable trade route to another civ.

I'm by no means expecting you to make this change, but just thought I'd post that little bit of feedback to see what you think! (And if you do want to use the change, feel free to do so). Thanks again for your great execution of this mod.
 
For Canada, there should be an Avro Arrow project. And if you stop building it before completion, it starts a massive "brain drain" to the nearest civilization... causing Research to plummet in Canada and dramatically increase in the other civilization.
 
Good day! Is there a way to use this great mod without EUI? Or is there a way to leave in EUI only one component, needed for this mod? (Updated: I want to see UCs on civ screen, while select them!!)I play with many mods, and not all of them are compatible with EUI (Health and Plague, for example, brakes built-something-n-city panel(((( )
 
Now that I'm basically done with it, I'll announce that I've finished 5UC. Some of it includes the rejected 3UC work (with fixes and changes), some of it includes a few of my buildings I've released before, and much of it is new stuff using either icons from other mods or ones I've just made for this.

I'd like to release it for others, but I will be looking into permissions first because it includes other's work. I just thought I'd post here to let people know that a 5UC exists.
 
Would you, or anyone, be willing to please make a version of this that was balanced with the Enlightenment Era mod? Some units blend fine, but some overlap like the special French Salon, and Portuguese Galleon, and the Jaeger would be better suited as a light infantry replacement than riflemen (which actually represent line regiments with rifles).
 
Top Bottom