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

Topics - Kyna Tiona

#1
Help / Restricting apparel by body type
June 08, 2019, 05:24:20 AM
I've encountered an alien race mod that also adds utterly adorable clothes. By default, the mod restricts the clothes to being only wearable by the mod's race, meaning it only has textures for the race's body type (thin). I'm trying to figure out a way to restrict the clothes to being only wearable by the same body type instead, that way I don't have characters equipping clothes that immediately become invisible.

Is it possible to do this through adding settings to the def files, or would doing the above be a very involved effort?
#2
Ideas / Guilty Visitors
June 04, 2019, 09:51:03 PM
So from what I can tell, raiders, escaped prisoners, and colonists who have committed murder get a "guilty" status on them that largely absolves consequences for doing bad things to them. Would it be possible to reuse the guilty effect to absolve the player of guilt when a visitor (guest, trader, etc.) acts out of line in the colony, such as with violent mental breaks? Like, I just had a guest go on a mental break and set fire to my rec room. If one of my colonists did that in someone else's colony*, getting arrested would be the least I could expect. But if I arrest the arsonist, his entire faction tries to kill me.

It seems really absurd and not entirely believable that I have to choose between either indulging the guy's wanton property destruction, or bloody war. I understand ingroup/outgroup bias is a thing, and I guess I could expect this rapid escalation out of a faction who's barely not at my throat in the first place. For other factions, though, I feel like a gentle tribe or civil outlander union would probably accept that their guy acted out of line and warranted punishment.

*: Everyone's stretch goal no doubt
#3
Help / Detouring an instance method with HugsLib
January 16, 2017, 08:04:15 PM
So I keep getting an "incompatible/corrupted mods" error when trying to detour an instance method, and I'm not sure what I'm doing wrong. I commented out the contents of the method and it still crashed, then uncommented them and replaced the method declaration with something normal and all was fine, so I'm pretty sure it's the function declaration I've messed up. Can anyone spot the mistake here?

using System;
using RimWorld;
using Verse;
using UnityEngine;
using SkillSpeed;
using HugsLib.Source.Detour;

namespace SkillSpeed.Detour
{
    public static class _SkillRecord
    {
        [DetourMethod(typeof(SkillRecord), "Interval")]
        public static void _Interval(this SkillRecord self)
        {
            // Snip
        }
    }
}
#4
Help / Where is a tile's name/faction base data found?
January 12, 2017, 12:38:10 AM
I'm displaying an alert for a map-specific event, which could be really frustrating if I don't include the name of the map it's happening on. Problem is, while I can see the data structures for a map's tile info and for a faction base's info, I can't figure out how to access the latter from the former.
#5
Kinda embarrassed to ask, but I guess I've never really had two colonies running simultaneously, so I wasn't sure. If you have two or more colonies, do they get trade ship visits separately, or do both of them gain access to the same trade ship simultaneously?
#6
Help / What even is this iterator.
January 11, 2017, 04:33:26 AM
[DebuggerHidden]
public static IEnumerable<Thing> AllLaunchableThings(Map map)
{
TradeUtility.<AllLaunchableThings>c__Iterator166 <AllLaunchableThings>c__Iterator = new TradeUtility.<AllLaunchableThings>c__Iterator166();
<AllLaunchableThings>c__Iterator.map = map;
<AllLaunchableThings>c__Iterator.<$>map = map;
TradeUtility.<AllLaunchableThings>c__Iterator166 expr_15 = <AllLaunchableThings>c__Iterator;
expr_15.$PC = -2;
return expr_15;
}


......So, I need to detour this function for a mod I'm working on, because I had to move the trade beacon functionality out of the thing and put it in a comp. It mostly all handles itself, but stuff still needs to know where to go to figure out what items are tradeable.

The trouble is, I barely even understand what I'm looking at, much less how to modify it...
#7
Downloads


Downloads:


   
   
Solar Weather   2017-1-11c      GDrive         Rebalances solar panels around adverse weather, adding some realism.
Expert Quality   2017-1-14b      GDrive         Makes crafted items' quality more consistent.

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








Solar Weather

Description:
Rebalances solar panels to work more like wind turbines. They have a higher maximum output (3000W over the old 1700W), but their output fluctuates based on adverse weather conditions in addition to light levels. You may find solar panels to be a far more effective energy source than wind turbines in an area with amenable weather and cool temperatures, rather than their previous state of simply not being competitive.

As an added feature, they now display how much of their output is being stifled by roofs or weather.



Balance:
Solar panels' outputs relative to vanilla are much higher output on clear days, around the same in rain and light snow, much less in fog and rainy thunderstorms, and none at all in hard snow. Heat will also lower output, and latitude is as bad for solar as ever, so the driest biomes will require their own cautious decisions.

You should see a much higher total power output, but it will fluctuate more and have more frequent outages, requiring more careful energy management overall. Feedback would be greatly appreciated.

Compatibility:
This modifies solar panels' and eclipses' defs as well as replacing solar panel's thing class, making it incompatible with basically anything that alters solar panels or eclipses.

Credits
I would've just floundered around for a bit before giving up on modding RimWorld if Grim hadn't gotten me started. Thanks, Grim!






Expert Quality

Description:
You may have seen your Godlike tailer put out a shoddy tuque or your Incompetent artist make an excellent sculpture and found this odd. From a storytelling standpoint, it's easy to explain as the former having a bad day and the latter showing signs of potential greatness, which is an enjoyable narrative.

...The first few times. However, if you looked at the numbers, you'd find that the chance of making a shoddy item don't drop below 1% until Strong Master. A "Skilled Professional" makes a poor item every fifth attempt. This is because vanilla RimWorld uses a simple normal distribution model, where any result is possible (if not always likely) at any skill level.

