## Major features
- Updated to Outer Wilds patch 14

## Improvements
- Added Japanese localization. Thanks TRSasasusu!
- Ghost animator components don't always get removed now (except when
they need to be)

## Bug fixes
- Fixed a bug where ParticleFields assumes you have an Atmosphere and
fails to build your planet if you don't
- Reload configs always reload bundles now
- Fixed a bug where fog preview lights were being affected too much by
node scaling (cause of #574)
- Fixed an issue where fog of bramble nodes was being double scaled
(maybe caused by c9ee5ec1ac38a7ad9b5b9c4c7329ec526bf8cace)
- When loading into a custom star system on the first loop, the time
loop will actually start now.

Thanks coderCleric for the Bramble bug fixes
This commit is contained in:
Nick 2023-09-27 18:05:20 -04:00 committed by GitHub
commit 342606bd03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 198 additions and 62 deletions

View File

@ -1,6 +1,68 @@
{
"$schema": "https://raw.githubusercontent.com/xen-42/outer-wilds-new-horizons/main/NewHorizons/Schemas/translation_schema.json",
"DialogueDictionary": {
"NEW_HORIZONS_WARP_DRIVE_DIALOGUE_1": "探査艇にワープドライブが搭載されました!",
"NEW_HORIZONS_WARP_DRIVE_DIALOGUE_2": "航行記録に新たに追加された“インターステラーモード”にて、別の星系をロックオンします。",
"NEW_HORIZONS_WARP_DRIVE_DIALOGUE_3": "あとはシートベルトを締めて、それから自動操縦ボタンを押すだけでワープできます!"
},
"UIDictionary": {
"INTERSTELLAR_MODE": "インターステラーモード",
"FREQ_STATUE": "Nomai像",
"FREQ_WARP_CORE": "反重力流束",
"FREQ_UNKNOWN": "???",
"ENGAGE_WARP_PROMPT": "{0}へのワープを開始",
"WARP_LOCKED": "自動操縦のロックオン先:\n{0}",
"LOCK_AUTOPILOT_WARP": "星系に自動操縦をロックオンする",
"RICH_PRESENCE_EXPLORING": "{0}を探検中。",
"RICH_PRESENCE_WARPING": "{0}へワープ中。",
"OUTDATED_VERSION_WARNING": "警告\n\nNew Horizonsはバージョン{0}以上でのみ動作します。このOuter Wildsのバージョンは{1}です。\n\nOuter Wildsをアップデートするか、もしくはNew Horizonsをアンインストールしてください。",
"JSON_FAILED_TO_LOAD": "無効なファイル:{0}",
"DEBUG_RAYCAST": "Raycast",
"DEBUG_PLACE": "Place Object",
"DEBUG_PLACE_TEXT": "Place Nomai Text",
"DEBUG_UNDO": "Undo",
"DEBUG_REDO": "Redo",
"Vessel": "船"
},
"OtherDictionary": {
"NOMAI_SHUTTLE_COMPUTER": "<![CDATA[<color=orange>シャトル</color>]]>は現在<![CDATA[<color=lightblue>{0}</color>]]>に停泊している。"
},
"AchievementTranslations": {
"NH_EATEN_OUTSIDE_BRAMBLE": {
"Name": "収容違反",
"Description": "闇のイバラの外で食べられる。"
},
"NH_MULTIPLE_SYSTEM": {
"Name": "旅人",
"Description": "5つの異なる星系を連続して訪れる。"
},
"NH_NEW_FREQ": {
"Name": "異常な周波数",
"Description": "新たな周波数を発見する。"
},
"NH_PROBE_LOST": {
"Name": "失われた接続",
"Description": "偵察機との接続が断たれる。"
},
"NH_WARP_DRIVE": {
"Name": "不正確な伝承",
"Description": "探査艇のワープドライブを使う。"
},
"NH_VESSEL_WARP": {
"Name": "正確な伝承",
"Description": "船でどこかの星系へワープする。"
},
"NH_RAFTING": {
"Name": "イカダといかり",
"Description": "イカダに乗る。"
},
"NH_SUCKED_INTO_LAVA_BY_TORNADO": {
"Name": "ダイクロン",
"Description": "竜巻で溶岩へと吸い込まれる。"
},
"NH_TALK_TO_FIVE_CHARACTERS": {
"Name": "社会",
"Description": "誰か5人と話す。"
}
}
}
}

