Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

You don't have to pack up your stuff to get it working. The pk4 archives are just there to save some memory.

  • Like 1

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

You don't have to pack up your stuff to get it working. The pk4 archives are just there to save some memory.

 

How do I place it in a sub-directory however, for easier grouping? For instance, I don't want to pile up every entity I'm developing in darkmod/def, but rather darkmod/mymod/def. IIRC pk4dir is normally the way to go about that.

Link to comment
Share on other sites

Spaces might be a problem.

 

My darkmod folder is in C:/darkmod, and my settings are :

 

Engine path: C:

 

Mod (fs_game) darkmod

 

It's all right, the problem was actually an oversight of mine.

 

I've been following the A-Z tutorial since this morning, on-and-off learning some basic stuff. I'm still getting the hang of trying to build functioning doors, but I might pick it up eventually...

  • Like 1
Link to comment
Share on other sites

 

How do I place it in a sub-directory however, for easier grouping? For instance, I don't want to pile up every entity I'm developing in darkmod/def, but rather darkmod/mymod/def. IIRC pk4dir is normally the way to go about that.

Why not putting it in an fm folder: darkmod/fms/myfm?

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

I have a question about entity definitions, which hopefully still qualifies for this thread: Is it possible to have a custom cvar control a model or its skin? So for instance: If "g_mycvar" is set, entity "myent" will use the model "mymodel1.md5", otherwise it will use "mymodel0.md5". I noticed that if statements are possible in materials, so I pondered if they can control models and skins too.

 

Why not putting it in an fm folder: darkmod/fms/myfm?

 

Since I might work on FM independent mods as well, such as new entities or assets.

Link to comment
Share on other sites

I have a question about entity definitions, which hopefully still qualifies for this thread: Is it possible to have a custom cvar control a model or its skin? So for instance: If "g_mycvar" is set, entity "myent" will use the model "mymodel1.md5", otherwise it will use "mymodel0.md5". I noticed that if statements are possible in materials, so I pondered if they can control models and skins too.

This would normally be controlled via a scriptobject. But you would have to use a spawnarg on either the entity or worldspawn (if it should count for all) as new cvars have to be defined in the source code. And yeah, the question belongs here.

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

This would normally be controlled via a scriptobject. But you would have to use a spawnarg on either the entity or worldspawn (if it should count for all) as new cvars have to be defined in the source code. And yeah, the question belongs here.

 

A spawnarg on the entity sounds good... it doesn't have to toggle in realtime, just when the map loads. What would I write in the entity or model definition however, and are there any existing examples?

Link to comment
Share on other sites

A spawnarg on the entity sounds good... it doesn't have to toggle in realtime, just when the map loads. What would I write in the entity or model definition however, and are there any existing examples?

Can't you just use the ordinary "model" and "skin" spawnargs in that case? The only reason to use a scriptobject or cvar would be to change it during run time.

 

If you decide you want a script, you can use methods setSkin() and setModel() to change them during play. There're examples in tdm_lights.script because lights often change skin and model when they are switched on or off.

Link to comment
Share on other sites

As steve said changing the model or skin on map load is handled via spawnargs. If , for whatever reason, you want to change it via runtime, you have to do it via script.

 

scriptobjects are added using the spawnarg "scriptobject" and the name of your scriptobject as argument (not the name of the scriptfile).

 

It would take too long to explain this here, but there are articles in the wiki that explain the scripting part of tdm.

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

You change spawnargs on an entity with the function $entity_name.setKey(propery, value); in a script. Or there's a target_setKeyVal entity, make it target the entity you want to change, and give it the propery/value "target" "propery;value". Then it setKeys the entity when it's activated.

 

Edit. Search map .script files for the term setKey, or search .map files for target_setkeyval (Moonbo uses them) to see examples. You can open them like text files.

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

Changing spawnargs during play will not change the model or skin. Those spawnargs are usually read once only, while the map is loading. You have to use setSkin() or setModel().

 

Why do you want a cvar?

 

There are 2 spare cvars built into the engine that are unused by the game, for devs to use in quick testing: r_ignore and r_ignore2. You can set them to anything you like, and read them in a script, then get the script to call setModel() etc. If you need a cvar for private testing, you can just go ahead and use them without having to recompile any c++ code.

 

You can also set up a simple script without having to use "script objects", which are powerful but require you to learn more syntax. Again, if you just want to do some experimenting rather than package a new asset for release, you can use a simpler map script. What's it for?

Link to comment
Share on other sites

Why not putting it in an fm folder: darkmod/fms/myfm?

Yeah I never quite got this when setting up my directory settings.

 

