From 586467540b1d9bc907f892a04407dc0030ce7c71 Mon Sep 17 00:00:00 2001 From: Dave Corley Date: Thu, 3 Apr 2025 03:01:17 -0700 Subject: [PATCH 1/6] FIX: Clarify that `ignore` field of raycast options types are a list and not a single object --- files/lua_api/openmw/nearby.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/files/lua_api/openmw/nearby.lua b/files/lua_api/openmw/nearby.lua index ea1b8738bc..9b320db821 100644 --- a/files/lua_api/openmw/nearby.lua +++ b/files/lua_api/openmw/nearby.lua @@ -59,7 +59,7 @@ -- @field [parent=#nearby] #COLLISION_TYPE COLLISION_TYPE --- --- Result of raycasing +-- Result of raycasting -- @type RayCastingResult -- @field [parent=#RayCastingResult] #boolean hit Is there a collision? (true/false) -- @field [parent=#RayCastingResult] openmw.util#Vector3 hitPos Position of the collision point (nil if no collision) @@ -69,7 +69,7 @@ --- -- A table of parameters for @{#nearby.castRay} -- @type CastRayOptions --- @field openmw.core#GameObject ignore An object to ignore (specify here the source of the ray) +-- @field openmw.core#ObjectList ignore An array of objects to ignore (specify here the source of the ray, or other objects which should not collide) -- @field #number collisionType Object types to work with (see @{openmw.nearby#COLLISION_TYPE}) -- @field #number radius The radius of the ray (zero by default). If not zero then castRay actually casts a sphere with given radius. -- NOTE: currently `ignore` is not supported if `radius>0`. @@ -92,7 +92,7 @@ --- -- A table of parameters for @{#nearby.castRenderingRay} and @{#nearby.asyncCastRenderingRay} -- @type CastRenderingRayOptions --- @field #table ignore A list of @{openmw.core#GameObject} to ignore while doing the ray cast +-- @field openmw.core#ObjectList ignore A list of @{openmw.core#GameObject} to ignore while doing the ray cast --- -- Cast ray from one point to another and find the first visual intersection with anything in the scene. From 1d1ae1c906679a40b68c80a630103311d66a636a Mon Sep 17 00:00:00 2001 From: Dave Corley Date: Thu, 10 Apr 2025 10:13:42 -0700 Subject: [PATCH 2/6] CLEANUP: But it can also be a single object --- files/lua_api/openmw/nearby.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/lua_api/openmw/nearby.lua b/files/lua_api/openmw/nearby.lua index 9b320db821..2528ed8f3b 100644 --- a/files/lua_api/openmw/nearby.lua +++ b/files/lua_api/openmw/nearby.lua @@ -69,7 +69,7 @@ --- -- A table of parameters for @{#nearby.castRay} -- @type CastRayOptions --- @field openmw.core#ObjectList ignore An array of objects to ignore (specify here the source of the ray, or other objects which should not collide) +-- @field #any ignore An @{openmw.core#GameObject} or @{openmw.core#ObjectList} to ignore (specify here the source of the ray, or other objects which should not collide) -- @field #number collisionType Object types to work with (see @{openmw.nearby#COLLISION_TYPE}) -- @field #number radius The radius of the ray (zero by default). If not zero then castRay actually casts a sphere with given radius. -- NOTE: currently `ignore` is not supported if `radius>0`. @@ -92,7 +92,7 @@ --- -- A table of parameters for @{#nearby.castRenderingRay} and @{#nearby.asyncCastRenderingRay} -- @type CastRenderingRayOptions --- @field openmw.core#ObjectList ignore A list of @{openmw.core#GameObject} to ignore while doing the ray cast +-- @field #any ignore A @{openmw.core#GameObject} or @{openmw.core#ObjectList} to ignore while doing the ray cast --- -- Cast ray from one point to another and find the first visual intersection with anything in the scene. From e512a8e74fca6e1092356d61591a33c379b051f9 Mon Sep 17 00:00:00 2001 From: Dave Corley Date: Thu, 10 Apr 2025 11:42:24 -0700 Subject: [PATCH 3/6] FIX: Add a name to options table in castRenderingRay --- files/lua_api/openmw/nearby.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/lua_api/openmw/nearby.lua b/files/lua_api/openmw/nearby.lua index 2528ed8f3b..f2a3dbbc37 100644 --- a/files/lua_api/openmw/nearby.lua +++ b/files/lua_api/openmw/nearby.lua @@ -102,7 +102,7 @@ -- @function [parent=#nearby] castRenderingRay -- @param openmw.util#Vector3 from Start point of the ray. -- @param openmw.util#Vector3 to End point of the ray. --- @param #CastRenderingRayOptions +-- @param #CastRenderingRayOptions options An optional table with additional optional arguments -- @return #RayCastingResult --- From b68935e9173ad997fe6490046796cff839ba72ec Mon Sep 17 00:00:00 2001 From: Dave Corley Date: Thu, 10 Apr 2025 11:44:34 -0700 Subject: [PATCH 4/6] FIX: Model param of addVfx should not be a header --- files/lua_api/openmw/animation.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/lua_api/openmw/animation.lua b/files/lua_api/openmw/animation.lua index 46f3ff20fc..e0a30ac6e8 100644 --- a/files/lua_api/openmw/animation.lua +++ b/files/lua_api/openmw/animation.lua @@ -221,7 +221,7 @@ -- Can be used only in local scripts on self. Can also be evoked by sending an AddVfx event to the target actor. -- @function [parent=#animation] addVfx -- @param openmw.core#GameObject actor --- @param #string model #string model path (normally taken from a record such as @{openmw.types#StaticRecord.model} or similar) +-- @param #string model path (normally taken from a record such as @{openmw.types#StaticRecord.model} or similar) -- @param #table options optional table of parameters. Can contain: -- -- * `loop` - boolean, if true the effect will loop until removed (default: 0). From 22172f3b0e0419c5fbb4b893a9713f7ed6007e37 Mon Sep 17 00:00:00 2001 From: Dave Corley Date: Thu, 10 Apr 2025 11:48:57 -0700 Subject: [PATCH 5/6] FIX: useAmbientLighting arg of addVfx options is a bool --- files/lua_api/openmw/animation.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/lua_api/openmw/animation.lua b/files/lua_api/openmw/animation.lua index e0a30ac6e8..b5bf50d446 100644 --- a/files/lua_api/openmw/animation.lua +++ b/files/lua_api/openmw/animation.lua @@ -228,7 +228,7 @@ -- * `boneName` - name of the bone to attach the vfx to. (default: "") -- * `particleTextureOverride` - name of the particle texture to use. (default: "") -- * `vfxId` - a string ID that can be used to remove the effect later, using #removeVfx, and to avoid duplicate effects. The default value of "" can have duplicates. To avoid interaction with the engine, use unique identifiers unrelated to magic effect IDs. The engine uses this identifier to add and remove magic effects based on what effects are active on the actor. If this is set equal to the @{openmw.core#MagicEffectId} identifier of the magic effect being added, for example core.magic.EFFECT_TYPE.FireDamage, then the engine will remove it once the fire damage effect on the actor reaches 0. (Default: ""). --- * `useAmbientLighting` - boolean, vfx get a white ambient light attached in Morrowind. If false don't attach this. (default: 1) +-- * `useAmbientLighting` - boolean, vfx get a white ambient light attached in Morrowind. If false don't attach this. (default: true) -- -- @usage local mgef = core.magic.effects.records[myEffectName] -- anim.addVfx(self, 'VFX_Hands', {boneName = 'Bip01 L Hand', particleTextureOverride = mgef.particle, loop = mgef.continuousVfx, vfxId = mgef.id..'_myuniquenamehere'}) From 5ef2cf23b3f17bf0e3db9ff398fe8f08c5c2cc7e Mon Sep 17 00:00:00 2001 From: Dave Corley Date: Tue, 22 Apr 2025 01:50:41 -0700 Subject: [PATCH 6/6] CLEANUP: Loop param, also, is a bool --- files/lua_api/openmw/animation.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/lua_api/openmw/animation.lua b/files/lua_api/openmw/animation.lua index b5bf50d446..d15241afff 100644 --- a/files/lua_api/openmw/animation.lua +++ b/files/lua_api/openmw/animation.lua @@ -224,7 +224,7 @@ -- @param #string model path (normally taken from a record such as @{openmw.types#StaticRecord.model} or similar) -- @param #table options optional table of parameters. Can contain: -- --- * `loop` - boolean, if true the effect will loop until removed (default: 0). +-- * `loop` - boolean, if true the effect will loop until removed (default: false). -- * `boneName` - name of the bone to attach the vfx to. (default: "") -- * `particleTextureOverride` - name of the particle texture to use. (default: "") -- * `vfxId` - a string ID that can be used to remove the effect later, using #removeVfx, and to avoid duplicate effects. The default value of "" can have duplicates. To avoid interaction with the engine, use unique identifiers unrelated to magic effect IDs. The engine uses this identifier to add and remove magic effects based on what effects are active on the actor. If this is set equal to the @{openmw.core#MagicEffectId} identifier of the magic effect being added, for example core.magic.EFFECT_TYPE.FireDamage, then the engine will remove it once the fire damage effect on the actor reaches 0. (Default: "").