Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

I know this is probably not the case but figured I could hope: At the moment is there support for non-english characters inside readables? In my campaign idea I plan to have the player travel to different places in the world, thought of leaving a few messages in different languages to make it more immersive... problem is that to my knowledge there are no Chinese, Russian, German, etc. characters. Same with common smileys and symbols, it would be interesting if you could use those in places... I figure anything non-unicode would just appear as an empty space or box however.

Link to comment
Share on other sites

The i18n info on the wiki is mum on the subject, so I think there's no real support. However, speculatively, you could enter Latin-1 (i.e., ISO 8859-1) characters directly into your .xd file. This would probably work OK for players with English and some Western-European language locales. Others would presumably see mistranslated characters in those character locations.

No hope for Asian or emojis with current system.

Edited by Geep
Added caveat: "speculatively"
Link to comment
Share on other sites

Is there a console command (in tdm) that makes you jump to specific info locations? Coupled with automation, you could quickly jump to different rooms in a large map. I guess instead I could make a filter that filters everything away except the info locations. Then navigate between them..

Probably most mappers use a layer for every room (hide everything except the room)?

Link to comment
Share on other sites

I believe "layers" is a DR-only thing. TDM doesn't know about them at all.

In TDM console, you can use "teleport" to get to a named entity. I found it useful to have certain things (like teleport targets or rugs) with very simple, memorable names to teleport to.

RE automation tool - which I have little knowledge of because my rig is too underpowered to run active DR and TDM at the same time - I can imagine there could be a way in the future for DR Layers to also send vast numbers of hide/unhide commands to individual ingame entities corresponding to layers. That approach probably would be slow, though.

Edited by Geep
Add last paragraph
Link to comment
Share on other sites

On 2/25/2023 at 12:12 PM, datiswous said:

Is there a console command (in tdm) that makes you jump to specific info locations? Coupled with automation, you could quickly jump to different rooms in a large map. I guess instead I could make a filter that filters everything away except the info locations. Then navigate between them..

Probably most mappers use a layer for every room (hide everything except the room)?

Yes there should be, not to jump easily to any entity in particular but you can "save" a camera view position and then jump/teleport to it.

if TDM engine team didn't changed any of this you could try:

   cvar "where" or "getviewpos" ->   "prints the current view position" so you can know where you are in world coordinates
   cvar "setviewpos" ->    "sets the current view position" ak teleports the player eye/view to that position

If this particular cvars don't exist in TDM then look in the TDM wiki for something similar it most exist.

btw you can bind keys to cvars, so if you need to jump to a particular position many times, you can do

bind key setviewpos x y z yaw -> bind f1 setviewpos -50 30 75 180  and just press f1 to jump to that position when you need

Hope this helps.

  • Thanks 1
Link to comment
Share on other sites

A little detail I'd like to sort out if possible: I've started working on a campaign which plans to use the existing style and assets in a more futuristic setup. One thing I'd like to make is light switches with an LED that shines in the dark. Model and skin are no issue, but  I was wondering if there's a way to make it turn off when the light switch is enabled: Can an atdm:mover_lever have a skin_lit and skin_unlit like lights? If not I'll either have it always on, or attach the LED as a separate entity maybe giving it a small light too.

Link to comment
Share on other sites

2 hours ago, MirceaKitsune said:

A little detail I'd like to sort out if possible: I've started working on a campaign which plans to use the existing style and assets in a more futuristic setup. One thing I'd like to make is light switches with an LED that shines in the dark. Model and skin are no issue, but  I was wondering if there's a way to make it turn off when the light switch is enabled: Can an atdm:mover_lever have a skin_lit and skin_unlit like lights? If not I'll either have it always on, or attach the LED as a separate entity maybe giving it a small light too.

If you know how to script and make skin files for models then all entities should accept the following script function.

Quote

scriptEvent void setSkin(string skinName);

Sets the skin this entity uses. Set to "" to turn off the skin.

Spawnclasses responding to this event: idEntity

Then is just a matter of setting the desired skin, depending on the state you set the light switch.

If you don't know how to script, this can still be done, even if not imo the ideal method, done using the special editor entity, target_setModel, if it still exists in TDM, if it does then this can be done directly inside DR , by just using the targeting and triggering functionality.  More or less like so:

light switch -> triggerOnce ->target_setModel-> new light switch model

If I'm not mistaken target_setModel ONLY accepts model names and not skins as input, so this will require you to have two almost identical models, one with light on another with light off.

Hope this at lest gives you some pointers.

Link to comment
Share on other sites

On 2/26/2023 at 9:29 PM, SeriousToni said:

But layers don't work with the automation tool, do they? I mean switching on and off the visibility and having that also ingame.

No not really, but you can hide everything except the room and then it's easier to move to the room. But not a good solution.

