Jump to content
The Dark Mod Forums
demagogue

Newbie DarkRadiant Questions

Recommended Posts

@grayman

Uhm ... wel, if I knew it existed I would. I have found it now, but it's not in the targets folder. Thanx! : )

The key and value to use doesn't show up in the spawnargs of the target_setkeyval, I had to look it up in the target.def file:

"editor_var keyval"                "Separate key val with semicolon... key;val"

But yes, I tried it and it works ... so no need to make a new script for it.

Edited by STRUNK

Share this post


Link to post
Share on other sites

@Dragofer

When I put m_target_name.setKey(m_key, m_value); there I get an error:

Error: file fms\STRUNK\script\target_keyval.script, line 24: type mismatch for '.'

Line 24 is: m_target_name.setKey(m_key,m_value );

 

Share this post


Link to post
Share on other sites

@Dragofer

You are totally right. Wanting to println all 3 "strings" got me confused, for an entity can't be printed. I changed it now and it works.

Working script:

Spoiler

#ifndef __TARGET_KEYVAL__
#define __TARGET_KEYVAL__

object target_keyval

{
    entity    m_target_name;
    string    m_key;
    string    m_value;
    
    void    init();
    void    set_key_value();
};

void target_keyval::init()
{
    m_target_name            = getEntityKey("target0");
    m_key                    = getKey("set_spawnarg");
    m_value                    = getKey("set_value");

}
void target_keyval::set_key_value()
{
    m_target_name.setKey(m_key , m_value );

}

#endif __TARGET_KEYVAL__

 

Edited by STRUNK
  • Like 1

Share this post


Link to post
Share on other sites

I want a guard to sit down, then write x seconds into a book, then sleep for x seconds, the write x seconds, then sleep for x seconds, etc.

Thus, I have created the following setup:

sleep.thumb.jpg.232ea94dc95ef672c0ee679f298434a2.jpg

In the game, everything works ok, but the guard does not wake up anymore, he sleeps permanently. Why is that? Does the wait option not work with path_sleep?

I have tried C with pathcycleanim and added the sleep animation, but it does not work correctly, as only the "go to sleep" anim is repeated for 60 seconds,

 

 

 

 

Edited by JackFarmer

Share this post


Link to post
Share on other sites
4 hours ago, STRUNK said:

@grayman

Uhm ... wel, if I knew it existed I would. I have found it now, but it's not in the targets folder. Thanx! : )

The key and value to use doesn't show up in the spawnargs of the target_setkeyval, I had to look it up in the target.def file:

"editor_var keyval"                "Separate key val with semicolon... key;val"

But yes, I tried it and it works ... so no need to make a new script for it.

Fair enough. For whatever unknown reason, whoever created it decided not to have it show up in the Targets folder.

Here's a picture of one I used in Somewhere Above the City, showing spawnargs.

setkeyval.jpg.04837aa2521211a6388512f817d6bd8a.jpg

 

This one, when triggered every frame or so, resets the "target" spawnarg in VaultCamera4 so that it points to the entity target_null_7, which is moving around. This lets the camera resync its view in real time.

  • Thanks 1

Share this post


Link to post
Share on other sites
1 hour ago, JackFarmer said:

In the game, everything works ok, but the guard does not wake up anymore, he sleeps permanently. Why is that? Does the wait option not work with path_sleep?

 

Nope. Add a path_wait after the path_sleep.

  • Thanks 1

Share this post


Link to post
Share on other sites
2 hours ago, grayman said:

Nope. Add a path_wait after the path_sleep.

That's the solution. Thanks!

Share this post


Link to post
Share on other sites

Any ideas for how to make skyboxes mesh better with fog? I'd like things in my mapspace to be slightly obscured, but as soon as I add any noticeable foglight the skybox turns into featureless soup.

Ideally I'd like to let the skybox be unaffected by mapspace fog and instead place a second small foglight in the skybox so I can control the opacity of both areas separately.

