Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

So I have my map open in Dark Radiant and I have added a custom sound file and edited the relevant information into my "TheAccountant.sndshd" file but I can't see it in DR unless I restart the program. Is there a quicker way to do this?

 

I have looked through this thread and on the wiki but can't seem to find anything mentioning that specific function.

 

Thanks!

Link to comment
Share on other sites

So it's been a couple days and I apparently patched myself into a corner. ;-)

 

Little did I know you apparently can't use clipper or the subtract tool on patches (I'd add this to the respective wiki pages, but don't have access), I guess they aren't being converted to polygons in DR? (Yeah, that makes little sense.) However everything I turned up on the subject was from old forum threads, and the manual patch splitting article is from four years ago. (I'm surprised that functionality hasn't be added, it's the complement to the append function.)

 

My planned workaround is to simply eliminate aspects of the map, but before I commit to that loss, thought I should check here in case I'm missing anything else/new, and there's some option to create holes in a patch?

 

(I guess what I'm learning is although DR obviously deals with data, and outputs it in a uniform form for DM to use, it doesn't seem to permit the user to work on the unified data like most other editors, but maintains the initial separate constraints. Which obviously causes those rotational issues I had previously, and means other tools fail to even perform on different sources.)

"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

My planned workaround is to simply eliminate aspects of the map, but before I commit to that loss, thought I should check here in case I'm missing anything else/new, and there's some option to create holes in a patch?

 

No, you can't punch a hole in a patch using DR. There is some information available somewhere on splitting a patch in two, but it has to be done in a text editor. I don't recall where this is, and haven't had a reason to hunt it down myself.

Link to comment
Share on other sites

So I have my map open in Dark Radiant and I have added a custom sound file and edited the relevant information into my "TheAccountant.sndshd" file but I can't see it in DR unless I restart the program. Is there a quicker way to do this?

 

I have looked through this thread and on the wiki but can't seem to find anything mentioning that specific function.

 

Thanks!

 

If you're talking about DR being aware of new sound shaders, you have to restart it. While there are buttons in DR for reloading materials and guis and a couple other things, there's no button for reloading sounds.

Link to comment
Share on other sites

My planned workaround is to simply eliminate aspects of the map, but before I commit to that loss, thought I should check here in case I'm missing anything else/new, and there's some option to create holes in a patch?

Depending what you're trying to create, you might be able to just make your curved-surface-with-a-hole out of multiple patches lined up at the edges. If it's something like cutting a window out of the wall of a cylindrical tower or a square opening in a vaulted ceiling then it's doable, but if you want to cut a star-shaped hole out of a sphere then you might need a custom model :)
Link to comment
Share on other sites

Well, you could use activate instead. But I don't think it makes a difference. What is so non-elegant about sys.trigger? (I guess this is a mistake in your post).

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

Well, isn't it a bit clumsy to target entities in the map to do something, rather than have the native script command to do it? In my opinion it is.

 

I would like to have a script to play a single animation so that idle anims will not break the animation flow. The only way to do it is to use the conversation system. Script command playanim will be interrupted by idle animations.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

I fairly doubt the last statement. Check the ai script files.

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

There's no script call to start a conversation. Clumsy or not, triggering an atdm:target_startconversation is the only way to start one.

 

As for playing an animation from a script, the code does not keep idle anims from interrupting.

 

If you're finding that idle anims are interrupting an anim you've started from a script, please file a bugtracker issue.

 

Two solutions come to mind:

 

1 - Automatically prevent idle anims when a script call plays an anim.

 

2 - Create two new script functions, one to turn off idle anims and one to turn them on. This would be a more general solution, allowing idle anims to be turned off for other reasons. In your case, you'd turn off the idle anims, play the specific anim you want, then turn idle anims back on (which would happen when any anim currently playing completes).

Link to comment
Share on other sites

Okay, a bug report is up:

 

http://bugs.thedarkm...iew.php?id=3597

 

I found also one more issue, with partrolling AI and script-fired animations. More about it in the bug report.

 

I'm not sure if running animations through a script is a supported feature, but it certainly does have its benefits in the creation of custom AI behavior.

Anyways, if it is a simple thing to do it is worthwhile. If it turns out to be a can of worms, it is probably not worth it.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

You could use

PlayAnimationOnceWithSync(float animChannel, string animName, float blendFrames,string fallbackAnimState, float syncToChannel)

or

PlayAnimationOnce(float animChannel, string animName, float blendFrames, string fallbackAnimState)

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

You could use

PlayAnimationOnceWithSync(float animChannel, string animName, float blendFrames,string fallbackAnimState, float syncToChannel)

or

PlayAnimationOnce(float animChannel, string animName, float blendFrames, string fallbackAnimState)

 

Both give "unknown value" errors, they do not seem to be valid script commands.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

I have just created a custom particle effect however I think I have it stored in the wrong place. I checked the wiki and it says to store it in "darkmod/particles/effect0101" however this particle effect will be included in my map so I can't leave it in there and if I move it to say "darkmod/fms/theaccountant/particles/effect0101" it just shows up as black boxes in the game.

 

What is the correct location for custom particles if you want it included with your map?

 

edit: nevermind apparently you have to close the whole TDM game and then reopen it in order for it to show properly.

Edited by Goldwell
Link to comment
Share on other sites

edit: nevermind apparently you have to close the whole TDM game and then reopen it in order for it to show properly.

there are a bunch of reloadImages etc console commands. If you cant get it working, often reloading all decls will catch any odd stuff (reloadDecls).

Link to comment
Share on other sites

Both give "unknown value" errors, they do not seem to be valid script commands.

They are defined for ai_darkmod_base. To use them, you have to refer to your ai as "ai" in the script, like:

ai ruediger=$ai_guard;
ruediger.PlayAnimationOnce(...);

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

How often should I use monsterclips? For example, if I have a room with a model table and chairs in the middle, a fireplace at one of the walls, a cupboard near the door and some wooden supports (brushes), should they all be surrounded?

 

I thought I get it, until I spotted monsterclips inside prefab footlockers.

Link to comment
Share on other sites

Think about it from the perspective of an AI, not the player or designer. When an AI walks into a room he has to "see" everything. Models and entities like func_statics it can't "see", it's like they're not there, so yes you should surround everything with monsterclip.

If the chair is set to be moveable, then monsterclipping won't work because if the player moves the chair, the monster clip will be where the chair was, and the AI won't know that chair is in front of it.

The other reason is that what the AI should interact with should be as simple as possible. If you have complicated geometry made from brushes in a room, the AI will see all those faces and have to "think" about them, so to improve it's performance you should surround that geometry with monsterclip so the AI only "sees" a 4 sided piece of geometry instead.

And the monsterclip in prefabs is to stop moveable items from falling through the bottom of the foot locker AFAIK.

I always assumed I'd taste like boot leather.

 

Link to comment
Share on other sites

All func_statics (static models) the AI can walk to (collide with) should be surrounded with monsterclip. The monsterclip should rise high to the ceiling, so that useless AAS areas are not generated on top of tables etc.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

So for example in this screenshot, the AI is set to patrol to the other side of the barrels, but since he can't see them, he'll continuously walk into them:

 

a81d.jpg

 

So adding a wall of monsterclip, will cause the AI to interact as if they are a wall and not crates, he'll still see the player through the monsterclip and since he now knows there's a wall there, he'll correctly run around the other side where the opening is to get at the player.

Also since the AI will never be able to get up on the crates, I made the wall go all the way to the ceiling as Sotha also suggested:

 

tjv3.jpg

I always assumed I'd taste like boot leather.

 

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

    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
×
×
  • Create New...