单位修改

本页面所适用的版本可能已经过时,最后更新于1.1
自由之民讨论 | 贡献2022年5月31日 (二) 20:26的版本 (2021年8月30日 (一) 13:51‎ Dauth)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)


修改单位

Modding units can be done by modding individual units type files in "ImperatorRome\game\common\units".

单位类型

When modding there are few values to be considered. archers = { } defines the unit type, army = yes defines whether it's army or navy. assault = yes defines whether it can assault a fort. enable = yes defines whether it's enabled for everyone, for units not everyone can use from start, this is defined elsewhere. is_second_rank or is_flank tends to define where this unit is used by default, but does not prevent it from being used by a player in a different position. Every unit has a manuever which determines how many units it can attack across from. A maneuver of 0 means that it can only attack the unit in front of it. Movement speed can be understood relative to other unit's movement speed, for example the fastest land units can move 4, while the slowest naval unit can move 7, so naval units are always faster than land units. build_cost is how much gold and build_time is how many days until recruited. The unit modifiers show how much damage this unit does against other units, 1.0 is normal damage, 0.75 is 25% less damage, 1.25 is 25% more damage, etc. You could also add morale_damage_done or morale_damage_taken to modify those. attrition_weight is how much that unit adds to your army's supply weight.

archers = {
	army = yes
	assault = yes
	
	enable = yes

	maneuver = 1
	movement_speed = 2
	build_cost = 4
	build_time = 45
	

	light_infantry = 1.25
	heavy_infantry = 1.10
	heavy_cavalry = 0.90
	warelephant = 1.0
	horse_archers = 1.0
	archers = 1.0
	camels = 0.9
	light_cavalry = 0.9
	
	attrition_weight = 0.9
	
	morale_damage_taken = 1.25

	ai_max_percentage = 15
}