PYTHON SCRIPT/SCHEME EXCHANGE

Users who are viewing this thread

Zephilinox said:
keinPlan86m said:
Zephilinox said:
save it as unused_items.py and place it in the same directory as all of your ID, Header, and Module python files.

Done that, but nothing happens after compile or running it with python... i'm not into python, so could you tell me what i'm missing out? :smile:

edit your build_module.bat file so that it has this line somewhere

Code:
python unused_items.py

so that it looks something like this

@echo off
python process_init.py
python process_global_variables.py
python process_strings.py
python process_skills.py
python process_music.py
python process_animations.py
python process_meshes.py
python process_sounds.py
python process_skins.py
python process_map_icons.py
python process_factions.py
python process_items.py
python process_scenes.py
python process_troops.py
python process_particle_sys.py
python process_scene_props.py
python process_tableau_materials.py
python process_presentations.py
python process_party_tmps.py
python process_parties.py
python process_quests.py
python process_info_pages.py
python process_scripts.py
python process_mission_tmps.py
python process_game_menus.py
python process_simple_triggers.py
python process_dialogs.py
python process_global_variables_unused.py
python process_postfx.py
@del *.pyc
echo.
echo ______________________________
echo.
python unused_items.py
echo Script processing has ended.
echo Press any key to exit. . .
pause>nul

or if you prefer, you can just run it from command line. Shift-Right Click the directory, then "open command line here", and type in the line above.

This is the output for native items, 210 items that no troops have equipped

no_item
tutorial_dagger
horse_meat
heavy_practice_sword
practice_dagger
practice_axe
arena_axe
arena_sword
arena_sword_two_handed
arena_lance
practice_lance
practice_bow
practice_crossbow
practice_javelin
practice_javelin_melee
practice_throwing_daggers
practice_throwing_daggers_100_amount
practice_horse
practice_arrows
practice_bolts
practice_arrows_10_amount
practice_arrows_100_amount
practice_bolts_9_amount
practice_boots
red_tourney_armor
blue_tourney_armor
green_tourney_armor
gold_tourney_armor
red_tourney_helmet
blue_tourney_helmet
green_tourney_helmet
gold_tourney_helmet
arena_shield_red
arena_shield_blue
arena_shield_green
arena_shield_yellow
arena_armor_white
arena_armor_blue
arena_armor_green
arena_armor_yellow
arena_tunic_yellow
arena_helmet_red
arena_helmet_blue
arena_helmet_green
arena_helmet_yellow
steppe_helmet_white
steppe_helmet_red
steppe_helmet_blue
steppe_helmet_green
steppe_helmet_yellow
tourney_helm_white
tourney_helm_red
tourney_helm_blue
tourney_helm_green
tourney_helm_yellow
arena_turban_red
arena_turban_blue
arena_turban_green
arena_turban_yellow
spice
salt
oil
pottery
raw_flax
linen
wool
wool_cloth
raw_silk
raw_dyes
velvet
iron
tools
raw_leather
leatherwork
raw_date_fruit
wine
ale
smoked_fish
cheese
honey
sausages
cabbages
dried_meat
fruit
raw_grapes
raw_olives
grain
cattle_meat
bread
chicken
pork
butter
siege_supply
quest_wine
quest_ale
tutorial_saddle_horse
tutorial_shield
tutorial_staff_no_attack
tutorial_staff
cartridges
pilgrim_hood
black_greaves
sarranid_head_cloth_b
lady_dress_blue
khergit_lady_dress
khergit_lady_dress_b
coat
leather_coat
mail_coat
long_mail_coat
hide_coat
merchant_outfit
homespun_dress
thick_coat
coat_with_cape
steppe_outfit
nordic_outfit
nordic_armor
hide_armor
cloaked_tunic
sleeveless_tunic
sleeveless_leather_tunic
linen_shirt
wool_coat
black_armor
pelt_coat
sarranid_dress_b
burlap_tunic
heraldic_mail_with_tunic
heraldic_mail_with_tunic_b
turret_hat_blue
turret_hat_green
court_hat
hood_b
hood_c
hood_d
khergit_lady_hat
khergit_lady_hat_b
black_helmet
wooden_stick
hammer
arabian_sword_d
sword_of_war
two_handed_cleaver
military_cleaver_b
military_sickle_a
two_handed_battle_axe_2
shortened_voulge
long_axe_alt
long_axe_b
long_axe_b_alt
long_axe_c
long_axe_c_alt
long_bardiche
great_long_bardiche
sword_medieval_c_long
mace_2
long_spiked_club
long_hafted_spiked_mace
sarranid_mace_1
sarranid_axe_b
sarranid_two_handed_axe_b
military_fork
jousting_lance
double_sided_lance
poleaxe
polehammer
military_scythe
great_lance
awlpike_long
bec_de_corbin_a
shield_heater_c
norman_shield_1
norman_shield_2
norman_shield_3
norman_shield_4
norman_shield_5
norman_shield_6
norman_shield_7
norman_shield_8
darts
war_darts
javelin_melee
throwing_spear_melee
jarid_melee
light_throwing_axes_melee
throwing_axes_melee
heavy_throwing_axes_melee
flintlock_pistol
torch
felt_steppe_cap
khergit_helmet
khergit_guard_boots
light_leather
light_mail_and_plate
byzantion_helmet_a
magyar_helmet_a
rus_helmet_a
sipahi_helmet_a
shahi
rabati
keys
bride_dress
bride_crown
bride_shoes
practice_bow_2
practice_arrows_2
heraldic_mail_with_surcoat_for_tableau
mail_boots_for_tableau
items_end

It is true that they are not used by any troops, but many of those items,such as the food and trade goods, are used in scripts. you should watch out for those if you plan on deleting or replacing the unused ones
 
Lumos said:
Sorenerv said:
Hello, I came across this while looking for a different map editor choice. I am only intermediate with python and am curious how would I go about using this piece of script to actually edit the map in a live environment? Like do I need to make it draw a box on the screen in order to use a GUI? Obviously im very lost here, please help lol :smile:
There isn't a single line of Python in there, God damn it! The game uses a custom scripting language that gets processed through Python; this allows for limited Python usage, chiefly for compile-time code generation. One usually ends up not using real Python for almost absolutely everything that's related to modding this game.
Yes, I know how the thread's named, but that still changes nothing.

This aside, you can't "use a GUI" on the world map. As Lav states in the post you quoted, you select a party to move using the context menu (the bits you add to
Code:
module_scripts
are related to that), then use TFGH to move the party around. I think you then use the context menu of your selected party to confirm the new position and cancel the movement mode.

well lumos thanks for the attempt on explaining that, im still rather lost.. lol. your description of context menu I have no clue what your talking about sadly. btw with the gui I did not mean in game or over the game but rather draw.screen function with python. I thought the language looked a bit off from python, im only intermediate atm with python and still learning it tho I do see some small likeliness.
 
Sorenerv said:
well lumos thanks for the attempt on explaining that, im still rather lost.. lol. your description of context menu I have no clue what your talking about sadly. btw with the gui I did not mean in game or over the game but rather draw.screen function with python. I thought the language looked a bit off from python, im only intermediate atm with python and still learning it tho I do see some small likeliness.
As I said, you should pretty much forget about using Python in any way. The engine runs on C/++, AFAIK, and Python is only used as the environment which compiles the module files into a game-readable stream of numbers.
A context menu is one that is accessible through right-clicking. Try right-clicking on stuff on the world map, and you'll see that one exists in the game, despite not being a very well-advertised feature.
Adding Lav's scripts to the respective file will give the context menus extra options related to moving the parties around.
 
Zephilinox said:
keinPlan86m said:
Zephilinox said:
save it as unused_items.py and place it in the same directory as all of your ID, Header, and Module python files.

Done that, but nothing happens after compile or running it with python... i'm not into python, so could you tell me what i'm missing out? :smile:

edit your build_module.bat file so that it has this line somewhere

Code:
python unused_items.py

so that it looks something like this

@echo off
python process_init.py
python process_global_variables.py
python process_strings.py
python process_skills.py
python process_music.py
python process_animations.py
python process_meshes.py
python process_sounds.py
python process_skins.py
python process_map_icons.py
python process_factions.py
python process_items.py
python process_scenes.py
python process_troops.py
python process_particle_sys.py
python process_scene_props.py
python process_tableau_materials.py
python process_presentations.py
python process_party_tmps.py
python process_parties.py
python process_quests.py
python process_info_pages.py
python process_scripts.py
python process_mission_tmps.py
python process_game_menus.py
python process_simple_triggers.py
python process_dialogs.py
python process_global_variables_unused.py
python process_postfx.py
@del *.pyc
echo.
echo ______________________________
echo.
python unused_items.py
echo Script processing has ended.
echo Press any key to exit. . .
pause>nul

or if you prefer, you can just run it from command line. Shift-Right Click the directory, then "open command line here", and type in the line above.

This is the output for native items, 210 items that no troops have equipped

no_item
tutorial_dagger
horse_meat
heavy_practice_sword
practice_dagger
practice_axe
arena_axe
arena_sword
arena_sword_two_handed
arena_lance
practice_lance
practice_bow
practice_crossbow
practice_javelin
practice_javelin_melee
practice_throwing_daggers
practice_throwing_daggers_100_amount
practice_horse
practice_arrows
practice_bolts
practice_arrows_10_amount
practice_arrows_100_amount
practice_bolts_9_amount
practice_boots
red_tourney_armor
blue_tourney_armor
green_tourney_armor
gold_tourney_armor
red_tourney_helmet
blue_tourney_helmet
green_tourney_helmet
gold_tourney_helmet
arena_shield_red
arena_shield_blue
arena_shield_green
arena_shield_yellow
arena_armor_white
arena_armor_blue
arena_armor_green
arena_armor_yellow
arena_tunic_yellow
arena_helmet_red
arena_helmet_blue
arena_helmet_green
arena_helmet_yellow
steppe_helmet_white
steppe_helmet_red
steppe_helmet_blue
steppe_helmet_green
steppe_helmet_yellow
tourney_helm_white
tourney_helm_red
tourney_helm_blue
tourney_helm_green
tourney_helm_yellow
arena_turban_red
arena_turban_blue
arena_turban_green
arena_turban_yellow
spice
salt
oil
pottery
raw_flax
linen
wool
wool_cloth
raw_silk
raw_dyes
velvet
iron
tools
raw_leather
leatherwork
raw_date_fruit
wine
ale
smoked_fish
cheese
honey
sausages
cabbages
dried_meat
fruit
raw_grapes
raw_olives
grain
cattle_meat
bread
chicken
pork
butter
siege_supply
quest_wine
quest_ale
tutorial_saddle_horse
tutorial_shield
tutorial_staff_no_attack
tutorial_staff
cartridges
pilgrim_hood
black_greaves
sarranid_head_cloth_b
lady_dress_blue
khergit_lady_dress
khergit_lady_dress_b
coat
leather_coat
mail_coat
long_mail_coat
hide_coat
merchant_outfit
homespun_dress
thick_coat
coat_with_cape
steppe_outfit
nordic_outfit
nordic_armor
hide_armor
cloaked_tunic
sleeveless_tunic
sleeveless_leather_tunic
linen_shirt
wool_coat
black_armor
pelt_coat
sarranid_dress_b
burlap_tunic
heraldic_mail_with_tunic
heraldic_mail_with_tunic_b
turret_hat_blue
turret_hat_green
court_hat
hood_b
hood_c
hood_d
khergit_lady_hat
khergit_lady_hat_b
black_helmet
wooden_stick
hammer
arabian_sword_d
sword_of_war
two_handed_cleaver
military_cleaver_b
military_sickle_a
two_handed_battle_axe_2
shortened_voulge
long_axe_alt
long_axe_b
long_axe_b_alt
long_axe_c
long_axe_c_alt
long_bardiche
great_long_bardiche
sword_medieval_c_long
mace_2
long_spiked_club
long_hafted_spiked_mace
sarranid_mace_1
sarranid_axe_b
sarranid_two_handed_axe_b
military_fork
jousting_lance
double_sided_lance
poleaxe
polehammer
military_scythe
great_lance
awlpike_long
bec_de_corbin_a
shield_heater_c
norman_shield_1
norman_shield_2
norman_shield_3
norman_shield_4
norman_shield_5
norman_shield_6
norman_shield_7
norman_shield_8
darts
war_darts
javelin_melee
throwing_spear_melee
jarid_melee
light_throwing_axes_melee
throwing_axes_melee
heavy_throwing_axes_melee
flintlock_pistol
torch
felt_steppe_cap
khergit_helmet
khergit_guard_boots
light_leather
light_mail_and_plate
byzantion_helmet_a
magyar_helmet_a
rus_helmet_a
sipahi_helmet_a
shahi
rabati
keys
bride_dress
bride_crown
bride_shoes
practice_bow_2
practice_arrows_2
heraldic_mail_with_surcoat_for_tableau
mail_boots_for_tableau
items_end

