Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

Is there a way to force-select a weapon for the player through scripting? Say they're holding the blackjack and you make them unsheathe their sword. Looking through the scriptEvents all I see that might work is selectWeapon but I don't know.

My FMs: The King of Diamonds (2016) | Visit my Mapbook thread sometimes! | Read my tutorial on Image-Based Lighting Workflows for TDM!

 

 

Link to comment
Share on other sites

It's supposed to work, lowering the current weapon and raising the requested weapon.

 

$player1.selectWeapon(s);

 

where 's' is one of these strings:

 

"unarmed"
"blackjack"
"shortsword"
"broadhead"
"waterarrow"
"firearrow"
"ropearrow"
"gasarrow"
"noisemaker"
"mossarrow"
"vinearrow"
Link to comment
Share on other sites

  • 2 weeks later...

So, the player model. When you look into a reflective surface, you see your own reflection. Is there a way to change the model that gets reflected? To be specific, can I change the player model's head like it is possible with AI?

Come the time of peril, did the ground gape, and did the dead rest unquiet 'gainst us. Our bands of iron and hammers of stone prevailed not, and some did doubt the Builder's plan. But the seals held strong, and the few did triumph, and the doubters were lain into the foundations of the new sanctum. -- Collected letters of the Smith-in-Exile, Civitas Approved

Link to comment
Share on other sites

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.

I haven't seen anything about changing the head specifically, so I don't know whether the skeletal incompatibility extends to the head bones.

 

"def_head" "atdm:ai_head_thief_player" is in tdm_player_thief.def.

 

http://forums.thedarkmod.com/topic/16412-setting-spawnargs-on-player/?do=findComment&comment=350413 would save overriding the entire file if it works.

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

Good work. But I guess it would make more sense to change the head in the player def and overload that instead of overloading the head mesh file, as the def is smaller.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

Good work. But I guess it would make more sense to change the head in the player def and overload that instead of overloading the head mesh file, as the def is smaller.

 

It's a 20-30~ kb file size difference between the mesh file and the def... I mean if you're desperate sure but replacing the mesh works fine.

Link to comment
Share on other sites

Thank you, Goldwell!

 

New question: how do I make an AI lean against the wall while pausing on a patrol?

  • Like 1

Come the time of peril, did the ground gape, and did the dead rest unquiet 'gainst us. Our bands of iron and hammers of stone prevailed not, and some did doubt the Builder's plan. But the seals held strong, and the few did triumph, and the doubters were lain into the foundations of the new sanctum. -- Collected letters of the Smith-in-Exile, Civitas Approved

Link to comment
Share on other sites

Thank you, Goldwell!

 

New question: how do I make an AI lean against the wall while pausing on a patrol?

 

On the AI set the following spawnarg:

 

"def_attach" "atdm:animation_replace_lean"

 

They will patrol as normal and then when they are stationary they will lean

 

edit: or even better.. just add a path_anim with the spawnarg

 

"anim" "lean_loop"

 

and that will do it as well.. probably better than the def_attach thing actually because then you can make it apart of the patrol route.

Edited by Goldwell
  • Like 2
Link to comment
Share on other sites

Still struggling with the head issue. I want my player model to have this head here:

post-2023-0-98702300-1462135912.png

 

 

So I guess moving forward you would have to figure out a way to tell the game to load a different model instead of the tdm_ai_thief.md5mesh as just simply replacing it isn't enough because the joints aren't similar (according to the console)

 

However.. if you just want to change the head you can replace the head file "thief_head.md5mesh" found in here "\models\md5\chars\thief\". If you have the head mesh that's great but if you need to find it remember I created a thread a little bit back with the text dump of all TDM files so it's an easy way to search if you need it.

 

To get this working once you have your headmesh from whichever AI that you want place it in your FM folder using the exact same directory (so the mod replaces your file over the default) "FMNAME\models\md5\chars\thief\" and make sure you rename your new headmesh to "thief_head.md5mesh" and viola it works.. example:

 

