Git Product home page Git Product logo

nautilus's People

Contributors

ahk1221 avatar alexejhero avatar brett-taylor avatar cattlesquat avatar celvro avatar deadmor0z avatar dingodjango avatar eldritchcarmaker avatar github-actions[bot] avatar govorunb avatar indigocoder1 avatar jkohlman avatar jonahnm avatar k07h avatar kai-bat avatar leetwentythree avatar metious avatar mrpurple6411 avatar neisesmike avatar primesonic avatar ramuneneptune avatar samuramongedev avatar tinyhoot avatar toebeann avatar veld-dev avatar vlad-00003 avatar vlyon avatar zorgesho avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

nautilus's Issues

Post Patch Method failure on startup

Which game contains the issue?

Subnautica Below Zero

Which Release is affected?

Release 2.14 & also tested on Release 2.12.1

Additional Comment

There seems to be an issue envoking the post patch method on startup. Not sure if caused by SMLHelper directly or by a mod calling it.

Error Snippet from QMod Log:

[QModManager:ERROR] Invoking the specified entry method "PostPatch" failed for mod "SMLHelper"
[QModManager:ERROR] System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeLoadException: Could not load type of field 'SMLHelper.V2.Patchers.CustomSoundPatcher:CustomSounds' (0) due to: Could not resolve type with token 0100002b (from typeref, class/assembly FMOD.Sound, Assembly-CSharp-firstpass, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null) assembly:Assembly-CSharp-firstpass, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null type:FMOD.Sound member:(null) signature:<none>
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <eae584ce26bc40229c1b1aa476bfa589>:0 
   --- End of inner exception stack trace ---
  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00048] in <eae584ce26bc40229c1b1aa476bfa589>:0 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <eae584ce26bc40229c1b1aa476bfa589>:0 
  at QModManager.Patching.QModPatchMethod.TryInvoke () [0x00034] in <0da21e14cfb64f0bb694361829b4a8b7>:0

Documentation page on gadgets

Describe the feature
Page with examples of gadget usage, also points to the GadgetExtensions class for an extensive list of methods.

Purpose
It is very difficult even for the Nautilus developers themselves to remember all the ways to do things.

New category in docs: “Prefab Creation”

Describe the feature
A new category in the table of contents to hold all prefab-related docs.

Purpose
To separate the copious amounts of prefab related information from general features.

Known tech generic sounds & messages

Describe the feature
A bunch of references to vanilla sounds/strings for the KnownTech system, either in the docs or in a specialized class for this data.

Purpose
It is annoying looking through runtime editor every time you want to add something.

Usage
Access through documentation page or classes like KnownTech.UnlockMessages.FishUnlock and KnownTech.UnlockSounds.FishUnlock.

Cannot interact with Mods menu using controller

For the stock Options menu you can navigate using a controller with the Dpad and A/B for select and back. Trying to enter the Mods menu with the controller highlights the Mods button but otherwise has no effect. You do need to hit back to get to any of the Stock options menus.

This is for version 2.15 on Subnautica Living Large update.

Not compatible with other mods that adds new items

With the current state of development, this mod can conflict with any other mods that adds new items into the game.
This happens because the cache system of SMLHelper can associate already used IDs (from other mods) to new items (from SMLHelper).
This incompatibility problem will not occur for RandyKnapp's mods tho (since his mods items ID have been hardcoded into SMLHelper).

Asset Bundle documentation

Describe the feature

  • Broad asset bundle guide.
  • Specific asset bundle tutorial (add a craftable item).

Purpose
These are useful.

Usage
Nautilus documentation.

(SBZ) PDALogHandler does not show subtitles

PDALogHandler.AddCustomEntry(string key, string languageKey, Sprite icon = null, FMODAsset sound = null)

Subtitles does not appear, however the sound is played and the log is added to "Logs" tab of the PDA

Feature Requests

Potential new abstract child classes

Spawnable child classes
Buildable child classes

- Crafter : Based on CustomFabricatorBuildable from CC2 and crafting tree methods from CraftTreeHandler (Released in 2.5.2)