On 2/27/2023 at 7:02 AM, Geep said:

In TDM console, you can use "teleport" to get to a named entity. I found it useful to have certain things (like teleport targets or rugs) with very simple, memorable names to teleport to.

Interesting. Could be used with info_locations. Although HMart's solution is probably better.

On 2/27/2023 at 7:02 AM, Geep said:

RE automation tool - which I have little knowledge of because my rig is too underpowered to run active DR and TDM at the same time - I can imagine there could be a way in the future for DR Layers to also send vast numbers of hide/unhide commands to individual ingame entities corresponding to layers. That approach probably would be slow, though.

Well, if you have DR active with a map file with one room-layer active, then in TDM teleport to another room and in DR activate that room-layer and sync camera, it will probably not be so harmful on system resources, depending on the size and complexity of that specific room.

I think this stuff can already be done with scripts directly in DR (make a menu, jump camera to specific positions, activate/deactivate layers, etc.), but I find DR-scripting too difficult to understand (no Python knowledge).

Edited by datiswous
  • Like 1
Link to comment
Share on other sites

I'd like to make an entity using a custom scriptobject, which is going to require a set of buttons to be pressed in the right order. At the moment I'm running into an issue similar to doors spawning their own door handle: I want the entity to spawn the buttons itself, but if it does so via def_attach how can I make the buttons target the parent entity when pressed? Is there some solution to this limitation... either to target a referenced entity that's placed on the map at runtime via def, or in this case could I at least make the scriptobject on the main entity identify the buttons without them having to target it?

Link to comment
Share on other sites

8 hours ago, Dragofer said:

You can either spawn the entity with a target spawnarg pointing to the parent entity, or set it later via the addTarget event.

https://wiki.thedarkmod.com/index.php?title=A_to_Z_Scripting:_Special_methods#Spawning_entities

Thanks. The issue is that once an entity is spawned in the map it gets an unique name, like "atdm:whatever" becomes "atdm_whatever_1"... seems you can't work around that in a mere def, but at least there's a script function for it so that's great. For now I went with a prefab where buttons will be independent, that's clearly going to a better option in the end; If things go smoothly I may finish keypad doors for my campaign, could share that separately on the forum in the meantime as I'm sure others would like to play with it :)

One more question in the meantime: With the current entity setup, is it difficult to define a custom lockpick and make it consumable? I see I should easily be able to create my own "atdm:playertool_lockpick_base" derivative, giving it an unique letter for "lockpick_type" which should then work in any door's "lock_picktype"... I'm also seeing a "type" spawnarg with its own letter and wonder what that's used for as well.

But what about making it consumable? So that like health potions, you can pick up multiple instances of the item, then each time you unlock a door via picking or successfully apply the lockpick to the door one item is subtracted. For what seems relevant I'm seeing "inv_cont_use" / "inv_item_count" / "inv_stackable" spawnargs, are those everything I need or would the lockpick script need changes?

Edited by MirceaKitsune
Link to comment
Share on other sites

Link to comment
Share on other sites

On 2/19/2023 at 11:55 AM, Frost_Salamander said:

How do you use the new security safe prefabs?  I've added 'safe02_standing_combination_lock.pfbx' to my map.  The number wheels have a spawnarg called 'slot', which I'm guessing is the unlock code for each wheel?  If so, it looks like the default combination is '123'.  When I play the map and set that, nothing happens (the safe doesn't unlock nor does the wheel become frobable).  What am I missing?

To add to this, the wall safe version without the combination lock (safe03_wall.pfbx) has some issues as well.  If you place it in your map and then rotate it 180 degrees, when you unlock the safe the clasps around the lock both shoot out to the right.

Now, normally when this kind of thing happens with prefabs, you just go and tweak the 'translate' spawnargs to correct for the rotation. However the values for the clasps are only '-2 0 0' and '2 0 0', so only 2 units in opposite directions.  That doesn't account for them shooting off what looks like about 32 units in the same direction (see screenshot).

So, there's a couple of nice looking prefabs added here for 2.11 but it appears they are both unusable either due to bugs or lack of some knowledge.  Who knows about these?  @Dragofermaybe?

 

safe.jpg

Edited by Frost_Salamander
Link to comment
Share on other sites

I had to pseudo-bind those clasps to the safe door by letting them translate to an absolute world position depending on their own and the safe door's rotation, via the scriptobject. Looks like a bug that this falls apart when the whole safe is rotated.

Link to comment
Share on other sites

10 hours ago, Dragofer said:

I had to pseudo-bind those clasps to the safe door by letting them translate to an absolute world position depending on their own and the safe door's rotation, via the scriptobject. Looks like a bug that this falls apart when the whole safe is rotated.

Thanks - I've raised bug reports for both issues.

Link to comment
Share on other sites

Two questions for me: First what is the easiest way to create an in-world entity which requires an item when used? This means the entity is frobable, when used it checks if you have a given stackable item in your inventory... if you do it triggers its targets and subtracts 1 of that item, if you have none left no targets are triggered. I can make a scriptobject if necessary, but this seems like something basic which I've seen done before and should already possible just that I haven't found how.

And something else; I have two songs which are structurally identical, same length and content just a variation in tone. I assigned them to two different zones the player can walk between directly. Is it possible to make it so when you step into the other area and ambiance changes, the new songs fades in from the same position the old song is at so you hear a seamless transition? By default the song in a new area starts playing from the beginning, I was wondering if there's a flag to always run the timer for inactive ambiance so when you return to a zone you hear its song resume as if it had been playing all along.

  • Like 1
Link to comment
Share on other sites

For the song thing (clever idea, btw), I have no idea if there is anything built in to do this; I doubt it. You might have to implement something along the lines of this: https://wiki.thedarkmod.com/index.php?title=Ambient_Sounds_-_Zone_(using_triggers). It would have to be smart enough to start both songs at the same time, but have one of them start at zero. Then when you transitioned, it would fade the volumes up/down as appropriate.

  • Like 2
Link to comment
Share on other sites

I always thought about the same thing. Having one song playing along the whole mission, but have variations of it that tune in in certain regions. However I didn't find a solution that was working (same problem you have, with the new variation starting from the beginning).

The idea of Joe seems smart - I'm curios if it works for you. I hope I can add this too then in the future.

"Einen giftigen Trank aus Kräutern und Wurzeln für die närrischen Städter wollen wir brauen." - Text aus einem verlassenen Heidenlager

Link to comment
Share on other sites

20 minutes ago, SeriousToni said:

I always thought about the same thing. Having one song playing along the whole mission, but have variations of it that tune in in certain regions. However I didn't find a solution that was working (same problem you have, with the new variation starting from the beginning).

The idea of Joe seems smart - I'm curios if it works for you. I hope I can add this too then in the future.

I figure this wasn't needed until now. The reason I ran into the requirement is my cyberpunk campaign uses custom music: I have a few chiptune tracks with different versions, like one for fighting and another calmer one. I set a song for the outside and the other for an underground area. Were this implemented you'd hear the transition smoothly when traveling between the two, as it stands the new song always restarts when walking between spaces which is a little uglier.

  • Like 2
Link to comment
Share on other sites

1 hour ago, datiswous said:

Nice to read you got back to this.

Thanks. The issue was my ambition to make everything typical scifi which would have taken far too much effort: I'm likely going to obtain an unique and interesting mixture by sticking to the vanilla assets with small modifications and my own additions. Instead I'm going to have story based reasons explaining the style... for example, bullet weapons being banned in an international treaty so the world is still using swords and bows by the time it has computers and 16-bit music, the special arrows classified as nano-technology serving as a replacement / workaround to guns being banned from the general public.

Let me know if anyone has an answer to the item question too: Was tempted to make a vending machine next but don't feel like writing a scriptobject for that as well, thus I was wondering if there's a special coin item I can define and have it deduced per frob using conventional triggers to teleport the items out of the box.

Link to comment
Share on other sites

On 3/15/2023 at 7:01 PM, MirceaKitsune said:

Two questions for me: First what is the easiest way to create an in-world entity which requires an item when used? This means the entity is frobable, when used it checks if you have a given stackable item in your inventory... if you do it triggers its targets and subtracts 1 of that item, if you have none left no targets are triggered. I can make a scriptobject if necessary, but this seems like something basic which I've seen done before and should already possible just that I haven't found how

Check kingsal's "Hazard Pay". It includes a stackable blow torch that can be used as per your description.

Link to comment
Share on other sites

  • 3 weeks later...

I've got two brushes that are perpendicular, and they are "joined" with a curved patch (bevel) to create a smooth transition. This is what it looks like in a small test map:

image.thumb.jpeg.6df4a5cfd82a0410e3d0c2bafbf5ea0c.jpeg

However, if I copy these objects into my big WIP map, I see lines along the patch:

image.thumb.jpeg.b5a7933f6913027dee63fd8021f38cce.jpeg

Here's a close-up:

image.thumb.jpeg.65a3ecd4fa39e658b0fa66f02be4f7c8.jpeg

Reiterating, these are the exact same objects, just copied from one map to another. Does anyone have idea as to why this is happening? In general, what causes these types of lines on a patch?

Edited by joebarnin
typo
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

    • 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
    • The Black Arrow

      Hope everyone has the blessing of undying motivation for "The Dark Mod 15th Anniversary Contest". Can't wait to see the many magnificent missions you all may have planned. Good luck, with an Ace!
      · 0 replies
×
×
  • Create New...