Page 1 of 1

Trade Route Outputs

Posted: Thu May 01, 2008 5:03 pm
by Gowron
The default output of a trade route is

[output per turn] = 0.05 * [population of source system] + 0.1 * [population of destination system]


I've now found the two colored multipliers in trek.exe:

0.05
offset: 0x176924
length: 8 bytes (double)

0.1
offset: 0x17692c
length: 8 bytes (double)


Negative values are possible :)


-----------------------------------------------------------------------------------


In addition, there's a third constant at offset 0x176934 (8 bytes as well).
It determines how much a minor race's attitude towards the player will increase per turn if the players has a trade route to the minor race's system.

The default value is 0.05, and their attitude will increase by approximately that many lines (lines in the attitude bar on the F5 screen) per turn, i.e. given the default value, their attitude "should" (without rounding errors) increase by 1 line every 20 turns.

However, rounding errors seem to be a major factor here. If the constant is relatively big, the attitude improvement a bit "too fast", and if it's relatively small, then the improvement is a bit "too slow".
Since the default value of 0.05 is *very* small, the default effect is significantly less than expected, and the real increase is only about 1 line every 30 turns.

The effect is doubled if you have a friendship treaty with them.
If you have an affiliation treaty with them, it's tripled instead.

Of course, in a normal game, there can be a lot of other effects (bribing, battles etc.) that interfere with the rather small (unless modded ;)) influence of trade routes on attitude.

Negative values are possible here as well.

-

Trade routes to major empires also have a mimimal positive influence on their attitude, but it's really small and doensn't seem to pile up over the turns.

Posted: Fri Jul 11, 2008 6:26 pm
by Gowron
Spocks-cuddly-tribble wrote:Is it possible that there is any influence of minor tech levels (how for gifts => low1/high1) or the pop size of the own system as to the changing of a minor race's attitude caused by trade routes ?
It's a very old article, so I don't 100% remember if I tested it, but IMHO it's highly unlikely that the tech levels have anything to do with this.

Re: Trade Route Outputs

Posted: Sun May 08, 2011 5:58 am
by Spocks-cuddly-tribble
Gowron wrote:0x176934 (8 bytes as well).
It determines how much a minor race's attitude towards the player will increase per turn if the players has a trade route to the minor race's system.

The default value is 0.05, and their attitude will increase by approximately that many lines (lines in the attitude bar on the F5 screen) per turn, i.e. given the default value, their attitude "should" (without rounding errors) increase by 1 line every 20 turns.

However, rounding errors seem to be a major factor here. If the constant is relatively big, the attitude improvement a bit "too fast", and if it's relatively small, then the improvement is a bit "too slow".
Since the default value of 0.05 is *very* small, the default effect is significantly less than expected, and the real increase is only about 1 line every 30 turns.
ds:578B34 (0.05) -> multiplied by current pop source system (loc_447866) -> result (rounded down) stored at [trdeInfo+10h] as effect value.


loc_42A483: TradeRouteEffectMinorAttitude

sub_43B680 (GetTrdeInfoEntry) eax=RaceID, edx=TradeRouteID, [EmpsInfo+154h=adr_trdeInfo]

Code: Select all

42A4A2                 imul    ebx, 7  // effect of trade route * 7
-> used as amount value for sub_407A94 (GiftEffectsMinor) i.e. divisor at 407B75 (25dec) & [*1] multipliers (see Gifts to Minor Races: Amounts and Effects)

Gowron wrote:The effect is doubled if you have a friendship treaty with them.
If you have an affiliation treaty with them, it's tripled instead.
ds:577BA0 (0.35) effect multiplier for ferengi free trade routes without treaty (i.e. neutral, war=no effect)

I can't see a friendship resp. affiliation effect modifier (affiliation prevents third party trade routes i.e. additional friendship treaties, of course).


End result is added to the attitude level (range 0-1000, see sub_405930).

Credit Output from Incoming Trade Routes

Posted: Tue Nov 15, 2011 2:54 pm
by Spocks-cuddly-tribble
Default output from incoming trade routes is 0.05 * [population of source system] credits per turn.

For applied credit bonuses, see: viewtopic.php?f=9&t=59

The multiplier (0.05) is stored at 0x176934 // ds:578B34 (8 bytes)

NOTE: The value is also used for the diplomatic attitude of minor races (see above) :!:

However, this can be adjusted via the multiplier at asm-42A4A2 (default 7, also above). :wink: