Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

There are so few female AI character heads in TDM. It sure would be helpful to my FM in progress to have more. Besides what's in the stock distribution now, back in In 2015, Bob Necro created more variation for female characters:

·         black wench

·         older white wench

·         old noblewoman, based on Dame Judi Dench.

There's some remnant of the old noblewoman in the 2.07 distribution, but shaders are missing.

For these 3, Bob provided a link to the required diffuse and normal images (at least in .png format) at http://goo.gl/photos/QzUvicYW8BqGQmfo8

Anyone know if there is some problem, such as changes in the model skel, that kept these from being in the core now?
Link to comment
Share on other sites

  • 2 weeks later...

To put my question to a point: is there some way to delete inherited properties in a .def file? Background:

I'm working on the last item in 0005184: Issues with new manbeast/werebeast/zombie assets (SVN 2.08), which is that the new clothed zombie has 4 different copy_joint spawnargs, which results in 2 console warnings per clothed zombie at map start. From what I've seen, these spawnargs are used to "keep the neck attached to the shoulders", and the standard is 2 spawnargs per AI:

- regular AIs, whose head is a separate entity, use "copy_joint Head" "headcontrol" and "copy_joint Neck" "neckcontrol"
- zombie AIs, whose head are part of the body, use "copy_joint headcontrol" "headcontrol" and "copy_joint neckcontrol" "neckcontrol"

The clothed zombie is some kind of hybrid (zombie with a head as a separate entity), as it inherits from zombie AIs but needs the spawnargs used by regular AIs, which brings the total to 4 copy_joint spawnargs. The zombie version of the spawnargs isn't needed, but it isn't enough to just set them to "-" because the console complains about the spawnargs themselves

  • Like 1
Link to comment
Share on other sites

32 minutes ago, ERH+ said:

Can I mimic a keyboard entry by any script command?

I would like to make player walk forward, don't want to use any modifications of origin +-1, because he would end up inside a wall.

If you only want this because the player shouldn't clip into a wall, you could try a force field. Otherwise I believe Geep has figured out how to call keyboard events (putting a weapon away) in Air Pocket.

  • Like 1
Link to comment
Share on other sites

On 6/20/2020 at 3:50 PM, Dragofer said:

To put my question to a point: is there some way to delete inherited properties in a .def file? Background:

I'm working on the last item in 0005184: Issues with new manbeast/werebeast/zombie assets (SVN 2.08), which is that the new clothed zombie has 4 different copy_joint spawnargs, which results in 2 console warnings per clothed zombie at map start. From what I've seen, these spawnargs are used to "keep the neck attached to the shoulders", and the standard is 2 spawnargs per AI:

- regular AIs, whose head is a separate entity, use "copy_joint Head" "headcontrol" and "copy_joint Neck" "neckcontrol"
- zombie AIs, whose head are part of the body, use "copy_joint headcontrol" "headcontrol" and "copy_joint neckcontrol" "neckcontrol"

The clothed zombie is some kind of hybrid (zombie with a head as a separate entity), as it inherits from zombie AIs but needs the spawnargs used by regular AIs, which brings the total to 4 copy_joint spawnargs. The zombie version of the spawnargs isn't needed, but it isn't enough to just set them to "-" because the console complains about the spawnargs themselves

I don't think there is a way to delete inherited properties. I fear you would have to go back in the inherited files and start a new "inheritance branch" from the first entry that does not have the spawnargs that you want to get rid of. Instead of creating a whole new branch, you could also just copy/paste all the spawnargs you need from the inherited def files and create a new def file from scratch.

  • Like 1
Link to comment
Share on other sites

17 hours ago, ERH+ said:

Can I mimic a keyboard entry by any script command?

I would like to make player walk forward, don't want to use any modifications of origin +-1, because he would end up inside a wall.

First personally i'm not a fan of those situations where games override player commands, but that is me.  About the question itself, afaik there's no way in script to simulate a button press, don't know what you are trying to do but couldn't you just push the player forward with a invisible brush? It will not "walk" but glide but at lest would move forward. 

  • Like 1
Link to comment
Share on other sites

I don't think the disable-weapons approach is so applicable here. The invisible brush method sounds reasonable.

Speculatively, a variant would be to have the player stand on the brush, possibly in the form of an elevator with horizontal motion. But you'd have to keep him from stepping off the platform. Could perhaps be done passively (playerclip box) or actively (run a script that frequently forces the player back to the elevator platform's XY origin).

Link to comment
Share on other sites

OK, here's 2 stupid questions --

1) In DR, I'd like to rotate an object (prefab, model, brush) so that it is EXACTLY 45 degrees in the XY plane with respect to world coordinates. If I use the DR rotate tool (with coordinates & size info turned off so they don't interfere with seeing the angle) and drag the mouse far from the rotation center to get finer control, and fiddle around and fiddle around, I usually still can't get EXACTLY 45 degrees. And once I release the mouse, info about the angle WRT world is seemingly irretrievably lost to me. Really, what I ideally want is to just go somewhere, type in "45", and be done with it.

