ti_on_shield_hit? Requires WSE usage though.
["long_bow", "long_bow", [("flintlock_pistol",0)], itp_type_pistol |itp_merchandise|itp_primary ,itcf_shoot_pistol|itcf_reload_pistol, 230 , weight(1.5)|difficulty(0)|spd_rtng(38) | shoot_speed(160) | thrust_damage(45 ,pierce)|max_ammo(1)|accuracy(65),imodbits_none,
[(ti_on_weapon_attack, [(,2,300][i]give back damage on shields if hitted target is not a human or scene_prop][/i]"),(position_move_x, pos1,27),(position_move_y, pos1,36),(particle_system_burst, "psys_pistol_smoke", pos1, 15)])]],
On weapon attack fires when the attack begins, so this won't be of any help.Meneldur said:I meant ti_on_weapon_attack for the ranged weapons see
That way it might be detectable anyhow or this is my hope.Code:["long_bow", "long_bow", [("flintlock_pistol",0)], itp_type_pistol |itp_merchandise|itp_primary ,itcf_shoot_pistol|itcf_reload_pistol, 230 , weight(1.5)|difficulty(0)|spd_rtng(38) | shoot_speed(160) | thrust_damage(45 ,pierce)|max_ammo(1)|accuracy(65),imodbits_none, [(ti_on_weapon_attack, [(,2,300][i]give back damage on shields if hitted target is not a human or scene_prop][/i]"),(position_move_x, pos1,27),(position_move_y, pos1,36),(particle_system_burst, "psys_pistol_smoke", pos1, 15)])]],
belendor_sprint = (
0, 0, 60, [(key_clicked, key_o),
(neg|main_hero_fallen)],
[ (store_mission_timer_a, ":timer4"),
(get_player_agent_no, ":player"),
(agent_is_alive, ":player"),
(store_sub, ":timer2", ":timer4", ":time4"),
(store_sub, ":timer3", 10, ":timer2"),
(store_skill_level,":athleticslev","skl_athletics",":player"),
(assign, ":agility", ca_agility),
(store_attribute_level, ":agilitylev", ":player", ":agility" ),
(ge, ":athleticslev", 0),
(ge, ":agilitylev", 0),
(val_mul, ":athleticslev", 2),
(val_mul, ":agilitylev", 2),
(troop_raise_skill,":player","skl_athletics", ":athleticslev"),
(display_message, "@You are sprinting.", 0x6495ed),
(troop_raise_attribute,":player", ":agility", ":agilitylev"),
(try_begin),
(le, ":timer3", 0),
(val_div, ":agilitylev", 2),
(val_div, ":athleticslev", 2),
(store_random_in_range, ":decrease", -5, -15),
(troop_raise_skill, ":player", "skl_athletics", ":decrease"),
(troop_raise_attribute, ":player", ":agility", ":decrease"),
(display_message, "@You are tired of sprinting.", 0x6495ed),
(try_end),
Because there isn't. Skills and attributes are troop-based, meaning all agents of the same troop template share the same skills and attributes. This isn't a problem for SP player sprinting, of course (for heroes--the player/companions), but for MP it means that, if you want sprinting, you'll need a separate troop template for each player on the server or to use the new 1.153 operation:Belendor said:Hm, I will try fixing. One thing, though, I don't see any way to raise skills of the agent.
HYW_AI = (
0.1, 0, 0,
[],
[ (try_for_agents, ":agent"),
(get_player_agent_no, ":player"),
(agent_is_alive, ":agent"),
(agent_is_alive, ":player"),
(neg|agent_is_ally, ":agent"),
(agent_get_attack_action, ":player_act", ":player"),
(agent_get_attack_action, ":agent_act", ":agent"),
(agent_get_defend_action, ":player_def", ":player"),
(agent_get_defend_action, ":agent_def", ":agent"),
(agent_get_action_dir, ":attack_dir", ":player"),
(store_agent_hit_points, ":player_hp", ":player"),
(store_agent_hit_points, ":agent_hp", ":agent"),
(store_enemy_count, ":enemy"),
(store_ally_count, ":ally"),
(agent_force_rethink, ":agent"),
(try_begin), #AI Def
(eq, ":player_act", 2),
(eq, ":attack_dir", 0),
(agent_set_defend_action, ":agent", 0),
#(display_message, "@Down!"),
(else_try),
(eq, ":player_act", 2),
(eq, ":attack_dir", 1),
#(display_message, "@Right!"),
(agent_set_defend_action, ":agent", 1),
(else_try),
(eq, ":player_act", 2),
(eq, ":attack_dir", 2),
#(display_message, "@Left!"),
(agent_set_defend_action, ":agent", 2),
(else_try),
(eq, ":player_act", 2),
(eq, ":attack_dir", 3),
#(display_message, "@Up!"),
(agent_set_defend_action, ":agent", 3),
(try_end), #AI Def
(try_begin), #AI Agressiveness
(le, ":player_hp", 10),
#(display_message, "@Player's HP is below 10..."),
(agent_stop_running_away, ":agent"),
(agent_ai_set_aggressiveness, ":agent", 199),
(else_try),
(gt, ":agent_hp", ":player_hp"),
#(display_message, "@Agent's HP is higher than Player's HP..."),
(agent_ai_set_aggressiveness, ":agent", 199),
(else_try),
(le, ":enemy", 5),
#(display_message, "@Number of the enemy is below 5..."),
(agent_start_running_away, ":agent"),
(else_try),
(gt, ":enemy", ":ally"),
#(display_message, "@Enemy is more in count..."),
(agent_ai_set_aggressiveness, ":agent", 99),
(else_try),
(le, ":agent_hp", 5),
#(display_message, "@Agent's HP is below 5..."),
(agent_start_running_away, ":agent"),
(try_end),
(try_begin),
(eq, ":player_def", 2),
#(display_message, "@Blocking..."),
(agent_ai_set_aggressiveness, ":agent", 299),
(agent_set_attack_action, ":agent", 0, 3),
(try_end),
]
)
I'm guessing you mean you aren't getting the module system to compile correctly? What exactly goes wrong. We're going to need much more detail than "followed tutorials and it doesn't work" to be able to help at all.Harpic said:Im trying to learn how to make a mod and I followed the tutorials but it does not seem to save properly
["great_bardiche", "Great Bardiche", [("two_handed_battle_axe_f",0)], itp_type_two_handed_wpn|itp_merchandise|itp_two_handed|itp_primary|itp_bonus_against_shield|itp_wooden_parry|itp_unbalanced|itp_next_item_as_melee, itc_nodachi|itcf_carry_axe_back,
617 , weight(5.0)|difficulty(10)|spd_rtng(89) | weapon_length(116)|swing_damage(50 , cut) | thrust_damage(0 , pierce),imodbits_axe ],
["great_bardiche_thrown", "Great Bardiche", [("two_handed_battle_axe_f",0)], itp_type_thrown|itp_primary, itcf_throw_axe|itcf_carry_axe_back,
617 , weight(5.0)|difficulty(2)|spd_rtng(95) | weapon_length(116)|swing_damage(60 , cut) | thrust_damage(0 , pierce)|max_ammo(1),imodbits_thrown ],
...right...you want the thrown version to be itp_type_thrown, not crossbow. Why would you mark it as crossbow?The_dragon said:but if instead of itp_type_thrown i put itp_type_crossbow,it shoots but it shoots with some kind of arrows and the sound is as a crossbow...
Sigh.The_dragon said:so first melee and then ranged is impossible?
Caba`drin said:It doesn't work that way. itp_next_item_as_melee means exactly what it says; you have to put the ranged weapon first with the flag on it and the melee weapon second.
I think you can mark the melee version as merchandise and not the thrown weapon, however, to get roughly the same outcome.
(multiplayer_get_my_player, <destination>),
(get_player_agent_no,<destination>),