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 - PeteTimesSix

#31
Releases / Re: [A17] SimpleSidearms (1.1.1)
June 01, 2017, 11:05:14 PM
Quote from: Traditionology on June 01, 2017, 06:43:30 PM
FYI the two links you posted in the Mod Announcements thread are wonky, both link here but only if I delete the %22 from the front and add a : after https

That said, love the work <3
I AM GOOD AT YOUR INTERNET TUBES NO REALLY *flails incompetently*

Thanks! Fixed it.
#32
Outdated / Re: [A17] Mod Announcements Thread
June 01, 2017, 12:53:17 PM
Simple Sidearms
Pawns can carry alternative weapons to their primary one, use them when appropriate, (optionally) drop them when forced to and retrieve missing weapons when undrafted (including primary weapons dropped due to being downed).

QOL tweaks pack
Random bits and bobs that bother me about Rimworld (like wasting storage space or tight-lipped surgeons), modded away.

I'd like to think I kept the mods straightforward and simple to use, and if any specific feature bothers you there's a comprehensive settings menu that allows for a lot of customization.
#33
Releases / Re: [A17] SimpleSidearms
May 31, 2017, 07:21:18 PM
Quote from: kchou94 on May 31, 2017, 06:52:37 PM
Nice updates!  The unarmed feature will come in handy.  Now I can get my pawns to knock out animals for medical training without having to manually unarm them.

Could you please explain what the different autoswitch locks do?
There's an image I posted a few pages back... here it is:

(I've added it to the OP)

Basically, the point is that if you want a pawn with a bunch of ranged sidearms to use a specific weapon (like, say, molotovs), you can lock it so the pawn doesnt autoswitch off it.
#34
Releases / Re: [A17] SimpleSidearms
May 31, 2017, 04:24:17 PM
Quote from: jackarbiter on May 31, 2017, 03:28:04 PM
On latest version, when starting a new colony:



I figure maybe this didn't come up because you tested on an existing colony or summat. Or maybe I've done something wrong.
Whoops. On it.

EDIT: Okay, should be fixed.
#35
Releases / Re: [A17] SimpleSidearms
May 31, 2017, 02:54:44 PM
Quote from: DariusWolfe on May 28, 2017, 02:56:17 PM
Oi, small 'bug'; The mod doesn't appear to recognize elephant tusks or logs (or thrumbo horns, I suspect; cannot confirm, tho') as available sidearms. I currently have some dudes with tusks, and I can't set these as sidearms.
You technically can in that when setting the weight restrictions high enough they will allow for using thrumbo horns, wood, elephant tusks and beer bottles. They just dont show up in the lists, since as is the mod only loads weapons from the actual weapon defs. Ill fix it at some point.

Anyway. Update!




Pawns will now remember which weapon is their primary and will switch back to it once undrafted. They will also remember which weapons they are missing when forced to drop them. This includes dropping their primary weapon due to being downed. Once undrafted or done recovering in the hospital, they will automatically go retrieve them.

Oh, and you can switch to unarmed now. That's also a thing.
#36
Quote from: Love on May 28, 2017, 07:14:12 AM
QOL Tweaks is extremely bugged ATM and actually seems to be causing a memory leak as well, I don't recommend using it.

Right, I think that I *may* have fixed it. Tell me if its still an issue.
#37
Quote from: deathstar on May 28, 2017, 07:10:07 AM
When using your QOL-Tweaks, I am getting the following order when using the stonecutters table to queue up the "make any stoneblocks"-bill, then qualifying "Do until you have..." for the quantity: /snip

