Author Topic: [LSP][Code][Anim] Spear "Two-Attack Direction" Solution Kit [Update]  (Read 14841 times)

0 Members and 1 Guest are viewing this topic.

Sahran

  • Grandmaster Knight
  • *
  • B-E-N-D-E-R! BEEEENNNDER! B-E-N-D-E-R!
    • View Profile
  • Faction: Sarranid
Credits:

Papa Lazarou's great work (used for underhand thrust): http://forums.taleworlds.com/index.php/topic,134185.0.html

Moderation: The animations only allow for use by other modders in their (mod) projects. Code itself can be considered OSP

The folks in the topic who've offered some critiques and help!



What this does:

-Spears on foot are able to attack in two directions. Up (overhand) and Down (Underhand).
-Spears on horseback are only able to thrust underhand (Down)

-1h weaponry are now unaffected by this change.


Installation for players
http://www.sendspace.com/file/aoiqw7
http://www.mediafire.com/?i4r7g492z4rn7p1
Drop the text files (actions & items_kind) into your module's folder. Add animation_two_spear_strike to your load_module_item list in the module text file. All spears are adjusted to be able to attack up and down - lances are not touched. So unless I left a bug in there, it should work for you just to drop in and play. If you have an existing item file you want to adjust to:

1) Make Spears swing and thrust damage the same damage and damage type (pierce)
2) You have to make sure that spears are classified as 'itc_staff' in the python file. This'll let them attack up and low, so I am not sure how to do it just with text files.

=======================================================================================================================

Installation for Modders
http://www.sendspace.com/file/oe7p9x
http://www.mediafire.com/?uqbtpniq5rjwdlk

Use the included python files, make sure you add the animation_two_spear_strike to the load_module_items list.

In Text Files

Make all spears have the same swing damage + damage type (pierce) as their thrust + thrust damage type (pierce).

Highly suggest adding the itp_no_blur to spears, as otherwise their overhand thrust blurs really silly like.

In the python files, what you have to edit:

header_items: Replace itc_staff's line with this:

Code: [Select]
itc_staff      = itc_parry_polearm| itcf_thrust_onehanded_lance |itcf_thrust_onehanded_lance_horseback | itcf_overswing_musket | itcf_overswing_polearm |itcf_thrust_polearm|itcf_slashright_polearm|itcf_slashleft_polearm

module_animations: More complicated. You need to find and replace the following entries:
(click to show/hide)
« Last Edit: June 20, 2018, 02:06:24 PM by Duh »


Efe Karacar

  • Duke
  • *
  • aka Belendor
    • Steam - Belendor
    • Twitch.tv - Belendorr
    • YouTube - Belendor
    • View Profile
    • Art of Efe Karacar
  • Faction: Swadian
  • MP nick: Belendor
  • WBWF&SNWVCM&B
Re: [Code + Animation] Spear "Two-Attack Direction" Solution
« Reply #1 on: June 12, 2012, 10:50:16 AM »
A revolutionary feature, good work. :)

Beobart

  • Baron
  • *
  • Nude n´ Drunken
    • View Profile
  • Faction: Nord
  • MP nick: Big_Bad_Wolf
Re: [Code][Anim] Spear "Two-Attack Direction" Solution
« Reply #2 on: June 12, 2012, 08:41:13 PM »
Pretty awesome.
Früher war mehr substanzloser Krawall.

CTCCoco

  • Knight at Arms
  • *
    • Steam - CTCCoco
    • View Profile
    • Calradia Slave Rebellion
  • Faction: Neutral
  • WBNW
Re: [Code][Anim] Spear "Two-Attack Direction" Solution
« Reply #3 on: June 12, 2012, 08:52:19 PM »
Looking good!
Calradia Slave Rebellion
Programmer, Game Developer, Modder & Webmaster

David Xavier Salazar

  • Sergeant Knight at Arms
  • *
    • View Profile
  • Faction: Neutral
  • M&BWBWF&SNWVC
Re: [Code][Anim] Spear "Two-Attack Direction" Solution
« Reply #4 on: June 13, 2012, 03:13:41 AM »
This is something I have been waiting to see in warband for SOOO long time!  This have been HUGELY missing from warband itself and I am very blessed to see this mod released!  You are our hero!  It always seem not right when there is 'lower thrust blocking" that block thrusting weapon from anywhere from top to bottom and this mod solve that problem.

:)


Eagle out...

Somebody

  • Code Pope
  • Baron
  • *
    • View Profile
  • Faction: Bandit
  • WBWF&S
Re: [Code][Anim] Spear "Two-Attack Direction" Solution
« Reply #5 on: June 13, 2012, 05:20:13 AM »
What about blocking directions? Play with the tutorial and see if the trainer bots will respond to the prompted direction.

Sahran

  • Grandmaster Knight
  • *
  • B-E-N-D-E-R! BEEEENNNDER! B-E-N-D-E-R!
    • View Profile
  • Faction: Sarranid
Re: [Code][Anim] Spear "Two-Attack Direction" Solution
« Reply #6 on: June 13, 2012, 06:54:07 AM »
Appreciate the kind words, I hope other mods will make use of it as I'm really a fan of spear combat and hated how 'gimped' I felt. Of course for multiplayer mods like CRPG it is a bit less viable because it changes the expected block direction (Players used to blocking up to deflect a downward blow will not block it).

Somebody:

