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

#1
When controlling a pawn and hovering over most sorts of entities you might want to target, the game will display hit percentages with a breakdown of all the factors that affect your odds of hitting that thing.  When pointing out a mini-turret, it is shown that mini-turrets benefit from cover, with a percentage breakdown of the cover provided by any items placed in between the turret and the attacking pawn.  In actual practice though, turrets do not benefit from cover at all.

A simple bit of XML tweaking will allow you to create an item that offers 99% cover, which will correctly block 99 out of every 100 shots fired at a pawn standing behind it, but a turret placed behind it will not benefit from this cover at all.  Sandbags, chunks, fences, it doesn't matter what item you're talking about, pawns always shoot at turrets as though the shot was completely unobstructed, which conflicts with what the tooltip says.

I'm actually not sure what the intended behavior is supposed to be.  Either the tooltip is incorrect and turrets are not supposed to benefit from cover except in that it slows down melee pawns who are attempting to reach the turrets, or turrets should be benefitting from cover and should be twice as hard or more to shoot down from a distance when placed behind sandbags or similar objects.

To test ingame: Start a new encounter/map, god-mode spawn in two mini-turrets with appropriate power supplies, surround one with cover and have the same pawn gun each of them down, comparing how long it takes.  Even over a small number of trials it should obviously take twice as long on average to destroy a turret which is behind the 50% cover of a rock chunk, but despite what the tooltip reports in that regard there is no difference whatsoever.

For reference, I believe this has been the case since at least version 1.0, and that's just the oldest easily accessible video I found on the topic before testing it myself after some folks on the Discord were talking about it.
#2
Discovered this recently in the process of noticing that it's impossible to get brain damage from Go-Juice anymore because it doesn't have a Tolerance.

If you create a game, spawn in drugs, then administer drugs to a pawn until they die, the pawn administering the drugs will throw a red error when attempting to complete their medical action on a pawn who was just converted into a corpse.  I tested this with Go-Juice, Flake, and Yayo, in various mixes.  Intentionally causing a fatal overdose throws it with perfect reliability.

The error is of the following format:

JobDriver threw exception in initAction for pawn Arroyo driver=JobDriver_DoBill (toilIndex=13) driver.job=(DoBill (Job_1144) A=Thing_Human321 B=Thing_Flake37169 C=(144, 0, 136))
System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorld.Recipe_AdministerIngestible.ApplyOnPawn (Verse.Pawn pawn, Verse.BodyPartRecord part, Verse.Pawn billDoer, System.Collections.Generic.List`1[T] ingredients, RimWorld.Bill bill) [0x0005b] in <eb03c2d15d854698949b53c08ba7db97>:0
  at RimWorld.Bill_Medical.Notify_IterationCompleted (Verse.Pawn billDoer, System.Collections.Generic.List`1[T] ingredients) [0x00029] in <eb03c2d15d854698949b53c08ba7db97>:0
  at Verse.AI.Toils_Recipe+<>c__DisplayClass3_0.<FinishRecipeAndStartStoringProduct>b__0 () [0x000c6] in <eb03c2d15d854698949b53c08ba7db97>:0
  at Verse.AI.JobDriver.TryActuallyStartNextToil () [0x001de] in <eb03c2d15d854698949b53c08ba7db97>: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.Toils_Recipe/<>c__DisplayClass2_0:<DoRecipeWork>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 ()


My original testing involved the use of HugsLib for quicker testing, but just to be absolutely certain I've also tested it in pure vanilla, and it's very easy to recreate.  If you'd like some more examples, it appears several times in my hugslib log here: https://gist.github.com/HugsLibRecordKeeper/446c56afeea13d3406ba53b8e9cb2200
#3
Per the title, some mortar shells have wildly different radiuses for "exploding as a projectile" compared to "exploding when they get destroyed on the ground."

I've attached an image I created in dev mode comparing these values for the smoke shell, which has an explosive radius of 7.2 when fired (red tiles in the attached image) compared to an explosive radius of 11 if you just set one on the ground and shoot at it or otherwise damage it (blue tiles in the attached image).

This is defined in Items_Resource_Shell.xml on:

EMP Shell
  Line 159: <explosiveRadius>11.9</explosiveRadius>
  Line 189: <explosionRadius>8.9</explosionRadius>
Smoke Shell
  Line 211: <explosiveRadius>11</explosiveRadius>
  Line 239: <explosionRadius>7.2</explosionRadius>
Firefoam Shell
  Line 262: <explosiveRadius>9.9</explosiveRadius>
  Line 296: <explosionRadius>5</explosionRadius>

To recreate this issue, simply start a new game, spawn two mortar shells of the appropriate type in dev mode, then fire one of them out of a mortar at a target and detonate the other one by applying "Damage 10" dev tool until it pops.

The actual explosive shells (High Explosive, Incendiary, and Antigrain) all have matching explosive values.