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

Change: Disable AI and Game Script when loading the title game #9608

Closed
wants to merge 1 commit into from

Conversation

@nielsmh
Copy link
Contributor

@nielsmh nielsmh commented Oct 5, 2021

Motivation / Problem

AI players and game scripts can be valuable tools for producing a title screen game, but having to take them out/disable them before shipping the title game is a big hassle. Let's just pretend the AI/GS isn't there when loading the game instead.

Description

Don't load the Game Script data, don't load AI data, and turn AI players into "human" players, when loading a save game and the game mode is menu.

Limitations

I hope this doesn't break detection of missing AI/GS in the Load Game window... as far as I can tell there isn't anything to break there, so it doesn't.

Checklist for review

Some things are not automated, and forgotten often. This list is a reminder for the reviewers.

  • The bug fix is important enough to be backported? (label: 'backport requested')
  • This PR touches english.txt or translations? Check the guidelines
  • This PR affects the save game format? (label 'savegame upgrade')
  • This PR affects the GS/AI API? (label 'needs review: Script API')
    • ai_changelog.hpp, gs_changelog.hpp need updating.
    • The compatibility wrappers (compat_*.nut) need updating.
  • This PR affects the NewGRF API? (label 'needs review: NewGRF')
@glx22
Copy link
Contributor

@glx22 glx22 commented Oct 5, 2021

Load Game window uses LoadCheck() so indeed nothing to break here.

Loading

@TrueBrain
Copy link
Member

@TrueBrain TrueBrain commented Oct 17, 2021

In my opinion it is very little effort to do this manually once or twice a year. For 12.0 this turned out to be unneeded, as the savegame had no AIs nor GS. But these kind of PRs add technical debt that can also be avoided via other ways. Just my 2 cents, I have no issues if this gets approved and merged :)

Loading

@nielsmh
Copy link
Contributor Author

@nielsmh nielsmh commented Oct 17, 2021

I suppose a branch/patch/script that can be broken out when necessary to take out/disable the scripts in a save file may solve the same problem yes.

Loading

@nielsmh nielsmh closed this Oct 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants