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

#61
Quote from: RawCode on September 14, 2020, 04:32:00 AM
it is easy and does not need any outstanding skills.
[...]
if not, for any reason, and changing that specific value have some side effects, or does not have effect at all, you must check again, again and again, and take in account everything in your custom code.

Hehe...

If I recall correctly the size of the body part is stored somehow via the PawnKindDef, so if you just change it, you change it for everyone that's the same kind of pawn, so it may be complicated.
#62
Have you decompiled the code (dnSpy is great)? How does Toxic Fallout work?
#63
Someone was trying to find a way to be able to make a pawn change into a larger size a while ago, and I don't think they ever managed to.  They were going for a superhuman kind of like the Emporer in the warhammer 40k universe, IIRC?  But if you can find that thread, it might help you get an idea.

It's possible it's not easy - I think they gave up with that aspect in the end.

You might be able to make lifestages that cannot actually be reached or something, and trigger going to them?  I don't know...but you might not have much luck.
#64
Try <xpath>/Defs/ThingDef[defName="AB_GallatrossBones"]/statBases/Beauty</xpath>
#65
Help / Re: Help with Transpiler
September 11, 2020, 05:00:36 PM
Another way to do it is to wait unto all defs are loaded ([StaticConstructorOnStartup]) and then in the static constructor go rifling through the DefsDatabase to change the settings you want.

I think the reason you're getting a confusing set of IL code is that it's an IEnumerable - those are always a bit weird to work with in transpilers.  To actually transpile it, you would have to find the anonymous function that does the actual work, grab its name, and transpile THAT.

But ...rifling through the defs database might be easier  ;D

--LWM

PS I can point to examples in my code that do that if you would find that useful.
#66
I took a quick glance in RimWorld/JoyGiver_ViewArt.cs  (yay decompiling code?)

do you have a CompArt for your objects?

If so, what do they look like?
#67
Help / Re: Hospitality guests and fertilizer/concrete
September 09, 2020, 12:49:35 PM
Isn't there also some XML tag that tells you how common something is in the trade-goods pool? If so, you could make those very uncommon?
#68
Help / Re: Turret using different kinds of ammo?
September 07, 2020, 01:09:51 PM
I wrote a mod that allows using more than one fuel, but it was designed to use both fuels at the same time.  Still, you could probably (maybe) use it fairly easily to get multiple fuel types that are consumed selectively (may require some finesse).

If you're interested, it's at https://github.com/lilwhitemouse/RimWorld-LWM-Multi-Fuel-Requirement/ - it's licensed under the LGPL; it's that's a problem let me know.
#69
Help / Re: Interested in modding and in need of mentorship
September 07, 2020, 01:02:45 PM
Any mod that involves pawn AI is going to be higher on the "complicated scale" than a mod that adds, say, lightning guns.  (Probably)

It's very do-able, but understand: it will probably take a fair bit of work before you get results you're happy with.  Probably.

I recommend the wiki for general information, and I recommend looking at the vanilla code base to figure out how people do things (like play chess) and animals do things (like fetch), and go from there.
#70
Help / Re: Pawns Taking Meals to Eat at Paste Dispenser.
September 07, 2020, 12:59:04 PM
You can turn on job logging for a pawn and see what actual job they start when the go to eat.

You can use HugsLib's full log to see who patches anything related to eating.

Between the two, you can probably figure out if it's a mod?
#71
Help / Re: Using thingClass="..." for PatchOperations
September 07, 2020, 12:57:09 PM
Quote from: Syrus on September 05, 2020, 03:40:22 PM
Wish the Wiki had a bit more on XPaths, or maybe I'm just blind and missed it.

Maybe the wiki needs a link to https://www.w3schools.com/xml/xpath_syntax.asp or something. Xpath is a widely used standard, so there are plenty of resources....if you know to go looking for them  ;) ;D 8)

I use that syntax page a fair bit when I'm making sure I'm doing complicated xpaths correctly.
#72
I believe one actual example was a scyther's blade. I did not take any screenshots or notes, alas.
#73
Help / Re: Using thingClass="..." for PatchOperations
September 05, 2020, 02:26:26 AM
Your conditional xpath is looking for ...what?  Any entity that matches that first xpath? And if it finds one, it then proceeds to do your PatchOperationReplace, which only matches against things that already have a minified def?

You can probably do it all in one step with a PatchOperationAdd (unless there are other minified defs besides MinifiedThing out there?).  You'll need an xpath that looks something like:
<code>
<xpath>/Defs/ThingDef[thingClass="BuildingTurretGun" and not(minifiedDef)]</xpath>
</code>

Is that close to what you're trying to do?
#74
I got it to occur mostly be accident! I noticed it was happening a lot - my snipers would shoot off fingers from sleeping mechanoids when they dropped with psychic ship parts(etc).  I was not playing with Royalty.

I was probably playing modded. I don't think I play with anything that affects mechanoids or AI, but ....?

Maybe I should be playing with the Unstable build  :D
#75
Harmony's not too bad in some cases, so if you get to that point, don't despair :)