Skip to content

Latest commit

 

History

History
79 lines (74 loc) · 15 KB

kmr.Types.new.md

File metadata and controls

79 lines (74 loc) · 15 KB

Dynamic Mission Script Types

There are several KMR types that could be used in the Mission Dynamic scripts and that are required for some Actions, States or Events.



Version Type Type name Elements
- array TAnsiStringArray
array of string values
array of AnsiString
- set TByteSet
Array of bytes
set of Byte
- array TIntegerArray
array of integer values
array of Integer
- record TKMAIAttackInfo
AI attack setup
UID: Integer
AttackType: TKMAIAttackType
HasOccured: Boolean
Delay: Cardinal
TotalMen: Integer
MeleeGroupCount: Integer
AntiHorseGroupCount: Integer
RangedGroupCount: Integer
MountedGroupCount: Integer
RandomGroups: Boolean
Target: TKMAIAttackTarget
CustomPosition: TKMPoint
- enum TKMAIAttackTarget
AI attack target
attClosestUnit // Closest enemy unit untested as to whether this is relative to army or start position)
attClosestBuildingFromArmy // Closest building from the group(s) lauching the attack
attClosestBuildingFromStartPos // Closest building from the AI's start position
attCustomPosition // Custom point defined with CustomPosition
- enum TKMAIAttackType
AI attack type
aatOnce // Attack will occur once (after the set time has passed and if they have enough troops
aatRepeating // Attack will happen multiple times, (after delay time) whenever the AI has enough troops
- enum TKMAIDefencePosType
AI defence position type
dtFrontLine // Front line troops may not go on attacks, they are for defence
dtBackLine // Back line troops may attack
- enum TKMAIRepairMode
House repair mode
rmNone
rmRepairNever // disable AI repair for all houses
rmRepairAlways // enable AI repair for all houses
rmRepairManual // repair state is set by script manually via Actions.HouseRepairEnable
- enum TKMArmyType
AI army type
atIronThenLeather
atLeather
atIron
atIronAndLeather
- enum TKMAudioFormat
Audio file format
afWav
afOgg
- record TKMDefencePositionInfo
AI defence position setup
UID: Integer
X, Y: Integer
Radius: Integer
GroupID: Integer
Dir: TKMDirection
GroupType: TKMGroupType
PositionType: TKMAIDefencePosType
- enum TKMDeliveryMode
Delivery mode
dmClosed
dmDelivery
dmTakeOut
- enum TKMDirection
Facing direction
dirNA
dirN
dirNE
dirE
dirSE
dirS
dirSW
dirW
dirNW
- enum TKMFieldType
Field type
ftNone
ftRoad
ftCorn
ftWine
ftInitWine // Reset rotation and set grapes ground, but without Grapes yet
- enum TKMFont
Font type
fntAntiqua
fntGame
fntGrey
fntMetal
fntMini
fntOutline
fntArial // Arial for MP chat
fntMonospaced // Debug overlay font (Consolas 8. Set WordSpacing to any Char.Width)
- enum TKMGroupOrder
Group order
goNone // Last order was executed and now we have nothing to do
goWalkTo // Ordered to walk somewhere or just change formation
goAttackHouse // Attack house
goAttackUnit // Attack specific unit
goStorm // Run forward
- enum TKMGroupType
Group type
gtNone
gtAny
gtMelee
gtAntiHorse
gtRanged
gtMounted
- set TKMGroupTypeSet
Group type set
set of TKMGroupType
- enum TKMHandHouseLock
House lock state
hlNone
hlDefault
hlBlocked // Never allowed
hlGranted // Always allowed
- enum TKMHouseType
House type
htNone
htAny
htArmorSmithy
htArmorWorkshop
htBakery
htBarracks
htButchers
htCoalMine
htFarm
htFishermans
htGoldMine
htInn
htIronMine
htIronSmithy
htMarket
htMetallurgists
htMill
htQuarry
htSawmill
htSchool
htSiegeWorkshop
htStables
htStore
htSwine
htTannery
htTownHall
htWatchTower
htWeaponSmithy
htWeaponWorkshop
htVineyard
htWoodcutters
- set TKMHouseTypeSet
House type set
set of TKMHouseType
- enum TKMMissionDifficulty
Mission difficulty
mdNone
mdEasy3
mdEasy2
mdEasy1
mdNormal
mdHard1
mdHard2
mdHard3
- set TKMMissionDifficultySet
Set of mission difficulties
set of TKMMissionDifficulty
- record TKMPoint
Point with integer coordinates X and Y
X,Y: Integer
- enum TKMTerrainKind
Terrain kind
tkCustom // 0
tkGrass // 1
tkMoss // 2
tkPaleGrass // 3
tkCoastSand // 4
tkGrassSand1 // 5
tkGrassSand2 // 6
tkGrassSand3 // 7
tkSand // 8
tkGrassDirt // 9
tkDirt // 10
tkCobbleStone // 11
tkGrassyWater // 12
tkSwamp // 13
tkIce // 14
tkSnowOnGrass // 15
tkSnowOnDirt // 16
tkSnow // 17
tkDeepSnow // 18
tkStone // 19
tkGoldMount // 20
tkIronMount // 21
tkAbyss // 22
tkGravel // 23
tkCoal // 24
tkGold // 25
tkIron // 26
tkWater // 27
tkFastWater // 28
tkLava // 29
- enum TKMTerrainPassability
terrain passability
tpNone
tpWalk // General passability of tile for any walking units
tpWalkRoad // Type of passability for Serfs when transporting wares, only roads have it
tpBuildNoObj // Can we build a house on this tile after removing an object on the tile or house near it?
tpBuild // Can we build a house on this tile?
tpMakeRoads // Thats less strict than house building, roads Can be placed almost everywhere where units Can walk, except e.g. bridges
tpCutTree // Can tree be cut
tpFish // Water tiles where fish Can move around
tpCrab // Sand tiles where crabs Can move around
tpWolf // Soil tiles where wolfs Can move around
tpElevate // Nodes which are forbidden to be elevated by workers (house basements, water, etc..)
tpWorker // Like CanWalk but allows walking on building sites
tpOwn // For AI ownership
tpFactor // Allows vertex (top left) to be factored as a neighbour in flattening algorithm (it is to stop mines flattening strangely due to surrounding hills)
- record TKMTerrainTileBrief
Brief terrain tile info
X,Y: Word
Terrain: Word
Rotation: Byte
Height: Byte
Obj: Word
UpdateTerrain, UpdateRotation, UpdateHeight, UpdateObject: Boolean
- enum TKMTileMaskKind
Terrain mask kind
mkNone
mkSoft1
mkSoft2
mkSoft3
mkStraight
mkGradient
- enum TKMTileOverlay
Tile overlay type
toNone
toDig1
toDig2
toDig3
toDig4
toRoad
- enum TKMUnitType
Unit type
utNone
utAny
utSerf
utWoodcutter
utMiner
utAnimalBreeder
utFarmer
utCarpenter
utBaker
utButcher
utFisher
utBuilder
utStonemason
utSmith
utMetallurgist
utRecruit
utMilitia
utAxeFighter
utSwordFighter
utBowman
utCrossbowman
utLanceCarrier
utPikeman
utScout
utKnight
utBarbarian
utRebel
utRogue
utWarrior
utVagabond
utWolf
utFish
utWatersnake
utSeastar
utCrab
utWaterflower
utWaterleaf
utDuck
- set TKMUnitTypeSet
Unit type set
set of TKMUnitType
- enum TKMWareType
Ware type
wtNone
wtTrunk
wtStone
wtTimber
wtIronOre
wtGoldOre
wtCoal
wtIron
wtGold
wtWine
wtCorn
wtBread
wtFlour
wtLeather
wtSausage
wtPig
wtSkin
wtWoodenShield
wtIronShield
wtLeatherArmor
wtIronArmor
wtAxe
wtSword
wtLance
wtPike
wtBow
wtCrossbow
wtHorse
wtFish
wtAll
wtWarfare
wtFood
- set TKMWareTypeSet
Ware type set
set of TKMWareType
- enum TKMWoodcutterMode
Woodcutting mode
wmChopAndPlant
wmChop
wmPlant