Jump to content
The Dark Mod Forums

Recommended Posts

Posted

This seems like a sensible thing to raise on the bug tracker.

  • Thanks 1

My missions:           Stand-alone                                                      Duncan Lynch series                              

                                      Down and Out on Newford Road              the Factory Heist

                                The Wizard's Treasure                             A House Call

                                                                                                  The House of deLisle                                                                                                  

                              

Posted

Building on what @HMart said, here's a technique that extends the existing 'text' entity. In the "def" folder of your mission, create a <whatever>.def text file. E.g., mytext.def. It should contain this:

entityDef mytext {
    "inherit" "text"
    "editor_setKeyValue force" "0"
    "editor_setKeyValue playerOriented" "0"
    "editor_setKeyValue text" "Default text"
}
 

(you can name it something else besides "mytext"). Since it inherits from the default text entity, it will behave correctly.

In DM, create a "mytext" entity - it will have those three properties initialized to the values specified in the .def file.

  • Like 2
Posted
On 10/3/2023 at 9:15 PM, thebigh said:

This seems like a sensible thing to raise on the bug tracker.

I will do this.  Just gotta dig up my tracker login info!

I have this feeling that there was another bug or maybe forum conversation about missing entity spawnargs in general.  I will try to make sure I am not creating a dupe entry before doing so.

Appreciated.

Clint

Posted

Is there any way to change the light radius on the 2 candle wall sconce (atdm:sconce_2candles_rigid)?

I've tried all these spawn args. Nothing has an effect.

Screenshot2023-10-13090441.jpg.4b76ba64f8fbbc0658bbbca1910a42f7.jpg

flame1 and flame2 are the pos_attach names in the inherited properties. I thought that would have done it for sure, but no.

 

Posted (edited)

If you look inside the definition of atdm:sconce_2candles_rigid you can see that no name_attach is specified. Looking at this guide, it should be specified as such.

Maybe you can manually set the name_attach1 for example to theflame1 and then do set light_radius on theflame1 . Just a guess.

Another idea is to copy the dev file and add a name_attach to it.

From testing this does seem to work, although I'm not sure if this is what did it.

Edited by datiswous
  • Thanks 2
Posted

A really grubby hack for that is to make a live AI with the def_head you want and then use a script to kill it on map start.

  • Thanks 1

My missions:           Stand-alone                                                      Duncan Lynch series                              

                                      Down and Out on Newford Road              the Factory Heist

                                The Wizard's Treasure                             A House Call

                                                                                                  The House of deLisle                                                                                                  

                              

Posted

I have a scripting question I may use for a mod: What is the function to check if an AI is seeing the player, and the extent to which the player is visible in their awareness based on distance from the AI as well as lightgem and any other factors?

Till recently I thought this isn't possible, until I played through Iris which found a way: In the FM most AI are friendly unless they see you steal things or pick doors or enter restricted areas, they only become hostile if that AI is looking at the player while being close enough to make out what they're doing. Technically I could dig through its scripts but there's probably a lot bundled together, so if anyone knows I could use a simplified description of that part.

Posted

I think you're looking for the visScan() function. I've never used it myself, but from the documentation it's supposed to check whether the player is in an AI's field of view, taking into account obstructions and light level. From there you'd just need to trigger some checks for whether the player is doing something forbidden like picking a lock or being in an area he's not supposed to be.

  • Thanks 1

My missions:           Stand-alone                                                      Duncan Lynch series                              

                                      Down and Out on Newford Road              the Factory Heist

                                The Wizard's Treasure                             A House Call

                                                                                                  The House of deLisle                                                                                                  

                              

Posted
14 minutes ago, thebigh said:

I think you're looking for the visScan() function. I've never used it myself, but from the documentation it's supposed to check whether the player is in an AI's field of view, taking into account obstructions and light level. From there you'd just need to trigger some checks for whether the player is doing something forbidden like picking a lock or being in an area he's not supposed to be.

Thanks. Seems it's either visScan() or findEnemy() I can't quite tell what the difference between them is supposed to be. Will give it a try... doing a little experiment that might have fun results!

Does anyone have an inventory icon for the Citywatch helmet, or know a FM I can get one from? Doesn't seem like there's one in "hud/inventory_icons" and I'd need it for my little idea.

Posted

I'm guessing findEnemy() would require that the AI already thinks of you as hostile.

As for inventory icons, when I needed one that didn't already exist, I put one in my map and screenshotted it in TDM, then used GIMP to cut it out. Have a look at how I did it in deLisle for the white mushrooms if you want to see a very grotty and amateurish example.

My missions:           Stand-alone                                                      Duncan Lynch series                              

                                      Down and Out on Newford Road              the Factory Heist

                                The Wizard's Treasure                             A House Call

                                                                                                  The House of deLisle                                                                                                  

                              

Posted (edited)

For taking a screenshot of an item to use as an HUD icon, sometimes it's easier to do that in DR (e.g., in the head model view), where you have better shot control than in TDM, even if the lighting is a bit unrealistic. Fakey lighting for an icon is often not a problem.

Edited by Geep
Posted (edited)

Doing it in DarkRadiant sounds easiest: What's the best texture to put on a bush to screenshot the item behind, is there a fully white or black one by default? Main issue is cutting out the outline and getting the same consistent style across items, but I do lots of editing in Gimp so this shouldn't be a problem.

As for the AI vis check it turns out to be a bit more complicated: visScan() only notices the player if they're an enemy to the AI, while the AI is friendly it stops working. findFriendlyAI() does work instead, but the name makes it sound ambiguous to use it to check for the player although it seems to work, also the documentation says it's costly and not to call it each frame which I'd have to do in my case, lastly it only detects the nearest entity so if another ally is standing closer to the AI than the player this won't report them. Am I out of luck with this one and need to not implement the check? I'm not seeing any other way to trace the AI's FOV cone.

Edited by MirceaKitsune
Posted

To get a pure black background, one way is to use the view pane in the "Choose Model" picker. In the controls under the view pane, select "Lighting Mode" instead of "Texture Mode". You'll want to turn off grid lines there too, and play around with the filter options.

I see there are helmets (without heads in them) under models/darkmod/wearables/headgear/

Posted
2 hours ago, grodenglaive said:

textures/water_source/watersplode_m1 is pretty much full white as far as I can tell.

It's the editor image that is white (the one you only see inside DR).

Posted (edited)

Thanks everyone. If all goes well I might have a nice little mod ready by tonight I hope you'll enjoy :)

https://bugs.thedarkmod.com/view.php?id=6326

This bug is currently the last thing limiting me: Please let me know if anyone ever ran into that and knows a workaround or what I'm doing wrong, till whatever causes that can hopefully be fixed. I'm trying to change the player's head and use a custom one for seeing yourself in a mirror, it works but randomly introduces a crashes due to a negative model index.

Edited by MirceaKitsune
Posted

Is there some reason that the custom head can't be just given to the player at the outset (in some def file), and not swapped? Might be more stable, I'm guessing.

Posted (edited)
7 hours ago, Geep said:

Is there some reason that the custom head can't be just given to the player at the outset (in some def file), and not swapped? Might be more stable, I'm guessing.

Yes, needs to be switched back and forth in realtime. I just posted my mod so you can check it out here for more info:

Edited by MirceaKitsune
Posted

I had a curiosity: Is it possible to define an item that is picked up and used by nearby AI occasionally, without necessarily having to link a path node to it or target it from the AI? For example a wine bottle on a table: The AI picks it up drinks from it and puts it down, while patrolling next to it then resuming their patrol after using it (playing an animation).