Craftable child classes

Potential new virtual properties

Properties on Spawnable
  • InventoryItemSize : Based on item size method in CraftDataHandler
    • Would go hand in hand with an IsPickupable property similar to the CustomFishPrefab, which would default to true
    • Would default to 1x1
  • CompostableBioFuel : Based on methods from BioReactorHandler
    • Would default to 0, implying that the item isn't to be used as biofuel
  • Edible : Based on ideas in CustomFoodPrefab from CC2
Properties on Craftable
  • CraftingTime : Based on crafting time methods in CraftDataHandler
    • Would default to 0, implying that no patching should be applied and default crafting time will be used

Other changes

  • Include a standardized way of locking blueprints behind encyclopedia entries;
    Ensure that these blueprints start unlocked when playing in Creative mode or become unlocked when using the "unlock all" command.
  • Mod Options menu that allows a textbox for keyboard input

Allow crafting nodes & tabs in the same space

Describe the feature
No idea what it is, I got it from Eldritch.

private static class Test21
        { 
            [HarmonyPatch(typeof(uGUI_CraftingMenu), nameof(uGUI_CraftingMenu.IsGrid))] 
            private static void Postfix(uGUI_CraftingMenu.Node node, ref bool __result)
            { 
                __result = ShouldGrid(node);
            }

            private static bool ShouldGrid(uGUI_CraftingMenu.Node node)
            {
                var craftings = 0;
                var tabs = 0;

                foreach (var child in node)
                {
                    if (child.action == TreeAction.Expand) tabs++;
                    else if (child.action == TreeAction.Craft) craftings++;
                }

                return craftings > tabs;
            }

            [HarmonyPatch(typeof(uGUI_CraftingMenu), nameof(uGUI_CraftingMenu.Collapse))] 
            private static void Postfix(uGUI_CraftingMenu.Node parent)
            {
                if (parent == null) return;

                if (parent.action != TreeAction.Craft) return;

                parent.icon.SetActive(false);
            }
        }

Automatic icon loading for Spawnable doesn't work

The directions to simply place a .png in the mod directory don't work, because it looks in the wrong place, because AssetsFolder doesn't default to the mod directory.

Assembly.GetExecutingAssembly() is the wrong call here; at that instant, code from SMLHelper is running, so it will always return the SMLHelper directory.

https://github.com/SubnauticaModding/SMLHelper/blob/8dc2aae055f52cf0b9e2fdaf8a61dd768cc6bc17/SMLHelper/Assets/Spawnable.cs#L184

Leading to:

[SMLHelper/Error] Sprite for 'SurveyToolPrefab'
Did not find an image file at 'C:\Program Files (x86)\Steam\steamapps\common\Subnautica\QMods\Modding Helper\SurveyTool.png'

Presumably this wants to just reference the internal Mod field set by ModPrefab, yes?

https://github.com/SubnauticaModding/SMLHelper/blob/8dc2aae055f52cf0b9e2fdaf8a61dd768cc6bc17/SMLHelper/Assets/ModPrefab.cs#L81

CraftData.Get behaves differently for base pieces between Constuct and Deconstruct

How to reproduce:

  1. Call CraftDataHandler.SetTechData([techType], [techData]); with an existing base piece and a new recipe different from the original
  2. Enter the game in non-Creative mode
  3. Construct the edited base piece. Observe the consumed items.
  4. Deconstruct the base piece. Observe the returned items.
    The items consumed and returned are not the same.

Can't register prefab after the player patch

Describe the bug
When registering a prefab after the player patch, the item doesn't show properly in the PDA techs:

  • when loading a save just after the game start, the prefab show up even i the tech isn't unlocked
  • when loading a save for the second time after the game start, the prefab doesn't show up in the PDA and then it works fine

To Reproduce
Steps to reproduce the behavior:

  1. Create a prefab with a condition to unlock it.
  2. Add a coroutine waiting for the player.
  3. Register the prefab inside this coroutine.
  4. Start the game with a new save.
  5. Open the PDA and see the item already unlocked.

