Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs:translates settlements.md #62

Open
wants to merge 4 commits into
base: docs
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 34 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,35 @@
# Home
# 骑马与砍杀2 领主 Mod 制作文档

## Introduction to Modding
原文档: [Bannerlord Documentation](https://docs.bannerlordmodding.com/)
作者: [Bannerlord Modding](https://github.com/Bannerlord-Modding)
译者: [衣谷作坊-Oliver](mailto:munoliver007@gmail.com), [世俗骑士](mailto:843750340@qq.com),[上官云泽](mailto:1143232792@qq.com).

* [Getting Started](_intro/getting-started.md)
* [Folder Structure](_intro/folder-structure.md)
* [Advanced](_intro/advanced.md)
## Mod 制作简介

## Tutorials
* [开始](_intro/getting-started.md)
* [文件结构](_intro/folder-structure.md)
* [高级用法](_intro/advanced.md)

* [Basic C# Mod](_tutorials/basic-csharp-mod.md) (Requires a basic understanding of C#)
* [Modding Gauntlet UIs Without C#](_tutorials/modding-gauntlet-without-csharp.md) (Easy)
* [Packing your Mods for Vortex](_tutorials/packing_mods_for_vortex.md) (Easy)
* [Modifying/Adding Settlements](_tutorials/new_settlements.md) (Easy)
## 教程

## [C# API Documentation](_csharp-api/)
* [基本C\# Mod 入门](_tutorials/basic-csharp-mod.md) \(需要一定基础的 C\#\)
* [不需要C\#的UI系统 Mod 入门](_tutorials/modding-gauntlet-without-csharp.md) \(简单\)
* [将你的mod打包上传至Vortex](_tutorials/packing_mods_for_vortex.md) \(简单\)
* [修改/增加 定居点](_tutorials/new_settlements.md) \(简单\)

* [CampaignSystem](_csharp-api/campaignsystem/)
* [Core](_csharp-api/core/)
* [Engine](_csharp-api/engine/)
* [InputSystem](_csharp-api/inputsystem/)
* [Library](_csharp-api/library/)
* [Localization](_csharp-api/localization/)
## [C\# API Documentation](_csharp-api/)

* [战役系统](_csharp-api/campaignsystem/)
* [核心](_csharp-api/core/)
* [引擎](_csharp-api/engine/)
* [输入系统](_csharp-api/inputsystem/)
* [库](_csharp-api/library/)
* [本地化](_csharp-api/localization.md)
* [MountAndBlade](_csharp-api/mountandblade/)
* [Network](_csharp-api/network/)
* [PlatformService](_csharp-api/platformservice/)
* [SaveSystem](_csharp-api/savesystem/)
* [TwoDimension](_csharp-api/twodimension/)
* [网络](_csharp-api/network.md)
* [平台服务](_csharp-api/platformservice.md)
* [保存系统](_csharp-api/savesystem.md)
* [TwoDimension](_csharp-api/twodimension.md)

## [Gauntlet Documentation](_gauntlet/)

Expand All @@ -36,15 +40,15 @@
* [ScreenManager](_gauntlet/screenmanager.md)
* [ViewModel](_gauntlet/viewmodel.md)
* [Widget](_gauntlet/widget.md)
* [Movies](_gauntlet/movie.md) (.xml)
* [Brushes](_gauntlet/brush.md) (.xml)
* [Movies](_gauntlet/movie.md) \(.xml\)
* [Brushes](_gauntlet/brush.md) \(.xml\)

## [XML Documentation](_xmldocs)
## [XML Documentation](_xmldocs/)

* [Atmosphere](_xmldocs/atmosphere.md) (.xml)
* [Cultures](_xmldocs/cultures.md) (.xml)
* [Items](_xmldocs/items.md) (.xml)
* [NPCCharacters](_xmldocs/npccharacters.md) (.xml)
* [Scene](_xmldocs/scene.md) (.xml)
* [SubModule](_xmldocs/submodule.md) (.xml)
* [环境](_xmldocs/atmosphere.md) \(.xml\)
* [文化](_xmldocs/cultures.md) \(.xml\)
* [物品](_xmldocs/items-1.md) \(.xml\)
* [NPC角色](_xmldocs/npccharacters-1.md) \(.xml\)
* [场景](_xmldocs/scene.md) \(.xml\)
* [子模块](_xmldocs/submodule.md) \(.xml\)

120 changes: 120 additions & 0 deletions SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# Table of contents

* [骑马与砍杀2 领主 Mod 制作文档](README.md)
* [C\# API Documentation](_csharp-api/README.md)
* [Core](_csharp-api/core/README.md)
* [MBObjectManager](_csharp-api/core/mbobjectmanager.md)
* [GameModel](_csharp-api/core/gamemodel.md)
* [InformationManager](_csharp-api/core/informationmanager.md)
* [BasicCharacterObject](_csharp-api/core/basiccharacterobject.md)
* [Game](_csharp-api/core/game.md)
* [ItemObject](_csharp-api/core/itemobject.md)
* [Campaign System](_csharp-api/campaignsystem/README.md)
* [GameMenu](_csharp-api/campaignsystem/gamemenu.md)
* [Settlement](_csharp-api/campaignsystem/settlement.md)
* [CampaignGameStarter](_csharp-api/campaignsystem/campaigngamestarter.md)
* [actions](_csharp-api/campaignsystem/actions/README.md)
* [ChangeOwnerOfSettlementAction](_csharp-api/campaignsystem/actions/changeownerofsettlementaction.md)
* [Hero](_csharp-api/campaignsystem/hero.md)
* [CampaignBehaviorBase](_csharp-api/campaignsystem/campaignbehaviorbase.md)
* [Mount And Blade](_csharp-api/mountandblade/README.md)
* [MissionBehaviour](_csharp-api/mountandblade/missionbehaviour/README.md)
* [MissionView](_csharp-api/mountandblade/missionbehaviour/missionview.md)
* [MissionLogic](_csharp-api/mountandblade/missionbehaviour/missionlogic.md)
* [MBInitialScreenBase](_csharp-api/mountandblade/mbinitialscreenbase.md)
* [Mission](_csharp-api/mountandblade/mission.md)
* [MBSubModuleBase](_csharp-api/mountandblade/mbsubmodulebase.md)
* [Agent](_csharp-api/mountandblade/agent.md)
* [Team](_csharp-api/mountandblade/team.md)
* [Input System](_csharp-api/inputsystem/README.md)
* [Input](_csharp-api/inputsystem/input.md)
* [Engine](_csharp-api/engine/README.md)
* [GlobalLayer](_csharp-api/engine/globallayer.md)
* [ScriptComponentBehaviour](_csharp-api/engine/scriptcomponentbehaviour.md)
* [Scene](_csharp-api/engine/scene.md)
* [GameEntity](_csharp-api/engine/gameentity.md)
* [Library](_csharp-api/library/README.md)
* [ModuleInfo](_csharp-api/library/moduleinfo.md)
* [Platform Service](_csharp-api/platformservice.md)
* [Save System](_csharp-api/savesystem.md)
* [Network](_csharp-api/network.md)
* [Localization](_csharp-api/localization.md)
* [Two Dimension](_csharp-api/twodimension.md)
* [XML Documentation](_xmldocs/README.md)
* [NPCCharacters](_xmldocs/npccharacters/README.md)
* [NPCCharacter(NPC角色)](_xmldocs/npccharacters/npccharacter/README.md)
* [upgrade\_targets](_xmldocs/npccharacters/npccharacter/upgrade_targets/README.md)
* [upgrade\_target](_xmldocs/npccharacters/npccharacter/upgrade_targets/upgrade_target.md)
* [equipmentSet](_xmldocs/npccharacters/npccharacter/equipmentset/README.md)
* [equipment](_xmldocs/npccharacters/npccharacter/equipmentset/equipment.md)
* [Face](_xmldocs/npccharacters/npccharacter/face/README.md)
* [BodyProperties](_xmldocs/npccharacters/npccharacter/face/bodyproperties.md)
* [hair\_tags](_xmldocs/npccharacters/npccharacter/face/hair_tags/README.md)
* [hair\_tag](_xmldocs/npccharacters/npccharacter/face/hair_tags/hair_tag.md)
* [BodyPropertiesMax](_xmldocs/npccharacters/npccharacter/face/bodypropertiesmax.md)
* [beard\_tags](_xmldocs/npccharacters/npccharacter/face/beard_tags/README.md)
* [beard\_tag](_xmldocs/npccharacters/npccharacter/face/beard_tags/beard_tag.md)
* [face\_key\_template](_xmldocs/npccharacters/npccharacter/face/face_key_template.md)
* [equipment](_xmldocs/npccharacters/npccharacter/equipment.md)
* [skills](_xmldocs/npccharacters/npccharacter/skills/README.md)
* [skill](_xmldocs/npccharacters/npccharacter/skills/skill.md)
* [Traits](_xmldocs/npccharacters/npccharacter/traits/README.md)
* [Trait](_xmldocs/npccharacters/npccharacter/traits/trait.md)
* [物品\(大类\) Items](_xmldocs/items/README.md)
* [物品 Item](_xmldocs/items/item/README.md)
* [物品组件 ItemComponent](_xmldocs/items/item/itemcomponent/README.md)
* [马匹 Horse](_xmldocs/items/item/itemcomponent/horse/README.md)
* [Materials](_xmldocs/items/item/itemcomponent/horse/materials/README.md)
* [Material](_xmldocs/items/item/itemcomponent/horse/materials/material/README.md)
* [MeshMultipliers](_xmldocs/items/item/itemcomponent/horse/materials/material/meshmultipliers/README.md)
* [MeshMultiplier](_xmldocs/items/item/itemcomponent/horse/materials/material/meshmultipliers/meshmultiplier.md)
* [防具 Armor](_xmldocs/items/item/itemcomponent/armor.md)
* [Weapon](_xmldocs/items/item/itemcomponent/weapon/README.md)
* [WeaponFlags](_xmldocs/items/item/itemcomponent/weapon/weaponflags.md)
* [食物 Food](_xmldocs/items/item/itemcomponent/food.md)
* [旗帜 Flags](_xmldocs/items/item/flags.md)
* [CraftedItem](_xmldocs/items/crafteditem/README.md)
* [Pieces](_xmldocs/items/crafteditem/pieces/README.md)
* [Piece](_xmldocs/items/crafteditem/pieces/piece.md)
* [Items \(XML\)](_xmldocs/items-1.md)
* [Scenes](_xmldocs/scenes/README.md)
* [Scene](_xmldocs/scenes/scene/README.md)
* [GameType](_xmldocs/scenes/scene/gametype.md)
* [TerrainType](_xmldocs/scenes/scene/terraintypes/README.md)
* [TerrainType](_xmldocs/scenes/scene/terraintypes/terraintype.md)
* [SPCultures \(XML\)](_xmldocs/cultures.md)
* [SPCultures](_xmldocs/spcultures/README.md)
* [Culture](_xmldocs/spcultures/culture/README.md)
* [female\_names](_xmldocs/spcultures/culture/female_names/README.md)
* [name](_xmldocs/spcultures/culture/female_names/name.md)
* [male\_names](_xmldocs/spcultures/culture/male_names/README.md)
* [name](_xmldocs/spcultures/culture/male_names/name.md)
* [clan\_names](_xmldocs/spcultures/culture/clan_names/README.md)
* [name](_xmldocs/spcultures/culture/clan_names/name.md)
* [Atmosphere \(XML\)](_xmldocs/atmosphere.md)
* [SubModule \(XML\)](_xmldocs/submodule.md)
* [Scenes \(XML\)](_xmldocs/scene.md)
* [NPCCharacters \(XML\)](_xmldocs/npccharacters-1.md)
* [Gauntlet](_gauntlet/README.md)
* [Brush](_gauntlet/brush.md)
* [GauntletLayer](_gauntlet/gauntletlayer.md)
* [GauntletMovie](_gauntlet/gauntletmovie.md)
* [SceneLayer](_gauntlet/scenelayer.md)
* [Movie \(XML\)](_gauntlet/movie.md)
* [Widget](_gauntlet/widget.md)
* [GauntletView](_gauntlet/gauntletview.md)
* [ScreenBase](_gauntlet/screenbase.md)
* [ViewModel](_gauntlet/viewmodel.md)
* [ScreenManager](_gauntlet/screenmanager.md)
* [Introduction](_intro/README.md)
* [高级用法](_intro/advanced.md)
* [开始第一步](_intro/getting-started.md)
* [文件夹结构](_intro/folder-structure.md)
* [Defining custom data](_intro/general-recommendations.md)
* [Tutorials](_tutorials/README.md)
* [将你的mod打包上传至Vortex](_tutorials/packing_mods_for_vortex.md)
* [Making Banners](_tutorials/bannertutorial.md)
* [不需要C\#的UI系统Mod入门 \#](_tutorials/modding-gauntlet-without-csharp.md)
* [基本 C\# Mod](_tutorials/basic-csharp-mod.md)
* [new\_settlements](_tutorials/new_settlements.md)

5 changes: 3 additions & 2 deletions _csharp-api/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# C# API Documentation
# C\# API Documentation

## Note: All Gauntlet related documentation is available [here.](../_gauntlet/)

### Note: All Gauntlet related documentation is available [here.](../_gauntlet)
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ The function of this class is to set or change the owner of a settlement.
## Functions

Here is a list of functions that detail different ways a settlement can change ownership:
- `ApplyByDefault(`[Hero](../hero.md)`hero, `[Settlement](../settlement.md)`settlement)` - Called at the start of a campaign or when a player cheats to attain a settlement
- `ApplyByKingDecision(`[Hero](../hero.md)`hero, `[Settlement](../settlement.md)`settlement)`
- `ApplyBySiege(`[Hero](../hero.md)`newOwner, `[Hero](../hero.md)`capturerHero, `[Settlement](../settlement.md)`settlement)`
- `ApplyByRevolt(`[Hero](../hero.md)`hero, `[Settlement](../settlement.md)`settlement)`
- `ApplyByLeaveFaction(`[Hero](../hero.md)`hero, `[Settlement](../settlement.md)`settlement)`
- `ApplyByBarter(`[Hero](../hero.md)`hero, `[Settlement](../settlement.md)`settlement)`
- `ApplyByRemoveFaction(`[Settlement](../settlement.md)`settlement)`
- `ApplyByDestroyClan(`[Settlement](../settlement.md)`settlement, `[Hero](../hero.md)`newOwner)` - Called when owner of settlement dies, when this happens, the fief is passed to a random child of the previous owner

* `ApplyByDefault(`[Hero](../hero.md)`hero,`[Settlement](../settlement.md)`settlement)` - Called at the start of a campaign or when a player cheats to attain a settlement
* `ApplyByKingDecision(`[Hero](../hero.md)`hero,`[Settlement](../settlement.md)`settlement)`
* `ApplyBySiege(`[Hero](../hero.md)`newOwner,`[Hero](../hero.md)`capturerHero,`[Settlement](../settlement.md)`settlement)`
* `ApplyByRevolt(`[Hero](../hero.md)`hero,`[Settlement](../settlement.md)`settlement)`
* `ApplyByLeaveFaction(`[Hero](../hero.md)`hero,`[Settlement](../settlement.md)`settlement)`
* `ApplyByBarter(`[Hero](../hero.md)`hero,`[Settlement](../settlement.md)`settlement)`
* `ApplyByRemoveFaction(`[Settlement](../settlement.md)`settlement)`
* `ApplyByDestroyClan(`[Settlement](../settlement.md)`settlement,`[Hero](../hero.md)`newOwner)` - Called when owner of settlement dies, when this happens, the fief is passed to a random child of the previous owner

2 changes: 2 additions & 0 deletions _csharp-api/campaignsystem/actions/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# actions

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# ChangeOwnerOfSettlementAction

The function of this class is to set or change the owner of a settlement.

## Functions

Here is a list of functions that detail different ways a settlement can change ownership:

* `ApplyByDefault(`[Hero](../hero.md)`hero,`[Settlement](../settlement.md)`settlement)` - Called at the start of a campaign or when a player cheats to attain a settlement
* `ApplyByKingDecision(`[Hero](../hero.md)`hero,`[Settlement](../settlement.md)`settlement)`
* `ApplyBySiege(`[Hero](../hero.md)`newOwner,`[Hero](../hero.md)`capturerHero,`[Settlement](../settlement.md)`settlement)`
* `ApplyByRevolt(`[Hero](../hero.md)`hero,`[Settlement](../settlement.md)`settlement)`
* `ApplyByLeaveFaction(`[Hero](../hero.md)`hero,`[Settlement](../settlement.md)`settlement)`
* `ApplyByBarter(`[Hero](../hero.md)`hero,`[Settlement](../settlement.md)`settlement)`
* `ApplyByRemoveFaction(`[Settlement](../settlement.md)`settlement)`
* `ApplyByDestroyClan(`[Settlement](../settlement.md)`settlement,`[Hero](../hero.md)`newOwner)` - Called when owner of settlement dies, when this happens, the fief is passed to a random child of the previous owner

18 changes: 14 additions & 4 deletions _csharp-api/campaignsystem/campaignbehaviorbase.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# CampaignBehaviorBase
This is an abstract class within [TaleWorlds.CampaignSystem](./README.md), and can be inherited to code for unique behaviours within the game's campaign.

This is an abstract class within [TaleWorlds.CampaignSystem](./), and can be inherited to code for unique behaviours within the game's campaign.

## Abstract Methods:
#### ```public abstract void RegisterEvents()```

### `public abstract void RegisterEvents()`

When defining this method, you can introduce consequences to certain events, by use of the `CampaignEvents.On...` methods. A simple example would be:

```csharp
public override void RegisterEvents()
{
Expand All @@ -14,20 +18,25 @@ public override void RegisterEvents()
}));
}
```

The above example registers an event, such that when a clan is destroyed, a message is broadcasted to the chat. The `AddNonSerializedListener` method called here requires the second argument to be an action, which is described [here](https://docs.microsoft.com/en-us/dotnet/api/system.action-1?view=netframework-4.8).

#### ```public abstract void SyncData(IDataStore dataStore)```
(Work in Progress)
### `public abstract void SyncData(IDataStore dataStore)`

\(Work in Progress\)

**NOTE**: We are currently not sure what this method does, but at the moment we recommended you implement it as an empty method, like so:

```csharp
public override void SyncData(IDataStore dataStore)
{
}
```

## Registering Campaign Behaviors:

Within your [MBSubModuleBase](../mountandblade/mbsubmodulebase.md) class, you can utilise the `OnGameStart` Method to add the behavoir to a campaign. An example is given below:

```csharp
protected override void OnGameStart(Game game, IGameStarter gameStarter)
{
Expand All @@ -40,3 +49,4 @@ protected override void OnGameStart(Game game, IGameStarter gameStarter)
}
}
```

Loading