Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

You shouldn't have to set any spawnargs on the lantern.

 

If you use these spawnargs on your AI:

 

"def_attach5" "atdm:prop_lantern_on"

"pos_attach5" "hand_l"

 

the lantern automatically comes with these spawnargs:

 

"extinguish_on_drop" "1"

"extinguish_on_drop_delay" "4" // in seconds

"extinguish_on_drop_delay_random" "4" // random time added to base delay time

 

By default, then, the lantern should extinguish between 4 and 8 seconds after dropping.

 

For a lantern, however, if it lands upright, it won't go out.

 

Other rules:

 

- If the player picks up the lantern before it goes out, it stays lit

- If the lantern falls in water, it goes out even if it lands upright.

  • Like 1
Link to comment
Share on other sites

Posted Today, 12:12 PM Grayman said:

You shouldn't have to set any spawnargs on the lantern

 

Since the lantern is not visible in DR, and spawns at game start; I didn't think you could add spawnarg to it?

I put what you have above on the AI, according to the article.

I did add: drop_when_ragdoll after def_attach" and pos_attach" and it seems to work fine.

Edited by buck28

Quando omni flunkus moritati" ("When all else fails, play dead")

Halloween Contest Winner 2014

Link to comment
Share on other sites

Objects, in general, have their default spawnargs defined in the darkmod/def/*.def files. The lantern appears in "tdm_prop_items.def", where the "extinguish*" spawnargs are defined.

 

You should only have to put the "def_attach5" and "pos_attach5" spawnargs on the AI. You get everything else automagically.

Link to comment
Share on other sites

To see this for yourself, do the following:

 

Bring up the "Create entity" window and choose Props/atdm:prop_lantern_on.

 

This places a lantern in your map.

 

Select it and scroll down through its spawnargs until you see the ones for "extinguish*".

Link to comment
Share on other sites

So by doing the above, you can see a lantern in DR? I'm confused now. :wacko:

 

grayman only suggested that so that you can examine the spawnargs in DR and see that the "extinguish_on_drop" spawnargs come automatically with the standard lantern. That's not how to do it for real. The correct way to set up an AI carrying a lantern is the def_attach one that you've used, where you don't get to see it in DR.

  • Like 1
Link to comment
Share on other sites

Does anyone know how to change it so that once you add an alpha level to a custom texture it doesn't make it brighter?

 

My texture looks great until I add the alpha (which is needed for the edges) and then suddenly the texture appears brighter ingame.

 

Here is the material code for it

 

 

textures/carpet/persiancarpet1

{

noshadows

surftype15

description "carpet"

qer_editorimage textures/carpet/persiancarpet1

bumpmap textures/carpet/persiancarpet1_local

diffusemap textures/carpet/persiancarpet1

{

blend diffusemap

map textures/carpet/persiancarpet1

alphatest 0.5

}

{

if (global5 == 1)

blend add

map textures/carpet/persiancarpet1

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 textures/carpet/persiancarpet1_local // Bump

fragmentMap 2 textures/carpet/persiancarpet1 // Diffuse

fragmentMap 3 _black // Specular

}

}

 

 

Link to comment
Share on other sites

Does anyone know how to change it so that once you add an alpha level to a custom texture it doesn't make it brighter?

 

You're applying the persiancarpet1 texture 3 times there...

"blend add" will always brighten. "blend blend" will tone it down to non-luminous transparency. "blend filter" will darken. You can adjust the alpha with the alpha keyword and the amount of color with the rgb (or separate red, green, blue) keywords. NB alpha materials don't use lighting, they are fullbright, so you have to adjust the rgb parameter manually to fit the lighting level in your scene.

You can't mix alphatesting and an alpha blend in the same material stage though... What effect are you going for?

  • Like 1
Link to comment
Share on other sites

You've got two diffusemap stages. Delete the first one.

 

Ah that fixed it, thank you :)

Link to comment
Share on other sites

You're applying the persiancarpet1 texture 3 times there...

"blend add" will always brighten. "blend blend" will tone it down to non-luminous transparency. "blend filter" will darken. You can adjust the alpha with the alpha keyword and the amount of color with the rgb (or separate red, green, blue) keywords. NB alpha materials don't use lighting, they are fullbright, so you have to adjust the rgb parameter manually to fit the lighting level in your scene.

You can't mix alphatesting and an alpha blend in the same material stage though... What effect are you going for?

 

I was going for this sort of effect http://i.imgur.com/n4YMbT5.jpg and yeah I didn't realize I was overdoing it on the diffuse stuff. but after deleting it, the texture is no longer over bright and the edges of my carpet look correct :)

Link to comment
Share on other sites

"diffusemap" is just shorthand for "blend diffusemap map". You use the second one if you need to add further spawnargs, like alphatest or rgb values.

  • Like 1
Link to comment
Share on other sites

<removed>

 

I have just decided to cut out this part from my map. So please ignore this post.

Edited by Goldwell
Link to comment
Share on other sites

Hey Goldwell,

 

This might be barking up the wrong tree, but here it goes. I had a situation in my upcoming FM where certain transparent textures had draw-order render bugs with the portal_sky texture that are somewhat similar to your screenshot. I'm not sure if that's what's happening here (and hopefully someone comes along with an easier answer), but if it is, then my solution was to create a new portal_sky material that overwrote the default one. Here's the material that I used (just paste this into a .mtr file and it should work):

 

 

 

//custom portal_sky with "blend add" added to the material to solve draw order issues with transparent textures.

 

textures/smf/portal_sky

{

qer_editorimage textures/editor/portal_sky

forceOpaque // will still seal levels

noshadows

noimpact

sort portalSky

 

{

blend add

map _currentRender

 

clamp

screen

 

// fix up the projection based on the screen coords

translate global6 * 0.5, global7 * 0.5

scale global6 * 0.5, global7 * 0.5

}

/*

{

vertexProgram portalSky.vfp

fragmentProgram portalSky.vfp

fragmentMap 0 _currentRender

}

*/

}

 

 

 

 

