Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

culture level option fix #1397

Merged
merged 1 commit into from
Sep 1, 2022
Merged

Conversation

MattOttawa
Copy link
Member

Maybe this will fix #1394

@github-actions github-actions bot added the dll A C++ issue label Aug 23, 2022
@dzfischer
Copy link
Contributor

dzfischer commented Aug 23, 2022

Unfortunately I think the issue is a little more generic than that. If I'm reading this right, it'll set the culture level of the city to the "correct" level, but there are other parts of the code that do checks like "Is culture level of this city the same as the number of culture infos? If so, then it counts toward culture victory!" and such.
It does work as a spot fix for the border issue, but there's a number of places that'll need similar spot fixing, either already or as a result of this fix.
Could be done this way with spot fixes, but I think (?) updating the getNumCultureLevelInfos and getCultureLevelInfo functions together might be a better solution? Or not, for some reason I do not know.
Edit: Well, actually there might be a good reason in that I think those two functions are wrapped up in savedata... somehow, the wrapper read/write is still a mystery to me, so maybe spot fixes, though ugly (?), could be the way to go if it's being done without savebreak. The actual spotfixes seem to be, at a quick search:
5+ places related to cultural victory condition, the mess with CultureRangeCities in a few places, some AI evaluation, Forgetful.py (?), and at least one event.
Granted these haven't been noticed as being an issue before, but adjusting the threshold in this place only will have knock-on effects on most of these, and so at least the important ones will need to be fixed (i.e. culture victory conditions).

@dzfischer dzfischer merged commit fb35f99 into caveman2cosmos:master Sep 1, 2022
@MattOttawa MattOttawa deleted the fix3 branch December 30, 2022 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dll A C++ issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CultureLevelInfo xml isn't parsed properly
2 participants