Expected behavior
The tech should show up only when the tech type is unlocked.

Not build

Error CS0117 "uGUI_SceneLoading" does not contain a definition for "BeginAsyncSceneLoad"
what am I doing wrong?

Violation of the GPL terms.

The master branch that has been imported into the project yesterday is in direct violation of the GNU GPL version 3 terms.
This license indicates that copyright notices must remain intact. More information here:
https://www.gnu.org/licenses/gpl-3.0.html
https://www.gnu.org/licenses/gpl-faq.en.html

For developpers: ⚠️Be careful to not merge the changes from the new master branch in your fork or you will be in turn violating the GPL terms. Or make sure to modify the copyright notice from "Copyright @ 2023 Subnautica Modding Community" to "Copyright @ 2019"⚠️

Radio log tutorial

Describe the feature
Radio log tutorial in documentation. Can be super short.

Sliders are not compatible with the OnChange attribute

Describe the bug
Mod option sliders created through the attribute system throw an error when the OnChange attribute is added and hardly function.

To Reproduce
Steps to reproduce the behavior:

  1. Install Nautilus example mod
  2. Attempt to change a slider value
  3. Check error log

Expected behavior
No errors & value changes properly.

Screenshots
image
image

[Error  : Unity Log] InvalidOperationException: Late bound operations cannot be performed on types or methods for which ContainsGenericParameters is true.
Stack trace:
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
HarmonyLib.Traverse.GetValue (System.Object[] arguments) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
Nautilus.Options.Attributes.MemberInfoMetadata`1[T].InvokeMethod (T config, System.Object[] arguments) (at <88913b91a6014dc8933bf1ac419772ff>:0)
Nautilus.Options.Attributes.ConfigFileMetadata`1[T].InvokeEvent[TSource] (Nautilus.Options.Attributes.MemberInfoMetadata`1[T] memberInfoMetadata, System.Object sender, TSource e) (at <88913b91a6014dc8933bf1ac419772ff>:0)
Nautilus.Options.Attributes.ConfigFileMetadata`1[T].InvokeOnChangeEvents[TSource] (Nautilus.Options.Attributes.ModOptionAttributeMetadata`1[T] modOptionMetadata, System.Object sender, TSource e) (at <88913b91a6014dc8933bf1ac419772ff>:0)
Nautilus.Options.Attributes.ConfigFileMetadata`1[T].InvokeOnChangeEvents (Nautilus.Options.Attributes.ModOptionAttributeMetadata`1[T] modOptionMetadata, System.Object sender) (at <88913b91a6014dc8933bf1ac419772ff>:0)
Nautilus.Options.Attributes.ConfigFileMetadata`1+<DeferredInvokeOnChangeEventsRoutine>d__38[T].MoveNext () (at <88913b91a6014dc8933bf1ac419772ff>:0)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <bd0d47c27bd84106afaaecc2c74cdb94>:0)

Exceptions in CellManager.RegisterGlobalEntity while loading game

Exceptions while loading game with builded objects with cellLevel = LargeWorldEntity.CellLevel.Global.

Registering stray entity AlterraGaspodCollector
 
(Filename: C:\plastic_workspace_unity\Runtime/Export/Debug/Debug.bindings.h Line: 35)

NullReferenceException: Object reference not set to an instance of an object
  at CellManager.RegisterGlobalEntity (UnityEngine.GameObject ent) [0x00006] in <44640028752f4a3fa44ae650c0744fda>:0 
  at CellManager.RegisterEntity (LargeWorldEntity lwe) [0x00020] in <44640028752f4a3fa44ae650c0744fda>:0 
  at LargeWorldEntity.Start () [0x0006c] in <44640028752f4a3fa44ae650c0744fda>:0 

It happens because at the moment of prefab creating LargeWorldStreamer.globalRoot is not created yet.

Docs page on asynchronous prefab construction

Describe the feature
Does not need to be elaborate, but a beginner's guide with examples and tips and tricks would be nice. We should also warn beginners that asynchronous prefabs are visible in the world at the origin while being constructed, so you need to set them inactive.

New prefab component utilities

Describe the feature

  • PrefabUtils.AddEnergyMixin(???)
  • PrefabUtils.AddStorageContainer(???)
  • PrefabUtils.AddEatable(???) [sic]
  • Make sure the constructable one is in the right file

Purpose
Reduces repetition of redundant code, allows us to document vanilla features, provide default values, reduce the chance of forgetting important steps, and reduces prefab creation code length by several lines.

Usage
Use these methods with GameObject creation.

Add exception when using AddGadget to override an existing Gadget

Describe the feature

  • Add an exception that is thrown whenever an existing gadget may be overridden
    • Perhaps define a new type of exception, named DuplicateGadgetException or something similar
  • RemoveGadget<TGadget>() method to allow for manual removal of Gadgets
  • Documentation to discourage beginners from calling AddGadget(...)

Purpose
It is currently very easy for beginners to override gadgets without being aware of it, therefore erasing any changes made through extension methods and such. It is not clear when this happens. AddGadget should only be reserved for extension methods and advanced use cases.

Habitat Builder not working on MS and newer Subnautica versions

I can open the Construction UI and so far, modded items do appear (cyclops docking mod) but clicking on any buildable items, vanilla or not causes nothing to happen. The UI stays open, but it's as if clicks do not register.
I Have gone and removed all other mods, testing 2 versions with SMLHelper installed, and a version with only QMM installed, and if i install SMLH it causes the habitat builder to stop working as described above.
I would completely understand if this isn't going to be patched until Steam and Epic versions update, but if you are willing to update and attempt to fix this bug, I will supply anything I'm able to in order to get it fixed
Attached files are the QMM log, after running the game with only SMLH
qmodmanager_log-Subnautica.txt

Vehicle Upgrade Module framework

Describe the feature
Allow users to create vehicle upgrade modules for vanilla vehicles with custom actions on completion, for the Cyclops Seamoth and Cyclops.

Language Overrides not compatible with string.format

We need to select a different set of wrapping characters than { and } and these cause issues when the language line starts or ends with a string.format placeholder {0}, {1},... {#}.
Possibly even look into how this system might be affected when line breaks are added.

Language Overrides for User provided translations

Multi-language support is very limited among Subnautica mods today.
Typically, only if the mod author directly adds multi-language support themselves will their mod have it.

This proposed feature would allow any mod built with SMLHelper to receive user provided translations and enable multi-language support with no additional work for the mod author.

I have a proposed, multi-step process to achieving this.

Step 1
Capture all calls into the LanguageHandler's SetLanguageLine method and store the requests into a separate data structure.
For ease of use, separate all requests by calling assembly, so each mod's language lines are put together.

Step 2
In a new folder "/Modding Helper/LanguageOriginal", write a file for each mod that supplied language entries.
Use a format that is easy to read and edit, along with being easy serialize, and deserialize to and from a Dictionary structure.
This will be the template or starting file that a user will copy and edit to provide transactions.
The file should be named after the calling assembly to make it easier to match files with mods.

Step 3
Inside a different folder "/Modding Helper/LanguageOverrides", look for files that match the same names as the mod assemblies.
This file will provide a the overrides to the language entries that the mod originally provide.
Use these entries to override everything in the LanguagePatcher customLines dictionary with the user provided lines.

When all is said and done, the end result will be that the user provided text will be used instead of the text originally provided by the mod assembly.
This will allow users to create translation files and incorporate them into their mods without any intervention on behalf of the mod author.

Nautilus options do not appear when SMLHelper is installed

Describe the bug
Nautilus options do not appear when SMLHelper is installed.

To Reproduce
Steps to reproduce the behavior:

  1. Install Nautilus
  2. Install SMLHelper
  3. Install DebugHelper or another Nautilus mod with config

Expected behavior
All config files show.

Mod Databank Entries system

Describe the feature
A databank entry for every mod that has the name, version, author and an optional description.

Nautilus not adding ScanningGadget into build menu

Description
Nautilus not adding ScanningGadget into build menu

To Reproduce
Make a customprefab and assign a gadget, then try to add it to a TechGroup/TechCategory, it will not show up in game.
Example:

namespace TestMod
{
    internal class TestPrefab
    {
        public static ScanningGadget TestGadget { get; private set; }
        public static PrefabInfo Info { get; private set; } = PrefabInfo
            .WithTechType("testgadget", "test gadget", "test")
            .WithIcon(SpriteManager.Get(TechType.SmallLocker));
        public static void Register() 
        {
            var customPrefab = new CustomPrefab(Info);

            TestGadget = new ScanningGadget(customPrefab) {
                RequiredForUnlock = TechType.SmallLocker              
            };

            CraftDataHandler.AddToGroup(TechGroup.InteriorModules, TechCategory.InteriorModule, Info.TechType);

            var testobj = new CloneTemplate(Info, TechType.SmallLocker);
            customPrefab.SetGameObject(testobj);
            customPrefab.SetRecipe(new RecipeData()
            {
                craftAmount = 1,
                Ingredients = {
                new Ingredient(TechType.Titanium, 1)
                }
            });         
            customPrefab.AddGadget(TestGadget)
                .SetBuildable(true);
            customPrefab.Register();
        }
    }
}

This does not work, its let you spawn in the buildable but It doesn't show up in the build menu

Expected behavior
CraftDataHandler.AddToGroup actually doing what its supposed to do

KeyCode from ConfigFile input doesn't recognize controller

I'll probably fix this, just tracking the issue.

When I try to use KeyCode in QuickSlots+ it allows my 360 controller to activate the input, but it doesn't recognize any inputs afterwords except from keyboard.

For reference: https://github.com/celvro/QuickSlotsPlus/blob/53a81b7cac80ee491e0f398cedcdb336ecf5847b/StandardConfig.cs#L25-L65

In a related controller issue, you can't select the Toggle Headers from SMLHelper in the mod options.
SubnauticaModding/QModManager#275

Not compatible with mods that adds new entries to the Mobile Vehicle Bay

With actual state of development, SML Helper is overwriting entries of the Mobile Vehicle Bay added by other mods.
This happens because SML Helper is taking ownership of game's CraftTree (thus CraftNodes) by overriding the CraftTree method "Get()" instead of manipulating the CraftTree directly.

Implement proper prefab cache

Describe the feature
Cache prefabs in a dictionary (string, GameObject) after being constructed, and return this every time the prefab is grabbed in the future. These prefabs are never destroyed until the world is exited. This dictionary is static and is reset every time the main menu scene is loaded.

Purpose
The current cache only stops prefabs from appearing at the map origin and does not cache anything properly.

Usage
It would all be automatic for modders. All they need to know is that ideally their GetGameObject method will only ever be called once.

Sprite patching issue in Subnautica Experimental

Game Version: 65667

[SMLHelper/Error] Caught exception while trying to initialize SMLHelper
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
  at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key)
  at SMLHelper.V2.Patchers.SpritePatcher.GetSpriteGroup (SpriteManager+Group groupKey)
  at SMLHelper.V2.Patchers.SpritePatcher.Patch()
  at SMLHelper.V2.Initializer.Initialize()
  at SMLHelper.V2.Initializer.PostPatch()

Issue in: SpritePatcher

Modded command history not working properly with SMLHelper installed

Describe the bug
Modded command history is not accessible with the arrow keys when SMLHelper & Nautilus are installed at the same time.

To Reproduce
Steps to reproduce the behavior:

  1. Download SMLHelper
  2. Download DebugHelper or another mod that adds commands
  3. Try to run a command properly
  4. Press the up arrow

Expected behavior
All command history is shown.

Fix Submodica releases

Describe the bug
The Submodica release does not work and cannot be updated.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Submodica
  2. Navigate to either Nautilus upload
  3. Try to upload a new version

Expected behavior
Should be allowed to upload new versions.

Screenshots
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.