fist weapons

正在查看此主题的用户

Leopardo

Sergeant Knight
hi, i would like to know how i can make a weapon attack like a fist, like a katar for example
what's the fist animation line?

thanks
 
["ready_swingright_fist", 0,
  [ready_durn, "right_swing", 0, 15, blend_in_ready],
],
["release_swingright_fist", 0,
  [0.5, "right_swing", 15, 41, arf_blend_in_3],
],
["parry_swingright_fist", 0,
  [attack_parry_duration, "anim_human", combat+4013, combat+4008, blend_in_parry],
],

["ready_swingleft_fist", 0,
  [ready_durn, "anim_human", combat+4300, combat+4300, blend_in_ready],
],
["release_swingleft_fist", 0,
  [0.5, "anim_human", combat+4300, combat+4335, arf_blend_in_0],
],
["parry_swingleft_fist", 0,
  [attack_parry_duration, "anim_human", combat+4313, combat+4308, blend_in_parry],
],


["ready_direct_fist", 0,
  [ready_durn, "direct_fist", 0, 16, blend_in_ready],
],
["release_direct_fist", 0,
  [0.5, "direct_fist", 17, 36, arf_blend_in_0],
],
["parry_direct_fist", 0,
  [attack_parry_duration, "anim_human", combat+4613, combat+4608, blend_in_parry],
],
["ready_uppercut_fist", 0,
  [ready_durn, "uppercut", 0, 17, blend_in_ready],
],
["release_uppercut_fist", 0,
  [0.5, "uppercut", 17, 34, arf_blend_in_0],
],
["parry_uppercut_fist", 0,
  [attack_parry_duration, "anim_human", combat+4913, combat+4908, blend_in_parry],
],

["defend_fist", acf_rotate_body,
  [defend_duration, "anim_human", combat+4950, combat+4960, blend_in_defense],
],
["defend_fist_keep", acf_rotate_body,
  [2.0, "anim_human", combat+4950, combat+4960, arf_blend_in_2|arf_cyclic],
],
["defend_fist_parry", acf_rotate_body,
  [0.3, "anim_human", combat+4962, combat+4970, arf_blend_in_0],
],
 
ok thanks but...
what should I write in the weapon line in the module_item file?
it looks quite complicated
 
thanks, i know how to put a weapon in game, i just don't know what to do with the big code jik gave me...
 
unless you create the attack script yourself, you are limited to setting the attack type flags found in header_items.py
 
Leopardo 说:
so... what should i do?

thanks for helping btw

I would copy a dagger, make an object that is too small to see as the weapon object.  Set the attack type flags (eg. itcf_slashright_onehanded).  This is the easiest way to do what you want.  Also add the unique flag so no one can loot it.  Not the prettiest looking fist attacks, but it works.
 
ok, heres a try of wolverine's claws, but the attacking isn't really good so... I don't think imma continue trying...
mb14.png
 
did you set it up like a dagger?  What exactly have you tried.  What you are trying for is not that hard.  How did you define the weapon in items.py?
 
["kgjhnife",        "XXClaws", [("Claws",0)], itp_type_one_handed_wpn|itp_merchandise|itp_primary|itp_secondary|itp_no_parry, itcf_slashright_onehanded, 14000 , weight(0.5)|difficulty(0)|spd_rtng(110) | weapon_length(40)|swing_damage(21 , cut) | thrust_damage(13 ,  pierce),imodbits_sword ],
 
Sorry for my question if it sounds stupid, I'm not a coder.  It's OK that I copy the new animation lines into the, module_animations.py, but how can I create a new itcf (e.g. itcf_claw) to connect the new animations to the item in the items.py?
 
DtheHun,

The animations used are tied to the weapon definition.  itcf_thrust_onehanded would allow you to thrust with the weapon 1 handed.  They are all defined at the bottom of header_items.py.  You could make a weapon both 1 and 2 handed by picking some attacks (such as thrust or swings) as onehanded, and the overswing as 2 handed.  If you don't add one of the types (and note that they define some types to be a combination of flags) you cannot swing that way.

Leopardo,

Ya, the animations are not soo good doing this.  It would be nice if you could also pick the unarmed (punch) animations, but I don't know how to do that, unless you do it manually.  This would mean that you would have to make your own trigger that checks for this weapon and disables the standard attacking.  I'vev done something similar, so I know you can do it.  Then if you wanted you could make a global var that would keep track of the last swing type you used, and make sure to use different ones each time (going into controlling which swing by where the enemy is in relation to the cursor would be fun to try... maybe not...  :wink: ).
 
