Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

Got it! All I had to do was name the file "autoexec.cfg", now it always executes when placed in the root FM folder and that FM is installed. The file contains the following line which sets the player class accordingly:

seta tdm_player_spawnclass "atdmu:player_agent"

Only one problem left so far: TDM doesn't seem to like my head definition for the player, refusing to position / scale / skin the head properly. I'm using a normal AI model, with player anims set to proguard animations instead of the thief ones for this to work (took a while to find ones that matched acceptably). If I set "pm_thirdperson 1" to temporarily test how I see myself, I find this beloved abomination:

 

 

gxRUyOt.jpg

m7g2ziW.jpg

 

 

The relevant parts of my definition, shortened to include only what's important. Hopefully it illustrates what I'm doing wrong, and an easy solution exists that doesn't involve needing a modified head model.

model model_player_agent_head
{
	inherit									head_model_base
	mesh									models/md5/chars/troopers/pyria_masked_head.md5mesh
}

model model_player_agent_body
{
	mesh									models/md5/chars/troopers/pyria_body.md5mesh

	channel torso							(*Spine_Dummy)
	channel legs							(origin Pelvis Pelvis2 *Hips)

	anim af_pose							models/md5/chars/guards/proguard/af_pose.md5anim
	anim ik_pose							models/md5/chars/guards/proguard/af_pose.md5anim
	anim initial							models/md5/chars/guards/proguard/af_pose.md5anim
}

entityDef atdmu:player_agent
{
	"inherit"								"atdmu:player"
	"model"									"model_player_agent_body"
	"skin"				 					"troopers/pyria_masked_body"
	"_color"								"1 1 1" // shirt and glow color

	"editor_displayFolder"					"Internal"

	"mass"									"70"
	"team"									"0"

	"def_head"								"atdmu:ai_head_player_agent"
	"head_joint"							"Head"
	"offsetHeadModel"						"1.0 0 -2.8"
	"ragdoll"								"guard_base"
}

entityDef atdmu:ai_head_player_agent
{
	"inherit"								"atdm:ai_head_base"
	"model"									"model_player_agent_head"
	"skin"									"troopers/pyria_masked_head"
	"_color"								"1 1 1" // shirt and glow color

	"scriptobject"							"tdm_player_head"

	"sr_effect_4_1"							"effect_damage"
	"sr_effect_4_1_arg1"					"_SELF"
	"sr_effect_4_1_arg2"					"atdm:damage_simple"
}

Link to comment
Share on other sites

Try reducing the z-value of "offsetHeadModel"

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

Try reducing the z-value of "offsetHeadModel"

 

Alright... so "offsetHeadModel" deforms differently on the model when it's used for the player rather than the AI. For a moment I thought the parameter was being ignored altogether, but tweaking it seems to work fine.

 

However this doesn't fix the skin not being applied for the head: I double-checked several times, and I'm using the correct skin of the md5mesh which already works on the AI definition! Am I missing something in that regard too?

Edited by MirceaKitsune
Link to comment
Share on other sites

Check the console.

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

If something is messed up with skins or material files you normally only get warnings, no errors. The def looks fine to me. Does changing the skin in DR work.

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

If something is messed up with skins or material files you normally only get warnings, no errors. The def looks fine to me. Does changing the skin in DR work.

 

Heads aren't displayed in DR, especially for the player. An NPC with the exact same head model / skin works fine however.

Link to comment
Share on other sites

 


Heads aren't displayed in DR, especially for the player.

I know. You can set spawnargs on attachments using the "set" command.

 

Usage: set spawnarg on attachment_name

 

Examples:

set _color on flame (changes the light color on combined extinguishable light entities, like torches)

