Jump to content
The Dark Mod Forums

Recommended Posts

Posted (edited)

Does anyone know if its possible to differentiate between when the player presses the frob key or the use key on a door?

 

I have a trigger set to go off when the player frobs a door using stim & response and it works fine but if the player presses the use key nothing happens

Edited by Goldwell
Posted

I might be wrong but I thnk the use key works only on inventory items, which can then optionally check whether you have something in front of you for them to be used on. So you might need to be holding a specific item to get scripts to go off using the use key.

Posted

Just a random AI question (probably for Grayman) - when an AI gets alerted what logic does it follow when searching for the player? Is it just a matter of having the AI go to the spot which generated the suspicion and then moving out from that spot in random directions? I know that AI work together now to do searches, but how exactly does that work?

But you should walk having internal dignity. Be a wonderful person who can dance pleasantly to the rhythm of the universe.

-Sun Myung Moon

 

My work blog: gfleisher.blogspot.com

Posted

As far as I know, they also ray trace and prioritize potential hiding spots using some magic algorithm, and dynamically search for the player. Which is why it's not always a good idea to hide from AI in a typical place, as it's usually the first or second place they look, as long as it's not too far away from where they saw you.

Or I'm totally wrong and remembering from a different game.

I always assumed I'd taste like boot leather.

 

Posted

Be well! I spent yesterday in the hospital too because of a lousy stomach virus. =L

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Posted

Just a random AI question (probably for Grayman) - when an AI gets alerted what logic does it follow when searching for the player? Is it just a matter of having the AI go to the spot which generated the suspicion and then moving out from that spot in random directions? I know that AI work together now to do searches, but how exactly does that work?

 

Each alert has an origin associated with it, and a "box" for the AI to search around in. A program fills in a list of likely hiding places in that box to look at, and the AI is sent to each in turn until a - he runs out of suggestions, b - he finds the player, c - he's called away by a different alert, d - his alert level drops below 'searching'.

 

If more than one AI is drawn to the same alert, in order to keep them from stomping all over each other, there are rules that allow the AI to take on the following roles:

 

active searcher - search around the search area

guard - stand somewhere nearby and keep an eye on the progress of the search, probably guarding a choke point or valuable object

observer - stand somewhere nearby and try to keep out of the way, but be ready if the player is found

 

The program decides who to assign to what, based on each AI's abilities.

Posted

How do you edit the main menu DDS files? When I open them in GIMP and save as the same file (and even when I'm not changing anything), then upon launching TDM, this picture is not there anymore. Instead where it should have been everything is white. However, when I open the same picture file in GIMP again, it looks perfectly the same.

 

For example: I opened

 

 

darkmod\tdm_gui01.pk4\dds\guis\assets\mainmenu\background_empty.dds

 

 

in GIMP, just clicked "overwrite background_empty", then let the zip archive refresh, and launched TDM.

It looked like this (see attached file, I'm not really sure which image extension I'm allowed to use here... :ph34r: ):

 

Can someone please help me how to edit the pictures? I really want to mess around with the menu!

post-21200-0-70304900-1437314194_thumb.jpg

Posted

You're losing the alpha channel when saving. If you're saving as a .dds you need to make sure you choose the option with a explicit alpha. I don't know GIMP, so can't tell you exactly how to do it with that software.

Posted (edited)

Ah! I tried that and somehow it works. I guess I need to refresh my knowledge on image basics. That is, when I mark the option "generate mipmaps", then the image appears as it should in the game. However, when I change the image to grayscale, then the same problem appears again. But it's only with grayscaling. I'll look into that tomorrow.

 

Thanks a lot! :)

 

edit: even that works now. I needed a gray-conversion-option that didn't delete my color channels (and found it in color-->desaturate).

Edited by Nico A.
Posted

I'd like to trigger something when the player runs out of breath. Is there a way for scripts to query the player's breath level?

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Posted

I'd like to trigger something when the player runs out of breath. Is there a way for scripts to query the player's breath level?

There's no script event for querying breath level, but you can get at it through the HUD gui, which needs the number to display the air meter. I just did a quick test adapted from one of grayman's scripts in Cleighmoor. In a test map, this script will repeatedly print the current air level to the console. It's a number from 0 to 100, where 100 is full breath .

 

The first bit of code finds the number of the main gui. That has to be done only once. Then the loop starts, which prints the air level every 0.25 seconds.

void printair()
{
    float hudGui = -1;
    float i = 0;
    for ( ; i < 10 ; i++ )
    {
        string guiName = $player1.getGui(i);
        if ( guiName == "guis/tdm_hud.gui" ) hudGui = i;
    }
    
    if (hudGui == -1)
    {
        // error, we couldn't find the main gui
        return;
    }
    
    while (1)
    {
        float airPercent = $player1.getGuiInt(hudGui, "player_air");
        sys.println("Breath level: " + airPercent);
        sys.wait(0.25);
    }
}

void main()
{
    thread printair();
}
  • Like 1
Posted

Quick question, sorry in advance if this happens to be mentioned on the wiki somewhere, couldn't find an answer yet:

Is it possible to split the text of my readable onto the two pages of the readable? In specific, I am using a atdm:readable_immobile_book_open01 entity and am getting this effect:

book_gui_ingame_zpsttbs2a34.jpg

 

Ideally I would want everything I defined as Page1's body in the xdata file to be on the left page, then have the text defined as Page2's body on the right page of the book. How can I achieve this?

  • Like 1
Posted

It sounds as though you're trying to set up the xdata manually. Just use DarkRadiant's readable editor instead (under the Entity drop-down at the top of the window) and choose something two-sided under 'GUI Definition'.

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Posted (edited)

To anyone interested in modular design :)

 

Skyrim's Modular Level Design - GDC 2013

 

I am currently reading this article (posted in another thread, very intersting!) and found a good question (did not know what to look for, to find in the Wiki, which is why I am asking here) on the topic "Thins to know before you begin": The hight of characters can be easily estimated by putting an AI into your level, but which height are crouched characters (i.e. how high can I make a vent)? How high can a ledge be so that the player can still grab it? How far can a player jump? How broad does a given space have to be, so AIs can pass each other unperturbed? How steep can an inlcine be that it can still be walked up by the player? What height is needed for an object to hide behind?

 

If this information is not available yet, I will test it and post it here, but I assume that these are known values for more experienced level designer...

Edited by Destined

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

    • JackFarmer

      "The Year of the Rat." 
      😄

      Al Stewart must be proud of you!
      Happy testing!
      @MirceaKitsune
      · 1 reply
    • datiswous

      I posted about it before, but I think the default tdm logo video looks outdated. For a (i.m.o.) better looking version, you can download the pk4 attached to this post and plonk it in your tdm root folder. Every mission that starts with the tdm logo then starts with the better looking one. Try for example mission COS1 Pearls and Swine.
      tdm_logo_video.pk4
      · 2 replies
    • JackFarmer

      Kill the bots! (see the "Who is online" bar)
      · 3 replies
    • STiFU

      I finished DOOM - The Dark Ages the other day. It is a decent shooter, but not as great as its predecessors, especially because of the soundtrack.
      · 5 replies
    • JackFarmer

      What do you know about a 40 degree day?
      @demagogue
      · 4 replies
×
×
  • Create New...