[MODCOMP] Extra Trade Commerce Modifiers

TheLopez

Deity
Joined
Jan 16, 2006
Messages
2,525
Location
Oregon
Extra Trade Commerce Modifiers v0.1BtS
By: TheLopez

Last Update: 09/14/10

Version: v0.2BtS
Patch Compatibility: Beyond the Sword v3.19
MP Compatible: ?
Download Mod v0.2BtS

Description:
This mod adds a new tag <TradeCommerceModifiers> allowing modders to specify
commerce modifiers for when a city gets trade routes with another city. For
instance the philosophical trait has been changed so every trade route also
gives 50% culture and food for each base profit point:
Code:
      <TradeYieldModifiers>
        <iYield>50</iYield>
        <iYield>0</iYield>
        <iYield>0</iYield>
      </TradeYieldModifiers>
      <TradeCommerceModifiers>
        <iCommerce>0</iCommerce>
        <iCommerce>0</iCommerce>
        <iCommerce>50</iCommerce>
      </TradeCommerceModifiers>
Meaning, a trade route that provides 2 gold will also provide 1 extra food
yield and 1 extra culture per turn.

Installation Instructions:

1) Unzip this into the "bts_install_folder\Mods\" folder.
2) Open the CivilizationIV.ini configuration file
3) Change the Mod line to read: Mod = Mods\Extra Trade Commerce Modifiers
4) Load the game.
5) Then play as normal.

-----Notes to Modmakers-----

If you want to use the Extra Trade Commerce Modifiers in your mod I have tried to make
things as easy as possible for you. In the XML files modified sections are
enclosed by:
<!-- -->
<!-- Extra Trade Commerce Modifiers Start -->
<!-- -->
and
<!-- -->
<!-- Extra Trade Commerce Modifiers End -->
<!-- -->

In the SDK files I have added // < Extra Trade Commerce Modifiers Start > and
// < Extra Trade Commerce Modifiers End > in all of the places that I have
made changes to the original files.

In the python files I have added # < Extra Trade Commerce Modifiers Start > and
# < Extra Trade Commerce Modifiers End > in all of the places that I have
made changes to the original files.

-----Version Information-----

-----v0.2BtS------

- Changed the <TradeCommerceModifiers> tag to act like the
<TradeYieldModifiers>. This means that the values are specified as % values
instead of absolute values. In addition the interface has been reworked to
display decimal values for both TradeCommerceModifiers and
TradeYieldModifiers.

- Mousing over trade routes in the city screen provide detailed information on
what extra yields and commerces are available from the trade route.

- Modified the city screen itself has been modified to display only the trade
profit since all of the yield/commerce information does not fit on one line
when using numbers with decimals.
Spoiler :

-----v0.1BtS------

- Extra Trade Commerce Modifiers infrastructure

- Added the <TradeCommerceModifiers> tag to the trait infos structure and added
example usage of the new tag to the philosophical trait.

- Discovered that the <TradeYieldModifiers> tag does not work as advertised but
I won't provide a fix unless someone actually reads this note and sends me a
message :)


-----===Credits & Thanks===-----

- Exavier - Composite Mod - readme.txt format

- ripple01 - for the idea for this mod

- Valkrionn - for ideas on how to improve this mod comp.
 
I can indeed, makes sense though if you're as busy as you are.

Busy? Who's busy... BTW, speaking of that typo, I will have a new release of the Air Combat Experience mod later today.
 
So this ain't working?
Spoiler :
Man, that sucks. Would be nice if this gets fixed :)

Well it works but not very well from what I can tell. To get it to work you need the other trade partner to be a gigantic city producing a lot commerce for the bonus to happen. And even when it does happen the results get divided by 100 meaning that the 10 :hammers: you expect from :traderoute: don't really happen. I need to go pickup a munchkin from school right now. After that I will double confirm that the <TradeYieldModifier> isn't working as expected.
 
Well it works but not very well from what I can tell. To get it to work you need the other trade partner to be a gigantic city producing a lot commerce for the bonus to happen. And even when it does happen the results get divided by 100 meaning that the 10 :hammers: you expect from :traderoute: don't really happen. I need to go pickup a munchkin from school right now. After that I will double confirm that the <TradeYieldModifier> isn't working as expected.

