Rock5s [B18] mods

Started by Rock5, November 25, 2017, 10:08:40 AM

Previous topic - Next topic

Rock5

Added JTZoneButtons and JTExport tp steam.
Rock5 [B18] Mods
- Butchers Can Count Meat
- Sun Lamp Planner
- JTZoneButtons
- RimSearch
- JTExport

frenchiveruti

#31
Holy cow your mods are awesome. You reaaally need to add ModSync Ninja and they will be even more awesome than they already are. 
Also, may I suggest updating the JT mod for "replace walls"? Is a great mod but it seems JT isn't anymore between us.
Thanks a lot, the meat counter is a great savior for when I hunt those pesky thrumbos.

Rock5

I'm not really interested in ModSync  at the moment.

Certainly, JTReplaceWalls would be one that I would update if it hadn't already been updated by Inky Quill. It's available on steam and at the following link for manual download. https://ludeon.com/forums/index.php?topic=26210.msg349193;topicseen#msg349193
Rock5 [B18] Mods
- Butchers Can Count Meat
- Sun Lamp Planner
- JTZoneButtons
- RimSearch
- JTExport

frenchiveruti

Quote from: Rock5 on December 07, 2017, 12:27:35 AM
I'm not really interested in ModSync  at the moment.

Certainly, JTReplaceWalls would be one that I would update if it hadn't already been updated by Inky Quill. It's available on steam and at the following link for manual download. https://ludeon.com/forums/index.php?topic=26210.msg349193;topicseen#msg349193

Thanks, there was no way that I could find that link myself haha.
Sad to hear that you don't want to use ModSync as easy as it is. Well, it's up to you in any case! :)
Thanks for the mod.

Canute

Not every mod need to have Modsync.
Some mod just get updated once a Rimworld release.
And Modsync isn't a downloader like the workshop.

Jamestec

Quote from: Rock5 on December 06, 2017, 11:48:14 AM
One problem I had is not being able to find the text controls name. I don't know unity but the part that seems to make the search bar controls is
            searchTerm = Widgets.TextField(searchBarRect, searchTerm);

I'm not sure I understand it but searchTerm is a string, not some control.