View File

@ -2,6 +2,7 @@ using NewHorizons.External.Configs;
using NewHorizons.External.Modules;
using NewHorizons.Utility;
using UnityEngine;
namespace NewHorizons.Builder.Atmosphere
{
public static class EffectsBuilder
@ -55,29 +56,19 @@ namespace NewHorizons.Builder.Atmosphere
{
InitPrefabs();
GameObject effectsGO = new GameObject("Effects");
var effectsGO = new GameObject("Effects");
effectsGO.SetActive(false);
effectsGO.transform.parent = sector?.transform ?? planetGO.transform;
effectsGO.transform.position = planetGO.transform.position;
SectorCullGroup SCG = effectsGO.AddComponent<SectorCullGroup>();
SCG._sector = sector;
SCG._particleSystemSuspendMode = CullGroup.ParticleSystemSuspendMode.Stop;
SCG._occlusionCulling = false;
SCG._dynamicCullingBounds = false;
SCG._waitForStreaming = false;
var sectorCullGroup = effectsGO.AddComponent<SectorCullGroup>();
sectorCullGroup._sector = sector;
sectorCullGroup._particleSystemSuspendMode = CullGroup.ParticleSystemSuspendMode.Stop;
sectorCullGroup._occlusionCulling = false;
sectorCullGroup._dynamicCullingBounds = false;
sectorCullGroup._waitForStreaming = false;
var minHeight = config.Base.surfaceSize;
if (config.HeightMap?.minHeight != null)
{
if (config.Water?.size >= config.HeightMap.minHeight) minHeight = config.Water.size; // use sea level if its higher
else minHeight = config.HeightMap.minHeight;
}
else if (config.Water?.size != null) minHeight = config.Water.size;
else if (config.Lava?.size != null) minHeight = config.Lava.size;
var maxHeight = config.Atmosphere.size;
if (config.Atmosphere.clouds?.outerCloudRadius != null) maxHeight = config.Atmosphere.clouds.outerCloudRadius;
var (minHeight, maxHeight) = GetDefaultHeightRange(config);
foreach (var particleField in config.ParticleFields)
{
@ -130,5 +121,48 @@ namespace NewHorizons.Builder.Atmosphere
_ => null,
};
}
private static (float, float) GetDefaultHeightRange(PlanetConfig config)
{
var minHeight = 0f;
if (config.HeightMap?.minHeight != null)
{
if (config.Water?.size >= config.HeightMap.minHeight) minHeight = config.Water.size; // use sea level if its higher
else minHeight = config.HeightMap.minHeight;
}
else if (config.Water?.size != null)
{
minHeight = config.Water.size;
}
else if (config.Lava?.size != null)
{
minHeight = config.Lava.size;
}
else if (config.Base != null)
{
minHeight = config.Base.surfaceSize;
}
var maxHeight = 100f;
if (config.Atmosphere != null)
{
if (config.Atmosphere.clouds?.outerCloudRadius != null)
{
maxHeight = config.Atmosphere.clouds.outerCloudRadius;
}
else
{
maxHeight = config.Atmosphere.size;
}
}
else if (minHeight != 0f)
{
maxHeight = minHeight * 2f;
}
return (minHeight, maxHeight);
}
}
}

View File

@ -42,11 +42,6 @@ namespace NewHorizons.Builder.Body
case StellarRemnantType.NeutronStar:
MakeNeutronStar(go, sector, mod, star.Config.Star);
break;
case StellarRemnantType.Pulsar:
MakeNeutronStar(go, sector, mod, star.Config.Star);
// TODO: add jets, up rotation speed (use a RotateTransform on the star instead of changing sidereal period)
break;
case StellarRemnantType.BlackHole:
MakeBlackhole(go, sector, star.Config.Star);
@ -146,8 +141,6 @@ namespace NewHorizons.Builder.Body
return MakeWhiteDwarf(planet, null, mod, progenitor, proxy);
case StellarRemnantType.NeutronStar:
return MakeNeutronStar(planet, null, mod, progenitor, proxy);
case StellarRemnantType.Pulsar:
return MakeNeutronStar(planet, null, mod, progenitor, proxy);
case StellarRemnantType.BlackHole:
return MakeBlackhole(planet, null, progenitor, proxy);
default:

