Jump to content

Newbie DarkRadiant Questions


demagogue
 Share

Recommended Posts

I think I understand now. The LOD code swaps the modelDef, so anything you define in your custom modelDef is being lost on the LOD switch. Are there alternative ways to replace anims, such as spawnargs? Attachments can do it I think. Or you could add more modelDefs. Or just disable LOD for that one AI, as you have done.

 

The best way is probably to use a dummy def_attach object. Since the object stays def_attached to the AI regardless of LOD level, the animation will be consistently replaced. These objects have the benefit of being able to be 'dropped' at a certain alert level, if you want AI to behave normally once alerted. This is the default one for leaning you can use as a guide:

 

entityDef atdm:animation_replace_lean {

"inherit" "atdm:prop_base"

"editor_usage" "Used to make AI lean back against a surface while idle. Put AI 25 units away from wall/surface. AI will stop leaning if alerted."

"model" "models/darkmod/misc/system/empty.lwo"

"joint" "RightHand"

 

"replace_anim_idle" "lean_loop"

 

"origin" "0 0 0"

"angles" "0 0 0"

"remove" "0"

// to ensure AI stops leaning if they are disturbed

"unbindOnalertIndex" "2"

 

}

 

 

Speaking of the writing animation, what does I need to do in order to spawn a quill into his hand (similarly to how the flint is spawned and then removed when the AI goes to relight an extinguished flame)?

 

That's done by a frame command. If you want to enable AI writing, the best way to do it is to attach prop quill atdm:moveable_quill_prop to hand_r

Link to comment
Share on other sites

If you want to enable AI writing, the best way to do it is to attach prop quill atdm:moveable_quill_prop to hand_r

 

Yes, but simply adding spawnargs def_attach_2 and pos_attach_2 will have the AI hold his quill permanently (or at least, until the AI engages in combat). What I would ideally like is that the quill prop only appears when the writing animation is playing. This character is not designed simply to sit and write, but also has a patrol where he stops and "ponders" what he is writing. Is it not easier to have the animation amended to have the quill spawn, similar to how the relight animation has the flint appear and then disappear?

 

On a similar note, I am still getting nowhere with raising the AI up off the ground as he pivots to sit down. Could one of the coders kindly address my query concerning the now-seemingly defunct 'Z' axis component of the spawnarg: "sitting_turn_pivot?" The monsterclip method suggested by Moonbo has (as noted on prev. page) had the effect where the AI moves closer to the desk, but remains at the same Z height; which doesn't solve my problem.

 

Moreover, I have been getting a strange error message concerning this patrol route. The one I have listed below is one of several that directly relate to the new desk models I created: WARNING:Invalid character in pin pattern - on entity Desk_Drawer3, using default: 2

 

Also, something I noticed when going through the MD5 viewer was that eat_righthand has the character use his left hand (this is seen in viewer, I haven't used this in my WIP - so I can't comment on the situation in-game).

 

