-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmodule_troops.py
More file actions
164 lines (151 loc) · 12.6 KB
/
module_troops.py
File metadata and controls
164 lines (151 loc) · 12.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
from header_common import *
from header_items import *
from header_troops import *
from header_skills import *
####################################################################################################################
# Each troop contains the following fields:
# 1) Troop id (string): used for referencing troops in other files. The prefix trp_ is automatically added before each troop-id
# 2) Toop name (string)
# 3) Plural troop name (string)
# 4) Troop flags (int). See header_troops.py for a list of available flags
# 5) Scene and entry
# 5.1) Scene (only applicable to heroes)
# 5.2) Entry point using the entry() function: for example, entry(15)
# 6) Reserved (int). Put constant "reserved" or 0
# 7) Faction (int)
# 8) Inventory (list): Must be a list of items
# 9) Attributes (int): Example usage:
# str_6|agi_6|int_4|cha_5|level(5)
# 10) Weapon proficiencies (int): Example usage:
# wp_one_handed(55)|wp_two_handed(90)|wp_polearm(36)|wp_archery(80)|wp_crossbow(24)|wp_throwing(45)
# 11) Skills (int): See header_skills.py to see a list of skills. Example:
# knows_ironflesh_3|knows_power_strike_2|knows_athletics_2|knows_riding_2
# 12) Face code (int): You can obtain the face code by pressing ctrl+E in face generator screen
# 13) Face code (int)(2) (only applicable to regular troops, can be omitted for heroes):
# The game will create random faces between Face code 1 and face code 2 for generated troops
# 14) Troop image (string): If this variable is set, the troop will use an image rather than its 3D visual during the conversations
####################################################################################################################
def wp(x):
return wp_one_handed(x)|wp_two_handed(x)|wp_polearm(x)|wp_archery(x)|wp_crossbow(x)|wp_throwing(x)
def wpe(m,a,c,t):
return wp_one_handed(m)|wp_two_handed(m)|wp_polearm(m)|wp_archery(a)|wp_crossbow(c)|wp_throwing(t)
def wpex(o,w,p,a,c,t):
return wp_one_handed(o)|wp_two_handed(w)|wp_polearm(p)|wp_archery(a)|wp_crossbow(c)|wp_throwing(t)
def wp_melee(x):
return wp_one_handed(x + 20)|wp_two_handed(x)|wp_polearm(x + 10)
reserved = 0
no_scene = 0
default_face_1 = 0x0000000400000001124000000020000000000000001c00800000000000000000
default_face_2 = 0x0000000cbf00230c4deeffffffffffff00000000001efff90000000000000000
tf_guarantee_all = tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_gloves|tf_guarantee_helmet|tf_guarantee_horse|tf_guarantee_shield|tf_guarantee_ranged
tf_guarantee_all_wo_ranged = tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_gloves|tf_guarantee_helmet|tf_guarantee_horse|tf_guarantee_shield
# troops have 30 charisma and 10 weapon master to stop the game engine from adding random skill levels
pw_attr = cha_30|level(1)
knows_pw = knows_weapon_master_10
troops = [
["player","Player","Player",tf_hero|tf_unmoveable_in_party_window,no_scene,reserved,0, [],
str_15|agi_15|int_4|cha_4,wp(15),0,0x000000018000000136db6db6db6db6db00000000001db6db0000000000000000],
["multiplayer_profile_troop_male","multiplayer_profile_troop_male","multiplayer_profile_troop_male", tf_hero|tf_guarantee_all,0,0,0, [],
str_14, 0, 0, 0x000000018000000136db6db6db6db6db00000000001db6db0000000000000000],
["multiplayer_profile_troop_female","multiplayer_profile_troop_female","multiplayer_profile_troop_female", tf_hero|tf_female|tf_guarantee_all,0,0,0, [],
str_14, 0, 0, 0x000000018000000136db6db6db6db6db00000000001db6db0000000000000000],
["temp_troop","Temp Troop","Temp Troop",tf_hero,no_scene,reserved,0,[],0,0,0,0],
####################################################################################################################
# Troops before this point are hardwired into the game and their order should not be changed!
####################################################################################################################
["peasant","Peasant","a peasant",tf_guarantee_all,0,0,"fac_commoners",
[],
str_8|agi_8|pw_attr,wpex(50,30,30,0,0,30),knows_pw|knows_musician_3|knows_power_strike_1|knows_labouring_2|knows_tailoring_1|knows_riding_1,default_face_1,default_face_2],
["serf","Serf","a serf",tf_guarantee_all,0,0,"fac_commoners",
[],
str_5|agi_5|pw_attr,wpex(30,30,30,0,0,50),knows_pw|knows_musician_3|knows_power_strike_1|knows_athletics_1|knows_labouring_5|knows_engineer_1|knows_tailoring_1|knows_herding_3|knows_riding_1,default_face_1,default_face_2],
["militia","Militia","a militia",tf_guarantee_all,0,0,"fac_commoners",
[],
str_10|agi_9|pw_attr,wpex(70,40,70,10,40,50),knows_pw|knows_ironflesh_2|knows_power_strike_2|knows_athletics_2|knows_riding_1|knows_labouring_1|knows_herding_2,default_face_1,default_face_2],
["huntsman","Huntsman","a huntsman",tf_guarantee_all,0,0,"fac_commoners",
[],
str_9|agi_9|pw_attr,wpex(60,35,50,100,100,50),knows_pw|knows_ironflesh_1|knows_power_strike_1|knows_power_draw_2|knows_athletics_1|knows_riding_1|knows_labouring_1|knows_herding_3,default_face_1,default_face_2],
["craftsman","Craftsman","a craftsman",tf_guarantee_all,0,0,"fac_commoners",
[],
str_8|agi_8|pw_attr,wpex(50,30,30,20,20,20),knows_pw|knows_musician_3|knows_power_strike_1|knows_athletics_1|knows_riding_1|knows_engineer_2|knows_labouring_1|knows_tailoring_3,default_face_1,default_face_2],
["healer","Healer","a healer",tf_guarantee_all,0,0,"fac_commoners",
[],
str_10|agi_10|pw_attr,wpex(55,30,35,10,20,30),knows_pw|knows_musician_3|knows_riding_2|knows_ironflesh_1|knows_power_strike_1|knows_athletics_1|knows_wound_treatment_7|knows_tailoring_2|knows_herding_1,default_face_1,default_face_2],
["footman","Footman","a footman",tf_guarantee_all,0,0,"fac_commoners",
[],
str_15|agi_14|pw_attr,wpex(100,100,130,10,45,80),knows_pw|knows_ironflesh_5|knows_power_strike_4|knows_power_throw_2|knows_shield_1|knows_athletics_5|knows_riding_2|knows_sailing_3,default_face_1,default_face_2],
["archer","Archer","an archer",tf_guarantee_all,0,0,"fac_commoners",
[],
str_14|agi_14|pw_attr,wpex(90,60,70,150,50,50),knows_pw|knows_ironflesh_3|knows_power_strike_3|knows_power_draw_4|knows_athletics_4|knows_riding_2|knows_sailing_3,default_face_1,default_face_2],
["crossbowman","Crossbowman","a crossbowman",tf_guarantee_all,0,0,"fac_commoners",
[],
str_14|agi_14|pw_attr,wpex(90,60,60,50,150,50),knows_pw|knows_ironflesh_3|knows_power_strike_3|knows_athletics_4|knows_riding_2|knows_sailing_3,default_face_1,default_face_2],
["lancer","Lancer","a lancer",tf_mounted|tf_guarantee_all,0,0,"fac_commoners",
[],
str_14|agi_14|pw_attr,wpex(90,60,120,10,30,80),knows_pw|knows_ironflesh_3|knows_power_strike_3|knows_power_throw_2|knows_athletics_1|knows_riding_6,default_face_1,default_face_2],
["man_at_arms","Man at Arms","a man at arms",tf_mounted|tf_guarantee_all,0,0,"fac_commoners",
[],
str_15|agi_15|pw_attr,wpex(105,100,120,20,50,30),knows_pw|knows_ironflesh_4|knows_power_strike_4|knows_shield_1|knows_athletics_2|knows_riding_4,default_face_1,default_face_2],
["knight","Knight","a knight",tf_mounted|tf_guarantee_all,0,0,"fac_commoners",
[],
str_15|agi_15|pw_attr,wpex(105,120,100,20,50,30),knows_pw|knows_ironflesh_4|knows_power_strike_4|knows_shield_1|knows_athletics_3|knows_riding_3,default_face_1,default_face_2],
["sergeant","Sergeant","a sergeant",tf_guarantee_all,0,0,"fac_commoners",
[],
str_15|agi_15|pw_attr,wpex(120,125,110,20,60,40),knows_pw|knows_ironflesh_5|knows_power_strike_4|knows_shield_2|knows_athletics_5|knows_riding_2,default_face_1,default_face_2],
["engineer","Engineer","an engineer",tf_guarantee_all,0,0,"fac_commoners",
[],
str_10|agi_12|pw_attr,wpex(90,50,60,30,65,50),knows_pw|knows_musician_3|knows_ironflesh_2|knows_power_strike_2|knows_athletics_2|knows_labouring_1|knows_engineer_5|knows_riding_2|knows_looting_1|knows_sailing_4,default_face_1,default_face_2],
["master_smith","Master Smith","a master smith",tf_guarantee_all,0,0,"fac_commoners",
[],
str_12|agi_12|pw_attr,wpex(100,55,70,30,70,50),knows_pw|knows_musician_3|knows_ironflesh_3|knows_power_strike_3|knows_athletics_2|knows_labouring_1|knows_engineer_7|knows_riding_2|knows_looting_2|knows_sailing_4,default_face_1,default_face_2],
["doctor","Doctor","a doctor",tf_guarantee_all,0,0,"fac_commoners",
[],
str_10|agi_10|pw_attr,wpex(70,40,50,10,20,30),knows_pw|knows_musician_3|knows_ironflesh_1|knows_athletics_2|knows_power_strike_2|knows_wound_treatment_5|knows_riding_2,default_face_1,default_face_2],
["sailor","Sailor","a sailor",tf_guarantee_all,0,0,"fac_commoners",
[],
str_14|agi_12|pw_attr,wpex(95,70,80,30,40,70),knows_pw|knows_musician_3|knows_ironflesh_3|knows_power_strike_3|knows_athletics_2|knows_sailing_9|knows_riding_1,default_face_1,default_face_2],
["traveler","Traveler","a traveler",tf_guarantee_all,0,0,"fac_commoners",
[],
str_10|agi_13|pw_attr,wpex(60,40,50,10,20,60),knows_pw|knows_musician_3|knows_ironflesh_1|knows_power_strike_2|knows_athletics_5|knows_sailing_7|knows_riding_2|knows_labouring_1|knows_herding_1|knows_tailoring_2,default_face_1,default_face_2],
["herdsman","Herdsman","a herdsman",tf_guarantee_all,0,0,"fac_commoners",
[],
str_10|agi_14|pw_attr,wpex(50,35,40,0,10,40),knows_pw|knows_musician_3|knows_power_strike_1|knows_athletics_5|knows_labouring_2|knows_herding_5,default_face_1,default_face_2],
["lord","Lord","the lord",tf_mounted|tf_guarantee_all,0,0,"fac_commoners",
[],
str_15|agi_15|pw_attr,wpex(115,115,115,50,70,50),knows_pw|knows_musician_3|knows_leadership_1|knows_ironflesh_6|knows_power_strike_4|knows_shield_2|knows_athletics_3|knows_riding_5,default_face_1,default_face_2],
["ruffian","Ruffian","a ruffian",tf_guarantee_all,0,0,"fac_commoners",
[],
str_14|agi_12|pw_attr,wpex(90,85,90,10,20,80),knows_pw|knows_ironflesh_3|knows_power_strike_4|knows_athletics_3|knows_riding_1|knows_looting_2,default_face_1,default_face_2],
["brigand","Brigand","a brigand",tf_guarantee_all,0,0,"fac_commoners",
[],
str_12|agi_12|pw_attr,wpex(70,40,70,100,60,70),knows_pw|knows_ironflesh_2|knows_power_strike_2|knows_power_draw_3|knows_athletics_3|knows_riding_1|knows_looting_6|knows_sailing_4,default_face_1,default_face_2],
["mercenary","Mercenary","a mercenary",tf_guarantee_all,0,0,"fac_commoners",
[],
str_14|agi_14|pw_attr,wpex(90,70,80,30,75,70),knows_pw|knows_ironflesh_3|knows_power_strike_3|knows_athletics_3|knows_riding_2|knows_engineer_1|knows_sailing_3|knows_tailoring_1,default_face_1,default_face_2],
["godlike_hero","Godlike Hero","a godlike hero",tf_guarantee_all,0,0,"fac_commoners",
["itm_red_shirt","itm_linen_tunic","itm_woolen_hose","itm_invisible_sword"],
str_30|agi_30|pw_attr,wpex(300,300,300,300,300,300),knows_pw|knows_musician_10|knows_ironflesh_10|knows_power_strike_10|knows_power_draw_10|knows_power_throw_10|knows_shield_10|knows_athletics_10|knows_riding_10|knows_engineer_10|knows_wound_treatment_10|knows_looting_10|knows_labouring_10|knows_sailing_10|knows_tailoring_10|knows_herding_10,default_face_1,default_face_2],
["playable_troops_end","playable_troops_end","playable_troops_end",0,0,0,0,[],0,0,0,0,0],
["inactive_players_array","inactive_players_array","inactive_players_array",0,0,0,0,[],0,0,0,0,0],
["mission_data","mission_data","mission_data",0,0,0,0,[],0,0,0,0,0],
["banner_background_color_array","banner_background_color_array","banner_background_color_array",0,0,0,0,[],0,0,0,0,0],
["temp_array","temp_array","temp_array",0,0,0,0,[],0,0,0,0,0],
["last_chat_message","-","-",0,0,0,0,[],0,0,0,0,0],
["chat_overlay_ring_buffer_0","-","-",0,0,0,0,[],0,0,0,0,0],
["chat_overlay_ring_buffer_1","-","-",0,0,0,0,[],0,0,0,0,0],
["chat_overlay_ring_buffer_2","-","-",0,0,0,0,[],0,0,0,0,0],
["chat_overlay_ring_buffer_3","-","-",0,0,0,0,[],0,0,0,0,0],
["chat_overlay_ring_buffer_4","-","-",0,0,0,0,[],0,0,0,0,0],
["chat_overlay_ring_buffer_5","-","-",0,0,0,0,[],0,0,0,0,0],
["chat_overlay_ring_buffer_6","-","-",0,0,0,0,[],0,0,0,0,0],
["chat_overlay_ring_buffer_7","-","-",0,0,0,0,[],0,0,0,0,0],
["chat_overlay_ring_buffer_8","-","-",0,0,0,0,[],0,0,0,0,0],
["chat_overlay_ring_buffer_9","-","-",0,0,0,0,[],0,0,0,0,0],
["chat_overlay_ring_buffer_10","-","-",0,0,0,0,[],0,0,0,0,0],
["chat_overlay_ring_buffer_end","-","-",0,0,0,0,[],0,0,0,0,0],
["ship_array","ship_array","ship_array",0,0,0,0,[],0,0,0,0,0],
["cart_array","cart_array","cart_array",0,0,0,0,[],0,0,0,0,0],
["removed_scene_props","removed_scene_props","removed_scene_props",0,0,0,0,[],0,0,0,0,0],
["animation_menu_strings","animation_menu_strings","animation_menu_strings",0,0,0,0,[],0,0,0,0,0],
["animation_durations","animation_durations","animation_durations",0,0,0,0,[],0,0,0,0,0],
]