Make sure to dmap after overwriting the material. Note that this makes the portal_sky texture transparent in Dark Radiant for some reason but I haven't seen any other side-effects.

Edited by Moonbo
  • Like 1

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

Hey Goldwell,

 

This might be barking up the wrong tree, but here it goes. I had a situation in my upcoming FM where certain transparent textures had draw-order render bugs with the portal_sky texture that are somewhat similar to your screenshot. I'm not sure if that's what's happening here (and hopefully someone comes along with an easier answer), but if it is, then my solution was to create a new portal_sky material that overwrote the default one. Here's the material that I used (just paste this into a .mtr file and it should work):

 

 

 

//custom portal_sky with "blend add" added to the material to solve draw order issues with transparent textures.

 

textures/smf/portal_sky

{

qer_editorimage textures/editor/portal_sky

forceOpaque // will still seal levels

noshadows

noimpact

sort portalSky

 

{

blend add

map _currentRender

 

clamp

screen

 

// fix up the projection based on the screen coords

translate global6 * 0.5, global7 * 0.5

scale global6 * 0.5, global7 * 0.5

}

/*

{

vertexProgram portalSky.vfp

fragmentProgram portalSky.vfp

fragmentMap 0 _currentRender

}

*/

}

 

 

 

 

Make sure to dmap after overwriting the material. Note that this makes the portal_sky texture transparent in Dark Radiant for some reason but I haven't seen any other side-effects.

 

Just tested in game and sadly it didn't work, thanks for trying to help! :)

Link to comment
Share on other sites

This is probably a question for Springheel: right now with every walk cycle an AI moves forward by a specific amount. Is there a way to change the amount of forward movement with each walk/run animation (outside of speeding up/slowing the animation)?

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

There are spawnargs to alter the speed; other than that you would have to make a new animation, afaik.

Link to comment
Share on other sites

Does anyone know what the alarm levels are for the entity "atdm:alarm_sound"

 

I have everything setup correctly however it only says that you should use either "alarm" in the sprS-propagate spawnarg (which alerts the whole map) or "alarm_mild" which also alerts the whole map for me.

 

I went through the wiki and searching the forum trying to find what other levels there are and even tried myself by using "alarm_mild" or "alarm_low" but i'm not having any success.

Link to comment
Share on other sites

The default sound volumes are 90, 77, and 66 for spgrs_alarm_loud, _alarm, and alarm_mild.

 

You can change the volume with the alert_volume_mod spawnarg on the atdm:alarm_sound. A value of -20 will bring alarm_mild down to 46 volume, for example.

 

NB tweak it after you are fully visportalled as that'll affect the route that sound has to take.

NB2 the "team" spawnarg doesn't currently work on alarms. All AI will hear it, not just one specified team.

  • Like 1
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
       
      · 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
    • 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...