Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - UnlimitedHugs

#481
Updated to 2.1.0

Added the "Detour by attribute" feature contributed by Fluffy.
#482
Added a wiki page on how to get started with the library: ModBase reference
#483
Check is over here- separate project for the companion assembly.

Quote from: joaonunes on December 15, 2016, 04:40:43 PM
Did you write all the code in this mod or did you have some help/copy-paste from other sources?

I took the detouring code from CCL, but the rest I accumulated over the past couple of months. Most of it was to make working on my own mods easier.
#484
Quote from: joaonunes on December 15, 2016, 03:18:04 PM
You should think about it though xD

Oh, I did- even planned out parts of it. It's a massive chunk of work, though.
Gotta pick your battles- and I figured I'd rather make some mods in that time.
#485
Quote from: joaonunes on December 15, 2016, 02:45:48 PM
soooooo is this supposed to be something like CCL but with features like "Version Checker" from Starsector or "AVC" from Kerbal Space Program? (a.k.a. mod version checker)
If yes, then this can potentially be one of the best mods that ever existed for this game, it only depends on the will of the other modders to include a file regarding mod version.

However, the other mods I referred, which are for other games, do not need a dll to do that, they use a xml file (the one for Starsector has a ".version" extension but it's xml if you open it :P)... May I ask why you chose to go with the dll?

And if this is not only about version checking but also having some CCL features will it be compatible with other mods or just not with CCL? Does it work with CCL? Is this meant to be a replacement for CCL?

Sorry for all the questions but I am really curious about this mod :)

This is not going to replace CCL, just make modding easier and provide some common facilities for those mods that want to use them. Mods that don't will be elminated are still compatible, of course. So, similar purposes, you could say. It is compatible with CCL and there is even some integration.
The difference is that I want to keep the library light and simple, so that it can be updated within a few days of a new release. Which means I'm not going to include a lot of useful xml stuff and detours that CCL provides.

As for the version checking, the companion assembly will only check the version of the library, not that of other mods. I chose to go for the assembly because it will give a clear error dialog to the player when the library is missing. It would be hard to figure out the problem otherwise.

I hope that helps.
#486
Reserved.
#487
Library badge
If your mod or modpack uses HugsLib, and you're in the market for a fancy badge, you can use this one to link back to this thread:



[url=https://ludeon.com/forums/index.php?topic=28066][img]http://i.imgur.com/9L4f8u7.png[/img][/url]
#488


Description:
HugsLib is a lightweight shared mod library for Rimworld. It is designed to provide a foundation for mods and deliver shared functionality.
I initially developed this for my own mods, but decided to make it publicly available after people showed interest in using the library for their own work.

Notice
  • HugsLib must be installed as a separate mod by the players. The library itself is not to be included with your mods. You can use the mod dependency system added in Rimworld 1.1 to add HugsLib as a requirement to your mod. See the required About.xml additions below.




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, MapComponentsInitializing, MapGenerated, 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.

Included translations: Russian (by anonymous, dragomano), Simplified Chinese (by cainiaowu), Traditional Chinese (by duduluu, shiuanyue, CuteLasty), Polish (by Kunegard), Spanish (by nahuen89, PelucheKawaii, 53N4), Japanese (by Proxyer), Korean (by urty5656), French (kaptain-kavern), German (maculator).

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>

Documentation
Rimworld 1.1 update guide

ModBase reference (start here)
Adding mod settings
World data storage
Mod update news
Introduction to Patching
Custom Tick Scheduling
Development Utilities

Deprecated features (A16)
Detouring
GUI injection

If there is something missing, feel free to look through the code, or message me if you need more info.

Contributions
Detour by attribute feature added by Fluffy
Detour safety checks contributed by 1000101 and Zhentar
HubsLib badge contributed by Alistaire
Shell commands contributed by scuba156

Honorable mentions go to Andreas Pardeike for the lovely Harmony library.

Pack policy
Feel free to use and include wherever. Credit is optional.

Source
Github

How to install
To install using Steam:
  • Subscribe to the HugsLib and Harmony pages on the workshop (links below).
  • Once the download in the Steam client completes, start the game and open the Mod menu.
  • Enable both in the Mods menu in-game, along with any other mod you are adding (click the red X next to the mods)
  • Click the "Auto-sort mods" button at the bottom, then "Close".
  • You are ready to play after the game restarts.
To install manually:
  • Download the latest Harmony release using the link below (Harmony.zip file).
  • Download the latest HugsLib release using the link below (HugsLib_X.X.X.zip file).
  • Extract both to your Rimworld/Mods folder, like any other mod.
  • Enable both in the Mods menu in-game, along with any other mod you are adding (click the red X next to the mods).
  • Click the "Auto-sort mods" button at the bottom, then "Close".
  • You are ready to play after the game restarts.

Download
The Harmony mod is required and must also be installed: Latest version

HugsLib: Latest version

Also available on the Steam Workshop

Also available on NuGet
#489
Congrats on the ambitious update!

Loving the new research screen, but as a modder it raises a few concerns, unless I'm missing something.
Coordinating between dozens of different mod authors, as to where their research projects should exist on the chart, will quickly become a problem. The game does try to find some open space for overlapping items, but with enough mods it is bound to turn into a mess.

I can see two potential solutions:

1) Add tabs to the research window.
One tab for each mod that adds new research projects. Each tab will contain a clean sheet for research placement. The problem are prerequisite researches from other tabs, with the potential solution being that the mod author explicitly places references to those researches in his tab.

