Jump to content
The Dark Mod Forums

Mod: Wearable disguises


MirceaKitsune

Recommended Posts

It's a good idea to disguise the protagonist, it's othing new in some other games (Hitman and even in the old Postal 2, where the protagonist use a police uniform)

But what bothers me the most in TDM is not this, but that a Thief, from the sound of his steps, seems to be wearing heavy boots with nails instead of light sneakers that facilitate stealth and climbing, which does not at all agree with the rest of his ninja outfit.

Sys Specs Laptop Lenovo V145 15AST, AMD A9- 9425 Radeon R5 - 5 cores 3,1 GHz  RAM 8Gb, GPU 1+2 Gb -Win10 64 v21H2

Favorite online apps you may like too 😉

Link to comment
Share on other sites

Mission Requiem from @Moonbo has a part where you have to steal the crown of the head of some skeletons, if I remember correctly. Maybe studying that can give you some insights.

I remember @snatcherhad an idea for a Jester's head. It would be cool if ai start loughing when they spot you.

Edited by datiswous
  • Haha 2
Link to comment
Share on other sites

I hope there is some solution for the crashes you reported.

In my Away 0: Stolen Heart, the storyline has the player in disguised as a gentleman, which (chiefly due to custom atdm:team_relations entity) fools the civilians but not the guards, who are said to be able to recognize the face. My needs were easier than yours: that disguise doesn't change throughout the game, and you don't really see it except in a video cut-scene, where much can be faked.

  • Like 1
Link to comment
Share on other sites

I remember missions where the player can be in a tavern without anybody attacking him, so how is this set? Will all guards always attack the player or is there a variable that sets NPCs to hate/ignore/be friendly towards the player as in Bloodlines?

Edited by wesp5
Link to comment
Share on other sites

6 hours ago, datiswous said:

Mission Requiem from @Moonbo has a part where you have to steal the crown of the head of some skeletons, if I remember correctly. Maybe studying that can give you some insights.

I might have played that one and vaguely remember it. I believe the crown is a normal loot item attached to the head, you simply frob to pick it up like everything else. Helmets are part of the head mesh, I need to make the head itself frobable and change its model accordingly... I should get to trying it out at some point and see how that might work.

2 hours ago, Geep said:

In my Away 0: Stolen Heart, the storyline has the player in disguised as a gentleman, which (chiefly due to custom atdm:team_relations entity) fools the civilians but not the guards, who are said to be able to recognize the face. My needs were easier than yours: that disguise doesn't change throughout the game, and you don't really see it except in a video cut-scene, where much can be faked.

I think I played that one recently. The disguise isn't changed dynamically, it's a story thing with some AI set to be always friendly: This offers a flexible and customizable system to wear disguises in realtime, with the possibility of getting caught if you're seen for too long. Closest system I remember is a FM where you play in a large hotel and there's a needle indicating your suspicion level, bumped when going in other people's rooms and back when returning to a hallway.

29 minutes ago, wesp5 said:

I remember missions where the player can be in a tavern without anybody attacking him, so how is this set? Will all guards always attack the player or is there a variable that sets NPCs to hate/ignore/be friendly towards the player as in Bloodlines?

The disguise changes the team of the player, team relations don't even need to be altered which is great. So if you wear a Citywatch helmet the player goes from team 0 to team 2 then back when removing it or getting caught. This has the added benefit that AI on other teams will also treat you accordingly, so anyone allied to a guard will be fooled by your disguise while enemies of guards but not the player would instead only attack you while you're disguised.

Edited by MirceaKitsune
Link to comment
Share on other sites

1 hour ago, MirceaKitsune said:

So if you wear a Citywatch helmet the player goes from team 0 to team 2 then back when removing it or getting caught. This has the added benefit that AI on other teams will also treat you accordingly, so anyone allied to a guard will be fooled by your disguise while enemies of guards but not the player would instead only attack you while you're disguised.

So this would retroactively work with any TDM mission if we would find a way to get helmets from guards via a script?

Edited by wesp5
Link to comment
Share on other sites

5 hours ago, Geep said:

I hope there is some solution for the crashes you reported.

