Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

56 minutes ago, MirceaKitsune said:

Hmmm, I see what you mean. I could do that but it feels kinda wrong: Objectives are meant to appear to the player, using a hidden objective just for a trigger feels like an ugly hack to compensate for a missing implementation. If nothing else works I can do that I guess, I will consider if I can make that work in some form.

Can it be confirmed however that there's currently no other way? More specifically, that notes cannot trigger targets upon being read, and objectives are the only thing that can scan whether a readable was accessed and target something based on that? If yes I at least know my options for sure. Also I'll probably make a report regarding this limitation, the next TDM release could use a proper trigger for readables from what I'm seeing.

Looking at an immobile entity in DR shows that its frob_action_script is readable_immobile_frob, which notepad++ says can be found in tdm_readables.script. One of the member functions there is handleCloseEvent(). This function calls another function that triggers the entitiy specified in the spawnarg "trigger_on_close", every time it's closed.

For TDM as a whole, it’s a matter of someone setting aside the time to make sure that all spawnargs that are implemented in the scripts and source code are also documented in the entityDef so they show up in DR. Or at least tracks them somewhere, like a general bugtracker ticket of “undocumented spawnargs”.

  • Like 1
Link to comment
Share on other sites

1 hour ago, MirceaKitsune said:

Objectives are meant to appear to the player, using a hidden objective just for a trigger feels like an ugly hack to compensate for a missing implementation.

No shame in using hidden objectives to achieve scripted effects. The objective editor is like a visual scripting editor that’s often considerably easier to use than scripting by hand or setting up cascades of entities carrying script functions.

Link to comment
Share on other sites

2 hours ago, Dragofer said:

Looking at an immobile entity in DR shows that its frob_action_script is readable_immobile_frob, which notepad++ says can be found in tdm_readables.script. One of the member functions there is handleCloseEvent(). This function calls another function that triggers the entitiy specified in the spawnarg "trigger_on_close", every time it's closed.

For TDM as a whole, it’s a matter of someone setting aside the time to make sure that all spawnargs that are implemented in the scripts and source code are also documented in the entityDef so they show up in DR. Or at least tracks them somewhere, like a general bugtracker ticket of “undocumented spawnargs”.

Perfect, thank you! trigger_on_close does exactly what I wanted it to, problem solved without any hidden objectives :) The reason I was having issues is that every objective must have a condition set (even during testing) as if you have a hidden objective after an unfinished definition that it won't show up when you try to unhide it.

Regarding the AI killing objective and "type 0": I was testing my map when suddenly I noticed the objective "don't kill any person" failed. I was literally like "what the hell just happened". Then I noticed I threw a crate on a rat and killed it! So yeah, that flag is totally broken, even killing a mouse will trigger it :D I'm probably going to rework those objectives to just use AI teams in another form.

Link to comment
Share on other sites

Ugh, those objectives really don't want to give me any peace. Now that the objective is showing up properly when its triggering note is read, I have issues making the objective complete accordingly.

The objective is meant to succeed when an AI walks into a certain area. I defined my area as a box textured with the clip texture then converted to an info_tdm_objective_location entity... I know this is the right approach as I used this entity and texture to trigger objectives when the player reaches a location in other FM's. In this case I gave my objective the condition "item is in location" with "name of single entity" for both the AI and the location. Though common sense dictates this should work, the objective doesn't get triggered when the character sits in that zone and is completely inside the brush.

Screenshot_20210627_182818.thumb.png.000707b391fcef0878a4c18dcd6dc506.png

Link to comment
Share on other sites

@MirceaKitsuneJust a thought, did you add "objective_ent" "1" property to your NPC? I followed this article https://wiki.thedarkmod.com/index.php?title=Objectives_Editor, the "An Objective to place an object in a Certain Location" part specifically, and got it to work. A very simple setup, just two rooms, one of which was covered by the objective_location clip brush, and then just pestered the AI from the starting room to the other, and it seemed to work no problem.

Link to comment
Share on other sites

3 hours ago, MirceaKitsune said:

Ugh, those objectives really don't want to give me any peace. Now that the objective is showing up properly when its triggering note is read, I have issues making the objective complete accordingly.

