<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr">
	<id>https://www.lets-role.wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Guile</id>
	<title>Wiki Let&#039;s Role - Contributions [fr]</title>
	<link rel="self" type="application/atom+xml" href="https://www.lets-role.wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Guile"/>
	<link rel="alternate" type="text/html" href="https://www.lets-role.wiki/index.php/Sp%C3%A9cial:Contributions/Guile"/>
	<updated>2026-05-25T05:24:34Z</updated>
	<subtitle>Contributions</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://www.lets-role.wiki/index.php?title=System_Builder&amp;diff=65</id>
		<title>System Builder</title>
		<link rel="alternate" type="text/html" href="https://www.lets-role.wiki/index.php?title=System_Builder&amp;diff=65"/>
		<updated>2025-09-10T21:54:10Z</updated>

		<summary type="html">&lt;p&gt;Guile : &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The System Builder is a tool for creating game systems for the [https://lets-role.com/ Let&#039;s Roll] gaming tables. It allows for the comprehensive construction of various essential tools such as player character sheets, as well as the creation of non-player character sheets, objects, and game monitoring tools for Game Masters.&lt;br /&gt;
&lt;br /&gt;
The tool is accessible to anyone with a Let&#039;s Roll account. It is designed so that anyone can develop their own system without any coding knowledge. The System Builder is equipped with coding tools (pseudoJS) that allow for the creation of complex, non-essential functionalities that will add a bit of convenience.&lt;br /&gt;
&lt;br /&gt;
=== First step ===&lt;br /&gt;
Quickstart video guide for creating systems in Let’s Role (🇫🇷 &#039;&#039;French only)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
https://www.youtube.com/watch?v=F141URrFVwo&lt;br /&gt;
[[Fichier:Video_thumbnail_Start_on_SB.png|néant|vignette]]&lt;br /&gt;
&lt;br /&gt;
==== Interface ====&lt;br /&gt;
Inserez l&#039;image de l&#039;interface&lt;br /&gt;
&lt;br /&gt;
# The title of the edited system&lt;br /&gt;
# [Create new views], navigate between [views]...&lt;br /&gt;
# The list of [[components|c]]&amp;lt;nowiki/&amp;gt;[[components|omponents]] usable for building a view&lt;br /&gt;
# [The dependency tree of views]&lt;br /&gt;
# Launch the system on a table to [test the system]&lt;br /&gt;
# The tabs [view], [table], [script], [translation], the tools to develop a system&lt;br /&gt;
# The [preview of the sheet]&lt;br /&gt;
# The buttons [save], [deploy], and [exit]&lt;br /&gt;
# The panel of the selected [component parameters]&lt;br /&gt;
&lt;br /&gt;
===== Views =====&lt;br /&gt;
Views are trees of components. They can be instantiated by the [tab] component or the [repeater] component to create complex and well-organized sheets.&lt;br /&gt;
&lt;br /&gt;
==== Creating a New View ====&lt;br /&gt;
To create a new view, click on the &amp;quot;Create a new view&amp;quot; button. Fill in the popup with an ID (no capital letters, no special characters, no numbers, and use underscores to separate words), for example: &amp;quot;vue_armes&amp;quot;. To switch views, use the dropdown list.&lt;br /&gt;
&lt;br /&gt;
==== Building a View ====&lt;br /&gt;
To build a view, use the components in window 3 by dragging and dropping them into the component tree of the view in window 4.&lt;br /&gt;
&lt;br /&gt;
===== Layout Components =====&lt;br /&gt;
Layout components are used to structure and organize components among themselves, such as rows, columns, and containers.&lt;br /&gt;
&lt;br /&gt;
TODO: Link to a tutorial&lt;br /&gt;
&lt;br /&gt;
===== Form Components =====&lt;br /&gt;
Form components are designed to contain the information for your character sheet.&lt;br /&gt;
&lt;br /&gt;
===== Container Components =====&lt;br /&gt;
Containers are components that can contain views to create complete and dynamic sheets.&lt;br /&gt;
&lt;br /&gt;
=== Special Components ===&lt;br /&gt;
Special components allow you to perform specific and essential actions for a character sheet.&lt;br /&gt;
&lt;br /&gt;
==== Tables ====&lt;br /&gt;
Tables are spreadsheets that allow you to provide information for certain components, such as lists, tabs, etc.&lt;br /&gt;
&lt;br /&gt;
==== Script ====&lt;br /&gt;
The script is a JS file that allows you to perform more complete and complex actions than managing views alone.&lt;br /&gt;
&lt;br /&gt;
[[FirstScript|Your first step in the script]]&lt;br /&gt;
&lt;br /&gt;
=== Tutorials ===&lt;br /&gt;
&lt;br /&gt;
#[[Styling character sheets with classes|Build character sheets with Bootstrap]]&lt;br /&gt;
# [[Put a dice roll result in the sheet]]&lt;br /&gt;
# [[Use lists]]&lt;br /&gt;
# [[Use tabs]]&lt;br /&gt;
# [[Use repeaters]]&lt;br /&gt;
# [[Show or hide components]]&lt;br /&gt;
# [[Progress bar]]&lt;br /&gt;
# [https://lets-role.com/help/fr/documentation/v1/component/avatar Configure the avatar properly]&lt;/div&gt;</summary>
		<author><name>Guile</name></author>
	</entry>
	<entry>
		<id>https://www.lets-role.wiki/index.php?title=FirstScript&amp;diff=64</id>
		<title>FirstScript</title>
		<link rel="alternate" type="text/html" href="https://www.lets-role.wiki/index.php?title=FirstScript&amp;diff=64"/>
		<updated>2025-09-10T21:52:44Z</updated>

		<summary type="html">&lt;p&gt;Guile : Page créée avec « === Introduction === Writing a script while you&amp;#039;re not a coder is a very intimidating task : it is a new language with a lot of syntax rules.  You can start reading some tutorials on how to start with javascript. Let&amp;#039;s Role allows you to code with a version of JavaScript that is close to the standard, but with a few differences.  === Step 0 : basics === Here are a list of empiric rules that will help you writing your script :  * make it readable and understandabl... »&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Introduction ===&lt;br /&gt;
Writing a script while you&#039;re not a coder is a very intimidating task : it is a new language with a lot of syntax rules.&lt;br /&gt;
&lt;br /&gt;
You can start reading some tutorials on how to start with javascript. Let&#039;s Role allows you to code with a version of JavaScript that is close to the standard, but with a few differences.&lt;br /&gt;
&lt;br /&gt;
=== Step 0 : basics ===&lt;br /&gt;
Here are a list of empiric rules that will help you writing your script :&lt;br /&gt;
&lt;br /&gt;
* make it readable and understandable : use appropriate names, indent your code (format your code automaticaly with &amp;lt;code&amp;gt;SHIFT+ALT+F&amp;lt;/code&amp;gt;)&lt;br /&gt;
* structure, separate your rules&lt;br /&gt;
* don&#039;t repeat yourself (DRY) : there are many ways to make your code readable and not repetitive. Remind one rule : if you copy / paste some code in your script, it could good to generalise it.&lt;br /&gt;
* Don&#039;t hesitate to ask the community for help&lt;br /&gt;
&lt;br /&gt;
=== Step 1 : init ===&lt;br /&gt;
Every script must have a &amp;lt;code&amp;gt;init&amp;lt;/code&amp;gt; function. This function will be called as soon as a sheet is opened (character sheet, token sheet, craft sheet, prompt sheet). We use the &amp;lt;code&amp;gt;init&amp;lt;/code&amp;gt; to add some interactivity and complex rules on the sheet.&lt;br /&gt;
&lt;br /&gt;
As it is a unique function to handle many different sheets, you must use an &amp;lt;code&amp;gt;if&amp;lt;/code&amp;gt; to check which init code to execute on which sheet.&lt;br /&gt;
&lt;br /&gt;
Here is a simple example that we recommend to use only if you plan to keep the very simple script.&lt;br /&gt;
 init = function (sheet) {&lt;br /&gt;
     if (sheet.id() === &amp;quot;main&amp;quot;) {&lt;br /&gt;
         // write you code here for the sheet with the id &amp;quot;main&amp;quot;&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
If you want to make some inits for few other sheets, we recommend to create different function. The following solution is a very clean way to handle the initialisation of different sheets using their id to detect them. Creating different function helps you to separate the rules of your system. The more your script will grow, the more you&#039;ll need to organize it.&lt;br /&gt;
 init = function (sheet) {&lt;br /&gt;
     const sheetId = sheet.id()&lt;br /&gt;
     if (sheetId === &amp;quot;main&amp;quot;) {&lt;br /&gt;
         initMain(sheet)&lt;br /&gt;
     } else if (sheetId === &amp;quot;monster&amp;quot;) {&lt;br /&gt;
         initMonster(sheet)&lt;br /&gt;
     } else if (sheetId === &amp;quot;object&amp;quot;) {&lt;br /&gt;
         initObject(sheet)&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function initMain(sheet) {&lt;br /&gt;
     // write you code here for the sheet with the id &amp;quot;main&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function initMonster(sheet) {&lt;br /&gt;
     // write you code here for the sheet with the id &amp;quot;monster&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function initObject(sheet) {&lt;br /&gt;
     // write you code here for the sheet with the id &amp;quot;object&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
As the number of pages increases, you will quickly see that you are repeating yourself by adding a long list of &amp;lt;code&amp;gt;if else if&amp;lt;/code&amp;gt;, to prevent that you can check this [[Init Advanced Tip|advanced script tip for init]].&lt;br /&gt;
&lt;br /&gt;
{{CLEFDETRI:FirstScript}}&lt;/div&gt;</summary>
		<author><name>Guile</name></author>
	</entry>
	<entry>
		<id>https://www.lets-role.wiki/index.php?title=FristScript&amp;diff=63</id>
		<title>FristScript</title>
		<link rel="alternate" type="text/html" href="https://www.lets-role.wiki/index.php?title=FristScript&amp;diff=63"/>
		<updated>2025-09-10T21:52:21Z</updated>

		<summary type="html">&lt;p&gt;Guile : &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Introduction ===&lt;br /&gt;
Writing a script while you&#039;re not a coder is a very intimidating task : it is a new language with a lot of syntax rules.&lt;br /&gt;
&lt;br /&gt;
You can start reading some tutorials on how to start with javascript. Let&#039;s Role allows you to code with a version of JavaScript that is close to the standard, but with a few differences.&lt;br /&gt;
&lt;br /&gt;
=== Step 0 : basics ===&lt;br /&gt;
Here are a list of empiric rules that will help you writing your script :&lt;br /&gt;
&lt;br /&gt;
* make it readable and understandable : use appropriate names, indent your code (format your code automaticaly with &amp;lt;code&amp;gt;SHIFT+ALT+F&amp;lt;/code&amp;gt;)&lt;br /&gt;
* structure, separate your rules&lt;br /&gt;
* don&#039;t repeat yourself (DRY) : there are many ways to make your code readable and not repetitive. Remind one rule : if you copy / paste some code in your script, it could good to generalise it.&lt;br /&gt;
* Don&#039;t hesitate to ask the community for help&lt;br /&gt;
&lt;br /&gt;
=== Step 1 : init ===&lt;br /&gt;
Every script must have a &amp;lt;code&amp;gt;init&amp;lt;/code&amp;gt; function. This function will be called as soon as a sheet is opened (character sheet, token sheet, craft sheet, prompt sheet). We use the &amp;lt;code&amp;gt;init&amp;lt;/code&amp;gt; to add some interactivity and complex rules on the sheet.&lt;br /&gt;
&lt;br /&gt;
As it is a unique function to handle many different sheets, you must use an &amp;lt;code&amp;gt;if&amp;lt;/code&amp;gt; to check which init code to execute on which sheet.&lt;br /&gt;
&lt;br /&gt;
Here is a simple example that we recommend to use only if you plan to keep the very simple script.&lt;br /&gt;
 init = function (sheet) {&lt;br /&gt;
     if (sheet.id() === &amp;quot;main&amp;quot;) {&lt;br /&gt;
         // write you code here for the sheet with the id &amp;quot;main&amp;quot;&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
If you want to make some inits for few other sheets, we recommend to create different function. The following solution is a very clean way to handle the initialisation of different sheets using their id to detect them. Creating different function helps you to separate the rules of your system. The more your script will grow, the more you&#039;ll need to organize it.&lt;br /&gt;
 init = function (sheet) {&lt;br /&gt;
     const sheetId = sheet.id()&lt;br /&gt;
     if (sheetId === &amp;quot;main&amp;quot;) {&lt;br /&gt;
         initMain(sheet)&lt;br /&gt;
     } else if (sheetId === &amp;quot;monster&amp;quot;) {&lt;br /&gt;
         initMonster(sheet)&lt;br /&gt;
     } else if (sheetId === &amp;quot;object&amp;quot;) {&lt;br /&gt;
         initObject(sheet)&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function initMain(sheet) {&lt;br /&gt;
     // write you code here for the sheet with the id &amp;quot;main&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function initMonster(sheet) {&lt;br /&gt;
     // write you code here for the sheet with the id &amp;quot;monster&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function initObject(sheet) {&lt;br /&gt;
     // write you code here for the sheet with the id &amp;quot;object&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
As the number of pages increases, you will quickly see that you are repeating yourself by adding a long list of &amp;lt;code&amp;gt;if else if&amp;lt;/code&amp;gt;, to prevent that you can check this [[Init Advanced Tip|advanced script tip for init]].&lt;br /&gt;
&lt;br /&gt;
{{CLEFDETRI:FirstScript}}&lt;/div&gt;</summary>
		<author><name>Guile</name></author>
	</entry>
	<entry>
		<id>https://www.lets-role.wiki/index.php?title=FristScript&amp;diff=62</id>
		<title>FristScript</title>
		<link rel="alternate" type="text/html" href="https://www.lets-role.wiki/index.php?title=FristScript&amp;diff=62"/>
		<updated>2025-09-10T21:51:35Z</updated>

		<summary type="html">&lt;p&gt;Guile : &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:First Script}}&lt;br /&gt;
{{DISPLAYTITLE:FirstScript}}&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
Writing a script while you&#039;re not a coder is a very intimidating task : it is a new language with a lot of syntax rules.&lt;br /&gt;
&lt;br /&gt;
You can start reading some tutorials on how to start with javascript. Let&#039;s Role allows you to code with a version of JavaScript that is close to the standard, but with a few differences.&lt;br /&gt;
&lt;br /&gt;
=== Step 0 : basics ===&lt;br /&gt;
Here are a list of empiric rules that will help you writing your script :&lt;br /&gt;
&lt;br /&gt;
* make it readable and understandable : use appropriate names, indent your code (format your code automaticaly with &amp;lt;code&amp;gt;SHIFT+ALT+F&amp;lt;/code&amp;gt;)&lt;br /&gt;
* structure, separate your rules&lt;br /&gt;
* don&#039;t repeat yourself (DRY) : there are many ways to make your code readable and not repetitive. Remind one rule : if you copy / paste some code in your script, it could good to generalise it.&lt;br /&gt;
* Don&#039;t hesitate to ask the community for help&lt;br /&gt;
&lt;br /&gt;
=== Step 1 : init ===&lt;br /&gt;
Every script must have a &amp;lt;code&amp;gt;init&amp;lt;/code&amp;gt; function. This function will be called as soon as a sheet is opened (character sheet, token sheet, craft sheet, prompt sheet). We use the &amp;lt;code&amp;gt;init&amp;lt;/code&amp;gt; to add some interactivity and complex rules on the sheet.&lt;br /&gt;
&lt;br /&gt;
As it is a unique function to handle many different sheets, you must use an &amp;lt;code&amp;gt;if&amp;lt;/code&amp;gt; to check which init code to execute on which sheet.&lt;br /&gt;
&lt;br /&gt;
Here is a simple example that we recommend to use only if you plan to keep the very simple script.&lt;br /&gt;
 init = function (sheet) {&lt;br /&gt;
     if (sheet.id() === &amp;quot;main&amp;quot;) {&lt;br /&gt;
         // write you code here for the sheet with the id &amp;quot;main&amp;quot;&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
If you want to make some inits for few other sheets, we recommend to create different function. The following solution is a very clean way to handle the initialisation of different sheets using their id to detect them. Creating different function helps you to separate the rules of your system. The more your script will grow, the more you&#039;ll need to organize it.&lt;br /&gt;
 init = function (sheet) {&lt;br /&gt;
     const sheetId = sheet.id()&lt;br /&gt;
     if (sheetId === &amp;quot;main&amp;quot;) {&lt;br /&gt;
         initMain(sheet)&lt;br /&gt;
     } else if (sheetId === &amp;quot;monster&amp;quot;) {&lt;br /&gt;
         initMonster(sheet)&lt;br /&gt;
     } else if (sheetId === &amp;quot;object&amp;quot;) {&lt;br /&gt;
         initObject(sheet)&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function initMain(sheet) {&lt;br /&gt;
     // write you code here for the sheet with the id &amp;quot;main&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function initMonster(sheet) {&lt;br /&gt;
     // write you code here for the sheet with the id &amp;quot;monster&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function initObject(sheet) {&lt;br /&gt;
     // write you code here for the sheet with the id &amp;quot;object&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
As the number of pages increases, you will quickly see that you are repeating yourself by adding a long list of &amp;lt;code&amp;gt;if else if&amp;lt;/code&amp;gt;, to prevent that you can check this [[Init Advanced Tip|advanced script tip for init]].&lt;br /&gt;
&lt;br /&gt;
{{CLEFDETRI:FirstScript}}&lt;/div&gt;</summary>
		<author><name>Guile</name></author>
	</entry>
	<entry>
		<id>https://www.lets-role.wiki/index.php?title=FristScript&amp;diff=61</id>
		<title>FristScript</title>
		<link rel="alternate" type="text/html" href="https://www.lets-role.wiki/index.php?title=FristScript&amp;diff=61"/>
		<updated>2025-09-10T21:51:02Z</updated>

		<summary type="html">&lt;p&gt;Guile : &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:FirstScript}}&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
Writing a script while you&#039;re not a coder is a very intimidating task : it is a new language with a lot of syntax rules.&lt;br /&gt;
&lt;br /&gt;
You can start reading some tutorials on how to start with javascript. Let&#039;s Role allows you to code with a version of JavaScript that is close to the standard, but with a few differences.&lt;br /&gt;
&lt;br /&gt;
=== Step 0 : basics ===&lt;br /&gt;
Here are a list of empiric rules that will help you writing your script :&lt;br /&gt;
&lt;br /&gt;
* make it readable and understandable : use appropriate names, indent your code (format your code automaticaly with &amp;lt;code&amp;gt;SHIFT+ALT+F&amp;lt;/code&amp;gt;)&lt;br /&gt;
* structure, separate your rules&lt;br /&gt;
* don&#039;t repeat yourself (DRY) : there are many ways to make your code readable and not repetitive. Remind one rule : if you copy / paste some code in your script, it could good to generalise it.&lt;br /&gt;
* Don&#039;t hesitate to ask the community for help&lt;br /&gt;
&lt;br /&gt;
=== Step 1 : init ===&lt;br /&gt;
Every script must have a &amp;lt;code&amp;gt;init&amp;lt;/code&amp;gt; function. This function will be called as soon as a sheet is opened (character sheet, token sheet, craft sheet, prompt sheet). We use the &amp;lt;code&amp;gt;init&amp;lt;/code&amp;gt; to add some interactivity and complex rules on the sheet.&lt;br /&gt;
&lt;br /&gt;
As it is a unique function to handle many different sheets, you must use an &amp;lt;code&amp;gt;if&amp;lt;/code&amp;gt; to check which init code to execute on which sheet.&lt;br /&gt;
&lt;br /&gt;
Here is a simple example that we recommend to use only if you plan to keep the very simple script.&lt;br /&gt;
 init = function (sheet) {&lt;br /&gt;
     if (sheet.id() === &amp;quot;main&amp;quot;) {&lt;br /&gt;
         // write you code here for the sheet with the id &amp;quot;main&amp;quot;&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
If you want to make some inits for few other sheets, we recommend to create different function. The following solution is a very clean way to handle the initialisation of different sheets using their id to detect them. Creating different function helps you to separate the rules of your system. The more your script will grow, the more you&#039;ll need to organize it.&lt;br /&gt;
 init = function (sheet) {&lt;br /&gt;
     const sheetId = sheet.id()&lt;br /&gt;
     if (sheetId === &amp;quot;main&amp;quot;) {&lt;br /&gt;
         initMain(sheet)&lt;br /&gt;
     } else if (sheetId === &amp;quot;monster&amp;quot;) {&lt;br /&gt;
         initMonster(sheet)&lt;br /&gt;
     } else if (sheetId === &amp;quot;object&amp;quot;) {&lt;br /&gt;
         initObject(sheet)&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function initMain(sheet) {&lt;br /&gt;
     // write you code here for the sheet with the id &amp;quot;main&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function initMonster(sheet) {&lt;br /&gt;
     // write you code here for the sheet with the id &amp;quot;monster&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function initObject(sheet) {&lt;br /&gt;
     // write you code here for the sheet with the id &amp;quot;object&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
As the number of pages increases, you will quickly see that you are repeating yourself by adding a long list of &amp;lt;code&amp;gt;if else if&amp;lt;/code&amp;gt;, to prevent that you can check this [[Init Advanced Tip|advanced script tip for init]].&lt;br /&gt;
&lt;br /&gt;
{{CLEFDETRI:FirstScript}}&lt;/div&gt;</summary>
		<author><name>Guile</name></author>
	</entry>
	<entry>
		<id>https://www.lets-role.wiki/index.php?title=FristScript&amp;diff=38</id>
		<title>FristScript</title>
		<link rel="alternate" type="text/html" href="https://www.lets-role.wiki/index.php?title=FristScript&amp;diff=38"/>
		<updated>2025-09-01T16:06:29Z</updated>

		<summary type="html">&lt;p&gt;Guile : &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Introduction ===&lt;br /&gt;
Writing a script while you&#039;re not a coder is a very intimidating task : it is a new language with a lot of syntax rules.&lt;br /&gt;
&lt;br /&gt;
You can start reading some tutorials on how to start with javascript. Let&#039;s Role allows you to code with a version of JavaScript that is close to the standard, but with a few differences.&lt;br /&gt;
&lt;br /&gt;
=== Step 0 : basics ===&lt;br /&gt;
Here are a list of empiric rules that will help you writing your script :&lt;br /&gt;
&lt;br /&gt;
* make it readable and understandable : use appropriate names, indent your code (format your code automaticaly with &amp;lt;code&amp;gt;SHIFT+ALT+F&amp;lt;/code&amp;gt;)&lt;br /&gt;
* structure, separate your rules&lt;br /&gt;
* don&#039;t repeat yourself (DRY) : there are many ways to make your code readable and not repetitive. Remind one rule : if you copy / paste some code in your script, it could good to generalise it.&lt;br /&gt;
* Don&#039;t hesitate to ask the community for help&lt;br /&gt;
&lt;br /&gt;
=== Step 1 : init ===&lt;br /&gt;
Every script must have a &amp;lt;code&amp;gt;init&amp;lt;/code&amp;gt; function. This function will be called as soon as a sheet is opened (character sheet, token sheet, craft sheet, prompt sheet). We use the &amp;lt;code&amp;gt;init&amp;lt;/code&amp;gt; to add some interactivity and complex rules on the sheet.&lt;br /&gt;
&lt;br /&gt;
As it is a unique function to handle many different sheets, you must use an &amp;lt;code&amp;gt;if&amp;lt;/code&amp;gt; to check which init code to execute on which sheet.&lt;br /&gt;
&lt;br /&gt;
Here is a simple example that we recommend to use only if you plan to keep the very simple script.&lt;br /&gt;
 init = function (sheet) {&lt;br /&gt;
     if (sheet.id() === &amp;quot;main&amp;quot;) {&lt;br /&gt;
         // write you code here for the sheet with the id &amp;quot;main&amp;quot;&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
If you want to make some inits for few other sheets, we recommend to create different function. The following solution is a very clean way to handle the initialisation of different sheets using their id to detect them. Creating different function helps you to separate the rules of your system. The more your script will grow, the more you&#039;ll need to organize it.&lt;br /&gt;
 init = function (sheet) {&lt;br /&gt;
     const sheetId = sheet.id()&lt;br /&gt;
     if (sheetId === &amp;quot;main&amp;quot;) {&lt;br /&gt;
         initMain(sheet)&lt;br /&gt;
     } else if (sheetId === &amp;quot;monster&amp;quot;) {&lt;br /&gt;
         initMonster(sheet)&lt;br /&gt;
     } else if (sheetId === &amp;quot;object&amp;quot;) {&lt;br /&gt;
         initObject(sheet)&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function initMain(sheet) {&lt;br /&gt;
     // write you code here for the sheet with the id &amp;quot;main&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function initMonster(sheet) {&lt;br /&gt;
     // write you code here for the sheet with the id &amp;quot;monster&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function initObject(sheet) {&lt;br /&gt;
     // write you code here for the sheet with the id &amp;quot;object&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
As the number of pages increases, you will quickly see that you are repeating yourself by adding a long list of &amp;lt;code&amp;gt;if else if&amp;lt;/code&amp;gt;, to prevent that you can check this [[Init Advanced Tip|advanced script tip for init]].&lt;/div&gt;</summary>
		<author><name>Guile</name></author>
	</entry>
	<entry>
		<id>https://www.lets-role.wiki/index.php?title=Init_Advanced_Tip&amp;diff=37</id>
		<title>Init Advanced Tip</title>
		<link rel="alternate" type="text/html" href="https://www.lets-role.wiki/index.php?title=Init_Advanced_Tip&amp;diff=37"/>
		<updated>2025-09-01T14:58:10Z</updated>

		<summary type="html">&lt;p&gt;Guile : Page créée avec « As soon as you have a large number of different sheet to initialize (more than 10), we recommend to use more advanced code to make it shorter. It uses a list of initializers associated with the sheet id. This will prevent you to write a large and repetitive list of &amp;lt;code&amp;gt;if else if&amp;lt;/code&amp;gt;. The following code shows one way to do it.  // A list of initializers, associating the sheet id with an init function  const initializers = {      main: initMain,      monster:... »&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As soon as you have a large number of different sheet to initialize (more than 10), we recommend to use more advanced code to make it shorter. It uses a list of initializers associated with the sheet id. This will prevent you to write a large and repetitive list of &amp;lt;code&amp;gt;if else if&amp;lt;/code&amp;gt;. The following code shows one way to do it.&lt;br /&gt;
 // A list of initializers, associating the sheet id with an init function&lt;br /&gt;
 const initializers = {&lt;br /&gt;
     main: initMain,&lt;br /&gt;
     monster: initMonster,&lt;br /&gt;
     object: initObject,&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 init = function (sheet) {&lt;br /&gt;
     const sheetId = sheet.id()&lt;br /&gt;
     if (initializers[sheetId]) {&lt;br /&gt;
         initializers[sheetId](sheet);  // this line will execute the desired initializer.&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function initMain(sheet) {&lt;br /&gt;
     // write you code here for the sheet with the id &amp;quot;main&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function initMonster(sheet) {&lt;br /&gt;
     // write you code here for the sheet with the id &amp;quot;monster&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function initObject(sheet) {&lt;br /&gt;
     // write you code here for the sheet with the id &amp;quot;object&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
One big pro for this technic is that the init function will not change anymore. If you want to add a new sheet to initialize (e.g., &amp;lt;code&amp;gt;vehicule&amp;lt;/code&amp;gt;), you have to create a new function called &amp;lt;code&amp;gt;initVehicule&amp;lt;/code&amp;gt; and reference if in &amp;lt;code&amp;gt;initializers&amp;lt;/code&amp;gt; (adding a line &amp;lt;code&amp;gt;vehicule: initVehicule&amp;lt;/code&amp;gt;).&lt;/div&gt;</summary>
		<author><name>Guile</name></author>
	</entry>
	<entry>
		<id>https://www.lets-role.wiki/index.php?title=FristScript&amp;diff=36</id>
		<title>FristScript</title>
		<link rel="alternate" type="text/html" href="https://www.lets-role.wiki/index.php?title=FristScript&amp;diff=36"/>
		<updated>2025-09-01T14:38:21Z</updated>

		<summary type="html">&lt;p&gt;Guile : &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Introduction ===&lt;br /&gt;
Writing a script while you&#039;re not a coder is a very intimidating task : it is a new language with a lot of syntax rules.&lt;br /&gt;
&lt;br /&gt;
You can start reading some tutorials on how to start with javascript. Let&#039;s Role allows you to code with a version of JavaScript that is close to the standard, but with a few differences.&lt;br /&gt;
&lt;br /&gt;
=== Step 0 : basics ===&lt;br /&gt;
Here are a list of empiric rules that will help you writing your script :&lt;br /&gt;
&lt;br /&gt;
* make it readable and understandable : use appropriate names, indent your code (format your code automaticaly with &amp;lt;code&amp;gt;SHIFT+ALT+F&amp;lt;/code&amp;gt;)&lt;br /&gt;
* structure, separate your rules&lt;br /&gt;
* don&#039;t repeat yourself (DRY) : there are many ways to make your code readable and not repetitive. Remind one rule : if you copy / paste some code in your script, it could good to generalise it.&lt;br /&gt;
* Don&#039;t hesitate to ask the community for help&lt;br /&gt;
&lt;br /&gt;
=== Step 1 : init ===&lt;br /&gt;
Every script must have a &amp;lt;code&amp;gt;init&amp;lt;/code&amp;gt; function. This function will be called as soon as a sheet is opened (character sheet, token sheet, craft sheet, prompt sheet). We use the &amp;lt;code&amp;gt;init&amp;lt;/code&amp;gt; to add some interactivity and complex rules on the sheet.&lt;br /&gt;
&lt;br /&gt;
As it is a unique function to handle many different sheets, you must use an &amp;lt;code&amp;gt;if&amp;lt;/code&amp;gt; to check which init code to execute on which sheet.&lt;br /&gt;
&lt;br /&gt;
Here is a simple example that we recommend to use only if you plan to keep the very simple script.&lt;br /&gt;
 init = function (sheet) {&lt;br /&gt;
     if (sheet.id() === &amp;quot;main&amp;quot;) {&lt;br /&gt;
         // write you code here for the sheet with the id &amp;quot;main&amp;quot;&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
If you want to make some inits for few other sheets, we recommend to create different function. The following solution is a very clean way to handle the initialisation of different sheets using their id to detect them. Creating different function helps you to separate the rules of your system. The more your script will grow, the more you&#039;ll need to organize it.&lt;br /&gt;
 init = function (sheet) {&lt;br /&gt;
     const sheetId = sheet.id()&lt;br /&gt;
     if (sheetId === &amp;quot;main&amp;quot;) {&lt;br /&gt;
         initMain(sheet)&lt;br /&gt;
     } else if (sheetId === &amp;quot;monster&amp;quot;) {&lt;br /&gt;
         initMonster(sheet)&lt;br /&gt;
     } else if (sheetId === &amp;quot;object&amp;quot;) {&lt;br /&gt;
         initObject(sheet)&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function initMain(sheet) {&lt;br /&gt;
     // write you code here for the sheet with the id &amp;quot;main&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function initMonster(sheet) {&lt;br /&gt;
     // write you code here for the sheet with the id &amp;quot;monster&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function initObject(sheet) {&lt;br /&gt;
     // write you code here for the sheet with the id &amp;quot;object&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
As soon as you have a large number of different sheet to initialize (more than 10), we recommend to use more advanced code to make it shorter. It uses a list of initializers associated with the sheet id. This will prevent you to write a large and repetitive list of &amp;lt;code&amp;gt;if else if&amp;lt;/code&amp;gt;. The following code shows one way to do it. &lt;br /&gt;
 // A list of initializers, associating the sheet id with an init function&lt;br /&gt;
 const initializers = {&lt;br /&gt;
     main: initMain,&lt;br /&gt;
     monster: initMonster,&lt;br /&gt;
     object: initObject,&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 init = function (sheet) {&lt;br /&gt;
     const sheetId = sheet.id()&lt;br /&gt;
     if (initializers[sheetId]) {&lt;br /&gt;
         initializers[sheetId](sheet);  // this line will execute the desired initializer.&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function initMain(sheet) {&lt;br /&gt;
     // write you code here for the sheet with the id &amp;quot;main&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function initMonster(sheet) {&lt;br /&gt;
     // write you code here for the sheet with the id &amp;quot;monster&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function initObject(sheet) {&lt;br /&gt;
     // write you code here for the sheet with the id &amp;quot;object&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
One big pro for this technic is that the init function will not change anymore. If you want to add a new sheet to initialize (e.g., &amp;lt;code&amp;gt;vehicule&amp;lt;/code&amp;gt;), you have to create a new function called &amp;lt;code&amp;gt;initVehicule&amp;lt;/code&amp;gt; and reference if in &amp;lt;code&amp;gt;initializers&amp;lt;/code&amp;gt; (adding a line &amp;lt;code&amp;gt;vehicule: initVehicule&amp;lt;/code&amp;gt;).&lt;/div&gt;</summary>
		<author><name>Guile</name></author>
	</entry>
	<entry>
		<id>https://www.lets-role.wiki/index.php?title=FristScript&amp;diff=35</id>
		<title>FristScript</title>
		<link rel="alternate" type="text/html" href="https://www.lets-role.wiki/index.php?title=FristScript&amp;diff=35"/>
		<updated>2025-09-01T14:30:53Z</updated>

		<summary type="html">&lt;p&gt;Guile : add shortcut to format code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Introduction ===&lt;br /&gt;
Writing a script while you&#039;re not a coder is a very intimidating task : it is a new language with a lot of syntax rules.&lt;br /&gt;
&lt;br /&gt;
You can start reading some tutorials on how to start with javascript. Let&#039;s Role allows you to code with a version of JavaScript that is close to the standard, but with a few differences.&lt;br /&gt;
&lt;br /&gt;
=== Step 0 : basics ===&lt;br /&gt;
Here are a list of empiric rules that will help you writing your script :&lt;br /&gt;
&lt;br /&gt;
* make it readable and understandable : use appropriate names, indent your code (format your code automaticaly with &amp;lt;code&amp;gt;SHIFT+ALT+F&amp;lt;/code&amp;gt;)&lt;br /&gt;
* structure, separate your rules&lt;br /&gt;
* don&#039;t repeat yourself (DRY) : there are many ways to make your code read&lt;br /&gt;
&lt;br /&gt;
=== Step 1 : init ===&lt;br /&gt;
Every script must have a &amp;lt;code&amp;gt;init&amp;lt;/code&amp;gt; function. This function will be called as soon as a sheet is opened (character sheet, token sheet, craft sheet, prompt sheet). We use the &amp;lt;code&amp;gt;init&amp;lt;/code&amp;gt; to add some interactivity and complex rules on the sheet.&lt;br /&gt;
&lt;br /&gt;
As it is a unique function to handle many different sheets, you must use an &amp;lt;code&amp;gt;if&amp;lt;/code&amp;gt; to check which init code to execute on which sheet.&lt;br /&gt;
&lt;br /&gt;
Here is a simple example that we recommend to use only if you plan to keep the very simple script.&lt;br /&gt;
 init = function (sheet) {&lt;br /&gt;
     if (sheet.id() === &amp;quot;main&amp;quot;) {&lt;br /&gt;
         // write you code here for the sheet with the id &amp;quot;main&amp;quot;&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
If you want to make some inits for few other sheets, we recommend to create different function. The following solution is a very clean way to handle the initialisation of different sheets using their id to detect them. Creating different function helps you to separate the rules of your system. The more your script will grow, the more you&#039;ll need to organize it.&lt;br /&gt;
 init = function (sheet) {&lt;br /&gt;
     const sheetId = sheet.id()&lt;br /&gt;
     if (sheetId === &amp;quot;main&amp;quot;) {&lt;br /&gt;
         initMain(sheet)&lt;br /&gt;
     } else if (sheetId === &amp;quot;monster&amp;quot;) {&lt;br /&gt;
         initMonster(sheet)&lt;br /&gt;
     } else if (sheetId === &amp;quot;object&amp;quot;) {&lt;br /&gt;
         initObject(sheet)&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function initMain(sheet) {&lt;br /&gt;
     // write you code here for the sheet with the id &amp;quot;main&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function initMonster(sheet) {&lt;br /&gt;
     // write you code here for the sheet with the id &amp;quot;monster&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function initObject(sheet) {&lt;br /&gt;
     // write you code here for the sheet with the id &amp;quot;object&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
As soon as you have a large number of different sheet to initialize (more than 10), we recommend to use more advanced code to make it shorter. It uses a list of initializers associated with the sheet id. This will prevent you to write a large and repetitive list of &amp;lt;code&amp;gt;if else if&amp;lt;/code&amp;gt;. The following code shows one way to do it. &lt;br /&gt;
 // A list of initializers, associating the sheet id with an init function&lt;br /&gt;
 const initializers = {&lt;br /&gt;
     main: initMain,&lt;br /&gt;
     monster: initMonster,&lt;br /&gt;
     object: initObject,&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 init = function (sheet) {&lt;br /&gt;
     const sheetId = sheet.id()&lt;br /&gt;
     if (initializers[sheetId]) {&lt;br /&gt;
         initializers[sheetId](sheet);  // this line will execute the desired initializer.&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function initMain(sheet) {&lt;br /&gt;
     // write you code here for the sheet with the id &amp;quot;main&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function initMonster(sheet) {&lt;br /&gt;
     // write you code here for the sheet with the id &amp;quot;monster&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function initObject(sheet) {&lt;br /&gt;
     // write you code here for the sheet with the id &amp;quot;object&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
One big pro for this technic is that the init function will not change anymore. If you want to add a new sheet to initialize (e.g., &amp;lt;code&amp;gt;vehicule&amp;lt;/code&amp;gt;), you have to create a new function called &amp;lt;code&amp;gt;initVehicule&amp;lt;/code&amp;gt; and reference if in &amp;lt;code&amp;gt;initializers&amp;lt;/code&amp;gt; (adding a line &amp;lt;code&amp;gt;vehicule: initVehicule&amp;lt;/code&amp;gt;).&lt;/div&gt;</summary>
		<author><name>Guile</name></author>
	</entry>
	<entry>
		<id>https://www.lets-role.wiki/index.php?title=FristScript&amp;diff=34</id>
		<title>FristScript</title>
		<link rel="alternate" type="text/html" href="https://www.lets-role.wiki/index.php?title=FristScript&amp;diff=34"/>
		<updated>2025-09-01T13:26:11Z</updated>

		<summary type="html">&lt;p&gt;Guile : Page créée avec « === Introduction === Writing a script while you&amp;#039;re not a coder is a very intimidating task : it is a new language with a lot of syntax rules.  You can start reading some tutorials on how to start with javascript. Let&amp;#039;s Role allows you to code with a version of JavaScript that is close to the standard, but with a few differences.  === Step 0 : basics === Here are a list of empiric rules that will help you writing your script :  * make it readable and understandabl... »&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Introduction ===&lt;br /&gt;
Writing a script while you&#039;re not a coder is a very intimidating task : it is a new language with a lot of syntax rules.&lt;br /&gt;
&lt;br /&gt;
You can start reading some tutorials on how to start with javascript. Let&#039;s Role allows you to code with a version of JavaScript that is close to the standard, but with a few differences.&lt;br /&gt;
&lt;br /&gt;
=== Step 0 : basics ===&lt;br /&gt;
Here are a list of empiric rules that will help you writing your script :&lt;br /&gt;
&lt;br /&gt;
* make it readable and understandable : use appropriate names, indent your code&lt;br /&gt;
* structure, separate your rules&lt;br /&gt;
* don&#039;t repeat yourself (DRY) : there are many ways to make your code read&lt;br /&gt;
&lt;br /&gt;
=== Step 1 : init ===&lt;br /&gt;
Every script must have a &amp;lt;code&amp;gt;init&amp;lt;/code&amp;gt; function. This function will be called as soon as a sheet is opened (character sheet, token sheet, craft sheet, prompt sheet). We use the &amp;lt;code&amp;gt;init&amp;lt;/code&amp;gt; to add some interactivity and complex rules on the sheet.&lt;br /&gt;
&lt;br /&gt;
As it is a unique function to handle many different sheets, you must use an &amp;lt;code&amp;gt;if&amp;lt;/code&amp;gt; to check which init code to execute on which sheet.&lt;br /&gt;
&lt;br /&gt;
Here is a simple example that we recommend to use only if you plan to keep the very simple script.&lt;br /&gt;
 init = function (sheet) {&lt;br /&gt;
     if (sheet.id() === &amp;quot;main&amp;quot;) {&lt;br /&gt;
         // write you code here for the sheet with the id &amp;quot;main&amp;quot;&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
If you want to make some inits for few other sheets, we recommend to create different function. The following solution is a very clean way to handle the initialisation of different sheets using their id to detect them. Creating different function helps you to separate the rules of your system. The more your script will grow, the more you&#039;ll need to organize it.&lt;br /&gt;
 init = function (sheet) {&lt;br /&gt;
     const sheetId = sheet.id()&lt;br /&gt;
     if (sheetId === &amp;quot;main&amp;quot;) {&lt;br /&gt;
         initMain(sheet)&lt;br /&gt;
     } else if (sheetId === &amp;quot;monster&amp;quot;) {&lt;br /&gt;
         initMonster(sheet)&lt;br /&gt;
     } else if (sheetId === &amp;quot;object&amp;quot;) {&lt;br /&gt;
         initObject(sheet)&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function initMain(sheet) {&lt;br /&gt;
     // write you code here for the sheet with the id &amp;quot;main&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function initMonster(sheet) {&lt;br /&gt;
     // write you code here for the sheet with the id &amp;quot;monster&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function initObject(sheet) {&lt;br /&gt;
     // write you code here for the sheet with the id &amp;quot;object&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
As soon as you have a large number of different sheet to initialize (more than 10), we recommend to use more advanced code to make it shorter. It uses a list of initializers associated with the sheet id. This will prevent you to write a large and repetitive list of &amp;lt;code&amp;gt;if else if&amp;lt;/code&amp;gt;. The following code shows one way to do it. &lt;br /&gt;
 // A list of initializers, associating the sheet id with an init function&lt;br /&gt;
 const initializers = {&lt;br /&gt;
     main: initMain,&lt;br /&gt;
     monster: initMonster,&lt;br /&gt;
     object: initObject,&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 init = function (sheet) {&lt;br /&gt;
     const sheetId = sheet.id()&lt;br /&gt;
     if (initializers[sheetId]) {&lt;br /&gt;
         initializers[sheetId](sheet);  // this line will execute the desired initializer.&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function initMain(sheet) {&lt;br /&gt;
     // write you code here for the sheet with the id &amp;quot;main&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function initMonster(sheet) {&lt;br /&gt;
     // write you code here for the sheet with the id &amp;quot;monster&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 function initObject(sheet) {&lt;br /&gt;
     // write you code here for the sheet with the id &amp;quot;object&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
One big pro for this technic is that the init function will not change anymore. If you want to add a new sheet to initialize (e.g., &amp;lt;code&amp;gt;vehicule&amp;lt;/code&amp;gt;), you have to create a new function called &amp;lt;code&amp;gt;initVehicule&amp;lt;/code&amp;gt; and reference if in &amp;lt;code&amp;gt;initializers&amp;lt;/code&amp;gt; (adding a line &amp;lt;code&amp;gt;vehicule: initVehicule&amp;lt;/code&amp;gt;).&lt;/div&gt;</summary>
		<author><name>Guile</name></author>
	</entry>
	<entry>
		<id>https://www.lets-role.wiki/index.php?title=System_Builder&amp;diff=33</id>
		<title>System Builder</title>
		<link rel="alternate" type="text/html" href="https://www.lets-role.wiki/index.php?title=System_Builder&amp;diff=33"/>
		<updated>2025-09-01T08:53:31Z</updated>

		<summary type="html">&lt;p&gt;Guile : Add First script link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The System Builder is a tool for creating game systems for the [https://lets-role.com/ Let&#039;s Roll] gaming tables. It allows for the comprehensive construction of various essential tools such as player character sheets, as well as the creation of non-player character sheets, objects, and game monitoring tools for Game Masters.&lt;br /&gt;
&lt;br /&gt;
The tool is accessible to anyone with a Let&#039;s Roll account. It is designed so that anyone can develop their own system without any coding knowledge. The System Builder is equipped with coding tools (pseudoJS) that allow for the creation of complex, non-essential functionalities that will add a bit of convenience.&lt;br /&gt;
&lt;br /&gt;
=== First step ===&lt;br /&gt;
Quickstart video guide for creating systems in Let’s Role (🇫🇷 &#039;&#039;French only)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
https://www.youtube.com/watch?v=F141URrFVwo&lt;br /&gt;
[[Fichier:Video_thumbnail_Start_on_SB.png|néant|vignette]]&lt;br /&gt;
&lt;br /&gt;
==== Interface ====&lt;br /&gt;
Inserez l&#039;image de l&#039;interface&lt;br /&gt;
&lt;br /&gt;
# The title of the edited system&lt;br /&gt;
# [Create new views], navigate between [views]...&lt;br /&gt;
# The list of [[components|c]]&amp;lt;nowiki/&amp;gt;[[components|omponents]] usable for building a view&lt;br /&gt;
# [The dependency tree of views]&lt;br /&gt;
# Launch the system on a table to [test the system]&lt;br /&gt;
# The tabs [view], [table], [script], [translation], the tools to develop a system&lt;br /&gt;
# The [preview of the sheet]&lt;br /&gt;
# The buttons [save], [deploy], and [exit]&lt;br /&gt;
# The panel of the selected [component parameters]&lt;br /&gt;
&lt;br /&gt;
===== Views =====&lt;br /&gt;
Views are trees of components. They can be instantiated by the [tab] component or the [repeater] component to create complex and well-organized sheets.&lt;br /&gt;
&lt;br /&gt;
==== Creating a New View ====&lt;br /&gt;
To create a new view, click on the &amp;quot;Create a new view&amp;quot; button. Fill in the popup with an ID (no capital letters, no special characters, no numbers, and use underscores to separate words), for example: &amp;quot;vue_armes&amp;quot;. To switch views, use the dropdown list.&lt;br /&gt;
&lt;br /&gt;
==== Building a View ====&lt;br /&gt;
To build a view, use the components in window 3 by dragging and dropping them into the component tree of the view in window 4.&lt;br /&gt;
&lt;br /&gt;
===== Layout Components =====&lt;br /&gt;
Layout components are used to structure and organize components among themselves, such as rows, columns, and containers.&lt;br /&gt;
&lt;br /&gt;
TODO: Link to a tutorial&lt;br /&gt;
&lt;br /&gt;
===== Form Components =====&lt;br /&gt;
Form components are designed to contain the information for your character sheet.&lt;br /&gt;
&lt;br /&gt;
===== Container Components =====&lt;br /&gt;
Containers are components that can contain views to create complete and dynamic sheets.&lt;br /&gt;
&lt;br /&gt;
=== Special Components ===&lt;br /&gt;
Special components allow you to perform specific and essential actions for a character sheet.&lt;br /&gt;
&lt;br /&gt;
==== Tables ====&lt;br /&gt;
Tables are spreadsheets that allow you to provide information for certain components, such as lists, tabs, etc.&lt;br /&gt;
&lt;br /&gt;
==== Script ====&lt;br /&gt;
The script is a JS file that allows you to perform more complete and complex actions than managing views alone.&lt;br /&gt;
&lt;br /&gt;
[[FristScript|Your first step in the script]]&lt;br /&gt;
&lt;br /&gt;
=== Tutorials ===&lt;br /&gt;
&lt;br /&gt;
#[[Styling character sheets with classes|Build character sheets with Bootstrap]]&lt;br /&gt;
# [[Put a dice roll result in the sheet]]&lt;br /&gt;
# [[Use lists]]&lt;br /&gt;
# [[Use tabs]]&lt;br /&gt;
# [[Use repeaters]]&lt;br /&gt;
# [[Show or hide components]]&lt;br /&gt;
# [https://lets-role.com/help/fr/documentation/v1/component/avatar Configure the avatar properly]&lt;/div&gt;</summary>
		<author><name>Guile</name></author>
	</entry>
	<entry>
		<id>https://www.lets-role.wiki/index.php?title=Put_a_dice_roll_result_in_the_sheet&amp;diff=17</id>
		<title>Put a dice roll result in the sheet</title>
		<link rel="alternate" type="text/html" href="https://www.lets-role.wiki/index.php?title=Put_a_dice_roll_result_in_the_sheet&amp;diff=17"/>
		<updated>2025-08-10T09:14:30Z</updated>

		<summary type="html">&lt;p&gt;Guile : &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Summary ===&lt;br /&gt;
In this tutorial, we&#039;ll see how to fill a label based on a dice roll result.&lt;br /&gt;
&lt;br /&gt;
You will see that the solution can only be made with some script. Here the solution uses a specific action button in the Dice Result.&lt;br /&gt;
&lt;br /&gt;
=== Step by step ===&lt;br /&gt;
&lt;br /&gt;
# create an element that will trigger the dice roll. Ex: a label with the id &amp;lt;code&amp;gt;labelTriggeringDiceRoll&amp;lt;/code&amp;gt;&lt;br /&gt;
# create an element that will receive the dice roll result (or anything based on the dice roll). Ex: a label with the id &amp;lt;code&amp;gt;labelReceivingDiceRoll&amp;lt;/code&amp;gt;&lt;br /&gt;
# in the script, add an click event that rolls the dice you need by using &amp;lt;code&amp;gt;Dice.roll&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt;Dice.roll&amp;lt;/code&amp;gt; accepts a list of action buttons as last parameter. This is an object whose keys are the Button label that will be shown in the Dice log and values are a function that is called when the button is clicked (see the [https://lets-role.com/help/en/documentation/v1/scripting/dice-api Actions section in the Dice API documentation]). The parameter given to the function is a [https://lets-role.com/help/en/documentation/v1/scripting/dice-result Dice Result].&lt;br /&gt;
# If correctly defined, the function can have an elegant access to the sheet.&lt;br /&gt;
# This access to the sheet is the main way to change the desired label.&lt;br /&gt;
&lt;br /&gt;
=== Final code ===&lt;br /&gt;
Here is the code used in the [https://lets-role.com/system/system-builder-demo-16760 System Builder Demo]&lt;br /&gt;
 const labelToClick = sheet.get(&amp;quot;labelTriggeringDiceRoll&amp;quot;);      // get the label that will roll dice when clicked&lt;br /&gt;
 labelToClick.on(&amp;quot;click&amp;quot;, function () {                          // handle the click event on the label&lt;br /&gt;
   const actions = {};                                           //   initiate the list of actions in dice result&lt;br /&gt;
   actions[_(&amp;quot;Apply to sheet&amp;quot;)] = function (dice) {              //   add a translated button label&lt;br /&gt;
     const labelToFill = sheet.get(&amp;quot;labelReceivingDiceRoll&amp;quot;);    //     when click on the action button, the code can access to the label to change&lt;br /&gt;
     labelToFill.value(&amp;quot;Last roll was &amp;quot; + dice.total);           //     set anything in the label, based on dice&lt;br /&gt;
   };&lt;br /&gt;
   Dice.roll(sheet, &amp;quot;10+1D10&amp;quot;, &amp;quot;Roll strength&amp;quot;, &amp;quot;all&amp;quot;, actions); // Roll the dice&lt;br /&gt;
 });&lt;br /&gt;
&lt;br /&gt;
=== Live example ===&lt;br /&gt;
You can see a live example in the [https://lets-role.com/system/system-builder-demo-16760 System Builder Demo] in the tab &amp;quot;Fill with Dice Result&amp;quot; (you must run a table in order to have dice rolls, the sheet preview block dice rolls)&lt;br /&gt;
&lt;br /&gt;
You can check the code in the function &amp;lt;code&amp;gt;initFillWithRoll&amp;lt;/code&amp;gt; that illustrates what is described in this tutorial.&lt;/div&gt;</summary>
		<author><name>Guile</name></author>
	</entry>
	<entry>
		<id>https://www.lets-role.wiki/index.php?title=System_Builder&amp;diff=16</id>
		<title>System Builder</title>
		<link rel="alternate" type="text/html" href="https://www.lets-role.wiki/index.php?title=System_Builder&amp;diff=16"/>
		<updated>2025-05-09T08:19:44Z</updated>

		<summary type="html">&lt;p&gt;Guile : link to video&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== First step ===&lt;br /&gt;
Quickstart video guide for creating systems in Let’s Role (🇫🇷 &#039;&#039;French only)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
https://www.youtube.com/watch?v=F141URrFVwo&lt;br /&gt;
[[Fichier:Video thumbnail Start on SB.png|néant|vignette]]&lt;br /&gt;
&lt;br /&gt;
=== Tutorials ===&lt;br /&gt;
[[Put a dice roll result in the sheet]]&lt;/div&gt;</summary>
		<author><name>Guile</name></author>
	</entry>
	<entry>
		<id>https://www.lets-role.wiki/index.php?title=Fichier:Video_thumbnail_Start_on_SB.png&amp;diff=15</id>
		<title>Fichier:Video thumbnail Start on SB.png</title>
		<link rel="alternate" type="text/html" href="https://www.lets-role.wiki/index.php?title=Fichier:Video_thumbnail_Start_on_SB.png&amp;diff=15"/>
		<updated>2025-05-09T08:14:24Z</updated>

		<summary type="html">&lt;p&gt;Guile : &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Video thumbnail Start on SB&lt;/div&gt;</summary>
		<author><name>Guile</name></author>
	</entry>
	<entry>
		<id>https://www.lets-role.wiki/index.php?title=Put_a_dice_roll_result_in_the_sheet&amp;diff=14</id>
		<title>Put a dice roll result in the sheet</title>
		<link rel="alternate" type="text/html" href="https://www.lets-role.wiki/index.php?title=Put_a_dice_roll_result_in_the_sheet&amp;diff=14"/>
		<updated>2025-05-08T21:35:24Z</updated>

		<summary type="html">&lt;p&gt;Guile : first tutorial&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Summary ===&lt;br /&gt;
In this tutorial, we&#039;ll see how to fill a label based on a dice roll result.&lt;br /&gt;
&lt;br /&gt;
You will see that the solution can only be made with some script, using a specific action button in the Dice Result.&lt;br /&gt;
&lt;br /&gt;
=== Step by step ===&lt;br /&gt;
&lt;br /&gt;
# create an element that will trigger the dice roll. Ex: a label with the id &amp;lt;code&amp;gt;labelTriggeringDiceRoll&amp;lt;/code&amp;gt;&lt;br /&gt;
# create an element that will receive the dice roll result (or anything based on the dice roll). Ex: a label with the id &amp;lt;code&amp;gt;labelReceivingDiceRoll&amp;lt;/code&amp;gt;&lt;br /&gt;
# in the script, add an click event that rolls the dice you need by using &amp;lt;code&amp;gt;Dice.roll&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt;Dice.roll&amp;lt;/code&amp;gt; accepts a list of action buttons as last parameter. This is an object whose keys are the Button label that will be shown in the Dice log and values are a function that is called when the button is clicked (see the [https://lets-role.com/help/en/documentation/v1/scripting/dice-api Actions section in the Dice API documentation]). The parameter given to the function is a [https://lets-role.com/help/en/documentation/v1/scripting/dice-result Dice Result].&lt;br /&gt;
# If correctly defined, the function can have an elegant access to the sheet.&lt;br /&gt;
# This access to the sheet is the main way to change the desired label.&lt;br /&gt;
&lt;br /&gt;
=== Final code ===&lt;br /&gt;
Here is the code used in the [https://lets-role.com/system/system-builder-demo-16760 System Builder Demo]&lt;br /&gt;
 const labelToClick = sheet.get(&amp;quot;labelTriggeringDiceRoll&amp;quot;);      // get the label that will roll dice when clicked&lt;br /&gt;
 labelToClick.on(&amp;quot;click&amp;quot;, function () {                          // handle the click event on the label&lt;br /&gt;
   const actions = {};                                           //   initiate the list of actions in dice result&lt;br /&gt;
   actions[_(&amp;quot;Apply to sheet&amp;quot;)] = function (dice) {              //   add a translated button label&lt;br /&gt;
     const labelToFill = sheet.get(&amp;quot;labelReceivingDiceRoll&amp;quot;);    //     when click on the action button, the code can access to the label to change&lt;br /&gt;
     labelToFill.value(&amp;quot;Last roll was &amp;quot; + dice.total);           //     set anything in the label, based on dice&lt;br /&gt;
   };&lt;br /&gt;
   Dice.roll(sheet, &amp;quot;10+1D10&amp;quot;, &amp;quot;Roll strength&amp;quot;, &amp;quot;all&amp;quot;, actions); // Roll the dice&lt;br /&gt;
 });&lt;br /&gt;
&lt;br /&gt;
=== Live example ===&lt;br /&gt;
You can see a live example in the [https://lets-role.com/system/system-builder-demo-16760 System Builder Demo] in the tab &amp;quot;Fill with Dice Result&amp;quot; (you must run a table in order to have dice rolls, the sheet preview block dice rolls)&lt;br /&gt;
&lt;br /&gt;
You can check the code in the function &amp;lt;code&amp;gt;initFillWithRoll&amp;lt;/code&amp;gt; that illustrates what is described in this tutorial.&lt;/div&gt;</summary>
		<author><name>Guile</name></author>
	</entry>
	<entry>
		<id>https://www.lets-role.wiki/index.php?title=System_Builder&amp;diff=13</id>
		<title>System Builder</title>
		<link rel="alternate" type="text/html" href="https://www.lets-role.wiki/index.php?title=System_Builder&amp;diff=13"/>
		<updated>2025-05-08T20:28:06Z</updated>

		<summary type="html">&lt;p&gt;Guile : First tutorial&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
=== Tutorials ===&lt;br /&gt;
[[Put a dice roll result in the sheet]]&lt;/div&gt;</summary>
		<author><name>Guile</name></author>
	</entry>
	<entry>
		<id>https://www.lets-role.wiki/index.php?title=Accueil&amp;diff=11</id>
		<title>Accueil</title>
		<link rel="alternate" type="text/html" href="https://www.lets-role.wiki/index.php?title=Accueil&amp;diff=11"/>
		<updated>2025-01-27T09:47:11Z</updated>

		<summary type="html">&lt;p&gt;Guile : fix a typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Bienvenue sur le Wiki de Let&#039;s Role =&lt;br /&gt;
&lt;br /&gt;
== À propos de ce wiki ==&lt;br /&gt;
&lt;br /&gt;
Ce wiki est dédié à [https://www.lets-role.com Let&#039;s Role], la plateforme de jeu de rôle en ligne. Il est créé et géré par la communauté. La société Let&#039;s Role, ses dirigeants et employés n&#039;ont aucun lien direct avec la gestion de ce wiki. Les logos Let&#039;s Role sont utilisés avec la permission explicite et révocable de la SAS Let&#039;s Role.&lt;br /&gt;
&lt;br /&gt;
== Nos motivations ==&lt;br /&gt;
&lt;br /&gt;
* Centraliser les informations pour les [[Nouveaux arrivants]]&lt;br /&gt;
* Partager des conseils, astuces et bonnes pratiques sur le [[System Builder]]&lt;br /&gt;
* Documenter les fonctionnalités et les mises à jour de la plateforme&lt;br /&gt;
* Créer une ressource collaborative pour tous les utilisateurs (voir &amp;quot;Comment contribuer&amp;quot; juste en dessous)&lt;br /&gt;
&lt;br /&gt;
== Comment contribuer ==&lt;br /&gt;
&lt;br /&gt;
Pour préserver la qualité du contenu et nous protéger contre le spam, les comptes doivent être validés avant de pouvoir éditer des pages. Voici comment procéder pour contribuer :&lt;br /&gt;
&lt;br /&gt;
# Rejoignez le [https://discord.gg/let-s-role-488658494891753473 Discord officiel de Let&#039;s Role]&lt;br /&gt;
# Contactez un archiviste du wiki sur le canal dédié&lt;br /&gt;
# Joindre votre pseudo sur le Wiki à la demande&lt;br /&gt;
# Attendez la validation de votre compte par un modérateur&lt;br /&gt;
&lt;br /&gt;
Une fois votre compte validé, vous pourrez créer et modifier des pages du wiki.&lt;br /&gt;
*Par mesure de sécurité, les comptes de moins de 6 mois d&#039;ancienneté ne seront pas admis.*&lt;br /&gt;
&lt;br /&gt;
== Recommandations pour la contribution ==&lt;br /&gt;
&lt;br /&gt;
* Vérifiez que l&#039;information n&#039;existe pas déjà avant de créer une nouvelle page&lt;br /&gt;
* Respectez les [[conventions d&#039;édition]] du wiki&lt;br /&gt;
* Citez vos sources lorsque vous ajoutez des informations&lt;br /&gt;
* Soyez objectif et factuel dans vos contributions&lt;br /&gt;
&lt;br /&gt;
== Traduction en anglais ==&lt;br /&gt;
&lt;br /&gt;
Pour rendre le wiki accessible au plus grand nombre, nous encourageons la traduction des pages en anglais. Cependant :&lt;br /&gt;
&lt;br /&gt;
* Évitez l&#039;utilisation de traducteurs automatiques comme Google Translate&lt;br /&gt;
* Traduisez uniquement si vous avez une bonne maîtrise de l&#039;anglais&lt;br /&gt;
* Assurez-vous que la traduction conserve le sens et la qualité de l&#039;original&lt;br /&gt;
&lt;br /&gt;
== Besoin d&#039;aide ? ==&lt;br /&gt;
&lt;br /&gt;
Si vous avez des questions ou besoin d&#039;assistance, n&#039;hésitez pas à contacter un archiviste sur le [https://discord.gg/let-s-role-488658494891753473 Discord de Let&#039;s Role] ou à consulter notre [[FAQ]].&lt;br /&gt;
&lt;br /&gt;
Merci de votre intérêt pour le Wiki de Let&#039;s Role. Ensemble, construisons une ressource précieuse pour notre communauté !&lt;/div&gt;</summary>
		<author><name>Guile</name></author>
	</entry>
</feed>