2) I occasionally switch the mouse to the left side to give my right hand a break. In Windows, I reverse the mouse buttons. This doesn't affect TDM, so I use the game control settings to interchange the mouse buttons for frob and action events. BUT doing that doesn't make the main menu use the right mouse button for selections! I think that's a UI bug, but is there a workaround, some console command I can make sticky?

Link to comment
Share on other sites

@HMart, thanks. Don't know how I overlooked (1). It will help a lot, even though it's only relative rotations. (Still wouldn't mind an absolute tool, along these lines:

Select a flat surface

In a dialog, see the 3 angles of that surface WRT to the world X, Y, Z planes

You can also set/step the angles; Before you change angles, you can toggle checkboxes: rotate entire entity; rotate entire group)

2) No, talking about TDM itself, main GUI menus.

Link to comment
Share on other sites

Is there any way to make a door lock itself during runtime? I tried using an atdm:target_changelockstate but it seems that one only unlocks doors. It has the spawnarg "unlock" but from what I can tell does not respond to "lock", and "unlock 0" doesn't do it either. I also tried going to the S/R system by setting spawnarg "locked" to "1" on _self to no avail. Ideas?

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

On 6/20/2020 at 3:50 PM, Dragofer said:

To put my question to a point: is there some way to delete inherited properties in a .def file? Background:

I'm working on the last item in 0005184: Issues with new manbeast/werebeast/zombie assets (SVN 2.08), which is that the new clothed zombie has 4 different copy_joint spawnargs, which results in 2 console warnings per clothed zombie at map start. From what I've seen, these spawnargs are used to "keep the neck attached to the shoulders", and the standard is 2 spawnargs per AI:

- regular AIs, whose head is a separate entity, use "copy_joint Head" "headcontrol" and "copy_joint Neck" "neckcontrol"
- zombie AIs, whose head are part of the body, use "copy_joint headcontrol" "headcontrol" and "copy_joint neckcontrol" "neckcontrol"

The clothed zombie is some kind of hybrid (zombie with a head as a separate entity), as it inherits from zombie AIs but needs the spawnargs used by regular AIs, which brings the total to 4 copy_joint spawnargs. The zombie version of the spawnargs isn't needed, but it isn't enough to just set them to "-" because the console complains about the spawnargs themselves

You should be able to overwrite them via "copy_joint Head" "-" etc. Besides that, if there are only console warnings and everything is working fine, you could probably ignore these.

On 6/24/2020 at 2:57 PM, Geep said:

OK, here's 2 stupid questions --

1) In DR, I'd like to rotate an object (prefab, model, brush) so that it is EXACTLY 45 degrees in the XY plane with respect to world coordinates. If I use the DR rotate tool (with coordinates & size info turned off so they don't interfere with seeing the angle) and drag the mouse far from the rotation center to get finer control, and fiddle around and fiddle around, I usually still can't get EXACTLY 45 degrees. And once I release the mouse, info about the angle WRT world is seemingly irretrievably lost to me. Really, what I ideally want is to just go somewhere, type in "45", and be done with it.

There is a modifier key for this, like shift or so, that lets you rotate in 5° steps iirc.

10 hours ago, Bienie said:

Is there any way to make a door lock itself during runtime? I tried using an atdm:target_changelockstate but it seems that one only unlocks doors. It has the spawnarg "unlock" but from what I can tell does not respond to "lock", and "unlock 0" doesn't do it either. I also tried going to the S/R system by setting spawnarg "locked" to "1" on _self to no avail. Ideas?

You can do this via script. There is an entity allowing you to run object scripts on entities. In this case it is Lock (written with capital letter at the beginning iirc, if you get an console error stating the funciton is unknown, try lower letter). The spawnarg "locked" is only read upon spawning the door like most spawnargs (hence their name ;) ).

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

There's probably a script command that works, but the easiest failsafe thing I'd try is just make a key that unlocks the door, put it in a blue room, and then script the key to frob the door.

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

10 minutes ago, Obsttorte said:

You should be able to overwrite them via "copy_joint Head" "-" etc. Besides that, if there are only console warnings and everything is working fine, you could probably ignore these.

The problem is actually with the name of the spawnarg: when the spawnarg is “copy_joint Bogus” the game tries to find a joint called Bogus in vain and then prints a console warning about the nonexistent joint - the same happens here with the 2 nonexistent joints “headcontrol” and “neckcontrol”.

Should probably see if the one-piece zombies even need to have those spawnargs to “keep the head attached” . I’ll have 2.09’s beta to check if there are any problems with deleting them.

Link to comment
Share on other sites

15 hours ago, Obsttorte said:

You should be able to overwrite them via "copy_joint Head" "-" etc. Besides that, if there are only console warnings and everything is working fine, you could probably ignore these.

There is a modifier key for this, like shift or so, that lets you rotate in 5° steps iirc.

You can do this via script. There is an entity allowing you to run object scripts on entities. In this case it is Lock (written with capital letter at the beginning iirc, if you get an console error stating the funciton is unknown, try lower letter). The spawnarg "locked" is only read upon spawning the door like most spawnargs (hence their name ;) ).

I tried adding an atdm:target_call_scriptfunction and adding the spawnarg "Call" "Lock". The console tells me "Target 'atdm_target_callscriptfunction_1' specifies non-existent scriptfunction 'Lock'!" when it gets triggered. Should I be using the object function variant instead or is the spawnarg wrong? It seemed to recognize "Call"...

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

This is how I've gotten door locking to work, using scripting.

Write a script function that locks the door, something like

void lockMyDoor()
{
    $myDoor.Lock();
}

where 'myDoor' is the name of your door entity.

Then on your atdm:target_call_scriptfunction you need a spawnarg "call" "lockMyDoor" (I've always used lowercase "call").

 

Edit - fixed typo in the spawnarg

Edited by joebarnin
fixed typo
  • Like 3
Link to comment
Share on other sites

21 hours ago, joebarnin said:

This is how I've gotten door locking to work, using scripting.

Write a script function that locks the door, something like


void lockMyDoor()
{
    $myDoor.Lock();
}

where 'myDoor' is the name of your door entity.

Then on your atdm:target_call_scriptfunction you need a spawnarg "call" "lockMyDoor" (I've always used lowercase "call").

 

Edit - fixed typo in the spawnarg

Thanks! That worked a charm!

 

I'm also struggling with making AI use switch lights, again. I had this same problem in CoS 1 and never found a fix. I have electric lights that are controlled by atdm:mover_button entities. When I turn them off in game the AI just mutter that they can't relight it, eventhough I have set "canOperateSwitchLights" "1", and "chanceOperateSwitchLights" "1" to take out the randomness. It seems they don't operate it because they can't tell where the switch is? Is there a way to tell the AI to operate a specific atdm:mover_button entity to relight this particular light? Or the targeting of the light from the button should be enough in that regard?

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

11 hours ago, Bienie said:

When I turn them off in game the AI just mutter that they can't relight it, eventhough I have set "canOperateSwitchLights" "1", and "chanceOperateSwitchLights" "1" to take out the randomness.

I think you need spawnargs on both the AI and the light. "ShouldBeOn" is one that's needed on the light.

Link to comment
Share on other sites

19 minutes ago, Dragofer said:

I think you need spawnargs on both the AI and the light. "ShouldBeOn" is one that's needed on the light.

Wow 🤦‍♂️ they don't call it Newbie DarkRadiant Questions for nothing... thank you, that makes them relight it!

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

I've got a flame, say a campfire. I want the player to take damage if they stand in the middle of it, so I create a trigger_hurt above the flame. That works fine. But if you douse the flame with a water arrow, I want to turn off the trigger_hurt (and likewise, if it's relit with a fire arrow, turn the trigger_hurt back on). How do I do that? 

Link to comment
Share on other sites

2 hours ago, joebarnin said:

I've got a flame, say a campfire. I want the player to take damage if they stand in the middle of it, so I create a trigger_hurt above the flame. That works fine. But if you douse the flame with a water arrow, I want to turn off the trigger_hurt (and likewise, if it's relit with a fire arrow, turn the trigger_hurt back on). How do I do that? 

You'd want to add 2 extra responses to the flame: one towards water and one towards fire, both have effects to trigger the trigger_hurt, deactivate the response to their own element and activate the response to the other element. And let the response to fire start inactive at map start. If that doesn't work you may need to change the effects to call a script.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

On 7/2/2020 at 4:04 PM, Dragofer said:

You'd want to add 2 extra responses to the flame: one towards water and one towards fire, both have effects to trigger the trigger_hurt, deactivate the response to their own element and activate the response to the other element. And let the response to fire start inactive at map start. If that doesn't work you may need to change the effects to call a script.

I gave that a try, and it didn't work. The reason: the flame already has a response to water (and fire) in its base class, and those inherited responses already do the appropriate deactivation. So adding a response of the same type doesn't work, since that type was deactivated by the existing response.

However, there is a solution, and it's pretty simple. The existing (inherited) responses on flames call script functions (response_extinguish and response_ignite) in tdm_lights.script. Those methods both activate all of the targets on the flame. So all I have to do is set this spawnarg on the flame: "target" "trigger_hurt_1" (or whatever my trigger_hurt entity is called). That toggles the trigger_hurt off/on as appropriate. Easy peasy.

  • Like 1
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...