RimWorld

RimWorld

Adaptable Mechanoids
30 Comments
Comton 16 Sep, 2024 @ 9:34am 
@ANNOProfi hmmm ... 👉👈... yes I added different mods but I don't remember wich one !
ANNOProfi  [author] 16 Sep, 2024 @ 3:20am 
@Comton did you add or remove a mod before that error occurred, or changed any settings for this mod?
Comton 15 Sep, 2024 @ 12:00am 
Now I have this one :) The calculation is still functionning


Exception in Verse.GameComponentUtility.GameComponentTick: System.NullReferenceException: Object reference not set to an instance of an object
[Ref 3BC9023B]
at AdaptableMechanoids.AM_MechArmorStats.SubtractArmor () [0x0001c] in <5800a0d2d25640a0a3b9c351d503808f>:0
[.....]
- TRANSPILER net.pardeike.rimworld.lib.harmony: IEnumerable`1 VisualExceptions.ExceptionsAndActivatorHandler:Transpiler(IEnumerable`1 instructions, MethodBase original)


I can't post the entire error, here my logs :
https://gist.github.com/HugsLibRecordKeeper/aedb5031513bbe41023eafc752b0f65f
Comton 7 Sep, 2024 @ 3:21pm 
Glad you find it and that it was an easy one !

By the way, I'd love the mod. First run with Space Marines from Grimworld : firstly it was easy like cutting butter with lightsabers, now mechs have +200% adaptation !