Just fixed that, actually. Still looking into the memory leak thing - Ive removed some debug log spam I forgot to comment out last time that *might* have something to do with it, but I havent been able to reproduce it yet (probably because I'm yet to play a proper-length game). Throwing up an update anyway - one fix is better than none, after all.

Also, because I dont enjoy bugfix-only releases, I threw in a new tweak:

Walking off bruises
Doctors will no longer waste medicine on injuries that have no risk of permanent effects.

Note the three glitterworld medicines that were NOT wasted on bandaids.
#38
Releases / Re: [A17] SimpleSidearms
May 25, 2017, 08:11:50 AM
Quote from: Razzoriel on May 25, 2017, 08:05:12 AM
Quote from: Razzoriel on May 23, 2017, 12:36:09 PM
OP, if it's not much to ask, me and plenty of others are just looking for a code patch that automatically switches weapons from ranged to melee. The max mass mechanic you have, which restricts how much mass both weapons should have, IMO, is perfect to prevent abuse in the case of someone wielding a minigun and longsword, for instance.

So, if you can, could you make a SimpleSidearms Lite version, where you just set the maximum mass of one or the other, or both? Thanks in advance.

You're basically asking me to strip out ninety percent of the mod and then release it as a separate version (and then have to maintain it), when you can archieve exactly what you want already using the settings menu. I'd really rather not do that.

What I can do is add a preset that does that. At that point you literally only have to press a single button. List, added, etc.
#39

Description:
I think just about everyone that plays Rimworld has their own personal list of gripes and annoyances, little irksome things that don't really detract from the game as a whole but still result in a little bit of frustration when encountered.

Had to work around colonist stupidity      -2

Well, this one is mine, only I was looking for an excuse to crawl through the Rimworld codebase to familiarize myself with it and making these little tweaks was a great way of going about it. Reports that I'm drunk on the power of the Harmony library are greatly somewhat a little bit not at all exaggerated.

Features include, and are limited to:
Butchering storage efficiency
Butchering one animal can often result in more than one stack worth of meat. When you have freezers with limited space and a sudden influx of corpses (hello, manhunter pack of muffalo!), this leads to annoying micromanaging (as you disable your butcher table and then forget to turn it back on, or forbid individual corpses as soon as they get hauled in). So this tweak teaches butchers to temporarily stop butchering when they run out of storage space for the meat butchering would produce. They do look for animals with less meat on their bones first though, so your freezers won't end up filled with chick corpses.


Meal equivalency
I like keeping a steady supply of meals. I also like not making simple meals when I could be making fine meals. This tweak makes both of these goals possible to accomplish without micromanaging, as cooks will now consider both simple meals and fine meals when counting meals in storage.


New orders
When holding shift, pawns will now have a few new orders on offer.

Move to: Like you'd expect, tells a pawn to go somewhere.


Carry/Drop: Pick up a specific item (or stack of items) and carry it to a specific spot.


Trading stockpiles
Allows setting of individual stockpiles as trading stockpiles. Everything in a trading stockpile will be automatically marked to sell whenever a trading dialog is opened. It'll still require confirmation though, so if you're trading with a passerby you won't accidentaly hand them your entire stock for their two hundred silver.


Surgery estimates
Doctors are pretty good at assessing the odds of success when it comes to surgeries. Its high time they got around to telling you, too. That random guy you told to strap a peg leg to your only actual doctor can take a guess too, but they won't be nearly as accurate. And uh, don't rely too much of the estimates of your local pessimist.

More details in this Imgur album

The threshold for how good a doctor you have to be to give accurate estimates is customizable, and the innacuracies introduced by the surgeon's personal neurosies decrease as their medical skills go up (professional doctors won't let a little psychopathy ruin their reputation, after all).

EDIT: Two noteworthy things I forgot. One: since this uses a calculation based on Rimworld's surgery failure calculations, the results will be innacurate if you're using a mod that alters that system. I'm looking into options for compatibility with surgery mods, but if any modders wanna chime in I'd appreciate it. Two: does not factor in the medicine used, since at the moment, neither does Rimworld. If/when that's fixed, I'll re-enable that part of the calculation. So remember to use herbal medicine for your operations, children!

Customization
Speaking of customization, you can turn off any of these tweaks individually if you don't like them, or if you have the same functionality from a different mod. There's also a few options to futher specify how the tweaks work.



Walking off bruises
Doctors will no longer waste medicine on injuries that have no risk of permanent effects.

Note the three glitterworld medicines that were NOT wasted on bandaids.

Download

Can be found at:
GitHub (source)
Steam Workshop

How to install:
- Unzip the contents and place them in your RimWorld/Mods folder.
- Activate the mod in the mod menu in the game.

OR

-Subscribe to the mod on the Steam Workshop.

is required.

License
As far as I'm concerned you can go ahead and post a copy of this mod that differs only by a single extra space in the about file as long as you mention me somewhere or link back to this thread along the way.
#40
Releases / Re: [A17] SimpleSidearms
May 25, 2017, 05:33:46 AM
Quote from: Pichu0102 on May 25, 2017, 05:27:53 AM
Minor issue, if I have weapons returned to inventory, after combat is over, they don't switch back to their main or ranged weapon, which leads back to hunter does not have ranged weapon.
Hm, true. Changing that would require giving pawns less goldfish-like memory, but I think I know how to do that now... Ill add it on the list.
#41
Releases / Re: [A17] SimpleSidearms
May 24, 2017, 04:16:26 PM
Quote from: WereCat88 on May 24, 2017, 02:51:25 PM
Does this mod work with other weapon mods? I imagine it should?

Worked with the two I tested. Should work in general, assuming the weapon mod in question doesnt bypass Rimworld's weapon system entirely.

Oh hey, A17 is out. Maybe now people will stop asking for a A16 version :)
#42
Quote from: Tynan on May 24, 2017, 02:46:13 PM
Interesting.

So to clarify, it's possible medicine doesn't affect surgery, but we know it does affect tending, right?
Ill admit to not checking the tending code (the mod I was working on was surgery-specific), but from a quick search through the decompiled code just now, plus a short test where a pawn tending a single injury (thus using a single medicine) only used up that medicine after finishing and applied a nice 100% white bandage despite having only a 3 in medicine skill, Ill guess yes.
#43
Bold claim, I know.

