Difference between revisions of "User:Spdskatr"

From RimWorld Wiki
Jump to navigation Jump to search
(Fun little wiki reference)
 
(Updated checklist)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
<pre>
+
{{Fmbox |type=warning |text = <nowiki><!-- {{Impressive |title=Visionary}} --></nowiki>'''Be humble, little one.'''|image=none}}
<nowiki>
+
==Inside the code==
''Italics''
+
Participate! Files can be found in your steam library &rarr; common &rarr; RimWorld &rarr; Mods &rarr; Core &rarr; Defs
  
'''Bold'''
+
'''Mass ThingDefs:'''
 +
*Buildings
 +
**Finished: ALL
 +
*Items
 +
**Finished: ALL
 +
*Misc
 +
**Finished: ALL BUT some headgear and power armor (No page)
 +
*Plants
 +
**Finished: ALL(Plants don't have mass) (What?)
 +
*Races
 +
**Finished: ALL
  
{{TemplateName | Parameter = Value}}
+
==Light reading for when reading a wiki is very boring and this is an impressive heading because I want to attract your attention have fun in the little section that I wrote :) XD==
  
[[link title | www.link.url]]
+
===RNG===
 +
<div style=text-align:center><b style="font-size:2em">How does [[Template:RNG]] work?</b></div>
  
*dot point
+
DISCLAIMER: The template is useless for anything proper on the wiki. However feel free to use for shenenigans like [[Template:Impressive]].
**indented dot point
 
*** etc
 
  
{{#if: This part is filled then | filled | empty}}
+
Technically, the template does not generate ''truly'' random numbers, just numbers random enough so that you won't be able to tell that it is ordered. It works by exploiting the special property of square numbers, such that the last digit can be easily predicted, but the middle digits are statistically random for high values. Therefore, my RNG works by chopping off the last digit of a continuously changing square number (created by the magic word <nowiki>{{REVISIONTIMESTAMP}}</nowiki>), and then mashing the numbers around so the different seeds are unlike, until finally using modulo(<code>mod</code>) to truncate the number within the limits specified.
  
{{#expr: 45 + 5 * 3}} —> 60
+
This does mean that if you type limit=10000... you may find yourself disappointed at the randomness of your generated number. I will include a warning for any number greater than 1 000 000, as randomness may break down after that level.
  
<!--Comments go here-->
+
<b style="font-size:1.5em">Example</b>
  
You can start a new paragraph by pressing enter twice.
+
Starting number: 621
  
Only pressing space once does
+
Step 1. Square it: 385 641
nothing to formatting.
+
 
</nowiki>
+
Step 2. Chop it up: 38 564
</pre>
+
 
 +
Step 3. Multiply it by plasteel and add xerigium: 20 439 704
 +
 
 +
Step 4. Repeat step 3: 1 083 305 043
 +
 
 +
Step 5. Number from 1 to 100: 43
 +
 
 +
<b style="font-size:1.5em">Discussion</b>
 +
 
 +
Coming soon... Here are a few dot points.
 +
 
 +
*Limits of MediaWiki language
 +
**Strings and length
 +
**Arrays
 +
**Digital roots
 +
*Advantages of MediaWiki language
 +
**Simplicity
 +
**Similarity to HTML
 +
*Own limitations
 +
**PHP coding & super admin privileges

Latest revision as of 11:05, 17 January 2017

Inside the code[edit]

Participate! Files can be found in your steam library → common → RimWorld → Mods → Core → Defs

Mass ThingDefs:

  • Buildings
    • Finished: ALL
  • Items
    • Finished: ALL
  • Misc
    • Finished: ALL BUT some headgear and power armor (No page)
  • Plants
    • Finished: ALL(Plants don't have mass) (What?)
  • Races
    • Finished: ALL

Light reading for when reading a wiki is very boring and this is an impressive heading because I want to attract your attention have fun in the little section that I wrote :) XD[edit]

RNG[edit]

How does Template:RNG work?

DISCLAIMER: The template is useless for anything proper on the wiki. However feel free to use for shenenigans like Template:Impressive.

Technically, the template does not generate truly random numbers, just numbers random enough so that you won't be able to tell that it is ordered. It works by exploiting the special property of square numbers, such that the last digit can be easily predicted, but the middle digits are statistically random for high values. Therefore, my RNG works by chopping off the last digit of a continuously changing square number (created by the magic word {{REVISIONTIMESTAMP}}), and then mashing the numbers around so the different seeds are unlike, until finally using modulo(mod) to truncate the number within the limits specified.

This does mean that if you type limit=10000... you may find yourself disappointed at the randomness of your generated number. I will include a warning for any number greater than 1 000 000, as randomness may break down after that level.

Example

Starting number: 621

Step 1. Square it: 385 641

Step 2. Chop it up: 38 564

Step 3. Multiply it by plasteel and add xerigium: 20 439 704

Step 4. Repeat step 3: 1 083 305 043

Step 5. Number from 1 to 100: 43

Discussion

Coming soon... Here are a few dot points.

  • Limits of MediaWiki language
    • Strings and length
    • Arrays
    • Digital roots
  • Advantages of MediaWiki language
    • Simplicity
    • Similarity to HTML
  • Own limitations
    • PHP coding & super admin privileges