Cartwheels/flips AND rolls... I need a little help with this one :)

Get support for anything JK2 related, find tutorials for in-game and modding topics, and post any suggestions for the site here.
Post Reply
wramsay
Posts: 1
Joined: 14 Apr 2016, 21:41

Cartwheels/flips AND rolls... I need a little help with this one :)

Post by wramsay »

Ok so when it comes to coding i have next to no experience so i am in need of help.

First off we all know that jedi knight outcast is a great game, but if you can make a great thjing even greater than why not :D

I wanted Kyle to be a bit more acrobatic so I have managed to make it so Kyle (or whichever protagonist skin you use) does flips and cartwheels in SP and MP instead of the regular roll and that was easy enough. now however i would like to make it so you could both roll AND cartwheel (on different key/gamepad binds) as i feel it would introduce a new element to game play being able to chose to dodge low or high.

The only way I could get the cartwheels to cover the appropriate distance properly and still look natural was to swap out the roll animation for the arial cartwheel animation, in the animation.cfg file (don't worry i saved the original file), consequently Kyle can no longer roll.

But i was wondering if there was a way to create an executable custom.cfg file which would swap my modified animations back to the original animations while i was IN GAME. That way i could key bind that executable file and effectively toggle custom animations on/off? would something like this be possible??? or am i barking up the wrong tree here is there an easier way to do this??

also i'm new here... so hi everyone :D
User avatar
Boothand
Administrator
Posts: 986
Joined: 24 Feb 2015, 08:21
Contact:

Re: Cartwheels/flips AND rolls... I need a little help with this one :)

Post by Boothand »

Switching out the animation.cfg is an interesting idea, but I'm fairly certain it would not have an effect until you loaded the map back again, even if you managed to somehow switch it. Daggolin can probably answer more technically.

The alternative would be to make an extra animation and trigger it. From a serverside point of view, this isn't a problem, and I've done it with saber animations for a serverside mod. It does require a little journey through the code, adding the animation to various structures and such. If you plan to do this in multiplayer, on standard servers, I begin to understand why you want to switch it out at runtime.

Not sure what restrictions apply if you wanted to do this clientside, but I suppose it should be possible to toggle the animation in the clientside, granted that you're aware that it would not be registered by the server, and what you see is not what you get, in terms of.. collision, etc.
Kevin
Administrator
Posts: 393
Joined: 07 Jun 2015, 08:36

Re: Cartwheels/flips AND rolls... I need a little help with this one :)

Post by Kevin »

Simply changing animations in animation.cfg would only affect yourself / would be clientside, so everybody else would just see you roll. :)
User avatar
Miso
Posts: 170
Joined: 24 Feb 2015, 02:41
Location: Massachusetts / United States

Re: Cartwheels/flips AND rolls... I need a little help with this one :)

Post by Miso »

Hasn't this been done before?
Jj.miso
Kevin
Administrator
Posts: 393
Joined: 07 Jun 2015, 08:36

Re: Cartwheels/flips AND rolls... I need a little help with this one :)

Post by Kevin »

Miso wrote:Hasn't this been done before?
Daggolin made some stuff once where everyone with a special dev version of the Catz clientside, where you could use custom animations, which others with the clientside could see too, if they had the animation file as well, but I am almost certain that it required some sort of serverside support in order show the custom animations other players would then be using.

It was something fun he worked on while him and I looked into getting an animated ATST working :)
User avatar
Daggolin
Administrator
Posts: 794
Joined: 23 Feb 2015, 13:05

Re: Cartwheels/flips AND rolls... I need a little help with this one :)

Post by Daggolin »

I don't think you can achieve what you want with the default code. I haven't looked into SP, but for MP you would need a code-modification to load different animation-files at runtime. As Kameleon mentioned I've actually done that for MP once to allow players to run around with different sets of animations, which would replace some animations to make the players appear different in the way the hold their sabers, stand, roll, etc., but I never finished some other features I planned for that clientside and never released it. I could look sometime if I still got it somewhere.

However if you are already dealing with the code I am not sure that swapping the animation-file is your best approach. I decided to add such a feature to my clientside, as I already changed animation-file loading for the atst animations, but if you just want to replace a couple of chosen animations you could modify the code directly to use the other animations when you hit another key. With a few little tricks you might even be able to get that working serverside-only without too many prediction errors. I've tried something similar when I added the dynamic feet height you know from singleplayer (when you stand at the edge and one leg is lower than the other) to the dark server. It's not perfect, but it works.
Post Reply
Created by Matti from StylesFactory.pl and Warlords of Draenor (modified by jk2.info)
Powered by phpBB® Forum Software © phpBB Limited