Jump to content
The Dark Mod Forums

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


Recommended Posts

Posted

Is there a way to make the on-screen message stay longer, when you pick up a special loot item?

shadowdark50.gif keep50.gif
Posted

help??? I'll just release without this if I have to, but it would be nice :)

shadowdark50.gif keep50.gif
Posted

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.

Posted

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
Posted

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?

Posted

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
Posted

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?

Posted

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.

Posted

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

Posted

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

shadowdark50.gif keep50.gif
Posted

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

Posted

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
Posted

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

shadowdark50.gif keep50.gif
Posted

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

Posted

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

Posted

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

Posted

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

shadowdark50.gif keep50.gif
Posted

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

Posted

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.

Posted

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

shadowdark50.gif keep50.gif
Posted

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

Posted

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

Posted

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

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

    • nbohr1more

      TDM is now in the Top 100 for Mod of the Year! Please vote again: https://www.moddb.com/mods/the-dark-mod
      · 1 reply
    • snatcher

      Author of the Visible Player Hands mod: please come forth and collect a round of applause!
      · 2 replies
    • nbohr1more

      Holiday TDM Moddb article is now up: https://www.moddb.com/mods/the-dark-mod/news/happy-holidays-from-the-dark-mod
      · 0 replies
    • nbohr1more

      Cool thing: Thanksgiving break means I don't have to get my son up before dawn

      Not cool thing: My son stays up all night on my PC so I don't get much TDM time...
      · 3 replies
    • datiswous

      Does anyone know if the mission/map in this video posted by @Springheel can still be found somewhere and played? Looks like fun.
       
      · 2 replies
×
×
  • Create New...