In my Away 0: Stolen Heart, the storyline has the player in disguised as a gentleman, which (chiefly due to custom atdm:team_relations entity) fools the civilians but not the guards, who are said to be able to recognize the face. My needs were easier than yours: that disguise doesn't change throughout the game, and you don't really see it except in a video cut-scene, where much can be faked.

Yes, at least if there isn't a mirror in the mission, or you switch to third person view, possible in TDM, AFAIK.

Sys Specs Laptop Lenovo V145 15AST, AMD A9- 9425 Radeon R5 - 5 cores 3,1 GHz  RAM 8Gb, GPU 1+2 Gb -Win10 64 v21H2

Favorite online apps you may like too 😉

Link to comment
Share on other sites

3 hours ago, wesp5 said:

So this would retroactively work with any TDM mission if we would find a way to get helmets from guards via a script?

Yes: It could then be distributed as a mod that works universally. I may propose it for the modpack!

1 hour ago, Zerg Rush said:

Yes, at least if there isn't a mirror in the mission, or you switch to third person view, possible in TDM, AFAIK.

I already did a brief test and it worked: I managed to give the player a guard head while the guard helmet was being worn! But soon after TDM would crash to the main menu, and after a few tweaks to the script even that stopped working and there's only the crash now. Likely some obscure internal issue that can be hopefully tackled in the engine.

1 hour ago, snatcher said:

@MirceaKitsune, I haven't tested yet your new mod but please please please carry on working on it 😊

This reminds me, we have to figure out a way to make different mods work alongside.

Thank you, that I shall! And the biggest issue with getting mods to work is the need for a tdm_custom_scripts.script which has been the biggest thorn in the backs of modders: I'd say either execute all scripts automatically the way all files are loaded, or if that's unsafe just allow a script carrying the name of the pk4 to be auto-executed.

Link to comment
Share on other sites

Okay, now this is a super cool idea!

Social roleplay always felt a bit underdeveloped in immersive sims of Looking Glass descent, but that's a thoroughly understandable compromise. Social roleplay potentially makes the NPC decision tree logic and sound/animation requirements explode in complexity, such that not even AAA game makers generally want to touch it.

But there is new technology around now that I think can overcome a lot of those difficulties quite economically. This is something I really hope will be picked up and start rapidly evolving for TDM in the near future.

But for now some initial reactions:

  • It's quite sensible to just use headgear to simplify matters with the player model. Maybe as this evolves more the guard disguise could be a helmet plus sur-coat/tabard. That would be plausible for the PC to quickly slip on and would not change his/her arms, but it would make a more believable disguise.
  • And it could be even more plausible by introducing light-armored variant guards wearing sleeves and gloves like the PC!
  • A similar civilian set might be a wide-brim hat and an over-coat or great-cloak.
  • I unfortunately don't have time (or skills) to dig into this now, but I'd love to know more about the implementation:
    • Does it it make you more visible to NPCs that are against your purloined team? That seems like a reasonable balance concession.
    • Does it take time to put a disguise on or off, and do you need to be concealed for it to work?
    • Does doing thief-y things like stealing (from nobles) or mantling around like a damn-acrobat make your disguise degrade faster? I wouldn't expect that level of complexity with only 3 days work, but it would be cool.
    • Speaking of complexity, it seems like you could evolve this further to give each NPC an individual suspicion meter for each player disguise. Then you could do away with the artificial suspicion meter and have more sophisticated roleplay situations.

I am excited to see this develop, and I really hope it can soon find a home in some future FMs!

 

Link to comment
Share on other sites

Biggest problem is a full outfit would require changing the player's body model including the 1st person hands, and I'm having trouble getting even the head to change for mirrors so likely never happening. Unless massive changes are done in the engine to make it possible... meaning never happening :P

The disguise changes the player's team, so all AI on any team will treat you as the team you're disguised as... however only AI on that team or allies of it can make your disguise wear out and risk exposing you. Currently the only risk is AI is seeing you, the bar dropping faster the closer you get to them... that's gradually accelerated by the AI alert level, being seen by an alert AI can immediately break disguises: Technically I could add drawing a weapon or picking locks or stealing, but I'm not sure if the extra complexity is worth it. When putting the disguise on or after being exposed, you do need to wait for the bar to charge back up... if an AI isn't seeing you this takes about 5 seconds on the default helmets. As for the suspicion meter it's universal, making it per-AI would be confusing as the bar needs to switch to represent the closest one... it also didn't make sense because the player's team is universally modified so you can't trick one AI while being known to another, that would require doing it a different way.

