Jump to content
The Dark Mod Forums

how to adjust (lengthen) the on-screen message for an objective completion?


Komag

Recommended Posts

Nobody knows. I did a quick browse through some guis but didn't see anything. If this is some special item you want the player to know he has got it then maybe add some fine text to the inventory icon? Need to allow space for the hud text. It will disappear when the next loot item is picked up.

Link to comment
Share on other sites

Yeah, it shows in inventory with the name I gave it, so I guess that will just have to be good enough then, thanks :)

 

-oh, now I think you mean something more than just the name, but now that I've tested it some more I think it's good enough as is.

shadowdark50.gif keep50.gif
Link to comment
Share on other sites

The responsible gui is tdm_message.gui right? From what I gather by looking at it, it fades out when it receives a doFadeOut event from the engine.

 

The only way you'd be able to change the duration the message is displayed is if you were able to pass a value to the engine. Looking at the training map I see a few triggers have the key "message_long" along with a numerical value. Perhaps this will do the trick?

Link to comment
Share on other sites

That didn't work when put directly on the object. Might have to set up a whole trigger system for it to get the effect, don't want to mess with that right now though

shadowdark50.gif keep50.gif
Link to comment
Share on other sites

I don't think that is the same gui. That message gui is for the special help messages that show in the trainer. I think Komag means the message you see at the bottom of the screen whenever you pick up anything, eg,

 

"Acquired log book"

 

Which shows briefly as the item goes into the inventory. I think there is an option to turn that off. Maybe there is a cvar for the duration it shows?

 

BTW from what you are now saying I wonder is this really a loot item? If it shows in the inventory with a name then it's not loot because loot doesn't show it's individual inventory name - it just shows loot and the values. You mean a special objective item presumably?

Link to comment
Share on other sites

Browsing again I'm pretty sure it's tdm_inv.gui at the section headed...

 

Inventory Pickup Messages

 

But I wouldn't mess with that because if you customise that then it can conflict with a future update.

 

I can't see any obvious cvar. I think it's just a fade time in the above gui.

Link to comment
Share on other sites

If you make a small testmap and put in a tracker enty, I am fairly sure I can add a customize delay spawnarg to achieve what you want.

 

tdm_message.gui is indeed for the onscreen messages. It is however, sadly, not used by the training mission, it uses its own system of scripts (which I always wanted to throw out and replace with the simpler messages but have enough todo already)

"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

that would be for the next version of TDM though, right?

 

Of course, it is too late for this version since we already released it back in May and my time machine is broken again :D

"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

Okay, yeah yeah, I thought that, but I just wasn't sure how it worked like maybe it would be something I could include with my mission files or something.

 

I'm not sure how to upload a test map for it, I'll look into how the bug tracker wants that...

shadowdark50.gif keep50.gif
Link to comment
Share on other sites

Okay, I tracked it, and added the test map "notificationtime.map"

 

The time to display the message is hardcoded, but unfortunately in a GUI file in tdm_hud.gui:

 

       // greebo: This is used to display notifications like "Game Saved" and such
       // The state int "HasMessage" can be used to check whether a message is currently being processed (== "1")
       windowDef Message
       {
               rect            0,10,640,100
               textalign       1 // center
               text            "gui::MessageText"
               font            "fonts/carleton"
               forecolor       1,1,1,0
               visible         1
               textscale       0.35

               onTime 0 {
                       set "gui::HasMessage" "1";
                       transition "Message::forecolor" "1 1 1 0" "1 1 1 1" 200
               }

               onTime 3000 {
                       transition "Message::forecolor" "1 1 1 1" "1 1 1 0" 200
               }

               onTime 3300 {
                       // Signal that we are done here
                       set "gui::HasMessage" "0";
               }
       }

 

I am not sure it is possible to change the "onTime 3300" to something like "onTime gui::messageTime", if yes, then we can set it from code, if no, we would always have a particulare hard-coded time.

 

