Hello,
After a break for personal reasons and cause i was a bit fed up to have Taleworlds meticulously aiming and destroying my mods one after the other i'm back at it and tried to fix all the mess when it was possible.
That brings me to the annoying and unnecessary tedious way you now have to make custom wanderers templates spawn in game, and looking on the nexus, most of those mods are now outdated and abandoned (except a few like StoleMyCoconut's or CarolinaWarlord from the discord who helped me here).
So, before you made a XML file with your new characters inside, another for the strings needed to recruit him/her and voila, it was working smoothly but since 1.7 some genius thought it would be nice to not have them loaded unless they were added to a culture file.
So now basically to add a new wanderer or companion, you have 3 possibilities :
Joining the XSLT i'm using
You need then to add a node to your submodule.xml like this
After a break for personal reasons and cause i was a bit fed up to have Taleworlds meticulously aiming and destroying my mods one after the other i'm back at it and tried to fix all the mess when it was possible.
That brings me to the annoying and unnecessary tedious way you now have to make custom wanderers templates spawn in game, and looking on the nexus, most of those mods are now outdated and abandoned (except a few like StoleMyCoconut's or CarolinaWarlord from the discord who helped me here).
So, before you made a XML file with your new characters inside, another for the strings needed to recruit him/her and voila, it was working smoothly but since 1.7 some genius thought it would be nice to not have them loaded unless they were added to a culture file.
So now basically to add a new wanderer or companion, you have 3 possibilities :
- You override the native culture and add what you need, this will obviously makes your mod pretty incompatible with any other mod changing the culture files.
- You create a new culture, if you are already adding one, perfect, if not, you will have to create a dummy, what is tedious and it will show up in the encyclopedia and at culture selection screen.
- Use XSLT to change the native culture without overriding it and adding simply what you want. It might cause save incompatibility if you add more but haven't tested so far.
Joining the XSLT i'm using
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:strip-space elements="*"/>
<!-- identity transform -->
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="Culture[@id='empire']/notable_and_wanderer_templates">
<xsl:copy>
<xsl:copy-of select="*"/>
<template name="NPCCharacter.your_wanderer_template_here" />
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
You need then to add a node to your submodule.xml like this
<Xmls>
<XmlNode>
<XmlName id="SPCultures" path="your_xslt_file_name"/>
<IncludedGameTypes>
<GameType value = "Campaign"/>
<GameType value = "CampaignStoryMode"/>
</IncludedGameTypes>
</XmlNode>
</Xmls>
Last edited: