Telex mod and terminal integration.
[insidethebox.git] / mods / rules / init.lua
blob81552cf86a4595663b0f5c569e51d4777dbf3155
2 --[[
4 Copyright (C) 2017 - Auke Kok <sofar@foo-projects.org>
6 "rules" is free software; you can redistribute it and/or modify
7 it under the terms of the GNU Lesser General Public License as
8 published by the Free Software Foundation; either version 2.1
9 of the license, or (at your option) any later version.
11 ]]--
13 rules = {rules = {}}
14 local r = {}
16 r["player"] = [[
18 PLAYER RULES
20 -> Skip to the end for a FAQ!
22 -> To read the Creator rules, type: /rules creator
24 Content:
25 [1] Behavior
26 [2] Copyright
27 [3] Privacy Policy
28 [4] Cheating
29 [5] Hints
30 [6] Light
31 [7] Tutorial
32 [8] User generated content
33 [9] FAQ
35 [1] Behavior
36 Inside The Box is meant to be a pleasant place for all players, and
37 therefore we ask that all players behave accordingly. That means that
38 you should treat this server, the players on it, and those who may
39 come to experience the server through some other way with respect
40 and as you yourself would like to be treated.
42 It goes without saying that anything that players do that would alter,
43 disrupt or upset any part of the experience of players is a bannable
44 offense, without warning, and subject to being reported to authorities
45 if this is necessary. If you can't figure out what we mean by this,
46 please leave immediately.
48 [2] Copyright
49 Other than that, you should know that all the work on this server
50 is copyrighted, and that your ability to use or re-use any of
51 it is restricted and bound to certain conditions. Again, if you
52 don't know what this means and what you can or can not do, ask us
53 first. Of course, playing on this server is entirely allowed without
54 restrictions.
56 [3] Privacy Policy
57 You should know that we do monitor and log player conversations and
58 player interactions with the server. We do not provide these logs
59 to anyone unless legally required to do so, and we do not sell any
60 player information to other parties or companies. However, we will use
61 player data to analyze and improve the server experience for users,
62 so we may watch closely how players behave and interact on the server,
63 for instance by creating scores or rankings. If you do not agree with
64 this, please leave immediately.
66 [4] Cheating
67 Cheating, as described by using unfair means to gain an advantage
68 over other players, is expressly prohibited. That means that using
69 cheats to fly, look through walls, sprint, using noclip and unfairly
70 obtained other player capabilities while on this server are subject to
71 an immediate ban without warning. We believe that the best experience
72 is had when players experience the real challenge themselves without
73 unfair help. If you do discover a way to cheat or exploit, we'd love
74 to work with you to resolve this problem. If you don't tell us, but
75 abuse it or tell others, we may take action against you.
77 [5] Hints
78 We explicitly allow players to discuss and help players with
79 hints. This is not cheating. While we think that players get a
80 better experience trying to solve a problem and persist in that,
81 we realize that sometimes you just may not find that secret, well
82 hidden objective.
84 [6] Light
85 Because of the amount of available light in the game varies per
86 display and per computer, it is always allowed to pick up and move
87 torches. We know that certain levels are very dark and this may make
88 it very difficult for some players. Therefore we allow you to move
89 and place torches where ever you can. Of Course, not every level may
90 have torches available for the player to do so.
92 [7] Tutorial
93 All players are required to complete the tutorial before they are
94 allowed to enter the general lobby. We want to make sure the players
95 understand and appreciate the puzzle element of the game before they
96 start creating their own challenges.
98 [8] User generated content
99 We don't want to take over copyright of your works, but you can't build
100 on this server without somehow permitting the server to share your
101 creation with other players, and therefore, you are granting us the
102 rights to do so. Even if you never submit your creation for review,
103 you still grant the server whatever rights are applicable to share
104 any content you put in your own creations, and allow the server to
105 redistribute it to other people, without reservations.
107 [9] FAQ
108 Q: Can I record videos while playing on this server?
109 A: Yes, but, if you record with the music from this server, you
110 are required to provide the proper attribution, and you may not use
111 monetization or otherwise make videos for commercial purposes. The
112 credits are: "Lee Rosevere, Music inspired by MiNRS, CC-BY-NC-4.0"
114 Q: I think I found a bug!
115 A: contact sofar@foo-projects.org, or `sofar` in the game. Or visit
116 the website and visit the Feedback page.
118 Q: Where can I find more information?
119 A: Go to: minetest.foo-projects.org
122 rules.rules["player"] = r.player:gsub("%]","\\]"):gsub("%[","\\["):gsub(";","\\;"):gsub(",","\\,"):gsub("\n", ",")
124 r.creator = [[
126 CREATOR RULES
128 These rules are for people who create puzzle boxes.
130 We want players to enjoy coming to this server, and to spend lots
131 of time playing puzzles. In order to promote this, we have a few
132 basic ground rules to prevent player frustration and to promote fun
133 and challenging puzzles. Some of the things listed below are more
134 "guidelines" than hard rules, and some are really hard rules. If
135 you think that breaking a rule listed here would improve the game,
136 then discuss it with the admins, and be prepared to state your case.
138 1. The puzzle must always remain solvable.
140 An abandoned puzzle is a failed puzzle and a player lost. Do not ever
141 make a puzzle that a player *must* leave to reset. If your puzzle
142 needs some sort of reset button, you need to build it with the tools
143 available to you in the box creator mode.
145 2. Dying must never be required to complete a box.
147 A player must never feel like having to commit suicide. There should
148 always be a way out. If the player is actually in an unsolvable
149 situation, you should kill the player immediately, for instance by
150 flooding the player in lava.
152 3. Do not create "manholes" that the player can get stuck in.
154 A stuck player is an abandoning player. Either kill the player or
155 allow the player to recover.
157 4. Do not make darkness an essential part of your puzzle.
159 Your monitor may be nice and bright, but some people may have bad
160 vision or a darker monitor. And your cave system with 20 cave parts
161 that has 1 torch is just impossible to do without cheating and turning
162 up gamma on the monitor. Dark boxes promote cheating and give an
163 unfair advantage. You can use darkness as an occasional feature,
164 or even anti-feature (e.g. making nonessential parts dark), but if
165 your box is mostly dark, it's not acceptable.
167 5. Do not use fake items.
169 Planting empty items or decoy items is the opposite of creativity,
170 and frustrates players. Try to reward the player instead. Unconnected
171 switches, empty chests, locked itemframes that are not in a "hint"
172 position or clearly decorative are all sources of frustration.
174 6. Do not make boxes that are 3/4 empty.
176 Empty large spaces feel boring and allow the player to quickly see
177 almost everything they need to find. Fill up the space, even up and
178 down, as much as you can do with decoration or playable areas.
180 7. When submitting, expect feedback, and update your box
182 Everyone wins if your boxes are better. You get a better box that will
183 be played more and where players are spending more time playing it.
185 8. Use buttons, not switches
187 Unless you need the player to flip a switch *two times*, you should
188 always use a button with a filter to open that door, create some node,
189 or open a pathway.
191 9. Don't build on the bottom.
193 This is a sure way to get yourself into trouble or make an
194 uninteresting and open box. Always throw some basic landscaping in
195 place with the landscaping tool and build at least a few blocks up.
197 10. Decorate, decorate, decorate
199 4 hours is almost the minimum of time you'll need to spend building to
200 make a decently decorated and well functioning puzzle, and more if you
201 add lots of mechanical components. You can not, I repeat, not make a
202 box in 30 minutes and expect it to be "well done". Even box 6, which
203 has a meager sub-100 nodes took several hours of work to get right.
205 Use the paint tool. Diversify your nodes. Use slabs to create relief
206 and texture. But don't overmix things either. 5 different color
207 flowers isn't stylish. Mixing certain blocks for building material
208 may also not match well.
210 11. Don't make a puzzle, first!
212 Always, always make the background and stage for your puzzle first.
213 It already is really hard to think of a good way to capture your
214 player and to tell a story, but you really can't do it unless there
215 is a clear atmosphere with a story present. The style of your box, the
216 areas that the player needs to visit, these all dictate the obstacles
217 that the player will have to overcome, and are easy puzzle elements
218 that you can add to make the puzzle more complex and more enjoyable.
220 12. Avoid signs and icons
222 Don't repeat the name of the box. Don't put your name somewhere
223 on a sign. These are all things that break the "4th wall" for players
224 and ruin the immersion feeling. A door bell on a normal house doesn't
225 have the word "doorbell" next to it. Icons similarly are not really
226 meant for decoration or hints, and usually distract more than anything.
228 13. Don't leave hints in your box
230 Don't use a terminal for player hints. They always figure it out,
231 and it breaks the 4th wall. Plus most of the time, the terminals
232 are a distraction. The terminals are for lore and stories you may
233 want to share. Try and stay away from personal stuff and overly
234 dramatic passages, though. It's a game, and should remain fun for
235 everyone.
238 rules.rules["creator"] = r.creator:gsub("%]","\\]"):gsub("%[","\\["):gsub(";","\\;"):gsub(",","\\,"):gsub("\n", ",")
240 function rules.show(name, t)
241 local f =
242 "size[12,8]" ..
243 "field_close_on_enter[input;false]" ..
244 "textlist[0.4,0.5;11,6;rules;" ..
245 rules.rules[t] ..
246 "]" ..
247 "button_exit[0.7,7;11.2,1;close;Close]"
249 fsc.show(name, f, {}, function() end)
252 minetest.register_chatcommand("rules", {
253 description = "Display server rules",
254 func = function(name, param)
255 if rules.rules[param] then
256 rules.show(name, param)
257 else
258 rules.show(name, "player")
263 minetest.register_on_joinplayer(function(player)
264 local name = player:get_player_name()
265 minetest.after(15, function(n)
266 if minetest.player_exists(n) then
267 minetest.chat_send_player(n, "Remember to read the server rules! Type `/rules` to review them.")
269 end, name)
270 end)