Recent content by StormLightning

  1. StormLightning

    [HELP] My code won't work, and I can't understand why.

    I get it. Thank you so much for your help!
  2. StormLightning

    [HELP] My code won't work, and I can't understand why.

    So, how do I record that game initialization is finished? Is there some hook I can use to know that, and only thereafter try to find data?
  3. StormLightning

    [HELP] My code won't work, and I can't understand why.

    Oh! So that is what is giving the error. I trigger this when I enter a settlement. So I thought it would not be null.
  4. StormLightning

    [HELP] My code won't work, and I can't understand why.

    Source: TaleWorlds.CampaignSystem.ViewModelCollection
    Object reference not set to an instance of an object.
  5. StormLightning

    [HELP] My code won't work, and I can't understand why.

    The callstack from Better Exception Window is attached -

    Inner exception callstack: No inner exception was thrown
    Outer exception callstack:
    at TaleWorlds.CampaignSystem.ViewModelCollection.SPInventoryVM..ctor(InventoryLogic inventoryLogic, Boolean isInCivilianModeByDefault, Func`2 getItemUsageSetFlags, String fiveStackShortcutkeyText)
    at LatestTradeRumorsAll.LatestTradeRumorsAllBehavior.GetSPInventoryVM(InventoryLogic inventoryLogic) in D:\My Mods for Bannerlord\LatestTradeRumorsAll - Copy\LatestTradeRumorsBehaviorAll.cs:line 187
    at LatestTradeRumorsAll.LatestTradeRumorsAllBehavior.GatherTradeRumors(MobileParty party, Hero hero, Settlement settlement) in D:\My Mods for Bannerlord\LatestTradeRumorsAll - Copy\LatestTradeRumorsBehaviorAll.cs:line 193
    at LatestTradeRumorsAll.LatestTradeRumorsAllBehavior.TradeRumorsMain(MobileParty party, Hero hero, Settlement settlement) in D:\My Mods for Bannerlord\LatestTradeRumorsAll - Copy\LatestTradeRumorsBehaviorAll.cs:line 162
    at LatestTradeRumorsAll.LatestTradeRumorsAllBehavior.OnSettlementEntered(MobileParty party, Settlement settlement, Hero hero) in D:\My Mods for Bannerlord\LatestTradeRumorsAll - Copy\LatestTradeRumorsBehaviorAll.cs:line 131
    at LatestTradeRumorsAll.LatestTradeRumorsAllBehavior.OnSessionLaunched(CampaignGameStarter gameStarter) in D:\My Mods for Bannerlord\LatestTradeRumorsAll - Copy\LatestTradeRumorsBehaviorAll.cs:line 119
    at TaleWorlds.CampaignSystem.MbEvent`1.InvokeList(EventHandlerRec`1 list, T t)
    at TaleWorlds.CampaignSystem.CampaignEvents.OnSessionStart(CampaignGameStarter campaignGameStarter)
    at TaleWorlds.CampaignSystem.CampaignEventDispatcher.OnSessionStart(CampaignGameStarter campaignGameStarter)
    at TaleWorlds.CampaignSystem.Campaign.OnSessionStart(CampaignGameStarter starter)
    at TaleWorlds.CampaignSystem.Campaign.DoLoadingForGameType(GameTypeLoadingStates gameTypeLoadingState, GameTypeLoadingStates& nextState)
    at StoryMode.CampaignStoryMode.DoLoadingForGameType(GameTypeLoadingStates gameTypeLoadingState, GameTypeLoadingStates& nextState)
    at TaleWorlds.Core.GameType.DoLoadingForGameType()
    at SandBox.CampaignGameManager.DoLoadingForGameManager(GameManagerLoadingSteps gameManagerLoadingStep, GameManagerLoadingSteps& nextStep)
    at TaleWorlds.Core.GameManagerBase.DoLoadingForGameManager()
    at TaleWorlds.MountAndBlade.GameLoadingState.OnTick(Single dt)
    at TaleWorlds.Core.GameStateManager.OnTick(Single dt)
    at DMD?66163855::OnApplicationTick_Patch2>(Module this, Single dt)
  6. StormLightning

    [HELP] My code won't work, and I can't understand why.

    private static bool IsInCivilianModeByDefault() { return !(Mission.Current != null ? (Mission.Current.DoesMissionRequireCivilianEquipment ? true : false) : false); } private static string GetFiveStackShortcutkeyText() { return...
  7. StormLightning

    [MOD REQUEST] Companions leading parties return to the player after party being disbanded

    Hi. This shouldn't be too difficult to implement for all you great coders out there :) Currently companions leading parties disappear when you disband the party and you have to go looking for them at places near their last location. It would be so much better if the companion returned to the...
  8. StormLightning

    Resolved Not able to load mods with DLL plugin

    Found a solution to this as per the link -
    Works for now.
    Will post back after extensive testing if something goes wrong again.
  9. StormLightning

    Resolved Not able to load mods with DLL plugin

    Not able to load mods with DLL plugins. Game crashes before reaching the splash screen. Have made sure no DLLs are blocked - i.e. have unblocked all DLLs. Please help.
  10. StormLightning

    Silverstag Plus - For those who want native style branching Troop Trees - A small contribution

    To add to the example in the above post:

    You could just as easily decide to dismiss your Elite Crossbowmen, and use the Veteran recruits
    to hire completely different type of troops available at that center, such as higher Tier Infantry or
    Cavalry. Then those higher Tier Infantry or Cavalry could be further upgraded as may be possible.

    I've added the download link for the files. I've used 7Zip compression. It's an open source app.

    Thanks once again for your encouragement. Cheers!
  11. StormLightning

    Silverstag Plus - For those who want native style branching Troop Trees - A small contribution

    Yes, it's somewhat similar to what you have guessed.

    For example, the Swadian Ranged tree is as below:

    (Tier 1 - Peasant)        (Tier 3 - Peasant)                                  (Tier 6 - Veteran)                        (Tier 8 - Veteran)
    Swadian Hunter --> Elite Swadian Hunter ---------------> Veteran Tilbaut Castle Archer --> Veteran Suno Master Archer
            |
            '---------------> Swadian Crossbowman --> Elite Swadian Crossbowman
                                      (Tier 3 - Peasant)                    (Tier 5 - Veteran)

    Now, if you buy the Swadian Crossbowman directly from the center, you can upgrade only
    Regular --> Elite and not Regular --> Veteran --> Elite.

    And, if you buy the Regular Tilbaut Castle Archer from Tilbaut Castle, you upgrade from
    Regular TCA --> Veteran TCA --> Veteran Suno Master Archer, and it stops there.

    This is because I have tried to provide reasonable upgrade paths while staying within the
    framework of the Silverstag troop design, so some troop upgrades are missing in my trees.
    I'm sure with more work and inputs from players regarding the balancing, it would become
    possible to have better troop upgrade paths, but this is what I came up with. Also, the
    upgrades from Regular --> Veteran --> Elite don't change the weapons and armor, and
    paying high costs repeatedly for upgrading just the skills didn't seem to be worth it.

    So, this is how it works across the board, with all the kingdom troops, except the Player-
    made troops, because I don't know how to access that information yet.

    Regarding direct purchases from the centers, the recruitment works just as it does in vanilla
    Silverstag. You need Veteran recruits to buy higher tier troops. But, if you go the upgrade way
    from peasant troops to higher level troops, the peasant troops automatically turn into veteran
    troops, and if you dismiss those you get veteran troops in the center pool. All this is part of the
    Silverstag gameplay design. I didn't do any work on it :smile:

    So, in the above example, you could train your Swadian Hunters to Elite Crossbowmen, then
    decide you don't want to stop there and want higher tier troops, so you dismiss the troops in
    Tilbaut Castle (assuming you have the standings and affiliation) and get Veteran recruits in the
    center, and then recruit Regular Tilbaut Castle Archers, and you can then upgrade Regular TCA
    --> Veteran TCA --> Veteran Suno Master Archers, which is the top ranged tier for Swadia.

    And this is doable across all the kingdom troops, with minor differences, except for a few
    uniques which just did not fit anywhere in my troop tree branches. So those will be just like
    vanilla Silverstag. You buy them from the center where they are available, and upgrade them
    from Regular --> Elite, skipping Veteran. When you check the troop trees in Reference Material
    --> View all Troops, you can see the upgrade paths, though the branches don't show because
    Windyplains has taken the branching tree out of the presentation design.

    As I understand the Silverstag design, the early game is meant to be played without too much
    fighting except in tournaments, and doing quests for various NPCs to get standings and cash.
    This cash should be invested in enterprises to generate your own income. This income helps
    to recruit and maintain troops later on, since you now have high standings to access different
    troops, and better reserves of cash, and continuous cash flow to buy and maintain them.

    As I see it, the branching troop trees give the player the best of both types of gameplay, since
    one can upgrade the already bought troops without too much grind, but with the costs being
    close to buying troops directly, it doesn't give too much advantage over the AI.

    Hope this explanation helps to understand the troop tree addition better. Cheers!
  12. StormLightning

    Silverstag Plus - For those who want native style branching Troop Trees - A small contribution

    Thank you, Amun-Ra, for your kind words of encouragement and guidance. I appreciate you taking
    the time to say what you did.

    Regarding the cost of upgrades, I'll try to explain my reasoning.

    Native gameplay upgrades troops so fast that once you have a high trainer skill, you can literally upgrade your
    Village Recruit to an elite Knight inside a game week. This is unreasonable for two reasons:
    1. It's illogical that a recruit should turn into an elite troop so quickly, even assuming one in-game day is the
        same as a month of real time.
    2. It takes very little time for your party of freshly recruited villagers to turn into a top-level party, so it's
        basically playing with one or two levels of troops all the time i.e. always the same strategy.

    To force a little change in that approach, and to keep the options more in line with Silverstag's design of having
    different level troops, I've increased the XP cost a little to make the game take about 2-3 weeks of in-game time
    (including fighting and the associated XP gain for kills) for a Swadian Supplyman to upgrade all the way to a top
    level 40 Elite Praven Knight. It's not such a big delay, and it makes a little more sense to me.

    Also I would like to mention that I have not taken out the troop design made by the Silverstag team. That's not
    doable without rewriting a lot of code that is beyond my skills. What I've done is supplement Silverstag's troop
    system with an upgrade path for the player's troops. So you can buy troops directly off the market, or you can
    skill them up by upgrades. For this to make sense, I have to have the costs of troops near the original buys,
    otherwise the player would get troops too cheap and would unbalance the original design, which was not my
    intention. As it stands now, I pay about 2725 denars for an Elite Praven Knight upgrade from it's previous tier.
    And my purchase cost in-game is about 1850 denars if I dismiss my veteran troop and buy a regular Praven
    Knight (not Veteran or Elite). The in-game cost for Elite Praven Knight is showing as over 3300 denars.

    So, to compensate for the XP cost, and the upgrade path, the troops are working out at about 20-30% cheaper
    overall, plus available without having to grind the relations and allegiances, etc. From what I've played so far, it
    feels pretty much like Native gameplay, except the names are different, and the XP and cash costs are way higher
    and somewhat in line with the Silverstag design. So - You can either hire troops of all the types directly from the
    centers, and not upgrade them as per the new branched trees I've made. Or, just buy the cheapest peasant recruits
    and level them up with time and patience, and denars, ofc. You get the best of both the play styles.

    The only thing missing is that some of the troops will skip levels of upgrades if you go the direct buy and play way
    i.e. they won't upgrade from regular to veteran to elite. If you do upgrade them, you might skip a level or end up
    with a different troop type of a higher level. I've tried to keep it as sensible as I could without changing the troops
    designed by the Siverstag team.

    Okay, that's long enough. I hope my wall of text makes sense. Thanks once again for your interest and encouragement.

    Cheers!

    PS Corrected my main post to more accurately reflect that the troop cost is a bit less overall.

    Edit: Changed the calculations of cost as per corrected numbers in-game. Please offer feedback on this.
Back
Top Bottom