|
|
(8 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
| {{Satire}} | | {{db-author}} |
| | |
| ''Not to be confused with [[Tutorials]], those are actually helpful.''
| |
| | |
| This page documents overly simplified tutorials by [[User:Paradox19|Paradox19]]. You ''can'' use [[Things to Avoid|these methods]] but they're definitely not the best.
| |
| | |
| == Disclaimers ==
| |
| | |
| * ''This page does not use proper [[wikipedia:Wikipedia:Manual_of_Style|Wiki Style]], this is by design due to the satire nature of this article.''
| |
| * ''You can use the methods outlined here to accomplish tasks, but they are not recommended''
| |
| * ''This is way too many disclaimers for one page''
| |
| | |
| == Cloud variables for dummies ==
| |
| ''This does not cover cloud variables for groups.''
| |
| | |
| [[Cloud Variables|Cloud variables]] are weird. They allow for communicating between sessions '''''and''''' persistent data.
| |
| | |
| === Misconception(s) ===
| |
| | |
| ==== "erm, im tryna make something that syncs between [[userspace]] and world space but the '''[[Cloud Variables#Rate limits|rate limits]]''' are gonna screw me over???" ====
| |
| Nope! The rate limits only apply to PERSISTENT data stores. Cloud variables are first synced between sessions, which has no rate limit, and THEN synced to the cloud for persistent data.
| |
| | |
| ''(Persistence: From Wikipedia, the free encyclopedia: <code>persistence refers to the characteristic of state of a system that outlives (persists more than) the process that created it</code>) Basically, if something's persistent it's saved.''
| |
| | |
| So as an example, in my custom world loading indicator: that uses cloud variables to sync the loading progress which ''PROBABLY'' hits the rate limits but syncing between sessions has none of those.
| |
| | |
| === Okay let's get started with making a cloud variable ===
| |
| Basically, just send <code>/createUserVar variable_space.variable type default_value variable_owner_unsafe variable_owner definition_owner</code> to the [[Resonite Bot|Resonite bot]]. Of course, replace <code>variable_space</code> and <code>variable</code> with your variable name. Like: <code>my_super_epic_app.Colour</code> where <code>my_super_epic_app</code> is the namespace (basically the asset where this is used) and <code>Colour</code> is the variable.
| |
| | |
| <code>type</code> is the type for this variable, since cloud variables are statically typed. '''''Don't screw this up else you'll need to recreate the variable.''''' ''That's why they're statically typed.''
| |
| | |
| <code>default_value</code> is the default value you want this variable to have when it is initialised for anyone.
| |
| | |
| The final stuff is the permission settings I usually recommend to people, if for SOME REASON you need to WRITE to a cloud variable in world space (you should never need to do this) then replace <code>variable_owner</code> with <code>variable_owner_unsafe</code>
| |
| | |
| === "oops i need to change the permissions as i screwed up" ===
| |
| run <code>/setUserVarPerms path action perm_type</code> where path is your <code>variable_space.variable</code>, action is <code>read</code>, <code>write</code> OR <code>list</code> (you should never need to set <code>list</code> to anything other than <code>definition_owner</code> because idk) and <code>perm_type</code> is any of the perm types: (<code>use</code> means do the specified action to it, so <code>read</code>, <code>write</code>, or <code>list</code>)
| |
| {| class="wikitable"
| |
| |+
| |
| !
| |
| !perm type
| |
| !description
| |
| |-
| |
| |Most restricted
| |
| |definition_owner
| |
| |only YOU (the person who made the variable) can use it
| |
| |-
| |
| |
| |
| |variable_owner
| |
| |only the person who SET the value can use it in USERSPACE (this is what I recommend for WRITING)
| |
| |-
| |
| |
| |
| |variable_owner_unsafe
| |
| |only the person who SET the value can use it ANYWHERE (this is what I recommend for READING)i recommend)
| |
| |-
| |
| |Least restricted
| |
| |anyone
| |
| |anyone can use this for ANYONE (so not recommended)
| |
| |}
| |
| Wow! Does the regular [[Cloud Variables|cloud variable]] wiki need to be as complicated as it is?
| |
| | |
| === "okay so im no longer using one so how do i delete it?" ===
| |
| First off, even if ''you're'' no longer using one, someone else might be with a fork of your project so expect ''something'' to break.
| |
| | |
| Anyway, just run: <code>/deleteUserVar path</code> and it'll be removed within half an hour
| |