Jump to content
The Dark Mod Forums

Random text selection


Springheel

Recommended Posts

How difficult would it be to get a gui (the loading screen) to randomly select from a list of text windows?

 

I added a "Tip" to the loading screen of Builder's Influence to tell players about shouldering bodies, so people will have no excuse for not knowing you can do it. It occurred to me that there are going to be lots of other features added in this new update that players won't know about (like the crouch indicator) and that loading screen tips would be a great way to inform players about them.

 

At one tip per mission, though, it's not a very effective method. What I was hoping I could do is make a list of important tips and have the gui randomly pick from them, so players will see a different one each time they load the map. We could even update the loading screen template gui every time we get a new feature to inform people about.

 

Is this even feasible without tremendous work?

Link to comment
Share on other sites

Yup, found a way to do that. The new PK4 in the release branch is supporting that now. Use the following GUI event to read out the "gui::random_value" state variable. The event will be fired by the SDK code as soon as the random_value is set.

 

onNamedEvent OnRandomValueInitialised
{
if ("gui::random_value" < 0.1)
{
set "TextLoading::text" "Text1";
}
else if ("gui::random_value" < 0.2)
{
set "TextLoading::text" "Text2";
}
else if ("gui::random_value" < 0.3)
{
set "TextLoading::text" "Text3";
}
else if ("gui::random_value" < 0.4)
{
set "TextLoading::text" "Text4";
}
else if ("gui::random_value" < 0.5)
{
set "TextLoading::text" "Text5";
}
else if ("gui::random_value" < 0.6)
{
set "TextLoading::text" "Text6";
}
else if ("gui::random_value" < 0.7)
{
set "TextLoading::text" "Text7";
}
else if ("gui::random_value" < 0.8)
{
set "TextLoading::text" "Text8";
}
else if ("gui::random_value" < 0.9)
{
set "TextLoading::text" "Text9";
}
else
{
set "TextLoading::text" "Text10";
}
}

(The indentation has been screwed by the forum code block). This is just an example supporting 10 different texts of roughly equal probability in a "TextLoading" windowDef. The "gui::random_value" will be in the range [0..1), so if you need more or less than 10 values as in the example, you need to adjust the if () clauses in the GUI code accordingly.

Link to comment
Share on other sites

Any others people can think of?

 

Tip: You can shoulder bodies while dragging them by hitting the "Use" key.

 

Tip: The wings on the lightgem lower to let you know when you are crouched.

 

Tip: Special helmets with face grills make their wearers completely immune to the blackjack.

 

Tip: When alerted, all guards with helmets are immune to the blackjack.

 

Tip: When alerted, guards pay closer attention to everything they see and hear.

 

Tip: How well AI fight depends on whether they are set as Novice, Trained or Skilled.

 

Tip: You can change the difficulty of combat and lockpicking in the Settings menu.

 

Tip: You can call your Objectives during the game by pressing "O".

 

 

Link to comment
Share on other sites

Hmmm, maybe some melee tips, like:

 

Tip: When fighting in narrow hallways, use downward slashing and thrusting attacks to avoid getting caught up on the walls.

 

Tip: The perfect time to run away from a fight is after you hit your opponent or make them parry.

 

Tip: When fighting, be sure to vary your attacks. Opponents will anticipate repeated attacks along the same direction.

 

Tip: When fighting, it's easier to hit an opponent right after you parry their attack.

 

Add to blackjacking tips:

Tip: Guards with any kind of helmet are more difficult to knock out. Try to hit them dead center on the back of the head.
Link to comment
Share on other sites

What's the best way to provide these tips to mappers as a default? Do mappers generally use the startpack for the loading screen?

Link to comment
Share on other sites

Yes, almost all the FMs used the startpack template. They could be added to that. But I think this should be a player option. I can hear the complaints already; especially in years to come when most players will have seen the tips over and over. With new software I often leave the startup tips for a few days or weeks but eventually turn them off. Can a gui read a cvar? I suppose the code needs to read a cvar to set a gui variable?

 

 

Tip: Change crouch mode on ropes and ladders to exit safely.

Tip: Carried candles can be snuffed out with the 'use' control.

Tip: Candles and torches can be lit by other flames and matches.

Tip: You can lean in three directions to see round and over obstructions.

Tip: To lift up an object quietly first raise your view just above it.

Tip: Crouch mode underwater stops you floating up.

Tip: The enemy can feel you in the dark. Don't let them brush past you.

Link to comment
Share on other sites

I can hear the complaints already; especially in years to come when most players will have seen the tips over and over.

 

Mappers add text to loading screens all the time; why would people complain about it? It's not like it's a pop-up window or something.

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

    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 3 replies
    • 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
       
      · 7 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
×
×
  • Create New...