a punch animation is exactly what i am looking for, but when you say you did something similar, do you mean you just went and tried random things (i suppose not) or did you found any tutorials (when you were beginner) to teach you how to master all of these complicated things... or are you... a genius?
i'm sure with some time and lot of work i'm able to get the solution... i just don't know where to start

thanks  :wink:
 
Couldn't you use the animation of the actaual punches in game, and the claws look a little long for wolverine
 
yes, they are long, but i didn't want to make claws, those are just to see how he attacks, and i don't know how to use the animations, punches aren't like sword with sword_onehanded.ctf things, so unless you know how to do you could lend me a hand and give me the magical formula...
 
Thanks for the quick answer jik!

jik 说:
The animations used are tied to the weapon definition.  itcf_thrust_onehanded would allow you to thrust with the weapon 1 handed.  They are all defined at the bottom of header_items.py. 

I see that the already available weapon capabilities are defined at header_items.py, like the thrusts and swings. My problem is there is no flag for punch animation. That's why I would like to try the animations you have spoiled before, but there is the missing step for me. May I add new itcf lines to the header_items.py? And how can I tie them to the new animations in the module_animations.py?
 
ok, well, I'm not sure if any of you remember my posts about the jousting stuff?  Well, I'm no genius...  Still can't get the right animation for a horseback 1 handed thrust of a lance...

Anyway, what I did was look at the various operations in header_operations.py.  Then I looked at other codes that do attack like stuff such as the shield bash and spear brace.  In mission_templates I did an override of when the attack key is pressed and made it do the animation I wanted.  I did a few other things (since in the jousting you can only attack once), but the trick will be in to coding this to work with multiple enemies.  I only have 1 target and I based it all off of the range when you attack.  I have yet to nail down the directional targeting.

This can be done (I'm sure the catapult in AoM is more complex), but I have not had the time to work on it any more.  Working on another project.  I can post the code for the jousting if you want to see.  It will have to wait till later tonight or tomorrow.
 
Feeling generous...

##Special Triggers/keys with functionality
##player Joust control
(0,0,0,[(gt,"$joust_key",-1),(game_key_is_down, gk_attack),],       
[(get_player_agent_no,":player"),
(neg|agent_slot_eq,":player",slot_agent_jousting,-1),            ###Can only thrust 1 time
(agent_set_animation, ":player", "anim_ready_joust"),
(assign,"$joust_key",1),
]
),
(0,0,0,[(gt,"$joust_key",0),(neg|game_key_is_down, gk_attack),],
[(get_player_agent_no,":player"),
(assign,":victim",-1),
(neg|agent_slot_eq,":player",slot_agent_jousting,-1),            ###Can only thrust 1 time
(agent_get_slot,":victim",":player",slot_agent_joust_victim),    ##need to know target for distance checks
(agent_is_alive,":victim"),                                      ##FAILSAFE
(agent_get_position,pos11,":player"),
(agent_get_position,pos12,":victim"),
(get_distance_between_positions,":p_range",pos11,pos12),        ##See how far away you are
(try_begin),
(gt,":p_range",600),
(display_message,"@You thrusted too early!"),
(agent_set_animation, ":player", "anim_release_joust"),
(agent_set_slot,":player",slot_agent_jousting,-1),            ##they have thrusted too early, no more chances
(else_try),
(le,":p_range",399),
(display_message,"@You thrusted too late!"),
(agent_set_animation, ":player", "anim_release_joust"),
(agent_set_slot,":player",slot_agent_jousting,-1),            ##they have thrusted too late, no more chances
(try_end),
(neg|agent_slot_eq,":player",slot_agent_jousting,-1),            ###FAILSAFE - Late/Early strike, not action taken
(call_script,"script_joust_unhorsing",":victim",":player",":p_range"),    ##Send the victim agent and the range that this happens
(assign,"$joust_key",-1),                                        ##stop the triggers from being used again
]
),

2 triggers, one for holding down the key, one for releasing (making the attack).  What I did was to not give the weapon any attack flags, so in essence, the only way to make it attack was to check for the key press and do it manually.  Doing this will only get you the animation.  You would have to do the targeting and attack damage yourself.
 
Hmm... This special attack button sounds good. It looks like, I have to disable the weapon attacks somehow, if I want to see the unarmed punch animations. Counting the successfull normal attacks and parries would raise the damage multiplier of the special attack. Just like the player weakens and gets on to the enemy.
I know nothing about targeting, that's too bad! This is far beyond my module system cognition.

Anyway, thanks jik for your mercy!  :mrgreen:
 
后退
顶部 底部