Author Topic: Have a question about Modding? Ask Here!  (Read 315785 times)

0 Members and 1 Guest are viewing this topic.

Offline Parrot

  • Donator
  • *
  • Posts: 762
  • Lieutenant Colonel - Equestrian Foreign Legion
    • View Profile
    • EQFL Homepage
  • Nick: ExParrot
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #690 on: March 04, 2014, 08:20:08 pm »
Sorry Parrot I forgot to answer you (I'm drunk a bit :P ). It won't work. Taleworlds did it's best to make our lifes harder and mirroring animation will give use nothing, as openbrf will automaticly change bones. So hand which is on the right side will always be right hand and the one on the left side will be left hand :) Normally musket is in the right hand, so if I get rid of 'stick to whatever hand' flags, musket will be in right hand.

Hmm, that's not the results I got when mirroring animations. The reload animation I added to my NW mod was mirrored: with the normal version of that animation, the "ramrod" was basically the musket, so you'd get this crazy musket waving dance thing; until I mirrored the animation that is :P

(what are you drinking? ;) )
Check out mods I've worked on: Blood and Iron: Age of Imperialism, and North and South!

Offline Raddeo

  • Brigadier General
  • *
  • Posts: 396
  • One, who prefer to be Comrade that Human Resource
    • View Profile
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #691 on: March 04, 2014, 09:06:55 pm »
Aye, you're right. In the original version musket was in right hand. And ramrod in left one. When you mirrored animation right hand became left one. But musket is still in 'new' right hand. It moves like left hand before mirroring, but it's still on right side of the body. Important matter is, that position of musket in left hand is different than position of musket in right hand. Normally musket is kept in right hand on the trigger and in the left hand in the middle of the barrel. So if you mirrored animation musket was still in right hand (kept on trigger). I need to force game to hold it in the middle of barrel all the time. So mirroring animation won't help because musket will still me held on trigger (in new right hand), not on the barrel, just moves of arm will change. And I don't want to change those moves, as they are fine now.

(What can real Polish guy drink? Vodka of course :D )
« Last Edit: March 05, 2014, 12:34:11 am by Raddeo »
There is a story that scientists built an inteligent computer.
The first question they asked it was "Is there a God?"
The computer replied "There is now."
And the bolt of lightning struck the plug,
So it couldn't be turned off.

Offline Raddeo

  • Brigadier General
  • *
  • Posts: 396
  • One, who prefer to be Comrade that Human Resource
    • View Profile
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #692 on: March 06, 2014, 08:20:35 pm »
DanyEle, so you don't have any other ideas how to solve this? Becaue we still didn't achieve to get rid of this problem :)
There is a story that scientists built an inteligent computer.
The first question they asked it was "Is there a God?"
The computer replied "There is now."
And the bolt of lightning struck the plug,
So it couldn't be turned off.

Offline DanyEle

  • FSE Associate
  • ***
  • Posts: 517
  • Sssh! I'm coding, don't disturb :D
    • View Profile
  • Nick: DanyEle
  • Side: Confederacy
Re: Have a question about Modding? Ask Here!
« Reply #693 on: March 06, 2014, 11:26:48 pm »
I really have yet to figure out what the actual problem is, honestly, you lost me with all those long drunk paragraphs :D .Try to explain it in 2 lines at maximum, please.



Offline Raddeo

  • Brigadier General
  • *
  • Posts: 396
  • One, who prefer to be Comrade that Human Resource
    • View Profile
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #694 on: March 07, 2014, 12:18:25 am »
Ignore drunk posts, they were to Parrot :)

Two lines? Everytime when animation ends, musket is switched to right hand for a while. That's all :) Here's short movie, on which you can see what's going on. All the time musket is in left hand and then, just for a short moment is jumps to right hand. I've done some tests by adding arf_cyclic flag and it came out, that this strange 'jump' appear every time when time of animation ends.
There is a story that scientists built an inteligent computer.
The first question they asked it was "Is there a God?"
The computer replied "There is now."
And the bolt of lightning struck the plug,
So it couldn't be turned off.

Offline DanyEle

  • FSE Associate
  • ***
  • Posts: 517
  • Sssh! I'm coding, don't disturb :D
    • View Profile
  • Nick: DanyEle
  • Side: Confederacy