First off, a disclaimer: I've been digging through the code using a mod and I realise that I'm not supposed to post bugs in modded games, so its possible the issue is somewhere in HugsLib or Harmony. However, with such a simple test-case I kind of doubt it (and considering how many A17 mods use those libraries I figure it's its still pretty important to find out if that's the case), and if I'm wrong it should take one Log.Message(GetAverageMedicalPotency(ingredients)) in the right place to find out.

I think the game uses a default value instead of the medicine potency stat when it comes to determining surgery failure rates.

Ive spent the last five hours trying to figure out what I'm missing, but my best guess as to what happens: By the time the Recipe_Surgery class gets around to checking wherever a surgery failed (in CheckSurgeryFail), the ingredients list no longer actually contains the medicine used for the surgery (since the surgeon always brings one unit of it, which is consumed when the surgery begins), and thus GetAverageMedicalPotency always returns 1f. This is somewhat hard to notice since that happens to match regular medicine and actually makes herbal medicine *better*, but it makes glitterworld medicine much worse than it should be for surgeries specifically.

I've attached the test mod I've been using, stripped down to bare essentials (requires HugsLib as I need Harmony prefix/postixes for this), and a convenient save file with a surgery about to begin can be found here. The code of the test mod is:

    /// <summary>
    /// List out ingredients right before surgery fail check (which makes use of them)
    /// </summary>
    [HarmonyPatch(typeof(Recipe_Surgery), "CheckSurgeryFail")]
    static class Test_Prefix
    {
        [HarmonyPrefix]
        private static void CheckSurgeryFail(Recipe_Surgery __instance, Pawn surgeon, Pawn patient, List<Thing> ingredients, BodyPartRecord part)
        {
            Log.Message("ingredients for surgery on "+patient);
            foreach (Thing ing in ingredients)
            {
                Log.Message(ing.LabelShort);
            }
        }
    }

    /// <summary>
    /// Print average medical potency result to log
    /// </summary>
    [HarmonyPatch(typeof(Recipe_Surgery), "GetAverageMedicalPotency")]
    static class Test2_Postfix
    {
        [HarmonyPostfix]
        private static void GetAverageMedicalPotency(Recipe_Surgery __instance, List<Thing> ingredients, ref float __result)
        {
            Log.Message("avg. medical potency result is "+__result);
        }
    }

    /// <summary>
    /// Force all glitterworld medicine to be obnoxiously good
    /// </summary>
    [HarmonyPatch(typeof(StatWorker), "GetValue")]
    [HarmonyPatch(new Type[] { typeof(Thing), typeof(bool) })]
    static class Test3_Postfix
    {
        [HarmonyPostfix]
        private static void GetValue(StatWorker __instance, Thing thing, bool applyPostProcess, ref float __result)
        {
            StatDef stat = Traverse.Create(__instance).Field("stat").GetValue<StatDef>() as StatDef;
            if(StatDefOf.MedicalPotency.Equals(stat))
            {
                if (thing is Medicine)
                {
                    if ((thing as Medicine).def == ThingDefOf.GlitterworldMedicine)
                    {
                        __result = 9999.0f;
                        Log.Message("Forced glitterworldMedicine potency to:" + __result);
                    }
                }
            }           
        }
    }




Of course I could be hilariously wrong, in which case I genuinely have no idea how the GetAverageMedicalPotency method actually gets the right ingredient list.

[attachment deleted by admin due to age]
#44
Releases / Re: [A17] SimpleSidearms
May 23, 2017, 10:35:53 AM
Quote from: Love on May 21, 2017, 11:52:21 PM
I feel like the Basic preset should have weapon dropping set to Never.
The basic preset is essentially what Ive set out to accomplish when I first started on this mod. Any changes to it would basically depend on subjective opinions, its not like I can please everyone. Thats why there's a settings menu that exposes basically everything in the first place - if you dont like it, you can change it yourself.

New release is out.
Added individual pawn weapon locks for ranged weapon switching
When switching from a used-up singleshot weapon, pawns will now prefer drawing spares over any other sidearm
Various bugfix attempts

The new locking mechanism:
#45
Releases / Re: [A17] SimpleSidearms
May 20, 2017, 05:16:17 PM
New release is out.



Added presets*! Choosing customization options is now just one click away.
Hunters have been re-educated and will no longer fire sniper bullets out of their knives.
Centipedes have finally run out of free shiv coupons and will as such return to using shoddy inferno launchers.
After an initial wave of hype, scyther blade users have returned to tearing things apart with their own bare claws. Bionic arm users are on the fence, one of which was quoted as saying "There's a lot of math involved, you know? Have to calculate DPS on the fly and everything!"

*(sort of, anyway. the implementation leaves a bad taste in my mouth. have to see about reworking it)


I mean that last bit, by the way. I'm pretty sure I'm not actually changing the right settings objects, even if it works. Might have to page UnlimitedHugs or something.