Out of curiosity, what lights must light entities be in order to trigger the different relight animations? I have an oil lamp on the one desk (as seen in Dunedain19's Stuff) and the AI uses the relight_high animation, when the relight_med would look more realistic - and I am wondering if this can be triggered manually?

Edited by Dunedain19
Link to comment
Share on other sites

The quill is designed to be detached whenever the a is alerted enough to stand up. But if you want to have the ai only write for a short amount of time, that's more difficult. You'd have to make a frame command in the animation itself, similar to the relighting animation. Not sure if it would work with the default prop quill or not.

 

Also, the writing animation is quite short when layer only once, so there's not much time to attach/detach it.

Link to comment
Share on other sites

Nothing's changed with sitting_turn_pivot. Have you proven to yourself that it works in 2.02, rather than relying on your memory of it?

 

The drawer complains because it's probably a door. You can ignore the warning, or set the pin pattern to something other than '-'. Is the drawer locked?

 

All lights except the generic 'light' entity should invoke relighting if needed. If the origin of the electric light is 66 or higher off the floor where the AI has to stand to relight it, he'll use the 'high' anim. If it's below 30, he'll use the 'low' anim. Otherwise he'll use the 'mid' anim.

 

I can't comment on the eat_righthand anim.

 

Edit: the relight anim chosen is determined by the code; there's no way to override it.

Link to comment
Share on other sites

You'd have to make a frame command in the animation itself, similar to the relighting animation. Not sure if it would work with the default prop quill or not.

 

Also, the writing animation is quite short when layer only once, so there's not much time to attach/detach it.

 

With this in mind, how would you suggest the issue be solved, Springheel, as I have no experience in working with animations?

 

The writing scene in question becomes a core part of the mission design, and I have a larger idea in mind where the readable that the AI is "writing" is replaced by subsequent iterations that occur after the AI completes his patrol (which the player can read) until the document is complete. At this point, the idea is that the document (an open scroll) is transformed into a sealed scroll which the AI then picks up, carrying it in their hand until arriving in a different location, where the document is deposited.

 

@grayman, how would I go about "reverting" TDM to 2.02 in order to confirm this? Also, thanks for the info about light entities and about the pin issue. The values are set to "-" because I haven't decided which are/aren't locked.

Edited by Dunedain19
Link to comment
Share on other sites

With this in mind, how would you suggest the issue be solved, Springheel, as I have no experience in working with animations?

You'll have to refresh my memory about exactly what you're trying to accomplish. When exactly does he need to write, and how long and often?

Link to comment
Share on other sites

With this in mind, how would you suggest the issue be solved, Springheel, as I have no experience in working with animations?

You don't actually need to amend the animation, just the animation declaration in the AI's modelDef. I'm speaking without experience of doing it here, just going on what I've seen in the files. Here's an example from the def file for human anims, def/tdm_ai_guard_proguard_devel.def, where it looks like the "Eat apple lefthand" anim is made from the idle_cough anim, by attaching an apple at the right time and adding the eating sound:

 

model tdm_ai_proguard {
   mesh models/md5/chars/guards/proguard/tdm_ai_proguard.md5mesh
   channel torso ( *Spine_Dummy)
   channel legs ( origin Pelvis Pelvis2 *Hips)
   anim af_pose models/md5/chars/guards/proguard/af_pose.md5anim
   anim ik_pose models/md5/chars/guards/proguard/af_pose.md5anim


   //****************************
   // Movement animations
   //****************************

   // ...skipped lots of animations...

   anim eat_apple_lefthand models/md5/chars/guards/proguard/sit_idle_cough01.md5anim
   {
      no_random_headturning
      frame 8 attach atdm:moveable_food_apple food hand_l
      frame 27 sound_voice snd_eat
      // replace apple by droppable apple core
      frame 45 destroy food
      frame 45 attach atdm:drop_apple_core food hand_l
      // now drop it
      frame 96 drop food
   }

But there might well be easier ways to get the effect you're after. What will the trigger be for starting and stopping writing?

Link to comment
Share on other sites

On the sitting move pivot: I can only confirm what grayman said, it's not been changed. It makes the AI turn, but not hover above the floor. Adding a meaningdful z-component to support other desk and chair heights sounds like a useful feature request, but it's not a bugfix.

 

If you spell out the situation, we can probably suggest a workaround. And maybe pick up a useful feature for the next release. The writing anim works fine with at least some TDM desks and chairs. Are your desk and chair a bit taller? Also, what starts the sitting, writing, stop-writing, standing states? Feel free to take this to PM if you don't want to share map details. If I can fix it for you with a bit of script, I will.

Link to comment
Share on other sites

everytime I try to use the leaning_commoner.pfb in my map I get the following error

 

sLPw37x.png

 

 

edit: after playing around with it more there seems to be a couple of problems with the AI itself not the leaning animation. For 1 the def_attach spawnarg is incorrect and that was an easy fix however even after having that fixed the AI turns to an instant ragdoll. I've solved the problem by simply moving the correct spawnargs to a different AI but I guess its worth fixing the current one implemented in the .pfb as that is broken on my end.

Edited by Goldwell
Link to comment
Share on other sites

I'm trying to follow http://wiki.thedarkmod.com/index.php?title=Stim/Response_Key/Values#Remove_torch_damage_if_extinguished_with_water

 

If you have hot torches/ovens that damage the player if too close, but shouldn't if extinguished, first copy the name of the entity that has the damage stim. Then use the Stim/Response editor to add a Water Response, effect "Deactivate Stim", pasting/selecting the entity with the damage stim, and "Damage".

My water Response isn't removing the damage stim from my bonfire entity. However, if I change the Response type to Holy and use a holy water arrow, it does remove the damage stim. This makes me think the bonfire's inherited Water Response may be interfering with my attempt to add a new Water Response effect. Is this a bug, or should I be doing something differently when a Response type is already inherited by an entity?

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

Is there a way to stop an AI from reacting to the world? For example if an arrow is shot into the wall close-by of where I have an AI standing he starts freaking out and trying to flee but I dont want him to do that. I just want him to stand there and not do anything other than a conversation. I've already contained him inside a full_clip box so the player cannot harm him its just the reaction part I need to stop.

 

Thanks!

Link to comment
Share on other sites

Is there a way to stop an AI from reacting to the world? For example if an arrow is shot into the wall close-by of where I have an AI standing he starts freaking out and trying to flee but I dont want him to do that. I just want him to stand there and not do anything other than a conversation. I've already contained him inside a full_clip box so the player cannot harm him its just the reaction part I need to stop.

 

Thanks!

 

Try this:

 

"ignore_alerts" "1"

  • Like 1
Link to comment
Share on other sites

On a note unrelated to my prior posts (I will return to them at a future point).

 

I am struggling to create a spiral staircase. I know that there are several models available, but without the ability to resize or alter them, they aren't appropriate for the confined space that I have. I have tried with both brushwork and patches. The former made matters worse and it is now taking me forever just to get the stairs right with manually created patches, let alone the guiderails.

 

Is there a quicker way of doing this?

 

EDIT:

 

Just saw that there is a wiki on this. I will work my way through it, but any feedback here would still be appreciated.

 

EDIT 2:

 

It appears that many of the images on that wiki page can no longer be viewed...I assume that their links are broken? :-(

 

EDIT 3:

 

Found an editable prefab, so I will try using this.

Edited by Dunedain19
Link to comment
Share on other sites

How to get a static model to display a pop-up message not when frobbed, but when highlighted, if this is even possible, and keep the frob_action_script spawnarg to activate a script or another trigger?

 

Also how to have a glance at, say, what a gui will look like in darkRadiant? This one might sound dumb but while I managed to find the name for a fine gui (tdm_message_no_art.gui) after unzipping and browsing tdm_gui01.pk4 I didn't see how it looked like before launching the map, and I bet there is a proper way to preview guis.

Edited by ashpl
Link to comment
Share on other sites

editguis

 

Letting something happening when an object is highlighted is doable via scripting.

  • 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

I have a question about the difficulty settings:

 

If I don't touch Darkradiants difficulty editor to adjust spawnargs, is there anything done by default to change things between Normal, Hard and Expert? Like, for example AI acuity values? (or anything else).

To put it another way: Are the 3 levels identical if don't explicitely change them?

Link to comment
Share on other sites

Are the 3 levels identical if don't explicitely change them?

Yes I think so... Default AI acuity is set by the player in the menu and is independent, although you can tweak AI acuity with spawnargs so I guess you can adjust it for difficulty if you wish. Likewise combat difficulty.

Link to comment
Share on other sites

If I don't touch Darkradiants difficulty editor to adjust spawnargs, is there anything done by default to change things between Normal, Hard and Expert? Like, for example AI acuity values? (or anything else).

To put it another way: Are the 3 levels identical if don't explicitely change them?

I've already done this in our map, look at one of the candle-bottles and you'll see the 3 difficulity args.

Link to comment
Share on other sites

There could be other differences, but the first one that you can clearly see is attribution, activate is caused by the player and trigger is caused by the system.

Sometimes attribution can matter. It'd matter more in a multiplayer version where player1 isn't the only player. For our game, since there's just the 1 player, practically it doesn't matter.

It's possible some triggers apply an effect to the triggering entity, or it matters like a relay set-up, and then it wouldn't work if sys did it. I can't think of an example now. Tels was playing with a system that passes the triggered object to a script when the trigger calls it, and it'd be relevant to that kind of system, since activate currenly passes player1 to the script.

Edit. That's another difference. If the trigger calls a script, activate passes player1 to it, and sys.trigger I think passes the entity to the script (I never tried it, but it's in the place for it). Passing the object is super useful, e.g., when you have 10 buttons triggering 10 effects. With sys.trigger they can all call 1 script, and a conditional at the start of the script separates them so each button has its own effect. But with activate, the script only knows player1 frobbed a button, but not which one. So you have to make 10 separate scripts, and those scripts can't even know if other buttons are pushed. That's a difference between them. Sys.trigger is more script friendly than activate. Aside from a use like that, activate is the standard function to use for generally just triggering something.

 

Edit2. Sorry, I used the example wrong. The script calls for buttons always use $ent.activate. I don't know how to get one to use sys.trigger to pass the frobbed object. My example would have worked better if we're just talking about triggering things from scripts (as opposed to in-world frobbing). But the general principle is still there. One passes the player; the other passes the object.

  • Like 1

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

G'day peoples,

 

I just opened up DR and loaded my WIP on a new system. There are no textures or shaders on anything. SHADER NOT FOUND on everything? Is there a simple way to load all?

 

Did you nuke your DR preferences and point to your Darkmod install directory?

 

http://forums.thedarkmod.com/topic/15152-new-dr-folder-settings-for-tdm-20/

 

Oh, you need to install Darkmod to use DR unless you copy all the Darkmod resource pk4 files to a folder on the new system which

is basically the same as installing TDM other than the config files, DLL's and executable.

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

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.

 Share


  • Recent Status Updates

    • nbohr1more

      Anyone have any luck with light.setShader( string ) ? It seems to make whichever light you apply it to full-bright on the initial invoke?
      · 0 replies
    • thebigh

      I'm starting to think we need another mapping contest.
      · 9 replies
    • kano

      Don't you hate it when there's a quality discussion on a forum somewhere online about something, but then two disagreeing users derail and transform it into a back-and-forth poo slinging competition at one another?
      · 9 replies
    • Diego

      Oh look the status updates are back! 
      · 2 replies
    • JackFarmer

      After watching the first three and a half episodes of "The Sandman" last night, I realize once again that overly imaginative narratives are not for me. Also, the main actor looks like he has a toothache.
      Which makes me wonder, is there a Dark Mod mission with a medieval dentist?
      · 4 replies
×
×
  • Create New...