Jump to content
The Dark Mod Forums
demagogue

Newbie DarkRadiant Questions

Recommended Posts

entity 0 is worldspawn, if the brush is degenerate then its likely to be less than 1 darkradiant unit in size, usually created when you clip something, or use the csg subtract on a sphere.

Share this post


Link to post
Share on other sites

yes, that was the case ... an arched doorway, csg subtracted from a wall

 

guys, your help is fantastic and indirectly proportional for my increasing frustration

(ehm, here my English knowledge fails, I have to confess, hahaha)

Share this post


Link to post
Share on other sites

If your frustration is indirectly proportional to our help and keeps increasing, than your statement would mean that our help gets less and less, which could be considered an insult.

 

From my experience though it is more likely that in this specific situation not your english but your math skills failed. :P

 

However, it is clear what you mean. :)


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

Share this post


Link to post
Share on other sites

I'm thinking of making an AI to have a drink, which the player could poison. This is easy with custom anim and conversation system.

 

The problem is that if the player alerts the AI and he has sword in hand, the drinking will look bad if the AI's hand is already occupied. So, methinks the simplest way to do it would be to run a script when the AI is about to drink:

1) If WEAPON IN HAND, then play sheathe animation to get rid of the weapon.

2) Play anim get drink.

 

Is it possible to a script to inquiry whether the AI has sword in hand or not? Thanks!


Clipper

-The mapper's best friend.

Share this post


Link to post
Share on other sites

Look at ai_darkmod_base::Torso_Relight_Tinderbox_High() in tdm_ai_base.script.

 

The variable m_WeaponDrawn tells you if the AI is currently wielding a weapon.

Share this post


Link to post
Share on other sites

Thanks!

 

I had a look, but it is not clear to me how I inquire this m_weapondrawn via a simple script? Like:

$ai.someFunctionThatReturnsOneOrZeroWhetherAiWeaponInHand();

 

Or do we have a way to ask what the AI has in attachment position "hand_r" at the moment? I searched and found talk about a "GetAttachmentByPosition," which ended in comments that it should work now, but found no reference about it in tdm_events.script so I am not sure how to use it.

 

http://forums.thedarkmod.com/topic/12528-ai-and-lights/?p=257006

 

Thanks and sorry if I am a bit thick headed. It's been awhile... :blush:


Clipper

-The mapper's best friend.

Share this post


Link to post
Share on other sites

Yay! Not so thick headed after all. This works:

 

$ai.getAttackFlag(COMBAT_MELEE);

 

If the AI has a melee weapon in hand, it returns 1. If no melee weapon, it returns 0. Nice!

 

Thanks for pointing me towards the right direction!


Clipper

-The mapper's best friend.

Share this post


Link to post
Share on other sites

COMBAT_MELEE only covers a melee weapon.

 

Also check COMBAT_RANGED for when he carries his bow.

Share this post


Link to post
Share on other sites

Hey all, I'm back with another(!) texture issue. This time around, it's three textures: diamond_pattern_andbars01_lit, diamond_pattern_andbars01_moonlit, and diamond_pattern_andbars01_unlit. All of them appear to be missing a bumpmap. It's written in the .mtr but the actual .tga file isn't present in the folder structure. Can anyone confirm where it went (if in fact it ever existed)?

Share this post


Link to post
Share on other sites

If they are missing you should file a bugtracker, as it surely gets lost here.


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

Share this post


Link to post
Share on other sites

@Obsttorte Do I need any special permissions to file a bugtracker? Also, are there any particular conventions I'd need to follow?

Share this post


Link to post
Share on other sites

You just need to register. Regarding conventions, check the other tracker entrees. You should get an idea than.

  • Like 1

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

Share this post


Link to post
Share on other sites

Is there a console command that displays the elapsed time we've played in the mission so far? I know we can see it on the end of mission objectives screen so i'm guessing it's accessible somehow.

Edited by Goldwell

Share this post


Link to post
Share on other sites

tdm_show_gameplaytime

  • Like 1

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

Share this post


Link to post
Share on other sites

In my WIP, rats are blocking a door. Is it possible to make rats being pushed out of the way by doors? I did not find a fitting spawnarg and remembered the discussion about if it should be possible to push AI out of the way, so I am actually not sure if this is possible at the moment. If it is, wouldn't it make more sense that rats are generally pushed away?

Share this post


Link to post
Share on other sites

In my WIP, rats are blocking a door. Is it possible to make rats being pushed out of the way by doors? I did not find a fitting spawnarg and remembered the discussion about if it should be possible to push AI out of the way, so I am actually not sure if this is possible at the moment. If it is, wouldn't it make more sense that rats are generally pushed away?

 

More data needed:

 

1 - What version of TDM?

 

2 - Is it a single rat that's blocking the door, or multiple rats at the same time?

 

3 - Is the door opening or closing?

 

4 - Are the rats preventing the door from closing because they get caught between the door and the door jamb?

 

5 - Is the player frobbing the door, or is it being opened/closed by an AI?

 

6 - Is the door 'odd' in any way; i.e. not a standard door?

 

Rats in general will stay in one place only momentarily, then run or walk away. So #4 is the only time the door stopping should be a problem. The rat is then denied the room it needs to get away, so the rat and the door stay the way they are.

 

Rats will stop a door if there are more than one; the door pushes against rat #1, who pushes against rat #2. In general, objects being pushed don't push secondary objects out of the way. But in this case, the rats should just move away from the door a moment later.

Share this post


Link to post
Share on other sites

I am working with TDM 2.04

It is a standard two winged door that opens into a room (actually the first door the player can open). As far as I can tell the rat stands behind the door, which prevents the door from opening. As soon as the other part of the door has opened, the rat runs outside most of the time and the left wing of the door can be opened. So, it appears to me that the rat (just like other AIs) blocks the opening door, when it stands in its way. I can not say for sure if there are two rats at the same time, I only see the one. There are, however, two rats starting in more or less close proximity to the door.

 

Edit: I have tried to move one rat further away an waited some more time. It really is simply one rat that stops the door from moving as soon as the door hits it (I just saw an AI trying to close the door, while the rat was running in circles inside the doorframe and the door stoped moving as soon as it touched the rat).

 

I have also tried to give the rat "solid 0", but this seems to be not sufficient (for this to work, I assume I would also have to remove/downsize the collision box).

Edited by Destined

Share this post


Link to post
Share on other sites

I'll try a double door. My tests are with a single door. It's going to be a few hours until I report back.

Share this post


Link to post
Share on other sites

A double door behaves the same as a single door.

 

The only block I saw was when a rat got caught between the edges of the closing doors, where one door is pushing the rat toward the other door, and when he hits it, the rat and the two doors stop moving.This is a case of a "pushed object hitting something else", which we don't handle because it can quickly get out of hand.

 

Since the only solution I can see is "a pushed object should push on N objects in its way until there's no place for any of them to go, at which point, the whole mess stops moving". This is quite complicated, and looking at it might yield nothing. It would be a 2.06 investigation.

 

As for your problem, I'd say reduce the rats in the area to 0 or 1 around double doors.

 

EDIT: Having read your edit, I'd say move the rat elsewhere in the map. i.e. "Double doors = 0 rats".

Share this post


Link to post
Share on other sites

After your last post, I made a small test map and there everything worked fine with one rat. After that I dmapped and reloaded my WIP and the problem seems to have disappeared for now. The door even pushed two rats at once. I have no idea what went wrong and why it works now, but it does. Sorry that I wasted your time!

Still, I will move the starting position of the rats a bit further away.

Share this post


Link to post
Share on other sites

After your last post, I made a small test map and there everything worked fine with one rat. After that I dmapped and reloaded my WIP and the problem seems to have disappeared for now. The door even pushed two rats at once. I have no idea what went wrong and why it works now, but it does. Sorry that I wasted your time!

Still, I will move the starting position of the rats a bit further away.

 

Ok, thx.

Share this post


Link to post
Share on other sites

How do water arrows remove blood, what are the mechanics behind it, you shoot water arrow at blood decal and it does what?

 

I've currently got a gui, that when hit by water runs a script, that checks its been hit so it only runs once, that then runs a onTrigger in the originating gui, that then plays an animation that makes it look like the blood is being washed away.

eg

 

 

receptron water run script blacksmithcircle

 

script

 

float washoutcircle3 = FALSE;

 

void blacksmithcircle()
{
if ( !washoutcircle3 )
{
washoutcircle3 = TRUE;
sys.print("Was hit by water.\n");
sys.trigger($blacksmith_pos_circle);
$blacksmithshammer.setFrobable( 1 );
sys.trigger($circle_noise_3);
}
else
{
sys.print("stop it, am soaked.\n");
}
}

 

