Jump to content
Game-Labs Forum

[1.6.0.6] [Code] Tweaks and Fixes v3.10.0: bugfixes, new features for players, support for modders (including new nations and better AI ship generation!)


Recommended Posts

Man really enjoying this in combination with the new NAR version, it did really step up the game a lot!

I know I asked about AI earlier, but do you think you can reenable the AI control button again that the devs disabled some patches ago?

I really like doing custom battles and trying out designs vs each other and to keep it fair I do it mostly AI vs AI.

  • Like 1
Link to comment
Share on other sites

7 hours ago, Astor said:

Man really enjoying this in combination with the new NAR version, it did really step up the game a lot!

Thanks!

7 hours ago, Astor said:

I know I asked about AI earlier, but do you think you can reenable the AI control button again that the devs disabled some patches ago?

I really like doing custom battles and trying out designs vs each other and to keep it fair I do it mostly AI vs AI.

Not something I want to get into. I don't know how much of the code was removed--certainly enough that it would take a fair amount of work even if it does prove to be (reasonably) possible, which I don't know. For now the visual asset is still there, just hidden, but it's completely disconnected from the code / from doing anything.

Link to comment
Share on other sites

  • NathanKell changed the title to [1.6.0.5] [Code] Tweaks and Fixes v3.8.2: bugfixes, new features for players, support for modders (including new nations and better AI ship generation!)

I can't get this to run now. It did run in the past. Getting this message in red on MelonLoader.

[17:28:08.926] [TweaksAndFixes] HarmonyLib.HarmonyException: Patching exception in method null
 ---> System.ArgumentException: Undefined target method for patch method static bool TweaksAndFixes.Patch_Ship_c::Prefix_GenerateRandomShip_b__566_13(Il2Cpp.ComponentData c, Single& __result)
   at HarmonyLib.PatchClassProcessor.PatchWithAttributes(MethodBase& lastOriginal)
   at HarmonyLib.PatchClassProcessor.Patch()
   --- End of inner exception stack trace ---
   at HarmonyLib.PatchClassProcessor.ReportException(Exception exception, MethodBase original)
   at HarmonyLib.PatchClassProcessor.Patch()
   at HarmonyLib.Harmony.<PatchAll>b__11_0(Type type)
   at HarmonyLib.CollectionExtensions.Do[T](IEnumerable`1 sequence, Action`1 action)
   at HarmonyLib.Harmony.PatchAll(Assembly assembly)
   at MelonLoader.MelonMod.HarmonyInit() in D:\a\MelonLoader\MelonLoader\MelonLoader\Melons\MelonMod.cs:line 40
   at MelonLoader.MelonEvent.<>c.<Invoke>b__1_0(LemonAction x) in D:\a\MelonLoader\MelonLoader\MelonLoader\Melons\Events\MelonEvent.cs:line 174
   at MelonLoader.MelonEventBase`1.Invoke(Action`1 delegateInvoker) in D:\a\MelonLoader\MelonLoader\MelonLoader\Melons\Events\MelonEvent.cs:line 143

Link to comment
Share on other sites

On 9/4/2024 at 4:16 PM, NathanKell said:

Make sure the file is named `parts_override.csv` - that is how it needs to be named.

If it still fails to work, please paste its contents in a code block in a reply to this thread.

Hey Nathan,

So I've been trying my best to get this to work all morning but unfortunately with no success.

I've got the file named correctly, at first when i was using the file from your github it wouldn't load because the file name was override_parts, when I changed it to parts_override and press play - the game would kick off melon would start loading and then it would just crash to desktop...

...I tried using UABE to get a fresh parts.txt file which i then used excel to turn into a csv deliminated via commas, i made a change to one line and tried again. It loaded up this time but when i went to the ship designer and load it up it was just a blank port with no options selectable... the changes I made to the csv file was only to the crew size and hull size which I have successfully changed without dramas using the slow UABE method many times.

Do i need to start a new campaign after adding a new csv file to the mod folder?

Link to comment
Share on other sites

I made a change to combine taf_versiontext_mode and taf_versiontext. Now you should supply both the value and the str columns if you are setting that param, rather than putting the mode in one param and the text in the other. @o Barão you will need to update params.csv, sorry.

