[Mod]3d Armor - Fly and Swim (Player Animations)

User avatar
sirrobzeroone
Member
Posts: 280
Joined: Mon Jul 16, 2018 07:56

[Mod]3d Armor - Fly and Swim (Player Animations)

by sirrobzeroone » Post

Image

Created at the request of my 11 year old who wanted better swimming and flying animations :)

Features
Animation additions for 3d_armor:
  • Swimming
  • Swimming Attacking
  • Flying
  • Flying Attacking
  • Falling
  • Falling Attacking (okay flailing wildly while you plumet to your death)
+ Spoiler
Capes have also been added as an armor item this can be disabled if you like

Includes two different player models one for capes as "armor" and the other as capes as they are now.

Incorporates "headanim" functionality by LoneWolfHT (Must use MT 5.3 to see/use otherwise auto-disabled)

Automated detection of Swimmable and Flyable nodes using node drawtypes.

Depends
Required: 3d_armor

License
It varies check the licence doc, lots of people have contributed stuff over time so different parts under different licences

Downloads
ContentDB
Ver 0.3 Headanim 5.3+ only 5.0 to 5.3+
Ver 0.2 Improved Functionality 5.3+ Only
Ver 0.1 Initial Release 5.0 to 5.3+
Source Code
Attachments
screenshot.png
(209.24 KiB) Not downloaded yet
Last edited by sirrobzeroone on Wed Dec 02, 2020 22:46, edited 7 times in total.

Gundul
Member
Posts: 1223
Joined: Thu Aug 27, 2015 10:55
GitHub: berengma
IRC: Gundul
Location: Europe/Asia
Contact:

Re: [Mod]3d Armor - Fly and Swim (Player Animations)

by Gundul » Post

sirrobzeroone wrote:
Sun Nov 29, 2020 05:06

Easy to add new Swimmable/flyable nodes
This was really missing in minetest :) Looks very nice.
I have a recommendation to make this work for any liquid node:

instead of hardcoding them in i_nodes_fly_swim.lua try to read the
node definition, something like this

Code: Select all

local cname = minetest.get_node(pos).name
	if not minetest.registered_nodes[cname] then return nil end		-- handle unknown nodes
	if minetest.registered_nodes[cname]["liquidtype"] == "source"  or 
	minetest.registered_nodes[cname]["liquidtype"] == "flowing" then
		-- use swim animation
	end
maybe there is something alike for airlike nodes, too.
My servers: Jungle, Lilly in the valley click for my mods

User avatar
sirrobzeroone
Member
Posts: 280
Joined: Mon Jul 16, 2018 07:56

Re: [Mod]3d Armor - Fly and Swim (Player Animations)

by sirrobzeroone » Post

Thanks Gundul, very good idea I will definitly work that in for water/liquids.

edit: Forgot to add I know when creating a node you select drawtype which has options of "airlike","liquid" and "flowingliquid" if i can just check for those I can probably remove the whole manual node stuff. Thanks for the mental prompt not sure why I didnt think of that before :).
Last edited by sirrobzeroone on Mon Nov 30, 2020 02:23, edited 1 time in total.

Adnunano
Member
Posts: 42
Joined: Thu Feb 13, 2020 09:28

Re: [Mod]3d Armor - Fly and Swim (Player Animations)

by Adnunano » Post

Does the authors of 3d armor plan to add armors's effects to swimming? For example, wood makes swimming easier, and heavy armor makes you sink to the bottom. The sink effect can be changed based on how heavy the material is. Gold is the heaviest, so it can be the winner.
NfAPhpmGaVphBjK8NIr9Mit5xNW2emD2

User avatar
pampogokiraly
Member
Posts: 252
Joined: Wed Jan 08, 2020 22:21
In-game: i_love_mesecon

Re: [Mod]3d Armor - Fly and Swim (Player Animations)

by pampogokiraly » Post

You are making awesome mods! First you made the comboblocks, which is a mod that I wanted for a long time, and now you make this!

Very very cool mod, thank you.

Also can you please add headanim support, so it doasen't looks so silly... (currently when you look forward, the head is pointed downwards. And when you look down... idk how does the minetest character can even survive that!)
My mod (a bit old) request: Better enchant. My second mod: Old Broken Castle nodes. Search for aab01 to find my mods!

User avatar
homthack
Member
Posts: 98
Joined: Sun Apr 15, 2018 19:11
GitHub: homt8
IRC: homthack
In-game: homthack
Location: Canada
Contact:

