diff --git a/config/docs.cfg b/config/docs.cfg
index 3dc522b7..c0c38a95 100644
--- a/config/docs.cfg
+++ b/config/docs.cfg
@@ -1434,6 +1434,8 @@ docargument [N] [The fog distance] [64...1024, default is 180] [0];
docremark [You can do this for tweaking the visual effect of the fog, or if you are on a slow machine, setting the fog to a low value can also be a very effective way to increase fps (if you are geometry limited). Try out different values on big maps / maps which give you low fps. It is also good for aesthetic features of maps especially when combined with "fogcolour".];
docident [fogcolour] [Sets the fog and clearing colour.];
docargument [C] [The colour] [Hexadecimal colour, default is 0x8099B3] [0];
+docident [genhex] [Randomly generates a valid hexadecimal color value.];
+docexample [fogcolour (genhex)] [Example output: Trying hexadecimal color: 0x2FCAF1];
docident [isolatecontext] [Isolates the given context. This disables access from this context to identifiers located in other contexts, also it removes all aliases created in this context once the running context changes];
docargument [C] [the context] [] [0];
docident [loadnotexture] [Binds a texture to be used if a slot couldn't be loaded with a given textures path.];
diff --git a/config/scripts.cfg b/config/scripts.cfg
index a35d3aa9..1365064d 100644
--- a/config/scripts.cfg
+++ b/config/scripts.cfg
@@ -286,6 +286,20 @@ pasteent = [
]
]
+// genhex - Randomly generates a valid hexadecimal color value (e.g. 0x2FCAF1) - useful for finding fogcolours.
+genhex = [
+ tmp_hex = "0x"
+ loop ghl 6 [
+ if (rnd 2) [
+ tmp_hex = (concatword $tmp_hex (rnd 10))
+ ] [
+ tmp_hex = (concatword $tmp_hex (at [ A B C D E F ] (rnd 6)))
+ ]
+ ]
+ echo (c 3)Trying hexadecimal color: (c 5) $tmp_hex
+ result $tmp_hex
+]
+
// megabind - Binds a key to many different actions depending on the current game state.
megabind = [
if (= $numargs 6) [
diff --git a/docs/reference.xml b/docs/reference.xml
index c452fd06..e58bdbc4 100644
--- a/docs/reference.xml
+++ b/docs/reference.xml
@@ -1936,6 +1936,12 @@ bind PRINT [ if (strcmp $last_server "") [ remember_server ]
You won't see any further game chat or hear any more voice com messages from that player.
+
+
+
+
+
+
@@ -1960,6 +1966,12 @@ bind PRINT [ if (strcmp $last_server "") [ remember_server ]
Print a list of all players that you are currently ignoring.
+
+
+
+
+
+
@@ -5441,11 +5453,26 @@ Output:
Sets the fog and clearing colour.
+
+
+
+ Randomly generates a valid hexadecimal color value.
+
+
+
+ Example output: Trying hexadecimal color: 0x2FCAF1
+
+
+
+
+
+
+
Binds a texture to be used if a slot couldn't be loaded with a given textures path.