OK, thanks. As I understand it, a city which generates 10:commerce: (from trade) won't get 1:hammers: based on the +10%:hammers: from :traderoute:?
 
this will work afaik. imo 5/10/20/25/50/100 will work.

1 production for 20 commerce, 1 production for 10 commerce, 1 production for 5 commerce, 1 production for 4 commerce, 1 production for 2 commerce, 1 production for 1 commerce.
 
this will work afaik. imo 5/10/20/25/50/100 will work.

1 production for 20 commerce, 1 production for 10 commerce, 1 production for 5 commerce, 1 production for 4 commerce, 1 production for 2 commerce, 1 production for 1 commerce.

When you make your changes look at the civilopedia and tell me what you see... maybe its just me but it doesn't make sense.
 
the description is missleading.

20% production out of trade routes means: 20% of the trade route commerce from a single trade route will be additional production.

20% of 5 is 1. so 1 production for 5 commerce. you would receive 5 commerce (unchanged) and 1 production - for every trade route. if you have a trade route with 10 commerce, the bonus would be +2 production.
 
the description is missleading.

20% production out of trade routes means: 20% of the trade route commerce from a single trade route will be additional production.

20% of 5 is 1. so 1 production for 5 commerce. you would receive 5 commerce (unchanged) and 1 production - for every trade route. if you have a trade route with 10 commerce, the bonus would be +2 production.

Its very misleading... so have you ever had a city with a 10 commerce trade route? I think part of the problem is that the numbers are as ints instead of floats. Another problem is that the civilopedia should show that the value is a percentage instead of an absolute value.
 
Alright, so this is what I am observing... So what I am understanding is that there is a % sign missing in the civilopedia right?
 

Attachments

  • tradeyieldmodifiers.JPG
    tradeyieldmodifiers.JPG
    213.5 KB · Views: 108
Oh I did'nt remember the % was even missing. :D Yes, but +x% from trade routes could still be missleading. the exact text key would be:

+1'yield' per '100/value' commerce per trade route

but this would lead to +1'yield' per 6.67 commerce per trade route (if the value was 15) which seems also bad to me.

maybe we need a completely new setting like

+1'yield' on trade routes with at least X commerce. (like the financial feature)

or:

+X'yield' on trade routes with at least Y commerce.
 
Oh I did'nt remember the % was even missing. :D Yes, but +x% from trade routes could still be missleading. the exact text key would be:

+1'yield' per '100/value' commerce per trade route

but this would lead to +1'yield' per 6.67 commerce per trade route (if the value was 15) which seems also bad to me.

maybe we need a completely new setting like

+1'yield' on trade routes with at least X commerce. (like the financial feature)

or:

+X'yield' on trade routes with at least Y commerce.

I hope this issue will be fixed. Defenitely something for the UP :)
 
Updated to v0.2BtS that resolves a host of issues... check out the version info
 
Nice update, TheLopez. Would it be difficult to add a TradeYieldChanges and TradeCommerceChanges component to this in cases where you don't want a percentage modifier, just a flat # change? For example, if one wanted every trade route to add 2 gold. Or 1 hammer.

Also, in your fist post you have "Meaning, a trade route that provides 2 gold will also provide 1 extra food yield and 1 extra culture per turn." I think it would be clearer if you changed it to "Meaning, a trade route that provides 2 COMMERCE...."

As I'm sure you know, commerce is split into science, gold, and espionage depending on your sliders.

Again, thanks much for this modcomp and I hope others can get some use out of it like I can.

Cheers,
ripple01
 
Nice update, TheLopez. Would it be difficult to add a TradeYieldChanges and TradeCommerceChanges component to this in cases where you don't want a percentage modifier, just a flat # change? For example, if one wanted every trade route to add 2 gold. Or 1 hammer.
I will add it to my to do list. I am trying to address requests as they come in.

Also, in your fist post you have "Meaning, a trade route that provides 2 gold will also provide 1 extra food yield and 1 extra culture per turn." I think it would be clearer if you changed it to "Meaning, a trade route that provides 2 COMMERCE...."
In the code it is actually called trade profit which is how the amounts for yields and commerces are determined. I translated trade profit to gold but I can see how doing that could be confusing.
 
Top Bottom