Giter Club home page Giter Club logo

rimworldhugslib's Introduction

HugsLib logo

Version Version Version Version NuGet

A lightweight shared mod library for Rimworld. Provides a foundation for mods and delivers shared functionality.

Notice: HugsLib must be installed as a separate mod by the players. The library assembly itself is not to be shipped with your mod.

Notice: HugsLib requires the Harmony mod to be installed to work correctly. Download here.

Dependency tags

If your mod depends on HugsLib, it is recommended to include these tags in your About.xml file:

<modDependencies>
	<li>
		<packageId>UnlimitedHugs.HugsLib</packageId>
		<displayName>HugsLib</displayName>
		<downloadUrl>https://github.com/UnlimitedHugs/RimworldHugsLib/releases/latest</downloadUrl>
		<steamWorkshopUrl>steam://url/CommunityFilePage/818773962</steamWorkshopUrl>
	</li>
</modDependencies>
<loadAfter>
	<li>UnlimitedHugs.HugsLib</li>
</loadAfter>

Current features

  • Mod foundation: Base class to build mods on. Extending classes have access to custom logging, settings, and receive the following events from the library controller: Initialize, DefsLoaded, Tick, Update, FixedUpdate, OnGUI, WorldLoaded, MapGenerated, MapComponentsInitializing, MapLoaded, MapDiscarded, SceneLoaded, SettingsChanged.
  • Persistent in-game settings: Implementing mods can create custom settings of various types that can be changed by the player in the new Mod Settings menu. Settings are stored in a file in the user folder.
  • Mod update news: Mods can provide a message for each version they release, highlighting new features. These messages will be shown once to the player the next time he starts the game. This is a good way to ensure that new mod features do not go unnoticed by the majority of players. This is especially true on Steam, where the player may not have even read the description before subscribing. Messages include support for images and basic formatting.
  • Log publisher: Adds a keyboard shortcut (Ctrl+F12) to publish the logs from within the game. Returns a URL that you can share with others or send to a mod author. The published logs also include the list of running mods and their versions, as well as the full list of active Harmony patches. This is a great way for a mod author to get the logs from a player who is experiencing an issue with his mod.
  • Quickstarter: Load a save file or generate a new map with a given scenario and size right after the game is started. Also allows to generate a new map with one click. Settings dialog included.
  • UtilityWorldObjects: A convenient way to store your data in a save file. Since A16 MapComponents are no longer a reliable way to store your data, and UWO's are designed to be a drop-in replacement.
  • Custom tick scheduling: Includes tools for executing callbacks with a specified tick delay, and registering recurring ticks with non-standard intervals. Recurring ticks are distributed uniformly across the time spectrum, to minimize the performance impact of the ticking entity.
  • Auto-restarter: Automatically restarts the game when the language is changed.
  • Log window additions: Adds a menu to find common files: open the log file and browse the user data and mods folders.

Compatibility

There are no known compatibility issues at this time. Please use the Harmony library for your detouring needs and everything should work well together.

Usage

This is a public library similar to the Community Core Library, designed to be easily updateable between Rimworld versions. Feel free to use it for your own projects.

rimworldhugslib's People

Contributors

53n4 avatar aimxoo0o avatar alattalatta avatar alextd avatar cainiaowu avatar debugzxcv avatar diddily avatar dragomano avatar duduluu avatar erdelf avatar fluffierthanthou avatar ikbalkazanc avatar kaptain-kavern avatar lbmaian avatar proxyer avatar ragnar-f avatar realpack avatar rw-chaos avatar scuba156 avatar shiuanyue avatar unlimitedhugs 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rimworldhugslib's Issues

Don't default to quick start when using quick start.

Whenever you use one of the quickstart options manually (e.g. 'generate now'), HugsLib turns on the option to use that quickstart mode by default on game load.

There are two problems with the current behaviour;

  1. it happens when the window closes so there is no feedback to the user that this has just happened
  2. it's not needed, clicking an extra toggle to enable this behaviour is a minimal effort intervention by the user. Having it changed without noticing is a much bigger pain.

Please either remove this function or if it was intended behaviour, add an option to turn it off.