Re: Have a question about Modding? Ask Here!
« Reply #695 on: March 07, 2014, 02:16:10 pm »
Okay, i think there is one wrong frame in your animation. I dont know what program you use for animation editing, but browse it frame by frame and fix the frame where your musket is held in the wrong hand, or leave that out in module_animations. Also you might try to make it last just for 2 frames and see how it goes

EDIT: could you please copy here the code from module_animations your animation uses?
« Last Edit: March 07, 2014, 02:19:55 pm by DanyEle »



Offline Raddeo

  • Brigadier General
  • *
  • Posts: 396
  • One, who prefer to be Comrade that Human Resource
    • View Profile
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #696 on: March 07, 2014, 03:46:48 pm »
It's just one frame. So it can't be in any way broken. Whole animation has something like 7 frames, but NW is using only one of them. I already tried to change amount of frames (it was your first advice), but it changed nothing. The same problem appers with Native crossbows using Native animation and with NW muskets using NW animations, so it's probably not fault of my animation.

Here's a code. It's just original NW code with arf_stick_item_to_left_hand flag.
Code
["ready_musket", acf_rot_vertical_bow|acf_anim_length(100), amf_priority_attack|amf_client_owner_prediction|amf_keep|amf_rider_rot_crossbow|amf_use_weapon_speed, 
   [1.5, "ready_musket", 2, 2, arf_stick_item_to_left_hand|blend_in_ready],
],
There is a story that scientists built an inteligent computer.
The first question they asked it was "Is there a God?"
The computer replied "There is now."
And the bolt of lightning struck the plug,
So it couldn't be turned off.

Offline DanyEle

  • FSE Associate
  • ***
  • Posts: 517
  • Sssh! I'm coding, don't disturb :D
    • View Profile
  • Nick: DanyEle
  • Side: Confederacy
Re: Have a question about Modding? Ask Here!
« Reply #697 on: March 07, 2014, 09:34:40 pm »
Code
 ["ready_musket", acf_rot_vertical_bow|acf_anim_length(100), amf_priority_attack|amf_keep|amf_client_owner_prediction|amf_rider_rot_crossbow|amf_use_weapon_speed, 
   [1.5, "ready_musket", 2, 2, blend_in_ready],

This is the original code from NW. My suggestion is: remove  arf_stick_item_to_left_hand and edit the animation to use a different wielding hand.



Offline Raddeo

  • Brigadier General
  • *
  • Posts: 396
  • One, who prefer to be Comrade that Human Resource
    • View Profile
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #698 on: March 07, 2014, 10:04:41 pm »
I know how original code from NW looks :) I'm not sure whether I understand you suggestion correctly. Is that possible to force game to wield musket in left hand without this flag and only by editing animation? Or do you suggest to use right hand wielding? Second option is not possible as it's very important to have this gun sticked to left hand.
There is a story that scientists built an inteligent computer.
The first question they asked it was "Is there a God?"
The computer replied "There is now."
And the bolt of lightning struck the plug,
So it couldn't be turned off.

Offline DanyEle

  • FSE Associate
  • ***
  • Posts: 517
  • Sssh! I'm coding, don't disturb :D
    • View Profile
  • Nick: DanyEle
  • Side: Confederacy
Re: Have a question about Modding? Ask Here!
« Reply #699 on: March 08, 2014, 03:11:02 pm »
Okay, i've been experimenting a bit with it, and it looks like the animation restarts according to this function . y = x*4  . X = the time you specified in module_animations