Thanks man, i'am looking for it for a long time
 
If anyone is interested, here's a script I made to assign the multiplayer item class slots to all items automatically:
add this to the very end of module_scripts
Code:
block = [
	(set_fixed_point_multiplier,100),##needed to get correct shield size
]
from module_items import items
for i in xrange(len(items)):
	block += [(assign,l.item,i),]
	if(items[i][3]|itp_type_one_handed_wpn|itp_bonus_against_shield == items[i][3]):
		block += [(item_set_slot,l.item,slot_item_multiplayer_item_class,multi_item_class_type_axe),]
	elif(items[i][3]|itp_type_one_handed_wpn|itp_can_knock_down == items[i][3]):
		block += [(item_set_slot,l.item,slot_item_multiplayer_item_class,multi_item_class_type_blunt),]
	elif(items[i][3]|itp_type_one_handed_wpn|itp_wooden_parry == items[i][3] and items[i][4]|itc_scimitar == items[i][4]):
		block += [(item_set_slot,l.item,slot_item_multiplayer_item_class,multi_item_class_type_war_picks),]
	elif(items[i][3]|itp_type_one_handed_wpn == items[i][3] and items[i][4]|itc_cleaver == items[i][4]):
		block += [(item_set_slot,l.item,slot_item_multiplayer_item_class,multi_item_class_type_cleavers),]
	elif(items[i][3]|itp_type_one_handed_wpn == items[i][3]):
		block += [(item_set_slot,l.item,slot_item_multiplayer_item_class,multi_item_class_type_sword),]
	elif(items[i][3]|itp_type_two_handed_wpn|itp_bonus_against_shield == items[i][3]):
		block += [(item_set_slot,l.item,slot_item_multiplayer_item_class,multi_item_class_type_two_handed_axe),]
	elif(items[i][3]|itp_type_two_handed_wpn == items[i][3]):
		block += [(item_set_slot,l.item,slot_item_multiplayer_item_class,multi_item_class_type_two_handed_sword),]
	elif(items[i][3]|itp_type_polearm|itp_couchable == items[i][3]):
		block += [(item_set_slot,l.item,slot_item_multiplayer_item_class,multi_item_class_type_lance),]
	elif(items[i][3]|itp_type_polearm == items[i][3]):
		block += [(item_set_slot,l.item,slot_item_multiplayer_item_class,multi_item_class_type_spear),]
	elif(items[i][3]|itp_type_shield == items[i][3]):
		block += [
			(item_get_shield_height,l.size,l.item),
			(item_get_weapon_length,l.size2,l.item),
			(try_begin),
				(eq,l.size,0),
				(store_mul,l.size,l.size2,2),
			(else_try),
				(val_add,l.size,l.size2),
			(try_end),
			(try_begin),
				(gt,l.size,100),#arbitrary value, need to change
				(item_set_slot,l.item,slot_item_multiplayer_item_class,multi_item_class_type_large_shield),
			(else_try),
				(item_set_slot,l.item,slot_item_multiplayer_item_class,multi_item_class_type_small_shield),
			(try_end),
			]
	elif(items[i][3]|itp_type_bow == items[i][3]):
		block += [(item_set_slot,l.item,slot_item_multiplayer_item_class,multi_item_class_type_bow),]
	elif(items[i][3]|itp_type_crossbow == items[i][3]):
		block += [(item_set_slot,l.item,slot_item_multiplayer_item_class,multi_item_class_type_crossbow),]
	elif(items[i][3]|itp_type_arrows == items[i][3]):
		block += [(item_set_slot,l.item,slot_item_multiplayer_item_class,multi_item_class_type_arrow),]
	elif(items[i][3]|itp_type_bolts == items[i][3]):
		block += [(item_set_slot,l.item,slot_item_multiplayer_item_class,multi_item_class_type_bolt),]
	elif(items[i][3]|itp_type_thrown|itp_next_item_as_melee == items[i][3] and items[i+1][3]|itp_bonus_against_shield == items[i+1][3]):
		block += [(item_set_slot,l.item,slot_item_multiplayer_item_class,multi_item_class_type_throwing_axe),]
	elif(items[i][3]|itp_type_thrown == items[i][3]):
		block += [(item_set_slot,l.item,slot_item_multiplayer_item_class,multi_item_class_type_throwing),]
	elif(items[i][3]|itp_type_horse == items[i][3]):
		block += [(item_set_slot,l.item,slot_item_multiplayer_item_class,multi_item_class_type_horse),]
	elif(items[i][3]|itp_type_body_armor == items[i][3]):
		block += [
			(item_get_weight,l.weight,l.item),
			(try_begin),
				(gt,l.weight,100),#arbitrary value, need to change
				(item_set_slot,l.item,slot_item_multiplayer_item_class,multi_item_class_type_heavy_armor),
			(else_try),
				(gt,l.weight,50),#arbitrary value, need to change
				(item_set_slot,l.item,slot_item_multiplayer_item_class,multi_item_class_type_medium_armor),
			(else_try),
				(item_set_slot,l.item,slot_item_multiplayer_item_class,multi_item_class_type_light_armor),
			(try_end),
			]
	elif(items[i][3]|itp_type_head_armor == items[i][3]):
		block += [
			(item_get_weight,l.weight,l.item),
			(try_begin),
				(gt,l.weight,100),#arbitrary value, need to change
				(item_set_slot,l.item,slot_item_multiplayer_item_class,multi_item_class_type_heavy_helm),
			(else_try),
				(item_set_slot,l.item,slot_item_multiplayer_item_class,multi_item_class_type_light_foot),
			(try_end),
			]
	elif(items[i][3]|itp_type_foot_armor == items[i][3]):
		block += [
			(item_get_weight,l.weight,l.item),
			(try_begin),
				(gt,l.weight,100),#arbitrary value, need to change
				(item_set_slot,l.item,slot_item_multiplayer_item_class,multi_item_class_type_heavy_foot),
			(else_try),
				(item_set_slot,l.item,slot_item_multiplayer_item_class,multi_item_class_type_light_foot),
			(try_end),
			]
	elif(items[i][3]|itp_type_hand_armor == items[i][3]):
		block += [(item_set_slot,l.item,slot_item_multiplayer_item_class,multi_item_class_type_glove),]
scripts += [
	("item_set_mp_item_class",block),
]
after that, just call that script in script_quick_start replacing those hundread of lines that set these same slots
it is not perfect but it does classify xbows as multi_item_class_type_crossbow instead of multi_item_class_type_bow as native does...
 
You're better off asking in the Mod Makers Q&A Thread. This one here is only for posting snippets of code created by you to share with other modders.
 
Airbar said:
You're better off asking in the Mod Makers Q&A Thread. This one here is only for posting snippets of code created by you to share with other modders.

Right, I had post my question on the... "Mod Makers Q&A Thread".

Thank you
 
remove pork from sarranid villages and change it for another food

in script: script_refresh_village_merchant_inventory
search for - (troop_add_merchandise, ":merchant_troop", itp_type_goods, ":number_of_items_in_village"),
Code:
      (troop_clear_inventory, ":merchant_troop"),
      (troop_add_merchandise, ":merchant_troop", itp_type_goods, ":number_of_items_in_village"),
### cultural restriction ###
        (try_begin),
            (party_get_slot, ":culture", ":village_no", slot_center_culture),
            (store_add, ":number_of_eqslot", ":number_of_items_in_village", 10),
                (try_for_range, ":inv", 9, ":number_of_eqslot"),
                    (try_begin), 
	          (eq,":culture",fac_culture_6),#sarranids
                        (troop_get_inventory_slot, ":haram", ":merchant_troop", ":inv"),
	         #(this_or_next|eq,":haram",itm_boar_meat),
	         #(this_or_next|eq,":haram",itm_deer_meat),
	          (eq,":haram",itm_pork),
	          (troop_remove_item, ":merchant_troop", ":haram"),
	          (store_random_in_range, ":halyal", itm_cheese,itm_chicken),
	          (troop_add_item,":merchant_troop",":halyal",0),
	     (try_end),
	(try_end),
        (try_end),
### cultural restriction end ###		
      (troop_ensure_inventory_space, ":merchant_troop", 80),

Also can be used for another type of restrictions by terrain type, by cultures,distance to water and so on.
 
HyperCharge said:
okay.I made something like that;

Code:
(store_random_in_range, ":morale_increase", 20 * 1, 20 * 2),
                    (call_script, "script_change_player_party_morale", ":morale_increase"),
I think thats giving morale between 20-40.
Should i add that instead this code?;
Code:
(party_set_morale, "p_main_party", 40),
I tried this code but know you can add morale for money as much as we want
So assign a custom variable set ge custom variable 0 if script ran set variable to 1 and automatticly get it back to 0 after cur time (past) is 60 or custom hour value
 
