Visionhunter wrote:
Papa wrote:
my sawn-off mod.
Link?
My mistake, it was a poor choice of words. I extended my in-game arsenal with several weapons, but released none. I do not intend to, either. I can show you how to tweak the animations:
1. Go into models/ and find soldier_animations.xml. Open it, I suggest with Notepad++ (Even notepad will do).
2. Find the animation with the comment "reloading" (For me it is on line 738). Copy all of it.
3. Paste it at almost the very bottom of the file, right above the line that says "</animations>".
4. In the first line of the part you pasted, you should see the following:
Code:
<animation loop="0" end="1.140000" speed="0.600000" comment="reloading">
5. This is where information about the animation is given. I will go over the values from what I figured out. These may be wrong, but from my tests this works:
A. loop: 0 means no loop, 1 means loop. This lets the game know if the animation is to be repeated. Notice that on line 738, the basic reloading animation is not in loop. However, the one-at-a-time-reload animation, found on line 1971, is on loop.
If you want both shots to be reloaded at once, make sure this value is 0 in your newly created animation.
B. end: The time in seconds the animation takes. Very basic. This lets you control the duration.
C. speed: A factor that "end" is multiplied by to produce the final time the animation takes. I assume this is for tweaking purposes, so the devs do not need to input very specific values for "end". Keep it at 1 and everything will be okay.
D. comment: This is just a comment on the animation, so you know what it is. I suggest putting a number in here, it will be useful after.
IF YOU ONLY ADDED THIS ANIMATION AND YOU ARE USING THE MOST RECENT VERSION AS OF THIS POST, GIVE THAT ANIMATION NUMBER 76.6. Save and exit the file. Now go into your sawn_off.weapon file and find <animation key="reload" ref="x">.
7. Change x to 76.
8. Save, and run the game.
What you did here is create an animation that is identical to the basic reload animation, and (I'm guessing) changed the animation's speed. You then changed your new weapon to use that animation.
One more thing: Make sure "reload_one_at_a_time" is equal to 0 in your .weapon file. I do not know what will happen if it's not, but my guess is bad things.
Cheers!