Jump to content

Photo

Lutradian Army (coding help?)

troops troop tree

2 replies to this topic

#1
Eonrising

Eonrising

    Stranger

  • Premium Member
  • 8 posts

So I'm trying to make a custom troop tree to replace my current army with (through console commands most likely), but I'm pretty inexperienced with coding. I used the "Custom troop template tutorial" mod for my instructions on it, but the game seems to crash on the initial loading screen before I get to the menu when i have my mod enabled. Would anyone be willing to help double check my code? Or just help figure out what exactly I'm doing wrong so that I can fix it? 

This is my SubModule.XML

<Module>
  <Name value="Phalanx"/>
  <Id value="Phalanx"/>
  <Version value="v1.0.0"/>
  <SingleplayerModule value="true"/>
  <MultiplayerModule value="false"/>
  <DependedModules>
    <DependedModule Id="Native" />
    <DependedModule Id="SandBoxCore" />
    <DependedModule Id="Sandbox" />
    <DependedModule Id="StoryMode" />
  </DependedModules>
  <SubModules>
  </SubModules>
  <Xmls>
    <XmlNode>                
      <XmlName id="NPCCharacters" path="spnpccharacters_phalanx"/>
      <IncludedGameTypes>
        <GameType value = "Campaign"/>
        <GameType value = "CampaignStoryMode"/>
        <GameType value = "CustomGame"/>
      </IncludedGameTypes>
    </XmlNode>  
  </Xmls>
</Module>

The troop tree code is attached. Have I made some simple coding error? missed a symbol somewhere? Or am I all sorts of f**ked up?

Any and all help is appreciated!

Thank y'all for your time!

Attached Files



#2
Eonrising

Eonrising

    Stranger

  • Premium Member
  • 8 posts

I did find a missing equipment set up line, and a few other things, but the game is still crashing on startup. There doesn't seem to be any other errors in the code, but I'm not particularly skilled at this so more eyes on it would be better, I think! 

Here's the updated/corrected file if anyone wants to browse over it. The Submodule code has not changed.

Do I need to create a .dll file somehow? What am I doing wrong exactly?

Attached Files



#3
DeckardKain

DeckardKain

    Regular

  • Supporter
  • PipPip
  • 88 posts

this is what I think you did wrong -
                culture="Culture.Lutradia">

if you are going to add them to a new culture you need to create that culture as well (as defined in spcultures.xlm) and make a a path in submodule to your new culture file.

you also might want to know that defining cultures for simple combat troops is not that important, you can set it to culture vlandia for example and you won't notice a difference.
for combat troops its only used as an extra key to define NPC troop recruitment, useful when using tools like ATC for example. 
but they still need a defined culture else you get a empty call and a game crash when trying to load it. 
its also used for quests and to define spawns and more important for civilian and quest npc's and often used when creating dialogue. (for example if you like to create a sturgian townsman that speaks like a vlandian)


Edited by DeckardKain, 24 April 2020 - 02:04 PM.




Reply to this topic



  



Also tagged with one or more of these keywords: troops, troop tree

Page loaded in: 0.953 seconds