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

Custom activations not registered when loading dungeon save #1855

Closed
Interkarma opened this issue Jul 6, 2020 · 2 comments
Closed

Custom activations not registered when loading dungeon save #1855

Interkarma opened this issue Jul 6, 2020 · 2 comments

Comments

@Interkarma
Copy link
Owner

Describe the bug
Reported in forum post https://forums.dfworkshop.net/viewtopic.php?f=22&t=3881&p=45292#p45254. Loading a dungeon save from fresh open does not register custom activation objects. Transitioning out then back into dungeon registers custom activations, as does loading save after transitioning in/out of dungeon.

To Reproduce
Steps to reproduce the behavior are outlined in forum post. To summarise:

  1. Install Climates & Calories mod
  2. Save in dungeon (TODO: Provide test save) in front of fireplace
  3. Exit and restart game
  4. Load test save and note custom activations not working.
  5. Exit and re-enter dungeon and custom activations are working.

Expected behavior
Custom activations to be registered on fresh load in additon to entering dungeon from outside.

@TheLacus Are you able to provide any insight on this one? I'll take a closer look when I can.

@rossipaolo
Copy link
Collaborator

rossipaolo commented Jul 7, 2020

This feature was added with #1768. It should be a pretty straightforward process, maybe the issue is that object names inside dungeons are different in these two situations?

// Invoke any matched custom flat / model activations registered by mods.
string flatModelName = hit.transform.gameObject.name;
int pos = flatModelName.IndexOf(']');
if (pos > 0 && pos < flatModelName.Length - 1)
    flatModelName = flatModelName.Remove(pos + 1);

I'll try to replicate with a minimal mod setup one of these days, unless someone precedes me. I'm not sure if we excluded that this is simply an issue with what the mod does on trigger, rather than trigger itself.

@Interkarma
Copy link
Owner Author

Interkarma commented Jul 8, 2020

Thank you @TheLacus! Yes, it looks like name changing between editor and live was the issue here.

https://forums.dfworkshop.net/viewtopic.php?f=22&t=3881&start=10#p45241

Ralzar is also reporting his mods do not start at all in 0.10.24 when using "[Invoke(StateManager.StateTypes.Start, 0)]". Instead he has to use "[Invoke(StateManager.StateTypes.Game, 0)]", which in turn seems to cause other issues.

Can you think of anything that might have changed in the 0.10.24 round of commits that might cause this? Edit: I should add that I can't reproduce this with a test mod on my side. I'm working with Ralzar to try and help isolate why this might be happening on his side.

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

No branches or pull requests

2 participants