- 好友
- 1
- 在线时间
- 711 小时
- 最后登录
- 2024-8-20
扈从
- UID
- 272374
- 第纳尔
- 1502
- 精华
- 0
- 互助
- 1
- 荣誉
- 0
- 贡献
- 0
- 魅力
- 12
- 注册时间
- 2010-6-29
鲜花( 7) 鸡蛋( 0)
|
发表于 2020-4-14 16:41:08
|
显示全部楼层
本帖最后由 temple910518 于 2020-4-14 16:42 编辑
感谢楼主,补充一下,关于npc的外貌、年龄、文化、特性等参数在Mount & Blade II Bannerlord\Modules\SandBox\ModuleData\spspecialcharacters.xml这个文件
举例帝国文化的学者:
- <NPCCharacter id="spc_wanderer_empire_0" name="{=bvjFhiDr}the Scholar" voice="curt" age="29" default_group="Infantry" is_template="true" is_hero="false" culture="Culture.empire" battleTemplate="NPCCharacter.npc_companion_equipment_template_empire" civilianTemplate="NPCCharacter.npc_companion_equipment_template_empire" occupation="Wanderer">
- <face>
- <face_key_template value="NPCCharacter.villager_empire" />
- </face>
- <!--<Hero id="spc_wanderer_empire_0" faction="Kingdom.empire" is_template="true" /> -->
- <Traits>
- <Trait id="WandererEquipment" value="1" />
- <Trait id="RomanHair" value="1" />
- <Trait id="PeltastFightingSkills" value="2" />
- <Trait id="EngineerSkills" value="3" />
- <Trait id="Mercy" value="1" />
- <Trait id="Generosity" value="-1" />
- </Traits>
复制代码
雇佣费用在这个函数里定义了
- namespace TaleWorlds.CampaignSystem.SandBox.GameComponents
- {
- // Token: 0x020001DF RID: 479
- public class DefaultCompanionHiringPriceCalculationModel : CompanionHiringPriceCalculationModel
- {
- // Token: 0x06001E21 RID: 7713 RVA: 0x00074DEC File Offset: 0x00072FEC
- public override int GetCompanionHiringPrice(Hero companion)
- {
- ExplainedNumber explainedNumber = new ExplainedNumber(0f, null);
- Settlement currentSettlement = companion.CurrentSettlement;
- Town town = (currentSettlement != null) ? currentSettlement.Town : null;
- if (town == null)
- {
- town = SettlementHelper.FindNearestSettlement((Settlement x) => x.IsTown).Town;
- }
- float num = 0f;
- for (EquipmentIndex equipmentIndex = EquipmentIndex.WeaponItemBeginSlot; equipmentIndex < EquipmentIndex.NumEquipmentSetSlots; equipmentIndex++)
- {
- ItemObject item = companion.CharacterObject.Equipment[equipmentIndex].Item;
- if (item != null)
- {
- num += (float)town.GetItemPrice(item, null, false);
- }
- }
- for (EquipmentIndex equipmentIndex2 = EquipmentIndex.WeaponItemBeginSlot; equipmentIndex2 < EquipmentIndex.NumEquipmentSetSlots; equipmentIndex2++)
- {
- ItemObject item2 = companion.CharacterObject.FirstCivilianEquipment[equipmentIndex2].Item;
- if (item2 != null)
- {
- num += (float)town.GetItemPrice(item2, null, false);
- }
- }
- explainedNumber.Add(num / 2f, null);
- explainedNumber.Add((float)(companion.CharacterObject.Level * 10), null);
- return (int)explainedNumber.ResultNumber;
- }
- }
- }
复制代码
雇佣需要的金钱和NPC身上的装备以及等级有关 |
|