Author Topic: [Kit] Fancy Damage Systems (OSP)  (Read 35751 times)

0 Members and 1 Guest are viewing this topic.

lukeymoe1315

  • Recruit
  • *
    • View Profile
  • Faction: Swadian
Re: Fancy Damage Systems (OSP)
« Reply #105 on: May 13, 2011, 05:33:29 PM »
*facepalm*

Edit 1: That's fixed now and works! (tried replacing the head with a helmet and is ok. Now just need to make some chopped and bloody neck instead of a helmet and done!

Thank you all very, very much!

Edit 2:
(click to show/hide)

Just need to tweak the textures a bit.

P.S: At the moment of cut some heads no extra blood was flowing, but anyways is really nice!

Ok, I got the head strikes to finally change to the helm same as you did, how do you edit textures and get it like you did?? is there a simple way to do it or do I need to download another editing program?

narandill

  • Regular
  • *
    • View Profile
  • Faction: Neutral
Re: [Kit] Fancy Damage Systems (OSP)
« Reply #106 on: September 25, 2011, 02:05:10 PM »
Hello,

Im working on implementing decapitation to my warband 1.143 multiplayer mod, but I can't get it working correcly. Could someone check my code?

Code: [Select]
#### DECAPITATION
theoris_decapitation = (
   ti_on_agent_hit, 0, 0, [(game_in_multiplayer_mode)],
[
            (store_trigger_param_1, ":victim"),
            (store_trigger_param_3, ":damage"),
            (agent_is_active,":victim"),#v0.4
            (agent_is_human, ":victim"),
            (store_agent_hit_points, ":hp", ":victim", 1),
            (ge, ":damage", 5), #5 for DEBUG
            (ge, ":damage", ":hp"),
            (multiplayer_send_int_to_server, multiplayer_event_decapitation, ":victim"),
            (display_message, "@Cuttoff try is sended to server!", 0xCC0000), #DEBUG
])

Code: [Select]
###### MULTIPLAYER DECAPITATION
#Server event.
(eq, ":event_type", multiplayer_event_decapitation),
   (store_script_param, ":victim", 3),
##      (player_get_agent_id, ":agent_id", ":player_no"),
        (agent_is_active,":victim"),#v0.4
(agent_is_human, ":victim"),
         ### DEBUG
            (str_store_player_username, s31, ":player_no"),
            (multiplayer_send_string_to_player, ":player_no", multiplayer_event_show_server_message, "@Good damage to cut off head!"), #CLIENT SIDE DEBUG
            (display_message, "@DEBUG: {s31} has good damage to cut head off!", 0xCC0000), #SERVER SIDE DEBUG
         ### DEBUG END
(agent_get_position, pos1, ":victim"),
(get_distance_between_positions, ":distance", pos1, pos0),
(is_between, ":distance", 160, 176), # *zing*
(agent_get_item_slot, ":item", ":victim", 4), #head slot
(try_begin),
(ge, ":item", 1),
(agent_unequip_item, ":victim", ":item"),
                (multiplayer_send_string_to_player, ":player_no", multiplayer_event_show_server_message, "@You cutted off enemy head!"),
                (display_message, "@DEBUG: {s31} cutted head off!", 0xCC0000), #SERVER SIDE DEBUG
(try_end),
(agent_equip_item, ":victim", "itm_invisible_head"),
(particle_system_burst, "psys_game_blood_2", pos1, 125), #Blood effect
#(set_spawn_position, pos1),
#(spawn_scene_prop, "spr_physics_head"),
     
   (else_try),
###########
###### MULTIPLAYER DECAPITATION
« Last Edit: September 25, 2011, 02:37:51 PM by narandill »

SonKidd

  • Knight
  • *
    • View Profile
  • Faction: Nord
Re: [Kit] Fancy Damage Systems (OSP)
« Reply #107 on: October 07, 2011, 08:27:00 AM »
Hello,

Im working on implementing decapitation to my warband 1.143 multiplayer mod, but I can't get it working correcly. Could someone check my code?

Code: [Select]
#### DECAPITATION
theoris_decapitation = (
   ti_on_agent_hit, 0, 0, [(game_in_multiplayer_mode)],
[
            (store_trigger_param_1, ":victim"),
            (store_trigger_param_3, ":damage"),
            (agent_is_active,":victim"),#v0.4
            (agent_is_human, ":victim"),
            (store_agent_hit_points, ":hp", ":victim", 1),
            (ge, ":damage", 5), #5 for DEBUG
            (ge, ":damage", ":hp"),
            (multiplayer_send_int_to_server, multiplayer_event_decapitation, ":victim"),
            (display_message, "@Cuttoff try is sended to server!", 0xCC0000), #DEBUG
])

Code: [Select]
###### MULTIPLAYER DECAPITATION
#Server event.
(eq, ":event_type", multiplayer_event_decapitation),
   (store_script_param, ":victim", 3),
##      (player_get_agent_id, ":agent_id", ":player_no"),
        (agent_is_active,":victim"),#v0.4
(agent_is_human, ":victim"),
         ### DEBUG
            (str_store_player_username, s31, ":player_no"),
            (multiplayer_send_string_to_player, ":player_no", multiplayer_event_show_server_message, "@Good damage to cut off head!"), #CLIENT SIDE DEBUG
            (display_message, "@DEBUG: {s31} has good damage to cut head off!", 0xCC0000), #SERVER SIDE DEBUG
         ### DEBUG END
(agent_get_position, pos1, ":victim"),
(get_distance_between_positions, ":distance", pos1, pos0),
(is_between, ":distance", 160, 176), # *zing*
(agent_get_item_slot, ":item", ":victim", 4), #head slot
(try_begin),
(ge, ":item", 1),
(agent_unequip_item, ":victim", ":item"),
                (multiplayer_send_string_to_player, ":player_no", multiplayer_event_show_server_message, "@You cutted off enemy head!"),
                (display_message, "@DEBUG: {s31} cutted head off!", 0xCC0000), #SERVER SIDE DEBUG
(try_end),
(agent_equip_item, ":victim", "itm_invisible_head"),
(particle_system_burst, "psys_game_blood_2", pos1, 125), #Blood effect
#(set_spawn_position, pos1),
#(spawn_scene_prop, "spr_physics_head"),
     
   (else_try),
###########
###### MULTIPLAYER DECAPITATION

ti_on_agent_hit is server side. no need to send multiplayer message. just check condition and execute all code in mission_templates.
SonKidd's Multiplayer Troop Item Generator (v0.9b)
http://forums.taleworlds.com/index.php?topic=197856.0
Shaking Camera Script (Earthquake):
http://mbmodwiki.ollclan.eu/wiki/Shaking_Camera_Script
Script to guarantee all melee weapons:
http://mbmodwiki.ollclan.eu/wiki/Spawn_troops_with_all_melee_weapons