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

#31
Releases / Fuel Filter
April 18, 2021, 07:14:47 PM
Hey, y'all! I got tired of my colonists burning super valuable Thrumbone in the blast furnace instead of wood, so I finally made a mod that allows you to select what is used for refueling:

https://github.com/lilwhitemouse/RimWorld-LWM.FuelFilter

(also available on Steam https://steamcommunity.com/sharedfiles/filedetails/?id=2461634904)

LWM's Fuel Filter allows you to choose which possible fuels will actually get used when refueling.

"Hey, what do you have there in your arms?"

        "A big pile of Thrumbone - it's a super expensive bone from a neat mod!"

"Really expensive, eh?"

        "Yeah!  Hard to get - we barely have any and it's great stuff - you can use it like wood!"

"I notice you're walking towards the Blast Furnace. Where are you taking it?"

        "Oh, I'm going to burn it all as fuel."

"Don't we have a lot of really cheap wood?"

        "Yeah, but this was closer!"

"..."

As a bonus, I patch anything that burns "WoodLog" (that is, wood) to burn "Woody" things (only helps if you have mods that add woody things, such as Lulu's bone mod, or some of the expanded biome mods...but unless you have a mod like that, you probably don't need this anyway!)  So the Blast Furnace from Project RimFactory can burn the sequoia wood from expanded biomes.  If a similar patch is needed for metals, I can do that too.

Enjoy, --LWM
#32
Help / Re: change existing button
November 07, 2020, 02:19:46 PM
What, exactly, do you want to do to this button?

You can see what I did for the "cut tree" button in my "Minor Changes" mod, which may give you an idea what to do?  https://github.com/lilwhitemouse/RimWorld-LWM.MinorChanges/blob/master/Source/Patch_Designator_PlantsCut-cutTrees.cs
#33
Help / Re: Adjusting the mod "TendWhenever"
November 07, 2020, 02:07:08 PM
The "Prisoners on the go" (or whatever the mod is that allows you take prisoners without having to stuff them into a jail cell while in a caravan) has a way of doing that, so you might have a look (you might just want to use that mod in addition?)
#34
Please, could you make Graphic_Linked's LinkedDrawFromMat(...) virtual? Given how Prints work, this shouldn't have any impact on performance and would allow greater flexibility for modding.

Thanks!
#35
Help / Re: Building is moved
November 07, 2020, 01:24:12 PM
What, b/c the blueprint is a container?
#36
Help / Re: JobDriver overriding
October 26, 2020, 05:44:59 PM
Looks like you should at least see your debug message at least once.  If you want to be even more sure, you could make a constructor that logs a message:

public Class1() : base() {
  Log.Message("At least my class got called?");
}

Could we see your full directory structure? (github is awesome; having a license is super awesome)

Only thing I could possibly think is that sometimes RW doesn't like names ending in numerals?
#37
You write

private LordJob_BestowingCeremony_Patch CeremonyJob_Patch => (LordJob_BestowingCeremony_Patch) this.Bestower.GetLord().LordJob;

but apparently, sometimes the Lord's LordJob is NOT a LordJob_BestowingCeremony_Patch.  You could replace it with something that does "Log.Message("Actual class is "+this.Bestower.GetLord().LordJob.GetType()); return null;"  It'll break, of course, but it'll give you a message first.

I suspect that you're mixing JobDrivers and Jobs here - they are different things in RW.  Your JD is ...I think the driver what tells the pawn they can have a job or something?  And the Job is what sets out the tasks ("toils") in the job?  Look at some vanilla classes to get a good idea here - I don't work with jobs super often!
#38
Help / Re: Failed to find any textures
October 22, 2020, 11:06:50 PM
If you have Koala_etc in YourModName/Textures/Animals/Koala/ then the texpath would be Animals/Koala/Koala

#39
You have used some tool like dnSpy to look at the vanilla code?

The wiki has a bunch of useful tips for getting started with C#.
#40
Help / Re: Patching a modded trader for another mod
October 12, 2020, 11:29:23 PM
Look at the PatchOperations page in the wiki (http://rimworldwiki.com/) - you want the PatchOperationFindMod (I think)
#41
Mods / Re: I want to create directional explosives.
October 08, 2020, 02:45:21 PM
IntVec3 is a vector of 3 integers: x, y, and z.  X and Z are co-ordinates on the map (for each cell). You can go back and forth to draw position with ToVector2 and ...something similar?  That might help you if you calculate your explosion in float vector and need to figure out which cells are specified?  Or maybe not ;p

The 'y' part of that IntVec3, you ask?  That's how "high" the thing is in terms of logical program layer: terrain, filth, structure, pawn, motes, weather effects, etc.  There's a whole list of AltitudeLayers somewhere.

The SimplePool appears to be a caching mechanism for lists one can use? Possibly in an attempt to avoid object allocation to help with performance for scenarios when one is playing with CE and 50 explosions happen at once and the game drops to .04FPS?  I'm guessing here.

It looks like the interesting line of that file is this:

this.cellsToAffect.AddRange(this.damType.Worker.ExplosionCellsToHit(this));

That suggests to me that somehow you can specify the Worker for your type of "cone explosion" and that can specify what cells are affected.  So that's where I would start looking, were I you?
#42
Oh, right, that's better.

This also works as a patch:

<designationCategory Inherit="false" />


#43
C# lets you set debug code that won't eve compile into Release code, so absolutely no performance hit for Release and you can even leave trace in sensitive places!  Super useful :D
#44
No idea.  You may get a clearer answer to your question on a dnSpy messageboard?  But....surely you can change the XML to set a higher stacklimit?

There are a lot of resources and tools that let you do a lot of things to the code.

And in case you didn't know, the ...Ogrestack? mod lets you set stacklimits for any def you want?  Tedious perhaps with meat, but doable (you'd need to either edit the IL directly as you are doing or use Harmony and C# to change the def generator to get all of them at once)  There are of course also other options - mods that mix all meat together, and of course storage mods, that might also answer your needs.

#45
If you want to keep trace code around for possible future use, there's some slick features that C# lets you do that also keeps trace from showing up when you don't want - I can point you to an example if you like.