Open peyre opened 4 years ago
The bigger question is whether you can recall a weak year of R&D ever carrying over to a second turn? When I look at the program, the event code is setting everything properly in news_suq.cpp:
case 3:
case 61:
case 62:// Minus one on all R&D for ONE year
Data->P[plr].RD_Mods_For_Turn -= 1;
Data->P[plr].RD_Mods_For_Year = -1;
break;
The problem you're encountering is when the player R&D turn modifiers are updated in start.cpp, as seen here in Update()
:
Data->P[j].RD_Mods_For_Turn = 0;
if (Data->P[j].RD_Mods_For_Year > 0) {
Data->P[j].RD_Mods_For_Turn = Data->P[j].RD_Mods_For_Year;
Data->P[j].RD_Mods_For_Year = 0;
}
and repeated again in UpdAll(char side)
. For whatever reason, negative modifications to R&D for the year are not being translated to the next turn. I looked back to the Github initial check-in (08fda7b5cc3af7992ca35bc498faa150e9cd8e1e), and the > 0
check is present.
It's actually a little stranger than I expected, since the RD_MODS_FOR_YEAR variable is not zeroed if negative, so it just sits there until the player encounters a "strong R&D for a year" result. At that point, it would (probably) offset the strong R&D's second turn. However, year-long R&D bonuses apparently never happen :(, so it seems nothing will ever be done with RD_MODS_FOR_YEAR.
That's a good question. I've always just assumed it worked right; it wasn't until yesterday that I thought to check and see. Personally I'm inclined to think that one turn is enough time to be under a strong/weak R&D (esp. weak), but it's supposed to be a year. It would be nice if we can fix it.
I think you're right Ryan. I just started up a game and got the "R&D will be weaker for a year" newscast, then next turn my R&D was back to normal. I guess this was a bug no one noticed before (and probably wouldn't have before RIS 1.1, where the strong/weak message started appearing in R&D).
Edit: Just happened again, in the same game. One thing that concerns me about this, if we should look into fixing it, is that it would be rather crippling. It's a -2 to all research, whereas the weak research newscast that's only supposed to last one turn is only -1. If we fix this, maybe we should reverse it so the one that lasts a year is only -1 and the -2 is just for one turn.
Hmm... I wonder. I just received another newscast saying R&D would be weak for a year, and it shows as -1 now (and it also went away after a turn).
It's a -2 to all research, whereas the weak research newscast that's only supposed to last one turn is only -1. If we fix this, maybe we should reverse it so the one that lasts a year is only -1 and the -2 is just for one turn.
It's a good idea in order to keep the game balanced, but the problem is that the code specifically comments a year event with a -1 dice roll, and another year event with a -2 (!). There is not an year event with a +1 or +2 dice roll. So the conditional searching for a positive value never match.
if (Data->P[j].RD_Mods_For_Year > 0)
Unless I'm missing something, the solution is fairly easy, but I think would be a good idea to make the changes considering the gameplay balance.
Of 99 events we have:
So, the newcast will not change, but what will be is that the penalties will actually have an effect for the complete year.
What's your opinion @peyre, will this increase much the difficulty or the "badluck" ?
I definitely agree that the more extreme bad news shouldn't last longer than the less extreme.
Personally I like the idea of strong/weak research lasting for only 1 turn, but if we want to have some lasting for 2 turns they should definitely not be the -2 ones.
I just started a game and received the newscast saying R&D would be slow for a year. Just to check, I had a look the following turn, and R&D was already back to normal. I wondered if this was another case of the newscast text being wrong, but I see the error message is the way it's supposed to be (p. 285 in the Companion). I guess this is a case where the game isn't handling the logic correctly?