We learn create new village in this lesson.
We change the following files in this lesson;
Before we start lesson, you must copy this files.
Firstly, we open module_troops.py file and find this;
add after;
Explain;
village_91_elder = Elder's ID.
Village Elder = Name.
tf_hero = Hero.
tf_randomize_face = Random Face.
tf_is_merchant = Merchant.
[itm...] = Items.
Save this file and close.
Now, we add us scenes. Open module_scenes.py and find this;
add after;
Explain;
village_91 = Village ID.
0x00000... = Generated code. (I use here 90th village's code.)
We finished us work in this file. Save and quit.
Now, we must add us village!
Open module_parties.py file and find this;
add after;
Explain;
village_91 = Us village's ID.
Us Village's Name = Us village's name.
icon_village_swed_a = Icon of village.
pf_village = Village tag.
21.79,83.57 = Coordinate.
and finish this. Now save and quit this file.
We last process is give center to party/lord. Open module_scripts.py file.
Find this;
add after;
Explain;
p_village_91 = Us village's ID.
p_town_1 = Here we write us villages attacked town/castle. (For example, p_town_1: If we write this there, when someone take town_1, they will take p_village_91 as well.)
Yeh, we finished this lesson.
Enjoy It...
We change the following files in this lesson;
Code:
module_troops.py
module_scenes.py
module_parties.py
module_scripts.py
Before we start lesson, you must copy this files.
Firstly, we open module_troops.py file and find this;
Code:
["village_90_elder", "Village Elder","village 1 elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_selo_boots,itm_prostoy_jupan_b,itm_ukrine_prosta_shapka],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2],
add after;
Code:
["village_91_elder", "Village Elder","village 91 elder",tf_hero|tf_randomize_face|tf_is_merchant, 0,0, fac_commoners,[itm_selo_boots,itm_prostoy_jupan_b,itm_ukrine_prosta_shapka],def_attrib|level(2),wp(20),knows_inventory_management_10, man_face_old_1, man_face_older_2],
Explain;
village_91_elder = Elder's ID.
Village Elder = Name.
tf_hero = Hero.
tf_randomize_face = Random Face.
tf_is_merchant = Merchant.
[itm...] = Items.
Save this file and close.
Now, we add us scenes. Open module_scenes.py and find this;
Code:
("village_90",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000000300005004005fd770000296c0000472e00000139",
[],[],"outer_terrain_plain"),
add after;
Code:
("village_91",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000000300005004005fd770000296c0000472e00000139",
[],[],"outer_terrain_plain"),
Explain;
village_91 = Village ID.
0x00000... = Generated code. (I use here 90th village's code.)
We finished us work in this file. Save and quit.
Now, we must add us village!
Open module_parties.py file and find this;
Code:
("village_90", "Kolomak", icon_village_ukr_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(55.33, -17.31),[], 40),
add after;
Code:
("village_91", "Us Village's Name", icon_village_swed_a|pf_village, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(21.79,83.57),[], 40),
Explain;
village_91 = Us village's ID.
Us Village's Name = Us village's name.
icon_village_swed_a = Icon of village.
pf_village = Village tag.
21.79,83.57 = Coordinate.
and finish this. Now save and quit this file.
We last process is give center to party/lord. Open module_scripts.py file.
Find this;
Code:
(party_set_slot, "p_village_66", slot_village_bound_center, "p_town_13"),
(store_faction_of_party, ":town_faction", "p_town_13"),
(call_script, "script_give_center_to_faction_aux", "p_village_66", ":town_faction"),
add after;
Code:
(party_set_slot, "p_village_91", slot_village_bound_center, "p_town_1"),
(store_faction_of_party, ":town_faction", "p_town_1"),
(call_script, "script_give_center_to_faction_aux", "p_village_91", ":town_faction"),
Explain;
p_village_91 = Us village's ID.
p_town_1 = Here we write us villages attacked town/castle. (For example, p_town_1: If we write this there, when someone take town_1, they will take p_village_91 as well.)
Yeh, we finished this lesson.
Enjoy It...