Item IDs the game sees???

Started by C0pper, May 20, 2017, 08:21:16 AM

Previous topic - Next topic

C0pper

So i'm messing around with ED-OmniGel mod you can find on the steam Workshop.
But asking for help there is about as helpful as tossing a message in a bottle into the puddle in the backyard...
Heck, the Maker of the mod has been online a few times but clearly does not seem to care much about his mods any more.
In case you are interested in have a closer look at the mod: http://steamcommunity.com/sharedfiles/filedetails/?id=722088674
It's for v.A16, just so you know... an update for A17 would be amazing, but clearly the dev does not seem to want to do that... So if someone else could take over the project and simply just update it to work on A17, that would be all anyone could ask for...

Now for my question:
I'm trying to make this mod allow me to replicate other materials, like wood. Or even materials from other mods.
I left all the core functions of the mod alone and just made duplicate text files with the changes i wanted, works like a charm.

What i would like is a list of Vanilla items usable.
Here is an example of my edit:
<RecipeDef>
<defName>Replicate_MK1_WoodFromOmniGelcbx1</defName>
<label>Rep Wood x1</label>
<description>Replicates wood from Omni-Gel.</description>
<jobString>Creating wood from Omni-Gel.</jobString>
<workAmount>200</workAmount>
<workSpeedStat>SmithingSpeed</workSpeedStat>
<effectWorking>Smelt</effectWorking>
<soundWorking>Recipe_MakeStoneBlocks</soundWorking>
<ingredients>
<li>
<filter>
<thingDefs>
<li>OmniGel</li>
</thingDefs>
</filter>
<count>1</count>
</li>
</ingredients>
<products>
<Wood>1</Wood> <!-- This is item i want made, but the game goes nuts over this, that is the correct ID for wood??? -->
</products>
<fixedIngredientFilter>
<thingDefs>
<li>OmniGel</li>
</thingDefs>
</fixedIngredientFilter>
<workSkill>Crafting</workSkill>
</RecipeDef>

I'm in no way a programmer or know much of scripting, but i can easily see patterns, and concepts in scripting.
But can't write it from scratch, so i'm just copy/pasting...
When the game start i get the following error:
Could not resolve cross-reference: No Verse.ThingDef named Wood found to give to Verse.ThingCountClass (1x null)
Verse.Log:Error(String)
Verse.WantedRefForObject:TryResolve(FailMode)
Verse.CrossRefLoader:ResolveAllWantedCrossReferences(FailMode)
Verse.PlayDataLoader:DoPlayLoad()
Verse.PlayDataLoader:LoadAllPlayData(Boolean)
Verse.Root:<Start>m__735()
Verse.LongEventHandler:RunEventFromAnotherThread(Action)
Verse.LongEventHandler:<UpdateCurrentAsynchronousEvent>m__733()

Which is mostly just nonsense to me, but i can easily gather that it does not know what "Wood" is...

So i'm asking anyone out there, where can i find a list of all the VANILLA items in the game?
Modded items are easy to find, that part is easy enough.

I DID go through core mod, but since most items are HARDCODED, they don't actually appear in that mod, let alone as a list. Or maybe i'm just blind as a badger.

I REALLY hope that this community is friendly and helpful...

-Copper Boltwire

AngleWyrm

The text editor Notepad++ has a feature called "find in files" that makes it easy to locate text strings in xml files in a subdirectory tree.
My 5-point rating system: Yay, Kay, Meh, Erm, Bleh

Fluffy (l2032)

You're blind as a badger ;).

Most items are in the Core/Defs folder, but the folder structure within that has changed a bit over time. The exceptions are implied thingdefs, where the existence of a def implies the existence of other defs. For example, for each PawnKindDef, the game automatically generates a leather and meat ThingDef. For each stone type, the game automatically generates the rough/smooth floor variants, etc.

As for your example, I believe the correct defname is WoodLogs. There is no list (you could easily print one, but that requires a simple C# mod), and not everything is in the defs.


C0pper

Quote from: Fluffy (l2032) on May 20, 2017, 09:11:06 AM
You're blind as a badger ;).

Most items are in the Core/Defs folder, but the folder structure within that has changed a bit over time. The exceptions are implied thingdefs, where the existence of a def implies the existence of other defs. For example, for each PawnKindDef, the game automatically generates a leather and meat ThingDef. For each stone type, the game automatically generates the rough/smooth floor variants, etc.

As for your example, I believe the correct defname is WoodLogs. There is no list (you could easily print one, but that requires a simple C# mod), and not everything is in the defs.
Thanks.
It at least solved the issue with the Wood... but as for the rest...
I'm not THAT skilled.

Quote from: AngleWyrm on May 20, 2017, 09:08:47 AM
The text editor Notepad++ has a feature called "find in files" that makes it easy to locate text strings in xml files in a subdirectory tree.
Oh yeah, it does... Honestly forgot about that feature.
But something tells me it won't help me find/catch all the items i want, but it's a good start at least.

I'll faff about with this some more... Not sure about my success, but this is at least a start.

So thanks!