View File

@ -235,7 +235,11 @@ namespace NewHorizons.Builder.Props
// account for scale (this will fix the issue with screen fog caused by scaled down nodes)
// Set the main scale
brambleNode.transform.localScale = Vector3.one * config.scale;
// Can't just use localScale of root, that makes the preview fog lights get pulled in too much
foreach(Transform child in brambleNode.transform)
{
child.localScale = Vector3.one * config.scale;
}
innerFogWarpVolume._warpRadius *= config.scale;
innerFogWarpVolume._exitRadius *= config.scale;
@ -259,7 +263,7 @@ namespace NewHorizons.Builder.Props
// (it's also located on a different child path, so the below FindChild calls wouldn't work)
// Default size is 70
var fog = brambleNode.FindChild("Effects/InnerWarpFogSphere");
fog.transform.localScale = Vector3.one * config.scale * 70f;
//fog.transform.localScale = Vector3.one * config.scale * 70f; This is already scaled by its parent, don't know why we scale it again
// Copy shared material to not be shared
var fogRenderer = fog.GetComponent<MeshRenderer>();

View File

@ -339,12 +339,6 @@ namespace NewHorizons.Builder.Props
component.gameObject.layer = Layer.IgnoreSun;
}
}
// I forget why this is here
else if (component is GhostIK or GhostEffects)
{
UnityEngine.Object.DestroyImmediate(component);
return;
}
else if (component is DarkMatterVolume)
{
var probeVisuals = component.gameObject.transform.Find("ProbeVisuals");
@ -400,8 +394,15 @@ namespace NewHorizons.Builder.Props
else if (component is Renderer renderer && component.gameObject.GetComponent<ElectricityEffect>() == null) renderer.enabled = true;
else if(component is Shape shape) shape.enabled = true;
// If it's not a moving anglerfish make sure the anim controller is regular
else if(component is AnglerfishAnimController && component.transform.parent.GetComponent<AnglerfishController>() == null) //Manual parent chain so we can find inactive
// If it's not a moving ghostbird (ie Prefab_IP_GhostBird/Ghostbird_IP_ANIM) make sure it doesnt spam NREs
// Manual parent chain so we can find inactive
else if (component is GhostIK or GhostEffects && component.transform.parent.GetComponent<GhostBrain>() == null)
{
UnityEngine.Object.DestroyImmediate(component);
}
// If it's not a moving anglerfish (ie Anglerfish_Body/Beast_Anglerfish) make sure the anim controller is regular
// Manual parent chain so we can find inactive
else if(component is AnglerfishAnimController && component.transform.parent.GetComponent<AnglerfishController>() == null)
{
component.gameObject.AddComponent<AnglerAnimFixer>();
}

View File

@ -54,20 +54,7 @@ namespace NewHorizons.Components.ShipLog
_nextCardIndex = 0;
foreach (var starSystem in Main.SystemDict.Keys)
{
// Get rid of the warp option for the current system
if (starSystem == Main.Instance.CurrentStarSystem) continue;
var config = Main.SystemDict[starSystem];
// Conditions to allow warping into that system (either no planets (stock system) or has a ship spawn point)
var flag = false;
if (starSystem.Equals("SolarSystem")) flag = true;
else if (starSystem.Equals("EyeOfTheUniverse")) flag = false;
else if (config.Spawn?.shipSpawn != null) flag = true;
if (!StarChartHandler.HasUnlockedSystem(starSystem)) continue;
if (flag && Main.SystemDict[starSystem].Config.canEnterViaWarpDrive)
if (StarChartHandler.CanWarpToSystem(starSystem))
{
AddSystemCard(starSystem);
}

View File

@ -459,6 +459,9 @@ namespace NewHorizons.External.Configs
if (Star != null)
{
if (!Star.goSupernova) Star.stellarDeathType = StellarDeathType.None;
// Gave up on supporting pulsars
if (Star.stellarRemnantType == StellarRemnantType.Pulsar) Star.stellarRemnantType = StellarRemnantType.NeutronStar;
}
// Signals no longer use two different variables for audio

View File

@ -154,7 +154,7 @@ namespace NewHorizons.External.Modules.VariableSize
[EnumMember(Value = @"default")] Default,
[EnumMember(Value = @"whiteDwarf")] WhiteDwarf,
[EnumMember(Value = @"neutronStar")] NeutronStar,
[EnumMember(Value = @"pulsar")] Pulsar,
[Obsolete] Pulsar,
[EnumMember(Value = @"blackHole")] BlackHole,
[EnumMember(Value = @"custom")] Custom
}

View File

@ -1,3 +1,4 @@
using Epic.OnlineServices;
using NewHorizons.Components.ShipLog;
using NewHorizons.External;
using NewHorizons.OtherMods.CustomShipLogModes;
@ -64,11 +65,15 @@ namespace NewHorizons.Handlers
}
}
/// <summary>
/// Can the player warp to any system at all
/// </summary>
/// <returns></returns>
public static bool CanWarp()
{
foreach (var system in _systems)
{
if (system.Config.canEnterViaWarpDrive && system.Spawn?.shipSpawn != null && HasUnlockedSystem(system.UniqueID))
if (CanWarpToSystem(system.UniqueID))
{
return true;
}
@ -76,6 +81,11 @@ namespace NewHorizons.Handlers
return false;
}
/// <summary>
/// Do they have the fact required for a system
/// </summary>
/// <param name="system"></param>
/// <returns></returns>
public static bool HasUnlockedSystem(string system)
{
if (_starSystemToFactID == null || _starSystemToFactID.Count == 0)
@ -89,6 +99,26 @@ namespace NewHorizons.Handlers
return ShipLogHandler.KnowsFact(factID);
}
/// <summary>
/// Is it actually a valid warp target
/// </summary>
/// <param name="system"></param>
/// <returns></returns>
public static bool CanWarpToSystem(string system)
{
var config = Main.SystemDict[system];
var canWarpTo = false;
if (system.Equals("SolarSystem")) canWarpTo = true;
else if (system.Equals("EyeOfTheUniverse")) canWarpTo = false;
else if (config.Spawn?.shipSpawn != null) canWarpTo = true;
return canWarpTo
&& Main.SystemDict[system].Config.canEnterViaWarpDrive
&& system != Main.Instance.CurrentStarSystem
&& HasUnlockedSystem(system);
}
public static void OnRevealFact(string factID)
{
if (_factIDToStarSystem.TryGetValue(factID, out var systemUnlocked))

View File

@ -97,6 +97,7 @@ namespace NewHorizons
private bool _playerAwake;
public bool PlayerSpawned { get; set; }
public bool ForceClearCaches { get; set; } // for reloading configs
public ShipWarpController ShipWarpController { get; private set; }
@ -288,8 +289,10 @@ namespace NewHorizons
EnumUtilities.ClearCache();
// Caches of other assets only have to be cleared if we changed star systems
if (CurrentStarSystem != _previousStarSystem)
if (ForceClearCaches || CurrentStarSystem != _previousStarSystem)
{
ForceClearCaches = false;
NHLogger.Log($"Changing star system from {_previousStarSystem} to {CurrentStarSystem} - Clearing system-specific caches!");
ImageUtilities.ClearCache();
AudioUtilities.ClearCache();
@ -467,7 +470,10 @@ namespace NewHorizons
ShipWarpController = SearchUtilities.Find("Ship_Body").AddComponent<ShipWarpController>();
ShipWarpController.Init();
}
if (HasWarpDrive == true) EnableWarpDrive();
if (HasWarpDrive == true)
{
EnableWarpDrive();
}
var shouldWarpInFromShip = IsWarpingFromShip && ShipWarpController != null;
var shouldWarpInFromVessel = IsWarpingFromVessel && VesselWarpHandler.VesselSpawnPoint != null;
@ -490,6 +496,13 @@ namespace NewHorizons
var northPoleSurface = SearchUtilities.Find("BrittleHollow_Body/Sector_BH/Sector_NorthHemisphere/Sector_NorthPole/Sector_NorthPoleSurface").GetComponent<Sector>();
var remoteViewer = SearchUtilities.Find("BrittleHollow_Body/Sector_BH/Sector_NorthHemisphere/Sector_NorthPole/Sector_NorthPoleSurface/Interactables_NorthPoleSurface/LowBuilding/Prefab_NOM_RemoteViewer").GetComponent<NomaiRemoteCameraPlatform>();
remoteViewer._visualSector = northPoleSurface;
// We are in a custom system on the first loop -> The time loop isn't active, that's not very good
// TimeLoop uses the launch codes condition to know if the loop is active or not
if (CurrentStarSystem != "SolarSystem" && PlayerData.LoadLoopCount() == 1)
{
PlayerData.SetPersistentCondition("LAUNCH_CODES_GIVEN", true);
}
}
else if (isEyeOfTheUniverse)
{
@ -579,7 +592,14 @@ namespace NewHorizons
public void EnableWarpDrive()
{
NHLogger.LogVerbose("Setting up warp drive");
PlanetCreationHandler.LoadBody(LoadConfig(this, "Assets/WarpDriveConfig.json"));
// In weird edge case when starting in another system on a new expedition, don't want it to briefly pop up during warp
if (!IsWarpingFromShip)
{
// This is the dialogue that tells them the ship log has a warp drive feature
PlanetCreationHandler.LoadBody(LoadConfig(this, "Assets/WarpDriveConfig.json"));
}
HasWarpDrive = true;
}

View File

@ -15,8 +15,8 @@
<DebugType>none</DebugType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="OuterWildsGameLibs" Version="1.1.13.457" />
<PackageReference Include="OWML" Version="2.9.7" />
<PackageReference Include="OuterWildsGameLibs" Version="1.1.14.768" />
<PackageReference Include="OWML" Version="2.9.8" />
<Reference Include="../Lib/System.ComponentModel.Annotations.dll" />
</ItemGroup>
<ItemGroup>

View File

@ -3507,7 +3507,6 @@
"Default",
"WhiteDwarf",
"NeutronStar",
"Pulsar",
"BlackHole",
"Custom"
],
@ -3515,7 +3514,6 @@
"default",
"whiteDwarf",
"neutronStar",
"pulsar",
"blackHole",
"custom"
]

