I'm trying to add my own custom tips to the TTT tip rotation on top of what's already there. This is what's there currently, in english.lua;
[lua]--- Tips, shown at bottom of screen to spectators
-- Tips panel
L.tips_panel_title = "Tips"
L.tips_panel_tip = "Tip:"
-- Tip texts
L.tip1 = "Traitors can search a corpse silently, without confirming the death, by holding {walkkey} and pressing {usekey} on the corpse."
L.tip2 = "Arming a C4 explosive with a longer timer will increase the number of wires that cause it to explode instantly when an innocent attempts to disarm it. It will also beep softer and less often."
L.tip3 = "Detectives can search a corpse to find who is 'reflected in its eyes'. This is the last person the dead guy saw. That does not have to be the killer if they were shot in the back."
L.tip4 = "No one will know you have died until they find your dead body and identify you by searching it."
L.tip5 = "When a Traitor kills a Detective, they instantly receive a credit reward."
L.tip6 = "When a Traitor dies, all Detectives are rewarded equipment credits."
L.tip7 = "When the Traitors have made significant progress in killing innocents, they will receive an equipment credit as reward."
L.tip8 = "Traitors and Detectives can collect unspent equipment credits from the dead bodies of other Traitors and Detectives."
L.tip9 = "The Poltergeist can turn any physics object into a deadly projectile. Each punch is accompanied by a blast of energy hurting anyone nearby."
L.tip10 = "As Traitor or Detective, keep an eye on red messages in the top right. These will be important for you."
L.tip11 = "As Traitor or Detective, keep in mind you are rewarded extra equipment credits if you and your comrades perform well. Make sure you remember to spend them!"
L.tip12 = "The Detectives' DNA Scanner can be used to gather DNA samples from weapons and items and then scan to find the location of the player who used them. Useful when you can get a sample from a corpse or a disarmed C4!"
L.tip13 = "When you are close to someone you kill, some of your DNA is left on the corpse. This DNA can be used with a Detective's DNA Scanner to find your current location. Better hide the body after you knife someone!"
L.tip14 = "The further you are away from someone you kill, the faster your DNA sample on their body will decay."
L.tip15 = "Are you Traitor and going sniping? Consider trying out the Disguiser. If you miss a shot, run away to a safe spot, disable the Disguiser, and no one will know it was you who was shooting at them."
L.tip16 = "As Traitor, the Teleporter can help you escape when chased, and allows you to quickly travel across a big map. Make sure you always have a safe position marked."
L.tip17 = "Are the innocents all grouped up and hard to pick off? Consider trying out the Radio to play sounds of C4 or a firefight to lead some of them away."
L.tip18 = "Using the Radio as Traitor, you can play sounds through your Equipment Menu after the radio has been placed. Queue up multiple sounds by clicking multiple buttons in the order you want them."
L.tip19 = "As Detective, if you have leftover credits you could give a trusted Innocent a Defuser. Then you can spend your time doing the serious investigative work and leave the risky bomb defusal to them."
L.tip20 = "The Detectives' Binoculars allow long-range searching and identifying of corpses. Bad news if the Traitors were hoping to use a corpse as bait. Of course, while using the Binoculars a Detective is unarmed and distracted..."
L.tip21 = "The Detectives' Health Station lets wounded players recover. Of course, those wounded people could be Traitors..."
L.tip22 = "The Health Station records a DNA sample of everyone who uses it. Detectives can use this with the DNA Scanner to find out who has been healing up."
L.tip23 = "Unlike weapons and C4, the Radio equipment for Traitors does not contain a DNA sample of the person who planted it. Don't worry about Detectives finding it and blowing your cover."
L.tip24 = "Press {helpkey} to view a short tutorial or modify some TTT-specific settings. For example, you can permanently disable these tips there."
L.tip25 = "When a Detective searches a body, the result is available to all players via the scoreboard by clicking on the name of the dead person."
L.tip26 = "In the scoreboard, a magnifying glass icon next to someone's name indicates you have search information about that person. If the icon is bright, the data comes from a Detective and may contain additional information."
L.tip27 = "As Detective, corpses with a magnifying glass after the nickname have been searched by a Detective and their results are available to all players via the scoreboard."
L.tip28 = "Spectators can press {mutekey} to cycle through muting other spectators or living players."
L.tip29 = "If the server has installed additional languages, you can switch to a different language at any time in the Settings menu."
L.tip30 = "Quickchat or 'radio' commands can be used by pressing {zoomkey}."
L.tip31 = "As Spectator, press {duckkey} to unlock your mouse cursor and click the buttons on this tips panel. Press {duckkey} again to go back to mouseview."
L.tip32 = "The Crowbar's secondary fire will push other players."
L.tip33 = "Firing through the ironsights of a weapon will slightly increase your accuracy and decrease recoil. Crouching does not."
L.tip34 = "Smoke grenades are effective indoors, especially for creating confusion in crowded rooms."
L.tip35 = "As Traitor, remember you can carry dead bodies and hide them from the prying eyes of the innocent and their Detectives."
L.tip36 = "The tutorial available under {helpkey} contains an overview of the most important keys of the game."
L.tip37 = "On the scoreboard, click the name of a living player and you can select a tag for them such as 'suspect' or 'friend'. This tag will show up if you have them under your crosshair."
L.tip38 = "Many of the placeable equipment items (such as C4, Radio) can be stuck on walls using secondary fire."
L.tip39 = "C4 that explodes due to a mistake in disarming it has a smaller explosion than C4 that reaches zero on its timer."
L.tip40 = "If it says 'HASTE MODE' above the round timer, the round will at first be only a few minutes long, but with every death the available time increases (like capturing a point in TF2). This mode puts the pressure on the traitors to keep things moving."
L.tip41 = "Test"[/lua]
As you can see at the bottom, I added a 41st tip, "Test". I loaded up Garry's Mod and TTT, and went through the tip rotation, but I didn't see "Test" in the rotation at all, indicating that there's probably a value in this file or some other file saying how many tips should be rotated... In other words, I need to know what to do to add more tips. Any ideas?
Well, looking into cl_tips.lua inside of the TTT files, you can see this line:
[code]
for i=1, 40 do
table.insert(tip_ids, i)
end
[/code]
Change 40 to the number of the last tip you add.
[QUOTE=HumbleTH;46712770]Well, looking into cl_tips.lua inside of the TTT files, you can see this line:
[code]
for i=1, 40 do
table.insert(tip_ids, i)
end
[/code]
Change 40 to the number of the last tip you add.[/QUOTE]
Nice find, I'll take a look at it when I can and I'll mark this topic as solved if it works. Thanks for the help!
[editline]14th December 2014[/editline]
Yep, that worked. Thanks!
Sorry, you need to Log In to post a reply to this thread.