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

noted PauseGame oddities #97

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

burner1024
Copy link
Contributor

This one took me long time to figure out... Related discussion.

@lynxlynxlynx
Copy link
Member

Are you sure EA isn't just a < CONTROLLED or GOODCUTOFF check as usual?

Are you sure other globals with good enough EA can't do it?

AddFamiliar should be taking care of proper actor storage, so I doubt MakeGlobal is needed in the example.

AddFamiliar is instant, but it may need a tick more for all the effects to be set up. Or perhaps it just needs a blocking action anywhere in the block, so the actions get queued (testable by moving the wait to the start).

@burner1024
Copy link
Contributor Author

Re-tested more... cre EA doesn't actually have effect, any value works.

Regarding MakeGlobal, I think I'm actually getting inconclusive results, but maybe I've been stuck on this for too long.

Moving the wait to the start breaks it. I was not aware about "blocking" actions and their effect on queue. Is there a list of those?

@lynxlynxlynx
Copy link
Member

Anything that isn't instant (in instant.ids unless iwd2) is blocking and may take indefinite amounts of time to complete. Blocking actions are queued, so start executing on the next tick. It's even more convoluted; if you're interested, here's a pretty good summary:
https://github.com/gemrb/gemrb/blob/master/gemrb/core/GameScript/GameScript.cpp#L23

@burner1024
Copy link
Contributor Author

Revisiting this, as far as I can see:

  1. Everything in the example script is essential: MakeGlobal, AddFamiliar, Smallwait and their order. I couldn't make it work in any other way.
  2. EA value likely doesn't matter (NEUTRAL worked for me)
  3. One workaround is to use ActionOverride(Player1, PauseGame()), but this obviously interrupts player-issued commands.
  4. Other workaround is a minion as described in the example script. (One caveat: MakeGlobal keeps adding cre files to savegame each time, so if pausing is needed repeatedly, better MakeGlobal once and then use the same minion throughout the game with MoveGlobal).

@lynxlynxlynx
Copy link
Member

  1. Have you tried making some random area NPC global? Familiars do have their own block in the structure, but it'd be odd if they were treated specially here.

@burner1024
Copy link
Contributor Author

I didn't.
I seem to remember reading somewhere that See([PC]) would also detect familiars, but can't find it now. I suspect maybe that's why it works in familiar scripts too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants