adb3nj Posted July 20, 2022 Share Posted July 20, 2022 I'm trying to modify a spell so it only works in a specific location. I added a PackageLocationPrimitive to the relevant cell, and assumed I'd be able to reference it from the spell, but when I go to set the condition PackageData parameter, the dropdown doesn't populate. What am I missing? Link to comment Share on other sites More sharing options...
SKKmods Posted July 20, 2022 Share Posted July 20, 2022 You may find that condition only works on live AI package data. Link to comment Share on other sites More sharing options...
adb3nj Posted July 20, 2022 Author Share Posted July 20, 2022 You may find that condition only works on live AI package data. I'm not sure what that means - could you give an example? Also might you by any chance know how to configure the GetWithinDistance condition? It has a float parameter, which I assume is supposed to correlate to distance, but trying the obvious values (0, 1, 0.1) either disables the spell entirely or seems to enable it everywhere. Link to comment Share on other sites More sharing options...
hereami Posted July 21, 2022 Share Posted July 21, 2022 (edited) I'm some curious if there is any dramatic difference in performance between GetDistance and GetWithinPackageLocation, besides conviniency. PackageData is only relevant while addressed from within a Package, that's it. And this https://www.creationkit.com/index.php?title=GetWithinDistance , probably GetDistance is all what's ever needed.Can use GetInCurrentLoc, GetInCell or something else suitable. Edited July 21, 2022 by hereami Link to comment Share on other sites More sharing options...
adb3nj Posted July 22, 2022 Author Share Posted July 22, 2022 I'm some curious if there is any dramatic difference in performance between GetDistance and GetWithinPackageLocation, besides conviniency. PackageData is only relevant while addressed from within a Package, that's it. And this https://www.creationkit.com/index.php?title=GetWithinDistance , probably GetDistance is all what's ever needed.Can use GetInCurrentLoc, GetInCell or something else suitable. Ha, someone has updated the wiki page to say 'This function does not work'. I also wasn't able to get it to behave as expected. As I said further up, it has a float parameter which I assume is supposed to correlate to distance, but setting it to 0 disables the spell entirely and any non-zero value seems to enable it everywhere. Link to comment Share on other sites More sharing options...
SKKmods Posted July 22, 2022 Share Posted July 22, 2022 GetWithinPackageLocation works fine as a condition on an AI package. It does not work on anything else as it uses package data. Link to comment Share on other sites More sharing options...
adb3nj Posted July 22, 2022 Author Share Posted July 22, 2022 GetWithinPackageLocation works fine as a condition on an AI package. It does not work on anything else as it uses package data. I don't know what that means. The wiki page is for GetWithinDistance though. Link to comment Share on other sites More sharing options...
hereami Posted July 22, 2022 Share Posted July 22, 2022 (edited) PackageLocationPrimitive looks like used as location anchors for some shady purposes of Packages, not even as triggers from what i see briefly. It doesn't mean or do anything by its presence only and is barely useful by itself. Don't know for sure, but maybe it is possible that GetWithinPackageLocation and other Package's processors will check exact volume of the primitive instead of just Radius, and maybe that's the benefit of primitives specified as Locations in Packages, some interesting feature if really so. But once again, all that is useful only while utilized inside a Package, i suppose https://www.creationkit.com/index.php?title=Package. If just want to use Trigger boxes and have a clear understanding why, then would need scripts to handle it, like Events OnTriggerEnter(), OnTriggerLeave() to track who is inside by any available to own imagination means, e.g. attaching/removing ActorValue, MagicEffect, Keyword. I don't know a native way to easily determine being inside a primitive's volume. GetDistance LE some_value would be equal to obsolete GetWithinDistance(some_value) (i guess, it looks like a conviniency macro function), can't see a usage problem here.Some curious hint, quite specific though. If GetDistance has no objectID specified (is NULL) in a magicEffect condition, then distance is checked towards spell Caster (shooter in my experience). Edited July 22, 2022 by hereami Link to comment Share on other sites More sharing options...
adb3nj Posted July 22, 2022 Author Share Posted July 22, 2022 PackageLocationPrimitive looks like used as location anchors for some shady purposes of Packages, not even as triggers from what i see briefly. It doesn't mean or do anything by its presence only and is barely useful by itself. Don't know for sure, but maybe it is possible that GetWithinPackageLocation and other Package's processors will check exact volume of the primitive instead of just Radius, and maybe that's the benefit of primitives specified as Locations in Packages, some interesting feature if really so. But once again, all that is useful only while utilized inside a Package, i suppose https://www.creationkit.com/index.php?title=Package. If just want to use Trigger boxes and have a clear understanding why, then would need scripts to handle it, like Events OnTriggerEnter(), OnTriggerLeave() to track who is inside by any available to own imagination means, e.g. attaching/removing ActorValue, MagicEffect, Keyword. I don't know a native way to easily determine being inside a primitive's volume. GetDistance LE some_value would be equal to obsolete GetWithinDistance(some_value) (i guess, it looks like a conviniency macro function), can't see a usage problem here.Some curious hint, quite specific though. If GetDistance has no objectID specified (is NULL) in a magicEffect condition, then distance is checked towards spell Caster (shooter in my experience). Thank you, I actually just stumbled upon using GetDistance with LE! I noticed it as a condition for an in-game dialogue topic. Testing it now… (I'm trying to stop rad storms from having any effect inside buildings.) Link to comment Share on other sites More sharing options...
hereami Posted July 22, 2022 Share Posted July 22, 2022 Hm, not sure if proximity checks can be any helpful for this task. Link to comment Share on other sites More sharing options...
Recommended Posts