搜索结果: *

  1. beybi123

    BL Coding How to stop engage behaviour from code?

    插入代码块:
    CampaignCheats::MainPartyIsAttackable
    partly does what you want. But disabling ai does work because you can set the short term target too. Try something like this:

    插入代码块:
    mobileParty.Ai.DisableForHours(3);
    
    //will clear target party.
    mobileParty.Ai.SetMoveGoToSettlement(settlement);

    Let me know if this works for you.
  2. beybi123

    BL Coding Creating conversation on the world map

    You can try something like this:

    插入代码块:
       public void Initialize()
            {
                ScreenManager.OnPushScreen += OnScreenManagerPushScreen;
            }
    
         
    
            private void OnScreenManagerPushScreen(ScreenBase pushedScreen)
            {
                if (!_registered && pushedScreen is MapScreen mapScreen)
                {
                    mapScreen.MapNotificationView.RegisterMapNotificationType(typeof(MiscarriageNotification),
                                                                              typeof(MiscarriageNotificationVM));
                    _registered = true;
                }
            }
    
            public void OnGameEnd()
            {
                ScreenManager.OnPushScreen -= OnScreenManagerPushScreen;
                _registered = false;
            }

    Call Initialize() in your submodule class.
    Note that this is an older code, may need some tweaks.
  3. beybi123

    Need More Info Corrupt saves after update

    I play on PS4 and I understood that the update 1.07 was meant to fix the corrupted data saves. However today I have had FIVE corrupted data saves i.e. both main saves and all 3 autos. The only reason I haven't lost everything is because I made back up saves to cloud. Situation is arguably worse than pre-update. Devs, thoughts?

    Hello there. Did you also encounter this issue with the following?

    Old saves might still be corrupted when overwriting (this includes auto-save), so make sure to create a new save file (choose "save as") for any existing saves that you want to safeguard.
  4. beybi123

    Resolved Save File size suddenly doubling

    Hello, I'm sorry but can you elaborate a bit on this? Is this fixed in an upcoming patch? What is the expected 'normal' size for these save files at these stages of the game?

    I have gone and redownloaded the saves I reported, immediately re-saved them, and saw no decrease in file size. Is there something else I need to do or wait on to see a change?
    Hello, problem regarding the doubling of save file sizes is fixed internally and will be published in upcoming patches. With that fix, save sizes will increase linearly :smile: Also, we have implemented a series of optimizations that reduces the save file size. For comparison, I re-saved one of the save files you sent (I think it was around 36-39 MBs) and size got reduced to 17.6 MB.
  5. beybi123

    Discussion Suggestion Internal methods all around GameMenu related code makes it hard to manage menus

    Hello, instead of removing and adding game menus, you can define variables to enable/disable a game menu option at any time using "GameMenuOption.OnConditionDelegate".

    As for the "RemoveRelatedGameMenuOptions" bug, it is fixed internally and will be released in upcoming versions :smile:
  6. beybi123

    BL Coding Problem when try to run a mod for 1.7.2 in 1.8.0

    It is trying to use LoadGameTexts(String) function to load game texts. But this is done via SubModule.xml starting with 1.8.0.

    插入代码块:
    <XmlNode>               
        <XmlName id="GameText" path="module_strings"/>
        <IncludedGameTypes>
                <GameType value = "Campaign"/>
                <GameType value = "CampaignStoryMode"/>
        </IncludedGameTypes>
    </XmlNode>
  7. beybi123

    Beta Patch Notes e1.8.0

    @Dejan
    Hi, do you happen to know which xml file contains the "preferred upgrade path" for lords? I've been looking for a few days and couldn't find it.
    Check out heroes.xml.

    插入代码块:
    preferred_upgrade_formation="HorseArcher"
  8. beybi123

    BL Coding Creating conversation on the world map

    I think what you need is CampaignMapConversation.OpenConversation.
  9. beybi123

    Check current language

    Try this:

    插入代码块:
    TaleWorlds.Localization.MBTextManager.ActiveLanguage
  10. beybi123

    e1.6.0-v1.2.0 Modding Adjustments & Access Modifiers Changes

    About using IMapEntity. I'd like to dynamically create some things on the map for the player to sometimes randomly access. I have gotten them to appear on map but interaction of any kind seems to be missing.

    var entity = new TestMapEntity(); var partyVis = new TestIPartyVisual(); partyVis.partyVisualPrefabToGenerateFrom = "tutorial_training_field"; partyVis.OnStartup(null); // this basically just gets a game entity with GameEntity.Instantiate() for "tutorial_training_field" and adds the entity to MapScreen.VisualsOfEntities entity.PartyVisual = partyVis; entity.PartyVisual.StrategicEntity.SetLocalPosition(Hero.MainHero.GetPosition()); entity.InteractionPosition = partyVis.StrategicEntity.GlobalPosition.AsVec2;

    Successfully places the partyvisual part right under the player on the map, but I'm pretty sure something is missing with the MapEntity because its methods (which I have implemented) like OnHover and on click are never called and the field I created on the map has no interaction or presence on the map. My PartyVisual probably works because I added it to VisualsOfEntities, and probably I need to add the mapentity to something as well. Checking other objects in the game, for their IMapEntity they seem to directly rely on MobileParty or Settlement, using CampaignObjectManager to add their entities to MobileParties or Settlements, which are read only lists I can't access, so I'm really not sure where to go with IMapEntity from here.

    Do you have IPartyVisual.GetMapEntity() function implemented?
  11. beybi123

    e1.6.0-v1.2.0 Modding Adjustments & Access Modifiers Changes

    Hi, I got a question. I was translating mods created by others by string XML file before 1.8.0 patch and it was all good. But after the patch, its not working anymore. anyone knows why and how to make it happen?
    • Language files are now referenced in language folders in the "language_data.xml" (they were previously automatically searched for and added).
    Can you check if that's the problem?
  12. beybi123

    BL Coding Custom culture crash

    Most likely can't find militia template.
  13. beybi123

    BL Coding Custom culture crash

    Happy to help :smile:
  14. beybi123

    BL Coding Custom culture crash

    You need to make sure that your culture has wanderer templates under "notable_and_wanderer_templates", if it's a main culture

    插入代码块:
    <Culture id="empire"
             name="{=empirefaction}Empire"
             is_main_culture="true">
        <notable_and_wanderer_templates>
        ......
        </notable_and_wanderer_templates>
    </Culture>
  15. beybi123

    BL Coding Custom culture crash

    Do you have a callstack?
  16. beybi123

    BL Other Creating a custom culture, crash help

    You're welcome. :wink:
  17. beybi123

    BL Other Creating a custom culture, crash help

    I'm glad you figured it out.
    Last crash you sent happens because "Headman" templates in spcultures.xml are wrong.

    NPCCharacter.spc_empire_hypheadman_1
    NPCCharacter.spc_empire_hypheadman_2
    NPCCharacter.spc_empire_hypheadman_3

    They should be:

    NPCCharacter.spc_hypempire_headman_1
    NPCCharacter.spc_hypempire_headman_2
    NPCCharacter.spc_hypempire_headman_3
  18. beybi123

    BL Other Creating a custom culture, crash help

    Happy to help.

    Hmm can't be sure about the last issue. Maybe related to companion you picked - if it's your caravan. If you can send me your files, I can take a look at it, though.
  19. beybi123

    BL Other Creating a custom culture, crash help

    Here, game tries to spawn a caravan master, but couldn't find a proper template. Check out caravan_master_aserai and create one for your own culture.
  20. beybi123

    BL Other Creating a custom culture, crash help

    I think it could be related to missing notable templates of your culture.

    <notable_and_wanderer_templates>
    .
    .
    .
    </notable_and_wanderer_templates>
后退
顶部 底部