Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

This isn't really a question, thus I hope I can be forgiven for posting it here. I'd like to kindly ask a little favor, if anyone has a moment to take a look at it.

 

Could you please import the model file "models/darkmod/weapons/broadhead.lwo" into Blender, then attach the *.blend file here for me to download? I don't know in which pk4 that file is exactly, and I also don't know if I have a working lwo importer. Thank you.

 

If anyone is curious as to why I need this: I'm struggling for months to get a custom arrow model working. No matter how I export the lwo file of my model, TheDarkMod refuses to accept it. I am either told that the collision model could not be loaded, either the engine instantly crashes without clarifying exactly why. I'm hoping a blend file showing the exact setup of the vanilla arrow model may help me out, especially as far as the setup and texture of the collision mesh is concerned.

 

[EDIT] Never mind: I found it and managed to import it successfully.

Edited by MirceaKitsune
Link to comment
Share on other sites

Failure reading map file:

Failed parsing entity 7253:
Parsed invalid value '}' for key 'making it fast as seagull. We emerged in a
 hellish land of forever winter and now I have no choice but do my best to end this voyage.'

I have this message pop up when trying to load map in DR, it seems I messed up with atdm:gui_message. How can I remove this entity from map file if DR wont load it?

 

 

EDIT: wait I can open .map file in script editor, but still it is probably a bug if you can save map with some unreadable values. Heres how this entity is fully described:

// entity 7253
{
"classname" "atdm:gui_message"
"name" "atdm_gui_message_3"
"origin" "-11504 11840 -2176"
"lines" "6"
"show" "10"
"text" "After a month without sunlight I was expecting tropical shores of the heathen. Little I knew this ship was traveling downstream so called "underwater rivers" making it fast as seagull. We emerged in a hellish land of forever winter and now I have no choice but do my best to end this voyage."
}
Edited by ERH+

S2wtMNl.gif

Link to comment
Share on other sites

Try removing the quotation marks around "underwater rivers" (use singles instead). Quotation marks set the end of the text, so that's probably where the confusion is happening.

Link to comment
Share on other sites

My thief shall use his brains because I have significant problems with the one belonging with me.

 

Thus I have added puzzle #2.

 

It consists of several "square" brushes I have converted into func statics. When frobbed, they shall rotate around the center in 90° steps.

 

post-37993-0-76953600-1516964896_thumb.jpg

 

I have two problems:

 

1. I do not know how to create an entity which allows rotating in steps. I understand that the entity "func rotating" should do the trick, but the inherited properties are not sufficient for my purposes. The basic door mover would also be ok, but it does not include the property "invert_on_trigger" which would enable one-directional rotation. What can I do about this?

 

2. When all brushes have been rotated to the correct positions, a door shall open automatically. Is there a way to do this with the editor?

 

As always, any help will be highly appreciated.

Link to comment
Share on other sites

1. Are you sure you don't have a "rotate" spawnarg or something similar? I am currently not at my home computer, so I connot look driectly. I will do that as soon as I come home. You can also try to simply give the entity a spawnarg by typing it in and see if it still works. In some cases not all working spawnargs are listed, when you use the "Add Spawnarg" function.

 

2. This is almost certainly only possible via script. In this case it should be fairly easy. The only other option I could think of, would be the Objectives Editor, but I am not sure if "rotation of an entity" is a possible condition in that. Again, I will have a look as soon as I come home.

Link to comment
Share on other sites

I just checked and noticed that "func_rotating" is not what you are looking for. This entity type is meant for entities that are continually rotating. Also, I could not find any arg in the Objectives editor that would enable you to do what you want. The easiest way would be to create a mover-entity with a frob_action_script that will rotate the mover 90 degrees, then check for the current angle on all three brushes and if all three match the angle you want, to open the door. As far as I can tell, this would be the only way to do what you want.

  • Like 1
Link to comment
Share on other sites

You should look at atdm:combination_lock and atdm:numberwheel behavior (they have specific scriptobject that should suit your puzzle), but it looks like lock is spawning its wheels by default and I don't know how to prevent it and instead attach custom one. Also wheels operate on 1-10 scale (36 degrees/step).

S2wtMNl.gif

Link to comment
Share on other sites

Hello Destined & ERH+,

 

Many thanks for your clarifications and help. There is just one word to describe the passion and dedication of this community: outstanding. I wished for a way I could help you as well.

 

I will check ERH+'s map (many thanks for your effort!) and see whether I can learn from it. @ERH: Do you mind if I get back to you with a PM in case I have questions?

Edited by JackFarmer
Link to comment
Share on other sites

@JackFarmer of course you can!

 

@Destined func_rotating works with speed = X degrees/sec , so you can turn it on and off for a specific period of time by trigger_relay with delay set.

Trigger_sequencer is the key element. You can set any number of steps in sequence and it will pass its own activation to different targets:

'target1'='nothing' //waiting for 45degrees step

