Popular Post jivo Posted December 8, 2024 Popular Post Report Posted December 8, 2024 (edited) Hello everyone! I created a mod for TDM that enhances immersion by adding visible hands and animations when the player is crouching or holding an item (only the lantern and compass are currently implemented). Let me know if you find any strange behaviors with the animations or have suggestions for new ones you'd like to see added! You can download it here: Visible Player Hands This mod requires some modifications to the game engine, which you can check out here: GitHub repository SHOWCASE CHANGELOG v2.0 - 24/01/25 • Crouched and item animations now play when a weapon is selected. The hand used for the animations changes depending on the weapon used, since the blackjack and the sword are held in the right hand and the bow is held in the left hand. • Added animations for holding some items that display while standing or crouched. When choosing an item, a grab animation plays to prevent the new selected item from appearing out of thin air: - Lantern: dangled in front of the player. Accurately reflects whether the lantern is on or off. When on, light particles are emitted near the glass for added effect. - Compass: displayed in the palm of the player. The needle rotates dynamically to reflect changes to the direction the player is facing. • Replaced the rotating GUI compass with a static compass. • Modified the listening-at-door animation to also play when the player is standing. • Reduced idle and leaning animations framerate to make their movement less twitchy and distracting. • Added hand attachment bones to unarmed md5mesh. v1.1 - 8/12/24 • Added a leaning animation when crouched. If the player leans into an object, the animation will rest at a middle point, reflecting the obstruction. • Added a listening-at-door animation. When the player leans against a door to listen while crouched, a hand is shown resting against the door. If the player steps away while still leaning, the arms transition to the proper middle-point lean animation. • Added cvars to enhance player lean tracking in scripts: - tdm_leaning_left: Tracks if the player is leaning left. - tdm_leaning_right: Tracks if the player is leaning right. - tdm_lean_collided: Tracks if the player collided with an object while leaning. - tdm_lean_listenable: Tracks if the object the player collided with is a listenable door. - tdm_lean_percentage: Represents the current leaning angle as a percentage. - tdm_lean_stats_hud: Enables or disables HUD text that displays the lean cvars while in-game (disabled by default). v1.0 - 4/12/24 • Added visible hands when the player crouches and has no weapon equipped. The arms are lowered when the player uncrouches. • Added cvar to enhance player crouch tracking in scripts: - tdm_crouched: Tracks if the player is crouched. Edited January 27 by jivo Mod Update 10 2 Quote
Taquito Posted December 8, 2024 Report Posted December 8, 2024 This is awesome, Thank you. Will try it tonight. Quote
MirceaKitsune Posted December 8, 2024 Report Posted December 8, 2024 First of all, welcome to TDM! That looks incredible especially for a first mod. Congratulations and thanks for sharing this! It's a feature I've also wanted to see. Not necessarily all the time, even when the player isn't holding anything: Namely for holding items such as the lantern, seeing your hands actually use the lock picks to pick a door, etc. One of the issues is that for weapons (blackjack, sword, arrows) we still use the old in-engine weapon slot definitions instead of having them registered like every other item: Their first-person models are probably part of the same builtin system and may conflict with having an item and arrow selected at the same time. Quote Mods: Builder Blocks minigame | Keypad | Disguises
snatcher Posted December 8, 2024 Report Posted December 8, 2024 I never thought I would have seen during my time within the TDM community a mod such as this one and I am very happy to be proven wrong. We will now of course express our opinions about the mod and discuss the shortcomings and areas of improvement and whether this mod should be part of the core game or not, and even if executables should be included in mods or if the developers should pay attention to mods and provide some sort of support for some ideas that could lead to better, greater, bolder initiatives for the benefit of mappers, modders and players... but the fact remains that it is awesome to be spoiled by options and I am grateful that this mod exists. You can tell jivo is ambitious, ingenious and talented and this mod is visually and technically impressive. Welcome, congratulations and thank you @jivo ! Quote
snatcher Posted December 8, 2024 Report Posted December 8, 2024 My first suggestion is to decrease the idle movement of the hands. I find the current movement distracting and unsettling. I found a frameRate of 10 to be optimal, but that's just my preference. Quote
jivo Posted December 8, 2024 Author Report Posted December 8, 2024 Thank you everyone for the kind words! This took a fair bit of time, since I'm very inexperienced with Blender or animation tools in general but I think it was worth it. The moddb page was updated to have better installation instructions because maybe it wasn't very clear that the game has to be launched with the new executable. I also made it prettier in general, with screenshots that are not for ants (sorry about that). I plan to keep updating the mod to see how much can be added with no disruption to gameplay. I'd love to have features like the ones @MirceaKitsune suggested, but I have yet to see what is possible to implement. Eventually I'll share the source code on github for others to look at. There aren't many changes, just some cvars related to crouching or leaning when those actions happen. The challenging part was figuring out where to update them, since there's so much code. Questions: should I keep updating the original post as I add new features or put them in replies to this thread? I'm not sure about the standard used here. Also, since I have screenshots/changelog in the moddb page should I delete them from here to not make the original post annoyingly long to scroll through? Quote
jivo Posted December 8, 2024 Author Report Posted December 8, 2024 1 hour ago, snatcher said: My first suggestion is to decrease the idle movement of the hands. I find the current movement distracting and unsettling. I found a frameRate of 10 to be optimal, but that's just my preference. You're absolutely right, I just tried it and it looks infinitely better. I'll change it in the next update. 1 Quote
datiswous Posted December 8, 2024 Report Posted December 8, 2024 (edited) Edit: Oh you need a new executable. You should state that it isn't compatible with Linux currently. Nice if you could add that later, although I doubt an executable override is really needed.. Edited December 8, 2024 by datiswous Quote
datiswous Posted December 8, 2024 Report Posted December 8, 2024 3 hours ago, jivo said: Questions: should I keep updating the original post as I add new features or put them in replies to this thread? There's no standard, but best is if you add updates to the main post and then revere to that in a new post when you update, like: Quote Version 1.3 is out! For change-list, see first post. (example) Quote
MirceaKitsune Posted December 9, 2024 Report Posted December 9, 2024 I started typing this on Discord but will move it here. I'd simply love for this to be added to vanilla TDM: The change is a wonderful Christmas gift for the next release. To make this more likely I wish to offer a few points and observations from my perspective, anyone feel free to add to this or correct if I'm wrong. For the record I'm not an official TDM developer though I spend most of my days modding / mapping or playing every FM as it comes out. First of all TDM has a culture of being careful with retroactive changes: If anything modifies the experience too much (especially for existing missions) we usually want it to be an option. I suggest designing your patch with a main menu setting; I'd add it to either "Settings - Gameplay - General" or "Settings - Video - General" whichever makes more sense. I propose giving it the following 4 options: Disabled: Never show POV hands even for weapons. If someone wants this for any reason we're also giving players an option to disable them entirely. Weapons: Only Blackjack / Sword / Arrows. Current functionality and can remain default. Weapons & Items: Also see your hands holding any selected item (lantern, compass, key, readable, etc) but hide them otherwise. I'm in favor of this being the new default if no one finds it too disruptive. Always: Show even the empty hands when nothing is selected, in which case you see the mantling / leaning movements. Likely too disruptive to default but I see myself using even that. I was excited to hear you plan to add them for individual items, that's something I've been dreaming to see years ago but lost hope we ever would. When it comes to items we'll likely need special animations for the default ones as they have specific purposes. Here's a list of the the important items... especially at this stage I don't want to suggest too much and overwhelm, I'll only add essential ones the player is almost always guaranteed to use: Lantern: Hand dangling the item down. Only the skin needs to change between lit and unlit lantern, all light entities have skins and it's easy to setup. This will look awesome with glow and fireflies Spyglass: Hand brings it toward the face when using and back down when unusing. Compass: Hand facing up holds the item in its palm. Wonder if the handheld compass can actually work and point in the right direction, wouldn't bother with it now but since we got it working for the inventory icon this should be easy to do later and will look really neat Lockpick & Keys: Poke the item toward the crosshair to look like picking the lock or inserting the key. It doesn't need to go toward the keyhole or anything, seems perfectly fine the way this was done in DeusEx where you'd see the hand flailing it in front of the door wherever you pointed. Health Potion: Move the hand toward the face and back down to appear like quickly drinking. Careful not to bring it too close to the camera as the minimum clip distance may cut off the mesh and let you see into it. Everything else: Generic hold animation with a basic jolt when using. This should fit most things: Not sure how items with different sizes will look and if we'll need different grips for each one, a book isn't held the same way as a sheet of paper, but especially right now I wouldn't worry about that. Remember that TDM allows mappers to define their own items. This includes builtin ones: You can make custom lanterns, lockpicks, spyglass, etc. The best solution seems like letting each item specify the hold & use animation it wants for the hands via spawnargs, matching the best grip and use animations the author thinks looks best. We'll also need spawnargs for the origin and rotation offset for the entity attached to the hand, each item's model is bound to appear in a different place and will need to be configured by trial and error. 2 Quote Mods: Builder Blocks minigame | Keypad | Disguises
wesp5 Posted December 9, 2024 Report Posted December 9, 2024 7 hours ago, MirceaKitsune said: Health Potion: Move the hand toward the face and back down to appear like quickly drinking. Careful not to bring it too close to the camera as the minimum clip distance may cut off the mesh and let you see into it. This should be valid for other potions as well... 1 Quote
snatcher Posted December 10, 2024 Report Posted December 10, 2024 We can do without cvar tdm_crouched and detect if the player is crouched by doing something like this: player userEntity = $player1; if (userEntity.AI_CROUCH) { // crouched } The code in addition has AI_LEAN_LEFT and AI_LEAN_RIGHT (and AI_LEAN_FORWARD) available but they don't work. It seems these were added by the original TDM developers at some point but neither of them got all the functionality. Good news is that script event isLeaning() works. It however detects if the player is leaning in any direction and getting to know left, right, forward requires ugly calculations. If I were to ask source code support for this mod I would ask for AI_LEAN_LEFT and AI_LEAN_RIGHT (and AI_LEAN_FORWARD) to work. A win for the mod and a win for the TDM source code and future initiatives. Quote
jivo Posted December 10, 2024 Author Report Posted December 10, 2024 23 minutes ago, snatcher said: We can do without cvar tdm_crouched and detect if the player is crouched by doing something like this: player userEntity = $player1; if (userEntity.AI_CROUCH) { // crouched } The code in addition has AI_LEAN_LEFT and AI_LEAN_RIGHT (and AI_LEAN_FORWARD) available but they don't work. It seems these were added by the original TDM developers at some point but neither of them got all the functionality. Good news is that script event isLeaning() works. It however detects if the player is leaning in any direction and getting to know left, right, forward requires ugly calculations. If I were to ask source code support for this mod I would ask for AI_LEAN_LEFT and AI_LEAN_RIGHT (and AI_LEAN_FORWARD) to work. A win for the mod and a win for the TDM source code and future initiatives. I tried all of those before implementing the cvars myself. When I try to access AI_CROUCH I get this: isLeaning(), besides being very hard to work with like you said, does not behave how I want it to since it only becomes 0 if the player is not leaning at all. The way I implemented my cvars makes it so that they become 0 as soon as the player releases the lean button so the unlean animations can be played. Otherwise, the player would reach the non leaning position and THEN play the animation which looks really weird. 1 Quote
snatcher Posted December 10, 2024 Report Posted December 10, 2024 1 minute ago, jivo said: When I try to access AI_CROUCH I get this: It works here but your code needs a different logic. Just... forget about it and please keep doing what you are doing the way you are doing it. You are well beyond now and I want to see where you will take us next! Quote
New Horizon Posted December 10, 2024 Report Posted December 10, 2024 Any videos of this in play? Quote
datiswous Posted December 11, 2024 Report Posted December 11, 2024 4 hours ago, New Horizon said: Any videos of this in play? Here you go: video-on-google-drive 1 Quote
snatcher Posted December 11, 2024 Report Posted December 11, 2024 On the subject of source code support and thinking of cvar tdm_lean_percentage we could probably get AI_LEAN_LEFT and AI_LEAN_RIGHT (and AI_LEAN_FORWARD) to be idScriptFloat instead of idScriptBool, in example: AI_LEAN_LEFT = 0.00 (not leaning left) AI_LEAN_LEFT = 0.50 (50% leaning left) AI_LEAN_LEFT = 1.00 (100% leaning left) We may someday be able to lean forward AND left at the same time and this could come in handy. 1 Quote
jivo Posted December 11, 2024 Author Report Posted December 11, 2024 Progress! https://streamable.com/xi80w5 3 Quote
MirceaKitsune Posted December 11, 2024 Report Posted December 11, 2024 11 minutes ago, jivo said: Progress! https://streamable.com/xi80w5 Absolutely amazing! Exactly what I imagined apart from envisioning it in the right hand. 1 Quote Mods: Builder Blocks minigame | Keypad | Disguises
snatcher Posted December 12, 2024 Report Posted December 12, 2024 (edited) 21 hours ago, jivo said: Progress! https://streamable.com/xi80w5 Lovely Is the origin of the light in its original location (left hip) or did you move it to the lantern? EDIT - I ask because I cannot tell in a video how convincing the light is. The less editing required (outside of your scope) the better. Edited December 12, 2024 by snatcher Added clarification Quote
jivo Posted December 12, 2024 Author Report Posted December 12, 2024 3 hours ago, snatcher said: Is the origin of the light in its original location (left hip) or did you move it to the lantern? EDIT - I ask because I cannot tell in a video how convincing the light is. The less editing required (outside of your scope) the better. It's the original location. I don't think it's a good idea to change it and it looks convincing enough in my opinion. I'll upload this version soon for people to see what it looks like in-game, just ironing out some kinks in the script. 2 Quote
MirceaKitsune Posted December 13, 2024 Report Posted December 13, 2024 Agreed: We want to change as little as possible functionally, changing the light location may have gameplay implications. The hands will need a setting to turn them off which shouldn't cause the light to jump to different places. Quote Mods: Builder Blocks minigame | Keypad | Disguises
jivo Posted December 13, 2024 Author Report Posted December 13, 2024 (edited) Here's a version with animations for the lantern and the compass. Can anyone test it a bit, try to break the animations, give feedback, etc., before I update the moddb page? Regarding the lantern, I added glare particles to the glass part when it's on. Regarding the compass, I haven't had time to figure out how to make it actually rotate and the fingers on the hand look a bit terrifying atm. I'll try to improve this if possible. Lantern & Compass Edited December 13, 2024 by jivo 1 Quote
wesp5 Posted December 13, 2024 Report Posted December 13, 2024 Hm, your latest version triggers the Windows 10 defender which claims it is a dangerous Trojan... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.