gui entity blacksmith_pos_circle

 

windowDef Desktop
{
rect 0, 0, 640, 480

onTrigger
{
set "FadebloodC3::noTime" "0";
resetTime "FadebloodC3" 0;
}

windowDef CirclePos31
{
rect 0, 0, 640, 480
background "guis/assets/bloody/stonepos3_1.tga"
visible 1
}

windowDef FadebloodC3
{
rect 0, 0, 640, 480

noTime 1
onTime 0
{
set "CirclePos31::visible" "0";
set "circle3t1::visible" "1";
}

onTime 100
{
set "circle3t1::visible" "0";
set "circle3t2::visible" "1";
}
onTime 200
{
set "circle3t2::visible" "0";
set "circle3t3::visible" "1";
}
onTime 300
{
set "circle3t3::visible" "0";
set "circle3t4::visible" "1";
}
onTime 400
{
set "circle3t4::visible" "0";
set "circle3t5::visible" "1";
}
onTime 500
{
set "circle3t5::visible" "0";
set "circle3t6::visible" "1";
}
onTime 600
{
set "circle3t6::visible" "0";
set "circle3t7::visible" "1";
}
onTime 700
{
set "circle3t7::visible" "0";
set "circle3t8::visible" "1";
}
onTime 800
{
set "circle3t8::visible" "0";
set "circle3t9::visible" "1";
}
onTime 900
{
set "circle3t9::visible" "0";
set "circle3t10::visible" "1";
}
onTime 1000
{
set "circle3t10::visible" "0";
set "circle3t11::visible" "1";
}
onTime 1100
{
set "circle3t11::visible" "0";
}
}

windowDef circle3t1
{
rect 0, 0, 640, 480
background "guis/assets/bloody/stonepos3_1.tga"
visible 0
}
windowDef circle3t2
{
rect 0, 0, 640, 480
background "guis/assets/bloody/stonepos3_2.tga"
visible 0
}
windowDef circle3t3
{
rect 0, 0, 640, 480
background "guis/assets/bloody/stonepos3_3.tga"
visible 0
}
windowDef circle3t4
{
rect 0, 0, 640, 480
background "guis/assets/bloody/stonepos3_4.tga"
visible 0
}
windowDef circle3t5
{
rect 0, 0, 640, 480
background "guis/assets/bloody/stonepos3_5.tga"
visible 0
}
windowDef circle3t6
{
rect 0, 0, 640, 480
background "guis/assets/bloody/stonepos3_6.tga"
visible 0
}
windowDef circle3t7
{
rect 0, 0, 640, 480
background "guis/assets/bloody/stonepos3_7.tga"
visible 0
}
windowDef circle3t8
{
rect 0, 0, 640, 480
background "guis/assets/bloody/stonepos3_8.tga"
visible 0
}
windowDef circle3t9
{
rect 0, 0, 640, 480
background "guis/assets/bloody/stonepos3_9.tga"
visible 0
}
windowDef circle3t10
{
rect 0, 0, 640, 480
background "guis/assets/bloody/stonepos3_10.tga"
visible 0
}
windowDef circle3t11
{
rect 0, 0, 640, 480
background "guis/assets/bloody/stonepos3_11.tga"
visible 0
}

}

 

 

Share this post


Link to post
Share on other sites

How do you stop water_dark from looking like this when a func_emitter is nearby

 

qimUElr.png

 

I've tried playing with water_dark's material file by adding in the usual ambient method, i've tried adding in sorting as well (something that has worked with glass windows) but nothing seems to work. If I replace that body of water with water_colored for example it looks completely normal (apart from not being the style I want).

 

So is it possible to have water textured with water_dark and a func_emitter that is emiting the ea001_etherfog_high.prt particle effect?

Share this post


Link to post
Share on other sites

The water material needs to be blend add. (I tried fixing this in PD3 as a little side project.) But it's hard to make it dark that way.

I was able to fix similar problems with glass materials with forceOverlays but it doesn't seem to work for water materials.


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

Share this post


Link to post
Share on other sites

Bit of an odd question here. Besides the zombie, are there any decapitated AI head models available? The .md5mesh versions just give me an error and don't appear in-game (I'm assuming they're there for internal purposes and can't actually be used as func_statics).

Share this post


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