BL Coding Can't find reason for NullReferenceException

Users who are viewing this thread

SJB01

Recruit
Hi there,

I've tried to add a small clan (minor noble faction) to a the game, also marry one of them to the main hero. Since I tried to update it for e1.8.0 it will crash the game when starting the campaign and tells me: "Could not load merged xml file correctly: HeroesError: Object reference not set to an instance of an object." Although I never really learned much about programming, I know what that means in general. But going over the xml files (the one with the Heroes list in it as well as the other ones) over and over again and comparing it to ones of the Sandbox module and to ones of other mods, I still can't figure out what is wrong with my file. So now here I am sharing these files and asking for help on this matter.


Heroes-file:

<?xml version="1.0" encoding="utf-8"?> <Heroes> <!-- HuntersClan --> <Hero id="lord_hunter_1" faction="Faction.clan_hunter" spouse="Hero.lord_hunter_2" /> <Hero id="lord_hunter_2" faction="Faction.clan_hunter" spouse="Hero.lord_hunter_1" /> <Hero id="lord_hunter_3" faction="Faction.player_faction" father="Hero.lord_hunter_1" mother="Hero.lord_hunter_2" spouse="Hero.main_hero" /> <Hero id="lord_hunter_4" faction="Faction.clan_hunter" father="Hero.lord_hunter_1" mother="Hero.lord_hunter_2" /> <Hero id="lord_hunter_5" faction="Faction.clan_hunter" father="Hero.lord_hunter_1" mother="Hero.lord_hunter_2" /> <Hero id="lord_hunter_6" faction="Faction.clan_hunter" father="Hero.lord_hunter_1" mother="Hero.lord_hunter_2" /> <Hero id="lord_hunter_7" faction="Faction.clan_hunter" father="Hero.lord_hunter_1" mother="Hero.lord_hunter_2" /> </Heroes>
Lords-file:

