BL Coding Changing the DefaultAgeModel and related issues

正在查看此主题的用户

Ragemaster9999

Sergeant
I am struggling to get this working properly. I changed the defaultAgeModel so that characters reach adulthood sooner. While it works, and children that turn 4 are considered adults by the game as far as their conversation trees are concerned, they still have the graphical apperance of a child as well as a child portrait in castle and town UI party screens. I want them to have the adult appearance by age 4 instead of the current 18 to match their behavior. I am not sure where this is in the DLL I have looked up and down. Any Advice?

C#:
using TaleWorlds.CampaignSystem;
using TaleWorlds.Core;
using TaleWorlds.CampaignSystem.SandBox.GameComponents;
using TaleWorlds.CampaignSystem.SandBox.GameComponents.Map;
using TaleWorlds.MountAndBlade;
using StoryMode.GameModels;
using BannerLib;
using BannerLib.Gameplay.Models;
using System.Collections.Generic;

namespace CustomAgeModel
{


    public class MyAgeModel : DefaultAgeModel
    {
        public override int BecomeInfantAge { get { return 1; } }
        public override int BecomeChildAge { get { return 2; } }
        public override int BecomeTeenagerAge { get { return 3; } }
        public override int HeroComesOfAge { get { return 4; } }
        public override int BecomeOldAge { get { return 50; } }
        public override int MaxAge { get { return 200; } }

    }

}


[CODE=csharp]using TaleWorlds.CampaignSystem;
using TaleWorlds.Core;
using TaleWorlds.CampaignSystem.SandBox.GameComponents;
using TaleWorlds.CampaignSystem.SandBox.GameComponents.Map;
using TaleWorlds.MountAndBlade;
using StoryMode.GameModels;
using BannerLib;
using BannerLib.Gameplay.Models;
using System.Collections.Generic;
using System;
using System.Windows;

namespace CustomAgeModel
{

    public class SubModule : MBSubModuleBase
    {

        //public static readonly string ModuleFolderName = "CustomAgeModel";

        protected override void OnSubModuleLoad()
        {

        }

        protected override void OnGameStart(Game game, IGameStarter gameStarterObject)
        {
            // Only run this if we're in the campaign.
            if (!(game.GameType is Campaign)) return;
            gameStarterObject.Replace<DefaultAgeModel, MyAgeModel>();
            MessageBox.Show("model is replaced");

        }


    }
       
}

[/CODE]
 
后退
顶部 底部