I followed these instructions, but the head I am looking for, ai_head02_hood_dark, doesn't seem to be there among the assets (found in tdm_ai_humanoid_heads01.pk4). Upon investigation, I have found that it is defined in tdm_ai_heads_springheel, like this:

 

 

entityDef atdm:ai_head02_hood_dark

{ "editor_usage" "Hood significantly reduces this character's peripheral vision."
"inherit" "atdm:ai_head_base"
"model" "head_02"
"skin" "heads/head02_hooded_dark"
"fov_vert" "95"
"fov" "80" // horizontal FOV (peripheral vision blocked by hood)
"fov_rotation" "0 -35 0"
"ko_alert_immune_state" "5" //cannot be KO'd when in Combat
}

 

...but the head_02 model and the head02_hooded_dark skin are not among the regular assets. Now what?

 

(Note, it is also a valid solution if I exclude all reflective surfaces from this and any future missions. However, this time, the player's likeness is actually plot-relevant, so there is a good reason why I want to get ahead.)

Come the time of peril, did the ground gape, and did the dead rest unquiet 'gainst us. Our bands of iron and hammers of stone prevailed not, and some did doubt the Builder's plan. But the seals held strong, and the few did triumph, and the doubters were lain into the foundations of the new sanctum. -- Collected letters of the Smith-in-Exile, Civitas Approved

Link to comment
Share on other sites

Still struggling with the head issue. I want my player model to have this head here:

attachicon.giffoxley_head.png

 

 

I followed these instructions, but the head I am looking for, ai_head02_hood_dark, doesn't seem to be there among the assets (found in tdm_ai_humanoid_heads01.pk4). Upon investigation, I have found that it is defined in tdm_ai_heads_springheel, like this:

 

 

...but the head_02 model and the head02_hooded_dark skin are not among the regular assets. Now what?

 

(Note, it is also a valid solution if I exclude all reflective surfaces from this and any future missions. However, this time, the player's likeness is actually plot-relevant, so there is a good reason why I want to get ahead.)

 

Is that an SVN asset, perhaps?

 

Time to do a scan of all skin defs to root that out.

 

Other than that, perhaps you're picking up custom assets packed with a mission?

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

I've been processing quite a batch of lamps but this one is giving me headaches. Can projected lights gradually weaken the further they shine, instead of abruptly cutting off to pitch black?

 

g8TIHZn.jpg

 

-I've looked more closely at the lanternbot's lantern and it turns out to have the same issue.

-The existing lanterns don't have this problem, but that's most likely because they're using omni lights.

Link to comment
Share on other sites

I've been processing quite a batch of lamps but this one is giving me headaches. Can projected lights gradually weaken the further they shine, instead of abruptly cutting off to pitch black?

 

g8TIHZn.jpg

 

-I've looked more closely at the lanternbot's lantern and it turns out to have the same issue.

-The existing lanterns don't have this problem, but that's most likely because they're using omni lights.

 

The LightFalloffImage should control that, what falloff image are you using?

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Still struggling with the head issue. I want my player model to have this head here:

attachicon.giffoxley_head.png

 

 

I followed these instructions, but the head I am looking for, ai_head02_hood_dark, doesn't seem to be there among the assets (found in tdm_ai_humanoid_heads01.pk4). Upon investigation, I have found that it is defined in tdm_ai_heads_springheel, like this:

 

 

...but the head_02 model and the head02_hooded_dark skin are not among the regular assets. Now what?

 

(Note, it is also a valid solution if I exclude all reflective surfaces from this and any future missions. However, this time, the player's likeness is actually plot-relevant, so there is a good reason why I want to get ahead.)

 

OK, here is the SVN skin def from tdm_ai_heads.skin :

 

 

 
skin heads/head02_hooded_dark
{
model models/md5/chars/builders/inquisitor/tdm_inquisitor_head.md5mesh

models/chars/builders/prelate/prelatehood tdm_wearable_hood
models/md5/chars/builders/guard/builder_cloth textures/common/nodraw
models/md5/chars/inventors/engineer2/head textures/common/nodraw
tdm_pageboy_dark textures/common/nodraw

}
 

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

 

Is that an SVN asset, perhaps?

 

Time to do a scan of all skin defs to root that out.

 

Other than that, perhaps you're picking up custom assets packed with a mission?

Yes, that could be it! I also have the Behind Closed Doors PK4 in my folder! Will investigate when I'm home from work. Thanks! :)

Come the time of peril, did the ground gape, and did the dead rest unquiet 'gainst us. Our bands of iron and hammers of stone prevailed not, and some did doubt the Builder's plan. But the seals held strong, and the few did triumph, and the doubters were lain into the foundations of the new sanctum. -- Collected letters of the Smith-in-Exile, Civitas Approved

Link to comment
Share on other sites

That head/skin combo is definitely in 2.0.3, atdm:ai_burglar comes with it as default. The model head_02 is obviously not in the file structure, but the model is in fact models/md5/chars/heads/npcs/commoner_head02.md5mesh. No idea why the model spawnarg in the EntityDef and the actual model name differ, probably an md5 quirk.

My FMs: The King of Diamonds (2016) | Visit my Mapbook thread sometimes! | Read my tutorial on Image-Based Lighting Workflows for TDM!

 

 

Link to comment
Share on other sites

 

The LightFalloffImage should control that, what falloff image are you using?

 

This is a stock light texture which uses brightround, like many others, as its falloffimage:

 

lights/tdm_lanternlight

 

{

lightFalloffImage makeintensity( textures/lights/brightround )

{

forceHighQuality

map textures/lights/tdm_lanternlight

colored

zeroClamp

red ((.02 * sintable [(time * ( 1 + Parm3 ) ) ]) +.98) * Parm0

green ((.02 * sintable [(time * ( 1 + Parm3 ) ) ]) +.98) * Parm1

blue ((.02 * sintable [(time * ( 1 + Parm3 ) ) ]) +.98) * Parm2

}

}

 

 

 

I've literally been through all suitable stock light textures and they all cut off to black like this when they're set to project, it's strange.

 

Link to comment
Share on other sites

Hmm, I'll bet that the Omni lights have a falloff image with the bright spot in the center or are even using the same

image that the bright round uses for the projection image (typical image reuse in Doom 3). You probably need an

image with a bright band on one side that fades exponentially on the other. I think there should be a few materials with

exponential falloff like that in the stock assets but I'll have to dig around when I get home from work.

  • Like 1

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

That head/skin combo is definitely in 2.0.3, atdm:ai_burglar comes with it as default. The model head_02 is obviously not in the file structure, but the model is in fact models/md5/chars/heads/npcs/commoner_head02.md5mesh. No idea why the model spawnarg in the EntityDef and the actual model name differ, probably an md5 quirk.

Isn't head_02 the model def. in tdm_ai_heads_springheel.def?

//-----------------------------------------------------------------------
//----------- Head 02 -- --------------------------------------------------
//-----------------------------------------------------------------------

model head_02 {
        inherit                                   head_model_base
	mesh					models/md5/chars/heads/npcs/commoner_head02.md5mesh

}
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

    • The Black Arrow

      Any of you heard Age of Wonders 4's OST?
      https://www.youtube.com/watch?v=Q0TcoMGq4iA
      I love how after all these years, Michiel van den Bos still conserves his "Melodic" spirit.
      · 0 replies
    • nbohr1more

      Moddb article is up:  https://www.moddb.com/mods/the-dark-mod/news/the-dark-mod-212-is-here
      · 3 replies
    • Petike the Taffer

      I've been gone for a while, but now I'm back, have a new desktop and I want to get back to making missions and playing missions. And doing other contributions. Waiting for my reset password for the wiki, but I'll take a look at it soon. Hello, all.
      · 4 replies
    • snatcher

      TDM Modpack 4.0 for The Dark Mod 2.12 released!
      · 1 reply
    • nbohr1more

      Congrats to all the busy Dark Mod developers! TDM 2.12 is here!
      · 4 replies
×
×
  • Create New...