Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

17 hours ago, thebigh said:

Is it possible for a readable to display text in-game without being frobable?

 

edit: nvm, I fixed it by setting frob_distance to 1. Still technically frobable, but can't be reached.

It's a known bug; glad you found the workaround. It seems to be specific to GUIs using xdata, so if all you need is something like a signpost, a GUI material that accepts a gui_parm1 spawnarg as per https://wiki.thedarkmod.com/index.php?title=Text_Decals_for_Signs_etc. is another option.

  • Like 1

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

46 minutes ago, VanishedOne said:

It's a known bug; glad you found the workaround. It seems to be specific to GUIs using xdata, so if all you need is something like a signpost, a GUI material that accepts a gui_parm1 spawnarg as per https://wiki.thedarkmod.com/index.php?title=Text_Decals_for_Signs_etc. is another option.

It's more than just a signpost or a name on a plaque but it's just "flavour" text that I don't want to mislead the player into thinking is important by having it highlight. The text decals are fiddly, and at leas the readables editor shows you a preview of what it will look like.

My missions:           Stand-alone                                                      Duncan Lynch series                              

                                      Down and Out on Newford Road              the Factory Heist

                                                                                                  A House Call

                                                                                                  The House of deLisle                                                                                                  

                              

Link to comment
Share on other sites

Just out of curiosity: what happens, when you just make the readable unfrobable (via frobable 0)? Does it still show the text of the xdata? That way, you could circumvent the player acutally reading the readable, without your "hack" (the result should be the same, anyway).

Link to comment
Share on other sites

No, it does not show the text of the xdata on the model in/game. It's just a blank sheet. This is what I was actually trying to do: have the text visible on the model but without being able to get the readable popup by frobbing.

My missions:           Stand-alone                                                      Duncan Lynch series                              

                                      Down and Out on Newford Road              the Factory Heist

                                                                                                  A House Call

                                                                                                  The House of deLisle                                                                                                  

                              

Link to comment
Share on other sites

Trying to figure out DDS creation. The existing wiki entry by that name is pretty sad. For instance, it wants you to use a specific version of an obsolete, vendor-specific compression tool. I'm kinda sure anyone doing it now would use Photoshop or GIMP. Playing with latest GIMP, I'm guessing the setting might be, in the case where 100% opacity is desired:

1) Flatten Image (to merge layers and remove Alpha channel)
2) Use File/Export As, then in the Name field, change the file extension to .dds (must be lower case).
3) In the "Export as DDS" dialog, change these fields from their default values to new values:
- Compression: BC1/DXT1
- Mipmaps: Generate mipmaps
- Mipmap Options – Filter: Box

Could a DDS-GIMP expert here weigh in on these options, and whether one needs to change other things (sRGB, Gamma, etc.)?

I'd be happy to update the wiki about this when the dust clears.

Link to comment
Share on other sites

11 hours ago, thebigh said:

No, it does not show the text of the xdata on the model in/game. It's just a blank sheet. This is what I was actually trying to do: have the text visible on the model but without being able to get the readable popup by frobbing.

Too bad; this would have been the simplest way, if it had worked. There is also the possibility to create Text Decals, which you can then apply to the model of the paper. Here is the Wiki page (recently updated by Geep) on how you can create them: https://wiki.thedarkmod.com/index.php?title=Text_Decals_for_Signs_etc. It is a bit mor complicated, so your method might still be better, but at least you know that there is a "proper" way.

Link to comment
Share on other sites

@Geep

At a first glance, the DDS entry needs rewriting or at least some restructuring. The comressonator bits are redundant, also there's no description on how DDS format works, or how dds files fit in the game folder structure. That should be in the first section, probably. Will try to take a look at it around the weekend.

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

@peter_spy, oh, you're not taking PMs. Here's the text.
 

Spoiler

 

Here's what I came up with yesterday, until the brainpan wattage dimmed. Might be useful as a starting point, or at least the bits that are not delusional, based on what I (mis)remembered from some forum.

---

Possible modification to “DDS Creation”

== Why Pre-Create DDS Files? ==

The TDM game engine can read textures in either .tga (an uncompressed format) or .dds format. The compressed .dds format contains a hierarchical data structure, the same image at multiple resolutions. While that hierarchy is an impediment during image editing, at run-time it allows faster dynamic rendering of textures, by taking into account the distance of the viewer from a textured surface. This results in faster frame rates.

Nowadays, TDM makes fuller use of this .dds advantage: during startup loading, any textures that are only offered in .tga format are converted in memory to the .dds data structure. This conversion takes time and so leads to longer load times. Unfortunately, the converted files are not cached to disk, so this process must be repeated on every startup. [Is there some way to force the engine to save the DDS files? If so, this would be another, better way for the dev to generate them.]

To circumvent that, the FM creator can do the conversion and include it in the FM’s .pk4. The game engine will look first for a .dds to read directly, then, if unsuccessful, a .tga to read and convert.

The foregoing applies to a “diffuse map” texture (the main image) and its optional companion “specular map” texture. If there is also a “normal map” aka “bump map” texture, it should be left uncompressed in .tga form, typically 256x256 with no Alpha channel.

== Pre-requisites for Creating a DDS File ==

While traditionally a .tga is the starting point, any convenient image format can in theory be converted into a .dds, given the right software. The standard requirements for TDM’s DDS are:

The image is square, and a power of 2. Usually, it’s 512x512 (or 256x256 for specular)

If the diffuse texture has transparency, then a 32-bit RGB-Alpha format is needed. If opaque (or a specular map), then a 24-bit RGB format suffices. Note that the TDM engine supports only “hard edge” binary transparency, by applying a threshold value (default = 50%) against the 8-bit Alpha values.

== Generating an DDS in GIMP for a 100% Opaque Texture ==

Given an image that meets the pre-requisites,

---

Well, that's as far as I got. I wanted to revise this to tie in the standard file locations and texture file naming conventions, but couldn't decide how to make the text flow. A bit of content for that last incomplete "DDS in GIMP" section was suggested in my originally posted query. Other potential sections that could be useful but I couldn't write -

DDS in GIMP for a Texture with Transparency

DDS in Photoshop (with & without transparency; plugins?)

Batch conversions with GiMP; with Photoshop

Exceptions

(RE that, I just reported a bug about a material file's call to MakeIntensity(stain01b_s) throwing an error under 2.08. Response noted that it's .dds file, and image processing operations like MakeIntensity() only work on uncompressed files.)

 

 

Link to comment
Share on other sites

I don't? 😮 That's weird, I didn't change anything in PM settings in a long while.

