Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

3 hours ago, Geep said:

I suppose you could have the player rather than the guard cause the trigger, then somehow check in the script if the guard is being carried or is otherwise in the right place to kill. Possibly too hard to make that robust.

Yup, too hard😄

Edited by grodenglaive
Link to comment
Share on other sites

There's a little something I want to try for which I'll need another obscure trick, might share another mod if I can get it right: How do I attach a func_rotating propeller to an AI, but make it so that it stops rotating once the AI is dead? It must also loop a sound which stops once the AI is disabled. Ideally the rotator can fall off and become a moveable, I don't care if it stays attached as long as it stops spinning when the AI dies or goes unconscious... while attached it should have no collisions.

I'd like to avoid a custom script for this one since I hate having to hijack tdm_custom_scripts.script every time: I know there are parameters for AI attachments and loot items to change state when taking down their wearer... like the mask of the manbeast which falls and can be looted once you defeat the owner, there was also a FM with a flaming skull that gets extinguished when the skeleton is killed. But I have no idea if there's any parameters to make an attachment rotate only while the AI is alive.

Link to comment
Share on other sites

Triggering a rotating prop with a target spawnarg makes it stop/start rotating. So you have a couple of options.

 

If the AI doesn't patrol, you can just target him to the prop directly and he'll trigger it when he's killed. This is a holdover from the old DOOM3 days. However, don't use this if he patrols because he'll also trigger the propeller every time he reaches a path_corner.

You can also use a hidden kill objective to target the propeller. This is likely only useful if you've only got very few propeller guys in your mission because you'll need a separate objective for each AI.

 

I think you can use the "unbindondeath" spawnarg to make the propeller fall off.

 

  • Thanks 1

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

17 hours ago, thebigh said:

Triggering a rotating prop with a target spawnarg makes it stop/start rotating. So you have a couple of options.

 

If the AI doesn't patrol, you can just target him to the prop directly and he'll trigger it when he's killed. This is a holdover from the old DOOM3 days. However, don't use this if he patrols because he'll also trigger the propeller every time he reaches a path_corner.

You can also use a hidden kill objective to target the propeller. This is likely only useful if you've only got very few propeller guys in your mission because you'll need a separate objective for each AI.

 

I think you can use the "unbindondeath" spawnarg to make the propeller fall off.

Thanks. Those methods might not work well unfortunately: Using an objective is overkill as they're meant to be standard characters you dynamically drop to the map and should just work... triggering would have worked but apart from the AI being made to patrol, I don't think it's possible for a def to reference another def as a target since those need to be linked on the map and there's no name for the AI to refer to the attachment by for a trigger.

What do attached lights that turn off when the wearer dies use? Actually I think the Automaton has that so I can probably look at its example for the lamp component. It probably wouldn't work for my rotator though, stopping rotation is different from turning off a light... unless the light is also targeted or uses the SR system so I can reach the "use" stimuli via spawnargs after all?

Another option would be having my fan as a texture, it's thin enough anyway: I define a version of the material that rotates and one that doesn't then switch the skin. But then the question becomes how does the AI change the skin of an attached entity on death? And a flat surface is uglier anyway I want to be up to date with quality standards so I'll have to think about this.

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

is there a possibility to change the players z-coordinate instantly by using some trigger? I'd like to implement something like 'A crack in the slab' in Dishonored 2, where they just changed the z-value to 'teleport' between two houses exactly over another and so changed to a different 'state' of the house.

Thanks

Axel

 

Link to comment
Share on other sites

2 hours ago, AxelB said:

Hi,

is there a possibility to change the players z-coordinate instantly by using some trigger? I'd like to implement something like 'A crack in the slab' in Dishonored 2, where they just changed the z-value to 'teleport' between two houses exactly over another and so changed to a different 'state' of the house.

Thanks

Axel

 

Have you tried the func_teleport entity?

  • Like 1
Link to comment
Share on other sites

Should I be able to load a save file from another player? My mission is in beta test, and one of the testers has run into an issue. I had them store out a save file, but when I try to load it, TDM hangs (the loading screen just sits there with the bar at 0% progress). We're running the same version, 2.11/64 #10264. Is what I'm trying to do possible?

Link to comment
Share on other sites

1 minute ago, Geep said:

Maybe you have to duplicate the entire FM environment (the .pk4 if packaged) to get it to work?

Forgot to mention, I’m running the same .pk4 as well. Something must be different, I just can’t figure out what. I’ve asked about addons, etc. 

Link to comment
Share on other sites