Link to comment
Share on other sites

  • NathanKell changed the title to [1.6.0.5] [Code] Tweaks and Fixes v3.8.3: bugfixes, new features for players, support for modders (including new nations and better AI ship generation!)

One thing I wondered, how hard would it be to split up the following lines in params?

initial_follow
initial_scout
initial_screen

I think it would be nice to have the option for each class, so for example that DD/TB always have 0 chance to follow while BC or maybe CA have a chance. Or CL having a higher chance to get assigned to scouting.

Link to comment
Share on other sites

Getting this message on the new update 1.6.0.5opt, and TaF 3.8.3
-the duplicate key "sweden" appears on this update, and not the previous 1.6.0.5. No changes has been done inbetween updates.

[13:55:44.601] [TweaksAndFixes] During invoking native->managed trampoline
Il2CppInterop.Runtime.Il2CppException: System.ArgumentException: An item with the same key has already been added. Key: sweden
--- BEGIN IL2CPP STACK TRACE ---
System.ArgumentException: An item with the same key has already been added. Key: sweden
  at System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in <00000000000000000000000000000000>:0 
  at GameData.PostProcessAll () [0x00000] in <00000000000000000000000000000000>:0 
--- END IL2CPP STACK TRACE ---

   at Il2CppInterop.Runtime.Il2CppException.RaiseExceptionIfNecessary(IntPtr returnedException) in /home/runner/work/Il2CppInterop/Il2CppInterop/Il2CppInterop.Runtime/Il2CppException.cs:line 36
   at DMD<Il2Cpp.GameData::PostProcessAll>(GameData this)
   at (il2cpp -> managed) PostProcessAll(IntPtr , Il2CppMethodInfo* )

For reasons unknown when I booted the game back up again this message didn't appear🤔

What the..! its back again. I am so confused

Edited by MDHansen
Link to comment
Share on other sites

17 hours ago, MDHansen said:

Getting this message on the new update 1.6.0.5opt, and TaF 3.8.3
-the duplicate key "sweden" appears on this update, and not the previous 1.6.0.5. No changes has been done inbetween updates.

[13:55:44.601] [TweaksAndFixes] During invoking native->managed trampoline
Il2CppInterop.Runtime.Il2CppException: System.ArgumentException: An item with the same key has already been added. Key: sweden
--- BEGIN IL2CPP STACK TRACE ---
System.ArgumentException: An item with the same key has already been added. Key: sweden
  at System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in <00000000000000000000000000000000>:0 
  at GameData.PostProcessAll () [0x00000] in <00000000000000000000000000000000>:0 
--- END IL2CPP STACK TRACE ---

   at Il2CppInterop.Runtime.Il2CppException.RaiseExceptionIfNecessary(IntPtr returnedException) in /home/runner/work/Il2CppInterop/Il2CppInterop/Il2CppInterop.Runtime/Il2CppException.cs:line 36
   at DMD<Il2Cpp.GameData::PostProcessAll>(GameData this)
   at (il2cpp -> managed) PostProcessAll(IntPtr , Il2CppMethodInfo* )

For reasons unknown when I booted the game back up again this message didn't appear🤔

What the..! its back again. I am so confused

Looks like you have a file with a two lines each starting with `sweden`. It's possible that the older 1.6.0.5 wasn't using the file in the same way, or was doing a set rather than an add and thus the second line was silently stomping the first rather than erroring. So search your CSVs (or textassets) for lines with `sweden` in the first column.

  • Like 1
Link to comment
Share on other sites

35 minutes ago, NathanKell said:

Looks like you have a file with a two lines each starting with `sweden`. It's possible that the older 1.6.0.5 wasn't using the file in the same way, or was doing a set rather than an add and thus the second line was silently stomping the first rather than erroring. So search your CSVs (or textassets) for lines with `sweden` in the first column.

But i did, sooo many times😮‍💨😅 and it has to be the players.csv, once removed all was fine. Ill rexheck it with a fresh pair of eyes, with glasses and a pint of Monster 😬

I did ofc remove sweden in the "minor" section below

Edited by MDHansen
  • Like 1
Link to comment
Share on other sites