Regarding the text, some bits here are good, but IMO it's a bit wordy, e.g. all content creators need to know about DDS format is that it's how images are stored in GPU (so there's no conversion during mission load), and that the compression ratio is very good (albeit lossy, so never work or on dds images). Still, that's a good start. I don't have anything on Photoshop, but I can cover DDS options for Gimp.

Link to comment
Share on other sites

I'm not English native, so maybe it will be better if I send you my part for editing / proofreading? Feel free to make the wiki revision :)

Btw. I'm not 100% sure on deleting the Compressonator part. I have an old and super-slow version, but a quick search revealed that it's still there. IMO it shouldn't be a first choice for mappers, as it's mostly for batch conversions (and that's not the best approach). GIMP is more accessible and DDS exporter is already its core component, so you don't have to search for plugins, and I'd rather encourage mappers to export to DDS simply when they're happy with a material. Going through dozens of files and choosing compression profile for transparency or gradients is more error prone than doing it on regular basis.

Link to comment
Share on other sites

Okay, so I'm putting the last few touches on my first map (YAY) but I cannot get the briefing text and objectives to show up. How do I do it?

According to the wiki, all I need to do for briefing text is to create a suitable xd file called briefing.xd in the xdata directory. In my case this would be \games\darkmod\fms\factory\xdata\briefing.xd since my actual map file is called \games\darkmod\fms\factory\maps\factory.map. The first line of the file is maps/factory/mission_briefing, and for now I just copied the rest of the stuff from Closemouthed Shadows since I know for sure that works.

Unfortunately, all I get when I start a new mission is a blank sheet. When I go to the objectives screen Darkmod crashes to a black screen and I cannot bring up the console. From the blank sheet briefing, if I go to the console I get the error "WARNING:DisplayBriefingPage: Could not find briefing xdata: maps//mission_briefing"

What am I doing wrong?

My missions:           Stand-alone                                                      Duncan Lynch series                              

                                      Down and Out on Newford Road              the Factory Heist

                                                                                                  A House Call

                                                                                                  The House of deLisle                                                                                                  

                              

Link to comment
Share on other sites

@RedNoodles: There is draw order and it can be manipulated, forgot how that works, though, but you should find the answer if you take a look at the gui files shipped with tdm (for example the compass is drawn over the objectives screen

@thebigh: Do you have a startingmap.txt file in your fm folder and the mission properly installed?

  • Like 2

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

3 minutes ago, Obsttorte said:

 

Do you have a startingmap.txt file in your fm folder and the mission properly installed?

I think I must be the world's biggest dope. 😝 I did have that, and it was called startingmap.txt.txt (thanks for that, Windows). Now that I fixed the suffix it is working as expected. Cheers!

  • Like 1

My missions:           Stand-alone                                                      Duncan Lynch series                              

                                      Down and Out on Newford Road              the Factory Heist

                                                                                                  A House Call

                                                                                                  The House of deLisle                                                                                                  

                              

Link to comment
Share on other sites

Yep, that's my favourite mistake. That and typos. :D

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

18 hours ago, Obsttorte said:

@RedNoodles: There is draw order and it can be manipulated, forgot how that works, though, but you should find the answer if you take a look at the gui files shipped with tdm (for example the compass is drawn over the objectives screen

@thebigh: Do you have a startingmap.txt file in your fm folder and the mission properly installed?

I did some exploring and found the relevant lines in tdm_readables.script

Readables are rendered on layer # 10. The HUD is on layer #1. So the trick is to put the mask overlay above the readables, and below the HUD. By editing the "$player1.createOverlay" commands on tdm_readables I got the readables to render on layer # -1. after that I put my overlay on layer 0. Everything displays in the right order now.

 

test_2020-08-18_13.05.45.jpg

  • Like 3
Link to comment
Share on other sites

Good. But looking through a plague mask would probably not appear like that (at least it doesn't look so with a gas mask, which is pretty close).

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

 

Quote

The textures used to be separated like that in the actual folder structure, but due to D3's inability to read .dds files five folders deep, they had to be moved.

FYI, that quote from the wiki doesn't seem to be true, I made both a path that has 8 folders in total, and I also used fairly long names (over 150 characters total). I'd rather suspect there's a character limit for paths, but I've yet to hit it. Both 32 and 64 bit version have no problems with more than 5 folders.

Edited by peter_spy
Link to comment
Share on other sites

9 hours ago, Jedi_Wannabe said:

Sexy. Much improved over the test I saw months back 🙂

thanks, but just to clarify I didn't make that. I'm using the default TDM spyglass overlay. originally i was going to use a thick glass texture and an air filter system (each filter would last 30 seconds or so) but they made navigation too difficult

  • Like 1
Link to comment
Share on other sites

I'm having some trouble with pathing. I'm teleporting in some AI to fight some other AI, they are then to assume the same patrol route as the people they killed. Some of them work fine, but others will just stand there after the fight and not ever go back to patrolling. The way I set it up is to use a atdm:target_changetarget one second after they are teleported from the blue room, and they all assume patrols as they should, but only for a few seconds before they see the other AI and start fighting. Is the fighting somehow breaking their patrols? Can this be avoided or remedied somehow?

My Fan Missions:

   Series:                                                                           Standalone:

Chronicles of Skulduggery 0: To Catch a Thief                     The Night of Reluctant Benefaction

Chronicles of Skulduggery 1: Pearls and Swine                    Langhorne Lodge

Chronicles of Skulduggery 2: A Precarious Position              

Chronicles of Skulduggery 3: Sacricide

 

 

 

Link to comment
Share on other sites

The default behaviour should be that the ai continues to patrol after the fight has done and it has calmed down (the latter might take a while). If the ai is not resuming the patrol then one possibility is that it may has issues reaching the next path_corner. Are there any warnings/error messages in the console?

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

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

      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
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...