Jump to content
The Dark Mod Forums

Apples and Peaches: Obsttorte's Mapping and Scripting Thread


Obsttorte

Recommended Posts

Caulk ceiling, caulk floors and/or noshadow ceiling vaultwork?

I recommend having vaultwork as noshadow and have the ceiling behind it to be real texture, not caulk. Caulk lets the light shine through.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Thanks, I'll try that out. :smile:

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

Didn't work :unsure: I don't think it has something to do with texturizing or leaking.

 

The light does not always shine trough, only when I open the door. But independently from whether the door is open or not the light source never gets rendered. :blink:

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

That is very typical of noshadows on something. A light with noshadows on will shine right through brushwork.

 

Why it happens when the door opens sounds very much like an internal leak between the leaf on the other side of the door and the floor below you. Opening that door opens its portal & renders everything in its leaf, and if that lower floor isn't hermetically sealed, it will render too. It's not just having portals that makes leafs, but they have to be absolutely hermetically sealed from each other or the portals are killed. The tiniest unportaled crack, or a hole only covered by a func_static can make an internal leak.

 

Note also that even "sealed" brushwork that's complex enough (strange angles or little slivers or protrusions) will cough-up the renderer and create an artificial crack. I had that happen many times in my early messy-brushwork days.

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

I only set up some very simple brushwork. Everything is rectangular. The portals are working properly (checked that with com_showFPS) and the leaf where the torches are in is not rendered (checked that with r_showTris). I have to check if the torches I used ave noshadows on by default, as I used other torches normally, but I don't think so.

 

