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.
Trade Route Outputs
Moderator: thunderchero
-
- Code Master
- Posts: 304
- Joined: Sat Apr 26, 2008 2:00 am
- Location: 50° N, 11° E
-
- Code Master
- Posts: 304
- Joined: Sat Apr 26, 2008 2:00 am
- Location: 50° N, 11° E
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.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 ?
A discovery consists in seeing something everybody has seen and at the same time thinking something nobody has thought yet.
-
- Code Master
- Posts: 1962
- Joined: Sun Apr 27, 2008 2:00 am
Re: Trade Route Outputs
ds:578B34 (0.05) -> multiplied by current pop source system (loc_447866) -> result (rounded down) stored at [trdeInfo+10h] as effect value.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.
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 at 0x298A4
ds:577BA0 (0.35) effect multiplier for ferengi free trade routes without treaty (i.e. neutral, war=no effect) -> for minors only!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.
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).
Last edited by Spocks-cuddly-tribble on Sun Aug 21, 2022 12:05 pm, edited 3 times in total.
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
-
- Code Master
- Posts: 1962
- Joined: Sun Apr 27, 2008 2:00 am
Credit Output from Incoming Trade Routes
Default output from incoming trade routes is 0.05 * [population of source system] credits per turn (not displayed, but added to total credits).
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 at 0x298A4, also above).
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 at 0x298A4, also above).
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.