The "Widgets.TextField(...)" part is what creates the text box GUI in that line; that method uses GUI.TextField (https://docs.unity3d.com/ScriptReference/GUI.TextField.html) to do so. Yes, searchTerm is just a string that gets the text box's value.


Try changing your code to:

GUI.SetNextControlName("TaggingSearchTerm");
searchTerm = Widgets.TextField(searchBarRect, searchTerm);
GUI.FocusControl("TaggingSearchTerm");

And see if the text box gets focus.

Rock5

#36
That works, but to open RimSearch you press z. When it opens, z replaces the default search string. I guess I need to clear the keyboard buffer or something? Or have it open after the key is released?

Edit: I figured it out myself, although I don't know if it's the best way to do it.

What I did is I found the part that checks for keypresses and changed

        public override void GameComponentOnGUI()
        {
            //Check if our keybinding is pressed.
            if(RimSearchDefOf.RimSearch_Search != null && RimSearchDefOf.RimSearch_Search.IsDownEvent)
            {
                //Is our SearchWindow on the stack?
                if(Find.WindowStack.Windows.Count(window => window is SearchWindow) <= 0)
                {
                    //If not open our window on the stack.
                    Find.WindowStack.Add(new SearchWindow());
                }
            }
        }




        private bool pressed = false;
        public override void GameComponentOnGUI()
        {
            if (pressed == true && !RimSearchDefOf.RimSearch_Search.IsDownEvent)
            {
                pressed = false;
                //Is our SearchWindow on the stack?
                if(Find.WindowStack.Windows.Count(window => window is SearchWindow) <= 0)
                {
                    //If not open our window on the stack.
                    Find.WindowStack.Add(new SearchWindow());
                }

            }
            //Check if our keybinding is pressed.
            if(RimSearchDefOf.RimSearch_Search != null && RimSearchDefOf.RimSearch_Search.IsDownEvent)
            {
                pressed = true;
            }
        }
Rock5 [B18] Mods
- Butchers Can Count Meat
- Sun Lamp Planner
- JTZoneButtons
- RimSearch
- JTExport

Rock5

Updated RimSearch. Now the search box get focus when you open RimSearch. Thanks Jamestec.
Rock5 [B18] Mods
- Butchers Can Count Meat
- Sun Lamp Planner
- JTZoneButtons
- RimSearch
- JTExport

notfood


frenchiveruti

Hello Rock5, I keep getting this error no matter what I do, I don't know what mod causes this issue at all, as I don't have edited my modlist for this savegame.
It runs across saves and modload orders.
https://github.com/Rock5/ButchersCanCountMeat/issues/1

Rock5

I'm not so good at reading log files. Could you point me to which error message you are talking about?
Rock5 [B18] Mods
- Butchers Can Count Meat
- Sun Lamp Planner
- JTZoneButtons
- RimSearch
- JTExport

frenchiveruti

Quote from: Rock5 on December 15, 2017, 03:25:16 PM
I'm not so good at reading log files. Could you point me to which error message you are talking about?
Sure!  The error goes as follows:
Exception filling window for RimWorld.Dialog_BillConfig: System.ArgumentOutOfRangeException: Argument is out of range.

Previously there was this message, I think Kiame's mod "Change Dresser" is doing some conflicting patching with your mod.
Parameter name: index
at System.Collections.Generic.List`1<Verse.ThingCountClass>.get_Item (int) <0x00054>
at ChangeDresser.Patch_RecipeWorkerCounter_CountProducts.Postfix (int&,Verse.RecipeWorkerCounter,RimWorld.Bill_Production) <0x00058> <<<-----
at (wrapper dynamic-method) Verse.RecipeWorkerCounter.CountProducts_Patch3 (object,RimWorld.Bill_Production) <0x001b2>
at RimWorld.Dialog_BillConfig.DoWindowContents (UnityEngine.Rect) <0x008f3>
at Verse.Window/<WindowOnGUI>c__AnonStorey0.<>m__0 (int) <0x00735>



There's also this message:

Exception filling tab RimWorld.ITab_Bills: System.ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
at System.Collections.Generic.List`1<Verse.ThingCountClass>.get_Item (int) <0x00054>
at ChangeDresser.Patch_RecipeWorkerCounter_CountProducts.Postfix (int&,Verse.RecipeWorkerCounter,RimWorld.Bill_Production) <0x00058>
at (wrapper dynamic-method) Verse.RecipeWorkerCounter.CountProducts_Patch3 (object,RimWorld.Bill_Production) <0x001b2>
at RimWorld.Bill_Production.CanUnpause () <0x00042>
at RimWorld.Bill_Production.get_StatusLineMinHeight () <0x00010>
at RimWorld.Bill.DoInterface (single,single,single,int) <0x001ee>
at RimWorld.BillStack.DoListing (UnityEngine.Rect,System.Func`1<System.Collections.Generic.List`1<Verse.FloatMenuOption>>,UnityEngine.Vector2&,single&) <0x004fc>
at RimWorld.ITab_Bills.FillTab () <0x00171>
at Verse.InspectTabBase/<DoTabGUI>c__AnonStorey0.<>m__0 () <0x000e3>

frenchiveruti

Hello again Rock5.
I found how to reproduce the error. Here's some detail on Kiame's Github:
https://github.com/KiameV/rimworld-changedresser/issues/24

It seems that both mods at the same time will work, but when I place a Change Dresser or Weapon Storage all goes nuts.

Kiame

#43
Going to take a look at this and I'll leave an update with what i find.

Found the issue. Fixing on my side.

Rock5

Looks like you fixed it while I slept.

I can't reproduce the error, even after following your extra instructions with Weapon Storage. What did you do to fix it?
Rock5 [B18] Mods
- Butchers Can Count Meat
- Sun Lamp Planner
- JTZoneButtons
- RimSearch
- JTExport