My game is TDM2.0 and my engine path is D:/Games/The Dark Mod/. Works fine but all my fm subfolders (maps, env, etc) are in the dark mod folder where the .exe is. Should be fine when it's time to pack my fm into a .pk4 (i'll just pick and choose the folders/files) but I already know it's gonna get messy if I work on more than one thing. Do I use the "mod" or the "modbase" box to setup a dedicated project folder?

Edited by Spooks

My FMs: The King of Diamonds (2016) | Visit my Mapbook thread sometimes! | Read my tutorial on Image-Based Lighting Workflows for TDM!

 

 

Link to comment
Share on other sites

Might be an elementary issue, but something has gone wrong with DR, it seems. When I create a new brush, its faces are rendered with a single shade instead of the selected texture. The other brushes are unaffected.

post-2023-0-86764700-1451583204_thumb.png

If I restart DR, the problem persists. If I open another map, or create a new one, it persists as well. What's up?

 

[edit]Accidentally set the default texture scale to 0. Well.

  • Like 1

Come the time of peril, did the ground gape, and did the dead rest unquiet 'gainst us. Our bands of iron and hammers of stone prevailed not, and some did doubt the Builder's plan. But the seals held strong, and the few did triumph, and the doubters were lain into the foundations of the new sanctum. -- Collected letters of the Smith-in-Exile, Civitas Approved

Link to comment
Share on other sites

Might be an elementary issue, but something has gone wrong with DR, it seems. When I create a new brush, its faces are rendered with a single shade instead of the selected texture. The other brushes are unaffected.

attachicon.giftdm_brushfaces.png

If I restart DR, the problem persists. If I open another map, or create a new one, it persists as well. What's up?

 

[edit]Accidentally set the default texture scale to 0. Well.

 

If you are editing more than one map at a time, be careful:

 

http://bugs.thedarkmod.com/view.php?id=4138

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

I have an AI that I want to loop a specific animation and vocal bark continuously, I have it setup in game and it works great except the animation keeps skipping here and there.

 

I have the AI targeting a path_cycleanim_1 entity and I have a conversation target tied to a randomly triggered timer. What happens at the start of the conversation is that the animation goes back to frame 1 it seems and then continues.

 

Is there a way to fix this? as i've noticed this happens a lot with conversations where at the start of the conversation the animation of the AI's will jump a little bit.

 

Thanks!

Link to comment
Share on other sites

  • 2 weeks later...

Having some issues with patch mesh whilst attempting to build a tent. The outside looks alright, but the lighting on the inside is messed up (even though it's the same patch, just moved slightly and with the matrix inverted). Any suggestions on how to fix this?

 

cnxDZ0J.jpg

 

kzkqz5p.jpg

  • Like 1
Link to comment
Share on other sites

Ive seen this, its a shadowing issue. I think self shadowing to be specific, so you have several options -

  • make the patch a Func_static and apply "noshadows 1" - this is quick and dirty
  • do the same as above but clone the patch and apply "shadow 1" texture
  • make a customer material def of the above textures that include the line noself shadow (check the wiki for the correct spelling/usage)
Link to comment
Share on other sites

Having some issues with patch mesh whilst attempting to build a tent. The outside looks alright, but the lighting on the inside is messed up (even though it's the same patch, just moved slightly and with the matrix inverted). Any suggestions on how to fix this?

Hmm is there something in the scene that could be causing those multiple square shadows? If not you could use console command r_showShadows 2 and check it's definitely shadows, and see where they're ocming from. Judging by the guard's shadow, the sun shouldn't be lighting that wall of the tent at all.

 

Is your tent a separate visleaf? And/or is the light source more than 2 visleafs away from the tent? There are engine optimizations that can cause missing or crazy shadows from distant visleafs.

Link to comment
Share on other sites

NB the only surfaces that cast shadows in our engine are those that face away from the light, in case that helps explain anything. So if you have two patches back to back between you and the light, like your tent wall, the one that's facing you will cast shadows at your feet. The one that's facing away from you will be invisible to you and also will cast no shadows from that light, because it's facing the light.

Link to comment
Share on other sites

I want a speaker to play when the player moves into a trigger entity. But I doesn't get the sound to play. I did:

  • a speaker
  • a brush, and then made it an trigger_once entity
  • set s_waitfortrigger to 1 for the speaker
  • target the speaker in the settings of the trigger_once entity.

What am I missing?

Link to comment
Share on other sites

Well, normally there should also be an arrow from the trigger to the speaker in this case, right? In one map, there is no arrow, in the other the arrow points from the speaker to somewhere in infinity. I tried with various sounds, none of which works.

Edited by Nico A.
Link to comment
Share on other sites

Okay, got it. Stupid mistake in my minimal map (put the argument "trigger" instead of "target"...). In the real map it worked after deleting the speaker and trigger and creating them anew.

Edited by Nico A.
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

    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 2 replies
    • 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.
      · 7 replies
    • 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
×
×
  • Create New...