[UnlimitedHugs.HugsLib] Patches on methods annotated as Obsolete were detected by HugsLib: Verse.Game.DeinitAndRemoveMap

Hugslib seems to generate that warning on itself when starting:

[UnlimitedHugs.HugsLib] Patches on methods annotated as Obsolete were detected by HugsLib: Verse.Game.DeinitAndRemoveMap
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Warning (string)
HugsLib.Utils.HarmonyUtility:LogObsoleteMethodPatchErrors ()
HugsLib.Utils.HarmonyUtility:LogHarmonyPatchIssueErrors ()
Verse.LongEventHandler:ExecuteToExecuteWhenFinished ()
Verse.LongEventHandler:UpdateCurrentAsynchronousEvent ()
Verse.LongEventHandler:LongEventsUpdate (bool&)
(wrapper dynamic-method) Verse.Root:Verse.Root.Update_Patch1 (Verse.Root)
Verse.Root_Entry:Update ()

This is also causing autostart with generated map to automatically be aborted due to warnings ๐Ÿ˜…

Adding mod load order resolver

I just thought it'd be possible for people to add information in ways of "load me after/before ". This would result in a dependency graph that could lead to an automatic resolvement for mod load order and hint the player for cyclic dependency problems.

Eventually this could even be solved by finding out what game elements each mod touches and make a dependency resolution graph from this. But implementing this would probably take a while.

If you like the idea but don't have the time to add a feature such as this I'd be willing to take a look at your code and maybe implement something like that myself.

HugsLib & Replace Stuff

Hey guys. ^_^;; Umm... I'm not terribly familiar with flagging conflicts on GitHub, so fingers crossed that this is the right spot for that.

For some really odd reason, (EDIT) Replace Stuff seems to HAVE to be loaded above HugsLib, or it throws several errors and... no joke... destroys the build menu. All of it. Can't build, area, blueprint ~anything.

I have zero idea the how-and-why. It was just SUCH an odd thing that I thought I'd draw your attention to it. If you need specific error information, you can certainly poke at their Workshop page, or I can provide any logs you might need.

Could be nothing. Could be important.

I'm not qualified to tell the difference! ^_^;;

Thanks in advance.

Quick load does not call MemoryUtility.ClearAllMapsAndWorld()