8 hours ago, NiKuTa said:

Hi I got an error when start UAD game with Melon Loader mod.

"Failed to initialize MelonLoader: loadLibraryExW failed"

Any tip ?

You probably installed the wrong MelonLoader? But regardless that sounds like something to ask for help about on the MelonLoader discord, I don't know enough about it to be really helpful, sorry.

Link to comment
Share on other sites

  • NathanKell changed the title to [1.6.0.5Opt2] [Code] Tweaks and Fixes v3.9.0: bugfixes, new features for players, support for modders (including new nations and better AI ship generation!)

Hey man, i got this problem when i open shared desings i cant even play the campaing i need help, and this is what happens when I open the ship editor(the image)

 

 

[01:45:40.124] [TweaksAndFixes] During invoking native->managed trampoline
System.TypeInitializationException: The type initializer for 'TweaksAndFixes.Patch_Ship' threw an exception.
 ---> System.TypeLoadException: Could not load type '_GenerateRandomShip_d__562' from assembly 'Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
   at TweaksAndFixes.Patch_Ship..cctor()
   --- End of inner exception stack trace ---
   at DMD<Il2Cpp.Ship::ChangeHull>(Ship this, PartData data, Store store, ShipType manualShipType, Boolean byHuman)
   at (il2cpp -> managed) ChangeHull(IntPtr , IntPtr , IntPtr , IntPtr , Byte , Il2CppMethodInfo* )
[01:45:40.129] [TweaksAndFixes] During invoking native->managed trampoline
Il2CppInterop.Runtime.Il2CppException: System.NullReferenceException: Object reference not set to an instance of an object.
--- BEGIN IL2CPP STACK TRACE ---
System.NullReferenceException: Object reference not set to an instance of an object.
  at Ship.RefreshHull (System.Boolean updateSections) [0x00000] in <00000000000000000000000000000000>:0
  at Ship.LoadUnloadModel (System.Boolean model) [0x00000] in <00000000000000000000000000000000>:0
  at GameManager.RefreshSharedDesign (System.Int32 year, PlayerData nation, System.Boolean forceCreateNew) [0x00000] in <00000000000000000000000000000000>:0
--- END IL2CPP STACK TRACE ---

   at Il2CppInterop.Runtime.Il2CppException.RaiseExceptionIfNecessary(IntPtr returnedException) in /home/runner/work/Il2CppInterop/Il2CppInterop/Il2CppInterop.Runtime/Il2CppException.cs:line 36
   at DMD<Il2Cpp.GameManager::RefreshSharedDesign>(GameManager this, Int32 year, PlayerData nation, Boolean forceCreateNew)
   at (il2cpp -> managed) RefreshSharedDesign(IntPtr , Int32 , IntPtr , Byte , Il2CppMethodInfo* )

Sin título.png

Link to comment
Share on other sites

13 hours ago, fabian said:

Hey man, i got this problem when i open shared desings i cant even play the campaing i need help, and this is what happens when I open the ship editor(the image)

 

 

[01:45:40.124] [TweaksAndFixes] During invoking native->managed trampoline
System.TypeInitializationException: The type initializer for 'TweaksAndFixes.Patch_Ship' threw an exception.
 ---> System.TypeLoadException: Could not load type '_GenerateRandomShip_d__562' from assembly 'Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
   at TweaksAndFixes.Patch_Ship..cctor()
   --- End of inner exception stack trace ---
   at DMD<Il2Cpp.Ship::ChangeHull>(Ship this, PartData data, Store store, ShipType manualShipType, Boolean byHuman)
   at (il2cpp -> managed) ChangeHull(IntPtr , IntPtr , IntPtr , IntPtr , Byte , Il2CppMethodInfo* )
[01:45:40.129] [TweaksAndFixes] During invoking native->managed trampoline
Il2CppInterop.Runtime.Il2CppException: System.NullReferenceException: Object reference not set to an instance of an object.
--- BEGIN IL2CPP STACK TRACE ---
System.NullReferenceException: Object reference not set to an instance of an object.
  at Ship.RefreshHull (System.Boolean updateSections) [0x00000] in <00000000000000000000000000000000>:0
  at Ship.LoadUnloadModel (System.Boolean model) [0x00000] in <00000000000000000000000000000000>:0
  at GameManager.RefreshSharedDesign (System.Int32 year, PlayerData nation, System.Boolean forceCreateNew) [0x00000] in <00000000000000000000000000000000>:0