module_game_menus.py
Code:
 [anyone|plyr,"lady_talk",
   [],
   "May I have the honor of knowing more about you, my lady?", "lady_relations",[]],	
 ## builders code  
   [anyone|plyr,"lady_talk",
   [],
   "I want you and im going to mary you nothing you can change about that!", "close_window",[
    (call_script, "script_get_kingdom_lady_social_determinants", "$g_talk_troop"),
	(assign, ":guardian", reg0),
	(str_store_troop_name, s10, "$g_talk_troop"),
	(str_store_troop_name, s12, ":guardian"),
    (setup_quest_text, "qst_formal_marriage_proposal"),
    (str_store_string, s2, "str_you_intend_to_ask_s12_to_pressure_s10_to_marry_you"),
	
    (quest_set_slot, "qst_formal_marriage_proposal", slot_quest_target_troop, ":guardian"),
    (quest_set_slot, "qst_formal_marriage_proposal", slot_quest_expiration_days, 30),
    (quest_set_slot, "qst_formal_marriage_proposal", slot_quest_current_state, 0),
	(call_script, "script_start_quest", "qst_formal_marriage_proposal", "$g_talk_troop"),
	(quest_set_slot, "qst_formal_marriage_proposal", slot_quest_giver_troop, "$g_talk_troop"), 
	]],
 ## builders code
  [anyone,"lady_relations",
   [
    (str_store_string, s12, "str_i_am"),
	(assign, ":relation_found", 0),
	(assign, ":in_castle_of_relative", 0),

module_dialogs.py
Code:
 [anyone|plyr,"lord_talk", [(le,"$talk_context", tc_party_encounter),
                             (ge, "$g_talk_troop_faction_relation", 0),
                             #(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0),
                             (neg|troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0),
                             (faction_slot_eq, "$g_talk_troop_faction", slot_faction_leader, "$g_talk_troop"),
                             (neq, "$players_kingdom", "$g_talk_troop_faction"),
                             (store_partner_quest, ":lords_quest"),
                             (neq, ":lords_quest", "qst_join_faction"),
                            ],
   "{s66}, I have come to offer you my sword in vassalage!", "lord_ask_enter_service",[]],
## builders dialog
  [anyone|plyr,"lord_talk", [(le,"$talk_context", tc_party_encounter),
	
                             #(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0),
                             (neg|troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0),
                            ],
   "{s66}, You need to do something for me and better do it!", "lord_ask_do",[]],
   [anyone,"lord_ask_do", [], "Who do you think you are threatening me!", "lord_askt",[]],
   [anyone|plyr,"lord_askt", [], "Never_mind", "lord_talk",[]],
   [anyone|plyr,"lord_askt", [], "Well i have prove that you, a married lord went to the hugars", "lord_chantage",[]],
   [anyone,"lord_chantage", [], "What do you want from me you bastard!", "lord_want",[]],
   [anyone|plyr,"lord_want", [], "I want money", "lord_want_money",[]],
   [anyone|plyr,"lord_want", [], "I want your duaghter to marry me", "lord_want_daughter",[]],
   [anyone|plyr,"lord_want", [], "I want your prisoners to be released", "lord_want_prisoners",[]],
   [anyone|plyr,"lord_want", [(ge, "$g_lord_daughter",0)], "I want you to join my faction", "lord_join_faction_no",[]],
   [anyone|plyr,"lord_want", [(ge, "$g_lord_daughter",1),], "I want you to join my faction, remember i can do with your daughter whatever i want", "lord_join_faction",[]],
   [anyone|plyr,"lord_want", [], "Never_mind", "lord_talk",[]],
   
   [anyone|plyr,"lord_join_faction_no", [], "you ask to much", "lord_want",[]],
   
   [anyone,"lord_join_faction",  
    [
      (troop_get_slot, ":recruitment_candidate", "$g_talk_troop", slot_lord_recruitment_candidate),
      (str_store_troop_name, s4, ":recruitment_candidate"),
      
      (try_begin),
        (eq, "$cheat_mode", 1),
        (display_message, "str_lord_pledges_to_s4"),
      (try_end),  
    ],
    "Very well -- I am ready to pledge myself to {s4} as my {reg4?queen:king}.", "lord_want",
    [
      (troop_get_slot, ":recruitment_candidate", "$g_talk_troop", slot_lord_recruitment_candidate),
      
      (try_begin),
        (eq, ":recruitment_candidate", "trp_player"),
        (faction_slot_eq, "fac_player_supporters_faction", slot_faction_state, sfs_inactive),
        (call_script, "script_activate_player_faction", "trp_player"),
      (try_end),
      
      (assign, "$lord_expects_fief", 0),
      (try_begin),
        (troop_slot_eq, "$g_talk_troop", slot_lord_recruitment_argument, argument_benefit),
        (assign, "$lord_expects_fief", 1),
      (try_end),
            
      (call_script, "script_change_troop_faction", "$g_talk_troop", "$players_kingdom"),
      
      (try_begin), #Actually, perhaps do provocation rather than war
        (store_relation, ":relation", "$players_kingdom", "$g_talk_troop_faction"), 
        (ge, ":relation", 0),
        
        (try_begin),
          (eq, "$cheat_mode", 1),
          (display_message, "str_lord_recruitment_provokes_home_faction"),
        (try_end),  
        
        (call_script, "script_add_log_entry", logent_border_incident_troop_suborns_lord, "trp_player", -1, "$g_talk_troop","$g_talk_troop_faction"),
        (store_add, ":slot_provocation_days", "$players_kingdom", slot_faction_provocation_days_with_factions_begin),
        (val_sub, ":slot_provocation_days", kingdoms_begin),
        (faction_set_slot, "$g_talk_troop_faction", ":slot_provocation_days", 30),
        
        (faction_get_slot, ":other_liege", "$g_talk_troop_faction", slot_faction_leader),
        (call_script, "script_troop_change_relation_with_troop", "trp_player", ":other_liege", -3),
      (try_end),
      
      (troop_get_type, reg4, ":recruitment_candidate"),
      (try_begin),
        (eq, ":recruitment_candidate", "trp_player"),
        (str_store_string, s4, "@you"),
		(call_script, "script_change_player_right_to_rule", 5),
      (else_try),
        (str_store_troop_name, s4, ":recruitment_candidate"),
      (try_end),		
	]],
   
   [anyone,"lord_want", [], "They will be!", "lord_want",[(store_num_regular_prisoners,":lprisoners","$g_talk_troop"),(party_remove_prisoners,"$g_talk_troop_party",":lprisoners")]],
   
   [anyone,"lord_want_daughter", [(quest_get_slot, ":bride", "qst_formal_marriage_proposal", slot_quest_giver_troop),(neg|troop_slot_eq, "$g_talk_troop", slot_lord_reputation_type, lrep_debauched),(neg|troop_slot_eq, "$g_talk_troop", slot_lord_reputation_type, lrep_selfrighteous),(neg|troop_slot_eq, "$g_talk_troop", slot_lord_reputation_type, lrep_quarrelsome)], "You swine, i have no chose to accept this", "drunk_mariage",[(assign, "$g_lord_daughter", 1)]],
   [anyone,"lord_want_daughter", [], "It goes to far choose something else!", "lord_want",[]],
   
   [anyone,"lord_want_money", [], "Sigh, i can do nothing else than give it to you", "lord_want_money2",[]],
   
   [anyone|plyr,"lord_want_money2", [], "Never_mind", "lord_want",[]],
   [anyone|plyr,"lord_want_money2", [(store_troop_gold,":total_money","$g_talk_troop"),(gt, ":total_money",20),(le, ":total_money",35)], "Thats nice i want 20 denars!", "lord_want",[(troop_add_gold,"trp_player",20),(troop_remove_gold,"$g_talk_troop",20),(call_script, "script_troop_change_relation_with_troop", "$g_talk_troop", "trp_player", -1)]],
   [anyone|plyr,"lord_want_money2", [(store_troop_gold,":total_money","$g_talk_troop"),(gt, ":total_money",35),(le, ":total_money",65)], "Thats nice i want 35 denars!", "lord_want",[(troop_add_gold,"trp_player",35),(troop_remove_gold,"$g_talk_troop",35),(call_script, "script_troop_change_relation_with_troop", "$g_talk_troop", "trp_player", -1)]],
   [anyone|plyr,"lord_want_money2", [(store_troop_gold,":total_money","$g_talk_troop"),(gt, ":total_money",65),(le, ":total_money",200)], "Thats nice i want 65 denars!", "lord_want",[(troop_add_gold,"trp_player",65),(troop_remove_gold,"$g_talk_troop",65),(call_script, "script_troop_change_relation_with_troop", "$g_talk_troop", "trp_player", -1)]],
   [anyone|plyr,"lord_want_money2", [(store_troop_gold,":total_money","$g_talk_troop"),(gt, ":total_money",200),(le, ":total_money",500)], "Thats nice i want 200 denars!", "lord_want",[(troop_add_gold,"trp_player",200),(troop_remove_gold,"$g_talk_troop",200),(call_script, "script_troop_change_relation_with_troop", "$g_talk_troop", "trp_player", -2)]],
   [anyone|plyr,"lord_want_money2", [(store_troop_gold,":total_money","$g_talk_troop"),(gt, ":total_money",500)], "Thats nice i want 500 denars!", "lord_want",[(troop_add_gold,"trp_player",500),(troop_remove_gold,"$g_talk_troop",500),(call_script, "script_troop_change_relation_with_troop", "$g_talk_troop", "trp_player", -3)]],
   
    [anyone|plyr,"lord_talk", [(le,"$talk_context", tc_party_encounter),
	
                             #(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0),
                             (neg|troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0),
                            ],
   "{s66}, Would you like to drink something together?", "lord_ask_drinking",[]],
   [anyone,"lord_ask_drinking", [(ge, "$g_talk_troop_relation", -10)], "I would like to drink something together!", "lord_drink",[]],
   [anyone|plyr,"lord_drink", [(store_troop_gold,":total_money","trp_player"),(gt, ":total_money",20)], "Thats nice i bought us 2 beer in the street only costed me 20 denars with 1% alcohol!", "lord_ask_drinking_2",[(assign, "$g_lord_drink", 0),(val_add, "$g_lord_drink", 1),(troop_remove_gold,"trp_player",20)]],
   [anyone|plyr,"lord_drink", [(store_troop_gold,":total_money","trp_player"),(gt, ":total_money",35)], "Thats nice i bought us 2 wines in the street only costed me 35 denars with 2% alcohol!", "lord_ask_drinking_2",[(assign, "$g_lord_drink", 0),(val_add, "$g_lord_drink", 2),(troop_remove_gold,"trp_player",35)]],
   [anyone|plyr,"lord_drink", [(store_troop_gold,":total_money","trp_player"),(gt, ":total_money",65)], "Thats nice i bought us 2 whiskeys in the street only costed me 65 denars with 4% alcohol!", "lord_ask_drinking_2",[(assign, "$g_lord_drink", 0),(val_add, "$g_lord_drink", 4),(troop_remove_gold,"trp_player",65)]],
   [anyone|plyr,"lord_drink", [(store_troop_gold,":total_money","trp_player"),(gt, ":total_money",200)], "Thats nice i bought us 2 royal beers by a speciales brewer in the rodok empire costed me 200 denars with 10% alcohol!", "lord_ask_drinking_2",[(assign, "$g_lord_drink", 0),(val_add, "$g_lord_drink", 10),(troop_remove_gold,"trp_player",200)]],
   [anyone|plyr,"lord_drink", [(store_troop_gold,":total_money","trp_player"),(gt, ":total_money",500)], "Thats nice i bought us 2 royal wines by a special brewer in the swadian empire costed me 500 denars with 25% alcohol!", "lord_ask_drinking_2",[(assign, "$g_lord_drink", 0),(val_add, "$g_lord_drink", 25),(troop_remove_gold,"trp_player",500)]],
   [anyone|plyr,"lord_drink", [(store_troop_gold,":total_money","trp_player"),(gt, ":total_money",40),(party_get_skill_level, ":assassination", "p_main_party", skl_assassination),(ge, ":assassination", 3),], "Thats nice i bought us 2 wines in the street only costed me 35 denars with 2% alcohol! (what he doesn't now is that is poisoned it)", "lord_poisoned",[(assign, "$g_lord_drink", 0),(val_add, "$g_lord_drink", 2),(troop_remove_gold,"trp_player",40),(troop_set_health, "$g_talk_troop", 1),(call_script, "script_troop_change_relation_with_troop", "$g_talk_troop", "trp_player", -1)]],
  
   [anyone,"lord_poisoned", [], "What happens to me? was it poisoned? this was your fault!", "close_window",[]],
  
   [anyone,"lord_ask_drinking_2", [], "I would like to drink another round!", "lord_drink_2",[]], 
   
   [anyone|plyr,"lord_drink_2", [(store_troop_gold,":total_money","trp_player"),(gt, ":total_money",20)], "Thats nice i bought us 2 beer in the street only costed me 20 denars with 1% alcohol!", "lord_ask_drinking_3",[(val_add, "$g_lord_drink", 1),(troop_remove_gold,"trp_player",20)]],
   [anyone|plyr,"lord_drink_2", [(store_troop_gold,":total_money","trp_player"),(gt, ":total_money",35)], "Thats nice i bought us 2 wines in the street only costed me 35 denars with 2% alcohol!", "lord_ask_drinking_3",[(val_add, "$g_lord_drink", 2),(troop_remove_gold,"trp_player",35)]],
   [anyone|plyr,"lord_drink_2", [(store_troop_gold,":total_money","trp_player"),(gt, ":total_money",65)], "Thats nice i bought us 2 whiskeys in the street only costed me 65 denars with 4% alcohol!", "lord_ask_drinking_3",[(val_add, "$g_lord_drink", 4),(troop_remove_gold,"trp_player",65)]],
   [anyone|plyr,"lord_drink_2", [(store_troop_gold,":total_money","trp_player"),(gt, ":total_money",200)], "Thats nice i bought us 2 royal beers by a speciales brewer in the rodok empire costed me 200 denars with 10% alcohol!", "lord_ask_drinking_3",[(val_add, "$g_lord_drink", 10),(troop_remove_gold,"trp_player",200)]],
   [anyone|plyr,"lord_drink_2", [(store_troop_gold,":total_money","trp_player"),(gt, ":total_money",500)], "Thats nice i bought us 2 royal wines by a special brewer in the swadian empire costed me 500 denars with 25% alcohol!", "lord_ask_drinking_3",[(val_add, "$g_lord_drink", 25),(troop_remove_gold,"trp_player",500)]],
   [anyone|plyr,"lord_drink_2", [(store_troop_gold,":total_money","trp_player"),(gt, ":total_money",40),(party_get_skill_level, ":assassination", "p_main_party", skl_assassination),(ge, ":assassination", 3),], "Thats nice i bought us 2 wines in the street only costed me 35 denars with 2% alcohol! (what he doesn't now is that is poisoned it)", "lord_poisoned",[(assign, "$g_lord_drink", 0),(val_add, "$g_lord_drink", 2),(troop_remove_gold,"trp_player",40),(troop_set_health, "$g_talk_troop", 1),(call_script, "script_troop_change_relation_with_troop", "$g_talk_troop", "trp_player", -1)]],
  
   [anyone,"lord_ask_drinking_3", [], "I would like to drink another round!", "lord_drink_3",[]], 
   
   [anyone|plyr,"lord_drink_3", [(store_troop_gold,":total_money","trp_player"),(gt, ":total_money",20)], "Thats nice i bought us 2 beer in the street only costed me 20 denars with 1% alcohol!", "lord_talk_pol",[(val_add, "$g_lord_drink", 1),(troop_remove_gold,"trp_player",20)]],
   [anyone|plyr,"lord_drink_3", [(store_troop_gold,":total_money","trp_player"),(gt, ":total_money",35)], "Thats nice i bought us 2 wines in the street only costed me 35 denars with 2% alcohol!", "lord_talk_pol",[(val_add, "$g_lord_drink", 2),(troop_remove_gold,"trp_player",35)]],
   [anyone|plyr,"lord_drink_3", [(store_troop_gold,":total_money","trp_player"),(gt, ":total_money",65)], "Thats nice i bought us 2 whiskeys in the street only costed me 65 denars with 4% alcohol!", "lord_talk_pol",[(val_add, "$g_lord_drink", 4),(troop_remove_gold,"trp_player",65)]],
   [anyone|plyr,"lord_drink_3", [(store_troop_gold,":total_money","trp_player"),(gt, ":total_money",200)], "Thats nice i bought us 2 royal beers by a speciales brewer in the rodok empire costed me 200 denars with 10% alcohol!", "lord_talk_pol",[(val_add, "$g_lord_drink", 10),(troop_remove_gold,"trp_player",200)]],
   [anyone|plyr,"lord_drink_3", [(store_troop_gold,":total_money","trp_player"),(gt, ":total_money",500)], "Thats nice i bought us 2 royal wines by a special brewer in the swadian empire costed me 500 denars with 25% alcohol!", "lord_talk_pol",[(val_add, "$g_lord_drink", 25),(troop_remove_gold,"trp_player",500)]],
   [anyone|plyr,"lord_drink_3", [(store_troop_gold,":total_money","trp_player"),(gt, ":total_money",40),(party_get_skill_level, ":assassination", "p_main_party", skl_assassination),(ge, ":assassination", 3),], "Thats nice i bought us 2 wines in the street only costed me 35 denars with 2% alcohol! (what he doesn't now is that is poisoned it)", "lord_poisoned",[(assign, "$g_lord_drink", 0),(val_add, "$g_lord_drink", 2),(troop_remove_gold,"trp_player",40),(troop_set_health, "$g_talk_troop", 1),(call_script, "script_troop_change_relation_with_troop", "$g_talk_troop", "trp_player", -1)]],
  
   [anyone,"lord_talk_pol", [(le, "$g_lord_drink",11)], "Good stuff!", "lord_ask",[]],
   [anyone,"lord_talk_pol", [(ge, "$g_lord_drink",12)], "Hik Good stuf, every thing turns!!!", "lord_ask",[]],
   
   [anyone|plyr,"lord_ask", [(le, "$g_lord_drink",11)], "It was fun goodbye!", "close_window",[(call_script, "script_troop_change_relation_with_troop", "$g_talk_troop", "trp_player", 1),(store_sub, ":num_hours", 2),(rest_for_hours, ":num_hours", 5, 0),(assign, "$g_lord_drink", 0)]],
   [anyone|plyr,"lord_ask", [(ge, "$g_lord_drink",12)], "It was fun goodbye!", "close_window",[(call_script, "script_troop_change_relation_with_troop", "$g_talk_troop", "trp_player", 2),(store_sub, ":num_hours", 4),(rest_for_hours, ":num_hours", 5, 0),(assign, "$g_lord_drink", 0)]],
   [anyone|plyr,"lord_ask", [], "I think it is time to talk", "lord_talk_stuff",[]],
   
   [anyone,"lord_talk_stuff", [(le, "$g_lord_drink",11)], "Ok lets talk!", "lord_talk_menu",[]],
   [anyone,"lord_talk_stuff", [(ge, "$g_lord_drink",12)], "Hik what talk??", "lord_talk_menu",[]],
   
   [anyone|plyr,"lord_talk_menu", [], "I want to know the location of someone.", "lord_dtalk_ask_location",[]],
   [anyone|plyr,"lord_talk_menu", [(eq, "$g_lord_daughter",0)], "I want to know if you have a daughter i can have pleasure with?.", "lord_ask_daughter",[]],
   [anyone|plyr,"lord_talk_menu", [(le, "$g_lord_drink",11)], "It was fun goodbye!", "close_window",[(call_script, "script_troop_change_relation_with_troop", "$g_talk_troop", "trp_player", 1),(store_sub, ":num_hours", 2),(rest_for_hours, ":num_hours", 5, 0),(assign, "$g_dno_outside", 0),(assign, "$g_lord_daughter", 0),(assign, "$g_lord_drink", 0)]],
   [anyone|plyr,"lord_talk_menu", [(ge, "$g_lord_drink",12)], "It was fun goodbye!", "close_window",[(call_script, "script_troop_change_relation_with_troop", "$g_talk_troop", "trp_player", 2),(store_sub, ":num_hours", 4),(rest_for_hours, ":num_hours", 5, 0),(assign, "$g_dno_outside", 0),(assign, "$g_lord_daughter", 0),(assign, "$g_lord_drink", 0)]],
   [anyone|plyr,"lord_talk_menu", [(eq, "$g_dno_outside",0)], "Lets go walk a mile or what.", "lord_outside",[]],
   [anyone|plyr,"lord_talk_menu", [(eq, "$g_facked_hugars",0)], "Lets go have somes pleasure with the hugars.", "lord_hugars",[]],
   
   [anyone,"lord_hugars", [(le, "$g_lord_drink",30)], "Hik i have a wife you bastard hik", "lord_talk_menu",[(assign, "$g_hug_outside", 1),(call_script, "script_troop_change_relation_with_troop", "$g_talk_troop", "trp_player", -1)]],
   [anyone,"lord_hugars", [(ge, "$g_lord_drink",30)], "Hik ok hik time for pleasure", "lord_hugar",[]],
   
   [anyone|plyr,"lord_hugar", [(store_troop_gold,":total_money","trp_player"),(ge, ":total_money",50)], "I got some nice women for you costed me 50 denars", "lord_hugar2",[]],
   [anyone,"lord_hugar2", [(ge, "$g_lord_drink",30)], "Hik ok hik lets go and visit this girls", "lord_hugar3",[(store_sub, ":num_hours", 4),(rest_for_hours, ":num_hours", 5, 0)]],
   
   [anyone,"lord_hugar3", [(ge, "$g_lord_drink",30)], "Hik oh that was nice", "lord_hugar4",[]],
   
   [anyone,"lord_hugar4", [], "It certaintly was (and i have a perfect way to chantage you now)", "lord_talk_menu",[(assign, "$g_facked_hugars", 1)]],
	
   [anyone,"lord_outside", [(ge, "$g_lord_drink",5)], "Indeed a good plan my friend i will call my gaurds", "lord_outside2",[]],
   [anyone,"lord_outside", [(lt, "$g_lord_drink",5)], "Sorry i am to busy for that", "lord_talk_menu",[(assign, "$g_dno_outside", 1)]],
   
   [anyone|plyr,"lord_outside2", [], "No dont call your gaurds i want to be alone with you", "lord_outside3",[]],
   
   [anyone,"lord_outside3", [(ge, "$g_lord_drink",20)], "What you want", "lord_outside_ng",[]],
   [anyone,"lord_outside3", [(lt, "$g_lord_drink",20)], "Sorry it is needed for our safety", "lord_outside_wg",[]],
   
   [anyone,"lord_outside_wg", [(lt, "$g_lord_drink",20)], "Doesn't matters then we dont have to go outside", "lord_talk_menu",[(assign, "$g_dno_outside", 1)]],
   
   [anyone,"lord_outside_ng", [(ge, "$g_lord_drink",20)], "What do you want to do?", "lord_outside_talk",[]],
   
   [anyone|plyr,"lord_outside_talk", [], "Never mind lets go back", "lord_talk_menu",[]],
   [anyone|plyr,"lord_outside_talk", [(ge, "$g_lord_drink",25)], "Try to eat this its wonderful (i poisoned it)", "lord_talk_eat",[]],
   
   [anyone|plyr,"lord_talk_eat", [], "I get an enormous headache i think i drunk to much.", "lord_talk_menu",[(troop_set_health, "$g_talk_troop", 1)]],
   
   [anyone,"lord_ask_daughter", [(le, "$g_lord_drink",30)], "Hik lets talk another time when im not drunk", "lord_talk_menu",[(assign, "$g_lord_daughter", 1)]],
   [anyone,"lord_ask_daughter", [(ge, "$g_lord_drink",30)], "Hik what? Hik", "lord_get_daughter",[]],
   
   [anyone|plyr,"lord_get_daughter", [], "I want to know if i can marry your daughter?.", "lord_ask_daughter_marry",[]],

   [anyone,"lord_ask_daughter_marry", [(ge, "$g_lord_drink",30),(quest_get_slot, ":bride", "qst_formal_marriage_proposal", slot_quest_giver_troop)], "Hik alright Hik", "drunk_mariage",[(assign, "$g_lord_daughter", 1)]],
   
  [anyone,"drunk_mariage", [
  (quest_get_slot, ":bride", "qst_formal_marriage_proposal", slot_quest_giver_troop),
  (call_script, "script_get_kingdom_lady_social_determinants", ":bride"),
  (assign, ":venue", reg1),
  (is_between, ":venue", walled_centers_begin, walled_centers_end),
  (party_slot_eq, ":venue", slot_village_state, svs_normal),
  (str_store_party_name, s24, ":venue"),
  ],
   "Splendid! You two may now consider yourselves offically betrothed. Very well -- I shall plan to hold a great feast in {s24}, as soon as circumstances permit. We will be sure to notify you when the day comes.", "lord_talk_menu",
   [
   (quest_get_slot, ":bride", "qst_formal_marriage_proposal", slot_quest_giver_troop),
   (troop_set_slot, "trp_player", slot_troop_betrothed, ":bride"), 
   (troop_set_slot, ":bride", slot_troop_betrothed, "trp_player"), 

   (call_script, "script_end_quest", "qst_formal_marriage_proposal"),


   (troop_remove_gold, "trp_player", "$marriage_dower"),
   (call_script, "script_get_kingdom_lady_social_determinants", ":bride"),
   (assign, ":venue", reg1),

   (str_store_troop_name, s3, ":bride"),
   (str_store_troop_name, s4, "$g_talk_troop"),
   (str_store_party_name, s5, ":venue"),
   
   (setup_quest_text, "qst_wed_betrothed"),
   (str_store_string, s2, "str_you_plan_to_marry_s3_at_a_feast_hosted_by_s4_in_s5_you_should_be_notifed_of_the_feast_as_soon_as_it_is_held"),

   (call_script, "script_start_quest", "qst_wed_betrothed", "$g_talk_troop"),

   (quest_set_slot, "qst_wed_betrothed", slot_quest_expiration_days, 365),
   (quest_set_slot, "qst_wed_betrothed", slot_quest_giver_troop, "$g_talk_troop"),
   (quest_set_slot, "qst_wed_betrothed", slot_quest_target_troop, ":bride"),

   (try_begin),
		(eq,"$talk_context",tc_party_encounter),   
		(assign, "$g_leave_encounter", 1),
   (try_end),
   
   ]],
   
   
   [anyone,"lord_dtalk_ask_location", [],
   "Very well, I may or may not have an answer for you. About whom do you wish to hear?", "lord_dtalk_ask_location_2",[]],

  [anyone|plyr|repeat_for_troops,"lord_dtalk_ask_location_2", [(store_repeat_object, ":troop_no"),
                                                              (neq, "$g_talk_troop", ":troop_no"),
                                                              (is_between, ":troop_no", active_npcs_begin, kingdom_ladies_end),
															  (neq, ":troop_no", "trp_player"),
                                                              (this_or_next|troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_hero),
																(troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_lady),
                                                              (store_troop_faction, ":faction_no", ":troop_no"),
                                                              (eq, "$g_encountered_party_faction", ":faction_no"),
                                                              (str_store_troop_name, s1, ":troop_no"),
															  (try_begin),
																(faction_slot_eq, "$players_kingdom", slot_faction_marshall, ":troop_no"),
															    (str_store_string, s1, "@Our marshal, {s1}"),
															  (try_end),
															  
															  ],
   "{s1}", "lord_dtalk_ask_location_3",[(store_repeat_object, "$hero_requested_to_learn_location")]],

  [anyone|plyr,"lord_dtalk_ask_location_2", [
     (neg|is_between, "$g_talk_troop", kingdom_ladies_begin, kingdom_ladies_end),
  ], "Never mind.", "lord_talk_menu",[]],

  [anyone,"lord_dtalk_ask_location_3",
   [
     (call_script, "script_update_troop_location_notes", "$hero_requested_to_learn_location", 1),
     (call_script, "script_get_information_about_troops_position", "$hero_requested_to_learn_location", 0),
     ],
   "{s1}", "lord_talk_menu",[]],
  ## builders code end
  [anyone|plyr,"lord_talk", [(le,"$talk_context", tc_party_encounter),
                             (faction_slot_eq, "$g_talk_troop_faction", slot_faction_leader, "$g_talk_troop"),
                             (eq, "$players_kingdom", "$g_talk_troop_faction"),
                             (eq, "$player_has_homage", 0),
                             (store_partner_quest, ":lords_quest"),
                             (neq, ":lords_quest", "qst_join_faction"),
                            ],
   "{s66}, I wish to become your sworn {man/woman} and fight for your honour.", "lord_ask_enter_service",[]],

  [anyone|plyr,"lord_talk", [(le,"$talk_context", tc_party_encounter),
                             (ge, "$g_talk_troop_faction_relation", 0),
                             #(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0),
                             (neg|troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0),
                             (faction_slot_eq, "$g_talk_troop_faction", slot_faction_leader, "$g_talk_troop"),
                             (eq, "$players_kingdom", "$g_talk_troop_faction"),
                             (eq, "$player_has_homage", 1),
                            ],
   "{s66}, I wish to be released from my oath to you.", "lord_ask_leave_service",[]],
 
builder of the gods said:
SCRIPT FINISHED and UPDATED (bugs will be token out if they appear don't worry)
all functions
1 waste your money :grin:
2 posion a lord for only 40 denars (do this before you attack his castle in a peace situation or something)
3 poison a lord for minimal 400 denars (no relation -1)
4 ask a location (nothing news)
5 tell a lord daughter you will marry her if she want it or not
6 go to the lord make him drunk and let him marry you his daughter
7 go to the hugars with the lord
8 when gone to the hugars chantage the lord to:
1 let you marry his daughter
2 give you money
3 join your faction (if you married his daughter you can threaten him to do that)
4 let him release his prisoners

module_game_menus.py
Code:
 [anyone|plyr,"lady_talk",
   [],
   "May I have the honor of knowing more about you, my lady?", "lady_relations",[]],	
 ## builders code  
   [anyone|plyr,"lady_talk",
   [],
   "I want you and im going to mary you nothing you can change about that!", "close_window",[
    (call_script, "script_get_kingdom_lady_social_determinants", "$g_talk_troop"),
	(assign, ":guardian", reg0),
	(str_store_troop_name, s10, "$g_talk_troop"),
	(str_store_troop_name, s12, ":guardian"),
    (setup_quest_text, "qst_formal_marriage_proposal"),
    (str_store_string, s2, "str_you_intend_to_ask_s12_to_pressure_s10_to_marry_you"),
	
    (quest_set_slot, "qst_formal_marriage_proposal", slot_quest_target_troop, ":guardian"),
    (quest_set_slot, "qst_formal_marriage_proposal", slot_quest_expiration_days, 30),
    (quest_set_slot, "qst_formal_marriage_proposal", slot_quest_current_state, 0),
	(call_script, "script_start_quest", "qst_formal_marriage_proposal", "$g_talk_troop"),
	(quest_set_slot, "qst_formal_marriage_proposal", slot_quest_giver_troop, "$g_talk_troop"), 
	]],
 ## builders code
  [anyone,"lady_relations",
   [
    (str_store_string, s12, "str_i_am"),
	(assign, ":relation_found", 0),
	(assign, ":in_castle_of_relative", 0),

module_dialogs.py
Code:
 [anyone|plyr,"lord_talk", [(le,"$talk_context", tc_party_encounter),
                             (ge, "$g_talk_troop_faction_relation", 0),
                             #(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0),
                             (neg|troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0),
                             (faction_slot_eq, "$g_talk_troop_faction", slot_faction_leader, "$g_talk_troop"),
                             (neq, "$players_kingdom", "$g_talk_troop_faction"),
                             (store_partner_quest, ":lords_quest"),
                             (neq, ":lords_quest", "qst_join_faction"),
                            ],
   "{s66}, I have come to offer you my sword in vassalage!", "lord_ask_enter_service",[]],
## builders dialog
  [anyone|plyr,"lord_talk", [(le,"$talk_context", tc_party_encounter),
	
                             #(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0),
                             (neg|troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0),
                            ],
   "{s66}, You need to do something for me and better do it!", "lord_ask_do",[]],
   [anyone,"lord_ask_do", [], "Who do you think you are threatening me!", "lord_askt",[]],
   [anyone|plyr,"lord_askt", [], "Never_mind", "lord_talk",[]],
   [anyone|plyr,"lord_askt", [], "Well i have prove that you, a married lord went to the hugars", "lord_chantage",[]],
   [anyone,"lord_chantage", [], "What do you want from me you bastard!", "lord_want",[]],
   [anyone|plyr,"lord_want", [], "I want money", "lord_want_money",[]],
   [anyone|plyr,"lord_want", [], "I want your duaghter to marry me", "lord_want_daughter",[]],
   [anyone|plyr,"lord_want", [], "I want your prisoners to be released", "lord_want_prisoners",[]],
   [anyone|plyr,"lord_want", [(ge, "$g_lord_daughter",0)], "I want you to join my faction", "lord_join_faction_no",[]],
   [anyone|plyr,"lord_want", [(ge, "$g_lord_daughter",1),], "I want you to join my faction, remember i can do with your daughter whatever i want", "lord_join_faction",[]],
   [anyone|plyr,"lord_want", [], "Never_mind", "lord_talk",[]],
   
   [anyone|plyr,"lord_join_faction_no", [], "you ask to much", "lord_want",[]],
   
   [anyone,"lord_join_faction",  
    [
      (troop_get_slot, ":recruitment_candidate", "$g_talk_troop", slot_lord_recruitment_candidate),
      (str_store_troop_name, s4, ":recruitment_candidate"),
      
      (try_begin),
        (eq, "$cheat_mode", 1),
        (display_message, "str_lord_pledges_to_s4"),
      (try_end),  
    ],
    "Very well -- I am ready to pledge myself to {s4} as my {reg4?queen:king}.", "lord_want",
    [
      (troop_get_slot, ":recruitment_candidate", "$g_talk_troop", slot_lord_recruitment_candidate),
      
      (try_begin),
        (eq, ":recruitment_candidate", "trp_player"),
        (faction_slot_eq, "fac_player_supporters_faction", slot_faction_state, sfs_inactive),
        (call_script, "script_activate_player_faction", "trp_player"),
      (try_end),
      
      (assign, "$lord_expects_fief", 0),
      (try_begin),
        (troop_slot_eq, "$g_talk_troop", slot_lord_recruitment_argument, argument_benefit),
        (assign, "$lord_expects_fief", 1),
      (try_end),
            
      (call_script, "script_change_troop_faction", "$g_talk_troop", "$players_kingdom"),
      
      (try_begin), #Actually, perhaps do provocation rather than war
        (store_relation, ":relation", "$players_kingdom", "$g_talk_troop_faction"), 
        (ge, ":relation", 0),
        
        (try_begin),
          (eq, "$cheat_mode", 1),
          (display_message, "str_lord_recruitment_provokes_home_faction"),
        (try_end),  
        
        (call_script, "script_add_log_entry", logent_border_incident_troop_suborns_lord, "trp_player", -1, "$g_talk_troop","$g_talk_troop_faction"),
        (store_add, ":slot_provocation_days", "$players_kingdom", slot_faction_provocation_days_with_factions_begin),
        (val_sub, ":slot_provocation_days", kingdoms_begin),
        (faction_set_slot, "$g_talk_troop_faction", ":slot_provocation_days", 30),
        
        (faction_get_slot, ":other_liege", "$g_talk_troop_faction", slot_faction_leader),
        (call_script, "script_troop_change_relation_with_troop", "trp_player", ":other_liege", -3),
      (try_end),
      
      (troop_get_type, reg4, ":recruitment_candidate"),
      (try_begin),
        (eq, ":recruitment_candidate", "trp_player"),
        (str_store_string, s4, "@you"),
		(call_script, "script_change_player_right_to_rule", 5),
      (else_try),
        (str_store_troop_name, s4, ":recruitment_candidate"),
      (try_end),		
	]],
   
   [anyone,"lord_want", [], "They will be!", "lord_want",[(store_num_regular_prisoners,":lprisoners","$g_talk_troop"),(party_remove_prisoners,"$g_talk_troop_party",":lprisoners")]],
   
   [anyone,"lord_want_daughter", [(quest_get_slot, ":bride", "qst_formal_marriage_proposal", slot_quest_giver_troop),(neg|troop_slot_eq, "$g_talk_troop", slot_lord_reputation_type, lrep_debauched),(neg|troop_slot_eq, "$g_talk_troop", slot_lord_reputation_type, lrep_selfrighteous),(neg|troop_slot_eq, "$g_talk_troop", slot_lord_reputation_type, lrep_quarrelsome)], "You swine, i have no chose to accept this", "drunk_mariage",[(assign, "$g_lord_daughter", 1)]],
   [anyone,"lord_want_daughter", [], "It goes to far choose something else!", "lord_want",[]],
   
   [anyone,"lord_want_money", [], "Sigh, i can do nothing else than give it to you", "lord_want_money2",[]],
   
   [anyone|plyr,"lord_want_money2", [], "Never_mind", "lord_want",[]],
   [anyone|plyr,"lord_want_money2", [(store_troop_gold,":total_money","$g_talk_troop"),(gt, ":total_money",20),(le, ":total_money",35)], "Thats nice i want 20 denars!", "lord_want",[(troop_add_gold,"trp_player",20),(troop_remove_gold,"$g_talk_troop",20),(call_script, "script_troop_change_relation_with_troop", "$g_talk_troop", "trp_player", -1)]],
   [anyone|plyr,"lord_want_money2", [(store_troop_gold,":total_money","$g_talk_troop"),(gt, ":total_money",35),(le, ":total_money",65)], "Thats nice i want 35 denars!", "lord_want",[(troop_add_gold,"trp_player",35),(troop_remove_gold,"$g_talk_troop",35),(call_script, "script_troop_change_relation_with_troop", "$g_talk_troop", "trp_player", -1)]],
   [anyone|plyr,"lord_want_money2", [(store_troop_gold,":total_money","$g_talk_troop"),(gt, ":total_money",65),(le, ":total_money",200)], "Thats nice i want 65 denars!", "lord_want",[(troop_add_gold,"trp_player",65),(troop_remove_gold,"$g_talk_troop",65),(call_script, "script_troop_change_relation_with_troop", "$g_talk_troop", "trp_player", -1)]],
   [anyone|plyr,"lord_want_money2", [(store_troop_gold,":total_money","$g_talk_troop"),(gt, ":total_money",200),(le, ":total_money",500)], "Thats nice i want 200 denars!", "lord_want",[(troop_add_gold,"trp_player",200),(troop_remove_gold,"$g_talk_troop",200),(call_script, "script_troop_change_relation_with_troop", "$g_talk_troop", "trp_player", -2)]],
   [anyone|plyr,"lord_want_money2", [(store_troop_gold,":total_money","$g_talk_troop"),(gt, ":total_money",500)], "Thats nice i want 500 denars!", "lord_want",[(troop_add_gold,"trp_player",500),(troop_remove_gold,"$g_talk_troop",500),(call_script, "script_troop_change_relation_with_troop", "$g_talk_troop", "trp_player", -3)]],
   
    [anyone|plyr,"lord_talk", [(le,"$talk_context", tc_party_encounter),
	
                             #(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0),
                             (neg|troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0),
                            ],
   "{s66}, Would you like to drink something together?", "lord_ask_drinking",[]],
   [anyone,"lord_ask_drinking", [(ge, "$g_talk_troop_relation", -10)], "I would like to drink something together!", "lord_drink",[]],
   [anyone|plyr,"lord_drink", [(store_troop_gold,":total_money","trp_player"),(gt, ":total_money",20)], "Thats nice i bought us 2 beer in the street only costed me 20 denars with 1% alcohol!", "lord_ask_drinking_2",[(assign, "$g_lord_drink", 0),(val_add, "$g_lord_drink", 1),(troop_remove_gold,"trp_player",20)]],
   [anyone|plyr,"lord_drink", [(store_troop_gold,":total_money","trp_player"),(gt, ":total_money",35)], "Thats nice i bought us 2 wines in the street only costed me 35 denars with 2% alcohol!", "lord_ask_drinking_2",[(assign, "$g_lord_drink", 0),(val_add, "$g_lord_drink", 2),(troop_remove_gold,"trp_player",35)]],
   [anyone|plyr,"lord_drink", [(store_troop_gold,":total_money","trp_player"),(gt, ":total_money",65)], "Thats nice i bought us 2 whiskeys in the street only costed me 65 denars with 4% alcohol!", "lord_ask_drinking_2",[(assign, "$g_lord_drink", 0),(val_add, "$g_lord_drink", 4),(troop_remove_gold,"trp_player",65)]],
   [anyone|plyr,"lord_drink", [(store_troop_gold,":total_money","trp_player"),(gt, ":total_money",200)], "Thats nice i bought us 2 royal beers by a speciales brewer in the rodok empire costed me 200 denars with 10% alcohol!", "lord_ask_drinking_2",[(assign, "$g_lord_drink", 0),(val_add, "$g_lord_drink", 10),(troop_remove_gold,"trp_player",200)]],
   [anyone|plyr,"lord_drink", [(store_troop_gold,":total_money","trp_player"),(gt, ":total_money",500)], "Thats nice i bought us 2 royal wines by a special brewer in the swadian empire costed me 500 denars with 25% alcohol!", "lord_ask_drinking_2",[(assign, "$g_lord_drink", 0),(val_add, "$g_lord_drink", 25),(troop_remove_gold,"trp_player",500)]],
   [anyone|plyr,"lord_drink", [(store_troop_gold,":total_money","trp_player"),(gt, ":total_money",40),(party_get_skill_level, ":assassination", "p_main_party", skl_assassination),(ge, ":assassination", 3),], "Thats nice i bought us 2 wines in the street only costed me 35 denars with 2% alcohol! (what he doesn't now is that is poisoned it)", "lord_poisoned",[(assign, "$g_lord_drink", 0),(val_add, "$g_lord_drink", 2),(troop_remove_gold,"trp_player",40),(troop_set_health, "$g_talk_troop", 1),(call_script, "script_troop_change_relation_with_troop", "$g_talk_troop", "trp_player", -1)]],
  
   [anyone,"lord_poisoned", [], "What happens to me? was it poisoned? this was your fault!", "close_window",[]],
  
   [anyone,"lord_ask_drinking_2", [], "I would like to drink another round!", "lord_drink_2",[]], 
   
   [anyone|plyr,"lord_drink_2", [(store_troop_gold,":total_money","trp_player"),(gt, ":total_money",20)], "Thats nice i bought us 2 beer in the street only costed me 20 denars with 1% alcohol!", "lord_ask_drinking_3",[(val_add, "$g_lord_drink", 1),(troop_remove_gold,"trp_player",20)]],
   [anyone|plyr,"lord_drink_2", [(store_troop_gold,":total_money","trp_player"),(gt, ":total_money",35)], "Thats nice i bought us 2 wines in the street only costed me 35 denars with 2% alcohol!", "lord_ask_drinking_3",[(val_add, "$g_lord_drink", 2),(troop_remove_gold,"trp_player",35)]],
   [anyone|plyr,"lord_drink_2", [(store_troop_gold,":total_money","trp_player"),(gt, ":total_money",65)], "Thats nice i bought us 2 whiskeys in the street only costed me 65 denars with 4% alcohol!", "lord_ask_drinking_3",[(val_add, "$g_lord_drink", 4),(troop_remove_gold,"trp_player",65)]],
   [anyone|plyr,"lord_drink_2", [(store_troop_gold,":total_money","trp_player"),(gt, ":total_money",200)], "Thats nice i bought us 2 royal beers by a speciales brewer in the rodok empire costed me 200 denars with 10% alcohol!", "lord_ask_drinking_3",[(val_add, "$g_lord_drink", 10),(troop_remove_gold,"trp_player",200)]],
   [anyone|plyr,"lord_drink_2", [(store_troop_gold,":total_money","trp_player"),(gt, ":total_money",500)], "Thats nice i bought us 2 royal wines by a special brewer in the swadian empire costed me 500 denars with 25% alcohol!", "lord_ask_drinking_3",[(val_add, "$g_lord_drink", 25),(troop_remove_gold,"trp_player",500)]],
   [anyone|plyr,"lord_drink_2", [(store_troop_gold,":total_money","trp_player"),(gt, ":total_money",40),(party_get_skill_level, ":assassination", "p_main_party", skl_assassination),(ge, ":assassination", 3),], "Thats nice i bought us 2 wines in the street only costed me 35 denars with 2% alcohol! (what he doesn't now is that is poisoned it)", "lord_poisoned",[(assign, "$g_lord_drink", 0),(val_add, "$g_lord_drink", 2),(troop_remove_gold,"trp_player",40),(troop_set_health, "$g_talk_troop", 1),(call_script, "script_troop_change_relation_with_troop", "$g_talk_troop", "trp_player", -1)]],
  
   [anyone,"lord_ask_drinking_3", [], "I would like to drink another round!", "lord_drink_3",[]], 
   
   [anyone|plyr,"lord_drink_3", [(store_troop_gold,":total_money","trp_player"),(gt, ":total_money",20)], "Thats nice i bought us 2 beer in the street only costed me 20 denars with 1% alcohol!", "lord_talk_pol",[(val_add, "$g_lord_drink", 1),(troop_remove_gold,"trp_player",20)]],
   [anyone|plyr,"lord_drink_3", [(store_troop_gold,":total_money","trp_player"),(gt, ":total_money",35)], "Thats nice i bought us 2 wines in the street only costed me 35 denars with 2% alcohol!", "lord_talk_pol",[(val_add, "$g_lord_drink", 2),(troop_remove_gold,"trp_player",35)]],
   [anyone|plyr,"lord_drink_3", [(store_troop_gold,":total_money","trp_player"),(gt, ":total_money",65)], "Thats nice i bought us 2 whiskeys in the street only costed me 65 denars with 4% alcohol!", "lord_talk_pol",[(val_add, "$g_lord_drink", 4),(troop_remove_gold,"trp_player",65)]],
   [anyone|plyr,"lord_drink_3", [(store_troop_gold,":total_money","trp_player"),(gt, ":total_money",200)], "Thats nice i bought us 2 royal beers by a speciales brewer in the rodok empire costed me 200 denars with 10% alcohol!", "lord_talk_pol",[(val_add, "$g_lord_drink", 10),(troop_remove_gold,"trp_player",200)]],
   [anyone|plyr,"lord_drink_3", [(store_troop_gold,":total_money","trp_player"),(gt, ":total_money",500)], "Thats nice i bought us 2 royal wines by a special brewer in the swadian empire costed me 500 denars with 25% alcohol!", "lord_talk_pol",[(val_add, "$g_lord_drink", 25),(troop_remove_gold,"trp_player",500)]],
   [anyone|plyr,"lord_drink_3", [(store_troop_gold,":total_money","trp_player"),(gt, ":total_money",40),(party_get_skill_level, ":assassination", "p_main_party", skl_assassination),(ge, ":assassination", 3),], "Thats nice i bought us 2 wines in the street only costed me 35 denars with 2% alcohol! (what he doesn't now is that is poisoned it)", "lord_poisoned",[(assign, "$g_lord_drink", 0),(val_add, "$g_lord_drink", 2),(troop_remove_gold,"trp_player",40),(troop_set_health, "$g_talk_troop", 1),(call_script, "script_troop_change_relation_with_troop", "$g_talk_troop", "trp_player", -1)]],
  
   [anyone,"lord_talk_pol", [(le, "$g_lord_drink",11)], "Good stuff!", "lord_ask",[]],
   [anyone,"lord_talk_pol", [(ge, "$g_lord_drink",12)], "Hik Good stuf, every thing turns!!!", "lord_ask",[]],
   
   [anyone|plyr,"lord_ask", [(le, "$g_lord_drink",11)], "It was fun goodbye!", "close_window",[(call_script, "script_troop_change_relation_with_troop", "$g_talk_troop", "trp_player", 1),(store_sub, ":num_hours", 2),(rest_for_hours, ":num_hours", 5, 0),(assign, "$g_lord_drink", 0)]],
   [anyone|plyr,"lord_ask", [(ge, "$g_lord_drink",12)], "It was fun goodbye!", "close_window",[(call_script, "script_troop_change_relation_with_troop", "$g_talk_troop", "trp_player", 2),(store_sub, ":num_hours", 4),(rest_for_hours, ":num_hours", 5, 0),(assign, "$g_lord_drink", 0)]],
   [anyone|plyr,"lord_ask", [], "I think it is time to talk", "lord_talk_stuff",[]],
   
   [anyone,"lord_talk_stuff", [(le, "$g_lord_drink",11)], "Ok lets talk!", "lord_talk_menu",[]],
   [anyone,"lord_talk_stuff", [(ge, "$g_lord_drink",12)], "Hik what talk??", "lord_talk_menu",[]],
   
   [anyone|plyr,"lord_talk_menu", [], "I want to know the location of someone.", "lord_dtalk_ask_location",[]],
   [anyone|plyr,"lord_talk_menu", [(eq, "$g_lord_daughter",0)], "I want to know if you have a daughter i can have pleasure with?.", "lord_ask_daughter",[]],
   [anyone|plyr,"lord_talk_menu", [(le, "$g_lord_drink",11)], "It was fun goodbye!", "close_window",[(call_script, "script_troop_change_relation_with_troop", "$g_talk_troop", "trp_player", 1),(store_sub, ":num_hours", 2),(rest_for_hours, ":num_hours", 5, 0),(assign, "$g_dno_outside", 0),(assign, "$g_lord_daughter", 0),(assign, "$g_lord_drink", 0)]],
   [anyone|plyr,"lord_talk_menu", [(ge, "$g_lord_drink",12)], "It was fun goodbye!", "close_window",[(call_script, "script_troop_change_relation_with_troop", "$g_talk_troop", "trp_player", 2),(store_sub, ":num_hours", 4),(rest_for_hours, ":num_hours", 5, 0),(assign, "$g_dno_outside", 0),(assign, "$g_lord_daughter", 0),(assign, "$g_lord_drink", 0)]],
   [anyone|plyr,"lord_talk_menu", [(eq, "$g_dno_outside",0)], "Lets go walk a mile or what.", "lord_outside",[]],
   [anyone|plyr,"lord_talk_menu", [(eq, "$g_facked_hugars",0)], "Lets go have somes pleasure with the hugars.", "lord_hugars",[]],
   
   [anyone,"lord_hugars", [(le, "$g_lord_drink",30)], "Hik i have a wife you bastard hik", "lord_talk_menu",[(assign, "$g_hug_outside", 1),(call_script, "script_troop_change_relation_with_troop", "$g_talk_troop", "trp_player", -1)]],
   [anyone,"lord_hugars", [(ge, "$g_lord_drink",30)], "Hik ok hik time for pleasure", "lord_hugar",[]],
   
   [anyone|plyr,"lord_hugar", [(store_troop_gold,":total_money","trp_player"),(ge, ":total_money",50)], "I got some nice women for you costed me 50 denars", "lord_hugar2",[]],
   [anyone,"lord_hugar2", [(ge, "$g_lord_drink",30)], "Hik ok hik lets go and visit this girls", "lord_hugar3",[(store_sub, ":num_hours", 4),(rest_for_hours, ":num_hours", 5, 0)]],
   
   [anyone,"lord_hugar3", [(ge, "$g_lord_drink",30)], "Hik oh that was nice", "lord_hugar4",[]],
   
   [anyone,"lord_hugar4", [], "It certaintly was (and i have a perfect way to chantage you now)", "lord_talk_menu",[(assign, "$g_facked_hugars", 1)]],
	
   [anyone,"lord_outside", [(ge, "$g_lord_drink",5)], "Indeed a good plan my friend i will call my gaurds", "lord_outside2",[]],
   [anyone,"lord_outside", [(lt, "$g_lord_drink",5)], "Sorry i am to busy for that", "lord_talk_menu",[(assign, "$g_dno_outside", 1)]],
   
   [anyone|plyr,"lord_outside2", [], "No dont call your gaurds i want to be alone with you", "lord_outside3",[]],
   
   [anyone,"lord_outside3", [(ge, "$g_lord_drink",20)], "What you want", "lord_outside_ng",[]],
   [anyone,"lord_outside3", [(lt, "$g_lord_drink",20)], "Sorry it is needed for our safety", "lord_outside_wg",[]],
   
   [anyone,"lord_outside_wg", [(lt, "$g_lord_drink",20)], "Doesn't matters then we dont have to go outside", "lord_talk_menu",[(assign, "$g_dno_outside", 1)]],
   
   [anyone,"lord_outside_ng", [(ge, "$g_lord_drink",20)], "What do you want to do?", "lord_outside_talk",[]],
   
   [anyone|plyr,"lord_outside_talk", [], "Never mind lets go back", "lord_talk_menu",[]],
   [anyone|plyr,"lord_outside_talk", [(ge, "$g_lord_drink",25)], "Try to eat this its wonderful (i poisoned it)", "lord_talk_eat",[]],
   
   [anyone|plyr,"lord_talk_eat", [], "I get an enormous headache i think i drunk to much.", "lord_talk_menu",[(troop_set_health, "$g_talk_troop", 1)]],
   
   [anyone,"lord_ask_daughter", [(le, "$g_lord_drink",30)], "Hik lets talk another time when im not drunk", "lord_talk_menu",[(assign, "$g_lord_daughter", 1)]],
   [anyone,"lord_ask_daughter", [(ge, "$g_lord_drink",30)], "Hik what? Hik", "lord_get_daughter",[]],
   
   [anyone|plyr,"lord_get_daughter", [], "I want to know if i can marry your daughter?.", "lord_ask_daughter_marry",[]],

   [anyone,"lord_ask_daughter_marry", [(ge, "$g_lord_drink",30),(quest_get_slot, ":bride", "qst_formal_marriage_proposal", slot_quest_giver_troop)], "Hik alright Hik", "drunk_mariage",[(assign, "$g_lord_daughter", 1)]],
   
  [anyone,"drunk_mariage", [
  (quest_get_slot, ":bride", "qst_formal_marriage_proposal", slot_quest_giver_troop),
  (call_script, "script_get_kingdom_lady_social_determinants", ":bride"),
  (assign, ":venue", reg1),
  (is_between, ":venue", walled_centers_begin, walled_centers_end),
  (party_slot_eq, ":venue", slot_village_state, svs_normal),
  (str_store_party_name, s24, ":venue"),
  ],
   "Splendid! You two may now consider yourselves offically betrothed. Very well -- I shall plan to hold a great feast in {s24}, as soon as circumstances permit. We will be sure to notify you when the day comes.", "lord_talk_menu",
   [
   (quest_get_slot, ":bride", "qst_formal_marriage_proposal", slot_quest_giver_troop),
   (troop_set_slot, "trp_player", slot_troop_betrothed, ":bride"), 
   (troop_set_slot, ":bride", slot_troop_betrothed, "trp_player"), 

   (call_script, "script_end_quest", "qst_formal_marriage_proposal"),


   (troop_remove_gold, "trp_player", "$marriage_dower"),
   (call_script, "script_get_kingdom_lady_social_determinants", ":bride"),
   (assign, ":venue", reg1),

   (str_store_troop_name, s3, ":bride"),
   (str_store_troop_name, s4, "$g_talk_troop"),
   (str_store_party_name, s5, ":venue"),
   
   (setup_quest_text, "qst_wed_betrothed"),
   (str_store_string, s2, "str_you_plan_to_marry_s3_at_a_feast_hosted_by_s4_in_s5_you_should_be_notifed_of_the_feast_as_soon_as_it_is_held"),

   (call_script, "script_start_quest", "qst_wed_betrothed", "$g_talk_troop"),

   (quest_set_slot, "qst_wed_betrothed", slot_quest_expiration_days, 365),
   (quest_set_slot, "qst_wed_betrothed", slot_quest_giver_troop, "$g_talk_troop"),
   (quest_set_slot, "qst_wed_betrothed", slot_quest_target_troop, ":bride"),

   (try_begin),
		(eq,"$talk_context",tc_party_encounter),   
		(assign, "$g_leave_encounter", 1),
   (try_end),
   
   ]],
   
   
   [anyone,"lord_dtalk_ask_location", [],
   "Very well, I may or may not have an answer for you. About whom do you wish to hear?", "lord_dtalk_ask_location_2",[]],

  [anyone|plyr|repeat_for_troops,"lord_dtalk_ask_location_2", [(store_repeat_object, ":troop_no"),
                                                              (neq, "$g_talk_troop", ":troop_no"),
                                                              (is_between, ":troop_no", active_npcs_begin, kingdom_ladies_end),
															  (neq, ":troop_no", "trp_player"),
                                                              (this_or_next|troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_hero),
																(troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_lady),
                                                              (store_troop_faction, ":faction_no", ":troop_no"),
                                                              (eq, "$g_encountered_party_faction", ":faction_no"),
                                                              (str_store_troop_name, s1, ":troop_no"),
															  (try_begin),
																(faction_slot_eq, "$players_kingdom", slot_faction_marshall, ":troop_no"),
															    (str_store_string, s1, "@Our marshal, {s1}"),
															  (try_end),
															  
															  ],
   "{s1}", "lord_dtalk_ask_location_3",[(store_repeat_object, "$hero_requested_to_learn_location")]],

  [anyone|plyr,"lord_dtalk_ask_location_2", [
     (neg|is_between, "$g_talk_troop", kingdom_ladies_begin, kingdom_ladies_end),
  ], "Never mind.", "lord_talk_menu",[]],

  [anyone,"lord_dtalk_ask_location_3",
   [
     (call_script, "script_update_troop_location_notes", "$hero_requested_to_learn_location", 1),
     (call_script, "script_get_information_about_troops_position", "$hero_requested_to_learn_location", 0),
     ],
   "{s1}", "lord_talk_menu",[]],
  ## builders code end
  [anyone|plyr,"lord_talk", [(le,"$talk_context", tc_party_encounter),
                             (faction_slot_eq, "$g_talk_troop_faction", slot_faction_leader, "$g_talk_troop"),
                             (eq, "$players_kingdom", "$g_talk_troop_faction"),
                             (eq, "$player_has_homage", 0),
                             (store_partner_quest, ":lords_quest"),
                             (neq, ":lords_quest", "qst_join_faction"),
                            ],
   "{s66}, I wish to become your sworn {man/woman} and fight for your honour.", "lord_ask_enter_service",[]],

  [anyone|plyr,"lord_talk", [(le,"$talk_context", tc_party_encounter),
                             (ge, "$g_talk_troop_faction_relation", 0),
                             #(troop_slot_eq, "$g_talk_troop", slot_troop_is_prisoner, 0),
                             (neg|troop_slot_ge, "$g_talk_troop", slot_troop_prisoner_of_party, 0),
                             (faction_slot_eq, "$g_talk_troop_faction", slot_faction_leader, "$g_talk_troop"),
                             (eq, "$players_kingdom", "$g_talk_troop_faction"),
                             (eq, "$player_has_homage", 1),
                            ],
   "{s66}, I wish to be released from my oath to you.", "lord_ask_leave_service",[]],
 
Greek fire with area damage (particles still wip but it is a import part)
you throw greek fire (with oil mesh maybe will be replaced)
and you get a explosion of fire (still wip the looking)


all in module_items.py

Code:
["greek_fire", "Greek Fire", [("oil",0)], itp_type_thrown|itp_can_penetrate_shield|itp_bonus_against_shield|itp_crush_through|itp_can_knock_down|itp_primary ,itcf_throw_knife, 1000 , weight(3.5)|difficulty(0)|spd_rtng(102) | shoot_speed(25) | thrust_damage(64 ,  cut)|max_ammo(4)|weapon_length(0),imodbits_missile,	
[(ti_on_missile_hit, # when missile hits 
   [(get_player_agent_no, ":player_agent"), # store player in :player_agent
    (agent_get_team,":player_team", ":player_agent"), # store player team 
    (agent_get_position,pos2,":player_agent"), # store shooting position pos1
    (try_for_agents,":agent"), # search all agents
      (agent_is_alive,":agent"), # exclude dead agents
      (agent_is_human,":agent"),  # exclude not human agents (for more race mod)
      (get_player_agent_no, ":player_agent"),        
      (agent_is_human,":agent"), 
      (neq,":agent",":player_agent"),
      (neg|agent_is_ally,":agent"),
      (agent_get_position,pos3,":agent"), # store missile_hit position pos2
      (get_distance_between_positions,":dist",pos1,pos3), #store distance shooter and troop_got_hit
      (lt,":dist",1500), # before working hit should be before 1500 meters distance
	  (particle_system_burst, "psys_torch_fire", pos1, 100),
      (agent_play_sound,":agent","snd_man_die"), # play sound dieing man
      (store_agent_hit_points, ":cur_hit_points",":agent",1), # store hit points from remaining agents
      (val_sub,":cur_hit_points",25), # substract 25 hit points
      (agent_set_hit_points,":agent",":cur_hit_points",1), # set hit points to 1
      (agent_deliver_damage_to_agent,":player_agent",":agent"), # deliver damage so troop dies
    (try_end),
   ])]],

Credits for unmodified code about melee area damage: killkhergit
making a better particle system (STILL WIP) but already bettered MUCH
replace in module_particle_systems
Code:
    ("torch_fire", psf_billboard_3d|psf_global_emit_dir|psf_always_emit|psf_randomize_size|psf_randomize_rotation, "prt_mesh_fire_1",
     50, 0.35, 0.2, 0.03, 10.0, 0.0,     #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
     (0.5, 0.8), (1, 0),        #alpha keys
     (0.5, 1.0), (1, 0.9),      #red keys
     (0.5, 0.7),(1, 0.3),       #green keys
     (0.5, 0.2), (1, 0.0),      #blue keys
     (0, 0.15),   (0.4, 0.3),   #scale keys
     (0.04, 0.04, 0.01),      #emit box size
     (0, 0, 0.5),               #emit velocity
     0.0,                       #emit dir randomness
     200,                       #rotation speed
     0.5                        #rotation damping
    ),

with
Code:
    ("torch_fire", psf_billboard_3d|psf_global_emit_dir|psf_always_emit|psf_randomize_size|psf_randomize_rotation, "prt_mesh_fire_1",
     500, 0.3, 0.2, 0.03, 5.0, 0.0,     #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
     (0.5, 0.8), (1, 0),        #alpha keys
     (0.5, 1.0), (1, 0.9),      #red keys
     (1, 1),(1, 1),       #green keys
     (0.5, 0.2), (1, 0.0),      #blue keys
     (0, 0.9),   (0.4, 0.9),   #scale keys
     (1, 1, 1),      #emit box size
     (0, 0, 0.4),               #emit velocity
     0.0,                       #emit dir randomness
     200,                       #rotation speed
     0.5                        #rotation damping
    ),

WIP is making the particle system do a whole place not only the positions of targets
UPDATED!!!!
 
1 This code is based on hookieT his mission template of a troop

story: I am currently working on a better sieges modding pack with: greek fire, refill ammo, repair shield, drawbridge etc
greek fire is done and i was working at refill ammo
i first searched some existing code and fount one of hookiet and one of dvader
dvader one was mulitplayer and was for throwing an item what would cost one inventory slot,  i didn't want to work on that
Hookiet was based on a mission template and specific on using a troop i used this as a base

Okay nice but what have you done
i added a scene prop, and set the scene prop to defending team added some options etc

Okay nice all this stuff can you tell me what it does then?
If you are defending in a siege and you are close to a scene prop called ammo_pack every 5 seconds your ammo is restored

What makes this different?
It doesnt depent on an inventory slot or a troop so it is more realistic and works better with a bigger defense bonus

TIME FOR THE CODE
in module_scene_props.py
Code:
  ("box_a_dynamic",sokf_moveable|sokf_dynamic_physics,"box_a","bo_box_a", []),
  # builders refill ammo
  ("ammo_pack",sokf_moveable|sokf_dynamic_physics,"box_a","bo_box_a", []),
  # builders refill ammo
 ("desert_field",0,"desert_field","bo_desert_field", []),

in module_mission_templates
Code:
common_arena_fight_tab_press = (
  ti_tab_pressed, 0, 0, [],
  [
    (question_box,"str_give_up_fight"),
    ])
	# builders refill
common_agent_refill_ammo_trigger = (
	5, 0, 0,	# check every 5 seconds
		[],
		[
			#(display_message, "@running common_agent_refill_ammo_trigger"),	#debug
			(get_player_agent_no, ":player_agent"), # store player agent
			(assign, ":player_agent_refilled", 0), # set not yet refilled
			(scene_prop_get_num_instances, ":max", "spr_ammo_pack"),
			(scene_prop_set_team, "spr_ammo_pack", 0),
			(scene_prop_get_team, "$g_defender_team", "spr_ammo_pack"),
		    (try_for_range, ":prop", 0, ":max"),
		        (scene_prop_get_instance, ":instance", "spr_ammo_pack", ":prop"),
			        (prop_instance_get_position, pos1, ":instance"),
				(try_for_agents, ":chosen"),
					(agent_is_alive, ":chosen"),	#so we don't try dead agents
					(agent_is_human,":chosen"),	#agent is a human	
					(agent_get_team  ,":chosen_team", ":chosen"),
					(eq, "$g_defender_team", ":chosen_team"), ### NOT FINISHED GO TO GAME MENU ENCOUNTER ATTACK AND CHECK A DEFENDING VARIABLE
					(agent_get_position, pos2, ":chosen"),
					(get_distance_between_positions,":dist",pos1,pos2),
					(lt,":dist",3000),	#SW - how close they have to be to refill ammo
					(agent_refill_ammo, ":chosen"),
					(eq, ":chosen",":player_agent"),
					(assign, ":player_agent_refilled", 1),
				(try_end),
			(try_end),
			(try_begin),
				(eq, ":player_agent_refilled", 1),
				(display_message, "@You picked up new ammo!"),
			(try_end),
		])
 # builders refill
common_custom_battle_tab_press = (
  ti_tab_pressed, 0, 0, [],
  [
    (try_begin),
      (neq, "$g_battle_result", 0),
      (call_script, "script_custom_battle_end"),
      (finish_mission),
    (else_try),
      (question_box,"str_give_up_fight"),
      (try_end),
    ])

then add the common to every siege
DONE!
 
From another thread:

Code for making AI jump over kicks (only adapted for duels with lords currently)

Add this trigger to duel_with_lord mission template or whatever it's called (there are two, make sure you use the "new" one - there is a developer comment on the deprecated code.)

Code:
	(0, 0.3, 1.3, [ #The delay and re-arm are very important and maybe not yet perfect. Too fast a re-arm and the player can spam kick key causing AI to fly higher and higher. Too long or short a delay and the AI will mis-time the jump
	(game_key_clicked, gk_kick),
		],
		[
		(get_player_agent_no,":player"),
	(try_for_agents, ":agent"),
			(neq, ":agent", ":player"),
			(agent_is_alive, ":agent"),
			(agent_is_human, ":agent"),
			(agent_is_active, ":agent"),
			(agent_get_position, pos1, ":player"),
			(agent_get_position, pos2, ":agent"),
			(get_distance_between_positions, ":dist", pos1, pos2),
		(try_begin), 
			(lt, ":dist", 150),
			 (agent_set_no_dynamics, ":agent", 1), #Dynamics off - allows moving of agent on z-axis with agent_set_position
			 (agent_set_animation, ":agent", "anim_jump", 0),
			 (position_move_z, pos2, 100), #move up 100cm
			 (agent_set_position, ":agent", pos2),
                (try_end),
			(agent_set_no_dynamics, ":agent", 0), #Dynamics back on
	  (try_end),
		]),

The jump is currently a bit disjointed, AI are snapped into the air instantly 1 meter. It is smoother maybe to use a separate trigger firing on 0.1 interval that checks for non-player agents in jump animation (agent_get_animation) then moves them up by a small increment (10 or 20 cm at a time.) Be careful if you adapt this code for use during proper battles, running too many triggers that check all agents can be taxing in large battles.
 
Working troy fire balls

inspiration

images


IT al works just one little problem i aint got no model for it anybody who has an idea better than using a FACKING BOX please pm me its very important to get a good model for this

But well atleast the code is all fine this works as a scene prop with gravity (rolls of hill)
and when shot it explodes also explodes when very close to enemy agent

at the moment the defenders and player ar not affected in code i told how to change that.
have fun with it!

module_scene_props
("fire_ball",sokf_destructible|sokf_moveable|sokf_dynamic_physics|spr_hit_points(1),"box_a","bo_box_a",
  [ # mesh not right yet
  (ti_on_init_scene_prop,
    [
(store_trigger_param_1, ":instance_no"),
(scene_prop_set_hit_points, ":instance_no", 1),
    ]),

  (ti_on_scene_prop_hit,
    [
      (store_trigger_param_1, ":instance_no"),     
      (store_trigger_param_2, ":damage"),
     
      (try_begin),
        (scene_prop_get_hit_points, ":hit_points", ":instance_no"),
        (val_sub, ":hit_points", ":damage"),
        (gt, ":hit_points", 0),
        (play_sound, "snd_dummy_hit"),
      (else_try),
        (neg|multiplayer_is_server),
        (play_sound, "snd_dummy_destroyed"),
      (try_end),

      (try_begin),
        (this_or_next|multiplayer_is_server),
(neg|game_in_multiplayer_mode),

        (particle_system_burst, "psys_dummy_smoke", pos1, 3),
        (particle_system_burst, "psys_dummy_straw", pos1, 10),
      (try_end),     
    ]),
   
  (ti_on_scene_prop_destroy,
    [
      (play_sound, "snd_dummy_destroyed"),
     
      (assign, ":rotate_side", 86),
     
      (try_begin),
        (this_or_next|multiplayer_is_server),
(neg|game_in_multiplayer_mode),

        (store_trigger_param_1, ":instance_no"),     
        (store_trigger_param_2, ":attacker_agent_no"),

        (set_fixed_point_multiplier, 100),
        (prop_instance_get_position, pos1, ":instance_no"),

        (try_begin),
          (ge, ":attacker_agent_no", 0),
          (agent_get_position, pos2, ":attacker_agent_no"),
          (try_begin),
            (position_is_behind_position, pos2, pos1),
            (val_mul, ":rotate_side", -1),
          (try_end),
        (try_end),
     
        (init_position, pos3),

        (try_begin),
          (ge, ":rotate_side", 0),
          (position_move_y, pos3, -100),
        (else_try),
          (position_move_y, pos3, 100),
        (try_end),
     
        (position_move_x, pos3, -50),
        (position_transform_position_to_parent, pos4, pos1, pos3),
        (position_move_z, pos4, 100),
        (position_get_distance_to_ground_level, ":height_to_terrain", pos4),
        (val_sub, ":height_to_terrain", 100),
        (assign, ":z_difference", ":height_to_terrain"),
        (val_div, ":z_difference", 3),

        (try_begin),
          (ge, ":rotate_side", 0),
          (val_add, ":rotate_side", ":z_difference"),
        (else_try),
          (val_sub, ":rotate_side", ":z_difference"),
        (try_end),

        (position_rotate_x, pos1, ":rotate_side"),
(particle_system_burst, "psys_greek_fire", pos1, 10000),
    (try_for_agents,":agent"), # search all agents
(agent_is_alive,":agent"), # exclude dead agents
#(agent_is_human,":agent"),  # exclude not human agents (for race mods)
(get_player_agent_no, ":player_agent"),       
(neq,":agent",":player_agent"), # exclude player comment out if not wanted
            (agent_get_team, ":agent_team", ":agent"),
(this_or_next|neq, ":agent_team", "$defender_team"), # exclude defenders
(neq, ":agent_team", "$defender_team_2"), # exclude defenders 2
(agent_get_position,pos7,":agent"), # store agents position pos7
(get_distance_between_positions,":dist",pos1,pos7), #store distance troop and prop
(lt,":dist",500), # before working hit should be before 500 meters distance
(agent_play_sound,":agent","snd_man_die"), # play sound dieing man
(store_agent_hit_points, ":cur_hit_points",":agent",1), # store hit points from remaining agents
(val_sub,":cur_hit_points",25), # substract 25 hit points
(agent_set_hit_points,":agent",":cur_hit_points",1), # set hit points to 1

(agent_deliver_damage_to_agent,":player_agent",":agent",150), # deliver damage so troop dies
(try_end),
        (prop_instance_animate_to_position, ":instance_no", pos1, 70), #animate to position 1 in 0.7 second
      (try_end),
    ]),
  ]),

module_mission_templates (imp add common in every template you want it to work)
common_check_fire_ball_hit = (
0, 0, 0, [],
  [
      (try_for_agents,":agent"), # search all agents
(agent_is_alive,":agent"), # exclude dead agents
(agent_is_human,":agent"),  # exclude not human agents (for more race mod)
(agent_get_team, ":agent_team", ":agent"),
(this_or_next|neq, ":agent_team", "$defender_team"),
(eq, ":agent_team", "$defender_team_2"),
(get_player_agent_no, ":player_agent"), 
        (agent_get_position,pos3,":agent"), # store missile_hit position pos3
(prop_instance_get_position, pos1, "spr_fire_ball"),
    (get_distance_between_positions,":dist",pos1,pos3), #store distance shooter and troop_got_hit
    (lt,":dist",50), # before working hit should be before 50 meters distance
    (prop_instance_receive_damage, "spr_fire_ball", ":player_agent", 1000),
  (try_end),
    ])



Okay for modders only i first tried to implent it as a deployable item working similar to a deployable pavise shield but wouldn't work for bots but well here is the unfinished code
module_mission_templates
common_troy_fire_ball = (
0, 0, 0, [],
  [
    (try_for_agents,":agent"), # search all agents
  (agent_is_alive,":agent"), # exclude dead agents
  (agent_is_human,":agent"),  # exclude not human agents (for more race mod)
  (agent_get_team, ":agent_team", ":agent"),
  #(this_or_next|eq, ":agent_team", "$defender_team"),
      #(eq, ":agent_team", "$defender_team_2"),
      (agent_get_wielded_item, ":wielded_item", ":agent", 1),
  (eq, ":wielded_item", "itm_fire_ball"),
  (agent_get_position, pos2, ":agent"),
      (key_clicked, key_p),
      (position_move_y, pos2, 50),
      (set_spawn_position, pos2),
      (spawn_scene_prop, "spr_fire_ball"),
      (agent_unequip_item, ":agent", "itm_fire_ball"),
    (try_end),
    ])

you will need an item with name fire ball to but that should'nt be that hard to make.
 
Builder of the gods
Please help me
This is where the mt codes need to paste.
Impossible to the 'basement' under sections of the siege it gives an error. At the bottom of the Mt is still impossible to the 'basement' help me et please.
 
Nothing special/innovative at all, just something simple I coded long ago to turn something like this:
str_14 | agi_10 | int_4 | cha_4|level(24),wp_one_handed (100) | wp_two_handed (100) | wp_polearm (100) | wp_archery (100) | wp_crossbow (120) | wp_throwing (100),knows_common|knows_power_draw_3|knows_ironflesh_1|knows_power_strike_1|knows_athletics_2
into something like this:
attrlev(14,10,4,4,24), wpex(100,100,100,100,120,100), strsk(1,1,0,3)|agisk(0,0,2,1,0)|lordsk1(0,0,0,0,0,0,1)|lordsk2(0,0,0,0,0,1,1,2),

wpex is Native, but for the rest I use the following code added to the top of module_troops file:
Code:
def attrlev(s,a,i,c,l):
 n = bignum | s
 n |= (bignum | (a << 8))
 n |= (bignum | (i << 16))
 n |= (bignum | (c << 24))
 n |= level(l)
 return n
 
def strsk(i,ps,pt,pd):
 n = 0
 n |= (int(hex(i),16) << (skl_ironflesh << 2))
 n |= (int(hex(ps),16) << (skl_power_strike << 2))
 n |= (int(hex(pt),16) << (skl_power_throw << 2))
 n |= (int(hex(pd),16) << (skl_power_draw << 2))
 return n
 
def agisk(wm,sh,ath,ri,ha):
 n = 0
 n |= (int(hex(wm),16) << (skl_weapon_master << 2))
 n |= (int(hex(sh),16) << (skl_shield << 2))
 n |= (int(hex(ath),16) << (skl_athletics << 2))
 n |= (int(hex(ri),16) << (skl_riding << 2))
 n |= (int(hex(ha),16) << (skl_horse_archery << 2))
 return n
 
def lordsk1(loo,train,track,tct,pf,spt,inv):
 n = 0
 n |= (int(hex(loo),16) << (skl_looting << 2))
 n |= (int(hex(train),16) << (skl_trainer << 2))
 n |= (int(hex(track),16) << (skl_tracking << 2))
 n |= (int(hex(tct),16) << (skl_tactics << 2))
 n |= (int(hex(pf),16) << (skl_pathfinding << 2))
 n |= (int(hex(spt),16) << (skl_spotting << 2))
 n |= (int(hex(inv),16) << (skl_inventory_management << 2))
 return n
 
def lordsk2(wt,sur,fa,eng,pers,prm,lead,trd):
 n = 0
 n |= (int(hex(wt),16) << (skl_wound_treatment << 2))
 n |= (int(hex(sur),16) << (skl_surgery << 2))
 n |= (int(hex(fa),16) << (skl_first_aid << 2))
 n |= (int(hex(eng),16) << (skl_engineer << 2))
 n |= (int(hex(pers),16) << (skl_persuasion << 2))
 n |= (int(hex(prm),16) << (skl_prisoner_management << 2))
 n |= (int(hex(lead),16) << (skl_leadership << 2))
 n |= (int(hex(trd),16) << (skl_trade << 2))
 return n
And when I start doing a soldier, I first of all replace all his stats with this empty template:
attrlev(xx,xx,xx,xx,xx), wpex(xx,xx,xx,xx,xx,xx), strsk(xx,xx,xx,xx)|agisk(xx,xx,xx,xx,xx)|lordsk1(xx,xx,xx,xx,xx,xx,xx)|lordsk2(xx,xx,xx,xx,xx,xx,xx,xx),
And then I start assigning real ones (I always do the "xx" part to avoid the risk of overlooking anything).

Been using it for months while balancing Perisno troops and to me this way of coding stats looks a lot less chaotic than messy Native one.
h-131.jpg
Partly because of different colors.

 
Hey, does anyone have an automatic rifle script for crossbows? Like pew pew pew, reload pew pew pew reload. I intend to use this for NW muskets so if it comes pre made with that but if it comes for a crossbow thats fine. Also, I would like for this to be server side so the client doesnt have to download anything. Any help would be appreciated
 
Back
Top Bottom