Must have mod :D
ANNOProfi  [author] 7 Sep, 2024 @ 2:58pm 
I forgot to have a Dictionary (a data structure) be saved and then it of course complained when there wasn't anything in it on loading. Literally one line.
Comton 7 Sep, 2024 @ 12:48pm 
What it was ?
ANNOProfi  [author] 7 Sep, 2024 @ 11:26am 
@Comton I found the bug. It was stupidly simple.
Comton 7 Sep, 2024 @ 10:16am 
From memory I want to say for the ongoing game. I keep you informed
ANNOProfi  [author] 7 Sep, 2024 @ 9:19am 
I have made a discord server, to better deal with the growing popularity of my mods, so head on over for bug reports and ideas.
ANNOProfi  [author] 7 Sep, 2024 @ 7:37am 
@Comton, does the reset "cure" the issue completely, or just for a while?
Comton 7 Sep, 2024 @ 7:08am 
Same error as m11kire, using the reset of armor works
My mod list : https://rentry.co/2fnkc3yh
I don't see what can interfere. Maybe your last patch ?
ANNOProfi  [author] 1 Sep, 2024 @ 3:30pm 
All bugs shouldn't happen, but this one really should not be able to happen.
This will probably take some time to track down the cause, in the meantime, there is a debug function in dev-mode, where it instantly resets the offsets, so you could make a back-up save and see if that fixes it. I doubt it, but it can't hurt to try.
m11kire 1 Sep, 2024 @ 2:42pm 
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
[Ref D7413130]
at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <eae584ce26bc40229c1b1aa476bfa589>:0
at AdaptableMechanoids.AM_MechArmorStats.SubtractArmor () [0x0001c] in <1902f5acca85411b94f5ce612fd26f9a>:0
at AdaptableMechanoids.AM_MechArmorStats.CalculateArmor (System.Boolean hardMode) [0x00041] in <1902f5acca85411b94f5ce612fd26f9a>:0
at AdaptableMechanoids.AM_MechArmorSorting.AdaptMechs (System.Boolean hardmode) [0x0002a] in <1902f5acca85411b94f5ce612fd26f9a>:0
at AdaptableMechanoids.AM_GameComponent_Adaptation.CalculateArmor (System.Boolean hardmode) [0x0002a] in <1902f5acca85411b94f5ce612fd26f9a>:0
at AdaptableMechanoids.AM_GameComponent_Adaptation.GameComponentTick () [0x00082] in <1902f5acca85411b94f5ce612fd26f9a>:0
at Verse.GameComponentUtility.GameComponentTick () [0x0001a] in <f0ac5eb9b52e4cc396c70fc9a4ee15e5>:0
m11kire 1 Sep, 2024 @ 2:41pm 
- TRANSPILER net.pardeike.rimworld.lib.harmony: IEnumerable`1 VisualExceptions.ExceptionsAndActivatorHandler:Transpiler(IEnumerable`1 instructions, MethodBase original)
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Log.Error_Patch5 (string)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.GameComponentUtility.GameComponentTick_Patch0 ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.TickManager.DoSingleTick_Patch3 (Verse.TickManager)
Verse.TickManager:TickManagerUpdate ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Game.UpdatePlay_Patch6 (Verse.Game)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Root_Play.Update_Patch1 (Verse.Root_Play)
ANNOProfi  [author] 1 Sep, 2024 @ 2:16pm 
@m11kire I'm sorry, but there is no KeyNotFoundException in that log either, but since it ends at a weird place, I'm thinking that it got cut off.
Can you post the error in text for instead, or at least describe what you were doing before it happened?
From what little I know, I think it might be that a faction and/or mech type was removed and not deregistered with the system.
m11kire 1 Sep, 2024 @ 1:55pm 
[ urlhttps://gist.github.com/HugsLibRecordKeeper/c714ca168d9b982b47ec0e601512b026 ] Link to hugslib log[/url]
hopefully it will let me post this this time
ANNOProfi  [author] 1 Sep, 2024 @ 12:11pm 
@m11kire steam seems to have deleted the link.
Brandon12340987 1 Sep, 2024 @ 9:54am 
only ways i can think of that could work for adaptable weapons is if its done manually but other mods add modularity for weapons or if the combat log provides info so individual weapons make minor tweaks but that sounds like it can be a tps heavy route, it could go into a global pool so each log doesnt need to be kept but it sounds like a nightmare to code
m11kire 1 Sep, 2024 @ 9:21am 
ANNOProfi  [author] 1 Sep, 2024 @ 6:30am 
@m11kire the error you say you have is not in the log, did you post the right link?
m11kire 1 Sep, 2024 @ 12:36am 
getting the below error while game unpaused very frequently, link to logs: https://gist.github.com/HugsLibRecordKeeper/7261c4a8bb16dec82edc5cdc1907827b

System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
[Ref D7413130]

Steam won't let me post the stactrace, makes the comment too big
ANNOProfi  [author] 6 Aug, 2024 @ 11:44am 
@Comton Adaptable weapons will probably close to impossible to implement, since I don't think a weapon knows when it hit, to say nothing of projectiles.

Btw, there was a bug reported as seen in the discussion above, did you experience something similar as of now?
Comton 5 Aug, 2024 @ 1:50pm 
Maybe an adaptable weaponry in the future would be nice !
Mech types and weapons used adapted to what did the most/worse damages
Comton 4 Aug, 2024 @ 4:40am 
Great :D Thanks for the quick answer
I'm going to start a new game so if I see something odd, I'd will tell you
ANNOProfi  [author] 4 Aug, 2024 @ 4:05am 
@Comton From what I've seen, it should. My mod uses the base armor ratings of any mech, whatever they might be. SVM modifies those base ratings, so they should work together.
Comton 4 Aug, 2024 @ 3:35am 
Great idea ! Do you think it can work with Stronger Vanilla Mechs ?
Bryan=0101 2 Aug, 2024 @ 10:58am 
I really like this take, instead of outright buffing them from the get-to, they are adaptive. Really fits the whole machine hive theme.
ANNOProfi  [author] 1 Aug, 2024 @ 8:32am 
@孤星 Your feedback has been heard, colony mechs can now adapt too.
孤星 31 Jul, 2024 @ 6:08pm 
Hi there,

First off, I wanted to say that I’m really enjoying the added challenge this mod brings to the game with the adaptive mechanoid armor. It’s a fantastic concept that keeps the gameplay engaging!

I was wondering if you could consider adding a feature that would give players more control over the mod’s impact. Similar to how the “Level This” mod operates, could you perhaps add a toggle switch that allows us to choose whether the armor adaptation:

Affects only the AI-controlled mechanoids,
Affects only the player-controlled mechanoids, or
Affects both AI and player-controlled mechanoids?
This would provide a great deal of flexibility and would cater to different playstyles. Some players might prefer the challenge to be solely against the AI, while others might enjoy the added difficulty in managing their own mechanoid forces.

Thank you for your hard work on this mod, and I look forward to seeing how it evolves!
Kokorocodon 31 Jul, 2024 @ 3:05pm 
Finally making the world-ending-killing-machines feel like world-ending-killing-machines