There's an infinite loop when luck is greater than 59 (happens when luck is 60 because 60-50 = 10, and 10/10 =1):
int luckPointsToDistribute = (playerEntity.Stats.LiveLuck - 50) / 10; // (Luck - 50) / 10 if (luckPointsToDistribute > 0) DistributePointsToEqualize(skillLevel, willpowerLevel, luckPointsToDistribute, out luckPointsToSkillLevel, out luckPointsToWillpowerLevel);
The positive value of 1 hits the > 0 condition and is the first/only time DistributePointsToEqualize() gets called. The current method does this:
public static void DistributePointsToEqualize(int level1, int level2, int pointsToDistribute, out int additionToLevel1, out int additionToLevel2) { int pointsLeft = pointsToDistribute; additionToLevel1 = 0; additionToLevel2 = 0;
while (pointsToDistribute > 0) { if (level1 + additionToLevel1 < level2 + additionToLevel2) additionToLevel1++; else additionToLevel2++; pointsLeft--; } }
Subtracts from pointsLeft, but the condition checks whether pointsToDistribute > 0 which it always is because it never gets modified. Infinite loop is triggered and the game spins out forever (hang/crash with CPU still trying to calculate things revving out).
The corrected code is ... while (pointsLeft > 0) ...
Check for pointsLeft instead, and everything works. I recompiled from source and tested with 100 luck. This fixes the crashes for LUCK being above 59.
I know this is 4 years old by now, so if the original author pleases, I can clone and re-upload this mod with the fixes.
I fixed this, and fixed the issue of falling out of the sky when exiting a building. This was compiled and tested against rc 1.1.0
I'll keep fixing what I find, and since I have no permissions on the project I cloned and uploaded here. https://www.nexusmods.com/daggerfallunity/mods/718
Meritamas, if you want, I will remove the updated version and feel free to incorporate these minor bugfixes.
I fixed it. Still get this weird "houses inside houses" bug sometimes (if you anchor outdoors you won't be affected) but otherwise it works. https://file.io/j17Hu5L5DMuO Bah, file.io is a one time link? https://www.dropbox.com/s/070b8jz335pgrmg/advanced%20teleportation.dfmod?dl=0
Another mod that sounds awsome and then you read the comments, pitty.
Since current version of DFU it´s supposed to be mostly final one would hope most mods would be up to date, here´s hoping that just like someone mentioned if not og author at least someone can come up with something that does what this promises.
Great concept. Be nice if someone could put out a new mod that does the same thing and gets updated as new versions of DFU come out. This one has been buggy for a long time. It's not the mod author's obligation to maintain, but I think the community would be enriched by a version of this that works properly, in case anyone ever wants to take up the torch.
Can confirm, having high luck makes your game crash when trying to use teleport. Really weird way to be broken, hope we get a fix soon. :(
EDIT: I have the fix for this ladies and gents. It appears to be an issue with integers at or over 1.0 for your luck in the math. Open the dfmod in a text editor (luckily it's just numbers so we can do this) and find line 81 and change it from "- 50" to "/ 10". This way we should be getting less than 1.0 decimal integers and everything is kosher. I haven't tested with over 99 LCK stat however and that might end up breaking it all over again.
Hey JokeDeity, would you be able to PM me the modified .dfmod file? I tried to follow your instructions, but wasn't able to. It would be greatly appreciated. Thanks in advance.
Absolutely, but instead I'll share it with everyone who comes looking instead of just PMing you: https ://file. io/9Jej7xrO4rkk (I don't know how Nexus does with outside links so I broke this up, you'll have to remove the spaces to use the link.)
If OP of this mod requests I'll remove this immediately, but hopefully they come back and fix their mod first.
Thank you very much! Honestly I don't think he will ever patch this up, since he has now released a new mod with Advanced Teleportation included (if you're interested, you should find it searching on the DFU forums). I tried to use that, but I don't seem able to make it work with my old save (no surprises, taken into account my tech-unsavvyness).
Edit: ok, I guess you had to remove it. No prob, thanks for trying.
Hi, I found that mod stops working (game freeze when you try to set anchor or teleport) in case that your luck attribute goes over 59. Last good value is 59. When I lowered value in savegame and remove all Luck enchantment artifacts, mod start working again. So maybe this will help someone. In all cases, this is amazing mod, thank you for it very much.
This mod is unfortunately not functioning properly. I cannot teleport to my set anchors. Check to make sure that the mod has been updated after the date of this comment before downloading, because it probably needs to be updated to the latest version of DFU.
45 comments
int luckPointsToDistribute = (playerEntity.Stats.LiveLuck - 50) / 10; // (Luck - 50) / 10
if (luckPointsToDistribute > 0)
DistributePointsToEqualize(skillLevel, willpowerLevel, luckPointsToDistribute, out luckPointsToSkillLevel, out luckPointsToWillpowerLevel);
The positive value of 1 hits the > 0 condition and is the first/only time DistributePointsToEqualize() gets called. The current method does this:
public static void DistributePointsToEqualize(int level1, int level2, int pointsToDistribute, out int additionToLevel1, out int additionToLevel2)
Subtracts from pointsLeft, but the condition checks whether pointsToDistribute > 0 which it always is because it never gets modified. Infinite loop is triggered and the game spins out forever (hang/crash with CPU still trying to calculate things revving out).{
int pointsLeft = pointsToDistribute;
additionToLevel1 = 0;
additionToLevel2 = 0;
while (pointsToDistribute > 0)
{
if (level1 + additionToLevel1 < level2 + additionToLevel2)
additionToLevel1++;
else
additionToLevel2++;
pointsLeft--;
}
}
The corrected code is
...
while (pointsLeft > 0)
...
Check for pointsLeft instead, and everything works. I recompiled from source and tested with 100 luck. This fixes the crashes for LUCK being above 59.
I know this is 4 years old by now, so if the original author pleases, I can clone and re-upload this mod with the fixes.
I'll keep fixing what I find, and since I have no permissions on the project I cloned and uploaded here.
https://www.nexusmods.com/daggerfallunity/mods/718
Meritamas, if you want, I will remove the updated version and feel free to incorporate these minor bugfixes.
https://file.io/j17Hu5L5DMuO
Bah, file.io is a one time link?
https://www.dropbox.com/s/070b8jz335pgrmg/advanced%20teleportation.dfmod?dl=0
Since current version of DFU it´s supposed to be mostly final one would hope most mods would be up to date, here´s hoping that just like someone mentioned if not og author at least someone can come up with something that does what this promises.
EDIT: I have the fix for this ladies and gents. It appears to be an issue with integers at or over 1.0 for your luck in the math. Open the dfmod in a text editor (luckily it's just numbers so we can do this) and find line 81 and change it from "- 50" to "/ 10". This way we should be getting less than 1.0 decimal integers and everything is kosher. I haven't tested with over 99 LCK stat however and that might end up breaking it all over again.
would you be able to PM me the modified .dfmod file? I tried to follow your instructions, but wasn't able to. It would be greatly appreciated.
Thanks in advance.
https ://file. io/9Jej7xrO4rkk
(I don't know how Nexus does with outside links so I broke this up, you'll have to remove the spaces to use the link.)
If OP of this mod requests I'll remove this immediately, but hopefully they come back and fix their mod first.
Honestly I don't think he will ever patch this up, since he has now released a new mod with Advanced Teleportation included (if you're interested, you should find it searching on the DFU forums). I tried to use that, but I don't seem able to make it work with my old save (no surprises, taken into account my tech-unsavvyness).
Edit: ok, I guess you had to remove it. No prob, thanks for trying.
No prob, in the meantime I was able to open the .dfmod in Unity and correct the C# code. Now everything’s fine.
In all cases, this is amazing mod, thank you for it very much.
Please Update! This mod is unique and special!