Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


Recommended Posts

Solved the moon rays thingie. About those lights however; I got the AI to relight them, but there's one little problem: The AI walks behind the wall the switch is placed on and triggers it through the wall itself, instead of standing in front of it like it should. How do I fix diiiis?!

 

I also need a little help with setting up an objective: I'll have a locked door with no key or ability to lockpick, which must only become unlocked once the player completes a given objective. How do I make the completion of an objective unlock a specific door? Is there perhaps a triggerable entity that can lock and unlock targeted doors?

Link to post
Share on other sites
  • Replies 9.7k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

So I have this gigantic scorpion, it is made out of pendulums bound together. I had an idea about dragging whole thing through a piled up crates (pretending to be stone blocks in a wall), but it looks

I'm just going to make the lute player an undead immortal skeleton called Ralph who is eternally bound to play his lute in the tavern, the residents are used to him now so they just happily co-exist a

Thanks for the advice about the tent, guys. Finally got around to (mostly) fixing it; shadows were indeed the problem.    

Posted Images

Hm, for the first problem I would maybe place a clip brush in front of the wall, so AI cannot reach through? I know, that for doors handling positions can be defined, but I have no idea if the same is possible for other entities.

 

The second problem is quite easy to manage. First, you have to create an "atdm:target_changelockstate" entity and have it target the door. After that open the Objectives Editor and go to the Objective that has to be completed to open the door. There is an entry called "Completion Target". This can be used to target an entity, when the objective is completed. Here you type in the name of your "atdm:target_changelockstate" entity and that should do the trick. One remark regarding the "Completion Target": There is only one possible target per objective, so if you want an objective to have several targets, you will need to create a "trigger_relay", which is the "Completion Target", while all entities you want to trigger by that objective have to be a target of the triiger_relay.

Link to post
Share on other sites

What's the switch? A lever? A button?

 

Is there room on the correct side of the switch for the AI to stand?

 

Try placing a piece of furniture in the bad standing spot and see if the AI uses a better spot.

Link to post
Share on other sites

Is there a simple way to fade an object out? say a model or a func_static and just have it go from 100% opacity to 0% opacity over a set time and then be removed from the game.

Link to post
Share on other sites

 


 

Is there a simple way to fade an object out? say a model or a func_static and just have it go from 100% opacity to 0% opacity over a set time and then be removed from the game.

 

 

 

This was thought to be the only way:

 

http://wiki.thedarkmod.com/index.php?title=Alpha-fading

 

however, there may be a better solution:

 

http://wiki.thedarkmod.com/index.php?title=Making_Semi-transparent_textures

 

(see the new info at the bottom)

 

If you use parms in this stage:

  {
        blend blend
        maskalpha
        map    diffusemap.tga
        alpha 0.8  // tune transparency
        rgb 0.4
    }    

instead of the hard coded rgb and alpha values.

 

One of the tests I was planning on tinkering with.

  • Like 2

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 post
Share on other sites

Thanks again, I will try that advice later. I learned the objective editor better today, and I currently have two problem left with my objectives.

 

First one: I have Objective 1 and Objective 2. Objective 1 has the visible flag on, Objective 2 does not. From the menu I created an objective condition which reads: "If Objective 1 in Mission 1 is in state 'COMPLETE' do the following: Make objective 2 visible". This does not however happen in practice, and Objective 2 stays invisible even after Objective 1 was completed! How do I fix this, so that new objectives only appear after previous ones are completed?

 

And the second issue: I have an objective that must become true after a lever is turned on. It has one component of type "Controlled by external script". The level in cause targets an atdm:target_setobjective_state which has the property / value "obj_id1 10" "obj_state 1". Although these are the instructions on the wiki, it doesn't work!

Link to post
Share on other sites