set skin on head (should work for your case, not sure about the attachment name, you'll find it in the def)

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

Sorry for the delay to reply. I will look into that... although the player is not an entity paced on the map, so I would have to set this from the entity definition itself. Like I said the AI head shows up fine, it's only for the player head that the skin isn't being applied to.

 

I set "editor_head" "1" on both the AI definition as well as the AI head definition. It did not work, and the head still doesn't show up in DarkRadiant when that AI is placed on a map.

 

Also I'm running into a different problem with the next thing; I exported my custom arrow mesh from Blender using its lwo exporter. When I start my map however, I crash to the main menu with the error below. Apparently idTech 4 expects some sort of collision mesh, rather than generating the bounding box on its own... however the lwo exporter doesn't give me any options for such a thing!

ERROR:idMoveable 'atdmu_ammo_nano_simple_1': cannot load collision model models/md5/weapons/compoundbow/nano_glass.lwo
Link to comment
Share on other sites

 

Thanks. How do you define a collision mesh in Blender however? I enabled the lwo exporter but it gives me no options to mark a mesh as collisions. Is it perhaps a special material or object name?

Link to comment
Share on other sites

Is it perhaps a special material or object name?

 

 

Yes. There are a series of collision textures specific to TDM. I forget the exact syntax right now but it's something like darkmod/textures/common/tdm_collision_[material]

Link to comment
Share on other sites

Also clipmodels for moveables need to be convex and very simple, I believe; http://wiki.thedarkmod.com/index.php?title=Moveables#Create_a_Collision_Model_.28CM.29 isn't entirely clear on that point:

Important: The shape must be very simple, not having more than say 16 faces! (I now think this is a max of 12. - Fidcal)


Edit:

The wiki article on moveables isn't sure about the limits either. I'm 99% sure the limit on moveable cms is the limit on the stored clip tracemodel which is 32 verts, 32 edges, and 16 polys which are each limited to 16 edges.


Convex As opposed to concave, which won't work. It's a code optimisation. Even if the object has no "holes" in the mesh, the convex requirement means it can't have any cavities either, because that would be concave. So a doughnut or bucket won't work.


Followed by some discussion of chair clipmodels: I just checked models/darkmod/misc/clipmodels/armchair1_cm.lwo and it seems to be made of two convex hulls.

But then models/darkmod/misc/clipmodels/chair_simple01_cm.lwo just seems not to be convex. http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page-80?do=findComment&comment=256019 refers to another concave collision mesh that works, as a 'fluke'. There seems to be conflicting information here.

 

http://forums.thedarkmod.com/topic/7015-collision-model-issues/ seems to get into multiple definitions of 'convex'.

Edited by VanishedOne

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

Alright; From the looks of it, I need to use "textures/common/collision" as the material. Is that correct? If so I'll add those to the exported lwo and see if the warning goes away.

 

I didn't know it needs to be convex however. So I can't have any inward pointing surfaces or holes in the collision mesh? Shouldn't be a problem, just making sure especially for when I'll be porting more complex map decorations.

Link to comment
Share on other sites

That material will work, but there are also collision materials for specific surface types (they affect impact sounds): type tdm_collision_ while DR's media tab has focus. (I don't know why they aren't in textures/common/ like tdm_nodrawsolid_*.)

 

The last thread I linked seems to indicate that they don't strictly need to be always convex but people have had mixed results getting concave ones to work. http://forums.thedarkmod.com/topic/7015-collision-model-issues/page-4?do=findComment&comment=137162 indicates that id's word on the matter is that convex hulls are 'usually preferred'. The limits on the numbers of verts/edges/polygons do seem to be strict, though.

  • Like 1

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

That material will work, but there are also collision materials for specific surface types (they affect impact sounds): type tdm_collision_ while DR's media tab has focus. (I don't know why they aren't in textures/common/ like tdm_nodrawsolid_*.)

 

The last thread I linked seems to indicate that they don't strictly need to be always convex but people have had mixed results getting concave ones to work. http://forums.thedarkmod.com/topic/7015-collision-model-issues/page-4?do=findComment&comment=137162 indicates that id's word on the matter is that convex hulls are 'usually preferred'. The limits on the numbers of verts/edges/polygons do seem to be strict, though.

 

Thank you, that should work then. Will give it a go tomorrow.

 

Any thoughts on why the player head might not be getting skinned? I tried adding that spawnarg on the AI but it didn't cause the head to appear in DarkRadiant. Like I said though the same head works perfectly for the AI, the skin is only ignored when it's on the player for some reason.

Link to comment
Share on other sites

(I don't know why they aren't in textures/common/ like tdm_nodrawsolid_*.)

The materials that do not appear in the "darkmod" folders are legacy doom materials. All others were made for TDM. For the time TDM was really "just" a Doom mod, it made sense to keep the two separated, but I suppose, they could have been merged since TDM went standalone. However, this would be a lot of unnecessary work to correct all def files, so the folder structure is kept the way it is.

Link to comment
Share on other sites

Any thoughts on why the player head might not be getting skinned? I tried adding that spawnarg on the AI but it didn't cause the head to appear in DarkRadiant. Like I said though the same head works perfectly for the AI, the skin is only ignored when it's on the player for some reason.

Your problem reminds me of http://idtechforums.fuzzylogicinc.com/index.php?topic=395.0 -- which doesn't give an answer, unfortunately.

 

The materials that do not appear in the "darkmod" folders are legacy doom materials. All others were made for TDM. For the time TDM was really "just" a Doom mod, it made sense to keep the two separated, but I suppose, they could have been merged since TDM went standalone. However, this would be a lot of unnecessary work to correct all def files, so the folder structure is kept the way it is.

It doesn't actually seem even as neat as that: there are loads of clearly TDM materials, like tdm_collision_*, outside the textures/ hierarchy, and even within textures/ you have e.g. textures/readables/newspaper_bridgeport_review01

Edited by VanishedOne

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

Alright; From the looks of it, I need to use "textures/common/collision" as the material. Is that correct?

 

 

Use tdm_nodrawsolid_ and surface type suffix here. You need proper sounds for the surface, you have like 30 surface types to choose from. Also, I never had any problems with more complex collision meshes for static models, but the goal is to keep it simple anyway.

Link to comment
Share on other sites

There are tdm_collision_[surface] materials that have the proper sounds and other interactions (like arrow impacts). Nodraw textures do not work the same as collision meshes.

Link to comment
Share on other sites

As a test, I used "textures/common/collision" for the time being. The simple collision mesh was exported properly into the lwo file, which can be seen from the bigger file size. However TDM still crashes to the main menu with the exact same error. Why would this be?

Link to comment
Share on other sites

I'd like to ask for tips about building convincing staircases faster. I'm still trying to get the hang of it and not sure if I'm doing it right.

 

What are some size limitations for a single step, especially in terms of its height ? I wouldn't want to build a staircase that the player or NPCs can't walk on.

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

    • 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
       
      · 2 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
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
×
×
  • Create New...