Skip to content

Instantly share code, notes, and snippets.

@SamuXarick
Last active January 30, 2019 18:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SamuXarick/80b449c63b2b752cc8fa1dfd9e668596 to your computer and use it in GitHub Desktop.
Save SamuXarick/80b449c63b2b752cc8fa1dfd9e668596 to your computer and use it in GitHub Desktop.
AI/GS Config GUI overhaul
==============================================================================================
Editable AI/GS Parameters in the 3 game modes
==============================================================================================
## Version of OpenTTD
2019-01-30-g8334a573
## Expected result
Main Menu:
- GS config in slot, GS instance active, alive: all parameters editable
- GS config in slot, GS instance active, dead: all parameters editable
- GS config in slot, GS instance not active: all parameters editable
- AI company in slot, AI instance active, alive: all parameters editable
- AI company in slot, AI instance active, dead: all parameters editable
- Hu company in slot: all parameters editable
- No company in slot: all parameters editable
Scenario Editor:
- GS config in slot, GS instance active, alive: no parameters editable
- GS config in slot, GS instance active, dead: no parameters editable
- GS config in slot, GS instance not active: all parameters editable
- AI company in slot, AI instance active, alive: no parameters editable
- AI company in slot, AI instance active, dead: no parameters editable
- Hu company in slot: all parameters editable
- No company in slot: all parameters editable
Normal Game:
- GS config in slot, GS instance active, alive: only in-game parameters editable
- GS config in slot, GS instance active, dead: all parameters editable
- GS config in slot, GS instance not active: all parameters editable
- AI company in slot, AI instance active, alive: only in-game parameters editable
- AI company in slot, AI instance active, dead: all parameters editable
- Hu company in slot: all parameters editable
- No company in slot: all parameters editable
## Actual result
Main Menu:
- GS config in slot, GS instance active, alive: not sure
- GS config in slot, GS instance active, dead: not sure
- GS config in slot, GS instance not active: all parameters editable
- AI company in slot, AI instance active, alive: not sure
- AI company in slot, AI instance active, dead: not sure
- Hu company in slot: not sure
- No company in slot: all parameters editable
Scenario Editor:
- GS config in slot, GS instance active, alive: only in-game parameters editable
- GS config in slot, GS instance active, dead: not sure
- GS config in slot, GS instance not active: all parameters editable
- AI company in slot, AI instance active, alive: only in-game parameters editable
- AI company in slot, AI instance active, dead: not sure
- Hu company in slot: only in-game parameters editable
- No company in slot: all parameters editable
Normal Game:
- GS config in slot, GS instance active, alive: only in-game parameters editable
- GS config in slot, GS instance active, dead: not sure
- GS config in slot, GS instance not active: not sure
- AI company in slot, AI instance active, alive: only in-game parameters editable
- AI company in slot, AI instance active, dead: only in-game parameters editable
- Hu company in slot: not sure
- No company in slot: all parameters editable
## Steps to reproduce
- Very boring steps
Issues that currently happen on master:
- AI Config window in SE: loading a scenario of a savegame with multiple human companies,
only one human company is displayed as being human. The other human companies can be selected
and editable. It's not what happens on a NG (normal game).
- AI Config window in SE: loading a scenario of a savegame with AI companies, will allow
selecting and moving AI slots up and down between AIs. This will cause AI crashes when the
scenario is then loaded in a normal game, because they can't handle parameters of AIs that
weren't theirs.
- AI Settings window in SE: non in-game parameters and Reset button are disabled when the slot
is currently belonging to a Hu company.
- AI Settings window in SE or NG: Reset button is enabled for GS when a GS is running, but
disabled for AI when an AI is running. Resetting the GS settings in this way will not consider
whether all parameters are visible and editable.
- AI Config window on a NG: Max no competitors does not consider the first slot being without
a company and will display it as selectable when no more AI companies could start.
- AI Settings window in SE: loading a scenario of a savegame with AI companies, allows editing
of in-game parameters when the instance is active. The way saved AI data is handled in the
scenario editor is different than that in a NG. It's still the same data that was loaded that
will be saved again when saving the scenario. I'm not sure AIs can handle their own parameters
being altered in this manner, because when loading this back in a normal game, it's still
gonna use the previously mentioned loaded data. Doesn't feel right.
==============================================================================================
Possible GS issues in Scenario Editor
==============================================================================================
[00:28] Samu> I have a delicate situation on my hands: on 1.8.0 and master, GS can be edited
in scenario editor with no visual indication of its instance being active or not
[00:29] Samu> my gui stuff exposes that loading a scenario, will always activate the GS
[00:29] Samu> even if i saved it as a configuration
[00:30] Samu> i don't think it's intended for it to load as active, if it wasn't saved as
active
[00:30] Samu> but I'm not sure
[00:30] Samu> need your thoughts on it
[00:31] @peter1138> Nothing should really be active within the scenario editor.
[00:32] Samu> so, it's a bug? a very hidden one?
[00:34] Samu> how am I gonna report the steps for this... it's unnoticeable on 1.8.0
[00:35] @peter1138> Nobody cares about 1.8.0 :p
[00:35] Samu> okay, it's the same as current master
[00:35] Samu> unnoticeable, but it's there
[00:35] @peter1138> Anyway, I thought you said that it's *your* stuff that activates the GS.
[00:36] Samu> no, it's not activated by me
[00:36] @peter1138> 00:29 < Samu> my gui stuff exposes that loading a scenario, will always
activate the GS
[00:36] Samu> i simply made the gui to be able to detect what's active, and it's how I
spotted the bug
[00:36] @peter1138> Ok
[00:36] @peter1138> So by "active" what does it do?
[00:37] @peter1138> Actually run?
[00:37] Samu> the instance is running
[00:37] @peter1138> Maybe it is meant to run? I don't kno!
[00:37] @peter1138> +w
[00:37] Samu> doesn't seem to be doing anything
[00:37] Samu> but it's active
[00:37] Samu> the issue is that on master, the slot is always configurable, i can change to
other gs
[00:38] Samu> that's gonna mix configs of GS's from each other
[00:39] Samu> saved data may be of one GS, but then loaded into the other, that's gonna
conflict for sure and cause issues
Anyone with more expertise regarding this? What to do?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment