mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Implements periodic tips for (new) players!
This commit is contained in:
@@ -94,6 +94,7 @@ var/global/list/runlevel_flags = list(RUNLEVEL_LOBBY, RUNLEVEL_SETUP, RUNLEVEL_G
|
|||||||
|
|
||||||
// Subsystem fire priority, from lowest to highest priority
|
// Subsystem fire priority, from lowest to highest priority
|
||||||
// If the subsystem isn't listed here it's either DEFAULT or PROCESS (if it's a processing subsystem child)
|
// If the subsystem isn't listed here it's either DEFAULT or PROCESS (if it's a processing subsystem child)
|
||||||
|
#define FIRE_PRIORITY_PLAYERTIPS 5
|
||||||
#define FIRE_PRIORITY_SHUTTLES 5
|
#define FIRE_PRIORITY_SHUTTLES 5
|
||||||
#define FIRE_PRIORITY_SUPPLY 5
|
#define FIRE_PRIORITY_SUPPLY 5
|
||||||
#define FIRE_PRIORITY_NIGHTSHIFT 5
|
#define FIRE_PRIORITY_NIGHTSHIFT 5
|
||||||
|
|||||||
16
code/controllers/subsystems/player_tips.dm
Normal file
16
code/controllers/subsystems/player_tips.dm
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
/*
|
||||||
|
Player tips procs and lists are defined under /code/modules/player_tips_vr
|
||||||
|
*/
|
||||||
|
SUBSYSTEM_DEF(player_tips)
|
||||||
|
name = "Periodic Player Tips"
|
||||||
|
priority = FIRE_PRIORITY_PLAYERTIPS
|
||||||
|
runlevels = RUNLEVEL_GAME
|
||||||
|
|
||||||
|
wait = 3000 //We check if it's time to send a tip every 5 minutes (300 seconds)
|
||||||
|
var/static/datum/player_tips/player_tips = new
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/datum/controller/subsystem/player_tips/fire()
|
||||||
|
player_tips.send_tips()
|
||||||
@@ -370,6 +370,12 @@ var/list/_client_preferences_by_type
|
|||||||
enabled_description = "Hear"
|
enabled_description = "Hear"
|
||||||
disabled_description = "Silent"
|
disabled_description = "Silent"
|
||||||
|
|
||||||
|
/datum/client_preference/player_tips
|
||||||
|
description = "Receive Tips Periodically"
|
||||||
|
key = "RECEIVE_TIPS"
|
||||||
|
enabled_description = "Enabled"
|
||||||
|
disabled_description = "Disabled"
|
||||||
|
|
||||||
/********************
|
/********************
|
||||||
* Staff Preferences *
|
* Staff Preferences *
|
||||||
********************/
|
********************/
|
||||||
|
|||||||
@@ -124,3 +124,17 @@
|
|||||||
SScharacter_setup.queue_preferences_save(prefs)
|
SScharacter_setup.queue_preferences_save(prefs)
|
||||||
|
|
||||||
feedback_add_details("admin_verb", "TSoundMentorhelps")
|
feedback_add_details("admin_verb", "TSoundMentorhelps")
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
|
||||||
|
/client/verb/toggle_player_tips()
|
||||||
|
set name = "Toggle Receiving Player Tips"
|
||||||
|
set category = "Preferences"
|
||||||
|
set desc = "When toggled on, you receive tips periodically on roleplay and gameplay."
|
||||||
|
|
||||||
|
var/pref_path = /datum/client_preference/player_tips
|
||||||
|
|
||||||
|
toggle_preference(pref_path)
|
||||||
|
|
||||||
|
to_chat(src, "You are [ (is_preference_enabled(pref_path)) ? "now" : "no longer"] periodically receiving advice on gameplay and roleplay.")
|
||||||
|
>>>>>>> d260f6be19... Merge pull request #14456 from Runa-Dacino/HelpfulTips
|
||||||
|
|||||||
48
code/modules/player_tips_vr/player_tips_controller_vr.dm
Normal file
48
code/modules/player_tips_vr/player_tips_controller_vr.dm
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
/*Main file that controls frequency of OOC player tips
|
||||||
|
Whether player tips start firing at all is determined by a global preference
|
||||||
|
Weighted list of player tips held in a separate file.
|
||||||
|
Controlled by the player_tips subsystem under code/controllers/subsystems/player_tips
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
/datum/player_tips
|
||||||
|
var/min_tip_delay = 45 MINUTES
|
||||||
|
var/max_tip_delay = 75 MINUTES
|
||||||
|
var/tip_delay = 5 MINUTES //10 minute initial delay for first tip of the day. Timer starts 5 minutes after game starts, plus 5 minutes here. Gets overwritten afterwards
|
||||||
|
var/last_tip_time = 0
|
||||||
|
var/last_tip = null
|
||||||
|
|
||||||
|
//Called every 5 minutes as defined in the subsystem.
|
||||||
|
/datum/player_tips/proc/send_tips()
|
||||||
|
if(world.time > last_tip_time + tip_delay)
|
||||||
|
var/tip = pick_tip("none") //"none" picks a random topic of advice.
|
||||||
|
var/stopWhile = 0
|
||||||
|
while(tip == last_tip) //Prevent posting the same tip twice in a row if possible, but don't force it.
|
||||||
|
tip = pick_tip("none")
|
||||||
|
stopWhile = stopWhile + 1
|
||||||
|
if(stopWhile >= 10)
|
||||||
|
break
|
||||||
|
|
||||||
|
for(var/mob/M in player_list)
|
||||||
|
if(M.is_preference_enabled(/datum/client_preference/player_tips))
|
||||||
|
if(!last_tip) //Notifying players how to turn tips off, or call them on-demand in a personalized manner.
|
||||||
|
to_chat(M, SPAN_WARNING("You have periodic player tips enabled. You may turn them off at any time with the Toggle Receiving Player Tips verb in Preferences, or in character set up under the OOC tab!\n Player tips appear every 45-75 minutes."))
|
||||||
|
to_chat(M, SPAN_NOTICE("[tip]"))
|
||||||
|
|
||||||
|
last_tip = tip
|
||||||
|
tip_delay = rand(min_tip_delay, max_tip_delay)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/mob/living/verb/request_automated_advice()
|
||||||
|
set name = "Request Automated Advice"
|
||||||
|
set desc = "Sends you advice from a list of possibilities. You can choose to request a specific topic."
|
||||||
|
set category = "OOC"
|
||||||
|
|
||||||
|
var/choice = tgui_input_list(src, "What topic would you like to receive advice on?", "Select Topic", list("none","general","gameplay","roleplay","lore","cancel"))
|
||||||
|
if(choice == "cancel")
|
||||||
|
return
|
||||||
|
var/static/datum/player_tips/player_tips = new
|
||||||
|
to_chat(src, SPAN_NOTICE("[player_tips.pick_tip(choice)]"))
|
||||||
74
code/modules/player_tips_vr/player_tips_list_vr.dm
Normal file
74
code/modules/player_tips_vr/player_tips_list_vr.dm
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
/* List of player tips
|
||||||
|
Weighted to emphasize more important over less.area
|
||||||
|
Weights are not additive. You can have multiple prob(50) items.
|
||||||
|
prob(50) makes it half as likely to appear and so forth.
|
||||||
|
When editing the list, please try and keep similar probabilities near each other. High on top, low on bottom */
|
||||||
|
|
||||||
|
//argument determines if to pick a random tip or use a forced choice.
|
||||||
|
/datum/player_tips/proc/pick_tip(var/isSpecific)
|
||||||
|
var/choice = null
|
||||||
|
if(!(isSpecific == "none" || isSpecific == "general" || isSpecific == "gameplay" || isSpecific == "roleplay" || isSpecific == "lore" ))
|
||||||
|
choice = "none" //Making sure that wrong arguments still give tips.
|
||||||
|
if(isSpecific == "none")
|
||||||
|
choice = pick (
|
||||||
|
prob(50); "general",
|
||||||
|
prob(50); "gameplay",
|
||||||
|
prob(25); "roleplay",
|
||||||
|
prob(20); "lore"
|
||||||
|
)
|
||||||
|
else
|
||||||
|
choice = isSpecific
|
||||||
|
|
||||||
|
switch(choice)
|
||||||
|
if("general")
|
||||||
|
var/info = "The following is a general tip to playing on VOREStation! \n"
|
||||||
|
return pick(
|
||||||
|
prob(60); "[info] Got a question about gameplay, roleplay or the setting? Press F1 to Mentorhelp!",
|
||||||
|
prob(60); "[info] We have a wiki that is actively updated! Please check it out at https://wiki.vore-station.net/Main_Page for help!",
|
||||||
|
prob(60); "[info] Unsure about rules? Press F1 and ask our admins for clarification - they are happy to help.",
|
||||||
|
prob(30); "[info] Don't be afraid to approach your fellow players for advice! Learning things ICly can help build powerful bonds!",
|
||||||
|
prob(30); "[info] Need some guideance making a character or with roleplay concepts? Our discord's Cadet-Academy and Lore channels are happy to help!",
|
||||||
|
prob(30); "[info] Having difficulties getting started? Pressing F3 to speak and typing '; Hello! I'm a new hire. Could someone please give me a tour?' or as appropriate for your character is a good way to start! More help available at: https://wiki.vore-station.net/The_Basics",
|
||||||
|
prob(30); "[info] Want to try out a new department? Consider joining as an intern when it's well-staffed. Our players enjoy teaching eager students. You can approach such roleplay as simply getting taught the local technologies, procedures - you don't need to be 'fresh out of school' to justify it!",
|
||||||
|
prob(30); "[info] Our discord is an excellent resource to stay up to date about changes and events! If wanting to separate your kink and real identities, Discord has a built in means to swap accounts within the client. It is OK to lurk!",
|
||||||
|
prob(5); "[info] Got another tip for the list? Please let us know on Discord/Dev-suggestions!"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
if("gameplay")
|
||||||
|
var/info = "The following is a gameplay-focused tip to playing on VORESTation \n"
|
||||||
|
return pick(
|
||||||
|
prob(50); "[info] To talk to your fellow coworkers, use ';'! You may append it by an exclamation mark, like ';!' to perform an audiable emote. ",
|
||||||
|
prob(50); "[info] Lost on the map? You can find In-Character help by speaking on the Common Radio. You can do this by pressing F3 and typing ' ; ' before your message. Your fellow co-workers will likely help. If OOC help is preferred, press F1 for mentorhelp. ",
|
||||||
|
prob(50); "[info] You may set your suit sensors by clicking on the icon in the bottom left corner, then right click the clothes that appear right above it. It is recommended to turn on suit sensors to 'TRACKING' before doing anything dangerous like mining, and to turn them off before digestion scenes as prey.",
|
||||||
|
prob(35); "[info] It is never a bad idea to visit the medbay if you get injured - small burns and cuts can get infected and become harder to treat! If there is no medical staff, bathrooms and the bar often has a NanoMed on the wall - with ointments to disinfect cuts and burns, bandages to treat bruises and encourage healing.",
|
||||||
|
prob(25); "[info] Two control modes exist for SS13 - hotkey ON and hotkey OFF. You can swap between the two modes by pressing TAB. In hotkey mode, to chat you need to press T to say anything which creates a small talking bubble. You can consult our list of hotkeys at https://wiki.vore-station.net/Keyboard_Shortcuts",
|
||||||
|
prob(25); "[info] Do you want to shift your character around, for instance to appear as if leaning on the wall? Press CTRL + SHIFT + arrow keys to do so! Moving resets this.",
|
||||||
|
prob(25); "[info] Emergency Fire Doors seal breaches and keep active fires out. Please do not open them without good reason.",
|
||||||
|
prob(25); "[info] The kitchen's Oven can fit multiple ingredients in one slot if you pull the baking tray out first. This is required for most recipes, and the Grille and Deep Frier work the same way!",
|
||||||
|
prob(10); "[info] You can keep a single item between rounds using secure lockboxes! Beware! You can only store 1 item across all characters! To find these lockboxes, feel free to ask over radio!",
|
||||||
|
prob(10); "[info] Not every hostile NPC you encounter while mining or exploring need to be defeated. Sometimes, it's better to avoid or run away from them. For example, star-treaders are slow and weak but have lots of HP - it is better to just run away."
|
||||||
|
)
|
||||||
|
|
||||||
|
if("roleplay")
|
||||||
|
var/info = "The following is a roleplay-focused tip to playing on VORESTation \n"
|
||||||
|
return pick(
|
||||||
|
prob(50); "[info] Having difficulty finding scenes? The number one tip that people should take for finding scenes is to be active! Generally speaking, people are more likely to interact with you if you are moving about and doing things. Don't be afraid to talk to people, you're less likely to be approached if you're sat alone at a table silently. People that are looking for scenes generally like to see how you type and RP before they'll start working towards a scene with you.",
|
||||||
|
prob(50); "[info] Please avoid a character that knows everything. Having only a small set of jobs you are capable of doing can help flesh out your character! It's OK for things to break and fail if nobody is around to fix it - you do not need to do others' jobs.",
|
||||||
|
prob(25); "[info] Embrace the limits of your character's skillsets! Seeking out other players to help you with a more challenging task might build friendships, or even lead to a scene!",
|
||||||
|
prob(25); "[info] Slowing down when meeting another player can help with finding roleplay! Your fellow player might be typing up a greeting or an emote, and if you run off you won't see it!",
|
||||||
|
prob(25); "[info] It is a good idea to wait a few moments after using mechanics like lick, hug or headpat on another player. They might be typing up a response or wish to reciprocate, and if you run away you might miss out!",
|
||||||
|
prob(25); "[info] Participating in an away mission and see something acting strange? Try emoting or talking to it before resorting to fighting. It may be a GM event!",
|
||||||
|
prob(15); "[info] We are a heavy roleplay server. This does not neccessarily mean 'serious' roleplay, levity and light-hearted RP is more than welcome! Please do not ignore people just because it is unlikely you will be able to scene.",
|
||||||
|
prob(10); "[info] Sending faxes to central command, using the 'pray' verb or pressing F1 to ahelp are highly encouraged when exploring the gateway or overmap locations! Letting GMs know something fun is happening allows them to spice things up and make the world feel alive!"
|
||||||
|
)
|
||||||
|
|
||||||
|
if("lore")
|
||||||
|
var/info = "The following is tip for understanding the lore of VOREStation \n"
|
||||||
|
return pick(
|
||||||
|
prob(75); "[info] Our lore significantly differs from that of other servers. You can find the key differences at https://wiki.vore-station.net/Key_differences#We_have_a_well_fleshed_out_lore._We_are_not_comically_grimdark,_but_neither_a_utopia.",
|
||||||
|
prob(75); "[info] You can find a short summary of our setting that everyone should know at https://wiki.vore-station.net/Vital_Lore",
|
||||||
|
prob(50); "[info] You are currently working in the Virgo-Erigone system. It takes weeks to months (depending on your wealth) to return to Earth from here. https://wiki.vore-station.net/Infrastructure#Bluespace_Gate",
|
||||||
|
prob(50); "[info] The majority of employees live at the colony of Al'Qasbah. Most people live underground, with only the wealthiest living out in the habitation bubble. This is the place the tram/shuttle takes you at the end of the round. https://wiki.vore-station.net/Al%27Qasbah",
|
||||||
|
prob(10); "[info] Thaler is a universal currency. Its value is set to 1 second of FTL 'bluespace' travel. While ubiquitous in frontier worlds, it has an unfavourable exchange rate with most currencies used by well-settled regions, limiting immigration to places such as Earth. https://wiki.vore-station.net/Thaler"
|
||||||
|
)
|
||||||
@@ -298,6 +298,7 @@
|
|||||||
#include "code\controllers\subsystems\persistence.dm"
|
#include "code\controllers\subsystems\persistence.dm"
|
||||||
#include "code\controllers\subsystems\planets.dm"
|
#include "code\controllers\subsystems\planets.dm"
|
||||||
#include "code\controllers\subsystems\plants.dm"
|
#include "code\controllers\subsystems\plants.dm"
|
||||||
|
#include "code\controllers\subsystems\player_tips.dm"
|
||||||
#include "code\controllers\subsystems\radiation.dm"
|
#include "code\controllers\subsystems\radiation.dm"
|
||||||
#include "code\controllers\subsystems\reflect_ch.dm"
|
#include "code\controllers\subsystems\reflect_ch.dm"
|
||||||
#include "code\controllers\subsystems\shuttles.dm"
|
#include "code\controllers\subsystems\shuttles.dm"
|
||||||
@@ -3718,6 +3719,8 @@
|
|||||||
#include "code\modules\planet\time.dm"
|
#include "code\modules\planet\time.dm"
|
||||||
#include "code\modules\planet\weather.dm"
|
#include "code\modules\planet\weather.dm"
|
||||||
#include "code\modules\planet\weather_vr.dm"
|
#include "code\modules\planet\weather_vr.dm"
|
||||||
|
#include "code\modules\player_tips_vr\player_tips_controller_vr.dm"
|
||||||
|
#include "code\modules\player_tips_vr\player_tips_list_vr.dm"
|
||||||
#include "code\modules\power\apc.dm"
|
#include "code\modules\power\apc.dm"
|
||||||
#include "code\modules\power\apc_vr.dm"
|
#include "code\modules\power\apc_vr.dm"
|
||||||
#include "code\modules\power\batteryrack.dm"
|
#include "code\modules\power\batteryrack.dm"
|
||||||
|
|||||||
Reference in New Issue
Block a user