Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

http://wiki.thedarkmod.com/index.php?title=Limits,_Max,_Min,_Stats,_etc#Slopes_and_Steps

The maximum step height for AI and player is 16 though some AI cannot step up over 14 and perhaps less.


You don't need monsterclip for ordinary worldspawn brush steps.

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

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

    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
×
×
  • Create New...