Re: [Mod]3d Armor - Fly and Swim (Player Animations)

by homthack » Post

This one looks nice but it's like playeranims mods. I would like to know how swim worked in which player appreciates an armor that does not have the difference of another.
Server-Available: [HM-Skyblock] Contact-Discord: [homthack#9917]

User avatar
runs
Member
Posts: 2153
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: [Mod]3d Armor - Fly and Swim (Player Animations)

by runs » Post

Cool. This is a 2.0 mod. I will add the swin animation to my player_api(z).

Samantha now can swin in her double-hearted sexy swimsuit. :-)
🤑 Patreon |Minetest Chat | 👧 Samantha | ⛏️ Juanchi Game | 🐱 Petz

User avatar
sirrobzeroone
Member
Posts: 280
Joined: Mon Jul 16, 2018 07:56

Re: [Mod]3d Armor - Fly and Swim (Player Animations)

by sirrobzeroone » Post

Adnunano wrote:
Sun Nov 29, 2020 12:11
Does the authors of 3d armor plan to add armors's effects to swimming? For example, wood makes swimming easier, and heavy armor makes you sink to the bottom. The sink effect can be changed based on how heavy the material is. Gold is the heaviest, so it can be the winner.
I'm not sure about the offical 3d_armor as I know stu has handed it over to the community in general to look after. I can have a look. I think we might need an "in water gravity" effect, fairly sure gravity at the moment has one value across air and water. Saying that I do do a check for water to activate the swim animation I might be able to add something just conscious thats going to add a heap of complexity and might be outside my abilities :), as I'd need to allow for when player monoids are installed and when not, still its a good idea so I'll have a play around.
pampogokiraly wrote:
Sun Nov 29, 2020 17:47
Also can you please add headanim support, so it doasen't looks so silly... (currently when you look forward, the head is pointed downwards. And when you look down... idk how does the minetest character can even survive that!)
Thanks :), I am very much am just standing on the shoulders of giants and adding to what has already been done by the community. I'll go have a look how headanim works if its just amednments to the blend model I can certainly incorporate them.
homthack wrote:
Sun Nov 29, 2020 18:55
This one looks nice but it's like playeranims mods. I would like to know how swim worked in which player appreciates an armor that does not have the difference of another.
Definitly will have a look, I wasnt aware of playeranims does it support 3d_armor already? I have some hopes a few of the people who make the underwater mods might be encouraged to add wetsuits, diving helmets etc now that 3d armor can better support swimming.
runs wrote:
Sun Nov 29, 2020 19:42
Cool. This is a 2.0 mod. I will add the swin animation to my player_api(z).
Samantha now can swin in her double-hearted sexy swimsuit. :-)
Lol that would be cool, Did you find untangling the base blend model in player_api um intresting? I just noticed it seemed to have an odd layout compared to how I normally setup my models in blender, might be a legacy blender thing as I've only been using blender since 2.8...anyways more curious myself as I spent quiet abit of time trying to get my head around the structure in blender.

Thanks all, I'll see if I can get those suggestions incorporated :)

User avatar
sirrobzeroone
Member
Posts: 280
Joined: Mon Jul 16, 2018 07:56

Re: [Mod]3d Armor - Fly and Swim (Player Animations)

by sirrobzeroone » Post

Edit2: Both Incorporated into release ver0.2 Improved Functionality.

I just incoporated "headanim" as I needed to add an offset metric to make it work. Full credit to LoneWolfHT for the solution though.

I also made the regular head not do the full -90 to +90 range when doing the regular animations. So now Sams chin stops on his chest when looking down - roughly 60degree, same with putting head back stops at 60degrees.

avaliable from source download only at the moment.

I did test with headanim enabled and they didnt seem to fight to much but I'd turn headanim off/disabled if you currently have it installed and enabled and using the above from source.

Also got rid of the word "true" being printed to UI when loading mod.....left a checkline of code active opps.

Edit: Improved the way nodes detected as being flyable or swimmable. Basically anything with node.drawtype="airlike" is flyable and anything with node.drawtype="liquid" or "flowingliquid" is swimable so no more need of manual node lists, thanks again Gundul.

Both edits are now avaliable in source now, I'll do a new release soon and update the 1st post when I have.

User avatar
homthack
Member
Posts: 98
Joined: Sun Apr 15, 2018 19:11
GitHub: homt8
IRC: homthack
In-game: homthack
Location: Canada
Contact:

