Quick question or two to get me started

Started by SgtToothpaste, January 20, 2020, 04:27:43 PM

Previous topic - Next topic

SgtToothpaste

Hey, new to modding rimworld and I think one or two questions will get me going in the right direction. I've got some C# and a bit of modding background, though never on the coding side, so I'm not too practiced digging around in decompiled code.
I have a simple goal while I get familiar, and a more adventurous one down the road:
-To begin with I simply want to add some flavor text to the combat log for wounded pawns, in reaction to things like pain, damaged organs, and bloodloss. Possibly dialog as well, I have seen dialog bubbles in other mods but im not sure if that is a vanilla function.
       So far I have found the xmls RulePacks_Combat and _Transitions for combat log entries, but after a few afternoons of sifting thru assembly I haven't been able to find the code that handles pawn damage/wounds and combat log entries, where I might add flavor text. Where would I find that code?

-Once I have some more knowledge my goal is to make a mild change to combat by making it much more common for pawns to be downed and recover during combat, possibly more than once. My guess is this will take lots of new code so its on the back burner.

I appreciate any help, and sorry if this kind of thing has been covered in other threads, if so I couldn't find them :)

LWM

As a general things, the wiki (rimworldwiki.com) has a lot of really useful stuff.

As for the combat thing...have you decompiled the assembly?  Searching thru the code for the XML key is often a useful way to find things.

SgtToothpaste

(Hey I recognize that name, Deep Storage is in most of my games :) )

Yes I've looked at the wiki, mainly jecrell's tutorial. I'm going thru the assembly setup steps there again in case I missed something, because searching xml keys never yields anything useful. I won't be surprised if that's the case; as I said, new to decompiling  ;D

LWM

I found I really like DnSpy for decompiling, but the others are good too.  RimWorld was the first time I ever used one.  Also the first time I built anything in C#.  Etc.  The "Setting up a solution" for C# tutorial got me through all of it.

As you get more and more used to it, you get a feel for how things are linked between XML and the C# code - and those keys are what ties them together...  Good luck, and there are usually people here who can answer questions or at least point you in a good direction.

(Glad you like it =^.^= )