Search results for query: *

  1. AndyYa

    Suggestions for new MS operations in Warband

    agent_get_animation = 1768 # (agent_get_animation, <destination>, <agent_id>, <body_part),
    # Retrieves current agent animation for specified body part (0 = lower, 1 = upper).
    agent_set_animation = 1740 # (agent_set_animation, <agent_id>, <anim_id>, [channel_no]),
    # Forces the agent to perform the specified animation. Optional channel_no parameter determines whether upper body (value = 1) or lower body (value = 0, default) is affected by animation.
  2. AndyYa

    OSP Kit Axe Trap

    Great job!
    Another way to use it - is to run trap by the trigger.


    download modified brf - link

    Code:
    axe_trap_control = (0.1, 0, 0,
        [(assign, ":go", 0),
         (scene_prop_get_num_instances, ":num_guilliotine_triggers", "spr_guilliotine_trigger"),
         (try_for_range, ":trigger_no", 0, ":num_guilliotine_triggers"),
            (scene_prop_get_instance, ":guilliotine_trigger_prop_id", "spr_guilliotine_trigger", ":trigger_no"),
            (try_for_agents, ":agent"),
                (agent_is_alive, ":agent"),
                (scene_prop_has_agent_on_it, ":guilliotine_trigger_prop_id", ":agent"),
                (try_begin),
                    (ge, "$g_trap_axe", 0),
                (else_try),
                    (lt, "$g_trap_axe", 0),
                    (assign, ":go", 1),
                    (assign, "$g_trap_axe", ":agent"),
                (try_end),
            (try_end),
            (try_begin),
                (ge, "$g_trap_axe", 0),
                (neg|scene_prop_has_agent_on_it, ":guilliotine_trigger_prop_id", ":agent"),
                (assign, ":go", 1),
                (assign, "$g_trap_axe", -1),
            (try_end),
          (try_end),
         (eq, ":go", 1),
        ],
        [(try_for_prop_instances, ":axe", "spr_guilliotine"),
            (try_begin),
                (scene_prop_slot_eq, ":axe", scene_prop_open_or_close_slot, 0), # if the trap is hidden - activate
                (prop_instance_get_position, pos2, ":axe"),
                (position_move_z, pos2, -320),
                (prop_instance_animate_to_position, ":axe", pos2, 50),
                (scene_prop_set_slot, ":axe", scene_prop_open_or_close_slot, 1),
                (prop_instance_play_sound, ":axe", "snd_draw_greatsword", sf_vol_15),
            (else_try),                                                         # if it is active - hide
                (prop_instance_get_starting_position, pos1, ":axe"),
                (prop_instance_animate_to_position, ":axe", pos1, 50),
                (scene_prop_set_slot, ":axe", scene_prop_open_or_close_slot, 3),
                (prop_instance_play_sound, ":axe", "snd_draw_greataxe", sf_vol_15),
            (try_end),
         (try_end),
        ])

    new scene_props
    ("guilliotine_trigger",0,"guilliotine_trigger","bo_guilliotine_trigger", []), #sokf_invisible - hiding trap trigger
  3. AndyYa

    OSP Kit QoL Towerclock

    From modders to modders :smile: Just add towerclock to scene props. Makes the town scene more atmospheric and alive. Show current calradian ingame time. In editor mod set the hour and the minute hand at 12 o’clock. Download from google drive Nexus
  4. AndyYa

    OSP Code QoL Books & scrolls reading presentation

    v.g.
    tenor.gif
  5. AndyYa

    OSP Code QoL Alive horses

    Azura34 said:
    (45,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]),
    (46,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]),
    (47,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]),
        ],
        [ 

    ikinci parantezin altına ekledim fakat çalışmadı hatayı nerde yaptım ?

    This is the part of my module_mission_templates.py
    (
        "town_center",0,-1,
        "Default town visit",
        [ (0,mtef_scene_source|mtef_team_0,af_override_horse,0,1,pilgrim_disguise), #Player when entering on foot
          (1,mtef_scene_source|mtef_team_0,0,0,1,[]),#Player when entering on horseback
          .
          .
          .
          (62,mtef_visitor_source,af_override_horse,0,1,[]),
          (63,mtef_visitor_source,af_override_horse,0,1,[]),
        ],
        [

        (0, 0, ti_once, [],### static horse
          [ (neg|is_edit_mode_enabled),
        (try_for_range, ":horse", all_items_begin, all_items_end),
    (item_get_type, ":type", ":horse"),
    (eq, ":type", itp_type_horse),
    (scene_item_get_num_instances, ":num_instances", ":horse"),
    (try_for_range, ":number", 0, ":num_instances"),
    (scene_item_get_instance, ":scene_item", ":horse", ":number"),
    (prop_instance_get_position, pos53, ":scene_item"),
    (prop_instance_set_scale, ":scene_item", 0, 0, 0),
    (set_spawn_position, pos53),
    (spawn_horse, ":horse", 0),
    (try_end),
    (try_end),
        ]),

          (ti_on_agent_spawn, 0, 0,
            .
            .

    ps. To view ingame change Disable Edit Mode (in game configure -> advanced) if enabled
  6. AndyYa

    OSP Code QoL Alive horses

    Azura34 said:
    tam olarak nereye yapıştırmam lazım ?
    Aşağıdaki tetikleyici module_mission_templates.py içindeki "town_center" bölümüne eklenebilir
  7. AndyYa

    LSP Animations Tavern Animation Pack

    (troop_get_type, ":gender", ":your_musican_troop_no"), # Returns troop current skin (i.e. gender).
    (try_begin),
        (eq, ":gender", 1),# 1 for female, 0 - male
        (mission_tpl_entry_add_override_item,"mt_town_default",":your_entry","itm_dedal_lira"),
    (else_try),
        (mission_tpl_entry_add_override_item,"mt_town_default",":your_entry","itm_dedal_lutnia"),
    (try_end),
  8. AndyYa

    OSP Code QoL Alive horses

    Leonion said:
    P.S. It's probably worth giving the trigger condition
    (neg|is_edit_mode_enabled),
    Thanks.
  9. AndyYa

    OSP Code QoL Alive horses

    This OSP changes static horses in towns (horse merchant) to alive ones. The following trigger can be added to the "town_center" part in module_mission_templates.py to "animate" selling horses. (0, 0, ti_once, [],### replace static horse [(neg|is_edit_mode_enabled)...
  10. AndyYa

    Modding Q&A [For Quick Questions and Answers]

    Madijeis said:
    Can I actually put companion in a determined scene?

    ["npc17","Caius","Caius",tf_hero|tf_unmoveable_in_party_window, scn.town_1_tavern, 0, reserved, fac.commoners,[itm.pilgrim_hood,itm.pilgrim_disguise,itm.roman_gladius_3],
      str_18|agi_15|int_15|cha_17|level(22),wp(250),knows_warrior_npc|
      knows_ironflesh_5|knows_power_strike_4|knows_pathfinding_4|knows_athletics_5|knows_tracking_1|knows_riding_2, #skills 2/3 player at that level
      0x00000004bf086143259d061a9046e23500000000001db52c0000000000000000],

    What am I doing wrong?

    Checking module syntax... FAILED.

    scn.town_1_tavern -> scn_town_1_tavern
    fac.commoners -> fac_commoners
    itm.pilgrim_hood -> itm_pilgrim_hood

    http://forums.taleworlds.com/index.php/topic,53259.0.html
  11. AndyYa

    OSP Code QoL Weapon racks in halls show equipped and stored weapons

    some optimization for stored weapons trigger

    Code:
          (0, 0, ti_once, [], [
            (party_get_slot, ":town_lord", "$current_town", slot_town_lord),
            (ge, ":town_lord", 0),
            (troop_get_inventory_capacity, ":inventory_capacity", ":town_lord"),#whole inventory
            #(assign,":inventory_capacity", 4),# for equipped items only	
            (try_begin), 
    	(scene_prop_get_instance, ":weapon_rack", "spr_weapon_rack", 0),
    	(prop_instance_is_valid, ":weapon_rack"),
    	(prop_instance_set_scale, ":weapon_rack", 110, 100, 100), #it's slightly to narrow, so we widen by 10%
    	(assign, ":pos", pos0),
    	(prop_instance_get_position, ":pos", ":weapon_rack"),
                    (try_for_range, ":inv_slt_no", 0, ":inventory_capacity"),
                        (troop_get_inventory_slot, ":weapon_0", ":town_lord", ":inv_slt_no"),
                        (ge, ":weapon_0", 1), #aborted if slot is empty
                        (item_get_weapon_length, ":weapon_0_length", ":weapon_0"),
                        (item_get_type, ":weapon_0_type", ":weapon_0"),
                        (try_begin),
                            (eq, ":weapon_0_type", itp_type_shield), #shields go on the wall behind (where it should be anyway)
                            (position_move_z, ":pos", 150),
                            (position_move_y, ":pos", 40),
                            (position_move_x, ":pos", 10),
                            (position_rotate_x, ":pos", 90),
                            (position_rotate_z, ":pos", 45),
                        (else_try),
                            (this_or_next|eq, ":weapon_0_type", itp_type_crossbow),
                            (eq, ":weapon_0_type", itp_type_bow),
                            (position_move_x, ":pos", -60, 0),
                            (position_move_z, ":pos", 13, 0),
                            (position_move_y, ":pos", -5),
                            (position_move_z, ":pos", ":weapon_0_length", 0),
                            (position_rotate_x, ":pos", -95),
                        (else_try),
                            (eq, ":weapon_0_type", itp_type_thrown),
                            (position_move_x, ":pos", -60, 0),
                            (position_move_z, ":pos", -10, 0),
                            (position_move_y, ":pos", -5),
                            (position_move_z, ":pos", ":weapon_0_length", 0),
                            (position_rotate_z, ":pos", -180),
                            (position_rotate_x, ":pos", 90),
                        (else_try),
                            (eq, ":weapon_0_type", itp_type_polearm),
                            (position_move_x, ":pos", -60, 0),
                            (position_move_z, ":pos", -120, 0),
                            (position_move_y, ":pos", -10),
                            (val_div, ":weapon_0_length", 3),
                            (val_mul, ":weapon_0_length", 2),
                            (position_move_z, ":pos", ":weapon_0_length", 0),
                            (position_rotate_x, ":pos", 85),
                        (else_try),
                            (this_or_next|eq, ":weapon_0_type", itp_type_arrows),
                            (eq, ":weapon_0_type", itp_type_bolts),
                            (position_move_z, ":pos", -80, 0),
                            (position_move_y, ":pos", 18, 0),
                            (position_rotate_z, ":pos", 90),
                        (else_try),
                            (position_move_x, ":pos", -60, 0),
                            (position_move_z, ":pos", -70, 0),
                            (position_move_y, ":pos", -5),
                            (position_move_z, ":pos", ":weapon_0_length", 0),
                            (position_rotate_x, ":pos", -95),
                        (try_end),
                    (set_spawn_position, ":pos"),
                    (spawn_item, ":weapon_0", 0, 0),
    	#some manipulations with ":pos" here, if needed move or change pos
                    (try_end),
           (try_end),
          ]),
  12. AndyYa

    OSP Code Combat AI Shield Bash based on shield skill

    I'm already using dodge in my mod

    but, now with dodge

    Code:
    ai_shield_bash =  (3, 0, 0,[],
    	[
    	(eq,"$mmc_ai_shield_bash",1),
    	(get_player_agent_no,":player_agent"),
        (try_for_agents, ":agent_no"),
    	    (neq,":agent_no", ":player_agent"),
    		(agent_get_troop_id, ":troop_sb_id", ":agent_no"),
    		(store_skill_level, ":skill_shield", "skl_shield", ":troop_sb_id"),
    		(ge,":skill_shield",1),#set needed level of skill_shield for bashing
    		(agent_is_alive, ":agent_no"),
    		(agent_is_human, ":agent_no"),#Only humans can kick....FOR NOW
    		(agent_is_active, ":agent_no"),
    		#-----------------------------------Garedyr begin
    		(agent_get_horse, ":horse", ":agent_no"),
    		(eq, ":horse", -1), #agent cannot be mounted
    		#-----------------------------------Garedyr end
    		(agent_slot_eq, ":agent_no", slot_agent_is_running_away, 0),#Isn't fleeing the battle.
    		
            (agent_get_wielded_item, ":shield_item", ":agent_no", 1),# what agent has in the left hand
            (gt, ":shield_item", itm_no_item),#its item
            (item_get_type, ":type", ":shield_item"),#
            (eq, ":type", itp_type_shield),# item is shield
    		(agent_get_animation, ":anim", ":agent_no", 0),
    		(neq, ":anim", "anim_shield_bash"),
    		
            (agent_get_attack_action, ":attack_action", ":agent_no"),
    		(agent_get_defend_action, ":defend_action", ":agent_no"),
            (this_or_next|eq,":attack_action",4),#Just got parried
            (this_or_next|eq,":defend_action",1),#Parrying an enemy 
    		##So he'll only try to kick if he just parried an enemy attack, or his own attack just got parried.
    		
    		(agent_get_team, ":team", ":agent_no"),
    		(assign, ":maximum_distance", 100), #100 cm / 1m
    		#Target Acquisition
            (agent_ai_get_look_target,":victim",":agent_no"),		
    		(gt,":victim",0),#Make sure there is someone.
    		(agent_is_alive, ":victim"),
    		(agent_is_human, ":victim"),#Only kick humans
    		(agent_is_active, ":victim"),
    		#-----------------------------------Garedyr begin
    		(agent_get_horse, ":v_horse", ":victim"),
    		(eq, ":v_horse", -1), #victim agent cannot be mounted too
    		#-----------------------------------Garedyr end		
    		(agent_get_team, ":v_team", ":victim"),
    		(teams_are_enemies, ":v_team", ":team"),
    		(agent_get_position, pos1, ":agent_no"),#Distance check
    		(position_move_y, pos1, 75),#75 cm directly ahead, so it's not a cuboid space around player center
    		(agent_get_position, pos2, ":victim"),
    		(neg|position_is_behind_position, pos2, pos1), #victim can't be behind kicker.
    		(get_distance_between_positions, ":distance", pos1, pos2),
    		(le, ":distance", ":maximum_distance"),
    		    (try_begin),
    ### dodge part ###	
    			    (agent_get_troop_id, ":victim_troop", ":victim"),
    				(store_skill_level, ":athletics",  "skl_athletics", ":victim_troop"),
    				(val_mul, ":athletics", 5),# 5 percent chance to avoid bash per athletics skill point
    				(store_random_in_range, ":dodge", 1, 100),
    				(le, ":dodge", ":athletics"),
    		    (else_try),
    ### dodge part end ###			
    			    (val_mul, ":skill_shield", 3),#3 percent chance to bash per shield skill
    				(store_random_in_range, ":random", 1, 100),
    				(le,":random",":skill_shield"),
    				(agent_set_animation, ":agent_no","anim_shield_bash"),
    				(agent_get_troop_id, ":id", ":agent_no"),
    				(troop_get_type, ":type", ":id"),
    				    (try_begin),
    				        (eq, ":type", tf_male),
    				        (agent_play_sound, ":agent_no", "snd_man_yell"),
    			        (else_try),
    				        (agent_play_sound, ":agent_no", "snd_woman_yell"),		
    			        (try_end),
    			    (agent_play_sound, ":agent_no", "snd_wooden_hit_low_armor_high_damage"),				
    			    (agent_set_animation, ":victim", "anim_shield_strike"),
    				(store_mul, ":bs_damage", ":skill_shield",2),#				
    				(agent_deliver_damage_to_agent, ":agent_no", ":victim", ":bs_damage", "itm_tutorial_club"),
    			(try_end),
        (try_end),
    	])	
    #Shield Bash end

  13. AndyYa

    Need suggestions for a Russian 15th century troop tree!

    What that mean Tiagloe ? Heavy ? then tiazholaia pechota (heavy infantry) or tyazholoya pehota (тяжелая пехота)
    Tiagloe Skirmisher (heavy archer?) -> tiazholy luchnik (archer), tiazholy strelets (firearm)
    light calvary w/ sabers+ matchlock pistols -> reitary
    (heavy infantry w/ axes) -> no special word, axeman?
    (arquebusier w/ saber) -> with bardiche - strelec (if 1), strelcy(if many)  :smile: , but they was not a noble kin
    https://en.wikipedia.org/wiki/Bardiche
    Deti Boiarskie - nobles children
    and also you can use polish or czech word for vaegir.
    P.S. Ravkin looks more like jewish surname.
    p.p.s. strela - arrow
  14. AndyYa

    OSP Code Combat AI Shield Bash based on shield skill

    It's not pure mine, its just a compilation. [OSP] AI Shield Bash based on shield skill. More shield skill - more chance for bashing. In module_mission_templates.py ai_shield_bash =  (3, 0, 0,[], [ #(eq,"$mmc_ai_shield_bash",1), (get_player_agent_no,":player_agent"),     (try_for_agents...
  15. AndyYa

    PYTHON SCRIPT/SCHEME EXCHANGE

    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.
Back
Top Bottom