'target2'='nothing' //90

'target3'='nothing' //135

'target4'='nothing' //180

'target5'='turn lock component on' //225

'target6'='turn lock component off' //270

'target7'='nothing' //315

'target8'='nothing' //360-0

 

one thing that can go wrong in such machine is triggering it more than once before parts finish first move, so you need 'interruptable'='0' or target_set_frobable on a lever. Also player could block movement by standing on one of the moving parts so better to make them nosolid/ cover with clip.

Edited by ERH+

S2wtMNl.gif

Link to comment
Share on other sites

Ah, ok I think I understand the basic mechanism. Did not know the trigger_sequencer before.

I will still try to do it via script. Just as an exercise for myself. However, I am currently failing at the one of the first steps: I cannot get the rotateOnce function running, that would be needed to rotate the block by 90°. I get the error "Type mismatch on Parm1 of call to 'rotateteTo'", so I assume that I do not give the script the right kind of rotation matrix? Maybe if someone with more scripting experience could help me out here, I would try to get rest working by myself.

Link to comment
Share on other sites

Just noticed that statue that already is in proper position doesn't count as in proper position because it triggers set_objective_component_state when it moves to that position (player may be confused and not trying to make a full rotation) - so you need some trigger_once enabling it.

S2wtMNl.gif

Link to comment
Share on other sites

guis/tdm_message_no_art.gui shows text without background parchment - is there a way to add border or shadow to letters?

// A GUI for showing little messages to the player, centre screen, no background art.

windowDef parchment
{
    rect        120,80,640,480
    nocursor   1
  matcolor  0,0,0,0

  windowDef message
  {
    rect    0,0,400,400
    visible    1
    text    ""
    forecolor  1,1,1,0
    textscale  0.31
    textalign  1          // 0 - left, 1 - center
    font    "fonts/stone"
    nocursor   1
  }

  windowDef open
  {

    onTime 0
    {
      if ( "gui::msg_lines" == 2 )
      {
        transition "message::rect" "0, 0, 185, 1000" "10, 59, 185, 1000" "1"
      }
      if ( "gui::msg_lines" == 3 )
      {
        transition "message::rect" "0, 0, 185, 1000" "10, 52, 185, 1000" "1"
      }
      if ( "gui::msg_lines" == 4 )
      {
        transition "message::rect" "0, 0, 185, 1000" "10, 45, 185, 1000" "1"
      }
      if ( "gui::msg_lines" == 5 )
      {
        transition "message::rect" "0, 0, 185, 1000" "10, 38, 185, 1000" "1"
      }
      if ( "gui::msg_lines" == 6 )
      {
        transition "message::rect" "0, 0, 185, 1000" "10, 31, 185, 1000" "1";
      }
      if ( "gui::msg_lines" == 7 )
      {
        transition "message::rect" "0, 0, 185, 1000" "10, 24, 185, 1000" "1"
      }

      set "message::text" "gui::msg_text";

      transition "message::forecolor" "1 1 1 0" "1 1 1 1"  "1000";
    }
  }

  // called when the time is over
  onNamedEvent doFadeOut
  {
    transition "message::forecolor" "1 1 1 1" "1 1 1 0" "1000";
  }
}

I guess I could add same gui but with black letters and slightly scaled up, but how it should be done within one gui file?

Edited by ERH+

S2wtMNl.gif

Link to comment
Share on other sites

Sometimes it is possible to use a .tga file to display a thin grey border around a transparent gui box.
Perhaps try to include some remnants such as:

windowDef Desktop {
  rect         0, 0, 640, 480 <--- standard
  bordersize   3 <--- what it says
  bordercolor  1, 1, 1, 1 <--- black border. Maybe...
  backcolor    0, 0. 0, 0 <--- perhaps leave out
  visible      1 <--- yes
  windowDef Message {
    rect         10, 10, 614, 40 <--- perhaps need to offset, as GUI position accounts for borders
    bordersize   1 <--- same as before
    bordercolor  1, 0, 0, 1 <--- 50% grey (?) I forget if it's RGBA
    backcolor    0, 0, 0, 0 <--- self explanatory
    text         "whatever" <--- message
    textscale    0.5 <--- bigger/smaller
    font         "fonts/shadow_stone"  <--- custom font file
    textalign    1 <--- 0, left, 1, centre, 2, right.
    forecolor    1, 1, 1, 1 <--- self explanatory
  }
}

Then the rest.

 

If it's a custom GUI, then perhaps it can be tested using console: testgui custom.gui

I never figured out how the font files worked and why there are duplicate .dat (renamed .ttf font file archives) and .dds for fonts (suggests such things as specular and normals).

Perhaps it would be worth playing with different maps in a font.dds in order to present emboss, deboss and/or shadow to the lettering.

/* but that would require a light-source on the gui, which is not possible... so the .dds, if the font.dds is not simply for compression, would be for in-game mapping only.
(I've seen the font.dds but never seen them called once anywhere...) */

In the example above, you are using fonts/stone (stone print serif) - customising this font would provide a solution without having to complicate things by messing with gui files.

Rip it open in a font editor, pull it down and to the right a few px, chop that part off and pull it out a touch further - you have a hard shadow that might not interfere with legibility or kerning / tracking / leading.

Merely a few graphical tweaks to the font itself using an easily findable free font editor, or finding a suitable CC licensed font online might be easier.

Drop shadows can look tacky and require some kind of dithering, which is something I never tested with TDM font set... Since it's a .ttf, it would be similar to .gif pattern dithering for any shadow, perhaps. Idk.

(also, even in such things as source engine, text in "cutscenes" (eg, intro) is usually "painted" onto a transparent mesh that the camera will pan past before it is destroyed when no longer necessary - or not. It is easier... Splinter Cell: Conviction, iirc, used no shadow lighting to paint the messages onto the gameworld, which was a really neat effect).

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

I'm struggling for months to get a custom arrow model working. No matter how I export the lwo file of my model, TheDarkMod refuses to accept it. I am either told that the collision model could not be loaded, either the engine instantly crashes without clarifying exactly why. I'm hoping a blend file showing the exact setup of the vanilla arrow model may help me out, especially as far as the setup and texture of the collision mesh is concerned.

 

Jeez, you are still stuck on this one? It was the glass arrow and bow, right?

 

I thought you had reverse engineered the broadhead to help make your model, already..!

 

 

If I remember, it was something to do with some model info not being in the first layer and so was disregarded - hopefully modifying the original will be easier than creating from new.

At least to show how it is made if it is not possible to steal it and remake.

 

It appeared in DR after the materials file was corrected (?) and you had followed (loosely) the mission filestructure convention in wiki, despite putting it in the props weapons folder rather than player weapons folder?

There was the issue with not inheriting from atdm because of atdmu mod you were making... def_ammo and inv_weapon_name to set, then there was the atdmu:attachment_whateveritwas, def_attach... def_projectile on the glass bow that had not inherited some base definition from the game...

 

But all was useless as the model would not appear.

The collision shader/model was reduced to minimal faces, no shadows from the model.

 

Did you ever try the spawnarg, "inline 1" for the model? (force face to triangle)

Or to use .ase instead of .lwo?

 

I really thought you had taken the base arrow and simply re-skinned and restructured it before export and tweaking the definitions and ammo count and stuff.

(steal like an artist)

 

Hope you get it fixed, finally - I would have stolen the base model and changed it first thing ;p

Brave.

 

If someone sends me (or requests) a 3D file in a format I prefer to not use, using this fast and accurate site:

 

 

 

http://www.greentoken.de/onlineconv/

 

 

 

 

I convert the model to a format with which I am more familiar (and use software with which I am more fluent. It also works great for pepakura import).

Just don't paint the model. Barebones only. I don't think it works with zbrush format (must export from there as .obj or maya to convert for, eg, 3ds or blender)

 

If you are unsure of your lightwave import/export as being reliable, perhaps converting the .lwo to .blender to work with will be useful for you.

 

GLHF.

 

 

 

Edited by teh_saccade
Link to comment
Share on other sites

Jeez, you are still stuck on this one? It was the glass arrow and bow, right?

 

I thought you had reverse engineered the broadhead to help make your model, already..!

 

I finally fixed it since. My issues were due to three things: You must merge all meshes into a single object with multiple materials for the Blender LWO exporter to recognize each, the meshes have to be triangulated upon export, and the collision mesh must indeed be a convex hull (no inward pointing faces) otherwise the engine refuses to recognize it.

Link to comment
Share on other sites

 

I finally fixed it since. My issues were due to three things: You must merge all meshes into a single object with multiple materials for the Blender LWO exporter to recognize each, the meshes have to be triangulated upon export, and the collision mesh must indeed be a convex hull (no inward pointing faces) otherwise the engine refuses to recognize it.

 

Those three things appear decent additions to the wiki documentation / modelling tutorial(s).

I don't recall if any of them are stated explicitly.

Link to comment
Share on other sites

I'm now back to troubleshooting my mission while I take a little creative break. There's quite a list of annyoing issues I'm having, but I will try to solve them one by one to not get overwhelmed.

 

I've got two small ones on my mind that have been bugging me lately.

 

1. How to make an AI "hold a pose", specifically I want an AI to be in a kneeling position until I trigger him to move to another path node. The closest I've gotten so far is to have him repeat the animation over and over like he's doing lunges on leg day, not quite the effect I was going for.

 

2. How to trigger the player say something after closing a readable. I know how to make him say something after picking something up with a trigger once -> atdm:voice thingy, but when I target the readable instead of the item nothing happens. I know that you can make an objective trigger after closing (or only when opening?) a readable, so I feel like it must be possible on voice as well?

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

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...