Re: [Mod]3d Armor - Fly and Swim (Player Animations)

by homthack » Post

ok thank you very much, I hope that I will approve this new mods that were created at the time when there was no time.

I already added it on my shared server.
Server-Available: [HM-Skyblock] Contact-Discord: [homthack#9917]

User avatar
StarNinjas
Member
Posts: 340
Joined: Wed Mar 14, 2018 00:32
GitHub: starninjas
IRC: StarNinjas
In-game: J1
Location: Terrarca

Re: [Mod]3d Armor - Fly and Swim (Player Animations)

by StarNinjas » Post

Ummmmmm....
Attachments
screenshot_20201201_142238.png
Something got messed up
(293.87 KiB) Not downloaded yet

User avatar
sirrobzeroone
Member
Posts: 280
Joined: Mon Jul 16, 2018 07:56

Re: [Mod]3d Armor - Fly and Swim (Player Animations)

by sirrobzeroone » Post

Note: Fixed in ver0.3 Headanim 5.3+ only.
StarNinjas wrote:
Tue Dec 01, 2020 21:25
Ummmmmm....
Nice bug :), sorry usual questions what version of Minetest? and any other mods running that mess with player_api?
Edit: Or maybe a skins or wardrobe mod? Can see some odd texture fighting going on in screenshot.

let me know the above I'll try and nail the issue down.

Edit: okay replicated the bug, now I'll see if I can fix it. - looks like my mod doesn't like 5.2.0, I expect its something in the b3d exporting.

Edit2: Tried old and new b3d exporter same issue, I'm not entirely sure why 5.3.0 works although change log indicates some fix's to underlying graphics engine. I have an idea how to fix just need a bit of time to basically unscramble the blend file something I was trying to avoid.

Edit3: Got it okay helps if I'd read the headanim more closely it only works in 5.3+ So basically if your on sub 5.3 install and use release1 for now. I'll do a bug fix release 3 shortly which will support both. I've updated contentdb to indicate R1 is 5.0>>5.3 and R2 is 5.3 only
Last edited by sirrobzeroone on Wed Dec 02, 2020 22:49, edited 7 times in total.

User avatar
duckgo
Member
Posts: 14
Joined: Sun Sep 20, 2020 08:01
In-game: duckgo
Contact:

Re: [Mod]3d Armor - Fly and Swim (Player Animations)

by duckgo » Post

very good, this brings more life to the dolls, should be standard in the minetest u.u
cdb_qU1abebFAO3jCksTRdqbXRv1P8DHVu8M

User avatar
Mantar
Member
Posts: 140
Joined: Thu Oct 05, 2017 18:46

Re: [Mod]3d Armor - Fly and Swim (Player Animations)

by Mantar » Post

Maybe not standard to minetest in general, but it should probably get folded into 3D Armor.

User avatar
StarNinjas
Member
Posts: 340
Joined: Wed Mar 14, 2018 00:32
GitHub: starninjas
IRC: StarNinjas
In-game: J1
Location: Terrarca

Re: [Mod]3d Armor - Fly and Swim (Player Animations)

by StarNinjas » Post

Yup I was using 5.2, thanks I'll test it out tomorrow!

User avatar
sirrobzeroone
Member
Posts: 280
Joined: Mon Jul 16, 2018 07:56

Re: [Mod]3d Armor - Fly and Swim (Player Animations)

by sirrobzeroone » Post

Mantar wrote:
Wed Dec 02, 2020 18:22
Maybe not standard to minetest in general, but it should probably get folded into 3D Armor.
I could fold just the animations back into the base model available in player_api, however given the freeze on MTGame i wasn't sure that would be accepted as it technically adds functionality.

I'm not sure if player_api is available outside of the MTGame I could fork it but I'm not sure that would be very helpful for new users of minetest. Anyways the animations basically don't need to be tied to 3d_Armor, I just personally see 3d_armor as probably one of the 1st few mods ppl would add. As a game_dev if you wanted the swim animations but no armor you could add 3d_armor and then remove all armor definitions...bit of hassle but on balance I figured someone making a game probably wouldn't mind if they really wanted them.

I certainly would like to fold my animations into base 3d_armor but I'll leave it seperate for now to work any kinks out and then look to add them to 3d_armor and see if the 3d_armor team accepts them :).

