Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 4.0

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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!

 

 

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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 4.0

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

 

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 weeks later...
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 4.0

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 4.0

Link to comment
Share on other sites

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.

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

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 1 reply
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...