Recent content by Cigic

  1. RaW:Previews+News

    Congrats on latest release.
    Great work.

    I would appreciate if I could use 3 armors and 3 helmets in my mod.
    My intention is to use them as Easter eggs instead of vanilla samurai armor.
    I would give credit.
    Please advise if that could be arranged.
    Thanks.
  2. Official 3D art thread - Warband

    Adorno said:
    Some models from my 'wooden scene props pack'

    S6IBm.jpg

    ix6KM.jpg

    LAB-p.jpg

    viOOU.jpg

    nrimj.jpg

    lEuua.jpg

    s9-Cw.jpg

    QZGa8.jpg

    ZThxm.jpg

    Great work Adorno.

    Someone could use it to make missing scenes for Lumos's Outposts Kit.
  3. Modding Q&A [For Quick Questions and Answers]

    Hi,

    I have really treid to find the answer on this because I am sure it was asked many times, but I didn't manage to find it.

    I have added several armors to npc troop items pool.

    Troop in game still tends to use mostly only single type of armor  eventually two types of armor.
    How to "ensure" that troops in game mix more?

    Thank you in advance.
  4. Modding Q&A [For Quick Questions and Answers]

    kalarhan said:
    Cigic said:
    Would you be so kind to write me one option in more detail?

    see header_triggers.py for the list of triggers and parameters for each type. You cant use a item trigger on a scene prop, or a item trigger on a mission template trigger, and so on.

    Code:
    # SCENE PROP TRIGGERS (used in module_scene_props)
    
    ti_on_scene_prop_init               = -40.0 # A scene prop instance has been created on the scene.
    
    ti_on_init_scene_prop               = ti_on_scene_prop_init # Alternate syntax
        # trigger param 1 = prop instance_id reference
    
    ti_on_scene_prop_hit                = -42.0 # A scene prop has been hit by some agent.
        # Note that on client-side in multiplayer missions only trigger param 1 and position registers are available. Trigger params 2..7 are only available to server or in singleplayer.
        # trigger param 1 = prop instance_id reference
        # trigger param 2 = amount of damage delivered to the scene prop (not available on client side in multiplayer)
        # trigger param 3 = attacker agent_id (not available on client side in multiplayer)
        # trigger param 4 = item_id of the weapon used to attack
        # trigger param 5 = weapon item modifier
        # trigger param 6 = item_id of missile used to attack (if attack was by ranged weapon)
        # trigger param 7 = missile item modifier
        # pos1            = position of the hit area
        # pos2            = X field holds attacker's agent_id reference
        # Trigger Result: if set, damage dealt to prop
    
    ti_on_scene_prop_destroy            = -43.0 # A destructible scene prop has been destroyed by some agent. Does not fire on client side in multiplayer missions.
        # trigger param 1 = prop instance_id reference
        # trigger param 2 = attacker agent_id
    
    ti_on_scene_prop_start_use          = -47.0 # An agent is attempting to activate a usable scene prop. Useful if you want a scene prop to be activated instantly without any timeout. Does not fire on client side in multiplayer missions.
        # trigger param 1 = agent_id of the agent who has started using the scene prop
        # trigger param 2 = prop instance_id reference
    
    ti_on_scene_prop_cancel_use         = -48.0 # An agent has cancelled using the scene prop. Does not fire on client side in multiplayer missions.
        # trigger param 1 = agent_id of the agent who cancelled using the scene prop
        # trigger param 2 = prop instance_id reference
    
    ti_on_scene_prop_use                = -44.0 # A usable scene prop has been activated by some agent. Does not fire on client side in multiplayer missions.
        # trigger param 1 = agent_id of the agent who activated the scene prop
        # trigger param 2 = prop instance_id reference
    
    ti_on_scene_prop_is_animating       = -45.0 # Called each frame when a scene prop is animating.
        # trigger param 1 = prop instance_id reference
        # trigger param 2 = remaining animation time (apparently in 1/100th of second).
    
    ti_on_scene_prop_animation_finished = -46.0 # Animation sequence has been completed for a scene prop.
        # trigger param 1 = prop instance_id reference
    
    ti_scene_prop_deformation_finished  = -76.0 # Deformation sequence has been completed for a scene prop.
        # trigger param 1 = prop instance_id reference
    ^ example above is for props

    For how to use variables like globals read https://forums.taleworlds.com/index.php/topic,142422.0.html

    SOLVED!
  5. Modding Q&A [For Quick Questions and Answers]

    Somebody said:
    Don't hook the code on a 0,0,0 trigger, there's a specific one just for dropping items
    Code:
    ti_on_item_dropped
    You can't just add random parameters to triggers and hope it works. I recommend storing the player agent's id in a global and use it inside the init code, or store the banner mesh directly and pass that into the scene prop to pass to the tableau.

    Thank you for quick response and guidance.

    Would you be so kind to write me one option in more detail?
    Thank you.
  6. Modding Q&A [For Quick Questions and Answers]

    Arch3r said:
    Cigic said:
    Heraldic deployable pavise

    Hi all,

    I've spent too much time trying to resolve this.
    When shiled spawns as a scene prop, instead of the heraldry I get only a black surface.


    Here is  code:
    module_items
    ["pavise", "Tower Shield",  [("tableau_shield_pavise_3_new" ,0)], itp_merchandise|itp_type_shield|itp_cant_use_on_horseback|itp_wooden_parry, itcf_carry_board_shield,470 , weight(6)|hit_points(500)|body_armor(1:cool:|spd_rtng(7:cool:|shield_width(43)|shield_height(90),imodbits_shield, [(ti_on_init_item, [(store_trigger_param_1, ":agent_no"),(store_trigger_param_2, ":troop_no"),(call_script, "script_shield_item_set_banner", "tableau_pavise_shield_3", ":agent_no", ":troop_no")])]],
    module_tableau _materials
      ("pavise_shield_3a", 0, "sample_shield_matte", 512, 512, 0, 0, 0, 0,
      [
          (store_script_param, ":banner_mesh", 1),

          (set_fixed_point_multiplier, 100),

          (init_position, pos1),
          (position_set_x, pos1, 100),
          (position_set_y, pos1, 120),
          (cur_tableau_add_mesh, ":banner_mesh", pos1, 116, 0),
          (init_position, pos1),
          (position_set_z, pos1, 10),
          (cur_tableau_add_mesh, "mesh_tableau_mesh_shield_pavise_3", pos1, 0, 0),
          (cur_tableau_set_camera_parameters, 0, 200, 200, 0, 100000),
          ]),

    module_mission_templates

          #pavise
    Pavise = (0, 0, 0,
            [],
            [

                (get_player_agent_no, ":player_agent"),
                (agent_get_position, pos2, ":player_agent"),
                #==click g && has pavise
                (try_begin),
                    #(agent_has_item_equipped, ":player_agent", "itm_pavise"),
                    (agent_get_wielded_item, ":shield_item", ":player_agent", 1),
                    (eq, ":shield_item", "itm_pavise"),
                    (key_clicked, key_g),
                    (clear_omitted_keys),
             
                    (scene_prop_get_num_instances, ":num_props", "spr_pavise"),
                    (position_move_y, pos2, 50),
                    (set_spawn_position, pos2),

                    (assign, ":pav_found", 0),#pf
                    #FOR # props if prop at LATENT spot
                    (try_for_range, ":prop_no", 0, ":num_props"),
                        (eq, ":pav_found", 0),#pf
                        (scene_prop_get_instance, ":scene_prop_id", "spr_pavise", ":prop_no"),
                        (prop_instance_get_position, pos3, ":scene_prop_id"), #pos3 holds position of current prop
                        (position_get_z, ":z_coor", pos3),
                        (eq, ":z_coor", -100*100),#-100 LATENT spot

                        (prop_instance_set_position, ":scene_prop_id", pos2),#pavise move
                        (get_player_agent_no, ":player_agent"),
                        (agent_unequip_item, ":player_agent", "itm_pavise"),
                        (assign, ":pav_found", 1),#pf
                    (try_end),

                    (try_begin),
                        (lt, ":pav_found", 1),#pf

                        (spawn_scene_prop, "spr_pavise"),#pavise spawn
                        (get_player_agent_no, ":player_agent"),
                        (agent_unequip_item, ":player_agent", "itm_pavise"),
                    (try_end),
                (try_end),

                (scene_prop_get_num_instances, ":num_props", "spr_pavise"),
                #==click h && near proped pavise
                (try_begin),
                    (key_clicked, key_h),
                    (clear_omitted_keys),
                    #FOR # props if prop close to player
                    (try_for_range, ":prop_no", 0, ":num_props"),
                        (scene_prop_get_instance, ":scene_prop_id", "spr_pavise", ":prop_no"),
                        (prop_instance_get_position, pos3, ":scene_prop_id"), #pos3 holds position of current prop
                        (get_distance_between_positions, ":player_distance", pos2, pos3),
                        (le, ":player_distance", 100),

                        (position_set_z, pos3, -100*100),#-100 LATENT spot
                        (prop_instance_set_position, ":scene_prop_id", pos3),#pavise move

                        (set_spawn_position, pos2),
                        (position_move_y, pos2, 50),
                        (spawn_item, "itm_pavise"),#pavise spawn
                    (try_end),
                    #(scene_prop_set_visibility, ":scene_prop_id", 0),
                    #(init_position, pos1),
                (try_end),

            ])
    module_scene_props:
      ("pavise",sokf_moveable|sokf_destructible,"tableau_shield_pavise_prop_3","bo_tableau_shield_pavise_prop_3", [
        #check_castle_door_use_trigger,

      (ti_on_init_scene_prop,
        [  (cur_scene_prop_set_tableau_material, "tableau_pavise_shield_3a", "trp_player"),
          (store_trigger_param_1, ":instance_no"),
          (scene_prop_set_hit_points, ":instance_no", 100),
        ]),
       
      (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"),
            #(assign, reg0, ":z_difference"),
            #(display_message, "@{!}z dif : {reg0}"),
            (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"),
            (prop_instance_animate_to_position, ":instance_no", pos1, 70), #animate to position 1 in 0.7 second
          (try_end),
        ]),     

        (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),   
        ]),
      ]),

    Please help

    THANKS.

    the problem may lay here, in module_scene_props:
    Code:
    (cur_scene_prop_set_tableau_material, "tableau_pavise_shield_3a", "trp_player"),
    As header_operations describes this operation as:
    Can only be used inside ti_on_init_scene_prop trigger in module_scene_props.py. Assigns tableau to the scene prop instance. Value of <instance_code> will be passed to tableau code. Commonly used for static banners.

    Your tableau code is as follows:
    Code:
    (store_script_param, ":banner_mesh", 1),
    
           (set_fixed_point_multiplier, 100),
    
           (init_position, pos1),
           (position_set_x, pos1, 100),
           (position_set_y, pos1, 120),
           (cur_tableau_add_mesh, ":banner_mesh", pos1, 116, 0),
           (init_position, pos1),
           (position_set_z, pos1, 10),
           (cur_tableau_add_mesh, "mesh_tableau_mesh_shield_pavise_3", pos1, 0, 0),
           (cur_tableau_set_camera_parameters, 0, 200, 200, 0, 100000),
    Now, if you look there, you're expecting a banner mesh to be passed in (store_script_param, ":banner_mesh", 1), but you are passing a troop (trp_player).

    Yep, thanks a lot, very well spotted.  Most of them expect troop to be passed in.

    I passed the mesh this way:

      (ti_on_init_scene_prop,
        [  (store_trigger_param_1, ":instance_no"),
            (store_trigger_param_2, ":agent_no"),
            (agent_get_troop_id, ":troop_no", ":agent_no"),
            (call_script, "script_agent_troop_get_banner_mesh", ":agent_no", ":troop_no"),
    (assign, ":mesh", reg0),
        (cur_scene_prop_set_tableau_material, "tableau_pavise_shield_3a", ":mesh"),
            (scene_prop_set_hit_points, ":instance_no", 100),
        ]),
       

    and now it works!!
    *EDIT Sometime works sometimes shows wrong banner, sometimes default red and black.

    But I get this error:
    295fyv6.jpg



    Here is agent_troop_get_banner_mesh script:

      #script_agent_troop_get_banner_mesh
      # INPUT: agent_no, troop_no
      # OUTPUT: banner_mesh
      ("agent_troop_get_banner_mesh",
        [
          (store_script_param, ":agent_no", 1),
          (store_script_param, ":troop_no", 2),
          (assign, ":banner_troop", -1),
          (assign, ":banner_mesh", "mesh_banners_default_b"),
          (try_begin),
            (lt, ":agent_no", 0),
            (try_begin),
              (ge, ":troop_no", 0),
              (this_or_next|troop_slot_ge, ":troop_no", slot_troop_banner_scene_prop, 1),
              (eq, ":troop_no", "trp_player"),
              (assign, ":banner_troop", ":troop_no"),
            (else_try),
              (is_between, ":troop_no", companions_begin, companions_end),
              (assign, ":banner_troop", "trp_player"),
            (else_try),
              (assign, ":banner_mesh", "mesh_banners_default_a"),
            (try_end),
          (else_try),
            (eq, "$g_is_quick_battle", 1),
            (agent_get_team, ":agent_team", ":agent_no"),
            (try_begin),
              (eq, ":agent_team", 0),
              (assign, ":banner_mesh", "$g_quick_battle_team_0_banner"),
            (else_try),
              (assign, ":banner_mesh", "$g_quick_battle_team_1_banner"),
            (try_end),
          (else_try),
            (game_in_multiplayer_mode),
            (agent_get_group, ":agent_group", ":agent_no"),
            (try_begin),
              (neg|player_is_active, ":agent_group"),
              (agent_get_player_id, ":agent_group", ":agent_no"),
            (try_end),
            (try_begin),
              #if player banners are not allowed, use the default banner mesh
              (eq, "$g_multiplayer_allow_player_banners", 1),
              (player_is_active, ":agent_group"),
              (player_get_banner_id, ":player_banner", ":agent_group"),
              (ge, ":player_banner", 0),
              (store_add, ":banner_mesh", ":player_banner", arms_meshes_begin),
              (assign, ":already_used", 0),
              (try_for_range, ":cur_faction", npc_kingdoms_begin, npc_kingdoms_end), #wrong client data check
                (faction_slot_eq, ":cur_faction", slot_faction_banner, ":banner_mesh"),
                (assign, ":already_used", 1),
              (try_end),
              (eq, ":already_used", 0), #otherwise use the default banner mesh
            (else_try),
              (agent_get_team, ":agent_team", ":agent_no"),
              (team_get_faction, ":team_faction_no", ":agent_team"),

              (try_begin),
                (agent_is_human, ":agent_no"),
                (faction_get_slot, ":banner_mesh", ":team_faction_no", slot_faction_banner),
              (else_try),
                (agent_get_rider, ":rider_agent_no", ":agent_no"),
                #(agent_get_position, pos1, ":agent_no"),
                #(position_get_x, ":pos_x", pos1),
                #(position_get_y, ":pos_y", pos1),
                #(assign, reg0, ":pos_x"),
                #(assign, reg1, ":pos_y"),
                #(assign, reg2, ":agent_no"),
                #(display_message, "@{!}agent_no:{reg2}, pos_x:{reg0} , posy:{reg1}"),
                (try_begin),
                  (ge, ":rider_agent_no", 0),
                  (agent_is_active, ":rider_agent_no"),
                  (agent_get_team, ":rider_agent_team", ":rider_agent_no"),
                  (team_get_faction, ":rider_team_faction_no", ":rider_agent_team"),
                  (faction_get_slot, ":banner_mesh", ":rider_team_faction_no", slot_faction_banner),
                (else_try),
                  (assign, ":banner_mesh", "mesh_banners_default_c"),
                (try_end),
              (try_end),
            (try_end),
          (else_try),
            (agent_get_troop_id, ":troop_id", ":agent_no"),
            (this_or_next|troop_slot_ge,  ":troop_id", slot_troop_banner_scene_prop, 1),
            (eq, ":troop_no", "trp_player"),
            (assign, ":banner_troop", ":troop_id"),
          (else_try),
            (agent_get_party_id, ":agent_party", ":agent_no"),
            (try_begin),
              (lt, ":agent_party", 0),
              (is_between, ":troop_id", companions_begin, companions_end),
              (main_party_has_troop, ":troop_id"),
              (assign, ":agent_party", "p_main_party"),
            (try_end),
            (ge, ":agent_party", 0),
            (party_get_template_id, ":party_template", ":agent_party"),
            (try_begin),
              (eq, ":party_template", "pt_deserters"),
              (assign, ":banner_mesh", "mesh_banners_default_c"),
            (else_try),
              (is_between, ":agent_party", centers_begin, centers_end),
              (is_between, ":troop_id", companions_begin, companions_end),
              (neq, "$talk_context", tc_tavern_talk),
              #this should be a captured companion in prison
              (assign, ":banner_troop", "trp_player"),
            (else_try),
              (is_between, ":agent_party", centers_begin, centers_end),
              (party_get_slot, ":town_lord", "$g_encountered_party", slot_town_lord),
              (ge, ":town_lord", 0),
              (assign, ":banner_troop", ":town_lord"),
            (else_try),
              (this_or_next|party_slot_eq, ":agent_party", slot_party_type, spt_kingdom_hero_party),
              (eq, ":agent_party", "p_main_party"),
              (party_get_num_companion_stacks, ":num_stacks", ":agent_party"),
              (gt, ":num_stacks", 0),
              (party_stack_get_troop_id, ":leader_troop_id", ":agent_party", 0),
              (this_or_next|troop_slot_ge,  ":leader_troop_id", slot_troop_banner_scene_prop, 1),
              (eq, ":leader_troop_id", "trp_player"),
              (assign, ":banner_troop", ":leader_troop_id"),
            (try_end),
          (else_try), #Check if we are in a tavern
            (eq, "$talk_context", tc_tavern_talk),
            (neq, ":troop_no", "trp_player"),
            (assign, ":banner_mesh", "mesh_banners_default_d"),
          (else_try), #can't find party, this can be a town guard
            (neq, ":troop_no", "trp_player"),
            (is_between, "$g_encountered_party", walled_centers_begin, walled_centers_end),
            (party_get_slot, ":town_lord", "$g_encountered_party", slot_town_lord),
            (ge, ":town_lord", 0),
            (assign, ":banner_troop", ":town_lord"),
          (try_end),
          (try_begin),
            (ge, ":banner_troop", 0),
            (try_begin),
              (neg|troop_slot_ge, ":banner_troop", slot_troop_banner_scene_prop, 1),
              (assign, ":banner_mesh", "mesh_banners_default_b"),
            (else_try),
              (troop_get_slot, ":banner_spr", ":banner_troop", slot_troop_banner_scene_prop),
              (store_add, ":banner_scene_props_end", banner_scene_props_end_minus_one, 1),
              (is_between, ":banner_spr", banner_scene_props_begin, ":banner_scene_props_end"),
              (val_sub, ":banner_spr", banner_scene_props_begin),
              (store_add, ":banner_mesh", ":banner_spr", arms_meshes_begin),
            (try_end),
          (try_end),
          (assign, reg0, ":banner_mesh"),
        ]),


    Please help.
    Thanks.
  7. Modding Q&A [For Quick Questions and Answers]

    Heraldic deployable pavise

    Hi all,

    I've spent too much time trying to resolve this.
    When shiled spawns as a scene prop, instead of the heraldry I get only a black surface.


    Here is  code:
    module_items
    ["pavise", "Tower Shield",  [("tableau_shield_pavise_3_new" ,0)], itp_merchandise|itp_type_shield|itp_cant_use_on_horseback|itp_wooden_parry, itcf_carry_board_shield,470 , weight(6)|hit_points(500)|body_armor(1:cool:|spd_rtng(7:cool:|shield_width(43)|shield_height(90),imodbits_shield, [(ti_on_init_item, [(store_trigger_param_1, ":agent_no"),(store_trigger_param_2, ":troop_no"),(call_script, "script_shield_item_set_banner", "tableau_pavise_shield_3", ":agent_no", ":troop_no")])]],
    module_tableau _materials
      ("pavise_shield_3a", 0, "sample_shield_matte", 512, 512, 0, 0, 0, 0,
      [
          (store_script_param, ":banner_mesh", 1),

          (set_fixed_point_multiplier, 100),

          (init_position, pos1),
          (position_set_x, pos1, 100),
          (position_set_y, pos1, 120),
          (cur_tableau_add_mesh, ":banner_mesh", pos1, 116, 0),
          (init_position, pos1),
          (position_set_z, pos1, 10),
          (cur_tableau_add_mesh, "mesh_tableau_mesh_shield_pavise_3", pos1, 0, 0),
          (cur_tableau_set_camera_parameters, 0, 200, 200, 0, 100000),
          ]),

    module_mission_templates

          #pavise
    Pavise = (0, 0, 0,
            [],
            [

                (get_player_agent_no, ":player_agent"),
                (agent_get_position, pos2, ":player_agent"),
                #==click g && has pavise
                (try_begin),
                    #(agent_has_item_equipped, ":player_agent", "itm_pavise"),
                    (agent_get_wielded_item, ":shield_item", ":player_agent", 1),
                    (eq, ":shield_item", "itm_pavise"),
                    (key_clicked, key_g),
                    (clear_omitted_keys),
             
                    (scene_prop_get_num_instances, ":num_props", "spr_pavise"),
                    (position_move_y, pos2, 50),
                    (set_spawn_position, pos2),

                    (assign, ":pav_found", 0),#pf
                    #FOR # props if prop at LATENT spot
                    (try_for_range, ":prop_no", 0, ":num_props"),
                        (eq, ":pav_found", 0),#pf
                        (scene_prop_get_instance, ":scene_prop_id", "spr_pavise", ":prop_no"),
                        (prop_instance_get_position, pos3, ":scene_prop_id"), #pos3 holds position of current prop
                        (position_get_z, ":z_coor", pos3),
                        (eq, ":z_coor", -100*100),#-100 LATENT spot

                        (prop_instance_set_position, ":scene_prop_id", pos2),#pavise move
                        (get_player_agent_no, ":player_agent"),
                        (agent_unequip_item, ":player_agent", "itm_pavise"),
                        (assign, ":pav_found", 1),#pf
                    (try_end),

                    (try_begin),
                        (lt, ":pav_found", 1),#pf

                        (spawn_scene_prop, "spr_pavise"),#pavise spawn
                        (get_player_agent_no, ":player_agent"),
                        (agent_unequip_item, ":player_agent", "itm_pavise"),
                    (try_end),
                (try_end),

                (scene_prop_get_num_instances, ":num_props", "spr_pavise"),
                #==click h && near proped pavise
                (try_begin),
                    (key_clicked, key_h),
                    (clear_omitted_keys),
                    #FOR # props if prop close to player
                    (try_for_range, ":prop_no", 0, ":num_props"),
                        (scene_prop_get_instance, ":scene_prop_id", "spr_pavise", ":prop_no"),
                        (prop_instance_get_position, pos3, ":scene_prop_id"), #pos3 holds position of current prop
                        (get_distance_between_positions, ":player_distance", pos2, pos3),
                        (le, ":player_distance", 100),

                        (position_set_z, pos3, -100*100),#-100 LATENT spot
                        (prop_instance_set_position, ":scene_prop_id", pos3),#pavise move

                        (set_spawn_position, pos2),
                        (position_move_y, pos2, 50),
                        (spawn_item, "itm_pavise"),#pavise spawn
                    (try_end),
                    #(scene_prop_set_visibility, ":scene_prop_id", 0),
                    #(init_position, pos1),
                (try_end),

            ])
    module_scene_props:
      ("pavise",sokf_moveable|sokf_destructible,"tableau_shield_pavise_prop_3","bo_tableau_shield_pavise_prop_3", [
        #check_castle_door_use_trigger,

      (ti_on_init_scene_prop,
        [  (cur_scene_prop_set_tableau_material, "tableau_pavise_shield_3a", "trp_player"),
          (store_trigger_param_1, ":instance_no"),
          (scene_prop_set_hit_points, ":instance_no", 100),
        ]),
       
      (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"),
            #(assign, reg0, ":z_difference"),
            #(display_message, "@{!}z dif : {reg0}"),
            (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"),
            (prop_instance_animate_to_position, ":instance_no", pos1, 70), #animate to position 1 in 0.7 second
          (try_end),
        ]),     

        (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),   
        ]),
      ]),

    Please help

    THANKS.
  8. where are all beautyful textures gone?

    5 years back, this mod for had some of the best textures. 90% of them are not in mod anymore? why? for example, who is the author of the original rnd_horse model/textures?
  9. Modding Q&A [For Quick Questions and Answers]

    I know it doesn't make sense. I found it somewhere but after lots of tries this was the first iteration that gave result. A banner on prop but not the right banner.

    If you know please help.

    I was certain that this will work:

      (ti_on_init_scene_prop,
        [
    ...
          (party_get_slot, ":leader_troop", "p_main_party", slot_town_lord),
          (try_begin),
            (ge, ":leader_troop", 0),
            (cur_scene_prop_set_tableau_material, "tableau_pavise_shield_1", ":leader_troop"),
          (try_end),
        ]),

    ... but I only get black shield prop
  10. Modding Q&A [For Quick Questions and Answers]

    I am trying to make deploayble pavise herladic.
    I managed to get banner in right proportions on it although it is not the right one (player's).
    Please help.

      (ti_on_init_scene_prop,
        [
      (store_trigger_param_1, ":instance_no"),
          (scene_prop_set_hit_points, ":instance_no", 100),
          (store_trigger_param_1, ":party_no"),
          (party_get_slot, ":leader_troop", ":party_no", slot_town_lord),
          (try_begin),
              (ge, ":leader_troop", 0),
              (cur_scene_prop_set_tableau_material, "tableau_pavise_shield_1", ":leader_troop"),
          (try_end),
        ]),
       
  11. Modding Q&A [For Quick Questions and Answers]

    KnightV said:
    can anybody give me workable link for pack realistic textures pack 1.1

    I believe that this mod uses them:
    http://www.moddb.com/mods/1429-hd-edition-module-complet-2016
  12. B Tutorial 3D Tutorial for heraldic armors, and mini-mod for testing some of them

    I can successfully replace any of the 4 exiting variants of the heraldic armor.
    Unfortunately I am not able to add new one.
  13. LSP Kit QoL HUNTING AND POACHING LSP!

    Ramaraunt said:
    The first thing that you need, is the resources and textures. I put them together for you here:

    https://drive.google.com/drive/folders/0B_rNU8P3lqBqSjNlUkVFU0xEVDg?usp=sharing

    The link is dead. Please provide new one.
    Thanks.
  14. Coder small assistance required

    I figured out.  :smile:

Back
Top Bottom