Sorry lol big explanation for a one liner but I thought other people maybe interested :).
StarNinjas wrote:
Wed Dec 02, 2020 22:12
Yup I was using 5.2, thanks I'll test it out tomorrow!
Cool let me know, there's also a 0.3 release which should now auto-detect and disable headanim if version is <5.3

ShadMOrdre
Member
Posts: 764
Joined: Mon Dec 29, 2014 08:07
GitHub: ShadMOrdre
In-game: shadmordre
Location: USA

Re: [Mod]3d Armor - Fly and Swim (Player Animations)

by ShadMOrdre » Post

I think this works well as it is. No need to fold into MTG or 3D armor.

Rather keep up the great work, tweak some of the animations, if possible, so that the changes between are more fluid.

My son would recommend the standing arm swing anim, like in MC, and a falling/skydiving animation, triggered by falling. I would like to see a climbing animation, triggered by climbable nodes, a death animation, different from sleep, and a crouch or prone position, triggered by sneak.

I've recreated a "game" environment, complete with 3 armor, player_api, and a few other additions, into a single part of a larger game framework. I've already added this and the armor gloves mod to the collection, making necessary changes to fit within my scheme. I'm going to try to expand my internal version of 3darmor, to include room on the inventory screen for the shield, and perhaps a ring and amulet position, just to keep a square. I'll release this soon.

Keep up the great work with this and with the armor gloves mods.


Shad
MY MODS: lib_ecology lib_materials lib_clouds lib_node_shapes ---- Inspired By: Open Source Virtual World Simulator Opensimulator.

User avatar
Codesound
Member
Posts: 334
Joined: Thu Jun 09, 2016 14:56

Re: [Mod]3d Armor - Fly and Swim (Player Animations)

by Codesound » Post

+1 Nice mod!

Thanks

User avatar
sirrobzeroone
Member
Posts: 280
Joined: Mon Jul 16, 2018 07:56

Re: [Mod]3d Armor - Fly and Swim (Player Animations)

by sirrobzeroone » Post

Thanks Shadmordre.

I've actually been working on refining the falling case, at the moment if you have fly priv it overrides falling and you never see the animation. However I just added a way to calculate velocity so I'm going to add a check that even if you have fly privs if you exceed about 60km/h (ill make that a mod setting) plus lots air below then do fall animation. So fly up skydive down and um deploy parachute/glider just before the ground? hopefully :).

The above also lets me refine the general falling, probably noticed if you get right on the edge of a cliff but not falling you can trigger the animation :).

I'll definitly look at adding an attack, climb and sneak animation, sneak was on my to do list. One good thign about tracking that 5.2 bug down is I have very clean blend file I understand the structure of so im much less nervous about stuffing something up.

I'd be intrested in the expanded version of 3darmor if you end up sharing it as I've likewise got gloves, shields, capes and looking at adding 3D_Armor Painted Banners as well so lots of slots.

thanks again good to know someone else is getting use out of gloves :)

User avatar
StarNinjas
Member
Posts: 340
Joined: Wed Mar 14, 2018 00:32
GitHub: starninjas
IRC: StarNinjas
In-game: J1
Location: Terrarca

Re: [Mod]3d Armor - Fly and Swim (Player Animations)

by StarNinjas » Post

Wow this is awesome!! I really hope you can add sneaking, and climbing!!! Wow dude this is just amazing! always wanted stuff like this!

User avatar
sirrobzeroone
Member
Posts: 280
Joined: Mon Jul 16, 2018 07:56

Re: [Mod]3d Armor - Fly and Swim (Player Animations)

by sirrobzeroone » Post

Image

Just a quick little update, I'm not quiet done but very close.

I've added sneak and climb as animations to the current git source here:
https://github.com/sirrobzeroone/3d_armor_flyswim

Still a bit experimental and I'm refining and finishing code commenting, but enough there to try it out pretty safely.

Sneak/Crouch/Duck - Will let you sneak through a 1.5 high space but only if your moving forward and facing forwards. I'm still working on refining that. Theres another glitch but I'll see if anyone can find it, lets just say you can sneak through low spaces faster if you find it :).

Climb - Nothing special here climb up and climb down. A little bit of work to do at the tops of ladders yet in regards to ending animations a bit sooner.

Flying - You can now "fall" if you fly up and then turn flying off, you should now fall.