2) Keep all projects in the same view, but divide the sheet in section rows. Each mod with research projects will have their own row, and their researchView coordinates will be relative to their own section. The height of the sections would automatically accommodate all items contained within, or be specified in the defs. For more clarity the sections could be titled with the mod name and could have up/down arrows to reorder the sections on the sheet.
Scrolling would need to be addressed, as well- dragging to pan the view could be a good option.
#490
Quote from: Smexy_Vampire on November 29, 2016, 05:22:22 PM
looks dam cool but complicated to work

Which parts of the mod do you find complicated?
#491
Quote from: mazacik on November 25, 2016, 02:37:28 PM
I'm afraid using a manual detonator would be too slow, because a colonist would have to walk up to it and use it - the prisoners would be long gone, since they can walk through doors during a prison break (I think I'm going to make a mod that disables this...), and generally focus on running away as fast as possible.

A corridor filled with chunks would slow 'em down if it were the only entryway to the prison area. Food could be self-served nutrient paste.
But I do get your point.

Quote from: ChaosChronicler on November 25, 2016, 02:36:35 PM
Really loving this mod right now. Got me out of a bad situation with a poison ship part that landed right next to my colony (well what I designated as the beach head since it had all my defences right next to it). Downed two centapides with two chrages and a lot of pistol fire. Sucked it destroyed my sandbag bunker  :P

Try the EMP charges- nothing like punching down a shipful of stunned mechanoids. Not cheap, but definitely effective.
#492
Quote from: mazacik on November 25, 2016, 12:06:47 PM
I wanted to use it specifically as a countermeasure to prison breaks, since there is literally no way to deal with them right now, except shooting the escaping prisoners until they get downed/die. A sensor would detect an escaping prisoner, sealed foam blocks the exit and sleeping gas calms the wannabe houdinis down a little.

Hey, that's pretty clever. Of course, you could just make a manual detonator and put those things on a separate circuit.
I'll keep the detector idea in mind- perhaps I'll come up with something interesting and balanced eventually.
#493
Quote from: mazacik on November 25, 2016, 02:26:58 AM
Would you mind adding a proximity detonator? Something along the lines of: when a pawn moves into a room, blow up all attached/nearby explosives.

Not quite sold on that one, since it would remove the interactive element. Planning for automation can be fun, but we don't want raids to become boring affairs.
I feel the vanilla IED with its limited range fills the auto-triggered niche pretty well, especially with the added auto-replace mechanic.
#494
Quote from: Wishmaster on November 20, 2016, 09:56:04 AM
Isn't it a bit too OP you can one shoot an entire plasteel vein or a non vanilla very tough ore with fracturing explosives?
I think it should just deal a certain amount of damage to ore in a radius.

That's a valid idea, balance-wise. I'll see if I can throw that into the next update.
#495
Quote from: StormySunrise on November 19, 2016, 01:41:57 PM
Hi, Ive been having some confliction when loading Map Reroll with Glitter tech
it cannot seem to load the unity.engine/texture for any of the Glittertech stuff when I have Map Reroll enabled.
Does anyone know how to fix this?

Have you restarted your game after changing your mod setup? That seems to be the most common cause for broken textures.