<?xml version="1.0" encoding="utf-8"?> <NPCCharacters> <NPCCharacter id="lord_hunter_1" name="{=lord.hunter_1}Teodric" voice="earnest" age="40" default_group="Cavalry" is_hero="true" is_female="false" culture="Culture.vlandia" occupation="Lord" face_mesh_cache="true"> <face> <BodyProperties version="4" age="35.5" weight="0.4" build="0.6" key="0000F40FC01423C508879A72568E458860CE7B5573A67141666B9C319497495802796024078896639500000000000FFE00000000000000140000000000E82004" /> </face> <skills></skills> <Traits> <Trait id="CavalryFightingSkills" value="6" /> <Trait id="KnightFightingSkills" value="5" /> <Trait id="Commander" value="5" /> <Trait id="Mercy" value="2" /> <Trait id="Manager" value="5" /> <Trait id="Honor" value="1" /> </Traits> <Equipments> <EquipmentSet id="vla_bat_template_medium" /> <EquipmentSet id="vla_civ_template_default" civilian="true" /> </Equipments> </NPCCharacter> <NPCCharacter id="lord_hunter_2" name="{=lord.hunter_2}Libeta" voice="softspoken" age="37" default_group="Cavalry" is_hero="true" is_female="true" culture="Culture.khuzait" occupation="Lord" face_mesh_cache="true"> <face> <BodyProperties version="4" age="30.5" weight="0.4" build="0.1" key="0018EC0FC0FC20043C858B39C96AB1B5849C7B75668C3940DAC89620887E431800A936140135B5441600000000A7000000000000000015110000000068342083" /> </face> <skills></skills> <Traits> <!-- NONCOMBATANT CHARACTER --> <Trait id="Politician" value="4" /> <Trait id="Generosity" value="1" /> <Trait id="Mercy" value="2" /> <Trait id="Calculating" value="1" /> </Traits> <Equipments> <EquipmentSet id="vla_civ_template_default" /> <EquipmentSet id="vla_civ_template_default" civilian="true" /> </Equipments> </NPCCharacter> <NPCCharacter id="lord_hunter_3" name="{=lord.hunter_3}Phrovenia" voice="softspoken" age="18" default_group="Cavalry" is_hero="true" is_female="true" culture="Culture.vlandia" occupation="Lord" face_mesh_cache="true"> <face> <BodyProperties version="4" age="15.9" weight="0.3" build="0.1" key="0018EC0FD214400E01882CFA47AD0241F1C8794B3CCF7731819A82A68BFC085900AE26620482A7000700000000EC800300000000000015620000000044443003" /> </face> <skills> <skill id="Medicine" value="90"/> </skills> <Traits> <!-- NONCOMBATANT CHARACTER --> <Trait id="Generosity" value="2" /> <Trait id="Mercy" value="2" /> <Trait id="Calculating" value="1" /> </Traits> <Equipments> <EquipmentSet id="vla_civ_template_default" /> <EquipmentSet id="vla_civ_template_default" civilian="true" /> </Equipments> </NPCCharacter> <NPCCharacter id="lord_hunter_4" name="{=lord.hunter_4}Elwisia" voice="ironic" age="12" default_group="Cavalry" is_hero="true" is_female="true" culture="Culture.vlandia" occupation="Lord" face_mesh_cache="true"> <face> <BodyProperties version="4" age="12.5" weight="0.2" build="0.1" key="0015EC0FD42C4001007DA515298BF08580FA8D44448C5E30415EF560885A765600870642042B75930400000000700000000000000000004300000000005C2043" /> </face> <skills></skills> <Traits> <!-- NONCOMBATANT CHARACTER --> <Trait id="Politician" value="1" /> <Trait id="Generosity" value="1" /> <Trait id="Mercy" value="1" /> <Trait id="Calculating" value="1" /> </Traits> <Equipments> <EquipmentSet id="vla_civ_template_default" /> <EquipmentSet id="vla_civ_template_default" civilian="true" /> </Equipments> </NPCCharacter> <NPCCharacter id="lord_hunter_5" name="{=lord.hunter_5}Aelywenia" voice="curt" age="6" default_group="Cavalry" is_hero="true" is_female="true" culture="Culture.vlandia" occupation="Lord" face_mesh_cache="true"> <face> <BodyProperties version="4" age="6.6" weight="0.2" build="0.1" key="0010EC0FD2B4400200968F08858C319370FC79C6AB8C2E315459C092862F280901AB40820758B86314000000009000000000000000000086000000000CD83083" /> </face> <skills></skills> <Traits> <!-- NONCOMBATANT CHARACTER --> <Trait id="Generosity" value="1" /> <Trait id="Mercy" value="2" /> <Trait id="Calculating" value="1" /> </Traits> <Equipments> <EquipmentSet id="vla_civ_template_default" /> <EquipmentSet id="vla_civ_template_default" civilian="true" /> </Equipments> </NPCCharacter> <NPCCharacter id="lord_hunter_6" name="{=lord.hunter_6}Haveric" voice="curt" age="9" default_group="Infantry" is_hero="true" is_female="false" culture="Culture.vlandia" occupation="Lord" face_mesh_cache="true"> <face> <BodyProperties version="4" age="9.4" weight="0.3" build="0.2" key="000DF40FC01423C608879A72568E458860CE7B5573A67141666B9C319497495803634035068896633500000000000FFE00000000000000B40000000000B82004" /> </face> <skills></skills> <Traits> <Trait id="Valor" value="2" /> <Trait id="Manager" value="1" /> <Trait id="Mercy" value="1" /> <Trait id="Calculating" value="2" /> </Traits> <Equipments> <EquipmentSet id="vla_bat_template_medium" /> <EquipmentSet id="vla_civ_template_default" civilian="true" /> </Equipments> </NPCCharacter> <NPCCharacter id="lord_hunter_7" name="{=lord.hunter_7}Godafric" voice="curt" age="14" default_group="Cavalry" is_hero="true" is_female="false" culture="Culture.vlandia" occupation="Lord" face_mesh_cache="true"> <face> <BodyProperties version="4" age="14.4" weight="0.3" build="0.4" key="0010F40FC01423CF08809A79668E458560CE7B5573A67141666B9C31949749580266402406889663650000000005036E00000000000000B40000000000D82004" /> </face> <skills></skills> <Traits> <Trait id="CavalryFightingSkills" value="2" /> <Trait id="KnightFightingSkills" value="2" /> <Trait id="Commander" value="2" /> <Trait id="Generosity" value="2" /> <Trait id="Mercy" value="2" /> <Trait id="Honor" value="1" /> </Traits> <Equipments> <EquipmentSet id="vla_bat_template_medium" /> <EquipmentSet id="vla_civ_template_default" civilian="true" /> </Equipments> </NPCCharacter> </NPCCharacters>

