User:Paradox19/Amazing Tutorials: Difference between revisions

From Resonite Wiki
revamp permission table. im tired so this is probably horribly wrong.
pending deletion
Tag: Replaced
 
(One intermediate revision 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 have no rate limits, 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, my custom world loading indicator uses cloud variables but I don't have to worry about the rate limits there since my main goal isn't persistence - it's inter-session communication.
 
=== 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. The table below details the different permission types.
 
(<code>use</code> means to do the specified action, so <code>read</code>, <code>write</code>, or but NOT <code>list</code>)
 
=== Most common perm types ===
{| class="wikitable"
|+
!
!perm type
!description
!limits
|-
|most restricted
|definition_owner_only
|only YOU (the person who made the variable) can use it in USERSPACE
|Not available for list perms*
|-
|
|definition_owner_only_unsafe
|only YOU (the person who made the variable) can use it ANYWHERE
|Not available for list perms
|-
|
|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)
|
|-
|least restricted
|anyone
|anyone can use this for ANYONE (so not recommended)
|
|}
<nowiki>*</nowiki> For list permissions, please use <code>definition_owner</code>, don't ask me why.
 
=== More abstract permissions (user definition only) ===
''I'm not covering cloud variables for groups here. I don't know how those work.''
{| class="wikitable mw-collapsible mw-collapsed"
|+
!
!perm type
!description
!limits
|-
|most restricted
|definition_owner_only_contacts
|allows contacts of the person who made the variable to use this permission in USERSPACE
|
|-
|
|definition_owner_only_contacts_unsafe
|allows contacts of the person who made the variable to use this permission ANYWHERE
|
|-
|
|variable_owner_only_contacts
|''Your guess is as good as mine.''
|
|-
|least restricted
|variable_owner_only_contacts_unsafe
|''Your guess is as good as mine.''
|
|}
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

Latest revision as of 10:56, 22 August 2024

This page is marked for deletion as the author of the only substantial content has requested deletion or blanked the page in good faith.

Admins: Please check the talk page for any discussions on the matter. Remember to remove all redirects, links, and transclusions relating to this page if deleted.
This page was last edited by Paradox19 at 10:56, 22 August 2024 (UTC)