RimWorld
Character Editor
ThisIsJapes 11 ABR 2020 a las 14:06
compatibility issue with humanoid alien races 2.0
Exception filling window for CharacterEditor.EditorUI: System.Reflection.TargetParameterCountException: Number of parameters specified does not match the expected number. at System.Reflection.MonoMethod.ConvertValues (System.Reflection.Binder binder, System.Object[] args, System.Reflection.ParameterInfo[] pinfo, System.Globalization.CultureInfo culture, System.Reflection.BindingFlags invokeAttr) [0x00016] in <567df3e0919241ba98db88bec4c6696f>:0 at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00011] in <567df3e0919241ba98db88bec4c6696f>:0 at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <567df3e0919241ba98db88bec4c6696f>:0 at CharacterEditor.Reflect.CallMethod (System.Type type, System.String name, System.Object[] param) [0x00016] in <87bb8f9c30444122b91f599c6d2c3c01>:0 at CharacterEditor.RenderingTool.RenderPawnInternal (Verse.Pawn pawn, UnityEngine.Vector3 rootLoc, System.Single angle, System.Boolean renderBody, Verse.Rot4 bodyFacing, Verse.Rot4 headFacing, System.Boolean isNude, Verse.RotDrawMode bodyDrawType, System.Boolean portrait, System.Boolean headStump) [0x00544] in <87bb8f9c30444122b91f599c6d2c3c01>:0 at CharacterEditor.RenderingTool.RenderRotated (Verse.Pawn pawn, UnityEngine.Vector3 drawLoc, Verse.Rot4 rot4, System.Boolean isNude) [0x0009c] in <87bb8f9c30444122b91f599c6d2c3c01>:0 at CharacterEditor.Capturer.CaptureNewPawnImage (Verse.Pawn pawn) [0x0007f] in <87bb8f9c30444122b91f599c6d2c3c01>:0 at CharacterEditor.Capturer.ToggleRendererAndCapture (Verse.Pawn pawn) [0x00010] in <87bb8f9c30444122b91f599c6d2c3c01>:0 at CharacterEditor.BlockPerson.AToggleRenderer (UnityEngine.Color col) [0x00017] in <87bb8f9c30444122b91f599c6d2c3c01>:0 at CharacterEditor.SZWidgets.ButtonImageCol (System.Single x, System.Single y, System.Single w, System.Single h, System.String texPath, System.Action`1[T] action, UnityEngine.Color color, System.String toolTip) [0x0002b] in <87bb8f9c30444122b91f599c6d2c3c01>:0 at CharacterEditor.BlockPerson.DrawMainIcons () [0x00383] in <87bb8f9c30444122b91f599c6d2c3c01>:0 at CharacterEditor.BlockPerson.Draw (System.Int32 _x, System.Int32 _y, System.Int32 _w, System.Int32 _h) [0x00092] in <87bb8f9c30444122b91f599c6d2c3c01>:0 at CharacterEditor.EditorUI.DoWindowContents (UnityEngine.Rect inRect) [0x0003c] in <87bb8f9c30444122b91f599c6d2c3c01>:0 at Verse.Window.InnerWindowOnGUI (System.Int32 x) [0x00165] in <c8e8d421567e4ee5864626a429a27a37>:0 Verse.Log:Error(String, Boolean) Verse.Window:InnerWindowOnGUI(Int32) UnityEngine.GUI:CallWindowDelegate(WindowFunction, Int32, Int32, GUISkin, Int32, Single, Single, GUIStyle)

you are not in any way obligated to do anything about this btw, but just wanted to let you know.

mod order is just:

Harmony
Core
HugsLib
Humanoid Alien Races 2.0
Character Editor

Also this breaks when using the hanger, face, and rotate buttons.
Última edición por ThisIsJapes; 11 ABR 2020 a las 14:08
< >
Mostrando 1-14 de 14 comentarios
ThisIsJapes 11 ABR 2020 a las 14:45 
Publicado originalmente por ThisIsJohn:
Looking into it seem you only send five params to the DrawAddons method in AlienRace, but it's expecting 6

you send

object[] param = new object[] { false, vector, pawn, quaternion, bodyFacing };

but it expects

public static void DrawAddons(bool portrait, Vector3 vector, Pawn pawn, Quaternion quat, Rot4 rotation, bool invisible)

so I guess adding an extra false in those parameters would make this exception go away? Not sure would need to test it I guess.

I guess I should note this is in your RenderingTool.RenderPawnInternal Method
Última edición por ThisIsJapes; 24 ABR 2020 a las 22:15
ThisIsJapes 11 ABR 2020 a las 16:43 
Did a Transpile test with this that effectively does what I said in the first comment and the exception goes away

I realize I'm talking to myself, but if anyone finds this useful in the future oh well.

[HarmonyPatch(typeof(RenderingTool), "RenderPawnInternal")] public static class CharacterEditorFix_Patch { public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions) { var codes = new List<CodeInstruction>(instructions); // change array size to 6 elements codes[538].opcode = OpCodes.Ldc_I4_6; // adds false as the 6th (index 5 element) codes.Insert(564, new CodeInstruction(OpCodes.Dup)); codes.Insert(565, new CodeInstruction(OpCodes.Ldc_I4_5)); codes.Insert(566, new CodeInstruction(OpCodes.Ldc_I4_0)); // codes.Insert(567, new CodeInstruction(codes[543])); codes.Insert(567, new CodeInstruction(OpCodes.Box, typeof(System.Boolean))); codes.Insert(568, new CodeInstruction(OpCodes.Stelem_Ref)); return codes.AsEnumerable(); } }
Última edición por ThisIsJapes; 24 ABR 2020 a las 22:15
Rzabat 24 ABR 2020 a las 10:42 
Would you be able to release this as a sub-mod to fix this issue? Ive also been having issues with humanoid races while using Character Editor and EDB Prepare Carefully
ThisIsJapes 24 ABR 2020 a las 22:18 
Publicado originalmente por Rzabat:
Would you be able to release this as a sub-mod to fix this issue? Ive also been having issues with humanoid races while using Character Editor and EDB Prepare Carefully
I know how to mod, but I've never actually released a mod before, not really sure how to go about it. I mean the code is there in the comment, if you wanna do it go ahead.
CYFire 1 MAY 2020 a las 9:44 
I don't really get how your code works and how I can apply it to my game, since I love both Character Editor and HAF-Races...
Do I need to make local Copy of CE and add your code, or do I need to create a local patch mod with your code? I wish I would know whats going on -.-

Edit:... ok looked into it and just ??? tried to follow the Rimwiki c++ modding tutorial but nevermind, my brain melts. Thought being able of editing some .xml would be a promising start, but oh boy I have no clue.

So if anyone who knows what to do could either patch Character Editor for HAF2.0 or add a patching mod, I gladly take it.
Última edición por CYFire; 1 MAY 2020 a las 10:55
Hurgablurg 12 MAY 2020 a las 23:17 
So, we can assume the dev doesn't care and will do nothing to fix it?
Oniwabanshu 13 MAY 2020 a las 19:59 
I got this one instead when trying to open the Bio of a Crystalloid:
https://pastebin.com/raw/rfgVE9wZ
The window to edit the face apparel and all the others can be seen correctly, but the bio is missing.
minniefinnie 16 MAY 2020 a las 8:10 
has this been fixed?
Tyrant 28 MAY 2020 a las 0:13 
I compiled the fix posted earlier in the thread, just drop it into the Steam\steamapps\workshop\content\294100\1874644848\Assemblies folder.

https://anonfiles.com/P9Z70c39o3/ChrEdtFix_dll
Chaos Kitten 1 JUN 2020 a las 18:07 
Thanks Tyrant ;3 and John ofcourse!
Última edición por Chaos Kitten; 1 JUN 2020 a las 18:08
Latex Santa 2 JUN 2020 a las 12:31 
@Tyrant Just tried the fix, placed the file EXACTLY where you said it should go, the BIO field in Character Editor is STILL blank. To be fair, I am also using multiple race and faction mods, none of which are Crystalloids, but the bio is still blank, on the character selection screen AND after landing.

This is the error I get:

Exception filling window for CharacterEditor.EditorUI : System.NullReferenceException: Object reference not set to an instance of an object at CharacterEditor.PawnKindTool+<>c.<GetHumanlikes>b 0 0 (Verse.PawnKindDef td) [0x00006] in <87bb8f9c30444122b91f599c6d2c3c01>:0

Some missing definitions or something. Sounds bad.
Latex Santa 3 JUN 2020 a las 14:55 
@Tyrant I have temporarily reduced my mod list down to these, in the following load order:

Harmony
Core
Royalty
Hugslib
Jecstools
Mod Manager
Facial Stuff 1.1
Faction Control - 1.1
Humanoid Alien Races 2.0
More Trait Slots - 1.1
More Practical Traits
some alien race (Zeta Reticulans in my case)
Character Editor

I have been steadily adding mods to it, taking care to place Character Editor at the very bottom.
I haven't had a totally blank bio screen in the character editor for at least 6 test game starts so far. Even colonists from previous games which are saved in the character editor load properly.

This is encouraging news.

Who knows, that fix may have helped after all.
Oniwabanshu 9 JUN 2020 a las 10:46 
Make sure you don't have this mod installed:
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=1430084631
It was absolutely breaking everything..
Because all of the sudden, and without notice, it now needs the pharmacist mod by Fluuffy.
VOID  [desarrollador] 13 AGO 2020 a las 0:33 
rendering is working now. HAR 2.0 DrawAddons and alien skin is fixed. if you notice some other problems, give me a hint.
< >
Mostrando 1-14 de 14 comentarios
Por página: 1530 50