Mount & Blade II: Bannerlord

File information

Last updated

Original upload

Created by

LogRaam

Uploaded by

LogRaam

Virus scan

Safe to use

Tags for this mod

18 comments

  1. gadjodil
    gadjodil
    • member
    • 0 kudos
    Would you be able to do the same to make the game livelier by creating fun companions? The companion would have lots of randomized dialogue with supporting events. And please, no sexist s#*! game, even pimply teenagers are smarter than that. What is missing in this game are "intelligent" npc's with humor. I don't know if you could do it.
    For that, you have to have imagination and know how to write.
  2. Untolddead
    Untolddead
    • supporter
    • 2 kudos
    I keep getting this.
    You cannot call a method on a null-valued expression.
    At C:\Users\BrentR\Desktop\sugarcube\CEStoryCompiler\Classes\CEEventProcessor.psm1:367 char:25
    +                         $t = $t + $act[$i]
    +                         ~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
        + FullyQualifiedErrorId : InvokeMethodOnNull
    Cannot index into a null array.
    At C:\Users\BrentR\Desktop\sugarcube\CEStoryCompiler\Classes\CEEventProcessor.psm1:40 char:13
    +         if ($null -eq $scenario[0].Name) { throw "ERROR: It seems tha ...
    +             ~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
        + FullyQualifiedErrorId : NullArray
    1. Untolddead
      Untolddead
      • supporter
      • 2 kudos
      Got past that but it still isn't working. I've tried multiple small tweaks.
      now I have this error:
      Exception setting "ID": "Cannot convert value "" to type "Consequences". Error: "The identifier name  cannot be processed because it is either too similar or identical to the following enumerator names: NoValue, GiveXP, GiveGold, GiveCaptorGold, 
      ChangeProstitutionLevel, ChangeSlaveryLevel, AddProstitutionFlag, RemoveProstitutionFlag, AddSlaveryFlag, RemoveSlaveryFlag, ChangeMorale, ChangeRenown, ChangeCaptorRenown, ChangeHealth, ChangeRelation, ChangeTrait, ChangeCaptorTrait, ChangeSkill,
      ChangeCaptorSkill, ChangeClan, CaptiveMarryCaptor, ImpregnationRisk, ImpregnationHero, CaptiveLeaveSpouse, ChangeGold, ChangeCaptorGold, AttemptEscape, Escape, Leave, Continue, EmptyIcon, Wait, BribeAndEscape, Submenu, RansomAndBribe, Trade, SoldToCaravan,  
      SoldToSettlement, SoldToLordParty, SoldToNotable, HuntPrisoners, KillPrisoners, KillRandomPrisoners, KillAllPrisoners, KillPrisoner, KillCaptor, Strip, StripHero, PlayerIsNotBusy. Use a more specific identifier name.""
      At C:\Users\BrentR\Desktop\sugarcube\CEStoryCompiler\Classes\CEEventProcessor.psm1:259 char:9
      +$c.ID = $this.GetIDFrom($line)
      +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo : NotSpecified: (:) [], SetValueInvocationException
      + FullyQualifiedErrorId : ExceptionWhenSetting

      here I'm using the example code provided in twine:

      ACT 1
      Name: Choose_a_name_for_your_event
      Text: This is an example~
      Image: If_you_want_a_background_image
      [Restriction]::Captive
      [Restriction]::HeroGenderIsFemale 
      #TODO: Add [Restriction] here
      Option: 0
      OptionText: This is the first option.~
        [Consequences]::EmptyIcon
        [Consequences]::PlayerIsNotBusy
        #TODO: Add [Consequences] here
        #TODO: Add Triggers here if applicable
        Trigger: This_Is_A_Triggered_Event
      #
      [Requirements]::ReqCustomCode = true
      [Requirements]::SexualContent = false
      [Requirements]::ReqHeroMinAge = 18
      #TODO: Add Requirement(s) here
      END
      ACT 2
      Name: This_Is_A_Triggered_Event
      Text: This event is triggered by Act 1.~
       
      [Restriction]::Captive
      [Restriction]::HeroGenderIsFemale
      #TODO: Add [Restriction] here
      Option: 0
      OptionText: This is the first option for Act 2.~ 
        [Consequences]::EmptyIcon
        [Consequences]::PlayerIsNotBusy
        [Consequences]::ChangeHealth = R -60 -20
        [Consequences]::ChangeRenown = R -10 -1
        [Consequences]::ImpregnationRisk = R 20 15
        #TODO: Add [Consequences] here
        #TODO: Add Triggers here if applicable
        Triggers: This_event_trigger_at_50p_chances % 50
        Triggers: This_other_event_trigger_at_50p_chances % 50
      #
      [Requirements]::ReqCustomCode = true
      [Requirements]::SexualContent = true
      [Requirements]::ReqHeroMinAge = 18
      #TODO: Add Requirement(s) here
      END
      This is the output:
      <?xml version="1.0" encoding="UTF-8"?>
      <!--Code generated by CEEventCompiler.ps1 (created by LogRaam) 2020.  For M&B Bannerlord mod Captivity events by BadListener.-->
      <CEEvents xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file://CEEventsModal.xsd">
        <CEEvent>
      <Name>tester</Name>
      <Text>tester</Text>
      <MultipleRestrictedListOfFlags>
      <RestrictedListOfFlags>
      </RestrictedListOfFlags>
      <RestrictedListOfFlags>
      </RestrictedListOfFlags>
      <RestrictedListOfFlags>
      </RestrictedListOfFlags>
      <RestrictedListOfFlags>
      </RestrictedListOfFlags>
      <RestrictedListOfFlags>
      </RestrictedListOfFlags>
      <RestrictedListOfFlags>
      </RestrictedListOfFlags>
      </MultipleRestrictedListOfFlags>
      <Options>
      <Option>
        <Order>0</Order>
        <MultipleRestrictedListOfConsequences />
        <OptionText>dafsfs</OptionText>
      </Option>
      </Options>
        </CEEvent>
      </CEEvents>
    2. JottoVongolaPrimo
      JottoVongolaPrimo
      • member
      • 0 kudos
      Wish i could help, though i think this page is dead at this point
    3. BQshen
      BQshen
      • member
      • 0 kudos
      try powershell7 , not powershell ise
  3. deleted52041796
    deleted52041796
    • account closed
    • 0 kudos
    Could you had more explanations for compiling XML stuff? I can't make it work, i got errors like "Can"t import from html files"
    1. LogRaam
      LogRaam
      • premium
      • 570 kudos
      Hi, you can contact us on Discord with the following link: https://discord.gg/nQRBmg7 for support.

      Basically, you have 4 scripts. To create a CEEvent xml, you can use CreateCEEventXML-FromSimpleScript.ps1 or CreateCEEventXML-FromTwinExport.ps1 depend on what you want to do. In each script, you have to provide a source file and indicate a destination file. Then you run the script.

      If there is no error in the script you want to convert, the XML will de generated. If there is an error, it indicates that something can't be processed due to an error in the simple script syntax or commands.

      You can send me the file for assistance using the Discord channel.

    2. deleted52041796
      deleted52041796
      • account closed
      • 0 kudos
      I took the premade Losing battle script and then used "CreateCEEventXML-FromTwinExport.ps1" but i got the error : "ERROR: It seems that we have a problem. I Can't import Twine HTML file; the event generated is null."
    3. deleted52041796
      deleted52041796
      • account closed
      • 0 kudos
      Maybe it's my .xml file, it's literally blank, do i have to have to write something specific in it before compiling?
    4. LogRaam
      LogRaam
      • premium
      • 570 kudos
      The script will create the xml file. You don't need to have an empty xml.
      Can you send me the Twine export? Contact me on Discord to send me the file.
    5. deleted52041796
      deleted52041796
      • account closed
      • 0 kudos
      But i used the "Losing Battle" script that you put in the folder so we can understand how to script easely, i didn't make any script, i was just trying to compile and make your script work in my own game to see if it was working.
      I don't mind sending you your own work but i don't think the problem come from that. (except if the script you made isn't supposed to be compiled?)
      I just think i missed a step and i could use a idiot proof tutorial (if you got time for that ofc, just wanted to have fun with the game it's not a matter of life and death :D ).
    6. LogRaam
      LogRaam
      • premium
      • 570 kudos
      Oh I see.

      The Simple Script evolved when integrating with Twine. To compile it now you must add a tilde "~" at the end of each text block. That means all "Text:" and all "OptionText:" should have one. Like that:
      OptionText: Wait and see what happens next... ~

      ..but the images does not exists so this scenario won't works properly in game.
      What I suggest is to download this mods that is created using Simple Script: https://www.loverslab.com/files/file/12821-tbcaptivityeventsextension/ and play with the compiler. You'll be able to convert the xml to Simple Script and then recompile it to xml.
    7. Untolddead
      Untolddead
      • supporter
      • 2 kudos
      I also find it confusing. It would be nice if a short simple script came with that could be easily compiled to know we have it set up right.
  4. Untolddead
    Untolddead
    • supporter
    • 2 kudos
    Looks useful I'll give it a shot!
  5. cumcumelbow
    cumcumelbow
    • member
    • 0 kudos
    Guys.. I made quite a nice story line for myself. I usually do it in my mind but now I captured it on video and made it very amaturistic by pasting tekst on the screen when having conversations with NPC etc. But I have always liked to create scenarios. There is no big story in Bannerlord. 

    My question is, is there someone that would lke to create a story/scenario mod for bannerlord?
    I made already 2 x an episode of 1 hour.. working on the third now. But then you can have a feel..
    And see what type of scenario and creativity I have and if it suits you for whom ever likes to work with me on it.

    I will upload it on youtube maybe, but maybe keep it private. Depends on mod possibilities.
    My name on discord: Jumanji#3726
    1. LogRaam
      LogRaam
      • premium
      • 570 kudos
      Captivity Events mod can showcase a story from an event on a map.  You can display an image on background, have a small text and some choices the player can click on.  Each choice can apply consequences and can show a new sequence of image/text/choice(s).  It is the same mechanic that exist in a gamebook.  If this mechanic suit you needs, then it should be easy to transcript your story into Bannerlord.

      If your story require interaction with the game world, then Captivity Events nor this mod is the right tools for you.
  6. Burton112358
    Burton112358
    • premium
    • 0 kudos
    This is a gateway drug ;)
    1. LogRaam
      LogRaam
      • premium
      • 570 kudos
      ;)