Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue
 Share

Recommended Posts

I'm trying to help another mapper with an issue, and since this is something I may use personally in some circumstances I wanted to know if it's possible. Can you place an animated model on a map but have it show a static frame from a specific animation? There exists func_animate which I played with a couple of times, but using it this way would need to things: First a way to stop the animation, possibly by setting its speed to 0... also a way to pick which frame you want, possibly by choosing a custom starting frame. Does that entity or any other currently allow this?

Link to comment
Share on other sites

I vaguely remember a spawnarg in the func_animate entityDef that might be useful. Otherwise an approach is to copy the idle .md5animation and replace its 1 frame (joint origins and angles) with the desired frame from the desired anim. You'll need to add that anim to the model's modelDef (or just overwrite an existing .md5animation).

  • Like 1
Link to comment
Share on other sites

On 12/28/2022 at 11:39 PM, MirceaKitsune said:

I'm trying to help another mapper with an issue, and since this is something I may use personally in some circumstances I wanted to know if it's possible. Can you place an animated model on a map but have it show a static frame from a specific animation? There exists func_animate which I played with a couple of times, but using it this way would need to things: First a way to stop the animation, possibly by setting its speed to 0... also a way to pick which frame you want, possibly by choosing a custom starting frame. Does that entity or any other currently allow this?

You could try to play around with frame commands: https://wiki.thedarkmod.com/index.php?title=Frame_commands

These commands require you to alter the animation files (so you should create a copy and rename it for this project). Unfortunately, the pause command is listed as "not used yet", but maybe you can circumvent that through a trigger, which then pauses the animation via a script command. Maybe this helps you.

Link to comment
Share on other sites

  • 2 weeks later...

If you knock out an ai and he jumps up and instantly dies, is there a usual reason for this happening and how to fix this? I saw this behaviour while testing Deadeye (during beta) and now I see it happening in another mission.

Edited by datiswous
Link to comment
Share on other sites

It was happening in one of my missions. I worked around it by adjusting the position of the ai, the chair he was sitting in, and the table he was near, until it didn’t happen anymore. But, since it was an intermittent problem, I was never sure that I actually eliminated the issue. It just never happened again in my testing. 

  • Like 1
Link to comment
Share on other sites

The issue as far as I understand it, is that when you KO the AI that's sitting/sleeping, if they are even a little bit into the chair/bed, they'll flail about and physics takes over and the rapid movement can cause damage to the AI and they die from it.

 

  • Thanks 1

I always assumed I'd taste like boot leather.

 

Link to comment
Share on other sites

Greetings again, all.

I have a situation with a switched electric light and an AI not relighting it when switched off.

The switch is on the wall about mid-player height.

The light is atdm:sphere_brass_celiing with spawnarg shouldBeOn=1.

The AI has:

canOperateSwitchLights=1, chanceNoticeLight=1, chanceOperateSwitchLights=1

... to seemingly ensure it will go and flip the light back on.

However, when I switch off the light, the AI comments on the dark but walks to a nearby door and opens it, not the light switch.

I have tried moving the switch ALLLLLL the way across the room and the AI still favors the door.

Ideas on what might be the issue?

Much appreciated.

Clint

 

 

 

Link to comment
Share on other sites

When this happened to me, it was because the dumdum was trying to flip the back of the switch and was walking through a bunch of rooms to get to its back side.

Also, are you using atdm:relight_position entities to tell the guard where the light switch is? They struggle to figure it out otherwise.

{ 0 | 🞵 } = funk_tastic

My missions:           Stand-alone                                                      Duncan Lynch series                              

                                      Down and Out on Newford Road              the Factory Heist

                                                                                                  A House Call

                              

Link to comment
Share on other sites

9 hours ago, thebigh said:

...the dumdum was trying to flip the back of the switch...

Thanks for the great suggestion.  This seems to be why the AI was walking through the door.  The relight_position did not help this particular situation.

So I experimented:

1)  by converting the wall the switch is on to func_static... the ai found the switch properly.

2)  by setting the wall to worldspawn and moving the orign of the swtich lever just outside of the wall dimension... the ai found the switch properly.

I am using the prefab flip switch {prefabs}\Switches\small_wall_switch.pfb.  It looks like when the switch and plate is flush against a worldspawn brush wall, the origin of the switch lever is inside the wall and throws off the AI from the relight.  Does this make sense to the techno-experts?  A switch origin cannot be inside a worldspawn brush and be used for relight?

For now, I crafted a switch plate replacement that pulls the lever out of the wall dimension.

I added the relight_position, too, to be thorough.

So far, all of this seems to work now.  The intended AI is much less of a dumdum, now.

Thanks again.

Clint

 

Edited by cvlw
  • Like 1
Link to comment
Share on other sites

On 6/28/2021 at 9:34 AM, stgatilov said:
On 6/28/2021 at 2:51 AM, MirceaKitsune said:

All missions have an intro, defined within fm/xdata/suffixed.xd file as maps/fm/mission_briefing. I would however also like to have an outro / mission_debriefing, same system / graphics / etc just shown after the mission is over just like the default is shown when it begins. The first question would be if there's any builtin system for such

There is no way to do it in main menu GUI. Playing a debriefing video is the only option.

Is this still the case? Seems kind of limiting. I see in multiple missions, outro video's that look like slideshows and could be done in a Timed Flowing Briefing and would probably look better.