BTW: Don't be afraid to check out the script if anyone wants... it's surprisingly small, only 148 lines of code were needed! What I'm doing is actually pretty simple, it's mainly the AI sight that's crammed into a longer if statement. Also I commented the important parts to explain what they do. If anyone's curious you can check it out here:

https://pastebin.com/7rU6DAAc

Link to comment
Share on other sites

Btw. I think gui supports 3D models, like can be seen with the compass. I thought for immersion it would be cool to have a small 3d model on screen of the player's look when the disguise is used. Maybe it's nonsense, just something that came up..

18 hours ago, MirceaKitsune said:

I might have played that one and vaguely remember it. I believe the crown is a normal loot item attached to the head, you simply frob to pick it up like everything else. Helmets are part of the head mesh, I need to make the head itself frobable and change its model accordingly...

Why is that actually necessary? If an item can be attached to an ai head it could maybe also be attached to your head? Can a helmet not be attached to a head? Well I guess it depends how you want to implement it.

Link to comment
Share on other sites

Since there are also many magic solutions in TDM, such as invisibility potions, why then can't you create a potion that creates a chosen appearance in the view of others, instead of physically changing it?

Another manner to reach some objectives are the one which already exist in TDM, to be capable to enter the spiritual world, like in The House of Locked Secrets or in the old Prey game, to bypass guards and enemies. I think it is a resource that is rarely used in TDM, so far only in one mission.

Edited by Zerg Rush

Sys Specs Laptop Lenovo V145 15AST, AMD A9- 9425 Radeon R5 - 5 cores 3,1 GHz  RAM 8Gb, GPU 1+2 Gb -Win10 64 v21H2

Favorite online apps you may like too 😉

Link to comment
Share on other sites

5 hours ago, datiswous said:

Btw. I think gui supports 3D models, like can be seen with the compass. I thought for immersion it would be cool to have a small 3d model on screen of the player's look when the disguise is used. Maybe it's nonsense, just something that came up..

Interesting, didn't think about that. Yeah the compass uses that trick, I could just use a model of the helmet instead. If it looks good and is worth maybe I'll consider that, though it might be distracting and not make enough sense.

5 hours ago, datiswous said:

Why is that actually necessary? If an item can be attached to an ai head it could maybe also be attached to your head? Can a helmet not be attached to a head? Well I guess it depends how you want to implement it.

The heads are modeled that way: Hoods and helmets are part of the head mesh as they aren't attachments. This is normally a good thing since performance isn't wasted rendering the head or hair under the helmet, but complicates things for my approach as the only way is changing the head models at runtime which may break precaching and stuff. Only a few hats are attached as a separate entities, like the little red hat some merchants wear or the straw hat... those aren't ideal for disguises though and I don't plan on supporting both approaches.

Technically I could try attaching the independent helmet model to the player head, but that would surely look awful and clip through the hood and stuff... only right way is to give the player the Citywatch head once that error is fixed. For AI there is no other way apart from also changing the head model: Stealing the helmet from a guard implies taking it off them, which means they need to switch to a helmetless head which can only be done by setting a different head mesh upon frobbing... no idea if that triggers the same crash as the player head, if so I'm out of luck till a dev can take a look at my report.

5 hours ago, Zerg Rush said:

Since there are also many magic solutions in TDM, such as invisibility potions, why then can't you create a potion that creates a chosen appearance in the view of others, instead of physically changing it?

Another manner to reach some objectives are the one which already exist in TDM, to be capable to enter the spiritual world, like in The House of Locked Secrets or in the old Prey game, to bypass guards and enemies. I think it is a resource that is rarely used in TDM, so far only in one mission.

The base disguise system can be used that way too, it's just not the theme I went for by default as I wanted them to be physical wearables. You can define a magical disguise too that implies creating an illusion which tricks other AI into seeing you as one of them. In fact I thought of including one for undead using a magic skull that makes them think you're also dead, might add that in the next version if others think it makes sense and is worth it?