This can be considered true to life, but that may or may not make it enjoyable. For me, the consistency with which "planet-class masters" and "legendary" crafters make middling or low-quality goods makes me doubt the validity of those titles while wondering what the point of having skilled crafters is.

This took me out of the experience, so I replaced the previous model with a more tabletop-esque model. The specific formulas (as well as precise numbers) are included in the download, but the gist is that you should see more consistent results from your crafters, for good and for ill.

Balance:
Previously, it was difficult to have a functional import/export economy, as too many of your manufactured goods would come out being worth less than the raw materials. This is no longer the case, making it potentially quite profitable to buy raw materials from traders, turn it in to a quality item, and then sell it back.

As vanilla was not really designed for this dynamic, this may or may not break the economic system. It also radically increases the value of skilled crafters, so you may find that vanilla learning speed feels faster than it should. Feedback would be greatly appreciated.

Compatibility:
This does nothing but detour a single function that does nothing but return a random quality level relative to the crafter's level. This should be 100% compatible with everything except another mod to do the same thing.

Requires the ever-amazing HugsLib.

[attachment deleted by admin due to age]
#8
Help / Surgery Fact Sheet
January 03, 2017, 08:55:45 AM
A fact sheet for anyone interested in making a mod to fix surgery:


-   The base chance of success actually is the doctor's surgery success rate. The success rate (hereafter SR) is then multiplied by 100% + 5% of the room's cleanliness, to a minimum of 60% or a maximum of 150%. (I.E., a room with a cleanliness of -1 would multiply the SR by 95%.)

-   The SR is also multiplied by the medical potency of the medicine used. Herbal medicine has 40%, medicine has 70%, and glitterworld medicine has 160%. This means that even a doctor with a base surgery success rate of 100% will still fail 30% of the time if they aren't using glitterworld meds. Medical benefit bonuses, such as from hospital beds and vital monitors, do not affect this.

-   Operations can have a base success chance that is multiplied against the SR. The only operation that currently uses this, carcinoma, has a success chance of 70%. Hence, even a doctor with a surgery success rate of 100% would still have a 30% chance of failure.

-   Some operations have a "surgery success chance exponent", which multiplies the doctor's surgery success rate against itself a given number of times. This means that low surgery success rates are disproportionately more hazardous for some operations than for others. Notably, the multiplication doesn't happen on stats over 100%, so this process never grants a bonus.

-   In the case of a surgery failure, the game rolls a percent value to see what level of failure to inflict. There is a 50% chance of a minor failure, 40% chance of a catastrophic failure, and a 10% chance of a ridiculous failure.

-   Minor injuries deal a minimum of 20 damage, while catastrophic and ridiculous deal a minimum of 65. After inflicting each injury, the game checks the total surgery damage dealt and stops if the value is over the aforementioned number. The surgery damage dealt is a random value between 50% and 100% of that part's current HP. As such, for a part with 40 HP, there is a roughly 2.5% chance that the part will be instantly destroyed, even on a minor failure.

-   Minor and catastrophic failures can only damage parts that are a "child" or "parent" of the part being operated on. For instance, if operating on someone's skull, the head (the skull is a "child" of the head) or the brain (the brain is a "child" of the skull) could be affected, but the ears and eyes could not (they are both "children" of the head).
   Consequently, catastrophic failures can be more dangerous than ridiculous, as they guarantee that the damage will be concentrated on a small area. For instance, eyes and heads normally only have 10 and 40 health, respectively, for a total of 55 health. A catastrophic failure to the eye can only damage the eye and head, which have less total health than a catastrophic failure deals. Barring an unexpected error in the code, this should always be lethal.

-   Operations can be given a "death on failure" chance, which automatically kills the patient in place of a normal failure. This works from the bottom up, so a 10% death chance replaces the normal ridiculous failures, and a 20% chance reduces catastrophic failure chance down to 30% but leaves minor failures unaffected. Currently, only carcinoma uses this, with a death chance of 25%.

-   For a doctor with a surgery success rate of 100%, in a perfectly clean room with sterile tile, their patient in a hospital bed with a vitals monitor, using medicine to install a bionic ear, there is a 14% chance of instantaneous death.
#9
Help / Code for solar flares
December 29, 2016, 05:47:57 PM
So I'm using ILSpy to look through the C# assembly, and utterly failing to find the code governing solar flares. The XML entry in WeatherDef points towards "IncidentWorker_MakeMapCondition" with the value "SolarFlare". "SolarFlare" relates to a couple of dynamic references floating around in MapConditionDef and IncidentDefOf, but I can't find anything pointing me to the solar flare code itself.

I looked up a mod that messed with solar flares in the hopes that it'd point me to in the right direction, but no luck. Searches for "solar", "flare", "solar flare", and "solarflare" turned up nothing useful. Does anyone happen to know where it is, or how to find it?
#10
Help / Changing solar based on whether
December 27, 2016, 09:08:00 PM
So eclipses' prevalence kinda bother me. Putting aside the utterly baffling astronomical ramifications, I just don't think it makes for fun gameplay. Solar generators do need some level of unreliability to them, though, otherwise they'd be ridiculously amazing. I figured a reasonable and tidy compromise was to edit weather conditions such that most of them reduced the effectiveness of solar by a bit.

I'm new to modding RimWorld, so I was hoping I could accomplish this by just changing some numbers in the Weathers.xml, but it looks like there isn't a setting for changing the effectiveness of solar. Does anyone know if there's such a setting that exists but isn't normally used, or would this be a much more troublesome goal than I'd hoped?