For the first one: the simplest solution is to use a "atdm:target_setobjective_visibility" entity and set it up just like the "atdm:target_changelockstate". I have also tried to set something like this up with the Objectives Editor, but failed. I think, you have to properly define your maps (see http://wiki.thedarkmod.com/index.php?title=Setting_up_Campaigns)in order to use the Success Logic of the Objectives Editor. However, this is just a guess on my side.

 

For your second problem: This should work that way you set it up. Are you sure the "obj_id1" is correct? you wrote "10", shouldn't it be "1"? the ID should be the number in the "#" column in the Objectives Editor.

Link to post
Share on other sites

For the first one: the simplest solution is to use a "atdm:target_setobjective_visibility" entity and set it up just like the "atdm:target_changelockstate". I have also tried to set something like this up with the Objectives Editor, but failed. I think, you have to properly define your maps (see http://wiki.thedarkmod.com/index.php?title=Setting_up_Campaigns)in order to use the Success Logic of the Objectives Editor. However, this is just a guess on my side.

 

For your second problem: This should work that way you set it up. Are you sure the "obj_id1" is correct? you wrote "10", shouldn't it be "1"? the ID should be the number in the "#" column in the Objectives Editor.

 

So I need to place and trigger an entity for each objective I want to hide / show? I could do that... but it sounds so messy and counter-intuitive, in comparison to using the menu that's already there :( Is there really no way to do it via the Objective Conditions Editor, which looks like the cleanest and most correct approach? I assume that for single missions (not campaigns) "1" is the correct mission value.

 

The tutorial I read said I should use obj_id1 (unless I trigger multiple entities or something) followed by the number of the objective I'm changing (which in my case is 10) in the property name, with "obj_state 1" as the value. I understand I got that the other way around, and should have "obj_id10 1" instead of "obj_id1 10"? I will try this and see if it works, thanks.

Link to post
Share on other sites

You can try to set up your mission as a campaign with only one map. The value 1 should be the right one, but TDM might not know, which map it is. I agree, that this would be the more elgant solution.

 

You had it right the first time. I was confused by your Objective 1 and 2 in the post. If 10 is the number in the #-column, then it should work. Maybe you need "obj_state10 1"? So it knows that it is the objective with ID 10 that has to be set to 10?

Edited by Destined
Link to post
Share on other sites

You can try to set up your mission as a campaign with only one map. The value 1 should be the right one, but TDM might not know, which map it is. I agree, that this would be the more elgant solution.

 

You had it right the first time. I was confused by your Objective 1 and 2 in the post. If 10 is the number in the #-column, then it should work. Maybe you need "obj_state10 1"? So it knows that it is the objective with ID 10 that has to be set to 10?

 

I tried to define a one-map campaign in tdm_mapsequence.txt. Still nothing :(

 

It seems that neither "obj_id10 1" nor "obj_id1 10" work. I am confused as to what I might be missing...

Link to post
Share on other sites

Solved the objective triggering problem. I was misunderstanding the documentation... good thing the entity description had an example. What I was doing was "obj_id1 10" = "obj_state 1". What I had to do instead was "obj_id1" = "10" and separately "obj_state" = "1". The visibility triggering still remains an issue however... I would still like to avoid doing with an entity per objective if possible!

Link to post
Share on other sites

Today I learned that the Mission Success and Mission Failure logic strings are completely broken, as well as Enabling Objectives. One example: If for objective 3 you have Enabling Objective set to "1", objective 3 can only be completed after objective 1 was done... but if instead you have Enabling Objective set to "1 OR 2", and objective 1 is completed but 2 is invisible (failed too?), objective 3 cannot be completed. Same thing if you have objective 1 (completed), objectives 2 and 3 (just one or the other invisible), and for objective 4 you have an Enabling Logic of "(1 AND 2) OR (1 AND 3)" or "1 AND (2 OR 3)". Can anyone explain please?

 

Mission Failure also has a major issue: How do you setup custom failure rules?! For the mission success string, you can write something like "1 AND 2" meaning the mission succeeds if you complete objectives 1 and 2. But for mission failure, how do you specify you want it to end when failing objectives 1 and 2? I tried "1 AND 2" as well as "NOT(1) AND NOT(2)" but none work! Sadly there is zero documentation on how the mission failure string is supposed to be written... namely how you specify a failed objective as a rule.

 

Separately I have one more question: What is the best way to make entities (both AI and static objects) appear and disappear at certain points? I believe that to make an AI appear, you need to initially place them in a hidden room on the map and use a mover entity to position them in the environment via a trigger (is this the only way?). What do you do however if you want to remove an AI... which could have walked to any point in the accessible environment, and can probably not be repositioned via a simple mover to a small hidden room.

Link to post
Share on other sites

For func_statics, try the "hide" spawnarg ('Whether the object should be visible when spawned. you need to set a value for triggering on/off to work'). (I can't remember whether it affects solidity as well as visibility, so you'll need to check.) It also exists for AI ('Causes monster to be hidden and nonsolid until triggered. Set to 2 for single trigger (entity wakes up when unhidden).') but I believe I read somewhere that it doesn't stop them making sounds, so an atdm:teleport would presumably be better.

 

I'm afraid I don't know the answers to your objective-related questions; anything that appears outright borked is no doubt deserving of a bug tracker entry.

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to post
Share on other sites

Thanks... I found the solution for making AI and objects appear / disappear in the scene. atdm:teleport works perfectly for this, with of course a hidden room somewhere near the skybox.

I believe I'll be adding one more thing to my mission, which I saw in other missions but have no idea how to do myself: How do you have a guard that knocks on doors and yells at the people inside? I've seen missions where guards will either permanently or occasionally approach a door, knock on it, and say things like "quiet in there" or "open up".

Link to post
Share on other sites

Objective conditions using AND or OR were quite unreliable for me as well. I remember RJFerret made an annotation in the wiki that he had to type AND in lower case, but that made no difference for me. I ended up writing a one-line script that causes the mission to fail, called as a failure script by certain objectives. More complex mission failure logic could also be scripted.

 

 

Regarding the galleon interior you mentioned earlier, that sounds like Pandora's Box. The ship there is actually custom-built out of brushes and patches, making it more roomy, so its interior wouldn't fit the stock galleon. That said, the Invernesse from the second part of Down by the Riverside is modular, you'd be welcome to reuse these modules. The starting ship also has suitable material, while not being modular.

Link to post
Share on other sites

 

 

This was thought to be the only way:

 

http://wiki.thedarkmod.com/index.php?title=Alpha-fading

 

however, there may be a better solution:

 

http://wiki.thedarkmod.com/index.php?title=Making_Semi-transparent_textures

 

(see the new info at the bottom)

 

If you use parms in this stage:

  {
        blend blend
        maskalpha
        map    diffusemap.tga
        alpha 0.8  // tune transparency
        rgb 0.4
    }    

instead of the hard coded rgb and alpha values.

 

One of the tests I was planning on tinkering with.

 

There's a mechanical solution to this using the semi-transparents/opaques - at least for an object that is "contained" or "out-of-reach", by setting up and using a skybox containing a mover - it is useful for,

eg, "being on a train" and having the scenery go past the window to create the feeling of motion (with camera shake), rather than having the train move through a whole map (which doesn't work as anything not nailed down gets flung all over the place and - in the good olde days - it would cause damage... Plus, it's a major hassle to have to bind so much stuff to a mover AND it doesn't work with such things as seeded [random placed] loot like a few coins scattered over an area of floor - the spawned objects don't appear to inherit the bind from parent seed, and also often float, which is frustrating... was fun to jump in and also to knock out AI...).

 

I've never tried this with an object that is frobbable, but I imagine that it would simply be a case of setting the trigger to be on the frob.

 

If you can set up a skybox with [objects' skin] transparent textures, it is possible to use a trigger to start them moving through each other - eg, an NPC recedes into the shadows after a monologue, rather than pathing an AI or messing with a ragdoll mover (that you gotta pose manually and copy the position co-ordinates and as soon as it moves it goes all floppy - kinda funny to watch, but not funny when u gotta move anything and have to keep redoing it over and over and over), it's simply a skybox with a clip in front of it, where a semi-opaque, no-clip texture moves in front of the ragdoll as the skybox view also moves backwards.

The effect is that it appears the "ghost" is disappearing into blackness, a wall, whatever the texture is that you've used in that skybox.

 

 

It is also a good way to make a day/night transition, using a trigger and one or more skybox containing movers.

 

eg, player walks up hill, skybox slowly starts to change, inverting position of day/night textures and light-object (sun/moon) and colours, so that - if player continues at pace - they reach the hill peak just in time to see the "sunset", before "darkness falls" and "moon rises as meteor slams into ground and POV shakes with a bunch of noise that comes out of player's mouth".

 

It is tricky to get the timing of these things right, and - in my experience - is mostly trial and error and beating things into place - it also requires a little scripting, which is annoying.

It's also very annoying to have to try and get EVERY window such a thing as a train or galleon showing the right thing at the right time - it is quite noticeable (to me, at least) when there is a disparity in the timing of a passing building, or it repeats too often, or if a player goes backwards through the train and can see the same object through the windows of two different carriages at the same time...

 

Umm... reading that back - it's not as complicated as it sounds... honest.

 

Teleport is an easier solution for a fade out, but experimenting with skyboxes and textures can result in figuring out an easy way to include something such as POV cutscenes (eg, a character being hanged on their "death/capture", after being teleported to a gaol cell on "death").

 

I much prefer that kind of death than the DUN DUN DUNNNNN skull and crossbones, Stats page, load game. Can always quick-load to skip the player POV cutscene, anyway (which is nothing but the player being stuck still and the skybox camera moving along a pathway through a set/stage - the teleport is a good way to ensure continuity in space/time to maintain the effect of, eg, boarding a train and it moving off...).

 

There's some way to make sure the player isn't dead, but that a health condition performs the "death teleport", leaving them with a chance to escape after being captured / dying, with a few HP remaining... It's a pain in the arse script, and I haven't quite gotten it right - sometimes it happens but sometimes the player actually dies.... I think it is to do with how much damage they receive (ie, a fall or hit that takes all health, instead of leaving the 1 HP that is required to activate the blackout-teleport-gaol-cell-newobjective-etc....).

 

Think I'm rambling, and spoiling a lot of stuff - came here to check if anyone had answered the thread on if movers will be causing damage again in the next version.

 

Think I will simply delete that section of the level and re-make it, since pretty much every trap and obstacle on the stealthier/non-lethal consequence routes are no longer a danger...

 

Back to teh drawing board.

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

Is there a way to make AI pass through doors like a ghost? Builder_guard_ghost have "fleshy" "0" arg but he still opens and closes door, "ignore obstacles" or "can operate doors" makes him just spin and bounce off from them.

S2wtMNl.gif

Link to post
Share on other sites

Passing through obstacles is a quite difficult task, as the AAS determines which objects are considered obstacles or, more generally, where the AI can go. I have found one way to make an AI pass through a wall, but it is not very well tested by me, so it might cause other bugs:

First you have to change the collision box of the AI to be quite low (that way, the player was also able to walk through it, as was intended by me). In order to achieve this, you need to change the spawnargs "mins" and "maxs" that define the collision box via a diagonal line. E.g. the rat has a "mins" "-6 -6 0" and "maxs" "6 6 12". This means that a line is drawn from the point -6 -6 0 (relative to the origin) to the pint 6 6 12 resulting in a box that is 12 x 12 x 12 units big. The width of the box should not matter for you, the important part is the height. Set this to e.g. 4 units.

The next thing you need is to create a new AAS definition, that tells your AI that it can pass through gaps that are 4 units high. So, in the aas.def file, you can copy any other definition and again change the "mins" and "maxs" to the respective values and change the AAS of the AI to the new one.

Finally, you need a custom door, comprised of two parts: a lower part, that is non-solid (there is a spawnarg for that, make sure that this part is still drawn) and 4 units high (or you can make it slightly higher to be sure, lets say 8 units) and an upper part that is solid and has all the other properties you want on the door.

That way the AAS thinks, that the door is no obstacle for the AI and it can pass through. I have only tried this with a wall, but it worked. Might be that you will have to disable the ability to handle doors again. I have seen other possible solutions with non-solid walls and player_clips so only AI may walk through, but this has the problem that all AI can pass through, which again might not be what you want. With my method you can define relatively exact, where an AI can pass through and where not. One problem I am currently not sure about is the weapon of the AI. It might be that this gets stuck, if it is not non-solid. However, when it is non-solid, I am not sure, if it can damage the player. You will have to try that out...

  • Like 1
Link to post
Share on other sites

AI seem not to respect the "solid" spawnarg, but apparently there are ways of making them go nonsolid, so maybe one of these would help: http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page-220?do=findComment&comment=365611

  • Like 1

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to post
Share on other sites

I want to make an inventory trigger (similar to lantern) but more open to modifications. I have this def:

entityDef atdm:inventory_switch
{       "inherit"	     "atdm:playertool"
        "scriptobject"    "invswitch"
        "model"            "models/anything.ase"
}

But I guess it don't work with standard scripts like one below, because I have error "object 'invswitch' not found on inventory_switch".

  void invswitch() 
 {
     $helmet_light_sound.activate($player1);
     $helmet_light.activate($player1);
  }

instead I need this?

#ifndef INVSWITCH
#define INVSWITCH
object invswitch : player_tools
{
  void init();
  void updateLoop();
};
void invswitch::init()
{
  thread updateLoop();
}
void invswitch::updateLoop()
{
  while(1)
  {
     $helmet_light_sound.activate($player1);
     $helmet_light.activate($player1);
     wait(20);
  }
}

#endif

I'm just copying&paste stuff from others but I'm unfamiliar with rules of this kind of script. I don't want a loop, just a simple one time (per frob) action.

Edited by ERH+

S2wtMNl.gif

Link to post
Share on other sites

Than I suggest to check the scriptobjects used by the inventory tools.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.

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


×
×
  • Create New...