Jump to content
The Dark Mod Forums

Recommended Posts

Posted
51 minutes ago, cvlw said:

I want the player to select an item in the inventory (not drop to hands) and then USE (frob and then use key) on an object in the map.  But, the frob should only happen when that object is selected in the inventory and not just general frob.

I thought @JackFarmer was doing something similar recently if I'm not mistaken. Maybe he knows.

  • Thanks 1
Posted
1 hour ago, cvlw said:

Hello all.

I have a hopefully easy question.  I just can't seem to search it properly.

I want the player to select an item in the inventory (not drop to hands) and then USE (frob and then use key) on an object in the map.  But, the frob should only happen when that object is selected in the inventory and not just general frob.

If I am confusing this with triggering, I apologize.

Is there an example in an exiting map that I can study that does this type of thing?  I don't recall from any maps about this. Or, what is the general way to do this?

The intent is to have the player find this inventory item and then go to various objects in the map and USE this item on the map objects.

Advice?

Thanks

Clint

 

One clearly defined entity that can only be used with frob  on another clearly defined entity?
 

  • Thanks 1
Posted
2 hours ago, cvlw said:

Hello all.

I have a hopefully easy question.  I just can't seem to search it properly.

I want the player to select an item in the inventory (not drop to hands) and then USE (frob and then use key) on an object in the map.  But, the frob should only happen when that object is selected in the inventory and not just general frob.

If I am confusing this with triggering, I apologize.

Is there an example in an exiting map that I can study that does this type of thing?  I don't recall from any maps about this. Or, what is the general way to do this?

The intent is to have the player find this inventory item and then go to various objects in the map and USE this item on the map objects.

Advice?

Thanks

Clint

 

I had to do a similar thing for the antivenom in The Spider and the Finch.  I can get you half way there at least. For the inventory item use an atdm:moveable_custom_item.

To use it only on certain objects is tricky. I couldn't figure out how to do that directly, so I used a script to check if you were within range of the object's location when you use the item. This would be pretty clunky for multiple objects though and maybe not precisely what you want. Hopefully someone will chime in with a better method.

  • Thanks 1
Posted
29 minutes ago, grodenglaive said:

I had to do a similar thing for the antivenom in The Spider and the Finch.  I can get you half way there at least. For the inventory item use an atdm:moveable_custom_item.

To use it only on certain objects is tricky. I couldn't figure out how to do that directly, so I used a script to check if you were within range of the object's location when you use the item. This would be pretty clunky for multiple objects though and maybe not precisely what you want. Hopefully someone will chime in with a better method.

Yeah, I know what you mean. For some reasons, the entity type atdm:moveable_custom_item does not work as intended and the only workaround is as per you description via approximation, but: if you use a key category instead of the moveable item, then it works with frobbing.

@cvlw Clint, please answer my question in my previous post, then I will provide you with a setup for your to modify in your map.

  • Like 1
  • Thanks 1
Posted
3 hours ago, JackFarmer said:

One clearly defined entity that can only be used with frob  on another clearly defined entity?
 

Yeah, that is the intent.

After stepping away, maybe this could be USE or FROB:

 1)  Select item in inventory, then highlight the target entity and FROB (right click).  Or...

 2)  Select item in inventory, then highlight the target entity and and USE item (enter key).

I would prefer not scripting at this time, if possible.

I was looking for examples of this type of action in existing maps to see what techniques could be used or copied.

Posted (edited)
22 hours ago, Baal said:

Is it possible to override a single definition (from a .sndshd file for example) instead of whole files?

I want to replace some footstep sounds. If I include the sound shader defnition files, I'll have to keep them up to date with the base mod, and I don't want to do that. Instead, I just want to override single definitions in a separate file. Is that possible?

This is a nightmare for both mappers and modders, and not only in the audio department. As far as I can tell, and unless you employ elaborated tricks, it is all or nothing.

Things can change, though.

EDIT - Wrong assumptions. Confirmed a few posts below.

Edited by snatcher

TDM_Modpack_Thumb_50.png

Posted (edited)
14 minutes ago, cvlw said:

Yeah, that is the intent.

After stepping away, maybe this could be USE or FROB:

 1)  Select item in inventory, then highlight the target entity and FROB (right click).  Or...

 2)  Select item in inventory, then highlight the target entity and and USE item (enter key).

I would prefer not scripting at this time, if possible.