Note that the spawnargs are documented via editor vars in case anyone wants to make their own: As long as you have a moveable model and inventory icon it's just a few tweaks to define any disguise. Simply inherit from the base "atdm:playertools_disguise" entity def and customize the team and other spawnargs... remember to use the proper mass / friction / impact sounds. Let me throw them here for anyone who wants a quick preview:

atdm:playertools_disguise {
	"inherit"			"atdm:playertool"

	"editor_usage"		"Don't use. This is the base class for disguise inventory items."
	"editor_usage1"		"Individual hats and helmets will derive from this."

	"scriptobject"		"playertools_disguise"
	"gui"				"guis/tdm_hud_disguise.gui"

	//"model"			// to be defined in subclass
	//"clipmodel"		// to be defined in subclass
	"inv_name"			"Disguise"
	"inv_category"		"Disguises"
	"inv_icon"			""
	"inv_droppable"		"1"
	"inv_map_start"		"0"

	// Disguise
	"team"				"0"
	"rank"				"0"
	"personGender"		"PERSONGENDER_MALE"
	"personType"		"PERSONTYPE_THIEF"
	"regen"				"0.25"
	"rate"				"0.5"
	"rate_alert"		"0.1"
	"distance"			"500"
	"speed_move"		"1"
	"speed_turn"		"1"
	"overlay"			""
	"snd_wear"			"player_rustle_short"
	"snd_remove"		"player_rustle_short"
	"model_head"		"head_thief"
	"skin_head"			""

	// Disguise editor vars
	"editor_float team"			"The team the player disguises into when the disguise is active."
	"editor_float rank"			"Rank while the disguise is active."
	"editor_var personGender"	"Person type while the disguise is active."
	"editor_var personType"		"Person gender while the disguise is active."
	"editor_float regen"		"The disguise regenerates over time at this rate."
	"editor_float rate"			"The disguise degrades at this rate when the player is seen by a member or ally of the team."
	"editor_float rate_alert"	"The disguise further degrades by this amount when an AI is alert, increases gradually with alert level."
	"editor_float distance"		"Maximum distance at which being seen by the AI can degrade your disguise, offsets with AI visual acuity."
	"editor_float speed_move"	"Movement hindrance while wearing the disguise."
	"editor_float speed_turn"	"Turning hindrance while wearing the disguise."
	"editor_var overlay"		"Overlay image while wearing the disguise."
	"editor_snd snd_wear"		"Sound to play when putting on the disguise."
	"editor_snd snd_remove"		"Sound to play when taking off the disguise."
	"editor_model model_head"	"The player's head changes to this model while the item is worn, can be seen in mirrors."
	"editor_skin skin_head"		"The player's head changes to this skin while the item is worn."
}
Edited by MirceaKitsune
  • Like 2
Link to comment
Share on other sites

  • 3 weeks later...
On 10/18/2023 at 11:03 PM, MirceaKitsune said:

[...] It could then be distributed as a mod that works universally. I may propose it for the modpack!

The Modpack and the Unofficial Patch are supposed to work out of the box: plug and play. Casual and even advanced players wouldn't know what to do with the Wearable disguises or the Augmentation mod the way things are today.

This is a neat mod @MirceaKitsune, congratulations. I am rooting to see it implemented in a map!

The mod however is overpowered, and it feels like having notarget on. There must be limitations and/or penalties. I suggest:

1) While wearing a helmet players must act like a guard: (creep or) walk in stand up position. The moment you jump or crouch, run, raise a weapon, grab an item... your are fully exposed.

2) Each helmet is functional for limited time. The longer you use it the more suspicious you become and at some point the helmet is of no use. Perhaps helmets can be "recharged" somehow, I don't know, but you get the idea.

PS: Considering the number of mirrors per map and the fact that there are no player reflections (glass, water...) I wouldn't worry much about the head, to be honest.

TDM Modpack 4.0

Link to comment
Share on other sites

