BL 3D Art Having trouble getting custom pieces to appear as crafting parts

Users who are viewing this thread

Agent Grey

Recruit
So trying to get my custom meshes to show as crafting pieces under one handed swords but don't seem to be having any luck

So I have imported the models in the editor fine and assigned the material fine and that all seems to work fine and I can view it in the editor, I have added the pieces into crafting_pieces.xml and added the pieces under one handed swords in crafting_templates.xml and weapon_descriptions.xml but when I boot up the game they just don't seem to show up in the crafting menu for one handed swords, is there something I am missing here?



Also in regards to crafting_pieces.xml, crafting_templates.xml and weapon_descriptions.xml when copying them over to your own module should you delete the entries for all other parts and just have the parts you are adding in the module or do you still need to have the vanilla parts there in the xmls as well?

Another question, when creating the module from the editor I noticed it adds a bunch of xml files like face_animations.xml and partyTemplates.xml, is it better to delete the xmls you don't need when uploading to the nexus just to save on space and make things neater or should these all be included regardless of what you actually use?
 

NPC99

Baron
M&BWBWF&SVC
The game will only load your individual xmls, if instructed to do so. You do that in your submodule.xml (look at the game versions for examples). Your xml should only add new items unless you want to replace existing Native assets. In the later case, you may also need to use xslt to delete the Native assets being replaced. The game will load Native assets without you duplicating them, so, that's a waste of time unless you are adding or editing something. Look inside the default xmls created in your module by the Tools - they're empty - just there for convenience so you can add items. As such they are only 1kb - pointless to delete - also your submodule.xml expects them to be loaded even though they are empty.
 
Upvote 0

Agent Grey

Recruit
Hmm ok it is just looking at the mods I downloaded from the Nexus just to get an idea of what others are doing it seems that they only include the xml files they need and delete the rest as well as the entries in the submodule, they also change the names of the files by adding a reference to their module such as weapon_descriptions_modnamehere.xml or something which they then update in the submodule to reference that specific file.

That said I placed entries in the submodule to load crafting_pieces.xml, crafting_templates.xml and weapon_descriptions.xml into my submodule (did not change the file names, left them default) and now I am getting the error "Could not load merged xml file correctly: ItemsError: Object reference not set to an instance of an object" and have no idea what this is referring to.
 
Upvote 0

NPC99

Baron
M&BWBWF&SVC
That said I placed entries in the submodule to load crafting_pieces.xml, crafting_templates.xml and weapon_descriptions.xml into my submodule (did not change the file names, left them default) and now I am getting the error "Could not load merged xml file correctly: ItemsError: Object reference not set to an instance of an object" and have no idea what this is referring to.
You need to use the correct wording for each xml node. As previously advised, check the wording in the TW submodule.xmls for Native, Sandbox and SandboxCore. Those three TW modules use the same code rules yours. The first part refers to the element being effected and the later gives the name of the xml (or folder) in your mod's ModuleData folder.

Load errors are rarely informative, but generally indicate minor syntax errors in your xml file. Needs to be correct to work.
 
Last edited:
Upvote 0

Agent Grey

Recruit
So I pretty much did a straight copy paste job from the native SubModule.xml into mine but still getting the error

<XmlNode>
<XmlName id="CraftingPieces" path="crafting_pieces"/>
<IncludedGameTypes>
<GameType value = "Campaign"/>
<GameType value = "CampaignStoryMode"/>
<GameType value = "CustomGame"/>
<GameType value = "EditorGame"/>
</IncludedGameTypes>
</XmlNode>
<XmlNode>
<XmlName id="WeaponDescriptions" path="weapon_descriptions"/>
</XmlNode>
<XmlNode>
<XmlName id="CraftingTemplates" path="crafting_templates"/>
</XmlNode>

That said when I remove the references to these XML nodes as well as the items node it seems to work, could it be referring to an error within one of the xmls such as crafting_templates.xml rather than the submodule?

Might just wipe the module and start from scratch to see if I can catch where it is going wrong.
 
Upvote 0

NPC99

Baron
M&BWBWF&SVC
Could easily be referring to an xml error outside submodule.xml. Also, AFAIK your bottom two nodes should also specify included game types where they're used.
 
Upvote 0
Top Bottom