Looking at the AI prefabs, an AI need to target things such as food items with the "pickup_bottle_pickup" or "eating_apple" spawnargs. Is there a way that's proximity based and doesn't require that?

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

    • jivo

      I just uploaded a new version of the Visible Player Hands mod. It's been updated for TDM 2.13 and has new animations. Check out the post if you're interested!
      · 0 replies
    • datiswous

      I moved from Manjaro Linux (rolling release) to Linux Mint (LTS). One of the reasons was that I found the updates a bit too often and long. But now on Mint I get updates every day, although they're usually small updates.
      · 3 replies
    • JackFarmer

      "Hidden Hands: Vitalic Fever" - new update available including subtitles & compressed briefing video (thanks to @datiswous) and several fixes.
      · 0 replies
    • Wolfmond

      🇬🇧

      2025-04-20
      I'd like to track my level design progress a bit more often now, so I'm using the feed in my profile here.
      I've been working intensively on Springheel's YouTube course over the past few days. I'm currently up to lesson 8. There is so much information that needs to be processed and practiced. 
      I have started to create my own house. As I don't have the imagination to create a good floor plan, I grabbed a floor plan generator from Watabou and experimented with it. I chose a floor plan that I will modify slightly, but at least I now have an initial idea. 
      I used two guards as a measuring tape: The rooms are two guards high. It turned out that I can simply double the number of boxes in DarkRadiant in grid size 8 that are drawn in the floor plan. 
      I practiced the simplest things on the floor plan first. Drawing walls, cutting walls, inserting doors, cutting out frames, creating VisPortals, furnishing rooms.
      I have had my first success in creating a book. Creating a book was easier than I thought. I have a few ideas with books. The level I'm creating will be more or less a chill level, just for me, where I'll try out a few things. I don't have an idea for my own mission yet. I want to start small first.
      For the cellar, I wanted to have a second entrance, which should be on the outside. I'm fascinated by these basement doors from the USA, I think they're called Bilco basement doors. They are very unusual in Germany, but this type of access is sometimes used for deliveries to restaurants etc., where barrels can be rolled or lifted into the cellar. 
      I used two Hatch Doors, but they got completely disoriented after turning. I have since got them reasonably tamed. It's not perfect, but it's acceptable. 
      In the cellar today I experimented with a trap door that leads to a shaft system. The rooms aren't practically finished yet, but I want to continue working on the floor plan for now. I'll be starting on the upper floor very soon.

      __________________________________________________________________________________
      🇩🇪

      2025-04-20

      Ich möchte nun mal öfters ein bisschen meinen Werdegang beim Leveldesign tracken, dazu nutze ich hier den Feed in meinem Profil.
      Ich habe mich in den vergangenen Tagen intensiv mit dem Youtube-Kurs von Springheel beschäftigt. Aktuell bin ich bis zu Lektion 8 gekommen. Das sind so viele Informationen, die erstmal verarbeitet werden wollen und trainiert werden wollen. 

      Ich habe mich daran gemacht, ein eigenes Haus zu erstellen. Da mir die Fantasie fehlt, einen guten Raumplan zu erstellen, habe ich mir einen Grundrissgenerator von Watabou geschnappt und damit experimentiert. Ich habe mich für einen Grundriss entschieden, den ich noch leicht abwandeln werde, aber zumindest habe ich nun eine erste Idee. 

      Als Maßband habe ich zwei Wächter genommen: Die Räume sind zwei Wächter hoch. Es hat sich herausgestellt, dass ich in DarkRadiant in Gittergröße 8 einfach die doppelte Anzahl an Kästchen übernehmen kann, die im Grundriss eingezeichnet sind. 

      Ich habe bei dem Grundriss erstmal die einfachsten Sachen geübt. Wände ziehen, Wände zerschneiden, Türen einsetzen, Zargen herausschneiden, VisPortals erstellen, Räume einrichten.

      Ich habe erste Erfolge mit einem Buch gehabt. Das Erstellen eines Buchs ging leichter als gedacht. Ich habe ein paar Ideen mit Bücher. Das Level, das ich gerade erstelle, wird mehr oder weniger ein Chill-Level, einfach nur für mich, bei dem ich ein paar Sachen ausprobieren werde. Ich habe noch keine Idee für eine eigene Mission. Ich möchte erst einmal klein anfangen.

      Beim Keller wollte ich gerne einen zweiten Zugang haben, der sich außen befinden soll. Mich faszinieren diese Kellertüren aus den USA, Bilco basement doors heißen die, glaube ich. Diese sind in Deutschland sehr unüblich, diese Art von Zugängen gibt es aber manchmal zur Anlieferung bei Restaurants etc., wo Fässer dann in den Keller gerollt oder gehoben werden können. 
      Ich habe zwei Hatch Doors verwendet, die allerdings nach dem Drehen vollkommen aus dem Ruder liefen. Inzwischen habe ich sie einigermaßen gebändigt bekommen. Es ist nicht perfekt, aber annehmbar. 
      Im Keller habe ich heute mit einer Falltür experimentiert, die zu einem Schachtsystem führt. Die Räume sind noch quasi nicht eingerichtet, aber ich möchte erstmal am Grundriss weiterarbeiten. In Kürze fange ich das Obergeschoss an.



      · 2 replies
    • JackFarmer

      On a lighter note, thanks to my cat-like reflexes, my superior puzzle skills and my perfect memory, I was able to beat the remastered version of "Tomb Raider: The Last Revelation" in a new superhuman record time of 23 h : 35 m, worship me!
      · 5 replies
×
×
  • Create New...