Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

When compiling a map I keep getting the error "ERROR: Entity 1 has surfaces, but no name key"

 

But everything in my map (there is only 7 in this little test map i'm doing) has a name. I don't even know how to debug such a thing and I can't search the thread because key is too short to search with

Link to comment
Share on other sites

When compiling a map I keep getting the error "ERROR: Entity 1 has surfaces, but no name key"

 

But everything in my map (there is only 7 in this little test map i'm doing) has a name. I don't even know how to debug such a thing and I can't search the thread because key is too short to search with

 

What is entity #1 and what is its name?

Link to comment
Share on other sites

What is entity #1 and what is its name?

 

I can't see a name and this is all the info entity 1 gives in the console on dmap

 

ArDXQo2.png

Link to comment
Share on other sites

Ah so apparently the problem was with the ambient light :S

 

I deleted it and re-added it and things worked. It had a name but ah it works so i'm happy :) Thanks anyway G-man!

Link to comment
Share on other sites

I learned this the hard way too, the first thing in the map needs to be a worldspawn brush. (Not player start, not ambient light, etc.)

"The measure of a man's character is what he would do if he knew he never would be found out."

- Baron Thomas Babington Macauley

Link to comment
Share on other sites

I think you can also search for the entity by number in DR.

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

The first thing you should do when you start building a new mission is to insert this prefab:

 

prefabs->misc->StartObjectives,Shop,Tools,Ammo.pfb

 

This does several good things for you:

 

1 - gives you a properly named ambient light covering a very large area

 

2 - gives you the LeakTest entity as entity #1, which is extremely handy when looking for internal leaks

 

3 - gives you all the available player tools for each difficulty level. You can then delete what you don't want, and set the inventory counts properly.

 

4 - gives you a shop entity (which you can remove if there's no shop)

 

5 - gives you an objectives entity (though DR will give you one if it's not present when you start defining your objectives)

 

6 - gives you a master key that is helpful when building/testing (but remember to delete it when you ship)

Link to comment
Share on other sites

The first thing you should do when you start building a new mission is to insert this prefab:

 

prefabs->misc->StartObjectives,Shop,Tools,Ammo.pfb

 

This does several good things for you:

 

1 - gives you a properly named ambient light covering a very large area

 

2 - gives you the LeakTest entity as entity #1, which is extremely handy when looking for internal leaks

 

3 - gives you all the available player tools for each difficulty level. You can then delete what you don't want, and set the inventory counts properly.

 

4 - gives you a shop entity (which you can remove if there's no shop)

 

5 - gives you an objectives entity (though DR will give you one if it's not present when you start defining your objectives)

 

6 - gives you a master key that is helpful when building/testing (but remember to delete it when you ship)

that sounds like it effectively replaces the useful bits of the old startmap. surprised i didn't know about this.

Link to comment
Share on other sites

I have a couple of question about proper visportaling. It's easy enough to do inside a building with visportals in doors, windows and in places where corridors turn, but doing this in the city streets has proven to be extremely hard. Houses with triangular roofs are especially problematic.

 

So my questions are:

 

1. Is it possible to make a proper visportal touched by nodraw surfaces? Does it make sense?

2. Do you usually try to separate little side alleys between buildings on your maps with visportals, if their roofs are not touching the skybox? What is the simplest way to do this? I tried to make a skybox roof for the alley and place a visportal in its entrance, but it is incredibly clunky and the skybox will obstruct buildings outside the alley that are high enough.

3. In the city view, is trying to separate every corridor worth the effort, or should I just create larger hubs, several buildings each separated with visportals?

Link to comment
Share on other sites

1. Yes, to Caulk (other nodraw is not sealing geometry, your visleafs need to be sealed)

2. Caulk instead of portalsky for the top, then func_static building tops will show through (if their origins are inside the visleaf)

3. Yes, for proper sound propagation, as well as rendering performance. Otherwise what happens in an alley would be heard in a neighboring alley as if the building between were not even there!

 

For more details: http://wiki.thedarkm...portal_Tutorial

Edited by RJFerret

"The measure of a man's character is what he would do if he knew he never would be found out."

- Baron Thomas Babington Macauley

Link to comment
Share on other sites

As explained in the wiki entry linked above, the main idea is to keep all details func_static. The sealing geometry should be as easy as possible. If the player is not able to enter the rooftops, they do not neccessarely need to be inside your sealing geometry. Some important things:

  • Caulk "gets rendered" as portal sky if there is at least one surface in the currently rendered scene that uses textures/smf/portalsky
  • Caulk gets not rendered at all, but those surfaces that are not rendered but uses caulk are sky. If you use portalsky texure instead, it will obscure anything behind it
  • A func_static get's rendered, if at least one of its tris is inside the currendly rendered scene. If you have a rooftop for example which is completely out of your sealing geometry, create brushes inside all areas were it is visible and texture those nodraw except for the top face, where you have to use any drawing texture (steel, stone or whatever).
  • caulk does not cut into func_static
  • to make sure caulk gets rendered as sky, create tiny brushes directly below the "skyline" (the top of your sealing geometry), so it is never in front of anything that needs to be drawn independently from where the player currently stands
  • Use the same approach for detailed geometry on buildings, so the sealing geometry stays as easy as possible
  • only use rectangular visportals, vp's with more vertices will curently cause problems with sound propagation

If this is unclear and/or you do not understand the essence of the above linked tutorial (maybe due to language barriers, I don't know your home country, so don't think I assume you are stupid ;) ), I can create a tutorial video on youtube that explains the essence.

 

To all other mappers: If you consider this useful please react on the main page (what's on your mind section on the right)

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

I have got three questions:

 

- Is it possible to change the player model?

- Is it possible to change a model's skin on the fly by a trigger without reloading? Does it has to be a gui?

 

- Does anyone know how I can edit the wooden wall behind a painting?

d9wq3ijh.jpg

The material file just shows:

 

 

 

models/darkmod/props/textures/painting09_m_d

does not contain the wood texture.

painting09_m
{
qer_editorimage models/darkmod/props/textures/painting09_m_d_ed
wood

diffusemap models/darkmod/props/textures/painting09_m_d
bumpmap models/darkmod/props/textures/painting07_local
specularmap models/darkmod/props/textures/painting07_s
{
if ( parm11 > 0 )
blend gl_dst_color, gl_one
map _white
rgb 0.40 * parm11
}
{
if ( parm11 > 0 )
blend add
map models/darkmod/props/textures/painting09_m_d
rgb 0.15 * parm11
}

// TDM Ambient Method Related
{
if (global5 == 1)
blend add
map models/darkmod/props/textures/painting09_m_d
scale 1, 1
red global2
green global3
blue global4
}
{
if (global5 == 2)
blend add
program ambientEnvironment.vfp
vertexParm 0 1, 1, 1, 1 // UV Scales for Diffuse and Bump
vertexParm 1 1, 1, 1, 1 // (X,Y) UV Scale for specular
vertexParm 2 global2, global3, global4, 1

fragmentMap 0 cubeMap env/gen1
fragmentMap 1 models/darkmod/props/textures/painting07_local // Bump
fragmentMap 2 models/darkmod/props/textures/painting09_m_d // Diffuse
fragmentMap 3 models/darkmod/props/textures/painting07_s // Specular
}
}

 

 

 

Edit:

Hm... I'm one step further. I created a new tga file with an alpha channel but the alpha channel doesn't get recognized.

n8lqpfmb.jpg

 

The alpha channel looks correct:

3v7dcqjr.jpg

 

Do I have to blend it in a special way?

 


painting_empty_m
{
qer_editorimage models/darkmod/props/textures/painting09_m_d_ed

{
blend add
map models/darkmod/props/textures/paintingempty09_m_d_ed.tga
scale 1, 1
}

//diffusemap models/darkmod/props/textures/paintingempty09_m_d_ed.tga
bumpmap models/darkmod/props/textures/painting07_local
specularmap models/darkmod/props/textures/painting07_s
}

 

It somehow works in a weird way when I add translucent:

eg6k2cmj.jpg

Edited by Radiant
Link to comment
Share on other sites

- Is it possible to change a model's skin on the fly by a trigger without reloading? Does it has to be a gui?

Not via a trigger, but there is a script command for that.

 

The wooden background of the paintings is part of the texture image. If you want this part to show a different texture, I suggest you create your own frame.

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

I'm trying to have an AI stand in front of the player with their arm outstretched (and a letter in their hand). The idea is that when the player takes the letter, the AI puts his hand back down and then goes into his idle animation. Is this something that's at all possible? Maybe with a func_animate?

But you should walk having internal dignity. Be a wonderful person who can dance pleasantly to the rhythm of the universe.

-Sun Myung Moon

 

My work blog: gfleisher.blogspot.com

Link to comment
Share on other sites

It's possible with various implementations (I'd use a conversation so you could easily face player1, but could be done with path_anim too if the angle to face is consistent)--the trickier catch is the custom animation, I don't know if the hold bottle arm out could be modified for this purpose?

"The measure of a man's character is what he would do if he knew he never would be found out."

- Baron Thomas Babington Macauley

Link to comment
Share on other sites

Is it possible to manipulate rag-dolls / AI so that they are positioned in a particular stance? I want to prop one up against a wall, so that the AI slumps against it.

 

Secondly, would it be possible for someone to make a video tutorial on creating various shapes with patches? The wiki entry only covers bevels, cylinders and arches, but having played many FMs - it's clear that patches are incredibly versatile and a detailed video tutorial would go a long way to helping new mappers figure out how best to utilise patches.

Link to comment
Share on other sites

See this wiki article for positioning ragdolls in game and saving their position to your map file: http://wiki.thedarkmod.com/index.php?title=Dead_Bodies

 

A patch tutorial on 3d shapes could be useful. A couple of basics that I think should be covered in it in passing: adjusting subdivisions so that patches can line up without breaks, and stitching patches by grid snapping adjacent vertices.

Link to comment
Share on other sites

Doing things like angled corner concave/convex patches like the one above this window would be nice too. This took me about an hour of trial and error. Concave roof designs would be nice to include as well though those are fairly straight forward. Also the different methods of applying textures to a patch so that it doesn't look stretched/discombobulated would be great for newbies like me as well.

 

I'd like to also see a fairly indepth tutorial on the Texture Tool, how its used, what kinds of things you can address with it, etc. I've used it twice and it was (still is) difficult to understand exactly what it was doing and how its values relate to the Surface Inspector if they do at all.

 

e1ucJM3.jpg

Edited by Lux
Link to comment
Share on other sites

Is it possible to manipulate rag-dolls / AI so that they are positioned in a particular stance? I want to prop one up against a wall, so that the AI slumps against it.

 

Yes, here you go...

  • 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.)

 

That's also briefly mentioned in a different wiki article, but I'll add it to the Dead Bodies one since that seems logical.

"The measure of a man's character is what he would do if he knew he never would be found out."

- Baron Thomas Babington Macauley

Link to comment
Share on other sites

Apparently not obviously, I was going to say simply use the stim/response to put a Damage Response on the AI, which Triggers an atdm:target_setobjective_state to fail the objective, but the Damage Response does nothing (perhaps because there's an inherited damage response on AI already?)

 

Ironically, change the response to water, and you can fail by getting them wet though! So...bug perhaps?

 

Edit: Further exploration, adding the response effect to the inherited response does nothing (manually via spawnarg, can't via stim/response editor). Deactivating the inherited response and substituting it doesn't help either.

Edited by RJFerret

"The measure of a man's character is what he would do if he knew he never would be found out."

- Baron Thomas Babington Macauley

Link to comment
Share on other sites

Ah, here's a workaround... It's easy to have friendlies flee upon being hurt a bit (just set their health_critical to just below their health), so you could have the friendly team flee point behind a trigger_once that failed the objective.

 

Liabilities include the delay in time for them to reach it compared to knock-out/kill failures, it not failing if they can't reach it for some reason (blocked), damage from another source causing them to flee, them choosing a different flee point (like furthest distance from player), and whatever I'm not anticipating.

Edited by RJFerret

"The measure of a man's character is what he would do if he knew he never would be found out."

- Baron Thomas Babington Macauley

Link to comment
Share on other sites

Thanks RJ,

 

That's a good idea. Just to be safe though, I'll use a script (trying to get more experience with those anyways). Here's what I'm thinking:

 

void checkHarm()

{

float JackHealth = $Jack.getHealth();

float JillHealth = $Jill.getHealth();

 

while(1)

{

 

if(JackHealth - $Jack.getHealth() > 1)

{

$FailHarmObjective.activate($player1);

}

 

if(JillHealth - $Jill.getHealth() > 1)

{

$FailHarmObjective.activate($player1);

}

 

sys.wait(1);

}

}

 

You would just need to add one variable/if statement for each AI to be affected and run it from the start of the level (i.e. in the void main just have a line that says "thread checkHarm()"). the "FailHarmObjective" is an actual entity in the map which would then fail the relevant objective.

Edited by Moonbo

But you should walk having internal dignity. Be a wonderful person who can dance pleasantly to the rhythm of the universe.

-Sun Myung Moon

 

My work blog: gfleisher.blogspot.com

Link to comment
Share on other sites

If that's a "sys.wait(0.1)" you could change it to sys.wait(1) and the script won't have to run so often. Failing the mission inside 1 second of someone getting hurt is reasonable. In fact, failing it inside 2 or 3 seconds is also reasonable.

 

And CheckHarm() has to be run as a thread from main().

 

And if you don't plan on changing an AI's team during the mission, you could take it out of the check early if it's not on team 0, because even if it gets hurt, it won't fail the mission, so why bother checking.

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...