The objective is meant to succeed when an AI walks into a certain area. I defined my area as a box textured with the clip texture then converted to an info_tdm_objective_location entity... I know this is the right approach as I used this entity and texture to trigger objectives when the player reaches a location in other FM's. In this case I gave my objective the condition "item is in location" with "name of single entity" for both the AI and the location. Though common sense dictates this should work, the objective doesn't get triggered when the character sits in that zone and is completely inside the brush.

Screenshot_20210627_182818.thumb.png.000707b391fcef0878a4c18dcd6dc506.png

For reasons unknown this seemingly does not work consistently anymore when not using it as player exit to end the mission.

Try "two items are in a radius" instead, that seems to work reliable here (joebarnin and I myself used it on plenty occassions in our previous two missions).

Link to comment
Share on other sites

1 hour ago, roygato said:

@MirceaKitsuneJust a thought, did you add "objective_ent" "1" property to your NPC? I followed this article https://wiki.thedarkmod.com/index.php?title=Objectives_Editor, the "An Objective to place an object in a Certain Location" part specifically, and got it to work. A very simple setup, just two rooms, one of which was covered by the objective_location clip brush, and then just pestered the AI from the starting room to the other, and it seemed to work no problem.

  Tried setting "objective_ent 1" on both the info_location and AI. This seems to have worked! Wasn't aware I have to use that property, it makes sense now.

My prison break sequence is finally done then, since that's what I've been working on here. Prisoner AI springs from the cell after the player unlocks and opens the door, objective is complete and prisoner gets teleported away once he reaches safety. I'd say I have just a few tiny annoyances left with the escape if there's any way to solve them, namely:

  • How do I ensure the AI doesn't pause to play idle animations at path_corner's of the escape circuit? Some of them are set to "run 1" and they don't seem to trigger them, but before those the prisoner constantly stops to pose despite being in a hurry.
  • Is there a flag to make the AI not bother with closing doors behind them? My prisoner is being excessively polite, wasting yet more seconds to close the prison door behind him after escaping :D
  • The prisoner becomes scared and stops running for the exit when it sees an enemy guard. Any way to prevent this? So far I fixed it by setting the guard team to be hostile toward the prisoner team, but the prisoner's team to be neutral toward the guard team... I take it this only prevents the prisoner from freezing in fear until they get hit however, the right way seems to be disabling stopping on fear if this is possible.
Link to comment
Share on other sites

13 minutes ago, MirceaKitsune said:

Is there a flag to make the AI not bother with closing doors behind them? My prisoner is being excessively polite, wasting yet more seconds to close the prison door behind him after escaping :D

Does this article help? https://wiki.thedarkmod.com/index.php?title=Doors#Door_Handling_Positions The "ai_no_close" attribute sounds about right.

Edited by roygato
Link to comment
Share on other sites

3 hours ago, Geep said:

Based on the discussion here of 2 methods for a readable to trigger on close, I've appended a new section to the "Readables" wiki entry.

Thank you very much, I appreciate that. Definitely something that should be more readily known to mappers.

Okay... time I ask another question, which is kinda the last big and more experimental thing I'm trying to do with my FM. I'm hoping it won't require a custom script though if it will I can deal with that.

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.

Now this is where it gets more complicated: I kinda want to have multiple endings. So the player sees a different debriefing text based on certain objectives being completed or failed. What are my hopes in achieving this?

Edited by MirceaKitsune
Link to comment
Share on other sites

@MirceaKitsune
TDM natively supports debriefing videos, but I've never noticed it mentioning text. It should in any case be possible to modify the "next" button on the success screen to show a briefing slide instead of returning to the main menu, but I doubt you can do that without modifying "forbidden" .gui files. It'd be something to suggest to @stgatilov
for his menu GUIs rework.

GUI scripting also allows some very basic conditional checks, i.e. what mission is active. Maybe you can check objective states or properties on ingame entities, but I can only go as far as saying that you could use notepad++ to search through all the .gui files to find existing examples of checks. Maybe you can find how the gui decides to mark objective checkboxes?

Link to comment
Share on other sites

6 hours ago, 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.

Of course, it is possible to add an optional DEBRIEFING state after the video, and make its .gui file overridable.
Somehow, it was not added when debriefing videos were added, perhaps no one wanted it.

Quote

Now this is where it gets more complicated: I kinda want to have multiple endings. So the player sees a different debriefing text based on certain objectives being completed or failed. What are my hopes in achieving this?

The new main menu system does not support dynamic debriefing videos out of the box.

Perhaps you could check gui variables which are responsible for objectives, and choose different path in mainmeni_debriefing.gui, if it was available to begin with. But I'm not sure the necessary information is available at proper time and in proper form.


Another approach is to look at "Somewhere Above the City" by @grayman.
It shows some cutscene after the game is over, which is different depending on whether you killed someone or not. However, it is done in the game itself, not in the main menu.

I think it is also possible to display arbitrary GUI in-game. The mission "Hare in the Snare" by @Frost_Salamander and @Kerry000 uses this approach to workaround problems of main menu debriefing.
 

 

Link to comment
Share on other sites

Thanks for clarifying. Sounds like I may want to make a suggestion in this regard. Not looking for a video in my case but a debriefing text like the one for the intro, I don't have the resources and knowledge to make good videos for my FM unless maybe at a later stage I can ask someone is going to help with that?

But yeah my idea was to have 4 endings, and the one you get would depend on a 2 x 2 mixture based on whether you served or betrayed a certain side. It's a long way to go till I'm even close to finishing my FM, definitely after 2.10 is released, so I should have time to see about this and what options I have.

Actually I think I remember once playing a FM that did in fact have a text debriefing. I don't remember its name since IIRC I wasn't a big fan of it, but I think it's one of the only FM's where the action took place in the daytime and broad daylight.

Link to comment
Share on other sites

If the contents of the ending text file are created during the mission, it might be possible to achieve, what you want. You could take a look at the expanding journal/diary that @Obsttorte made. Maybe this can be transferred to gradually create the contents of your ending file. This way the gui always accesses the same file, but the content is modified according to your needs, which would at least circumvent the requirement of the GUI accessing different files.

Link to comment
Share on other sites

Back to the hopefully simple questions: Is three a flag for ragdolls to determine whether they should alert AI who find them or not? I have cases for both scenarios: Sometimes living AI are aware of a dead person so they mustn't panic when they encounter the body, but at other times I teleport a ragdoll and want the AI to panic when they come across the dead person.

Link to comment
Share on other sites

Link to comment
Share on other sites

6 hours ago, Dragofer said:

@MirceaKitsune
Either wipe the AI_SEE spawnarg on the ragdoll or deactivate the visual stim it emits. Both should be reversible ingame.

The default behavior seems to be the AI ignoring the ragdoll which is good. I only seem to need to make a change where it needs to be noticed.

I tried setting AI_SEE to both 0 and 1 on the ragdoll, but neither causes it to get noticed when a guard walks over it and bumps it.

Link to comment
Share on other sites

@MirceaKitsune
I just remembered that ai_see is only for lights. AI_USE is a string spawnarg that tells AI what kind of item something is, i.e. a door or a suspicious weapon. If the spawnarg is - it's invisible to them. You can find all the AI_USE possibilities in one of the ai scripts or maybe the wiki.

Link to comment
Share on other sites

@stgatilov

RE the discussion above about a text-form of debriefing...

I've been looking for some way to put up a full-screen graphic with text (overlaid or baked in) in mid-game, so if the user opts to skip a mid-game cutscene, there is something to provide story-continuity in its stead.  This could either time out, or be dispatched with a gui button.

In DR, I examined the "Hare in the Snare" FM you mentioned, but that just provides custom art to the main menu, as well as video brief & debrief; not helpful for what I need.

I did try some experiments with a script-invoked readable as a substitute. Not viable.

The only way I see for now is to switch out the cutscene with a much shorter cutscene. Not real desirable. Haven't decide whether to do that, or just live with things as they are.

So consider this a future feature request. It could be left simple as just described, or generalized to include all 3 modes currently available to text-based briefings. It could be a separate feature request from the text debriefing at mission end, or folded in.

Link to comment
Share on other sites

[quote]

I remember someone expressing interest in how I create what I called "virtual cubes" out of vis portals, to have open outdoor areas be more performance efficient. Figured I'd share this screenshot which exemplifies a part of it.

I tested this setup and can confirm it to work well: As long as the edges of portals touch accordingly you can connect them together. I haven't testing T junctures (the edge of a portal laying across the face of another portal) since that seemed inefficient, currently I divide across intersections to create two portals in this scenario... if the engine tolerates T shapes I might unify some of them to make the calculation even more simple for the computer.

W1hEC1H.png

[/quote]