Factions-file

<?xml version="1.0" encoding="utf-8"?> <Factions> <!-- HuntersClan --> <Faction id="clan_hunter" owner="Hero.lord_hunter_1" banner_key="3.100.124.1800.1200.764.764.1.1.0.137.135.149.372.372.764.764.0.0.0.202.15.0.144.144.632.881.0.1.-118.202.15.0.144.144.598.860.0.1.-118.202.15.0.144.144.668.903.0.1.-118.128.80.149.180.180.884.650.0.1.0" label_color="FF42261C" color="FF42261C" color2="FFD08E55" alternative_color="FFFFE9D4" alternative_color2="FF312A4D" culture="Culture.vlandia" settlement_banner_mesh="encounter_flag_f" name="{clan_hunter}Hunters of the Meadowlight" short_name="{clan_hunter_short}Hunters" is_noble="true" is_nomad="true" tier="1" text="{clan_hunter_text}The Hunters of the Meadowlight, originally a family of farmers in Vlandia, refused to obey their lord. So they got expelled from their homeland and needed to become hunters in the forests and mountains of Calradia. They are still looking for a new place to settle down again, where they can keep their freedom and live in peace."/> </Factions>

SubModule-file:

<?xml version="1.0" encoding="utf-8"?> <Module> <Name value = "Hunters"/> <Id value = "Hunters"/> <Version value = "t1.8.0"/> <SingleplayerModule value="true" /> <MultiplayerModule value="false" /> <Official value ="false" /> <DependedModules> <DependedModule Id="Native" DependentVersion="e1.8.0" Optional="false"/> <DependedModule Id="SandBoxCore" DependentVersion="e1.8.0" Optional="false"/> <DependedModule Id="Sandbox" DependentVersion="e1.8.0" Optional="false"/> <DependedModule Id="CustomBattle" DependentVersion="e1.8.0" Optional="false"/> <DependedModule Id="StoryMode" DependentVersion="e1.8.0" Optional="false"/> </DependedModules> <SubModules/> <Xmls> <XmlNode> <XmlName id="NPCCharacters" path="ClanMemberDetails"/> <IncludedGameTypes> <GameType value = "Campaign"/> <GameType value = "CampaignStoryMode"/> </IncludedGameTypes> </XmlNode> <XmlNode> <XmlName id="Heroes" path="ClanMembers"/> <IncludedGameTypes> <GameType value = "Campaign"/> <GameType value = "CampaignStoryMode"/> </IncludedGameTypes> </XmlNode> <XmlNode> <XmlName id="Factions" path="Clan"/> <IncludedGameTypes> <GameType value = "Campaign"/> <GameType value = "CampaignStoryMode"/> </IncludedGameTypes> </XmlNode> </Xmls> </Module>

harmonylog says:
found GetCompanionLimitFromTier in DefaultClanTierModel, in TaleWorlds.CampaignSystem, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
found GetCompanionLimitFromTier in DefaultClanTierModel, in TaleWorlds.CampaignSystem, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
 
Top Bottom