Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

7 hours ago, thebigh said:

Hi all. I'm starting to learn to make my own custom models and I'm having trouble assigning a material to the model.

 

I have a .lwo file of a wooden plank under games/darkmod/fms/ringd/models/darkmod/props/plank1.lwo

Diffuse and normal textures are under ringd/models/darkmod/textures/plank1.tga and plank1_local.tga

The TGA files are not RLE compressed and are oriented to bottom left as always.

 

What do I need to add to the mission's .mtr file to get this to work?

You need to create a material that uses those diffuse and normal textures (can look at an existing plank material), the material name could be something like plank1. You then need to make sure that the name of the material assigned to the model surfaces in your modelling program is plank1.

  • Like 1
Link to comment
Share on other sites

Aha! That was it. I didn't have the material named right in blender.

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

After taking a few weeks break from mapping, I've upgraded to TDM 2.10 and went to work on my current WIP map.

For some reason, the performance on my map is terrible, and I'm not sure what it is. The FPS counter is all over the place and movement is really janky. It was fine before I upgraded (and regrettably, I didn't keep my old darkmod.cfg file).  Other maps seem to work fine though, so I think it's something to do with my map and TDM 2.10.

While playing, the following warning is spammed continuously in the console:

WARNING: idClipModel::Handle: clip model 0 on 'world (fffe) is not a collision or trace model

I'm wondering if this is cause?  Anyone know what this means? I don't remember seeing it before the upgrade. Also there are no errors or warnings with DMAP.

  • Like 1
Link to comment
Share on other sites

1 hour ago, Frost_Salamander said:

After taking a few weeks break from mapping, I've upgraded to TDM 2.10 and went to work on my current WIP map.

For some reason, the performance on my map is terrible, and I'm not sure what it is. The FPS counter is all over the place and movement is really janky. It was fine before I upgraded (and regrettably, I didn't keep my old darkmod.cfg file).  Other maps seem to work fine though, so I think it's something to do with my map and TDM 2.10.

While playing, the following warning is spammed continuously in the console:

WARNING: idClipModel::Handle: clip model 0 on 'world (fffe) is not a collision or trace model

I'm wondering if this is cause?  Anyone know what this means? I don't remember seeing it before the upgrade. Also there are no errors or warnings with DMAP.

If 2.10 is causing this, we should try to fix it.

That said, it may be as easy as deleting a corrupted brush somewhere.

Can you try splitting the map into halves and see which one produces the error after dmap? ( bisect diagnostics )

Alternately, you could try changing the dmap_compatibility cvar mode to an older version such as dmap_compatibility 208

 

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

18 minutes ago, nbohr1more said:

If 2.10 is causing this, we should try to fix it.

That said, it may be as easy as deleting a corrupted brush somewhere.

Can you try splitting the map into halves and see which one produces the error after dmap? ( bisect diagnostics )

Alternately, you could try changing the dmap_compatibility cvar mode to an older version such as dmap_compatibility 208

 

I tried 'dmap_compatibility 208' and it made no difference. Still get the warning and performance issues.

When you say 'split the map into halves' do you mean make a copy and literally remove half the map?  Might be a lot of work to do that, or is there some other way to do this?

Link to comment
Share on other sites

Yeah, that definitely sounds like a corrupted brush.

Do you keep backup copies of your map? It might be worth going back to older versions to find exactly when the error first showed up.

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

2 hours ago, thebigh said:

Yeah, that definitely sounds like a corrupted brush.

Do you keep backup copies of your map? It might be worth going back to older versions to find exactly when the error first showed up.

Yeah it's on Github so I can try previous commits.  

  • Like 1
Link to comment
Share on other sites

OK I figured out the problem. I found the commit which broke it, and looking at the diff I had the 'model' property set on a brush which obviously shouldn't have been there:

// entity 0
{
"classname" "worldspawn"
"model" "models/map_specific/scaled/square_base_stone01_scaled1.ase"
// primitive 0

 

  • Like 3
Link to comment
Share on other sites

  • 2 weeks later...

Two questions:

I have a golden skull with some rubies in its eye sockets. How can I make it so that the rubies drop down if the player steals the skull before they steal the rubies?

I have a lootable coin purse that has hide 1 and a script activates it (thru activateTargets) so it gets unhidden. The problem is that then the player can't loot it, it's unfrobable. I've tried to set the activator not to $player1 but that hasn't fixed it. Any idea what I can do here?

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

On 4/3/2022 at 7:45 PM, Spooks said:

I have a lootable coin purse that has hide 1 and a script activates it (thru activateTargets) so it gets unhidden. The problem is that then the player can't loot it, it's unfrobable. I've tried to set the activator not to $player1 but that hasn't fixed it. Any idea what I can do here?

If the purse is not attached to an AI, you can use the teleport entity (forgot its exact name, I am not typing this from my workstation) that teleports entities to its origin once activated.  Just place the purse entity somewhere players cannot reach it before the teleportation (it can also be put into worldspawn).

I used this method several times in past missions for items to be collected by the player and it works without problems.

 

EDIT: The entity name is "atdm:teleport"

Edited by JackFarmer
Link to comment
Share on other sites

Quote

I have a golden skull with some rubies in its eye sockets. How can I make it so that the rubies drop down if the player steals the skull before they steal the rubies?

Just speculating here, but maybe turning them into moveables would work. If that's not enough, you might need to toggle some forcefields, to initially keep them in place, and/or then to force them down.

Link to comment
Share on other sites

You could also use a script to move the rubies to ground level.

$ruby_left_eye.setOrigin( '512 512 24');
$ruby_right_eye.setOrigin( '520 512 24');

This has the benefit of being simple- just have the script fire when the skull is taken. The problem is you won't see the rubies falling.

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

With more scripting, you could see the fall. Example (not tested):

void fall()
{
    vector left_gem; // TO DO: right_gem too
    float offset = 1;
    float offset_multiplier = 2; // adjust to fake acceleration of gravity
    float tabletopheight = ....; //z value where you want gem to stop
    left_gem = $left_eye.getOrigin();
    //left_gem_x & _y will never change
    while (left_gem_z > tabletopheight)
    {
        left_gem_z = left_gem_z - offset;
        $left_eye.setOrigin(left_gem);
        offset *= offset_multiplier;
        sys.wait(0.1); // adjust this
    }
    left_gem_z = tabletopheight;
    $left_eye.setOrigin(left_gem);
    // add call to some sound effect here
}

 

Link to comment
Share on other sites

19 hours ago, Geep said:

Just speculating here, but maybe turning them into moveables would work. If that's not enough, you might need to toggle some forcefields, to initially keep them in place, and/or then to force them down.

This example is with a moveable skull and moveable rubies. The rubies start moving when hit by another moveable entity:

https://streamable.com/oepbh1

  • Like 1
Link to comment
Share on other sites

9 hours ago, JackFarmer said:

This example is with a moveable skull and moveable rubies. The rubies start moving when hit by another moveable entity:

That's why I was thinking a force field might be necessary.

Link to comment
Share on other sites

15 hours ago, Geep said:

That's why I was thinking a force field might be necessary.

This one works just with responses:

https://streamable.com/qck043

 

Set up:

1. Two rubies (just the model entites) placed in the skull at mission start and turn them frobable (static_rubies)

2. Two rubies (the moveable loot entities) in a blue room (teleporter_rubies)

3. Two atdm:teleport entities (left and right) with the same world coordinates as the two static rubies. These teleport entities must target the corresponding teleporter_rubies in the blue room.

4. Four frob responses on the skull:

----> a. remove static_ruby_left

----> b. remove static_ruby_right

----> c. trigger teleporter entity left

----> d. trigger teleporter entity right

5. Each of the static rubies needs a frob response to frob its corresponding teleporter_ruby in case the player frobs one or two of the rubies before he grabs the skull AND a second response to remove itself.

 

@Spooks

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

Cool effect! It's funny to see the rubies go skittering around. I'd worry about one of them bouncing somewhere inaccessible, but that would depend on usage.

On 4/5/2022 at 1:23 AM, Geep said:
left_gem_z = left_gem_z - offset;

Wouldn't this embed the ruby in the table on the last step? I haven't tested, but I think the following ought to align the ruby more accurately:

left_gem_z = max( left_gem_z - offset, tabletop_height + gem_radius );

I don't think there is a max function but it's easy enough to make one.

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

2 hours ago, thebigh said:

Wouldn't this embed the ruby in the table on the last step?

I think there wouldn't be embedding (other than transiently) during the while loop, but you are correct that the last two statements beyond the loop embed it halfway. Might be OK if that was a cushion or straw. Otherwise, taking the gem radius into account would be better. (That could just be baked into "tabletopheight".)

Edited by Geep
Link to comment
Share on other sites

Turns out the problem with the loot purse had to do with the entity, weirdly enough. atdm:loot_spilt_purse doesn't work, but atdm:moveable_loot_purse_belt with the other entity's model on top does work. Hell. I don't know. I had an inkling though and it's good I checked, that's some headache saved.

On 4/5/2022 at 8:46 PM, JackFarmer said:

This one works just with responses:

https://streamable.com/qck043

This one works just fine, thanks a bunch!

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

  • 2 weeks later...

It's hard to imagine a more newb question than this, but I don't believe I can't make any progress mapping anything beyond a few rooms if I don't understand this (and reading the wiki doesn't make it clear to me): what's the correct folder structure for a darkmod mission I'm making, and for possible custom assets? I mean, looking at Youtube tutorials, I see almost everyone has the .map inside the main darkmod/maps/whatever.map, and that's what I use, because it works when dmapping, although I think NeonsStyle has the one he shows in his tutorial inside the fms folder, eg.: darkmod/fms/mymission/mymap.map. But if I do that, I can't even dmap.

Now, reading the A-Z guide, if I understand it correctly, you use the fms folder to store your custom assets not present in the main darkmod root folder? Is that what the Game/Project Setup is for? That doesn't seem to work for me, though (see below.)

In practice, I don't care much about that because I can test the mission just fine and I'm probably going to use default assets anyway, but I model from time to time so I tried using custom models (just a simple cube with a custom texture as a test) and I can't make it work. The cube appears in DR, even in the same scale and dimensions (which susprised me), but it's just nodraw (not "black" as I read in some tutorials.) This is what I did: I found a Blender plug-in to convert models into .ase and I can get that to work, but then the cube shows with no material or texture (inside the game, it simply isn't rendered.) I know I need to change the bitmap line, but I have no idea what to write in there because, quite honestly, I don't understand the folder system or where I need to put things in the first place. I thought I could put my custom .ase file inside the fms/mymission/models folder but then the .ase doesn't load in the Models Viewer in the DR, so I had to save it, like my .map, inside the main TDM folder (e.g., darkmod/models/custom.ase). Then it does show but, well, no texture... (see attachment) By the way, that's in a new, clean TDM and DR install.

So, where do I need to put the .dds, .tga, and .ase files then? And how should I change the *bitmap line? I have tried looking inside various pk4 files for TDM models and their .ase files but that didn't help much.

(Being a custom model and material, I assume I would also need to write a .def for the cubes properties? But for now, I'd like to at least be able to see the textured cube in the editor.)

Here's how the .ase bitmap part looks like when exported and stored inside darkmod/models:

Quote

*BITMAP "C:\Users\Diego\Desktop\obj export test\..\..\..\..\darkmod\fms\mymap\dds\textures\wood_cube.dds"                       
                          
                                 

Obviously, that won't work at all (in fact, I don't know why that's so long or why it points to the Desktop, that's where I saved the .blend file, not the .dds.) But, anyway, what should I write in there? The tutorials in the wiki seem a bit old and makes references to D3 and a folder structure and textures from that game, so I'm confused.

Thank you. I know there are many questions here, but I have read and watched almost every tutorial, and I still don't get it.

darkmod cube test.jpg

Link to comment
Share on other sites

20 minutes ago, xlm said:

and that's what I use, because it works when dmapping, although I think NeonsStyle has the one he shows in his tutorial inside the fms folder, eg.: darkmod/fms/mymission/mymap.map. But if I do that, I can't even dmap.

I'm heading out the door, but I can probably answer this one quick.

I use the same folder structure as you quoted for Neon's Style, except it must be ...fms/mymission/maps/mymission.map

and under fms/mymission/, make sure you have darkmod.txt, readme.txt, and all other folders you might make.

Link to comment
Share on other sites

To follow up. Do make sure you use the same name for your FM folder, .map file, and (if you use it) the first line of your startingmap.txt

If I were you, I'd postpone custom model efforts until you can arrange your folders to reliably get game selection, dmapping, and mapping to work. If those are working correctly, then you should be able in DR's Game/Project Setup to see a list of available FMs and let you select yours. If you don't have Project Setup pointing to the right place, then any custom materials defined in your FM will often appear incorrectly in DR, e.g. as nodraws. Also, sometimes DR generates files, and those could end up in the wrong place too.

  • Like 1
Link to comment
Share on other sites

I agree that the first page of the A to Z tutorial, containing the section on File Structure, could use some clarification and freshening. (I'll see what I can do.)

Someone else who is better with blender should address your export issues. Probably involves a materials (.mtr) file.

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  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • 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
×
×
  • Create New...