Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

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

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.

My missions:           Stand-alone                                                      Duncan Lynch series                              

                                      Down and Out on Newford Road              the Factory Heist

                                                                                                  A House Call

                                                                                                  The House of deLisle                                                                                                  

                              

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

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.


  • Recent Status Updates

    • JackFarmer

      @joebarnin
      Jeff, I sent you PM a few weeks back but you did not respond. Maybe your inbox is full?
      · 5 replies
    • The Black Arrow

      I was playing Skyrim, got bored fast. Got back to The Dark Mod just for one mission, played "Somewhere above the City" which is not really a great mission but still good, as in above-average.
      My biggest regret is living in this country, where there's a heat wave, I am sweating at 20c and I really wish for temperatures below 5c.
      · 10 replies
    • Skaruts

      Is there something wrong with the forums lately, or is it my browser? I've been having trouble formatting posts, and just now I couldn't format anything at all.
      I'm using Vivaldi.
      Usually I have to: select text, click bold, nothing happens, select again, click bold, then it works. 
      Same for other stuff, like creating spoilers, bullet points, links. Nothing works the first time. 
      · 1 reply
    • STiFU

      Back from a spontaneous 1-week trip to Lanzarote with wife and son. I hope beta testing has been going well...
      · 1 reply
    • datiswous

      Whenever I eat fried chicken these days I think of this scene in The Black Mage..

      · 1 reply
×
×
  • Create New...