Code
[1.5,

and Y = the time after that the weapon gets wielded in the right hand(i made some tests and while x was 5, it lasted for 30 seconds, if it was 20, it reset after 60 seconds and so on...) . So assuming no one would be aiming for longer than 15 seconds, we can  consequently set the total overdue if it wasn't for the fact that number also influences the delay between the aiming and shooting: you cannot shoot until X seconds after that animation is played and your character will be stuck in that pose for a longer time if you increased it. So i tried to modify also the release animation code and see if it could override the aiming, but that's not made any different ,so I came to the conclusion that this code would probably be the best balance: the animation restarts after 10 seconds, but allows you to shoot just after 2.5 seconds you've been aiming. I tried to change animation priorities, but nothing's changed. I guess a new aiming system would be needed if you wanted to go beyond Warband's limits.

Code
 ["ready_musket", acf_rot_vertical_bow|acf_anim_length(100), amf_priority_attack|amf_keep|amf_client_owner_prediction|amf_rider_rot_crossbow|amf_use_weapon_speed, 
   [2.5, "ready_musket", 2, 2, arf_stick_item_to_left_hand|arf_blend_in_3],
   ],



Offline Raddeo

  • Brigadier General
  • *
  • Posts: 396
  • One, who prefer to be Comrade that Human Resource
    • View Profile
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #700 on: March 09, 2014, 12:48:09 am »
Hmm... I'm afraid it's not a solution for me. Noone will use my mod, if it forces him to shoot slower than someone without mod. I guess it would be better to leave mod with this bug. But anyway, thanks for trying to help me. Of course I'll continue looking for another solution, maybe I'll discover something new ;) Can I just have one more question? What does those 'arf_blend_in_[number] do? There's a lot of such flags in header_animations.py and I have no idea what they're for. I see that you've used one of them in your code, so maybe you can help me to understand them?
There is a story that scientists built an inteligent computer.
The first question they asked it was "Is there a God?"
The computer replied "There is now."
And the bolt of lightning struck the plug,
So it couldn't be turned off.

Offline Raddeo

  • Brigadier General
  • *
  • Posts: 396
  • One, who prefer to be Comrade that Human Resource
    • View Profile
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #701 on: March 09, 2014, 01:12:56 pm »
Heh... I've got some progress :) It seems that amf_use_cycle_period flag can force gun to stay in one hand all the time (only once at the beginning this appers, but it's not big problem). I have no idea how, but it helps. But now problem is that player don't have to wait 1,5 seconds to fire. And if he fires before this time, then he can see client-side shoot but in fact musket doesn't fire on the server. Do you have any idea how to force game to wait this 1,5 second to avoid launching this bug? Sorry for overworking your kindness, but you're probably only one who can help me :)
There is a story that scientists built an inteligent computer.
The first question they asked it was "Is there a God?"
The computer replied "There is now."
And the bolt of lightning struck the plug,
So it couldn't be turned off.

Offline Penn

  • Lieutenant Colonel
  • *
  • Posts: 1839
  • If music be the food of love, play on.
    • View Profile
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #702 on: March 12, 2014, 06:16:03 pm »
Why does this keep happening? I exported a uniform from one faction to replace it in another faction.



As you can see, the uniform is stuck in place, not following any animation patterns.
What am I doing wrong? Thanks!
Penn and shitz

Offline DanyEle

  • FSE Associate
  • ***
  • Posts: 517
  • Sssh! I'm coding, don't disturb :D
    • View Profile
  • Nick: DanyEle
  • Side: Confederacy
Re: Have a question about Modding? Ask Here!
« Reply #703 on: March 12, 2014, 07:00:10 pm »
Heh... I've got some progress :) It seems that amf_use_cycle_period flag can force gun to stay in one hand all the time (only once at the beginning this appers, but it's not big problem). I have no idea how, but it helps. But now problem is that player don't have to wait 1,5 seconds to fire. And if he fires before this time, then he can see client-side shoot but in fact musket doesn't fire on the server. Do you have any idea how to force game to wait this 1,5 second to avoid launching this bug? Sorry for overworking your kindness, but you're probably only one who can help me :)

I'd like to help but i dont have the time lately, sorry. Just try to experiment a bit more or go ahead and recode an entire shooting system like IE :D



Offline Raddeo

  • Brigadier General
  • *
  • Posts: 396
  • One, who prefer to be Comrade that Human Resource
    • View Profile
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #704 on: March 12, 2014, 07:13:25 pm »
Dany, ok, anyway, thanks for everything :)

Penn, rigging is the key. Just copy another uniform with similar shape and then use 'paste rigging' option on your new uniform.

There is a story that scientists built an inteligent computer.
The first question they asked it was "Is there a God?"
The computer replied "There is now."
And the bolt of lightning struck the plug,
So it couldn't be turned off.