From 74a5464a7932b9790cbb1a569cc1e6224251e5fb Mon Sep 17 00:00:00 2001 From: Joshua Thome Date: Mon, 4 Nov 2024 13:17:21 -0600 Subject: [PATCH 1/4] Coalesce to Vector3.zero if attention point offset not specified --- NewHorizons/Builder/Props/DialogueBuilder.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NewHorizons/Builder/Props/DialogueBuilder.cs b/NewHorizons/Builder/Props/DialogueBuilder.cs index 1459230ff..8bd12c86c 100644 --- a/NewHorizons/Builder/Props/DialogueBuilder.cs +++ b/NewHorizons/Builder/Props/DialogueBuilder.cs @@ -343,7 +343,7 @@ private static void MakeAttentionPoints(GameObject go, Sector sector, CharacterD { var ptGo = GeneralPropBuilder.MakeNew("AttentionPoint", go, sector, info.attentionPoint, defaultParent: dialogue.transform); dialogue._attentionPoint = ptGo.transform; - dialogue._attentionPointOffset = info.attentionPoint.offset; + dialogue._attentionPointOffset = info.attentionPoint.offset ?? Vector3.zero; ptGo.SetActive(true); } if (info.swappedAttentionPoints != null && info.swappedAttentionPoints.Length > 0) @@ -354,7 +354,7 @@ private static void MakeAttentionPoints(GameObject go, Sector sector, CharacterD var swapper = ptGo.AddComponent(); swapper._dialogueTree = dialogue; swapper._attentionPoint = ptGo.transform; - swapper._attentionPointOffset = pointInfo.offset; + swapper._attentionPointOffset = pointInfo.offset ?? Vector3.zero; swapper._nodeName = pointInfo.dialogueNode; swapper._dialoguePage = pointInfo.dialoguePage; swapper._lookEasing = pointInfo.lookEasing; From f298c11c7fff298f38381c13961a787efef3cc2d Mon Sep 17 00:00:00 2001 From: Ben C Date: Mon, 4 Nov 2024 19:19:22 +0000 Subject: [PATCH 2/4] Updated Schemas --- NewHorizons/Schemas/body_schema.json | 78 ++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/NewHorizons/Schemas/body_schema.json b/NewHorizons/Schemas/body_schema.json index f759f8e2a..1f2fd9601 100644 --- a/NewHorizons/Schemas/body_schema.json +++ b/NewHorizons/Schemas/body_schema.json @@ -1625,6 +1625,17 @@ "format": "float", "default": 2.0 }, + "attentionPoint": { + "description": "The point that the camera looks at when dialogue advances.", + "$ref": "#/definitions/AttentionPointInfo" + }, + "swappedAttentionPoints": { + "type": "array", + "description": "Additional points that the camera looks at when dialogue advances through specific dialogue nodes and pages.", + "items": { + "$ref": "#/definitions/SwappedAttentionPointInfo" + } + }, "remoteTrigger": { "description": "Allows you to trigger dialogue from a distance when you walk into an area.", "$ref": "#/definitions/RemoteTriggerInfo" @@ -1640,6 +1651,73 @@ } } }, + "AttentionPointInfo": { + "type": "object", + "additionalProperties": false, + "properties": { + "position": { + "description": "Position of the object", + "$ref": "#/definitions/MVector3" + }, + "isRelativeToParent": { + "type": "boolean", + "description": "Whether the positional and rotational coordinates are relative to parent instead of the root planet object." + }, + "parentPath": { + "type": "string", + "description": "The relative path from the planet to the parent of this object. Optional (will default to the root sector)." + }, + "rename": { + "type": "string", + "description": "An optional rename of this object" + }, + "offset": { + "description": "An additional offset to apply to apply when the camera looks at this attention point.", + "$ref": "#/definitions/MVector3" + } + } + }, + "SwappedAttentionPointInfo": { + "type": "object", + "additionalProperties": false, + "properties": { + "offset": { + "description": "An additional offset to apply to apply when the camera looks at this attention point.", + "$ref": "#/definitions/MVector3" + }, + "position": { + "description": "Position of the object", + "$ref": "#/definitions/MVector3" + }, + "isRelativeToParent": { + "type": "boolean", + "description": "Whether the positional and rotational coordinates are relative to parent instead of the root planet object." + }, + "parentPath": { + "type": "string", + "description": "The relative path from the planet to the parent of this object. Optional (will default to the root sector)." + }, + "rename": { + "type": "string", + "description": "An optional rename of this object" + }, + "dialogueNode": { + "type": "string", + "description": "The name of the dialogue node to activate this attention point for. If null or blank, activates for every node." + }, + "dialoguePage": { + "type": "integer", + "description": "The index of the page in the current dialogue node to activate this attention point for, if the node has multiple pages.", + "format": "int32" + }, + "lookEasing": { + "type": "number", + "description": "The easing factor which determines how 'snappy' the camera is when looking at the attention point.", + "format": "float", + "default": 1 + } + } + }, "RemoteTriggerInfo": { "type": "object", "additionalProperties": false, From 1800944671125d331948c69ece7f318e37116b20 Mon Sep 17 00:00:00 2001 From: Noah Pilarski Date: Thu, 7 Nov 2024 12:22:40 -0500 Subject: [PATCH 3/4] uncomment TH flag --- NewHorizons/Builder/General/SpawnPointBuilder.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NewHorizons/Builder/General/SpawnPointBuilder.cs b/NewHorizons/Builder/General/SpawnPointBuilder.cs index fd5b376a8..a38802b6d 100644 --- a/NewHorizons/Builder/General/SpawnPointBuilder.cs +++ b/NewHorizons/Builder/General/SpawnPointBuilder.cs @@ -60,7 +60,7 @@ public static SpawnPoint Make(GameObject planetGO, SpawnModule module, OWRigidbo var minPriority = new SpawnModule.PlayerSpawnPoint() { isDefault = true }.GetPriority(); if (point.GetPriority() < minPriority) { - //flagUseTHSpawn = true; + flagUseTHSpawn = true; } } From 7d2ca14a6510af9d2f36b5dac3cae98f98280bce Mon Sep 17 00:00:00 2001 From: Noah Pilarski Date: Thu, 7 Nov 2024 12:29:15 -0500 Subject: [PATCH 4/4] bump version --- NewHorizons/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NewHorizons/manifest.json b/NewHorizons/manifest.json index 1da382986..36d3e14c1 100644 --- a/NewHorizons/manifest.json +++ b/NewHorizons/manifest.json @@ -4,7 +4,7 @@ "author": "xen, Bwc9876, JohnCorby, MegaPiggy, Trifid, and friends", "name": "New Horizons", "uniqueName": "xen.NewHorizons", - "version": "1.24.4", + "version": "1.24.5", "owmlVersion": "2.12.1", "dependencies": [ "JohnCorby.VanillaFix", "xen.CommonCameraUtility", "dgarro.CustomShipLogModes" ], "conflicts": [ "PacificEngine.OW_CommonResources" ],