I was looking for examples of this type of action in existing maps to see what techniques could be used or copied.

I am afraid this does not work without a little scripting. Do you want me to point you to a mission and the relevant items so that you learn from it or do you want me to provide you with a test map...from which you would erm...learn as well. :)

 

Edited by JackFarmer
  • Thanks 1
Posted
1 minute ago, JackFarmer said:

I am afraid this does not work without a little scripting. Do you want me to point you to a mission and the relevant items so that you learn from it or do you want me to provide you with a test map...from which you would erm...learn as well. :)

 

Hey thanks.   I could look at a mission and attempt to decipher.  If  I can't handle it that way, I may ask for a test map.  I might even request an example be put in the training mission.  Or I put it there myself after my own mastery.

I *can* script as I am a programmer by trade and understand the fundamentals.  I am just pleasantly inexperienced so far!

 

 

Posted (edited)
19 minutes ago, cvlw said:

Hey thanks.   I could look at a mission and attempt to decipher.  If  I can't handle it that way, I may ask for a test map.  I might even request an example be put in the training mission.  Or I put it there myself after my own mastery.

I *can* script as I am a programmer by trade and understand the fundamentals.  I am just pleasantly inexperienced so far!

 

 

Please look into The Black Mage.

Look out for the following entity names (not inventory names):
 

  1. white_plate_flex (this is the item to be picked up)
  2. white_plate_fix (this is the item that will show up once (1) has been frobbed on (3)
  3. white_system (this carries the used_by and used_action_script information)

The name of the action script in tbm.script is "whiteblock".

Entity class of (1) must be a key. For reasons unknown it does not work with custom_object entity classes.

 

Edited by JackFarmer
  • Like 1
  • Thanks 1
Posted
7 hours ago, cvlw said:

Hello all.

I have a hopefully easy question.  I just can't seem to search it properly.

I want the player to select an item in the inventory (not drop to hands) and then USE (frob and then use key) on an object in the map.  But, the frob should only happen when that object is selected in the inventory and not just general frob.

If I am confusing this with triggering, I apologize.

Is there an example in an exiting map that I can study that does this type of thing?  I don't recall from any maps about this. Or, what is the general way to do this?

The intent is to have the player find this inventory item and then go to various objects in the map and USE this item on the map objects.

Advice?

Thanks

Clint

 

You can look at the andersarken mask pedestal in an attic in The Painter's Wife. It has multiple ways of placing the mask on the pedestal:

- Use the mask on the pedestal

- Frob the pedestal while the mask is selected

- Possibly also holding the mask near the pedestal (this is based on stim/response). Might not be implemented in this example, though.

Seeking Lady Leicester also has similar setups wherever you can use the torc.

  • Thanks 1
Posted
2 hours ago, snatcher said:

This is a nightmare for both mappers and modders, and not only in the audio department. As far as I can tell, and unless you employ elaborated tricks, it is all or nothing.

Things can change, though.

Since 2.10 or so FM defs will always override core defs if they both have the same name. FM files override core files of the same name and path.

  • Like 1
Posted
2 hours ago, snatcher said:

This is a nightmare for both mappers and modders, and not only in the audio department. As far as I can tell, and unless you employ elaborated tricks, it is all or nothing.

Things can change, though.

It actually is possible to override single declarations without touching the core files. I just got it to work with a footstep sound replacement. At least I think so, I am not a hundred percent sure yet.

  • Like 1
Posted
12 minutes ago, Dragofer said:

Since 2.10 or so FM defs will always override core defs if they both have the same name. FM files override core files of the same name and path.

 

7 minutes ago, Baal said:

It actually is possible to override single declarations without touching the core files. I just got it to work with a footstep sound replacement. At least I think so, I am not a hundred percent sure yet.

Music to my ears! My bad, then. My first attempt at modding TDM had to do with sounds in 2.10 and I failed and parked it. I am very glad to hear it was possible back then and now. Thanks.

TDM_Modpack_Thumb_50.png

Posted (edited)
16 hours ago, Baal said:

It actually is possible to override single declarations without touching the core files. I just got it to work with a footstep sound replacement. At least I think so, I am not a hundred percent sure yet.

It is possible to override "core" files in TDM, without messing with the original files, from the beginning. This is a feature of the Doom 3 engine and obviously transitioned into TDM.  In Doom 3 and TDM, you just make a copy of a def, mtr or any other file inside your mod or mission folder, respect the same virtual file path from the originals and the modified files will take precedence over the files inside the .pk4's.

This could be used by mission makers to for example override the "noshadows" from some alpha materials, for example to permit trees, grass, banners, etc, in their mission to cast shadow maps, something the core materials can't do because they are limited by the need to support the old stencil shadows.  But a brave mission maker, could recommend players to only use shadow maps on their mission and say, if a player wants stencil shadows they will have to accept that trees will cast ugly shadows.

(I'm sure there's ways to automatically disable shadows for trees and such, when a user sets stencil shadows on, but it may take a bit of scripting madness...)  

Edited by HMart
Posted
1 minute ago, HMart said:

It is possible to override "core" files in TDM, without messing with the original files, from the beginning.

Yes, but I am talking about explictly NOT overriding core files.

This is about only overriding specific decls. If you package your own version of a file in the base mod, you will override EVERYTHING that is declared in there, thus reverting updates that might have or will happen in the core mod.

Posted

I think I have a way to do this without scripting.  The idea of the Key entity and key targets seemed to pan out.   What do you all think?
----------

1) the inventory object to pick up in the map is an atdm:key_base with the model and inv_model overridden.  So, this looks like a custom inventory item.

2) the target objects to use this are atdm:froblock entities with their used_by as the entity #1, trigger_targets enabled, sounds customized, etc. In my case, make a sound, emit a puff of smoke, then simply remove the target item, all things that can be done with relays and targets.

So far, this seems to do what I intend.

Does this seem sound?

Now that I look back on this convo, I didn't explain what I intended well enough.  I bet some experienced mapper could have suggested this.  So, my apologies.

 

 

Posted

You can probably do most things with setups of relays, targets and other entities, and at first glance your setup seems to be reasonable. Past a certain (not high) level of complexity a primarily scripted method will give a much better overview and be more powerful, though. If you're a coder that's what I'd have recommended.

Posted
20 hours ago, cvlw said:

Select item in inventory, then highlight the target entity and and USE item (enter key).

I think a house of locked secrets has a teleport functionality with that. You use a specific object in inventory with an entity in the game and then you get teleported to another area.

The Accountant 2 (I think) you can use a shovel on some ground to make a hole.

Just some examples.

  • 2 weeks later...
Posted
On 1/19/2024 at 10:35 PM, snatcher said:

Music to my ears! My bad, then. My first attempt at modding TDM had to do with sounds in 2.10 and I failed and parked it. I am very glad to hear it was possible back then and now. Thanks.

This change was introduced in 2.11:

On 12/2/2022 at 8:23 PM, stgatilov said:

* It is now legal to override a single decl of core game in your mission.

Recall that "decl" means a material, a skin, an entityDef, a particle, etc.
Note that overriding a whole file from core game always worked as expected, but overriding a single decl from a file did not work reliably before (despite the common belief that it should).

Overriding a single decl sound works as expected but I get some warnings in the console. I don't expect support for mods but I think it is worth mentioning it.

Capture.jpg

TDM_Modpack_Thumb_50.png

Posted

Thing is, at least for sounds, maps overriding decl don't get a warning but us, outlaws, do get it. Overriding whole files go totally unnoticed though... a little inconsistent. Just a trivial observation.

TDM_Modpack_Thumb_50.png

Posted
8 hours ago, snatcher said:

Overriding a single decl sound works as expected but I get some warnings in the console. I don't expect support for mods but I think it is worth mentioning it.

I think the game treats everything inside "fms" as "mission assets", and everything in game root directory as "core assets".
You can check it at the start of game console, where all the paths are listed.

Posted (edited)
51 minutes ago, stgatilov said:

I think the game treats everything inside "fms" as "mission assets", and everything in game root directory as "core assets".
You can check it at the start of game console, where all the paths are listed.

True: [M] vs [C]

I tried with some def and same result (warnings). Mixed feelings now, do I continue down this path? I am not doing anything illegal but mods / add-ons can be perceived as buggy / unprofessional...

Edited by snatcher

TDM_Modpack_Thumb_50.png

Posted

Unless we add some special subdirectory for addons, I'm afraid they look like core files.
And having duplicate decl file in core assets is a problem worth complaining about.

Also it might be a bit uncertain which decl wins in the end in such situation.

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