Thanks to Stgatilov for fixing the head model change crash! Though the fix will be featured after next dev snapshot, I'll likely update this mod again once that's out. While few maps have mirrors, remember some may be designed with this mod in mind as the goal is to have it working as both a FM and universal mod.

9 hours ago, snatcher said:

The Modpack and the Unofficial Patch are supposed to work out of the box: plug and play. Casual and even advanced players wouldn't know what to do with the Wearable disguises or the Augmentation mod the way things are today.

This is a neat mod @MirceaKitsune, congratulations. I am rooting to see it implemented in a map!

The mod however is overpowered, and it feels like having notarget on. There must be limitations and/or penalties. I suggest:

1) While wearing a helmet players must act like a guard: (creep or) walk in stand up position. The moment you jump or crouch, run, raise a weapon, grab an item... your are fully exposed.

2) Each helmet is functional for limited time. The longer you use it the more suspicious you become and at some point the helmet is of no use. Perhaps helmets can be "recharged" somehow, I don't know, but you get the idea.

PS: Considering the number of mirrors per map and the fact that there are no player reflections (glass, water...) I wouldn't worry much about the head, to be honest.

Thanks: I'm glad you like it even if it may not be featured in the mod pack, though I'll likely attempt some of your suggestions at least. I tried to make it intuitive, hence I didn't add special circumstances (like running) for wearing out the disguise even faster so players aren't left wondering what triggers it, however it may be featured next time: I don't remember if there's a way to check if the player is sprinting or crouched, so I'll likely use the player speed thus the faster you're moving the more quickly you're spotted... I might even make it so being seen picking locks or stealing loot instantly makes your disguise fail!

Making a helmet no longer usable after being caught once is tricky: Helmets all look the same, therefore guards wouldn't notice if you stole another hat and used that to trick them again... they don't use energy either so needing a special way to recharge them wouldn't make much sense. Remember also that being seen by an alert guard makes the disguise drop faster, and part of the alert level is permanent meaning guards will always catch you a bit more quickly if they were alerted once.

The logical solution would be that once you're caught, you can't ever disguise yourself to trick that team again... this would make them too useless and irreversible so no. A good middle ground instead is having a long cooldown timer, so once caught you can't disguise yourself for say 5 minutes. What does everyone think about that?

Link to comment
Share on other sites

1 hour ago, MirceaKitsune said:

Thanks: I'm glad you like it even if it may not be featured in the mod pack, though I'll likely attempt some of your suggestions at least. I tried to make it intuitive, hence I didn't add special circumstances (like running) for wearing out the disguise even faster so players aren't left wondering what triggers it, however it may be featured next time: I don't remember if there's a way to check if the player is sprinting or crouched, so I'll likely use the player speed thus the faster you're moving the more quickly you're spotted... I might even make it so being seen picking locks or stealing loot instantly makes your disguise fail!

How about limiting player's actions with setImmobilization() or similar tricks while wearing a helmet? That way you organically let users know they must stay put while wearing a disguise.

Also, you should perhaps think in ranks. You can go your merry way wearing a City Watch helmet unless you stumble across an elite guard...

TDM Modpack 4.0

Link to comment
Share on other sites

9 hours ago, snatcher said:

How about limiting player's actions with setImmobilization() or similar tricks while wearing a helmet? That way you organically let users know they must stay put while wearing a disguise.

I like that idea much more than any timer, which breaks immersion for me. Maybe only walking and running is allowed when disguised, no crouching, mantling or jumping? Of course if you use lockpicks or the blackjack the disguise fails as well! You need to be able to remove the helmet then...

Link to comment
Share on other sites

16 hours ago, snatcher said:

How about limiting player's actions with setImmobilization() or similar tricks while wearing a helmet? That way you organically let users know they must stay put while wearing a disguise.

Also, you should perhaps think in ranks. You can go your merry way wearing a City Watch helmet unless you stumble across an elite guard...

That's already implemented just not enabled on the default helmets: I may set some movement speed immobilization on them in the next version. Great suggestion to use rank to make the disguise drop even faster, will definitely be doing that... experienced members of the team would indeed see through your disguise even faster.

  • Like 1
Link to comment
Share on other sites

  • 4 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 2 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 5 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
×
×
  • Create New...