I found that Bureaucracy stopped working a turn later than expected. When I looked into it, I found that TurnsSincePolicyAdopted returns a lower value than expected:
When I adopt a policy in turn N and use TurnsSincePolicyAdopted in an effect in turn N+1, I get 0!
Well, maybe it is intended, after all I only issued the order to adopt it in turn N, while N+1 is the first turn that it actually in effect. But querying when it has been adopted, I get N.
TurnsSincePolicyAdopted
Moderator: Committer
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: TurnsSincePolicyAdopted
When do you consider turn N to end and turn N+1 to start, and when does the server consider that increment to happen?
Re: TurnsSincePolicyAdopted
Well, that's a good question...
Fact is that when i adopt a policy in turn 1, then finish my turn, the game shows the following values:
Actually, I am pretty sure last time I used Indoctrination, it gave 0.25 in the first round after being adopted, now it give 0. So it seems it hasn't always been like that.
Fact is that when i adopt a policy in turn 1, then finish my turn, the game shows the following values:
- current turn = 2
- adopted in = 1
- turns since adopted = 0
Actually, I am pretty sure last time I used Indoctrination, it gave 0.25 in the first round after being adopted, now it give 0. So it seems it hasn't always been like that.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: TurnsSincePolicyAdopted
That fixes it!
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: TurnsSincePolicyAdopted
Any other related issues? I'd check for additional (or less?) "Unknown" meter modifications in the effect accounting due to client-server inconsistencies.
Re: TurnsSincePolicyAdopted
I haven't noticed any other issues and I guess I would have spotted unknown meter modifications. Strangely enough it did not even affect all TurnsSince-functions. E.g. Bootstrapping (TurnsSinceColonized) works with or without your fix.
Re: TurnsSincePolicyAdopted
Btw, I found another issue, maybe somehow related:
The Situation Report window now always displays "Initial turn", no matter which turn's messages it shows.
The Situation Report window now always displays "Initial turn", no matter which turn's messages it shows.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich