Jump to content


Photo

Newbie DarkRadiant Questions


8175 replies to this topic

#8026 Dragofer

Dragofer

    Modeler

  • Member
  • PipPip
  • 486 posts

Posted 07 February 2018 - 04:56 AM

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?

 

You'd need to make a hidden irreversible objective to close the readable. You need to enter the name of the atdm:voice... entity into the "Completion Target" box so that when the objective completes, it triggers the completion target.



#8027 Bienie

Bienie

    Member

  • Member
  • PipPip
  • 147 posts

Posted 07 February 2018 - 06:15 AM

 

You'd need to make a hidden irreversible objective to close the readable. You need to enter the name of the atdm:voice... entity into the "Completion Target" box so that when the objective completes, it triggers the completion target.

 

It really is not possible to do it without using an objective? Maybe I wasn't clear, the idea behind this spoken line is just like a Garret quip basically, and is not connected to any objectives (in fact 95% of players probably won't see it at all). Even if it's a hidden objective, it's not going to cause trouble having many, complicated objectives? I'm going to have other questions about objectives later since I'm having some big problems with that as well.



#8028 Dragofer

Dragofer

    Modeler

  • Member
  • PipPip
  • 486 posts

Posted 07 February 2018 - 06:30 AM

It might be there's a spawnarg around for triggering something when closing a book, which would be more elegant, but neither the readables wiki page nor a google search of readable + trigger suggested that this exists.

 

All the objectives editor really is is an interactive scripting editor, so I reckon someone knowledgeable could find a way to get the same thing done with a script. The objectives editor is the much easier route, and I haven't faced any difficulties with having more than a handful invisible objectives. IIRC each of my maps has 15-20 of them in addition to the visible objectives.



#8029 Bienie

Bienie

    Member

  • Member
  • PipPip
  • 147 posts

Posted 07 February 2018 - 05:02 PM

It might be there's a spawnarg around for triggering something when closing a book, which would be more elegant, but neither the readables wiki page nor a google search of readable + trigger suggested that this exists.

 

All the objectives editor really is is an interactive scripting editor, so I reckon someone knowledgeable could find a way to get the same thing done with a script. The objectives editor is the much easier route, and I haven't faced any difficulties with having more than a handful invisible objectives. IIRC each of my maps has 15-20 of them in addition to the visible objectives.

 

Well I tried your idea out and it seems to work like a charm. Much more painless than I thought! Since I'll only have one or two instances of this in my map I'm sure it'll be ok. Thanks for the tip!

 

 

...

 

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.

 

...

 

Does anyone have a solution for this one?


Edited by Bienie, 07 February 2018 - 05:03 PM.

  • Dragofer likes this

#8030 ERH+

ERH+

    Advanced Member

  • Member
  • PipPipPip
  • 683 posts

Posted 07 February 2018 - 05:11 PM

You may try to play and pause it via script:

http://wiki.thedarkm...sing_Animations


Edited by ERH+, 07 February 2018 - 05:13 PM.

  • teh_saccade likes this

S2wtMNl.gif


#8031 ERH+

ERH+

    Advanced Member

  • Member
  • PipPipPip
  • 683 posts

Posted 10 February 2018 - 07:23 AM

How to change the skin for a item spawned by ai as an attachment?


S2wtMNl.gif


#8032 Destined

Destined

    Advanced Member

  • Member
  • PipPipPip
  • 1448 posts

Posted 10 February 2018 - 08:37 AM

You can create a new entity for that, see this Wiki article. There you can just add the "skin" "[name of skin]" to the entity definition. There also might be another way, but I am not 100% sure, if this works. On the Wiki page about attaching props there is described how the inventory name can be changed:


"name_attach6" "gate_key"
"set inv_name on gate_key" "gate key"
"set name on gate_key" "gate_key"

After defining the name it might also be possible to use "set skin on [name]" "[name of skin]", but I am not sure if this works.


  • ERH+ likes this

#8033 JackFarmer

JackFarmer

    Member

  • Member
  • PipPip
  • 51 posts

Posted 15 February 2018 - 02:58 PM

I think my thief has already killed enough spiders in my mission and thus I searched for new prey.

 

I thought I found it with the fire elementals. The problem is: they do not do as I command them to do.

 

I've created a square shaped path corner/wait sequence and connected everything together:

 

Elementals_are_doing_it_for_themselves.jpg

 

The movement showed ingame is different, it does not follow any structure. I tried it also with simple one way pathes and multiple elements, but the result is always the same.

 

What is my mistake?

 

It scares the hell out of me. What will they do next time? Break through the physical screen barrier and come after me?



#8034 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 36992 posts

Posted 15 February 2018 - 03:44 PM

There is a setting that causes AI to wander around aimlessly rather than follow paths, like rats.  Elementals may use that by default.  Can't remember what it is off-hand.  Possibly "animal"?



#8035 Destined

Destined

    Advanced Member

  • Member
  • PipPipPip
  • 1448 posts

Posted 15 February 2018 - 05:32 PM

The spawnarg is "animal_patrol". I just checked and it is set to "1" by default for the elemental. So, when you turn it to "0" it should follow your path.



#8036 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 12361 posts

Posted 15 February 2018 - 07:06 PM

The spawnarg is "animal_patrol". I just checked and it is set to "1" by default for the elemental. So, when you turn it to "0" it should follow your path.

 

Agreed. Set animal_patrol to 0.



#8037 JackFarmer

JackFarmer

    Member

  • Member
  • PipPip
  • 51 posts

Posted 16 February 2018 - 05:22 AM

That worked, now they patrol as per the designated pathes.

 

Thanks a lot!



#8038 demagogue

demagogue

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 5328 posts

Posted 16 February 2018 - 06:06 AM

I was actually wondering how I could get a drunk to stumble around... Well still need a stumbling walk animation.


Posted Image

#8039 Bienie

Bienie

    Member

  • Member
  • PipPip
  • 147 posts

Posted 17 February 2018 - 10:42 AM

Got a couple of irritating glitches I'm trying to squash today... let's start with the numberwheel that comes with TDM 2.05, which causes a crash whenever the combination is changed after being opened once. See Goldwell's post here: http://forums.thedarkmod.com/topic/18525-beta-testing-205/?p=400078

What can I do about this? Is there a script that someone has made that will override the "closeBar" function, or should I try and figure out some way to make it unfrobbable after the correct combination is entered?



#8040 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5520 posts

Posted 18 February 2018 - 05:26 PM

Read the following posts dude. The script was specifically designed for "A new job" and is not meant for general usage. However, removing the "closeBar" call (as mentioned by me in the following posts) should solve your issues.


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
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#8041 Bienie

Bienie

    Member

  • Member
  • PipPip
  • 147 posts

Posted 19 February 2018 - 05:21 AM

Read the following posts dude. The script was specifically designed for "A new job" and is not meant for general usage. However, removing the "closeBar" call (as mentioned by me in the following posts) should solve your issues.

 

I did read it, but I'm not that familiar with scripting... I thougt that would require a custom script file to be added with the mission, hence my question if such a file already exists. I can do this with spawnargs (or some other way from within DR) is what you're saying?



#8042 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5520 posts

Posted 19 February 2018 - 07:31 AM

Open the script file and delete the line "closeBar();".


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
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#8043 Bienie

Bienie

    Member

  • Member
  • PipPip
  • 147 posts

Posted 19 February 2018 - 12:31 PM

OK, figured it out. For the next person with this problem let me post the solution here since it's not in writing anywhere else.

 

1. Open the archive tdm_base01.pk4 in something like 7zip
2. Navigate to the scripts folder and extract the file called "tdm_numberwheel_lock.script"
3. Open tdm_numberwheel_lock.script in a word processor like notepad and scroll down to the line that reads: "callGlobalFunction("closeBar",$safe_bar);" and delete the whole line.
4. Save the file (don't change the name and make sure the file type is still .script)
5. Make a folder called "scripts" in your project folder (the name of the map) and place the script file in here.

Now the custom script file overwrites the faulty stock TDM one, and it should no longer crash when you change the combination after unlocking it.


Edited by Bienie, 19 February 2018 - 12:32 PM.

  • teh_saccade likes this

#8044 teh_saccade

teh_saccade

    Advanced Member

  • Member
  • PipPipPip
  • 630 posts

Posted 20 February 2018 - 07:03 PM

Believe "faulty" = "bespoke".

How do you propose to get everyone to change their tdm.pk4s in order to play a mission with that safe..?

Does the original mission still work with the changes you have made..?

If yes, perhaps chuck it in the bugtracker, as it's a minor fix and would allow others to use the asset without requiring players to mess around with their game files.

If it breaks the original mission - then it's not a great work-around, as it means anyone to play your mission is going to have to mess around with their game files and then revert when bored, which is probably a more likely outcome than changing anything in A New Job.



#8045 Abusimplea

Abusimplea

    Member

  • Member
  • PipPip
  • 301 posts

Posted 20 February 2018 - 07:33 PM

How do you propose to get everyone to change their tdm.pk4s in order to play a mission with that safe..?

I highlighted the relevant part that makes it pretty obvious, that the plot unsurprisingly contains the ingenious (and extremely common) action of shipping the fix with the mission, so players will not need to manually fix anything:

5. Make a folder called "scripts" in your project folder (the name of the map) and place the script file in here.


  • Obsttorte likes this

#8046 teh_saccade

teh_saccade

    Advanced Member

  • Member
  • PipPipPip
  • 630 posts

Posted 21 February 2018 - 05:06 AM

Oi, clever clogs - Allow me to highlight that tdmbase01.pk4 is one of the game files, not the mission file...

How do I go about updating and altering scripts inside of the base TDM .pk4's with my mission.pk4 script, rather than have to fix base tdmbase01.pk4 if I'd like to use this..?

 

// Did anyone test to see if changing tdmbase01.pk4 script means that A New Job still works? (yes it does).

Sarcasm and trying to be a smartarse doesn't really help anyone, right?
An explanation as to help people understand how they can use this ingenious and extremely common method of including a fix for TDM base file FUBARS would probably be more useful, I'd reckon.
 

Where in the solution does it say, "oh you can just use your custom script to fix the fact that there's a call for a missing routine that causes the crash, by scripting a change to the base01 script?".

Also the folder isn't "../scripts" - it's "../script".

Try.
Writing.
After.
Thinking.
 

Grayman said:

Since closeBar() doesn't exist, either that line in the SVN version of tdm_numberwheel_lock.script has to be removed, or Obs needs to provide the missing routine.

Edited by teh_saccade, 21 February 2018 - 10:02 AM.

  • pariah likes this

#8047 Dragofer

Dragofer

    Modeler

  • Member
  • PipPip
  • 486 posts

Posted 21 February 2018 - 05:49 AM

You can replicate parts of the folder structure of the darkmod install within your mission package and supply your modified version of the original file. TDM will prefer your FM's version over the original. The problem with this is that your FM won't accept future official updates of those files.


  • Abusimplea and teh_saccade like this

#8048 teh_saccade

teh_saccade

    Advanced Member

  • Member
  • PipPipPip
  • 630 posts

Posted 21 February 2018 - 06:08 AM

There we go, thanks Dragofer - not only have you clearly and directly given a hint as to what to look at doing in an instance such as this, you've also highlighted why it's not always the most ingenious solution to the issue 'cos it can cause problems in the future.

From what you've said, it can be understood that - yes, the script you place (that isn't called customscript.script) into your scripts folder will be used in place of the one named within tdmbase01.pk4, if it has the same name as the script it's going to replace. Furthermore, elaborated that other parts of TDM base might be altered in the same way.

That's a decent answer to the question as to why it works and how.


/* I've updated the wiki with an example, alarm script - it's not mentioned anywhere else - as well as clear up the .dds not being a bitmap issue with fonts. Not mentioned GUIs, defs or anything.
http://wiki.thedarkm...tructure#script */


Edited by teh_saccade, 21 February 2018 - 09:46 AM.

  • Dragofer likes this

#8049 Abusimplea

Abusimplea

    Member

  • Member
  • PipPip
  • 301 posts

Posted 21 February 2018 - 04:18 PM

Try.

Writing.
After.
Thinking.

Please do that in the future. Thanks.


  • Obsttorte and pariah like this

#8050 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 36992 posts

Posted 21 February 2018 - 04:50 PM

Now the custom script file overwrites the faulty stock TDM one,

 

 

It would be a better all around solution to get that working generically, rather than having to make alternate versions for each mission. 

 

What does the closebar function do that NewJob needs but other maps don't?





Reply to this topic



  


2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users