In thinking about this further, maybe a savefile is just a memory image. In which case ANY difference between the two machines (in OS version, CPU, GPU, amount of RAM, etc.) could prevent portability.

If so, this approach to debug is likely a hopeless endeavor.

  • Thanks 1
Link to comment
Share on other sites

55 minutes ago, Geep said:

In thinking about this further, maybe a savefile is just a memory image. In which case ANY difference between the two machines (in OS version, CPU, GPU, amount of RAM, etc.) could prevent portability.

If so, this approach to debug is likely a hopeless endeavor.

I suspect you are correct.

Link to comment
Share on other sites

On 11/4/2023 at 9:34 PM, MirceaKitsune said:

How do I attach a func_rotating propeller to an AI, but make it so that it stops rotating once the AI is dead?

The most appropriate method would be an on_death script. You can reference the fire elemental for an example.

Also, the sole purpose of tdm_custom_scripts.script is to allow mappers to add more .script files to their FM, so there's no reason not to use it.

Link to comment
Share on other sites

  • 2 weeks later...

Something I just ran into, so I figured I'd share what I learned. I had an AI doing a path back and forth from A to B to A, etc. It would work fine for a while, and then suddenly he would stop and just stand there. At that point he would never proceed on the path. I cranked up the logging and saw something in darkmod.log about "handle door task" associated with that AI. I realized the problem. I had a dummy door nearby - it is a "door to nowhere" (solid wall behind it). But instead of using a door model, I had cloned a nearby atdm:mover_door and set it to frobable=0 (and removed the handles). That certainly keeps the player from using the door, but apparently it confuses the AI pathfinding. I replaced it with a model door, and now the AI path works fine.

Bottom line: always use a model for dummy doors. Sounds obvious, I know.

  • Like 2
Link to comment
Share on other sites

6 minutes ago, joebarnin said:

Something I just ran into, so I figured I'd share what I learned. I had an AI doing a path back and forth from A to B to A, etc. It would work fine for a while, and then suddenly he would stop and just stand there. At that point he would never proceed on the path. I cranked up the logging and saw something in darkmod.log about "handle door task" associated with that AI. I realized the problem. I had a dummy door nearby - it is a "door to nowhere" (solid wall behind it). But instead of using a door model, I had cloned a nearby atdm:mover_door and set it to frobable=0 (and removed the handles). That certainly keeps the player from using the door, but apparently it confuses the AI pathfinding. I replaced it with a model door, and now the AI path works fine.

Bottom line: always use a model for dummy doors. Sounds obvious, I know.

By model door I'm guessing you mean a func_static?

That is useful to know.  How exactly did you 'crank up the logging'?  In High Expectations I had one or two places where the AI pathfinding didn't work and for the life of me I couldn't figure out why.  The AI would just stop at a particular spot.  The logging might have helped in that case.

 

Link to comment
Share on other sites

Yes indeed, a func_static.

I maxed out the logging with these settings in darkmod.ini:

[Debug]
LogFile=Darkmod.log
LogError=1
LogBegin=1
LogEnd=1
LogDebug=1
LogWarning=1
LogInfo=1
LogClass_INIT=1
LogClass_MISC=1
LogClass_SYSTEM=1
LogClass_FROBBING=1
LogClass_AI=1
LogClass_SOUND=1
LogClass_FUNCTION=1
LogClass_ENTITY=1
LogClass_INVENTORY=1
LogClass_LIGHT=1
LogClass_WEAPON=1
LogClass_MATH=1
LogClass_MOVEMENT=1
LogClass_STIM_RESPONSE=1
LogClass_OBJECTIVES=1
LogClass_DIFFICULTY=1
LogClass_FRAME=1
LogClass_LOCKPICK=1
LogClass_CONVERSATION=1
LogClass_MAINMENU=1
LogClass_AAS=1
LogClass_STATE=1

Way overkill, it creates a massive log file. But I searched for the name of the AI and found a log entry that mentioned something about "HandleDoorTask performing by <guard name>" and a lightbulb went off.

  • Like 2
Link to comment
Share on other sites

Even though most of "me" lies outside the game, I am an entity. My name is "player".

Fortunately, TDM doesn't need to render most of me. :)

  • Like 1
  • Haha 2

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

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

    • 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
    • Mortem Desino

      Even though I've been absent a long while, I still find myself dreamily wishing for the free time to do TDM mission development. When working on new research projects I'll find myself involuntarily thinking, "hee hee this could be a fun texture or readable or bit of map architecture." Or I find myself absentmindedly responding out loud to odd noises with a drunkguard-like "must've been rats!"
      · 3 replies
×
×
  • Create New...