[Continued from the "So what are you working on thread"]
How does it work when you have speakers crossing such visportal cubes? My fps hits absolute rock bottom when TDM calculates sound propagation across them.

Also, if you don't mind I'd move this visportal discussion to the newbie questions thread.

Link to comment
Share on other sites

18 minutes ago, Dragofer said:

@MirceaKitsune
How does it work when you have speakers crossing such visportal cubes? My fps hits absolute rock bottom when TDM calculates sound propagation across them.

Also, if you don't mind I'd move this visportal discussion to the newbie questions thread.

I haven't added many speakers yet, hopefully this won't be a major issue... I know for visuals it does improve performance. And yes, I'll bring it up there if I go further into the subject later.

Link to comment
Share on other sites

4 hours ago, Dragofer said:

@MirceaKitsune
I just remembered that ai_see is only for lights. AI_USE is a string spawnarg that tells AI what kind of item something is, i.e. a door or a suspicious weapon. If the spawnarg is - it's invisible to them. You can find all the AI_USE possibilities in one of the ai scripts or maybe the wiki.

Ragdolls by default have AIUSE_PERSON... same as AI, seems like the obvious and correct choice. Difference is that if you kill an AI that spawned alive, the body will alert allies... initial ragdolls however don't seem to, they must be missing some other flag or parameter. The wiki page doesn't suggest a better alternative... I imagine I could set "AIUse AIUSE_SUSPICIOUS" but its description indicates it isn't meant for this sort of thing.

@GeepThere is the option of just doing a cinematic, haven't played with those yet but hopefully it's easy enough. My FM has already kept me busy 24/7 for over two weeks now, not sure if it's something I want to put yet more time in. When the day comes to post a beta of my FM (maybe this autumn?) perhaps I can ask someone to help with creating intro and outro videos... even so the issue remains how to customize which debriefing video is played based on what the player did in-game. Might open an issue on the tracker for this.

Link to comment
Share on other sites

Need to add another important question to the list: I'm working on improving performance on my map. One of the ways I'm thinking of doing this is by having large lamps turn off after a certain distance. Should be straightforward but like many things it seems to be easier said than done. And yes I already read the performance page on the wiki.

To start off: I set the spawnargs "hide_distance 512" and "dist_check_period 0.5" on one of my streetlights... in this test an atdm:streetlamp_round_lit, I plan on using it for all gas / electric light types next, torches and candles are low radius and shouldn't need it. So far nothing will disappear even when I'm far beyond this range. Am I missing something?

Problem is that even if that was working, I don't want the mesh of the street light to disappear too, only its light source. Do any of the builtin light entities allow fading their light based on distance without also fading the model?

And speaking of fading, how do I ensure the light actually fades with distance? To avoid the light snapping in and out of existence when you reach a certain distance. This one is far more optional.

Link to comment
Share on other sites

20 hours ago, MirceaKitsune said:

I haven't added many speakers yet, hopefully this won't be a major issue... I know for visuals it does improve performance. And yes, I'll bring it up there if I go further into the subject later.

I mean it became literally less than 1 fps whenever I had a large speaker (i.e. wind) crossing such visportal boxes, so it's an engine bug. I think it's still working out for you because you might be using only smaller speakers, but it might be there's a different cause. Maybe @stgatilov
has some input on what might be going wrong here?

Link to comment
Share on other sites

19 hours ago, MirceaKitsune said:

One of the ways I'm thinking of doing this is by having large lamps turn off after a certain distance.

The LOD system doesn't seem to support toggling lights, at least that's what came of an earlier discussion on Discord. Even if it did, the best you could probably do with lights is setting them to noshadows after a certain distance, but you can just as well set that on the models being lit up by the light. Switching the light itself off would probably require very long distances, since something like a streetlamp emits a lot of light that'll make the LOD very obvious. 

Really, the best thing you can do for performance is preventing such long sight lines in the first place by designing your architecture such that it naturally obstructs them. Not only does this perform far better, it also feels realistic in the sense of a medieval city where everyone builds wherever they can get a few bricks in, and it should make for more interesting gameplay when the player can navigate through and around buildings (like Life of the Party) rather than walking on level ground most of the time.

Melan has made an interesting guide on how to quickly layout and build convoluted city streets in his behind the scenes thread for Talbot 3: Fiasco at Fauchard Street, maybe you'll find it helpful?

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