Which means it does not follow vanilla 1.3 standard. The original code is in
`MainMenuDrawer.DoMainMenuControls.cs for the button "SaveAndQuitToMainMenu" and also GameDataSaveLoader.LoadGame.

Because of that I have to patch HugsLib in Achtung which isn't great.

Abstract GitHub token/allow users to specify

Right now, logs are posted as Gists using a token committed to the repo. GitHub automatically revokes these tokens when they're committed (for good reason).

The better way to do this would be to load the encrypted production token in to a CI build config (e.g. Travis, etc.), yet allow users to specify their own tokens if they so choose. This could be for development purposes (as there'd be no access to the token), or just because (I'd like to have access to all the logs I've uploaded in one place).

Spurious dangerous detour warnings for detours that use the 'magic' _this_ parameter.

I'm detouring an anonymous action in Birds and Bees, which has no parameters. Because I need access to the instance, I'm detouring to a static class and my target, let's call him Foo( object _this ) uses the 'magic' first parameter to get that instance.

HugsLib however, is complaining about parameter counts. I can't/don't want to subclass the Type I'm detouring because the type itself is an iterator block created by the compiler - it's already messy enough as it is.

Target of the detour;
https://github.com/FluffierThanThou/BirdsAndBees/blob/master/Source/Fluffy_BirdsAndBees/Detours/_JobDriver_Lovin.cs

Pressing console hotkey always opens console

When using HugsLib on A16 stable, pressing the console hotkey opens the console even if it is already open.

You have to manually press X to exit the console, instead of being able to toggle it with the hotkey.

News file requires ascending order of update defs.

(First - deeply appreciate HugsLib, thanks so much!)

Not sure if this is a HugsLib or Ludeon change from 1.1, but it's now mandatory to have the earliest update defs at the top of the news file and the latest at the bottom.

If it's the reverse, LastSeenNews.xml only increments one update at a time and the full news - minus one entry each time - is displayed over and over again.

This is a departure from how it worked in 1.0 where it didn't seem to matter, so it may break some mods. Not sure if this is intentional or an unintentional bug.

(Maybe I'm the only crazy one who liked adding new updates to the top of the file? Not a big deal since I generate the xml from Python.)

Removing empty HarmonyPatches from HugsLib log

I am currently using a Harmony transpiler to search the body of all JobDrivers, in search for calls of StatDefOf so that I can substitute with my own when necessary. In order to keep the log clear of the pseudo-transpilers, I unpatch them out.

The problem is that the log is still flooded with empty patches: Here's an example.

Is there an alternative or HugsLib method of eliminating those?

Suggestion: visually update a handle's value when ResetToDefault() is called.

Hi!
Recently I had to write this custom validation for a group of related SettingHandle<bool> which called for a ResetToDefault() on one of them. Unfortunately, the user would never get the feedback for what was happening because the red X would never turn into a green tick unless the settings window was closed and re-opened. I realized it would require an update to the dialog's handleControlInfo so I resorted to the reflection and invocation of the dilaog's ResetHandleControlInfo method. It works just fine, but looks so janky! Wouldn't it be better if this reset was automatically triggered when calling ResetToDefault()?

public void ValidateTechPoolSettings(bool value)
{
    if (!value && !TechPoolIncludesStarting.Value && !TechPoolIncludesTechLevel.Value && !TechPoolIncludesBackground && !TechPoolIncludesScenario)
    {
        Messages.Message("TechPoolMinimumDefaultMsg".Translate(), MessageTypeDefOf.CautionInput);
        TechPoolIncludesStarting.ResetToDefault();
        MethodInfo ResetHandleControlInfo = AccessTools.Method("HugsLib.Settings.Dialog_ModSettings:ResetHandleControlInfo");
        ResetHandleControlInfo.Invoke(Find.WindowStack.currentlyDrawnWindow, new object[] { TechPoolIncludesStarting } );
    }
}

using Verse;

I am sorry to ask a silly question, but what is Verse? I ask this as visual studio 2015 finds it as an error. I was able to get the Unity Engine directory added to the project, but I can't find anything outside of IBM's email service called Verse. Any help would be greatly appreciated.

Fluffy's Area Unlocker conflict

[HugsLib] Exception during DoDetours: System.Exception: Failed to detour method AreaManager.CanMakeNewAllowed to AreaUnlocker.CanMakeNewAllowed (assembly: AreaUnlocker) ---> System.Exception: Methods are not call compatible: Parameter count mismatch
at HugsLib.Source.Detour.DetourProvider.CompatibleDetourWithExceptions (System.Reflection.MethodInfo source, System.Reflection.MethodInfo destination) [0x00000] in :0
at HugsLib.Source.Detour.Helpers.HandleDetour (HugsLib.Source.Detour.DetourMethodAttribute sourceAttribute, System.Reflection.MethodInfo targetInfo) [0x00000] in :0
--- End of inner exception stack trace ---
at HugsLib.Source.Detour.DetourProvider.ThrowClearerDetourException (System.Exception e, System.Reflection.MemberInfo sourceInfo, System.Reflection.MemberInfo targetInfo, System.String detourMode) [0x00000] in :0
at HugsLib.Source.Detour.Helpers.HandleDetour (HugsLib.Source.Detour.DetourMethodAttribute sourceAttribute, System.Reflection.MethodInfo targetInfo) [0x00000] in :0
at HugsLib.Source.Detour.Helpers.DoDetours () [0x00000] in :0
Verse.Log:Error(String)
HugsLib.Utils.ModLogger:ReportException(Exception, String, Boolean, String)
HugsLib.Source.Detour.Helpers:DoDetours()
HugsLib.HugsLibController:ApplyNewDetours()
HugsLib.HugsLibController:LoadReloadInitialize()
HugsLib.HugsLibController:Initalize()
HugsLib.Core.UnityProxyComponent:Start()

Hugs Not working

Rimworld Version 0.18.1722 HugsLib mods not working. Please update version to 2018 vers of Rimworld. TQ

Some errors and broken mod news

output_log.txt

I tried playing around with the Hand Me That Brick DLL we made. I also deleted HugsLib from my appdata folder to test clean slate scenarios (e.g. if a user just updated without another HugsLib mod).

Apparently at some point parts of HugsLib break somewhat. For example, I can no longer click "show all mod news" in the Mod Settings menu and I got some errors via console (visible in the log).

In this log HMTB is disabled but AllowTool is enabled.

Add passive error profiling

This is a bit of a slightly out-of-scope suggestion, but I thought I'd suggest it here because your install base would help and I was thinking of using your code for this:

Each time the game launches, save the user's load order and the number of errors and warnings and upload to your github. Once we have enough such data, we would be able to apply some machine learning to get better information about where certain mods and types of mods ought to be in load orders, to better improve Trisscar's sorting page.

Error when Searching in Mod Options (1.4)

Error Message per Visual Exceptions:
Exception in Verse.Window.InnerWindowOnGUI: System.NullReferenceException: Object reference not set to an instance of an object at RimWorld.Dialog_Options.DoModOptions (Verse.Listing_Standard listing) [0x0008a] in <1ea541f48818430abd724fc665f76dc4>:0 - transpiler UnlimitedHugs.HugsLib: IEnumerable`1 HugsLib.Patches.DialogOptions_DoModOptions_Patch:InterceptWindowOpening(IEnumerable`1 instructions) at RimWorld.Dialog_Options.DoOptions (Verse.OptionCategoryDef category, UnityEngine.Rect inRect) [0x0011c] in <1ea541f48818430abd724fc665f76dc4>:0 at RimWorld.Dialog_Options.DoWindowContents (UnityEngine.Rect inRect) [0x000d5] in <1ea541f48818430abd724fc665f76dc4>:0 at Verse.Window.InnerWindowOnGUI (System.Int32 x) [0x001fd] in <1ea541f48818430abd724fc665f76dc4>:0 - transpiler net.pardeike.rimworld.lib.harmony: IEnumerable`1 VisualExceptions.ExceptionsAndActivatorHandler:Transpiler(IEnumerable`1 instructions, MethodBase original)

Error Message per Console Log:
Exception filling window for RimWorld.Dialog_Options: System.NullReferenceException: Object reference not set to an instance of an object at (wrapper dynamic-method) RimWorld.Dialog_Options.RimWorld.Dialog_Options.DoModOptions_Patch0(RimWorld.Dialog_Options,Verse.Listing_Standard) at RimWorld.Dialog_Options.DoOptions (Verse.OptionCategoryDef category, UnityEngine.Rect inRect) [0x0011c] in <1ea541f48818430abd724fc665f76dc4>:0 at RimWorld.Dialog_Options.DoWindowContents (UnityEngine.Rect inRect) [0x000d5] in <1ea541f48818430abd724fc665f76dc4>:0 at (wrapper dynamic-method) Verse.Window.Verse.Window.InnerWindowOnGUI_Patch0(Verse.Window,int) UnityEngine.StackTraceUtility:ExtractStackTrace () (wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch4 (string) (wrapper dynamic-method) Verse.Window:Verse.Window.InnerWindowOnGUI_Patch0 (Verse.Window,int) UnityEngine.GUI:CallWindowDelegate (UnityEngine.GUI/WindowFunction,int,int,UnityEngine.GUISkin,int,single,single,UnityEngine.GUIStyle)

Steps to Reproduce:

  1. Enter Main Menu
  2. Go into Settings > Mod Settings
  3. Use the search bar, type in anything

ezgif com-gif-maker

Request: PatchOperationFindModByPackageId

Hi,

just a small request, since it's still not in the base game and a huge oversight imo, could you add a
PatchOperationFindModByPackageId
That works similarly to PatchOperationFindMod but instead of looking at the <name> node, it looks for the <packageId> node.

Add restart option to QuickStart button

I ran into some issues while trying to create a pull request, but would you consider changing QuickStartController.DrawDebugToolbarButton to be

	    internal static void DrawDebugToolbarButton(WidgetRow widgets)
	    {
	        if (widgets.ButtonIcon(quickstartIconTex,
	            "Open the quickstart settings.\n\nThis lets you automatically generate a map or load an existing save when the game is started.\nShift-click to quick-generate a new map.\nCtrl-click to restart RimWorld.")
	        )
	        {
	            var stack = Find.WindowStack;
	            if (HugsLibUtility.ShiftIsHeld)
	            {
	                stack.TryRemove(typeof(Dialog_QuickstartSettings));
	                InitateMapGeneration();
	            }
	            else if (HugsLibUtility.ControlIsHeld)
	            {
	                GenCommandLine.Restart();
	            }
	            else
	            {
	                if (stack.IsOpen<Dialog_QuickstartSettings>())
	                {
	                    stack.TryRemove(typeof(Dialog_QuickstartSettings));
	                }
	                else
	                {
	                    stack.Add(new Dialog_QuickstartSettings());
	                }
	            }
	        }
	    }

That would make me a happy kitten! ๐Ÿ˜น

Noget package for 10.0.1

Hey, great to see that 10.0.1 is out so I don't have to run my own port <3

Is there a chance that you can publish the nuget package so it's easier to consume for other mods again? :)

UpdateFeatureDef "Name" must be globally unique.

Maybe it's something I'm doing, but I just discovered that "UpdateFeatureBase" from the following:
<HugsLib.UpdateFeatureDef Abstract="true" Name="UpdateFeatureBase">
threw an error as soon as I updated a second mod to 1.1, because they both used it:
image
I changed them to prefix my packageIds.
Just another departure from 1.0 I thought worth mentioning... maybe for the documentation? I assume this isn't a bug with HugsLib but just the way 1.1 does things.

Exception

An exception was caused by the HugsLibChecker assembly. Exception was: System.MissingMethodException: void Verse.LongEventHandler.QueueLongEvent(System.Action,string,bool,System.Action`1<System.Exception>)
at HugsLibChecker.HugsLibChecker.RunAllChecks () [0x000a2] in <17e0364003f64863ad8732cb22ef5516>:0
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch1 (string)
Verse.Log:Error (string,bool)
HugsLibChecker.HugsLibChecker:RunAllChecks ()
HugsLibChecker.HugsLibChecker:.ctor (Verse.ModContentPack)
System.Reflection.MonoCMethod:InternalInvoke (object,object[])
System.Reflection.MonoCMethod:DoInvoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
System.Reflection.MonoCMethod:Invoke (System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
System.RuntimeType:CreateInstanceImpl (System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo,object[],System.Threading.StackCrawlMark&)
System.Activator:CreateInstance (System.Type,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo,object[])
System.Activator:CreateInstance (System.Type,object[])
Verse.LoadedModManager:CreateModClasses ()
Verse.LoadedModManager:LoadAllActiveMods ()
Verse.PlayDataLoader:DoPlayLoad ()
Verse.PlayDataLoader:LoadAllPlayData (bool)
Verse.Root/<>c:b__6_1 ()
Verse.LongEventHandler:RunEventFromAnotherThread (System.Action)
Verse.LongEventHandler/<>c:b__27_0 ()
System.Threading.ThreadHelper:ThreadStart_Context (object)
System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object)
System.Threading.ThreadHelper:ThreadStart ()

Wrong Harmony link

The link to the Harmony mod at the main Readme is pointing to the Harmony lib. That confuses people a lot.

Unable to post logs to HugsLib Log Keeper

Smth going wrong with HugsLibLogKeeper. Every request to upload log ends up with "Unprocessable Entity Error". The last uploaded log is dated 05.04.2021.

My guess, smth happen with token, expired or smth. Nevertheless, we can do nothing. I hope you are still here and able to fix the issue. Thank you for your mod.

400 Bad Request when uploading logs

RcSxKxMYz2

Relevant segment of the player.log:
[HugsLib][warn] Exception during log publishing (gist creation): System.Exception: HTTP/1.1 400 Bad Request
  at HugsLib.Utils.HugsLibUtility+<>c__DisplayClass22_0.<AwaitUnityWebResponse>b__0 () [0x000a6] in <e4b32d84f714481f906e5eea5e560e3b>:0 
 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

TextField Focus prevents restart hotkey ; use KeyBindingDef.IsDownEvent

Apparently with Unity for some reason, when a GUI.TextField is focused, any Input.GetKeyDown returns false.

HugsLibs is using KeyBindingDef.JustPressed that does GetKeyDown in OnGUI so I think it should use IsDownEvent to catch these key presses via an Event.

I also think after a little searching that GetKeyDown is for Unity mono behavior Update() and the events are for OnGUI() so this change is probably just more correct in any case?

So yah I have a textfield set up that explicitly ignores certain key events, does not call textfield for that, but the existence of the text field focus is the problem. Even if another window is in front and text cannot be entered, HugsLib still doesn't process keys with that focuses textinput. I end up opening the animals tab because I bound the restart hotkey to F5.

Error when aking stone blocks (1.4)

When colonist try make stone block by stone cutters table, game throw error. When cutting is end, he dont recive blocks, but try cut the same stone slub forever.
Error:
JobDriver threw exception in toil FinishRecipeAndStartStoringProduct's initAction for pawn Guillermo driver=JobDriver_DoBill (toilIndex=16) driver.job=(DoBill (Job_265) A=Thing_TableStonecutter25414 B=Thing_ChunkSlate7287 C=(113, 0, 137))
System.MissingMethodException: single RimWorld.StatExtension.GetStatValue(Verse.Thing,RimWorld.StatDef,bool)
at (wrapper dynamic-method) Verse.GenRecipe.Verse.GenRecipe.MakeRecipeProducts_Patch1(Verse.RecipeDef,Verse.Pawn,System.Collections.Generic.List1<Verse.Thing>,Verse.Thing,RimWorld.IBillGiver,RimWorld.Precept_ThingStyle,Verse.ThingStyleDef,System.Nullable1)
at Verse.AI.Toils_Recipe+<>c__DisplayClass3_0.b__0 () [0x0013b] in :0
at Verse.AI.JobDriver.TryActuallyStartNextToil () [0x001b0] in :0
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
Verse.AI.JobUtility:TryStartErrorRecoverJob (Verse.Pawn,string,System.Exception,Verse.AI.JobDriver)
Verse.AI.JobDriver:TryActuallyStartNextToil ()
Verse.AI.JobDriver:ReadyForNextToil ()
Verse.AI.JobDriver:TryActuallyStartNextToil ()
Verse.AI.JobDriver:ReadyForNextToil ()
Verse.AI.Toils_Recipe/<>c__DisplayClass2_0:b__1 ()
Verse.AI.JobDriver:DriverTick ()
Verse.AI.Pawn_JobTracker:JobTrackerTick ()
Verse.Pawn:Tick ()
Verse.TickList:Tick ()
Verse.TickManager:DoSingleTick ()
Verse.TickManager:TickManagerUpdate ()
Verse.Game:UpdatePlay ()
Verse.Root_Play:Update ()

Expose AssemblyFileVersion in log

See fluffy-mods/Pharmacist#11 for more info on why this matters, although you're probably aware already given the version override you're using yourself.

I've stopped updating AssemblyVersion for non-major releases to make life easier for others referencing my dll's, but unfortunately that means that my dlls are now also reported with the wrong (or at least incomplete) version information in hugslib logs. I'd rather not add a version override file, given that there's a perfectly reasonable alternative (AssemblyFileVersion) available.

It would be nice if HugsLib could either report whichever version is higher, or just report both.

Pawn Rotator

The Pawn Rotator was a problem in A16, and a lot of people were banking on it being fixed in A17. Sadly, the one that works is private, and the one that's public just doesn't work, just as before.

This would be a valuable function for HugsLib to include.

Add support for a textbox using TextAreaScrollable

The string widget, via DrawHandleInputText, isn't large enough to reasonable hold a string larger than 30 characters or so. I rolled my own CustomDrawer for a few settings I had, but it might be more practical to create some sort of DrawHandleInputTextbox method in Dialog_ModSettings.cs.

Documentation questions: switching from Harmony to HugsLib

I have a project that currently uses Harmony. To start using HugsLib, are these reasonable steps I should take?

  1. Download HugsLib and add a reference from my project to HugsLib.dll
  2. Remove(?) reference in my project from Harmony.dll?
    2a. Do I need to add a reference to the 0Harmony.dll in the HugsLib Assembly directory?
  3. Remove my HarmonyInstance.Create(...) call and? my PatchAll(...) call
  4. Remove 0Harmony.dll from my mod's Assembly/ folder
  5. Profit!

Oh,
6. overriding ModIdentifier is required, correct? That's a string?
7. Optionally add the checker assembly

Hang-Crash On World Load-Cross Mod Conflicts

I submitted a bug report to the Psychology Mod developer and per their suggestion I am now submitting the issue here. Psychology and HugsLib WILL WORK TOGETHER, I cannot reproduce the issue. To reproduce I have to have other mods enabled for it to happen but I don't know which ones (I have a crapload of mods enabled). If I had to guess maybe it's ones that add custom factions?

See the details/log in my original post here.
http://steamcommunity.com/workshop/filedetails/discussion/747313773/154644928867855655/

HugsLib and Psychology were both recently updated and this recently became an issue. (other recent updates include Colonist Bar KF and Static Quality Plus)

Upload error: Unknown Error

While it has worked before (e.g. 2020-02) I cannot get HugsLib to publish any sort of logs this year (first tried in February). Pops up the following error:

Upload error: Unknown Error

I symlinked the log /tmp/rimworld_log to its actual location (LOGFILE_$USERID) and checked these two are actually the same file. Maybe the log file permissions should be relaxed?

-rw-r--r--    rimworld_log_1001

RimWorld 1.2.2900, HugsLib as per Steam, on Arch Linux.
Possibly linked issues are: #73 (, #75 )
Also thank you for all of your work in our community :o)