The code to display the normal "popup" messages that can be displayed during a mission as hints etc does work differently, it creates a new GUI, then adds the message, then waits for X seconds, then calls fadeout the removes the GUI. That works, but is quite more complicated.

"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

Ok, here is an idea:

 

* Lengthen the default time to 10 seconds (is 10 ok?)

* add

 

       // Restarts the message object
       onNamedEvent DisplayMessageLong {
               resetTime "Message" "0";
               set "Message::visible" "1";
       }

 

Then change:

 

       // Restarts the message object
       onNamedEvent DisplayMessage {
               resetTime "Message" "7000"; // 0 => 7000
               set "Message::visible" "1";
       }

 

e.g. reset the time normally to 7000. E.g. for normal pickup messages, only 3 seconds are left, for "long" messages we have the full 10 seconds.

 

Disadvantages: Still not player controllable, and still no variable time from code.

 

I'll toy abit around with the gui code.

"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

Hm, ok, after thinking here are our options:

 

* optional: make the cvar that contros the HUD messages from bool (0 => off, 1 => on) to a length multiplier (0 => off, 1 => normal length, 0.5 => half, 2.0 twice etc). This way players can tweak the message length on top of what we set for different messages. The in-game HUD messages, the pickup messages as well as the message GUI should use this factor to adjust their times.

* add a "message length" field to all in-game HUD messages, so they can have different length. Init this field from a spawnarg from the object that is picked up

* when displaying a inv pickup message, set the normal length (e.g. 3000 ms) x the cvar factor above

* when displaying a HUD message, set the normal length (e.g. whatever the spawnarg said or the default of 3000 ms) x the cvar factor above

 

Disadvantage of all that is:

 

* a bit of code work

* only works from v1.03 onwards

 

Short term solution for you, Komag:

 

* Use the message gui and just display your own message via a trigger on top of the normal pickup messag that says whatever it should say for however long.

"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

Right now it lasts about one second, three would probably be good

 

Strange, the tdm_hud.gui file has 3000ms (aka 3 seconds) in my SVN version?

"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

There is probably some loss somewhere along the line. It is rather fast although I don't really bother about it too much. You can see the acquired item in the inventory. As I recall, greebo asked for testing internally and one or two of us replied it was OK and so it seemed. I think this is harmless except it might annoy anyone who prefers minimal hud. Take the quick fix. Try adding 2 seconds but increase the fade time to 2 seconds (if the fade is part of the 2 seconds) so it is less obtrusive but can still be read. and if the majority are against it then mark it up to reduce it by 1 in the update after that.

Link to comment
Share on other sites

Well the messages at the TOP of the screen are about three seconds, it's the one's at the bottom that seem to be one second

 

Ah! Because I was about to code a solution to make the top message (new objective) last longer. So you say we need a way to make both longer.

 

Edit: The solution for both is the same, we need a way to:

 

* store the length for each message (currently the code only stores the message)

* pass that length to the GUI (this does not really work, it seems the GUI canonly read hard-coded strings for the time values, but not variable names, or at least I could not get this to work in almost an hour testing various combinations thereof). So we need to make a GUI that can display a message indefinitely long,then have the code to:

 

** start the message

** wait the desired amount

** stop/hide the message, then proceed

 

That means quite a few code-changes, I'll see that I get to that on the weekend (no promises, tho :)

"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

D'uh? You quote Komag saying effectively "the top one is OK, it's the bottom one is too quick" and you reply "So you say we need a way to make both longer." :laugh: You need to slow down the time you spend reading and increase thinking time. :D

 

I know what he wrote because I read it :) I am saying we need to make "both" longer because:

 

* both are sep. way how messages are handled (they are on two different GUIs)

* AND he wants the bottom one to be longer, but you can bet next week someone comes and wants the top one to be longer :)

* making the length adjustable is nearly the same wether I do it on one or two GUIs anyway. The code is basically the same..

 

So there :)

"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

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

    • 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.
      · 6 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
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...