--- END IL2CPP STACK TRACE ---

   at Il2CppInterop.Runtime.Il2CppException.RaiseExceptionIfNecessary(IntPtr returnedException) in /home/runner/work/Il2CppInterop/Il2CppInterop/Il2CppInterop.Runtime/Il2CppException.cs:line 36
   at DMD<Il2Cpp.GameManager::RefreshSharedDesign>(GameManager this, Int32 year, PlayerData nation, Boolean forceCreateNew)
   at (il2cpp -> managed) RefreshSharedDesign(IntPtr , Int32 , IntPtr , Byte , Il2CppMethodInfo* )

Sin título.png

You have the wrong version of TAF for the version of UAD that you have.

Link to comment
Share on other sites

Sorry to bother you, but there is this one feature in game that has annoyed me from the very beginning, and when I heart about this project of yours @NathanKell I though maybe you could help with it: when in the ship builder often times parts that are meant to fit into each other seamlessly dont do so. Most commonly this becomes an issue with front and aft superstructures, fir example Iowa-style front and the aft superstructure parts. This is because minimum step one can move the parts is too large, and thus there is no way to place the parts accurately enough, resulting ugly gap in between the parts that is clearly not intended to be there.

So, I was wandering if there is a way to do something about accuracy of which one can place the parts. This is ofcourse but an aesthetical issue, but surely I can not be only one driven mad by that.

Link to comment
Share on other sites

19 hours ago, HMS Implosive said:

Sorry to bother you, but there is this one feature in game that has annoyed me from the very beginning, and when I heart about this project of yours @NathanKell I though maybe you could help with it: when in the ship builder often times parts that are meant to fit into each other seamlessly dont do so. Most commonly this becomes an issue with front and aft superstructures, fir example Iowa-style front and the aft superstructure parts. This is because minimum step one can move the parts is too large, and thus there is no way to place the parts accurately enough, resulting ugly gap in between the parts that is clearly not intended to be there.

So, I was wandering if there is a way to do something about accuracy of which one can place the parts. This is ofcourse but an aesthetical issue, but surely I can not be only one driven mad by that.

Hmm. Not sure how doable that is, I don't recall if the snap range is easily moddable (because we can't transpile, and IIRC it's hardcoded, the only two ways to fix it would be if it's in a submethod I can override just that, or if not I would have to reimplement the entire part placement method which is not really viable.) Would need checking.

15 hours ago, fabian said:

Where can I get the corresponding version of TAF? help me bro :(, how i can fix this

 

No idea, because I have no idea what version of UAD you are running. Once you figure that out, look in the changelog in the OP to see which version corresponds to the UAD version you are running, and then download the dll at that state in its history.

Also, please don't double post.

Link to comment
Share on other sites

I am really bad at installing mods but the new NAR release looks so cool! I installed MelonLoader to UAD, downloaded the Tweaks and Fixes .dll, and placed it in my mods folder, but now the game won't boot at all and gives the following error:

[ERROR] il2cpp_init detour failed: Failed to load hostfxr. Please make sure you have installed the .NET 6.0 runtime.

Any suggestions?

 

EDIT: lol I just didn't have the .NET runtime 

Edited by xPorkulusx
Link to comment
Share on other sites

9 hours ago, NathanKell said:

Hmm. Not sure how doable that is, I don't recall if the snap range is easily moddable (because we can't transpile, and IIRC it's hardcoded, the only two ways to fix it would be if it's in a submethod I can override just that, or if not I would have to reimplement the entire part placement method which is not really viable.) Would need checking.

No idea, because I have no idea what version of UAD you are running. Once you figure that out, look in the changelog in the OP to see which version corresponds to the UAD version you are running, and then download the dll at that state in its history.

Also, please don't double post.

I am with the steam beta version previousmajorupdate v.1.5.1.6
Can you give me a link to directly download the TAF version? please friend

english not very good, sorry

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...