Recent content by AndyYa

  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),
          ]),
Back
Top Bottom