Falling - I've set terminal velocity (TV) to roughly 100kp/h but this will still catch load edge at times and if you have any frame of reference you will notice the stop. Clouds being a good one. Once you have fallen through the chunks once I found catching the load edge was much rarer but can still happen at 100kp/h. I have done my best to add a slight delay so you dont drop out of fall animation into stand. But you may still get the odd flicker to stand depending on how long the chunks take to load.

Falling but Superman it - If you press shift while falling this will allow you to speed up beyond TV (basically pin drop). Fastest I got to was about 600Kp/h before load edge grabbed me, but have fun. If you move around while pressing shift down you will also take on the flying animation.

Dead people bounce - Hit the ground fast enough with some lucky timing and your dead body will bounce :).

Swimming - This takes some getting used to but just before your feet touch the sand/bottom press and hold shift, you'll go into a super low swim, keep shift held down and you'll be able to swim through 1x1 tunnels.

Think they are the main points, I wont do a release until I tidy up the code a little add that ladder climb top check and adjust the tunnel swim code so if you let go of shift you dont stand up - hint try that with crouch you wont stand.

The current git code may not play nice with other mods that adjust player speed but you may find all goes fine. But I will add support for a few of the monoidy type mods later.

Edit: Forgot to say any issues just let me know Ill try and fix them, I should probably caution Im starting to hit some limitations in what I can and can't detect the player is doing. Flying/Falling split was quiet tough as theres no feedback when flying is on vs off just if the Priv exists, Duck/Crouch has its own little special catches and allowing swimming through 1x1 holes hit the entity box's dont rotate issue.....anyways let me know if I can fix it I will :)
Attachments
crouch_climb.png
(149.96 KiB) Not downloaded yet

User avatar
pampogokiraly
Member
Posts: 252
Joined: Wed Jan 08, 2020 22:21
In-game: i_love_mesecon

Re: [Mod]3d Armor - Fly and Swim (Player Animations)

by pampogokiraly » Post

I haven't tested your update, but I want to be able to turn off and on everything, in case I don't like one of your features :)

(also the update sounds really cool)
My mod (a bit old) request: Better enchant. My second mod: Old Broken Castle nodes. Search for aab01 to find my mods!

User avatar
homthack
Member
Posts: 98
Joined: Sun Apr 15, 2018 19:11
GitHub: homt8
IRC: homthack
In-game: homthack
Location: Canada
Contact:

Re: [Mod]3d Armor - Fly and Swim (Player Animations)

by homthack » Post

So this update works I will test it on my server saving.

I was testing the new mods that it has but I moved my head and hands it has no difference to what I can say it still does not have the function of swimming and fly but it sounds like that's it has in this original version
Server-Available: [HM-Skyblock] Contact-Discord: [homthack#9917]

User avatar
sirrobzeroone
Member
Posts: 280
Joined: Mon Jul 16, 2018 07:56

Re: [Mod]3d Armor - Fly and Swim (Player Animations)

by sirrobzeroone » Post

homthack wrote:
Tue Dec 08, 2020 18:58
So this update works I will test it on my server saving.

I was testing the new mods that it has but I moved my head and hands it has no difference to what I can say it still does not have the function of swimming and fly but it sounds like that's it has in this original version
Thats a bit odd, I'll double check I didn't stuff any settings (dosen't look like it), did you put the cape on and/or manually grant yourself fly privs? Although swimming should work by basically launching yourself into any water body that is more than 1 node in water depth. If the water is only 1 deep you'll just walk/wade as per normal.

I'll push a new version to git tonight (my time so about 3-4 hrs from now) maybe if none of the above work give that version a try.

@pampogokiraly - with above git version update I've added switchs for all animations and sneak functions under mod settings via the MT-UI settings page + if you like you can set terminal velocity to whatever speed you like although I recommend leaving it at 100kph.

Edit: Give that version a try now on git, remeber you have to be moving to trigger swim/fly otherwise you'll stand(hover) or stand(float).

User avatar
homthack
Member
Posts: 98
Joined: Sun Apr 15, 2018 19:11
GitHub: homt8
IRC: homthack
In-game: homthack
Location: Canada
Contact:

Re: [Mod]3d Armor - Fly and Swim (Player Animations)

by homthack » Post

I know. but I'm going to see if the new function it has was launched but in reality I just couldn't test when that swimming that is in cape are done, I used to be able to fly in the sky if I have a mods that this server but I will see it with good luck.

Thanks you for giving me information.
Server-Available: [HM-Skyblock] Contact-Discord: [homthack#9917]

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests