Mods not working in 0.10.24 builds
- Ralzar
- Posts: 2211
- Joined: Mon Oct 07, 2019 4:11 pm
- Location: Norway
Re: Mods not working in 0.10.24 builds
Yup, I removed that line and now the light gets removed. Only problem is, it probably removes a bunch of other lights as well since I no longer limit the method to only remove the torch lights.
Also, the method for adding light to the torch objects is not working either?
Edit: scratch that. All the code works now as long as I comment out
if (dfLights.gameObject.name == "DaggerfallLight [Dungeon]")
in the method for removing vanilla lights.
Also, the method for adding light to the torch objects is not working either?
Edit: scratch that. All the code works now as long as I comment out
if (dfLights.gameObject.name == "DaggerfallLight [Dungeon]")
in the method for removing vanilla lights.
- Ralzar
- Posts: 2211
- Joined: Mon Oct 07, 2019 4:11 pm
- Location: Norway
Re: Mods not working in 0.10.24 builds
Oh wow. Ok I identified the problem.
In Unity Editor:
dfLights.gameObject.name = "DaggerfallLight [Dungeon]"
In Live:
dfLights.gameObject.name = "DaggerfallLight [Dungeon](Clone)"
So I changed this in my code. Now the mod works in Live but does not work correctly in the Editor.
Which is an obvious improvement, but will be hard to compensate for when developing mods...
In Unity Editor:
dfLights.gameObject.name = "DaggerfallLight [Dungeon]"
In Live:
dfLights.gameObject.name = "DaggerfallLight [Dungeon](Clone)"
So I changed this in my code. Now the mod works in Live but does not work correctly in the Editor.
Which is an obvious improvement, but will be hard to compensate for when developing mods...
- Ralzar
- Posts: 2211
- Joined: Mon Oct 07, 2019 4:11 pm
- Location: Norway
Re: Mods not working in 0.10.24 builds
Climates & Calories turned out to be an easy fix, as long as there's not smaller parts of the mod not working that I haven't spotted yet.
It actually needed the change I erroneously assumed Torch Taker needed.
I simply changed
[Invoke(StateManager.StateTypes,Start, 0)]
to
[Invoke(StateManager.StateTypes.Game, 0)]
But maybe someone has any suggestions for a better way to do the torch detection in my post above? Where it works in both live and editor?
It actually needed the change I erroneously assumed Torch Taker needed.
I simply changed
[Invoke(StateManager.StateTypes,Start, 0)]
to
[Invoke(StateManager.StateTypes.Game, 0)]
But maybe someone has any suggestions for a better way to do the torch detection in my post above? Where it works in both live and editor?
- BadLuckBurt
- Posts: 948
- Joined: Sun Nov 05, 2017 8:30 pm
Re: Mods not working in 0.10.24 builds
As seen on Discord:
Code: Select all
If(gameObject.name.StartsWith("DaggerfallLight [Dungeon]"))
DFU on UESP: https://en.uesp.net/w/index.php?title=T ... fall_Unity
DFU Nexus Mods: https://www.nexusmods.com/daggerfallunity
My github repositories with mostly DFU related stuff: https://github.com/BadLuckBurt
.
DFU Nexus Mods: https://www.nexusmods.com/daggerfallunity
My github repositories with mostly DFU related stuff: https://github.com/BadLuckBurt
.
- Ralzar
- Posts: 2211
- Joined: Mon Oct 07, 2019 4:11 pm
- Location: Norway
Re: Mods not working in 0.10.24 builds
Ok new oddity:
I have quite a few lines of RegisterCustomActivation for clicking on fireplaces in dungeons to rest by them.
If I start the game and load a save inside a dungeon: those custom activations no longer work.
Summary of testing:
1 Start game and load save inside dungeon: clicking fire does NOT work
2 Leave dungeon. Enter dungeon: clicking fire works
3 Load save from step 1: clicking fire works
4: Make new save: clicking fire works.
5: Load new save: clicking fire works.
6: Exit game, Start game, load new save: clicking fire does NOT work
If the savegame loading function loads a dungeon, something is changed so flats do not identify in the same way.
There is no errors in Unity Editor. Everything looks fine. But nothing happens if you click one of the flats.
Exit the dungeon and enter again and the flats are clickable again.
I have quite a few lines of RegisterCustomActivation for clicking on fireplaces in dungeons to rest by them.
If I start the game and load a save inside a dungeon: those custom activations no longer work.
Code: Select all
PlayerActivate.RegisterCustomActivation(mod, 101, 0, Camping.RestOrPackFire);
PlayerActivate.RegisterCustomActivation(mod, 101, 5, Camping.RestOrPackFire);
PlayerActivate.RegisterCustomActivation(mod, 210, 0, Camping.RestOrPackFire);
PlayerActivate.RegisterCustomActivation(mod, 210, 1, Camping.RestOrPackFire);
PlayerActivate.RegisterCustomActivation(mod, 41116, Camping.RestOrPackFire);
PlayerActivate.RegisterCustomActivation(mod, 41117, Camping.RestOrPackFire);
Summary of testing:
1 Start game and load save inside dungeon: clicking fire does NOT work
2 Leave dungeon. Enter dungeon: clicking fire works
3 Load save from step 1: clicking fire works
4: Make new save: clicking fire works.
5: Load new save: clicking fire works.
6: Exit game, Start game, load new save: clicking fire does NOT work
If the savegame loading function loads a dungeon, something is changed so flats do not identify in the same way.
There is no errors in Unity Editor. Everything looks fine. But nothing happens if you click one of the flats.
Exit the dungeon and enter again and the flats are clickable again.
- Interkarma
- Posts: 7251
- Joined: Sun Mar 22, 2015 1:51 am
Re: Mods not working in 0.10.24 builds
Are you using any event(s) to trigger your method that performs registration of custom activation?
- Ralzar
- Posts: 2211
- Joined: Mon Oct 07, 2019 4:11 pm
- Location: Norway
Re: Mods not working in 0.10.24 builds
I do not feel I’m qualified to answer that, so I’ll just link the code:Interkarma wrote: ↑Sun Jul 05, 2020 10:41 pm Are you using any event(s) to trigger your method that performs registration of custom activation?
https://github.com/Ralzar81/Climates-Ca ... es.cs#L143
When a campfire sprite is clicked, the mod is supposed to run the method RestOrPackFire. But if the sprite was loaded by restoring savedata, the mod does not recognise the clicked item as a campfire and does not run the method.
RestOrPackFire:
https://github.com/Ralzar81/Climates-Ca ... ng.cs#L123
- Interkarma
- Posts: 7251
- Joined: Sun Mar 22, 2015 1:51 am
Re: Mods not working in 0.10.24 builds
Sounds like an internal issue perhaps. The code process of transitioning into a dungeon from outside and setting up dungeon when loading a save are slightly different. This would best be answered by TheLacus as the designer of this system. Would you mind making an Issue report on git outlining this issue and tagging @TheLacus in description?
https://github.com/Interkarma/daggerfall-unity/issues
If you guys are unable to get a solution together, I'll take a look at the issue when I can.
https://github.com/Interkarma/daggerfall-unity/issues
If you guys are unable to get a solution together, I'll take a look at the issue when I can.
- Ralzar
- Posts: 2211
- Joined: Mon Oct 07, 2019 4:11 pm
- Location: Norway
Re: Mods not working in 0.10.24 builds
Cool. I submitted an issue.Interkarma wrote: ↑Sun Jul 05, 2020 11:27 pm Sounds like an internal issue perhaps. The code process of transitioning into a dungeon from outside and setting up dungeon when loading a save are slightly different. This would best be answered by TheLacus as the designer of this system. Would you mind making an Issue report on git outlining this issue and tagging @TheLacus in description?
https://github.com/Interkarma/daggerfall-unity/issues
If you guys are unable to get a solution together, I'll take a look at the issue when I can.
Funny thing is, you can fix the issue while playing by doing the following:
While inside dungeon and experiencing the error:
1: Save
2: Leave dungeon
3: Enter dungeon
4: Load the save
Because then the actual dungeon is loaded by transitioning into it and the loading of the savegame just handles any variations in monsters, loot content etc.
Last edited by Ralzar on Mon Jul 06, 2020 6:46 am, edited 1 time in total.
- Interkarma
- Posts: 7251
- Joined: Sun Mar 22, 2015 1:51 am
Re: Mods not working in 0.10.24 builds
Hey mate! Sorry, this isn't what I had in mind. I was referring to the custom activation issue specifically. I don't like "shotgun" issues that spray a whole bunch of things that may or may not be related. We like to focus on one specific problem per issue.
The issues with your other mods seem to have been resolved on your end. Is there anything else required there?
I'll close that issue and create one on your behalf for the custom activation problem.
The issues with your other mods seem to have been resolved on your end. Is there anything else required there?
I'll close that issue and create one on your behalf for the custom activation problem.