View File

@ -1,4 +1,5 @@
using NewHorizons.Handlers;
using NewHorizons.Utility.Files;
using NewHorizons.Utility.OWML;
using OWML.Common;
using OWML.Common.Menus;
@ -47,6 +48,7 @@ namespace NewHorizons.Utility.DebugTools
SearchUtilities.Find("/PauseMenu/PauseMenuManagers").GetComponent<PauseMenuManager>().OnSkipToNextTimeLoop();
Main.Instance.ForceClearCaches = true;
Main.Instance.ChangeCurrentStarSystem(Main.Instance.CurrentStarSystem);
Main.SecondsElapsedInLoop = -1f;

View File

@ -4,8 +4,8 @@
"author": "xen, Bwc9876, clay, MegaPiggy, John, Trifid, Hawkbar, Book",
"name": "New Horizons",
"uniqueName": "xen.NewHorizons",
"version": "1.16.4",
"owmlVersion": "2.9.7",
"version": "1.17.0",
"owmlVersion": "2.9.8",
"dependencies": [ "JohnCorby.VanillaFix", "_nebula.MenuFramework", "xen.CommonCameraUtility", "dgarro.CustomShipLogModes" ],
"conflicts": [ "Raicuparta.QuantumSpaceBuddies", "PacificEngine.OW_CommonResources" ],
"pathsToPreserve": [ "planets", "systems", "translations" ]

View File

@ -88,6 +88,8 @@ public static class SchemaExporter
schema.Definitions["NomaiTextType"].EnumerationNames.Remove("CairnVariant");
schema.Definitions["QuantumGroupType"].Enumeration.Remove("FailedValidation");
schema.Definitions["QuantumGroupType"].EnumerationNames.Remove("FailedValidation");
schema.Definitions["StellarRemnantType"].Enumeration.Remove("Pulsar");
schema.Definitions["StellarRemnantType"].EnumerationNames.Remove("Pulsar");
break;
case "Star System Schema":
schema.Definitions["NomaiCoordinates"].Properties["x"].UniqueItems = true;

View File

@ -20,7 +20,7 @@
</None>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NJsonSchema" Version="10.9.0" />
<PackageReference Include="OuterWildsGameLibs" Version="1.1.13.457" IncludeAssets="compile" />
<PackageReference Include="OuterWildsGameLibs" Version="1.1.14.768" IncludeAssets="compile" />
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
</ItemGroup>
<ItemGroup>