First Impressions

A forum for chatting about in-development game features.
Post Reply
nweismuller
Posts: 424
Joined: Wed Apr 29, 2015 2:33 am

First Impressions

Post by nweismuller »

Digging into the diplo_issues.lua file, I note a 'bias' figure intended to set first impressions, and an effect labelled 'everybody loves Phidi' in the code. Is it intended that Phidi not get negative first impressions? Because, I can say from experience, Phidi get negative first impressions. If I am parsing the code in this section correctly, the effect is more like 'Phidi love everybody' than 'everybody loves Phidi'- making it so that when somebody contacts a Phidi empire, the Phidi will have a positive first impression of them AND have the relations boost for being 'Friendly'. I can't be entirely sure if this is a bug, which is why I'm asking for intent rather than reporting in the bug report thread.
User avatar
sven
Site Admin
Posts: 1621
Joined: Sat Jan 31, 2015 10:24 pm
Location: British Columbia, Canada
Contact:

Re: First Impressions

Post by sven »

nweismuller wrote:I can't be entirely sure if this is a bug, which is why I'm asking for intent rather than reporting in the bug report thread.
It's a bug :oops: I'm referencing the right empire here, but, the variable I should be checking is 'other_empire.species', not 'other_empire.race'. (I use 'race' and 'species' inconsistently in the code, which is a problem I should really get around to fixing.)

As of the next patch, Phidi should always get positive first impressions. (Which is the correct intention, though Arioch or others may soon convince me that it's an unreasonable buff.)

That said, there have been outstanding diplomacy bugs in which I manage to confuse who's who one each side of the transaction. (Until yesterday afternoon, the trade charter revenues calculations were reversed, relative to my intention.)

Thanks for the report :) And bonus points for digging through the Lua.
nweismuller
Posts: 424
Joined: Wed Apr 29, 2015 2:33 am

Re: First Impressions

Post by nweismuller »

Out of curiousity: how do trade charter revenues work, precisely? What would having things be reversed affect?
User avatar
sven
Site Admin
Posts: 1621
Joined: Sat Jan 31, 2015 10:24 pm
Location: British Columbia, Canada
Contact:

Re: First Impressions

Post by sven »

nweismuller wrote:Out of curiousity: how do trade charter revenues work, precisely? What would having things be reversed affect?
Basically, right now, you're getting foreign trade routes equal to 20% of your partner's total trade routes (not including whatever routes *they're* getting from trade charters). Foreign trade routes generate twice as much trade income as domestic trade routes. So, if you have no transports assigned to trade, you get nothing from trade charters, but, if you do have a number of trade ships, and the empires you're trading with have large trading economies, it can work out to a significant bonus income. (Though to really take good advantage of it, you'll probably need to build more trade ships.)

The relevant raw code in trade_charter.lua is:

Code: Select all

function Empire.trade_charter_routes(empire,other)
  local r = max(2, round | .2 * other.raw_trade_capacity)
  if empire.species=='phidi'
    r*=2
  end
  return r
end
So, once again, Phidi are getting special bonus (they collect twice as many foreign trade routes as other species). The old bug was referencing 'empire.raw_trade_capacity', which meant that you were getting 20% of your own domestic routes as 'foreign trade routes' :oops:
Post Reply