Jump to content
The Dark Mod Forums

Changing the player's class


MirceaKitsune

Recommended Posts

The subject was briefly touched in the A House of Locked Secrets thread, but little info of importance was ultimately shared. In essence: If I want the player to be something other than a thief, how can I change the player's class? I am mostly looking at the following three aspects:

 

1 - Can I change the player model to that of another AI? This is important if the player can see himself in the mirror, and for potential mods that would allow a 3rd person perspective. Since as far as I know all humanoid models use the same rig and animations, I'm hoping this will be easy without requiring a lot of hacking.

 

2 - To what degree can I customize the hands in 1st person view, seen when the player is wielding the blackjack / sword / bow? I vaguely remember that the mission I referenced above had the player's sleeves painted red, which could be seen while wielding a weapon... the weapons themselves appeared no different however.

 

3 - How do I change the way the AI treats the player, such as the salute voice? As discussed in the mission referenced above, the author managed to get a friendly town guard to idly salute the player as "hello father", meaning the player was recognized as a priest rather than the default thief.

 

I'm already working on a mission where the player is actually a guard rather than a thief. Although this isn't essential, I'd like him to appear as a guard in the mirror, and have his guard colleagues salute him as a fellow guard rather than as a passerby.

Edited by MirceaKitsune
Link to comment
Share on other sites

as far as I know all humanoid models use the same rig and animations

http://forums.thedarkmod.com/topic/17342-multiplayer-state-and-contributions/?p=377084

 

In general, you'll want to investigate the atdm:player_base and atdm:player_thief class definitions. (And I don't want to sound sharp here, but 'little info of importance was ultimately shared' is a less effective way of asking questions than e.g. 'I investigated this suggestion on a thread someone linked, and it worked/didn't work'.)

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

I don't know how Moonbo did it. He replied to your thread but couldn't remember the details. You could always unzip the FM pk4, study how he did it all, then let us know :)

 

You might also want to take a look at Obsttorte's Hitman-style gameplay scripts, which make all AI neutral unless they see you commit a crime. There are instructions at http://wiki.thedarkmod.com/index.php?title=AI_behaviour_depending_on_player_actions, and the discussion on it (and the script's evolution) is spread throughout his gameplay modification thread at http://forums.thedarkmod.com/topic/14394-apples-and-peaches-obsttortes-mapping-and-scripting-thread

Link to comment
Share on other sites

You might also check "Not an Ordinary Guest". There you also play three different types of character, depending on the difficulty (although I belive, that the animation does not change). I have not played the mission for long, but you have different guard behaviour, depending on how you behave. You even have a "suspicion meter", that shows, if you are compeltely unsuspicious, guards will call you out, or guards get alerted.

Link to comment
Share on other sites

I made the player arm models for A House of Locked Secrets. It required taking model arms from the builder guards and retexturing them, deforming them, and weighting them to the player pov arm skeleton. It's not complicated, but it's time consuming and requires some knowledge of modeling and rigging.

 

Can I change the player model to that of another AI? This is important if the player can see himself in the mirror, and for potential mods that would allow a 3rd person perspective. Since as far as I know all humanoid models use the same rig and animations, I'm hoping this will be easy without requiring a lot of hacking.

 

 

The 3d player model does not use the same skeleton as the other humanoids. There's nothing stopping someone from changing the def file so that it does, but you'd have to do something about the lean and crouch animations, which have no counterparts on the humanoid rig. I remember looking into it once and finding there was something odd about the player animations, but I can't recall what it was anymore.

Link to comment
Share on other sites

This is a bit more complicated than I hoped, so perhaps I can leave it for later. Thanks for the answers everyone :) If anyone makes more missions that use this, please let me know!

 

I'm still curious about the third question though: How do I change the player's class, so that AI's give them distinctive salutes?

Link to comment
Share on other sites

I doubt we have much more knowledge about that than we've given you already. You could examine Moonbo's mission in DR, and/or you could investigate the personType spawnarg in the player's class definition (look in tdm_player_thief.def in tdm_defs01.pk4, or use DR's entity class tree).

 

Edit: I found this thread from last year, which confirms that personType was added to the player class in order to support changed greetings from AI.

Edited by VanishedOne

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
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.

  • 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
       
      · 3 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
×
×
  • Create New...