noob question viewing game source code

Started by Meatbomb, June 25, 2017, 12:25:12 AM

Previous topic - Next topic

Meatbomb

Hello guys,

Apologies for the vary basic question. I want to be able to browse the original game XML.

I am looking at this thread https://ludeon.com/forums/index.php?topic=33219.0

And downloaded
QuoteZentar's ILSpy   |   This is for referencing the game's decompiled C# scripts.

This seems like what I want to do, look through these files, right?  But I try to open cs files and it does not recognise them.

It seems I am missing a step.  Please could someone point me in the right direction? Where does the base game xml live and how to look at it?

jamaicancastle

The file you want to open in ILSpy is at Rimworld/RimworldWin_Data/Managed/Assembly-CSharp.dll
Note that this doesn't include the game's XML, which can be viewed (by any standard text editor) in Rimworld/Mods/Core/Defs

Meatbomb

Oh man, I did not think to look in the mods folder but obvious now...  thanks a lot.

Follow-up question, do you know where to find the backstories?  In translations they have a discreet file, but in English...  ?

Rimrue

Backstories are in the asset files (in the same folder as the assembly.dll). You will need an asset extractor (I think it's called) to access them.

Hope that helps. :)

RawCode

backstories are plain text and appended to asset file, you can extract them without any 3rd party tools.

Fluffy (l2032)

They're slightly obfuscated because these are largely rewards for patrons paying extra for their name-in-game. That said, still possible to mod - but you may want to use one of the mods that allows editing backstories... (anyone have a link? I can't seem to find it anymore).

@RawCode; technically correct, but completely misses the point.

dburgdorf

- Rainbeau Flambe (aka Darryl Burgdorf) -
Old. Short. Grumpy. Bearded. "Yeah, I'm a dorf."



Buy me a Dr Pepper?

Meatbomb

Hey there guys, thank you so much for your help so far.  So I figured out how to use ILSpy and I can open the Assembly-CSharp.dll

Wow!  So cool!

But.. searching "backstor" shows me all kinds of code for how they get inserted, etc., but I cannot actually find the stories themselves... Any tips further?

JT

#8
Quote from: Rimrue on June 25, 2017, 04:38:46 AM
Backstories are in the asset files (in the same folder as the assembly.dll).
[Strikethrough mine.]

The backstories are actually contained in the resources.assets file, not the Assembly-CSharp.dll, and can only be opened with a Unity 5 asset extractor.  I'm not even sure how you'd go about modifying them directly.

Since he was too kind to shill it directly, I do highly recommend dburgdorf's Editable Backstories, which also contains mostly faithful reproductions of the vanilla backstories.

Rimrue

That's what I said. Lol Assets are found in the Rimworld Data (not sure on the exact name) folder. The same folder that the assembly.dll is found in.

JT

Yep.  It wasn't personal. ;-)  I was just re-showing it as the direct reply to Meatbomb's last post with clarification, since s/he was possibly interpreting the stricken-through part of the sentence to mean it was literally contained in the assembly. =)