Edit: I guess maybe I could use a full screen slide in mid game right before mission end. Seems really complicated though..

Edited by datiswous
Link to comment
Share on other sites

I agree with that assessment... you could probably get a series of slides of timed slides to appear, but it would be more complicated than if the main menu system supported it natively, and adding image flow would be more complicated still.

Link to comment
Share on other sites

Maybe what's possible is make it a campaign technically, but at the start of the mission end it immediately, but before that you can have a mission intro, which looks like an outro. Sounds hackish and there's a (very short) loading screen for the second map I assume.

I wonder if it's possible to skip the end of mission score screen.

Edited by datiswous
  • Like 1
Link to comment
Share on other sites

I've got an atdm:ai_elemental, and I want to augment its death behavior. So I implemented a script and set the "death_script" spawnarg to "testDeathScript". Works fine, my death script gets called. But, this bypasses the base death script functionality, which I want to have happen as well. Is there a way to call the base function that I've overridden? I tried a few ways. Among others, I tried:

void testDeathScript(entity ele)
{
    ele.onDeath();
}


results in ERROR:Error: file maps\rock.script, line 81: Unknown value "onDeath"

void testDeathScript(entity ele)
{
    atdm:ai_elemental elemental = ele;
    ele.onDeath();
}

results in ERROR:Error: file maps\rock.script, line 81: Unknown value "atdm"
 

I worked around it by copying the content of the onDeath script into my script. That functions correctly, but it seems like perhaps not the best programming practice. Is there a way to call the 'base' function in this case?

Link to comment
Share on other sites

Assuming what you're trying to call is tdm_ai_elemental::onDeath() at tdm_ai_monster_elemental.script(141), then probably you should cast to tdm_ai_elemental, not atdm:ai_elemental. The parsing is choking on the ":".

  • Thanks 2
Link to comment
Share on other sites

22 minutes ago, Geep said:

Assuming what you're trying to call is tdm_ai_elemental::onDeath() at tdm_ai_monster_elemental.script(141), then probably you should cast to tdm_ai_elemental, not atdm:ai_elemental. The parsing is choking on the ":".

Excellent, that works great!

 

void testDeathScript(entity ele)
{
    tdm_ai_elemental elemental = ele;
    elemental.onDeath();
}


 

Edited by joebarnin
Link to comment
Share on other sites

  • 2 weeks later...

Hello again.

Hopefully quick question:  I have a glass pane in an inside office-like room.  The glass is "textures/darkmod/glass/clear" texture.

The glass reflects ghost-like images of an outdoor scene.  A screenshot is attached here.

Is there a simple clear glass without this effect?

Thanks

Clint

GlassInsideReflectingOutside.jpg

Link to comment
Share on other sites

37 minutes ago, cvlw said:

Hello again.

Hopefully quick question:  I have a glass pane in an inside office-like room.  The glass is "textures/darkmod/glass/clear" texture.

The glass reflects ghost-like images of an outdoor scene.  A screenshot is attached here.

Is there a simple clear glass without this effect?

Thanks

Clint

GlassInsideReflectingOutside.jpg

This is a consequence of not yet having a proper reflection system: Windows use a static blurry cubemap to simulate some level of reflection. This will probably be improved later someday, for now you'll have to use a window without any reflection at all or with the mirror pass for it. Don't know if there's one by default, if not it should be easy to make a custom material.

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.

 Share


  • Recent Status Updates

    • datiswous

      Fm idea (braindump)
      "Experience the life of a mission builder"
      Esentially there are finnished elements placed somewhere in storage in the game and you have to place them in the correct places, build some walls here and there, add guard routes, give them their correct speech lines, etc. Decorate the places.. all in-game. lots of fun.. 😉
      If you do it right in the end you can play the mission.
      (would be even cooler if a thief-ai could play the mission, making it some kind of tower-defence game)
       
      This first started as an idea for an aquarium builder mission where-in you have to fill an empty aquarium with sand, waterplants, castles water and swimming fish. But above idea is more fun.
       
      · 4 replies
    • JackFarmer

      Dear ChatGPT, What are The Builders in the Dark Mod?
       
      The Builders is a popular game mode in the video game community called "Dark Mod," which is a fan-made tribute to the classic "Thief" series of stealth games. In this game mode, players assume the role of builders who construct structures in a dark and ominous environment while trying to avoid detection by patrolling guards.
      The Builders game mode is unique in that it offers players the opportunity to create and design their own levels using the in-game tools and resources provided. Players can experiment with different building materials, construct intricate traps and puzzles, and create their own unique gameplay experiences.
      While The Builders game mode is not an official part of the Dark Mod, it has become one of the most popular and well-loved aspects of the game, thanks to its emphasis on creativity, strategy, and stealth.
       
      You guys did not know that, did you?
      · 1 reply
    • The Black Arrow

      I know I'm not active much, but it feels a bit too silent in here. Is everyone taffing around, again?
      · 7 replies
    • snatcher

      TDM Modpack v2.8 released!
      · 0 replies
    • kano

      No need to get yourself infected with malwarefor that good old Windows experience of ads and nag screens.
      https://www.neowin.net/news/microsoft-is-now-injecting-full-size-ads-on-chrome-website-to-make-you-stay-on-edge/
      · 3 replies
×
×
  • Create New...