Maybe I just go and replace the torches by other ones and see if this problem still occurs.

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 wanted to try some things that could enhance the possibilities for Hitman-style map (referring to the fact that you're counted as non-hostile by default). The feature I'm aiming for is to let the AI get hostile to the player when they see him lockpicking a door.

 

So I thought I could use the stim response system for this. The problem is that the door seems not react to any stims. I tried frob, water and gas. Especially the first case seems a bit strange to me as a door entity is something that should react to frobs by default. I used such things one loot some time ago and it worked very nice.

 

Any suggestions what may be the problem here? Thanks in advice.

 

If someone has another suggestion on how such a feature could be implemented I'll be happy to here.

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

This has been discussed a few times before, and solutions offered. Try a search?

Link to comment
Share on other sites

Well, doing a rough search doesn't give me much useful (in fact nothing). If you have something special in mind...?

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 don't know what the solutions were, I just remember it being discussed and various ideas presented...someone involved will speak up soon I'm sure.

Link to comment
Share on other sites

Well there were a lot of discussions about changing team relations and about the already in the wiki article described features.

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

In Remembrance of Him changes AI relations to the player when the player opens a particular door. This is a simple solution, and doesn't involve lockpicking. Look for the door named atdm_mover_door_32 and check its target.

 

There was a discussion, which I can't find now, of how an AI could recognize when the player is actively lockpicking a door. The solution was to write a script that checked whether a particular door was highlighted at the same time the player was using a lockpick. I forget who was trying to implement this, and it was probably asked in a thread like "So-and-so's mapping thread", making it difficult to dig out. I tried searching for "relation" and "lockpick" and came up empty.

Link to comment
Share on other sites

Well I searched for "lockpick" and "script" and found some discussion in the Newbie DR thread. You gave the solution btw. :smile:

 

So the result was that if the player highlights a door AND have lockpicks selected the AI would get alerted if seeing the player. This is relatively close but not exactly what I want.

 

This solution inhabits the following problem: Imagine the player stands in front of a door he just tried to open by simply frobbing it and sees, that it is locked. He knows that there are far too much guards around to try anything illegal, so he now plans how he could make progress. He scrolls trough his inventory to see what tools he has left and that could help him. Doing so, he also scrolls trough the lockpicks while still looking at the door and BOOOM, as there are guards nearby he suddenly becomes a thread.

 

I know this sounds a bit constructed. What I'm trying to say is, that scrolling through your inventory may not occur to most players as really taking the things out of your bag and looking at them. Especially when it comes to lockpicks, which are pretty small I think and could be hidden in the hands.

 

I think that most players would expect only the attempt of actually lockpicking the door as illegal, not having them selected while looking at a door. I will see if #I can change this behaviour a bit.

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

Update: I found out now how I can accompish the specific behaviour. It's quite close to what grayman suggested in the Newbie DR Thread.

 

This will be added to the script, which continuosly checks whether the player carries a weapon. I will update the wiki entry soon, but the basic steps I shall explain here:

 

- check if the player is highlighting something that is locked

- check whether the player has selected the lockpicks (one of them)

- check if the locked entity has a door handle

- check whether the handle is rotating

 

The only sidekick here is the case, when a locked entity, for example a little treasure chest, has no handle attached to it. This would lead to two possible cases:

 

- the AI won't notice the player lockpicking it

- the AI will behave as seeing the player lockpicking it if the player has just frobhighlighted the chest with the picks in his hands

 

Both possibilities are not very satisfactory, but can be bypassed by the mapper by adding a (possible invisible) handle to the specific chest

 

In the cases of doors and chests that have handles, the AI will only be alerted when the player really attempts to pick the lock, not just by having the lockpicks selected and looking on the door. I think this is an improvement.

 

Wiki update will follow.

 

Edit: This method suggests, that the player should not be able to enter through locked doors. Just for notice.

Edited by Obsttorte

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

Is it possible to change an AI's team once it gets to a certain alert level?

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

Sure it is. Make an objective "Entityname reaches alert level X" (was it "AI is alerted" or something?) and give that objective completion target, which calls a script (or entity business) that changes the team. Should work.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

The success script does not get any arguments. Obviously I could just go through all the AI's in the map, but if you have like three douzens of them, this gets quite unhandy. And everytime you change something, you have to change the script. :unsure:

 

Another question: Is there a possiblity to find out whether the player is currently holding an unconscious body. I tried entity heldEntity(), but this only gives you the unconscious AI if you frobbed it. Once you shoulder it, this method returns $null as if your hands were empty.

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

Another question: Is there a possiblity to find out whether the player is currently holding an unconscious body.

 

Not that I can see. We could add a script event named IsShoulderingBody() in 1.09.

 

Edit: A better solution would be to make heldEntity() return a shouldered body, since the player can't grab anything else while carrying the body.

Link to comment
Share on other sites

Not that I can see. We could add a script event named IsShoulderingBody() in 1.09.

If someone makes a tracker entry and assigns it to me, I can do this easily. Also something to find out what the player has in the grabber (I think you can onlymake him hold something, but not find out what he holds?)

 

We could also add a "isCurrentlyLockpicking()" method (that might even get some arguments like "onlyifCurrentlyPicking" so you can alert AI if the player just holds picks, or actually uses them).

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

I just made another test. As long as you shoulder an unconscious or dead body, the AI completely ignores it. It only gets alerted when you drop the body. This is really weird behaviour. :unsure:

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

We have specific barks for AI spotting the player while holding a body, ("Hey, drop that body and surrender!"). I'm relatively certain I've heard them while playing, so there must be some way that the code checks whether the player has a body. I don't think it distinguishes between alive or dead though, and it would only play if the AI was hostile to the player.

Link to comment
Share on other sites

Some other starting point: I noticed that whenever I shoulder the body there is the line "Equip called" writtten to the console. when I drop the body, line "Dequip called" is printed to the console. I'll see if that gets me somewhere.

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

OK, found it out. I can set equip_action_script and dequip_action_script on the AI. The specified scripts then get called when (un)shouldering the AI. :smile:

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

UPDATE:

 

I noticed that the there are some minor mistakes in the code on the wiki causing the setup not to work as intented. I made the changes and will update the wiki as soon as possible. :smile:

 

The actual version implements the following behavior: Guards get hostile when

  • you get seen steeling something
  • you get seen lockpicking a door
  • you get seen carrying a weapon
  • you get seen in an area you're not suppossed to be
  • you get seen grabbing or shouldering an unconscious or dead body

I still need to implement the behaviour that AI gets hostile when seeing you opening a door with a key you are not suppossed to possess. What also neeeds implementation is that they get hostile when you for example throw a flashbomb at them or attack them. (If you attack them from behind without killing them and put away your weapon fast enough they won't notice it was you who attacked them).

 

With this setup always every AI on a specific team gets hostile to you. The only way to bypass this behaviour a bit is to use several teams for several areas, all friendly to each other. In this case only a specific team will be alerted. So if the player gets far enough away the AI there is still neutral to him. The other teams could get set hostile after a while like if they were informed about the identity of the intruder. I'm not sure this is neccessary. At least it will cost some effort to implement this on a specific map.

 

When I made the last changes I will update the wiki and post an example map here.

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

OK. I've implemented the reaction to flash bombs and mines. I also tried to add a reaction for standard mines, but that didn't work. One approach was to use the objective system, but it seems that the specific objective type "AI finds item" is not implemented yet. Another thought was to use stim/response. The problem here is that I don't know how to activate the stim after the player dropped the mine. So this must be left out.

 

"Opening doors you're not suppossed to have the key for" can be implemented the same way the loot thingy. You just need to let the door target the same both entities as the loot does.

 

Here is an example map that shows all the above mentioned features. The AI is friendly to you. The left door from the start is locked and should not be opened (the key for the door is in your inventory). The right door is unlocked, but you're not allowed to enter there.

 

The zip file contains the map and the script file. Put that in your darkmod/maps folder and dmap it for testing.

hitmanstyle.zip.txt

Edited by Obsttorte

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

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

    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 2 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
×
×
  • Create New...