Jump to content
The Dark Mod Forums

Player Impersonating Others


Recommended Posts

Perhaps you have a mission in mind where the player impersonates a Builder guard in a Builder compound. Or a City Watch officer in a City Watch station.

 

What changes would we need to put in place to make this an option for mappers?

 

Here are a few I can think of:

 

Greetings

 

Currently, the player can be greeted by friendly AI, but the greeting is always generic.

 

Issue #3576 talks about using the player's "personType" spawnarg for that greeting. If it's set to the default "PERSONTYPE_THIEF", the player will continue to be greeted with generic barks. If it's changed to "PERSONTYPE_PRIEST", then the player will be greeted as if he were a Builder priest.

 

Changing Player Spawnargs

 

Since we can't set spawnargs on the player in DR, we need a way of doing that during the game.

 

Per this discussion, we now know how to change spawnargs on the player by using entities. We can also change spawnargs via a script, but not all mappers like to use scripts.

 

And some spawnargs are cemented in place at spawn time, so if any of these need to change during the mission, we'd need to make code changes to support that.

 

Team

 

We rely on team relations to determine whether AI are friendly, hostile, or neutral to the player. We already have methods to change team relations so that the AI will change from being friendly to hostile, etc.

 

Weapon Graphics

 

When the player wields a blackjack or the bow, we see the gloved hands of a thief. What effort is involved in making variations of those graphics to match a Builder guard, Builder Priest, City Watch officer, etc?

 

Mirrors

 

If the player is pretending to be a Priest, what will he see in a mirror? Is it as simple as changing the player's model to a Builder or City Watch model? Is the player's head detached? Should mirrors be avoided in such missions?

 

What Else?

 

What other changes would we need to worry about?

Link to post
Share on other sites

When the player wields a blackjack or the bow, we see the gloved hands of a thief. What effort is involved in making variations of those graphics to match a Builder guard, Builder Priest, City Watch officer, etc?

 

Those are md5meshes, so I suppose one could take the DDS files, and change their color. Then swapping viewmodel skins would make anything possible.

Clipper

-The mapper's best friend.

Link to post
Share on other sites
When the player wields a blackjack or the bow, we see the gloved hands of a thief. What effort is involved in making variations of those graphics to match a Builder guard, Builder Priest, City Watch officer, etc?

 

The player hands and weapons are just md5mesh models. It would be a fairly straightforward project to take the arms from existing AI models and make md5mesh files out of them. You would then need a way to swap them dynamically (unless the player started and ended the mission in costume).

 

If the player is pretending to be a Priest, what will he see in a mirror? Is it as simple as changing the player's model to a Builder or City Watch model? Is the player's head detached?

 

Not sure what happens in that case...I'm pretty sure the player model uses the same rig as the other AI, but it has animations that the other AI do not (eg, crouching). The head is def_attached normally.

Link to post
Share on other sites

Exciting proposal! I always loved disguises in Hitman, and that's not all that imaginative mappers could do with it of course.

 

Player spawnargs: I guess that solution could be prefabbed? Or it not it'd be easy to support by wrapping a line of script in new a DR entity for ease of use.

 

Team: Obsttorte did some interesting script work a while back that would tie in with well with this setup. IIRC it raised a visual alert stim on the player if they were seen doing something suspicious, while letting them wander round unhindered if not doing something suspicious.

 

Mirrors and models: In all my LOD tests the last couple of weeks, I haven't yet found an animated model that couldn't be swapped for another model even mid-animation. And you can use an animation from one mesh on a different mesh as long as they have the same joints. I tested that and it works, although I wasn't planning to do it for the LOD proposal, but the animator code allows for it so we can try it out. You do need same number of joints though.

Link to post
Share on other sites

Player spawnargs: I guess that solution could be prefabbed?

 

Yes. The prefab would have 4 entities in it. Dup it in locations where spawnargs need to be changed.

 

If there are spawnargs that are important to impersonation, but which are cemented in place at spawn time, we'd need code changes to treat them differently. One way around that would be to introduce a "player proxy" entity with a fixed name, that we can see in DR, put the spawnarg settings on that, and have the code transfer the spawnargs from that to the player entity at the end of player spawning. This would be useful for missions where the player spends all his time impersonating someone else. But in cases where the disguise is put on and taken off, we'd need the prefab entity solution.

Link to post
Share on other sites

Let's also consider a target_setplayerkey that can set one or more spawnargs. To start off with it can just be an entity def and a trigger script, no game code, but we'd have the option of supporting it with game code later if it turns out to be wanted. Users would just place it in DR and wouldn't have to change anything if we later changed the implementation.

Link to post
Share on other sites

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.

×
×
  • Create New...