The AI blocks perfectly fine in tutorial. I attempt an 'up' attack with the sword (a thrust overhand) and he blocks it. I attempt a 'down' attack with the sword (a swing down) and he blocks it. The block animations aren't quite where I want them, since they are designed for the vanilla method (a high block for a overswing or up attack, a low block for a thrust or down attack), but I am not sure how I could go about changing it looking at the code myself.

Might give it a try in the near future, but not just yet.
« Last Edit: June 13, 2012, 07:14:48 AM by Sahran »


DrTomas

  • Duke
  • *
  • Smelly Noble and A Peasant
    • View Profile
  • Faction: Neutral
  • WB
Re: [Code][Anim] Spear "Two-Attack Direction" Solution
« Reply #7 on: June 13, 2012, 07:41:19 AM »
Neat Sahran. When I get the time I'll try it out and shove it in 1257ad(if there's no problems that is). :o
Being an alcoholic is historically correct.

Sahran

  • Grandmaster Knight
  • *
  • B-E-N-D-E-R! BEEEENNNDER! B-E-N-D-E-R!
    • View Profile
  • Faction: Sarranid
Re: [Code][Anim] Spear "Two-Attack Direction" Solution
« Reply #8 on: June 13, 2012, 08:21:31 AM »
Of course DrTomas, I'd love to see it in 1257.  :D


Kazzan

  • Baron
  • *
    • View Profile
  • Faction: Neutral
  • M&BWBNW
Re: [Code][Anim] Spear "Two-Attack Direction" Solution
« Reply #9 on: June 13, 2012, 10:54:45 AM »
itcf_overswing_musket works with a shield, meaning you use it as a onehanded overhead thrust if you replace the animations so that you don't have to sacrifice the regular onehanded overhead.
You can also add itp_no_blur to the item in module_items to remove the blur of the weapons.
- Fredelios
« Last Edit: June 13, 2012, 11:30:20 AM by Kazzan »
 

Sahran

  • Grandmaster Knight
  • *
  • B-E-N-D-E-R! BEEEENNNDER! B-E-N-D-E-R!
    • View Profile
  • Faction: Sarranid
Re: [Code][Anim] Spear "Two-Attack Direction" Solution
« Reply #10 on: June 13, 2012, 11:53:30 AM »
That's so? Well that's great and slightly bad (as it makes my work moot!  :mrgreen:). But since that would avoid having to change the attack directions it'd make the code much more viable for multiplayer-centric mods.

I am going to be giving my PC to tech people to upgrade for a day or so - I am not sure if I'll be able to/wanting to code on my laptop, but I will try that out soon Kazzan. I appreciate the heads up about that.



Sahran

  • Grandmaster Knight
  • *
  • B-E-N-D-E-R! BEEEENNNDER! B-E-N-D-E-R!
    • View Profile
  • Faction: Sarranid
Re: [Code][Anim] Spear "Two-Attack Direction" Solution
« Reply #11 on: June 14, 2012, 01:30:30 AM »
Kazzan: That system works on foot. However when I am on horseback it seems to lock me into one attack direction - thrusting. Overswing musket doesn't seem to work on horseback. If people really don't like the switch in attack directions I could make a version where it just benefits the foot spearmen (thereby not requiring the mojo of changing up-down attacks). But for now I'll stick with the current system - I always hated how I'd be riding on horseback and thrust and some guy would easily block the spear strike since it's only one attack direction.



Tajulek

  • Sergeant
  • *
  • Retired best-worldwide cavalryman
    • Steam - tajulek
    • Twitter - Tajulek
    • View Profile
  • Faction: Rhodok
  • MP nick: Tajulek
  • M&B
Re: [Code][Anim] Spear "Two-Attack Direction" Solution
« Reply #12 on: June 26, 2012, 09:46:06 AM »
I tried all ways you mentioned and... it doesn't work.  ;/ Can you help me? :) I tried with .py files using a way for modders.

Wibbler

  • Regular
  • *
    • View Profile
  • Faction: Neutral
  • MP nick: Wibbler
Re: [Code][Anim] Spear "Two-Attack Direction" Solution
« Reply #13 on: July 07, 2012, 08:45:37 PM »
(Bit of a late response but...)


Could you describe what you did and what happens when you compile/create a game Tajulek? Works perfectly for me!  :)

Sahran

  • Grandmaster Knight
  • *
  • B-E-N-D-E-R! BEEEENNNDER! B-E-N-D-E-R!
    • View Profile
  • Faction: Sarranid
Re: [Code][Anim] Spear "Two-Attack Direction" Solution [Bug to be fixed]
« Reply #14 on: July 10, 2012, 10:12:59 AM »
I just realized a potential problem. It may be that thrust damage is based on attack direction rather than animation. In which case this OSP will be redone (as it means your swing does thrust damage, your thrust does swing damage).

The good news is that Kazzan's technique will fix it. Spears would just have thrust and swing damage be the same. The bad news is when I tried kazzan's method it didn't work for cavalry, so they'll be stuck with one thrust attack but infantry wont. This'll be determined once I do some simple testing (make thrust damage 0, swing damage some insane amount. If the enemy dies instantly when I thrust then it means what I wrote above. If it uses animation to determine thrust damage, then we're good).


Used one of our Naue swords as a basis. Swing damage was 0, Thrust damage was 100. Unfortunately when I slashed down (up attack) it counted as a thrust, and I killed them instantly vs not doing any damage.

So I'll be switching to Kazzan's method in a day or so then upload the necessary files. My bad for not testing this before folks!
« Last Edit: July 10, 2012, 10:19:33 AM by Sahran »