"Root level exception" error on clicking the "Dev quicktest" button in the main menu

Repro steps:

  1. Start game with only Harmony, Core, Ideology, Biotech and HugsLib enabled (no other mods)
  2. Enable dev mode in the settings
  3. Click the "Dev quicktest" button

Expected result: Game loads a map for quickly testing mods

Actual result: The console opens with an error message. Nothing else happens.

Found in: Rimworld 1.4.3524 with HugsLib 10.0.0

Root level exception in OnGUI(): System.ComponentModel.WarningException: scenario not found: 
  at HugsLib.Quickstart.QuickstartController.PrepareMapGeneration () [0x00033] in <6685087a0fc048d49e61a2c7c1ed1aee>:0 
  at HugsLib.Quickstart.QuickstartController.InitiateMapGeneration () [0x00001] in <6685087a0fc048d49e61a2c7c1ed1aee>:0 
  at Verse.ListableOption.DrawOption (UnityEngine.Vector2 pos, System.Single width) [0x00049] in <18a9c497395840e0ba98f4062b01a2f3>:0 
  at Verse.OptionListingUtility.DrawOptionListing (UnityEngine.Rect rect, System.Collections.Generic.List`1[T] optList) [0x00037] in <18a9c497395840e0ba98f4062b01a2f3>:0 
  at (wrapper dynamic-method) RimWorld.MainMenuDrawer.RimWorld.MainMenuDrawer.DoMainMenuControls_Patch0(UnityEngine.Rect,bool)
  at RimWorld.MainMenuDrawer.MainMenuOnGUI () [0x00242] in <18a9c497395840e0ba98f4062b01a2f3>:0 
  at Verse.UIRoot_Entry.DoMainMenu () [0x0001f] in <18a9c497395840e0ba98f4062b01a2f3>:0 
  at Verse.UIRoot_Entry.UIRootOnGUI () [0x0001c] in <18a9c497395840e0ba98f4062b01a2f3>:0 
  at (wrapper dynamic-method) Verse.Root.Verse.Root.OnGUI_Patch1(Verse.Root)
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
(wrapper dynamic-method) Verse.Root:Verse.Root.OnGUI_Patch1 (Verse.Root)

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.