(I did already move my skybox out of the foglight's range.)

Share this post


Link to post
Share on other sites

Which foglight do you use? I typically use delta1_fog for both skybox and playable area. Also remember to declare a value in shaderParm3 property (Doom units) to define where the fog ends. Typically I use large values, like 3200.

Edited by peter_spy
  • Like 1

Share this post


Link to post
Share on other sites

I've been using basicfog in recent times, I'll try out Delta fog later again. And shaderParm3 is currently set to 12000, but it's a bit of an unhappy compromise between skybox visiblity and mapspace fog opacity. I'd have liked somewhere between 5000-8000 for my map.

Edited by Dragofer

Share this post


Link to post
Share on other sites

Is the max entity limit still 8000something? Wasn’t sure if I should ask this here or the thread about the new version of DR.

Share this post


Link to post
Share on other sites

Just who I was waiting for to log in. Knew you’d have the answer, thanks.

Will that number go up with 2.08, anybody know?

  • Like 1

Share this post


Link to post
Share on other sites

There are a few ways to cut the entity count. You can combine func_stats into a single entity, although you'll want them in a single leaf, otherwise the other leaf will render. (Sometimes you want to do that on purpose.) The other trick was you can use the SEED system to re-render the same object as many times as you like, good for things like grass and rocks and wildflowers, although if you're clever you could use it more generally. But the point is all of those objects will count as just one entity. I'd be nice to bump up the count though if possible. It's just on the edges where a mapper can feel the limit if they're working on something big enough.

  • Thanks 1

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Share this post


Link to post
Share on other sites
On 1/20/2020 at 7:53 PM, Jedi_Wannabe said:

Is the max entity limit still 8000something? Wasn’t sure if I should ask this here or the thread about the new version of DR.

Using SEED with already existing 7,000+ (I think the problems started with ca. 7,200, not sure anymore) entities prevented HHI from compiling (although I only combined 10 - 12 entities in one case).  Later on in the process I was able to reduce the entity count to a lower value by merging func_statics as per demagogue's suggestion.

However, it seems to be a good idea using the SEED function long before the entity limit comes in sight.

 

  • Thanks 1

Share this post


Link to post
Share on other sites

Whoops, should’ve dove into SEED months ago, I’m already at 7,000 something. But as far decorative stuff I’m pretty much done building, just placing decals everywhere now. I feel safe, it is finally time to combine stuff; been putting it off since no major issues arose.

Thanks for relating your firsthand experience fellas.

Share this post


Link to post
Share on other sites

How do I tell these fellows to rotate?

I cannot find anything in the WIKI entity list, and I have tried start_off/start_on/off/on...but nothing works. :(

mover_gear.thumb.jpg.940e8365562e1006585d606a19bc1b4d.jpg

Share this post


Link to post
Share on other sites

I've never used that particular entity, but you can get any model to rotate by changing its classname to func_rotating (func_rotate?) and setting a speed. IIRC you don't even need start_on

Edited by Dragofer

Share this post


Link to post
Share on other sites
35 minutes ago, Dragofer said:

I've never used that particular entity, but you can get any model to rotate by changing its classname to func_rotating (func_rotate?) and setting a speed. IIRC you don't even need start_on

Yes, you are right; I will try it this way. Thanks!

Share this post


Link to post
Share on other sites

image.thumb.png.5e0048bd9b796c83dcd60a6027e18be6.pngimage.thumb.png.5e0048bd9b796c83dcd60a6027e18be6.png

How can I check the location/positon of the areas mentioned in the console report above? Is there a special viewer in DR for that?

Share this post


Link to post
Share on other sites

The areas mentioned in the warnings aren't created until dmap runs, so DR knows nothing about them.

Look for these situations:

1. You're missing one or more location separators between the basement and the ground floor. Check visportals where the basement is on one side and the ground floor is on the other. Add separators where needed.

2. You have all the separators in place, but one or more of them aren't touching their visportals. Adjust them so they are. dmap posts warnings about separators not touching portals.

3. The separators are fine, but you're missing one or more visportals at the separators. Again, dmap posts warnings.

Share this post


Link to post
Share on other sites

The time I had this happen was when there was an accidental unvisportaled hole between leafs, i.e., internal leak, so the two leafs were counted as one unbeknownst to me.  (Bad brushwork can do this and the hole won't even be visible.) I believe when that happens though it kills the visportal between the two, so it's easy to notice that way. If it's that & you can't find it, there's a whole process to identify an internal leak with the leak check that you can look up. 


What do you see when you turn out the light? I can't tell you but I know that it's mine.

Share this post


Link to post
Share on other sites

@grayman

@demagogue

The two of you were right: corrupted portals (grayman) placed in holes (demagogue).

dema, your foreseeing abilities are gradually scaring me. :)

Edited by JackFarmer

Share this post


Link to post
Share on other sites

It's not really foresight. It's hours of digging into these problems to figure them out when I had the same ones. XD 


What do you see when you turn out the light? I can't tell you but I know that it's mine.

Share this post


Link to post
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.


×
×
  • Create New...