Dead Bodies: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
RJFerret (talk | contribs)
+ragdoll positioning
 
(One intermediate revision by one other user not shown)
Line 33: Line 33:


==Adjust how a ragdoll lays==
==Adjust how a ragdoll lays==
    * Save a backup copy of the map because doom rewrites your map and fixes ALL ragdolls.
* Save a backup copy of the map because doom rewrites your map and fixes ALL ragdolls.
    * In game, drag the ragdoll around until you get a nice position.
* In game, drag the ragdoll around until you get a nice position.
    * In the console enter saveRagdolls
* In the console enter saveRagdolls
    * doom rewrites your map.
* doom rewrites your map.
    * When you replay the map ALL ragdolls will now have position spawnargs added for every joint. These are WORLD coordinates so you cannot thereafter easily move that posed ragdoll elsewhere in the editor. I mean, you can still drag it around in-game and use saveRagdolls again but you can't just take a saved ragdoll in the editor and move it to the left - it will still start at the saveRagdoll position (you can fiddle with the spawnargs.)
* When you replay the map ALL ragdolls will now have position spawnargs added for every joint. These are WORLD coordinates so you cannot thereafter easily move that posed ragdoll elsewhere in the editor. I mean, you can still drag it around in-game and use saveRagdolls again but you can't just take a saved ragdoll in the editor and move it to the left - it will still start at the saveRagdoll position (you can fiddle with the spawnargs.)
 
Important:
 
In order to truly retain the new ragdoll positions, be sure to load the new *.map into DR so you can continue your work with the ragdolls in their new positions. If you just continue on with your DR session, the next time you save your map file, it will revert the ragdoll positions to the ones they had before you manually adjusted them in-game.




[[Category:Editing]]
[[Category:Editing]]

Latest revision as of 20:17, 7 April 2018

To create a dead body in your mission where there isn't an existing ragdoll, here are two methods:

by killing an AI at map start

Create entity > darkmod > ragdoll then select the one you want. Place it approximately where you want it to fall. You can't pose it like in Thief as far as I know so it falls like a ragdoll.

Though, you can move it around in-game (use cvar g_dragEntity 1), and then use the saveRagdolls console command to write the ragdoll position out to the map file.

If a ragdoll doesn't exist (for example, animals/bots), one solution is to kill the AI at map start.

  1. Create the appropriate entity
  2. Add "Target" spawnarg to that entity from any worldspawn brush or patch (control k doesn't work with worldspawn, have to type it manually...now all worldspawn show the entity as target)
  3. Setup a "Trigger" response via the entity Stim/Response panel
  4. Add a "Response Effect" of "Kill", selecting the entity name as the target

Note the entity will go through the death anim, so don't have the player start be in earshot at start.

by creating a new def file to include with FM

Copy/paste the following into a .def file saved in the def folder of your FM. Substitute "whatever" with your actual item (horse, lanternbot, whatever).

entityDef atdm:env_ragdoll_whatever
{
   "inherit"                    "atdm:env_ragdoll_base"
   "editor_displayFolder"       "Ragdolls/Bodies"
   "editor_ragdoll"             "1"
   "editor_usage"               "Ragdoll for whatever"
   "bleed"                      "1"
   "sleep"                      "1"
   "smoke_wound_flesh"          "bloodwound.smoke"
   "model"                      whatever's model within quotation marks
   "articulatedFigure"          I used the same as model, not sure where to get this
   "snd_bounce"                 copy same sound from whatever (again in quotes)
}

Adjust how a ragdoll lays

  • Save a backup copy of the map because doom rewrites your map and fixes ALL ragdolls.
  • In game, drag the ragdoll around until you get a nice position.
  • In the console enter saveRagdolls
  • doom rewrites your map.
  • When you replay the map ALL ragdolls will now have position spawnargs added for every joint. These are WORLD coordinates so you cannot thereafter easily move that posed ragdoll elsewhere in the editor. I mean, you can still drag it around in-game and use saveRagdolls again but you can't just take a saved ragdoll in the editor and move it to the left - it will still start at the saveRagdoll position (you can fiddle with the spawnargs.)

Important:

In order to truly retain the new ragdoll positions, be sure to load the new *.map into DR so you can continue your work with the ragdolls in their new positions. If you just continue on with your DR session, the next time you save your map file, it will revert the ragdoll positions to the ones they had before you manually adjusted them in-game.