<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.starbasegame.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Danthbyrth</id>
	<title>Starbase wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.starbasegame.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Danthbyrth"/>
	<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=Special:Contributions/Danthbyrth"/>
	<updated>2026-04-30T15:50:34Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=YOLOL/fr&amp;diff=30578</id>
		<title>YOLOL/fr</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=YOLOL/fr&amp;diff=30578"/>
		<updated>2022-04-14T11:15:19Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: /* Opérations sur des variables mixtes */  traduction et reformulation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Otherlang2&lt;br /&gt;
|en=YOLOL&lt;br /&gt;
|de=YOLOL:de&lt;br /&gt;
|fr=YOLOL/fr&lt;br /&gt;
|ru=YOLOL:ru&lt;br /&gt;
|ua=YOLOL:ua&lt;br /&gt;
|jp=YOLOL:jp&lt;br /&gt;
|zh-cn=YOLOL语言&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
{{#evt:service=youtube|id=https://www.youtube.com/watch?v=7lXK6_bktUk|alignment=center}}&lt;br /&gt;
&lt;br /&gt;
le YOLOL est un langage de programmation spécifique à Starbase qui est utilisé en parallèle du l'[[Universal tool/fr|outil universel]] pour contrôler et gérer les [[Devices_and_machines/fr|appareils]].&amp;lt;br&amp;gt;&lt;br /&gt;
Le code est écrit ligne par ligne sur une [[YOLOL Chip/fr|puce YOLOL]] qui est ensuite insérée dans un [[Chip socket/fr|socle à puce]] connecté au [[Data networks/fr|réseau de données]] du vaisseau afin d'accéder aux [[Device fields/fr|champs de périphérique]].&amp;lt;br&amp;gt;&lt;br /&gt;
Le langage YOLOL est compatible avec presque tous les équipements et engins de l'univers connu.&lt;br /&gt;
&lt;br /&gt;
===Comment ça marche?===&lt;br /&gt;
Le YOLOL fonctionne par cycle: Les lignes de code sont exécutées les unes après les autres du haut vers le bas, puis la séquence reprend une fois la dernière ligne passée. Chaque ligne est lue dans un intervalle de temps constant de 0.2 secondes, quelque soit sa longueur et le nombre d'instructions qui y sont contenues.&lt;br /&gt;
&lt;br /&gt;
Pour faire simple:&lt;br /&gt;
# Le code se lance en commençant par la ligne 1&lt;br /&gt;
# La ligne en cours est exécutée, puis le programme passe à la suivante après un intervalle de temps de 0.2 secondes&lt;br /&gt;
# L'étape 2 est répétée pour les lignes 2, 3, 4... jusqu'à la dernière&lt;br /&gt;
# La puce se réinitialise à l'étape 1 une fois le processus terminé&lt;br /&gt;
&lt;br /&gt;
===Limites===&lt;br /&gt;
* Chaque puce YOLOL contient 20 lignes de code. Ni plus, ni moins. L'exécution d'un cycle complet prend donc 20 * 0.2 = 4 secondes si il est mené à son terme.&lt;br /&gt;
* Chaque lignes peut contenir un maximum de 70 caractères (symboles et espaces inclus).&lt;br /&gt;
&lt;br /&gt;
===Remarques===&lt;br /&gt;
* Les puces YOLOL possèdent une fonction de mise en pause, qui fige l'exécution du code à la ligne en cours.&lt;br /&gt;
* Les lignes vides nécessitent tout de même l'intervalle de temps des 0.2 secondes pour être passées, provoquant de courts délais d'exécution (il en va de même pour les lignes ne contenant que des commentaires).&lt;br /&gt;
* Une seule ligne de code peut contenir plusieurs instructions à la fois, autant que peut le supporter la limite maximale de caractères. Celle-ci seront alors lues dans l'ordre de gauche à droite.&lt;br /&gt;
* Certaines instructions permettent de passer à une ligne spécifique, ce qui rend le code plus modulable.&lt;br /&gt;
* Les espaces blancs &amp;quot; &amp;quot; dans le code sont optionnels pour la plupart des cas, comme par exemple avant des &amp;quot;:&amp;quot;, après les commandes &amp;quot;if&amp;quot;, &amp;quot;then&amp;quot; et &amp;quot;end&amp;quot;, ou encore entre les lettres, les chiffres, et les symboles, etc. Ils ne sont nécessaires que lorsqu'il y a risque d'ambiguité sans.&lt;br /&gt;
&lt;br /&gt;
== Les Variables ==&lt;br /&gt;
Les variables permettent d'associer un '''nom''' à une '''valeur''' pour faciliter l'acquisition ultérieure de cette dernière. Dès lors, à chaque fois que le '''nom''' de la variable sera appelé, c'est sa '''valeur''' qui sera demandée et/ou modifiée suivant l'instruction utilisée.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 ButtonState = 1&lt;br /&gt;
* Dans ce script, on attribue à la variable nommée '''ButtonState''' la valeur numérique '''1'''.&lt;br /&gt;
 if ButtonState &amp;gt;= 1 then DoorState = 1 end&lt;br /&gt;
* Maintenant, on vérifie si la valeur de la variable '''ButtonState''' est supérieure ou égale à '''1''', auquel cas la variable '''DoorState''' se voit elle aussi associée à '''1'''.&lt;br /&gt;
&lt;br /&gt;
===Les Noms de Variables===&lt;br /&gt;
====Sensibilité à la casse====&lt;br /&gt;
Le langage YOLOL est dit &amp;quot;insensible à la casse&amp;quot;, ce qui signifie que les noms des variables peuvent contenir des majuscules et des minuscules sans différencier les deux. Ainsi '''ButtonState''' et '''buttonstate''' désignent indistinctement la même variable. C'est une fonctionnalité très pratique pour rendre le code plus lisible.&lt;br /&gt;
&lt;br /&gt;
====Les variables internes et externes====&lt;br /&gt;
Il existe deux genre de variables: les '''variables internes''' qui ne peuvent être utilisées qu'au sein de la puce YOLOL où elles ont été initiées et les '''variables externes''' qui font appel aux [[device fields/fr|champs de périphérique]] des appareils branchés sur le même [[data networks/fr|réseau de données]] pour en demander ou modifier les valeurs.&amp;lt;br&amp;gt;&lt;br /&gt;
Pour les différencier, les variables externes sont précédées d'un double-point (''':''').&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 if :ButtonState &amp;gt;= 1 then :DoorState = 1 end&lt;br /&gt;
* Comme vu précédemment, ce script évalue la valeur de '''ButtonState''' et, si elle est supérieure ou égale à '''1''', associe '''DoorState''' à '''1'''. Les deux variables seront cependant ici appelées sur l'ensemble des équipements présents sur le réseau de données, par exemple pour ouvrir une porte si un bouton est appuyé.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Remarques====&lt;br /&gt;
* Les champs ayant le même nom au sein du réseau de données sont liées et ont presque toujours la même valeur. Ainsi, une variable externe qui en modifie la valeur le fera sur tout les appareils associés.&lt;br /&gt;
* Il n'est actuellement pas possible d'appeler une variable initiée sur un puce YOLOL depuis une autre puce YOLOL.&lt;br /&gt;
&lt;br /&gt;
===Les Valeurs de Variables===&lt;br /&gt;
====Typage====&lt;br /&gt;
Le langage YOLOL supporte deux types de valeurs pour les variables: Les '''valeurs numériques''' et les '''chaînes de caractères''' (ou &amp;quot;string&amp;quot;). Cette différence est importante car en fonction du type de variable, le résultat d'une même instruction sera différente.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 Addition = 3 + 5&lt;br /&gt;
* Cette instruction conduit à additionner les deux valeurs numériques '''3''' et '''5'''. Le résultat sera donc '''8'''.&lt;br /&gt;
 Addition = &amp;quot;3&amp;quot; + &amp;quot;5&amp;quot;&lt;br /&gt;
* Cette instruction conduit à associer les chaînes de caractères '''&amp;quot;3&amp;quot;''' et '''&amp;quot;5&amp;quot;'''. Le résultat sera donc '''&amp;quot;35&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
Les variables sont dites à &amp;quot;faible typage&amp;quot;, c'est-à-dire qu'elles ne sont pas restreintes à un seul type. Elles se convertissent systématiquement aux valeurs qui leur sont assignées. Ainsi, une variable associée à une valeur numérique peut la remplacer par une chaîne de caractères et inversement sans provoquer d'erreur dans le code.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 AutoPilot = 128.643&lt;br /&gt;
* cette première instruction associe la variable '''AutoPilot''' à la valeur numérique '''128.643'''.&lt;br /&gt;
 AutoPilot= &amp;quot;Erreur détectée&amp;quot;&lt;br /&gt;
* La variable '''AutoPilot''' se convertit en s'associant à la chaîne de caractères '''&amp;quot;Erreur détectée&amp;quot;''' et la valeur numérique '''128.643''' est effacée.&lt;br /&gt;
&lt;br /&gt;
====Les valeurs numériques====&lt;br /&gt;
Les valeurs numérique dans le langage YOLOL sont des décimales à point fixe. La précision est de un millième: Jusqu'à trois nombre sous la décimale sont acceptés. Fournir une valeur plus précise fonctionne, mais n'affecte pas le résultat final.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 Pi = 3,14159265&lt;br /&gt;
* Le script ci-dessus tente d'associer la variable '''Pi''' à la valeur numérique '''3,14159265'''. Le résultat final sera cependant '''Pi = 3.141''', coupant la précision à trois nombre sous la décimale.&lt;br /&gt;
&lt;br /&gt;
La taille maximale d'une valeur numérique est de 64-bit. De ce fait, la portée maximale (même après opération) est de [-9223372036854775.808, 9223372036854775.807]. Toutes valeurs supérieures ou inférieures seront ramenées aux limites de la portée.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 StarTrek = 9999999999999999.999&lt;br /&gt;
* Ici, on tente d'associer la variable '''StarTrek''' à la valeur numérique '''9999999999999999.999'''. Celle-ci est cependant supérieure à la portée maximale et le résultat final sera '''StarTrek = 9223372036854775.807'''.&lt;br /&gt;
&lt;br /&gt;
====Les chaînes de caractères====&lt;br /&gt;
Pour signaler une chaîne de caractères au langage YOLOL, celle-ci doit être entourée de double-guillemets ('''&amp;quot; &amp;quot;''').&lt;br /&gt;
&lt;br /&gt;
 BadRobots= &amp;quot;Saltberia&amp;quot; &lt;br /&gt;
* Ce script associe la variable '''BadRobot''' à la chaîne de caractères '''&amp;quot;Saltberia&amp;quot;'''.&lt;br /&gt;
Comme pour les valeurs numériques, la taille maximale d'une chaîne de caractères est de 64-bit.&lt;br /&gt;
&lt;br /&gt;
====Remarques====&lt;br /&gt;
* Chaque variable ne peut être que d'un type à la fois, bien que celui-ci puisse être converti au besoin.&lt;br /&gt;
* Les valeurs &amp;quot;False&amp;quot; et &amp;quot;True&amp;quot; sont de type numérique: Elles correspondent respectivement à &amp;quot;0&amp;quot; et &amp;quot;non-0&amp;quot;.&lt;br /&gt;
* Une variable non définie préalablement a par défaut la valeur numérique &amp;quot;0&amp;quot;. L'absence de valeur (&amp;quot;null&amp;quot;) n'est pas reconnue.&lt;br /&gt;
&lt;br /&gt;
==Les Opérations==&lt;br /&gt;
A noter que si les opérations les plus basiques peuvent être utilisées par n'importe quelle [[YOLOL Chip/fr|puce YOLOL]], certaines plus complexes en nécessite des plus avancées, voire de qualité professionelle.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Les opérateurs arythmétiques ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Opération || Valeurs numériques || Chaînes de caractères || Puce nécessaire&lt;br /&gt;
|-&lt;br /&gt;
| A + B || Addition || &amp;quot;B&amp;quot; est ajouté à la suite de &amp;quot;A&amp;quot; || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A - B || Soustraction || La dernière occurence de &amp;quot;B&amp;quot; dans &amp;quot;A&amp;quot; est supprimée || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A * B || Multiplication || Erreur d'exécution. Le reste de la ligne est passé || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A / B || Division || Erreur d'exécution. Le reste de la ligne est passé || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A ^ B || Exponentielle || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| A % B || Modulo || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| ABS A || Absolue || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| A! || Factorielle || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| SQRT A || Racine carrée || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| SIN A || Sinus (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|-&lt;br /&gt;
| COS A || Cosinus (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|-&lt;br /&gt;
| TAN A || Tangente (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|-&lt;br /&gt;
| ASIN A || Sinus inversé (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|-&lt;br /&gt;
| ACOS A || Cosinus inversé (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|-&lt;br /&gt;
| ATAN A || Tangente inversée (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Les opérateurs d'assignation===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation || Valeurs numériques || Chaînes de caractères || Puce nécessaire&lt;br /&gt;
|-&lt;br /&gt;
| A = B || Assignation || Assignation || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A += B || Addition-assignation (A=A+B) || Addition-assignation (A=A+B) || Basique&lt;br /&gt;
|-&lt;br /&gt;
| ++ A  || Pré-incrémentation (A=A+1) || Ajoute un espace à la suite de &amp;quot;A&amp;quot;. Evalué sur la valeur modifiée || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A ++ || Post-incrémentation (A=A+1) || Ajoute un espace à la suite de &amp;quot;A&amp;quot;. Evalué sur la valeur d'origine || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A -= B || Soustraction-assignation (A=A-B) || Soustraction-assignation (A=A-B) || Basique&lt;br /&gt;
|-&lt;br /&gt;
| -- A || Pré-décrémentation (A=A-1) || Retire le dernier caractère de la chaîne. Erreur d'éxecution si la chaîne est vide. Evalué sur la valeur modifiée || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A -- || Post-décrémentation (A=A-1) || Retire le dernier caractère de la chaîne. Erreur d'éxecution si la chaîne est vide. Evalué sur la valeur d'origine || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A *= B || Multiplication-assignation (A=A*B) || Erreur d'exécution. Le reste de la ligne est passé || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A /= B || Division-assignation (A=A/B) || Erreur d'exécution. Le reste de la ligne est passé || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A ^= B || Exponentielle-assignation (A=A^B) || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| A %= B || Modulo-assignation (A=A%B) || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Les opérateurs logiques ===&lt;br /&gt;
Les opérateurs logiques vérifient la véracité d'une affirmation et rendent une réponse sous forme binaire, soit '''&amp;quot;0&amp;quot;''' pour '''&amp;quot;Faux&amp;quot;''', soit '''&amp;quot;1&amp;quot;''' pour '''&amp;quot;Vrai&amp;quot;'''. Les opérateurs '''&amp;quot;NOT&amp;quot;''', '''&amp;quot;AND&amp;quot;''' et '''&amp;quot;OR&amp;quot;''' considèrent 0 comme étant faux et toutes autres valeurs comme étant vraies.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation || Numeric operation || String operation || Chip availability&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;lt; B || A est plus petit que B || &amp;quot;A&amp;quot; est avant &amp;quot;B&amp;quot; dans l'ordre alphabétique || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;gt; B || A est plus grand que B || &amp;quot;A&amp;quot; est après &amp;quot;B&amp;quot; dans l'ordre alphabétique || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A == B || A est égal à B || &amp;quot;A&amp;quot; est égale à &amp;quot;B&amp;quot; || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;lt;= B || &amp;lt; ou == || &amp;lt; ou == || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;gt;= B || &amp;gt; ou == || &amp;gt; ou == || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A != B || A n'est pas égal à B || &amp;quot;A&amp;quot; n'est pas égale à &amp;quot;B&amp;quot; || Basique&lt;br /&gt;
|-&lt;br /&gt;
| NOT A || A est égal à 0 || &amp;quot;A&amp;quot; est 0 || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A AND B || A et B ne sont pas égaux à 0  || &amp;quot;A&amp;quot; et &amp;quot;B&amp;quot; ne sont pas 0 || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A OR B || A ou B n'est pas égal à 0 || &amp;quot;A&amp;quot; ou &amp;quot;B&amp;quot; n'est pas 0 || Basique&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Opérations sur des paramètres mixtes ===&lt;br /&gt;
Réaliser une opération sur des paramètres de types différents revient à tous les considérer comme des chaînes de caractères.&lt;br /&gt;
* Exemple:&lt;br /&gt;
 PreviouslyNumber= &amp;quot;10&amp;quot; + 15&lt;br /&gt;
* Ce script revient à associer la variable '''PreviouslyNumber''' à la chaîne de caractères '''&amp;quot;1015&amp;quot;'''.&lt;br /&gt;
A noter que si des variables sont impliquées, elles ne changent pas de type au cours du processus. Leurs valeurs sont juste projetées comme des chaînes de caractères pour les besoins de l'opération.&lt;br /&gt;
* Exemple:&lt;br /&gt;
 PurelyNumber = 15&lt;br /&gt;
 PurelyString = &amp;quot;10&amp;quot; + PurelyNumber&lt;br /&gt;
* A l'exécution de ce script, la variable '''PurelyString''' est associée à la chaîne de caractères '''&amp;quot;1015&amp;quot;''', tandis que la valeur de '''PurelyNumber''' reste le chiffre '''15'''.&lt;br /&gt;
&lt;br /&gt;
=== Ordre des opérations ===&lt;br /&gt;
Lorsqu'une instruction comprend plusieurs opérations, celle-ci sont réalisées en suivant l'ordre de précédence suivant, de haut en bas, de gauche à droite:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operateurs&lt;br /&gt;
|-&lt;br /&gt;
| ++, --&lt;br /&gt;
|-&lt;br /&gt;
| !&lt;br /&gt;
|-&lt;br /&gt;
| sqrt, %, abs, sin, cos, tan&lt;br /&gt;
|-&lt;br /&gt;
| - (valeur négative)&lt;br /&gt;
|-&lt;br /&gt;
| ^&lt;br /&gt;
|-&lt;br /&gt;
| *, /&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;, &amp;gt;, ==, !=, &amp;lt;=, &amp;gt;=&lt;br /&gt;
|-&lt;br /&gt;
| +, -&lt;br /&gt;
|-&lt;br /&gt;
| Not&lt;br /&gt;
|-&lt;br /&gt;
| Or&lt;br /&gt;
|-&lt;br /&gt;
| And&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Les Commandes==&lt;br /&gt;
&lt;br /&gt;
=== If-else conditional ===&lt;br /&gt;
&lt;br /&gt;
If-else statements are used to branch out the script into different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
They use the following syntax:&lt;br /&gt;
* '''if ''condition'' then ''statement'' else ''statement'' end'''&lt;br /&gt;
** Condition is a statement that results in a numeric value (where 0 is parsed as False, anything else as True), and statements are pieces of script that are run.&lt;br /&gt;
** All If-else conditional stations must have '''end''' syntax written after statement is complete.&lt;br /&gt;
** The statement has to be on one line. The if, then, else and end cannot be on different lines.&lt;br /&gt;
&lt;br /&gt;
If can be used to branch script execution into two possible outcomes temporarily based on variable value(s).&amp;lt;br&amp;gt;&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable != 2 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 3 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; endResult = 4 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* This script sets the value of '''endResult''' to 3 if '''variable''' does not have the value of 2.&lt;br /&gt;
* If '''variable''''s value is 2, '''endResult''' is set to the value of 4.&lt;br /&gt;
&lt;br /&gt;
Note that the else statement -part can be left out if not needed. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable != 2 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 3 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
*This script only sets the value of 3 to '''endResult''' if '''variable''' does not have a value of 2, and doesn't do anything else.&lt;br /&gt;
&lt;br /&gt;
==== Nesting if statements ====&lt;br /&gt;
&lt;br /&gt;
It is possible to place if-conditionals inside the true/false statement blocks to achieve further branching of execution.&amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 0 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 1 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 1 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 2 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &lt;br /&gt;
* This script sets '''endResult''' to 1 if '''variable''' equals 0.&lt;br /&gt;
* If '''variable''' doesn't equal 0, but it equals 1, '''endResult''' is set to 2.&lt;br /&gt;
&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 0 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; endResult == 1 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 2 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; endResult = 1 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
* This script sets '''endResult''' to 2 if '''variable''' has a value of 0, and '''endResult''' equals to 1.&lt;br /&gt;
* Otherwise it sets '''endResult''' to 1.&lt;br /&gt;
&lt;br /&gt;
=== Goto ===&lt;br /&gt;
&lt;br /&gt;
Goto syntax is used when the normal script reading order from 1-&amp;gt;20 is not desired, or needs to be altered.&lt;br /&gt;
&lt;br /&gt;
Goto is used with the following syntax:&lt;br /&gt;
*'''goto lineNumber'''&lt;br /&gt;
** lineNumber is the line which this command will take the script execution.&amp;lt;br&amp;gt;&lt;br /&gt;
** Any remaining script that is on the same line after the goto-command will not be executed.&lt;br /&gt;
*** using if statements before goto ignores goto syntax, assuming the if-statement is false&lt;br /&gt;
** Multiple goto commands can be added on the same line using conditionals, as '''False''' goto commands are skipped.&lt;br /&gt;
** Numeric values outside the [1,20] range are clamped to this range.&lt;br /&gt;
** Non-integer values are floored.&lt;br /&gt;
** String values will result in a Runtime Error.&lt;br /&gt;
&lt;br /&gt;
 if variable == 5 then '''goto 4''' end '''goto 6'''&lt;br /&gt;
&lt;br /&gt;
The script above will go to line number 4, if '''variable''' has a value of 5.&amp;lt;br&amp;gt;&lt;br /&gt;
Otherwise it will go to line number 6. Numerical operations can also be done &amp;quot;inside&amp;quot; the goto, e.g. &lt;br /&gt;
&lt;br /&gt;
  goto 4+1&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
Comments are useful when writing code that is used by a lot of programmers.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that comments also use up space from the pre-determined 70 character line limit and are not excluded from it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commenting is used with the following syntax:&lt;br /&gt;
*// '''text'''&lt;br /&gt;
** Text can be any single-line set of characters.&lt;br /&gt;
&lt;br /&gt;
 '''//''' This is a comment. It will explain how other lines of script work.&lt;br /&gt;
* An example of a possible comment syntax&lt;br /&gt;
&lt;br /&gt;
== Les erreurs ==&lt;br /&gt;
&lt;br /&gt;
Il y a deux types d'erreurs qui peuvent survenir pendant l'éxecution d'une séquence YOLOL:&lt;br /&gt;
# '''Les erreurs de syntaxe (&amp;quot;syntax errors&amp;quot;)''': elles résultent d'un script invalide et empêchent l'interprétation de la ligne toute entière, qui est donc ignorée pour passer directement à la suivante.&lt;br /&gt;
# '''Les erreurs d'exécution (&amp;quot;runtime errors&amp;quot;)''': elles ne sont détectées que pendant l'éxecution du script et provoquent l'arrêt de l'interprétation de la ligne en cours pour passer à la suivante. Elles n'impactent donc pas les instructions antérieures.&lt;br /&gt;
&lt;br /&gt;
== Bugs connus/Comportements indésirables==&lt;br /&gt;
Voici une liste des problèmes relevés avec l'utilisation du langage YOLOL:&amp;lt;br&amp;gt;&lt;br /&gt;
* Les noms de variables contenant les mots-clé &amp;quot;if&amp;quot;, &amp;quot;else&amp;quot; et &amp;quot;end&amp;quot; sont mal interprétés par le langage et provoquent une erreur de syntaxe. Les noms tels que '''life''' ou '''endurance''' sont donc à éviter.&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
==YOLOL Tips &amp;amp; Tricks==&lt;br /&gt;
* [[Common YOLOL|Common YOLOL scripts]]&lt;br /&gt;
* [[YOLOL Tricks]]&lt;br /&gt;
&lt;br /&gt;
== Pages associées ==&lt;br /&gt;
* [[Data networks/fr|Réseaux de données]]&lt;br /&gt;
* [[Devices and machines/fr|Appareils et machines]]&lt;br /&gt;
* [[Device fields/fr|Champs de périphérique ]]&lt;br /&gt;
* [[Universal tool/fr|Outil universel]]&lt;br /&gt;
* [[YOLOL Chip/fr|Puce YOLOL]]&lt;br /&gt;
* [[Chip socket/fr|Socle à puce]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Networks|YOLOL/fr]]&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=YOLOL/fr&amp;diff=30577</id>
		<title>YOLOL/fr</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=YOLOL/fr&amp;diff=30577"/>
		<updated>2022-04-14T09:12:42Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: /* Les opérateurs logiques */  Traduction&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Otherlang2&lt;br /&gt;
|en=YOLOL&lt;br /&gt;
|de=YOLOL:de&lt;br /&gt;
|fr=YOLOL/fr&lt;br /&gt;
|ru=YOLOL:ru&lt;br /&gt;
|ua=YOLOL:ua&lt;br /&gt;
|jp=YOLOL:jp&lt;br /&gt;
|zh-cn=YOLOL语言&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
{{#evt:service=youtube|id=https://www.youtube.com/watch?v=7lXK6_bktUk|alignment=center}}&lt;br /&gt;
&lt;br /&gt;
le YOLOL est un langage de programmation spécifique à Starbase qui est utilisé en parallèle du l'[[Universal tool/fr|outil universel]] pour contrôler et gérer les [[Devices_and_machines/fr|appareils]].&amp;lt;br&amp;gt;&lt;br /&gt;
Le code est écrit ligne par ligne sur une [[YOLOL Chip/fr|puce YOLOL]] qui est ensuite insérée dans un [[Chip socket/fr|socle à puce]] connecté au [[Data networks/fr|réseau de données]] du vaisseau afin d'accéder aux [[Device fields/fr|champs de périphérique]].&amp;lt;br&amp;gt;&lt;br /&gt;
Le langage YOLOL est compatible avec presque tous les équipements et engins de l'univers connu.&lt;br /&gt;
&lt;br /&gt;
===Comment ça marche?===&lt;br /&gt;
Le YOLOL fonctionne par cycle: Les lignes de code sont exécutées les unes après les autres du haut vers le bas, puis la séquence reprend une fois la dernière ligne passée. Chaque ligne est lue dans un intervalle de temps constant de 0.2 secondes, quelque soit sa longueur et le nombre d'instructions qui y sont contenues.&lt;br /&gt;
&lt;br /&gt;
Pour faire simple:&lt;br /&gt;
# Le code se lance en commençant par la ligne 1&lt;br /&gt;
# La ligne en cours est exécutée, puis le programme passe à la suivante après un intervalle de temps de 0.2 secondes&lt;br /&gt;
# L'étape 2 est répétée pour les lignes 2, 3, 4... jusqu'à la dernière&lt;br /&gt;
# La puce se réinitialise à l'étape 1 une fois le processus terminé&lt;br /&gt;
&lt;br /&gt;
===Limites===&lt;br /&gt;
* Chaque puce YOLOL contient 20 lignes de code. Ni plus, ni moins. L'exécution d'un cycle complet prend donc 20 * 0.2 = 4 secondes si il est mené à son terme.&lt;br /&gt;
* Chaque lignes peut contenir un maximum de 70 caractères (symboles et espaces inclus).&lt;br /&gt;
&lt;br /&gt;
===Remarques===&lt;br /&gt;
* Les puces YOLOL possèdent une fonction de mise en pause, qui fige l'exécution du code à la ligne en cours.&lt;br /&gt;
* Les lignes vides nécessitent tout de même l'intervalle de temps des 0.2 secondes pour être passées, provoquant de courts délais d'exécution (il en va de même pour les lignes ne contenant que des commentaires).&lt;br /&gt;
* Une seule ligne de code peut contenir plusieurs instructions à la fois, autant que peut le supporter la limite maximale de caractères. Celle-ci seront alors lues dans l'ordre de gauche à droite.&lt;br /&gt;
* Certaines instructions permettent de passer à une ligne spécifique, ce qui rend le code plus modulable.&lt;br /&gt;
* Les espaces blancs &amp;quot; &amp;quot; dans le code sont optionnels pour la plupart des cas, comme par exemple avant des &amp;quot;:&amp;quot;, après les commandes &amp;quot;if&amp;quot;, &amp;quot;then&amp;quot; et &amp;quot;end&amp;quot;, ou encore entre les lettres, les chiffres, et les symboles, etc. Ils ne sont nécessaires que lorsqu'il y a risque d'ambiguité sans.&lt;br /&gt;
&lt;br /&gt;
== Les Variables ==&lt;br /&gt;
Les variables permettent d'associer un '''nom''' à une '''valeur''' pour faciliter l'acquisition ultérieure de cette dernière. Dès lors, à chaque fois que le '''nom''' de la variable sera appelé, c'est sa '''valeur''' qui sera demandée et/ou modifiée suivant l'instruction utilisée.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 ButtonState = 1&lt;br /&gt;
* Dans ce script, on attribue à la variable nommée '''ButtonState''' la valeur numérique '''1'''.&lt;br /&gt;
 if ButtonState &amp;gt;= 1 then DoorState = 1 end&lt;br /&gt;
* Maintenant, on vérifie si la valeur de la variable '''ButtonState''' est supérieure ou égale à '''1''', auquel cas la variable '''DoorState''' se voit elle aussi associée à '''1'''.&lt;br /&gt;
&lt;br /&gt;
===Les Noms de Variables===&lt;br /&gt;
====Sensibilité à la casse====&lt;br /&gt;
Le langage YOLOL est dit &amp;quot;insensible à la casse&amp;quot;, ce qui signifie que les noms des variables peuvent contenir des majuscules et des minuscules sans différencier les deux. Ainsi '''ButtonState''' et '''buttonstate''' désignent indistinctement la même variable. C'est une fonctionnalité très pratique pour rendre le code plus lisible.&lt;br /&gt;
&lt;br /&gt;
====Les variables internes et externes====&lt;br /&gt;
Il existe deux genre de variables: les '''variables internes''' qui ne peuvent être utilisées qu'au sein de la puce YOLOL où elles ont été initiées et les '''variables externes''' qui font appel aux [[device fields/fr|champs de périphérique]] des appareils branchés sur le même [[data networks/fr|réseau de données]] pour en demander ou modifier les valeurs.&amp;lt;br&amp;gt;&lt;br /&gt;
Pour les différencier, les variables externes sont précédées d'un double-point (''':''').&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 if :ButtonState &amp;gt;= 1 then :DoorState = 1 end&lt;br /&gt;
* Comme vu précédemment, ce script évalue la valeur de '''ButtonState''' et, si elle est supérieure ou égale à '''1''', associe '''DoorState''' à '''1'''. Les deux variables seront cependant ici appelées sur l'ensemble des équipements présents sur le réseau de données, par exemple pour ouvrir une porte si un bouton est appuyé.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Remarques====&lt;br /&gt;
* Les champs ayant le même nom au sein du réseau de données sont liées et ont presque toujours la même valeur. Ainsi, une variable externe qui en modifie la valeur le fera sur tout les appareils associés.&lt;br /&gt;
* Il n'est actuellement pas possible d'appeler une variable initiée sur un puce YOLOL depuis une autre puce YOLOL.&lt;br /&gt;
&lt;br /&gt;
===Les Valeurs de Variables===&lt;br /&gt;
====Typage====&lt;br /&gt;
Le langage YOLOL supporte deux types de valeurs pour les variables: Les '''valeurs numériques''' et les '''chaînes de caractères''' (ou &amp;quot;string&amp;quot;). Cette différence est importante car en fonction du type de variable, le résultat d'une même instruction sera différente.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 Addition = 3 + 5&lt;br /&gt;
* Cette instruction conduit à additionner les deux valeurs numériques '''3''' et '''5'''. Le résultat sera donc '''8'''.&lt;br /&gt;
 Addition = &amp;quot;3&amp;quot; + &amp;quot;5&amp;quot;&lt;br /&gt;
* Cette instruction conduit à associer les chaînes de caractères '''&amp;quot;3&amp;quot;''' et '''&amp;quot;5&amp;quot;'''. Le résultat sera donc '''&amp;quot;35&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
Les variables sont dites à &amp;quot;faible typage&amp;quot;, c'est-à-dire qu'elles ne sont pas restreintes à un seul type. Elles se convertissent systématiquement aux valeurs qui leur sont assignées. Ainsi, une variable associée à une valeur numérique peut la remplacer par une chaîne de caractères et inversement sans provoquer d'erreur dans le code.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 AutoPilot = 128.643&lt;br /&gt;
* cette première instruction associe la variable '''AutoPilot''' à la valeur numérique '''128.643'''.&lt;br /&gt;
 AutoPilot= &amp;quot;Erreur détectée&amp;quot;&lt;br /&gt;
* La variable '''AutoPilot''' se convertit en s'associant à la chaîne de caractères '''&amp;quot;Erreur détectée&amp;quot;''' et la valeur numérique '''128.643''' est effacée.&lt;br /&gt;
&lt;br /&gt;
====Les valeurs numériques====&lt;br /&gt;
Les valeurs numérique dans le langage YOLOL sont des décimales à point fixe. La précision est de un millième: Jusqu'à trois nombre sous la décimale sont acceptés. Fournir une valeur plus précise fonctionne, mais n'affecte pas le résultat final.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 Pi = 3,14159265&lt;br /&gt;
* Le script ci-dessus tente d'associer la variable '''Pi''' à la valeur numérique '''3,14159265'''. Le résultat final sera cependant '''Pi = 3.141''', coupant la précision à trois nombre sous la décimale.&lt;br /&gt;
&lt;br /&gt;
La taille maximale d'une valeur numérique est de 64-bit. De ce fait, la portée maximale (même après opération) est de [-9223372036854775.808, 9223372036854775.807]. Toutes valeurs supérieures ou inférieures seront ramenées aux limites de la portée.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 StarTrek = 9999999999999999.999&lt;br /&gt;
* Ici, on tente d'associer la variable '''StarTrek''' à la valeur numérique '''9999999999999999.999'''. Celle-ci est cependant supérieure à la portée maximale et le résultat final sera '''StarTrek = 9223372036854775.807'''.&lt;br /&gt;
&lt;br /&gt;
====Les chaînes de caractères====&lt;br /&gt;
Pour signaler une chaîne de caractères au langage YOLOL, celle-ci doit être entourée de double-guillemets ('''&amp;quot; &amp;quot;''').&lt;br /&gt;
&lt;br /&gt;
 BadRobots= &amp;quot;Saltberia&amp;quot; &lt;br /&gt;
* Ce script associe la variable '''BadRobot''' à la chaîne de caractères '''&amp;quot;Saltberia&amp;quot;'''.&lt;br /&gt;
Comme pour les valeurs numériques, la taille maximale d'une chaîne de caractères est de 64-bit.&lt;br /&gt;
&lt;br /&gt;
====Remarques====&lt;br /&gt;
* Chaque variable ne peut être que d'un type à la fois, bien que celui-ci puisse être converti au besoin.&lt;br /&gt;
* Les valeurs &amp;quot;False&amp;quot; et &amp;quot;True&amp;quot; sont de type numérique: Elles correspondent respectivement à &amp;quot;0&amp;quot; et &amp;quot;non-0&amp;quot;.&lt;br /&gt;
* Une variable non définie préalablement a par défaut la valeur numérique &amp;quot;0&amp;quot;. L'absence de valeur (&amp;quot;null&amp;quot;) n'est pas reconnue.&lt;br /&gt;
&lt;br /&gt;
==Les Opérations==&lt;br /&gt;
A noter que si les opérations les plus basiques peuvent être utilisées par n'importe quelle [[YOLOL Chip/fr|puce YOLOL]], certaines plus complexes en nécessite des plus avancées, voire de qualité professionelle.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Les opérateurs arythmétiques ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Opération || Valeurs numériques || Chaînes de caractères || Puce nécessaire&lt;br /&gt;
|-&lt;br /&gt;
| A + B || Addition || &amp;quot;B&amp;quot; est ajouté à la suite de &amp;quot;A&amp;quot; || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A - B || Soustraction || La dernière occurence de &amp;quot;B&amp;quot; dans &amp;quot;A&amp;quot; est supprimée || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A * B || Multiplication || Erreur d'exécution. Le reste de la ligne est passé || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A / B || Division || Erreur d'exécution. Le reste de la ligne est passé || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A ^ B || Exponentielle || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| A % B || Modulo || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| ABS A || Absolue || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| A! || Factorielle || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| SQRT A || Racine carrée || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| SIN A || Sinus (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|-&lt;br /&gt;
| COS A || Cosinus (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|-&lt;br /&gt;
| TAN A || Tangente (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|-&lt;br /&gt;
| ASIN A || Sinus inversé (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|-&lt;br /&gt;
| ACOS A || Cosinus inversé (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|-&lt;br /&gt;
| ATAN A || Tangente inversée (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Les opérateurs d'assignation===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation || Valeurs numériques || Chaînes de caractères || Puce nécessaire&lt;br /&gt;
|-&lt;br /&gt;
| A = B || Assignation || Assignation || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A += B || Addition-assignation (A=A+B) || Addition-assignation (A=A+B) || Basique&lt;br /&gt;
|-&lt;br /&gt;
| ++ A  || Pré-incrémentation (A=A+1) || Ajoute un espace à la suite de &amp;quot;A&amp;quot;. Evalué sur la valeur modifiée || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A ++ || Post-incrémentation (A=A+1) || Ajoute un espace à la suite de &amp;quot;A&amp;quot;. Evalué sur la valeur d'origine || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A -= B || Soustraction-assignation (A=A-B) || Soustraction-assignation (A=A-B) || Basique&lt;br /&gt;
|-&lt;br /&gt;
| -- A || Pré-décrémentation (A=A-1) || Retire le dernier caractère de la chaîne. Erreur d'éxecution si la chaîne est vide. Evalué sur la valeur modifiée || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A -- || Post-décrémentation (A=A-1) || Retire le dernier caractère de la chaîne. Erreur d'éxecution si la chaîne est vide. Evalué sur la valeur d'origine || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A *= B || Multiplication-assignation (A=A*B) || Erreur d'exécution. Le reste de la ligne est passé || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A /= B || Division-assignation (A=A/B) || Erreur d'exécution. Le reste de la ligne est passé || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A ^= B || Exponentielle-assignation (A=A^B) || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| A %= B || Modulo-assignation (A=A%B) || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Les opérateurs logiques ===&lt;br /&gt;
Les opérateurs logiques vérifient la véracité d'une affirmation et rendent une réponse sous forme binaire, soit '''&amp;quot;0&amp;quot;''' pour '''&amp;quot;Faux&amp;quot;''', soit '''&amp;quot;1&amp;quot;''' pour '''&amp;quot;Vrai&amp;quot;'''. Les opérateurs '''&amp;quot;NOT&amp;quot;''', '''&amp;quot;AND&amp;quot;''' et '''&amp;quot;OR&amp;quot;''' considèrent 0 comme étant faux et toutes autres valeurs comme étant vraies.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation || Numeric operation || String operation || Chip availability&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;lt; B || A est plus petit que B || &amp;quot;A&amp;quot; est avant &amp;quot;B&amp;quot; dans l'ordre alphabétique || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;gt; B || A est plus grand que B || &amp;quot;A&amp;quot; est après &amp;quot;B&amp;quot; dans l'ordre alphabétique || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A == B || A est égal à B || &amp;quot;A&amp;quot; est égale à &amp;quot;B&amp;quot; || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;lt;= B || &amp;lt; ou == || &amp;lt; ou == || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;gt;= B || &amp;gt; ou == || &amp;gt; ou == || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A != B || A n'est pas égal à B || &amp;quot;A&amp;quot; n'est pas égale à &amp;quot;B&amp;quot; || Basique&lt;br /&gt;
|-&lt;br /&gt;
| NOT A || A est égal à 0 || &amp;quot;A&amp;quot; est 0 || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A AND B || A et B ne sont pas égaux à 0  || &amp;quot;A&amp;quot; et &amp;quot;B&amp;quot; ne sont pas 0 || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A OR B || A ou B n'est pas égal à 0 || &amp;quot;A&amp;quot; ou &amp;quot;B&amp;quot; n'est pas 0 || Basique&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Opérations sur des variables mixtes ===&lt;br /&gt;
&lt;br /&gt;
Mixing variable types in an operation handles the operation using all parameters as ''strings''.&lt;br /&gt;
&lt;br /&gt;
 previouslyNumber= &amp;quot;10&amp;quot; + 15&lt;br /&gt;
* The above script results in '''previouslyNumber''' containing the string value &amp;quot;1015&amp;quot;.&lt;br /&gt;
** Note that the involved parameters themselves don't change types, their values are just cast as strings for the purpose of the operation:&lt;br /&gt;
 &lt;br /&gt;
 purelyNumber = 15&lt;br /&gt;
 purelyString = &amp;quot;10&amp;quot; + purelyNumber&lt;br /&gt;
* When this script has executed, '''purelyString''' contains the string value of &amp;quot;1015&amp;quot;, while '''purelyNumber''' still contains the numeric value of 15.&lt;br /&gt;
&lt;br /&gt;
=== Ordre des opérations ===&lt;br /&gt;
Lorsqu'une instruction comprend plusieurs opérations, celle-ci sont réalisées en suivant l'ordre de précédence suivant, de haut en bas, de gauche à droite:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operateurs&lt;br /&gt;
|-&lt;br /&gt;
| ++, --&lt;br /&gt;
|-&lt;br /&gt;
| !&lt;br /&gt;
|-&lt;br /&gt;
| sqrt, %, abs, sin, cos, tan&lt;br /&gt;
|-&lt;br /&gt;
| - (valeur négative)&lt;br /&gt;
|-&lt;br /&gt;
| ^&lt;br /&gt;
|-&lt;br /&gt;
| *, /&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;, &amp;gt;, ==, !=, &amp;lt;=, &amp;gt;=&lt;br /&gt;
|-&lt;br /&gt;
| +, -&lt;br /&gt;
|-&lt;br /&gt;
| Not&lt;br /&gt;
|-&lt;br /&gt;
| Or&lt;br /&gt;
|-&lt;br /&gt;
| And&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Les Commandes==&lt;br /&gt;
&lt;br /&gt;
=== If-else conditional ===&lt;br /&gt;
&lt;br /&gt;
If-else statements are used to branch out the script into different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
They use the following syntax:&lt;br /&gt;
* '''if ''condition'' then ''statement'' else ''statement'' end'''&lt;br /&gt;
** Condition is a statement that results in a numeric value (where 0 is parsed as False, anything else as True), and statements are pieces of script that are run.&lt;br /&gt;
** All If-else conditional stations must have '''end''' syntax written after statement is complete.&lt;br /&gt;
** The statement has to be on one line. The if, then, else and end cannot be on different lines.&lt;br /&gt;
&lt;br /&gt;
If can be used to branch script execution into two possible outcomes temporarily based on variable value(s).&amp;lt;br&amp;gt;&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable != 2 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 3 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; endResult = 4 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* This script sets the value of '''endResult''' to 3 if '''variable''' does not have the value of 2.&lt;br /&gt;
* If '''variable''''s value is 2, '''endResult''' is set to the value of 4.&lt;br /&gt;
&lt;br /&gt;
Note that the else statement -part can be left out if not needed. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable != 2 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 3 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
*This script only sets the value of 3 to '''endResult''' if '''variable''' does not have a value of 2, and doesn't do anything else.&lt;br /&gt;
&lt;br /&gt;
==== Nesting if statements ====&lt;br /&gt;
&lt;br /&gt;
It is possible to place if-conditionals inside the true/false statement blocks to achieve further branching of execution.&amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 0 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 1 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 1 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 2 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &lt;br /&gt;
* This script sets '''endResult''' to 1 if '''variable''' equals 0.&lt;br /&gt;
* If '''variable''' doesn't equal 0, but it equals 1, '''endResult''' is set to 2.&lt;br /&gt;
&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 0 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; endResult == 1 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 2 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; endResult = 1 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
* This script sets '''endResult''' to 2 if '''variable''' has a value of 0, and '''endResult''' equals to 1.&lt;br /&gt;
* Otherwise it sets '''endResult''' to 1.&lt;br /&gt;
&lt;br /&gt;
=== Goto ===&lt;br /&gt;
&lt;br /&gt;
Goto syntax is used when the normal script reading order from 1-&amp;gt;20 is not desired, or needs to be altered.&lt;br /&gt;
&lt;br /&gt;
Goto is used with the following syntax:&lt;br /&gt;
*'''goto lineNumber'''&lt;br /&gt;
** lineNumber is the line which this command will take the script execution.&amp;lt;br&amp;gt;&lt;br /&gt;
** Any remaining script that is on the same line after the goto-command will not be executed.&lt;br /&gt;
*** using if statements before goto ignores goto syntax, assuming the if-statement is false&lt;br /&gt;
** Multiple goto commands can be added on the same line using conditionals, as '''False''' goto commands are skipped.&lt;br /&gt;
** Numeric values outside the [1,20] range are clamped to this range.&lt;br /&gt;
** Non-integer values are floored.&lt;br /&gt;
** String values will result in a Runtime Error.&lt;br /&gt;
&lt;br /&gt;
 if variable == 5 then '''goto 4''' end '''goto 6'''&lt;br /&gt;
&lt;br /&gt;
The script above will go to line number 4, if '''variable''' has a value of 5.&amp;lt;br&amp;gt;&lt;br /&gt;
Otherwise it will go to line number 6. Numerical operations can also be done &amp;quot;inside&amp;quot; the goto, e.g. &lt;br /&gt;
&lt;br /&gt;
  goto 4+1&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
Comments are useful when writing code that is used by a lot of programmers.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that comments also use up space from the pre-determined 70 character line limit and are not excluded from it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commenting is used with the following syntax:&lt;br /&gt;
*// '''text'''&lt;br /&gt;
** Text can be any single-line set of characters.&lt;br /&gt;
&lt;br /&gt;
 '''//''' This is a comment. It will explain how other lines of script work.&lt;br /&gt;
* An example of a possible comment syntax&lt;br /&gt;
&lt;br /&gt;
== Les erreurs ==&lt;br /&gt;
&lt;br /&gt;
Il y a deux types d'erreurs qui peuvent survenir pendant l'éxecution d'une séquence YOLOL:&lt;br /&gt;
# '''Les erreurs de syntaxe (&amp;quot;syntax errors&amp;quot;)''': elles résultent d'un script invalide et empêchent l'interprétation de la ligne toute entière, qui est donc ignorée pour passer directement à la suivante.&lt;br /&gt;
# '''Les erreurs d'exécution (&amp;quot;runtime errors&amp;quot;)''': elles ne sont détectées que pendant l'éxecution du script et provoquent l'arrêt de l'interprétation de la ligne en cours pour passer à la suivante. Elles n'impactent donc pas les instructions antérieures.&lt;br /&gt;
&lt;br /&gt;
== Bugs connus/Comportements indésirables==&lt;br /&gt;
Voici une liste des problèmes relevés avec l'utilisation du langage YOLOL:&amp;lt;br&amp;gt;&lt;br /&gt;
* Les noms de variables contenant les mots-clé &amp;quot;if&amp;quot;, &amp;quot;else&amp;quot; et &amp;quot;end&amp;quot; sont mal interprétés par le langage et provoquent une erreur de syntaxe. Les noms tels que '''life''' ou '''endurance''' sont donc à éviter.&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
==YOLOL Tips &amp;amp; Tricks==&lt;br /&gt;
* [[Common YOLOL|Common YOLOL scripts]]&lt;br /&gt;
* [[YOLOL Tricks]]&lt;br /&gt;
&lt;br /&gt;
== Pages associées ==&lt;br /&gt;
* [[Data networks/fr|Réseaux de données]]&lt;br /&gt;
* [[Devices and machines/fr|Appareils et machines]]&lt;br /&gt;
* [[Device fields/fr|Champs de périphérique ]]&lt;br /&gt;
* [[Universal tool/fr|Outil universel]]&lt;br /&gt;
* [[YOLOL Chip/fr|Puce YOLOL]]&lt;br /&gt;
* [[Chip socket/fr|Socle à puce]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Networks|YOLOL/fr]]&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=YOLOL/fr&amp;diff=30523</id>
		<title>YOLOL/fr</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=YOLOL/fr&amp;diff=30523"/>
		<updated>2022-04-09T19:34:53Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: /* Remarques */  Ajout d'un commentaire concernant les espaces blancs&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Otherlang2&lt;br /&gt;
|en=YOLOL&lt;br /&gt;
|de=YOLOL:de&lt;br /&gt;
|fr=YOLOL/fr&lt;br /&gt;
|ru=YOLOL:ru&lt;br /&gt;
|ua=YOLOL:ua&lt;br /&gt;
|jp=YOLOL:jp&lt;br /&gt;
|zh-cn=YOLOL语言&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
{{#evt:service=youtube|id=https://www.youtube.com/watch?v=7lXK6_bktUk|alignment=center}}&lt;br /&gt;
&lt;br /&gt;
le YOLOL est un langage de programmation spécifique à Starbase qui est utilisé en parallèle du l'[[Universal tool/fr|outil universel]] pour contrôler et gérer les [[Devices_and_machines/fr|appareils]].&amp;lt;br&amp;gt;&lt;br /&gt;
Le code est écrit ligne par ligne sur une [[YOLOL Chip/fr|puce YOLOL]] qui est ensuite insérée dans un [[Chip socket/fr|socle à puce]] connecté au [[Data networks/fr|réseau de données]] du vaisseau afin d'accéder aux [[Device fields/fr|champs de périphérique]].&amp;lt;br&amp;gt;&lt;br /&gt;
Le langage YOLOL est compatible avec presque tous les équipements et engins de l'univers connu.&lt;br /&gt;
&lt;br /&gt;
===Comment ça marche?===&lt;br /&gt;
Le YOLOL fonctionne par cycle: Les lignes de code sont exécutées les unes après les autres du haut vers le bas, puis la séquence reprend une fois la dernière ligne passée. Chaque ligne est lue dans un intervalle de temps constant de 0.2 secondes, quelque soit sa longueur et le nombre d'instructions qui y sont contenues.&lt;br /&gt;
&lt;br /&gt;
Pour faire simple:&lt;br /&gt;
# Le code se lance en commençant par la ligne 1&lt;br /&gt;
# La ligne en cours est exécutée, puis le programme passe à la suivante après un intervalle de temps de 0.2 secondes&lt;br /&gt;
# L'étape 2 est répétée pour les lignes 2, 3, 4... jusqu'à la dernière&lt;br /&gt;
# La puce se réinitialise à l'étape 1 une fois le processus terminé&lt;br /&gt;
&lt;br /&gt;
===Limites===&lt;br /&gt;
* Chaque puce YOLOL contient 20 lignes de code. Ni plus, ni moins. L'exécution d'un cycle complet prend donc 20 * 0.2 = 4 secondes si il est mené à son terme.&lt;br /&gt;
* Chaque lignes peut contenir un maximum de 70 caractères (symboles et espaces inclus).&lt;br /&gt;
&lt;br /&gt;
===Remarques===&lt;br /&gt;
* Les puces YOLOL possèdent une fonction de mise en pause, qui fige l'exécution du code à la ligne en cours.&lt;br /&gt;
* Les lignes vides nécessitent tout de même l'intervalle de temps des 0.2 secondes pour être passées, provoquant de courts délais d'exécution (il en va de même pour les lignes ne contenant que des commentaires).&lt;br /&gt;
* Une seule ligne de code peut contenir plusieurs instructions à la fois, autant que peut le supporter la limite maximale de caractères. Celle-ci seront alors lues dans l'ordre de gauche à droite.&lt;br /&gt;
* Certaines instructions permettent de passer à une ligne spécifique, ce qui rend le code plus modulable.&lt;br /&gt;
* Les espaces blancs &amp;quot; &amp;quot; dans le code sont optionnels pour la plupart des cas, comme par exemple avant des &amp;quot;:&amp;quot;, après les commandes &amp;quot;if&amp;quot;, &amp;quot;then&amp;quot; et &amp;quot;end&amp;quot;, ou encore entre les lettres, les chiffres, et les symboles, etc. Ils ne sont nécessaires que lorsqu'il y a risque d'ambiguité sans.&lt;br /&gt;
&lt;br /&gt;
== Les Variables ==&lt;br /&gt;
Les variables permettent d'associer un '''nom''' à une '''valeur''' pour faciliter l'acquisition ultérieure de cette dernière. Dès lors, à chaque fois que le '''nom''' de la variable sera appelé, c'est sa '''valeur''' qui sera demandée et/ou modifiée suivant l'instruction utilisée.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 ButtonState = 1&lt;br /&gt;
* Dans ce script, on attribue à la variable nommée '''ButtonState''' la valeur numérique '''1'''.&lt;br /&gt;
 if ButtonState &amp;gt;= 1 then DoorState = 1 end&lt;br /&gt;
* Maintenant, on vérifie si la valeur de la variable '''ButtonState''' est supérieure ou égale à '''1''', auquel cas la variable '''DoorState''' se voit elle aussi associée à '''1'''.&lt;br /&gt;
&lt;br /&gt;
===Les Noms de Variables===&lt;br /&gt;
====Sensibilité à la casse====&lt;br /&gt;
Le langage YOLOL est dit &amp;quot;insensible à la casse&amp;quot;, ce qui signifie que les noms des variables peuvent contenir des majuscules et des minuscules sans différencier les deux. Ainsi '''ButtonState''' et '''buttonstate''' désignent indistinctement la même variable. C'est une fonctionnalité très pratique pour rendre le code plus lisible.&lt;br /&gt;
&lt;br /&gt;
====Les variables internes et externes====&lt;br /&gt;
Il existe deux genre de variables: les '''variables internes''' qui ne peuvent être utilisées qu'au sein de la puce YOLOL où elles ont été initiées et les '''variables externes''' qui font appel aux [[device fields/fr|champs de périphérique]] des appareils branchés sur le même [[data networks/fr|réseau de données]] pour en demander ou modifier les valeurs.&amp;lt;br&amp;gt;&lt;br /&gt;
Pour les différencier, les variables externes sont précédées d'un double-point (''':''').&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 if :ButtonState &amp;gt;= 1 then :DoorState = 1 end&lt;br /&gt;
* Comme vu précédemment, ce script évalue la valeur de '''ButtonState''' et, si elle est supérieure ou égale à '''1''', associe '''DoorState''' à '''1'''. Les deux variables seront cependant ici appelées sur l'ensemble des équipements présents sur le réseau de données, par exemple pour ouvrir une porte si un bouton est appuyé.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Remarques====&lt;br /&gt;
* Les champs ayant le même nom au sein du réseau de données sont liées et ont presque toujours la même valeur. Ainsi, une variable externe qui en modifie la valeur le fera sur tout les appareils associés.&lt;br /&gt;
* Il n'est actuellement pas possible d'appeler une variable initiée sur un puce YOLOL depuis une autre puce YOLOL.&lt;br /&gt;
&lt;br /&gt;
===Les Valeurs de Variables===&lt;br /&gt;
====Typage====&lt;br /&gt;
Le langage YOLOL supporte deux types de valeurs pour les variables: Les '''valeurs numériques''' et les '''chaînes de caractères''' (ou &amp;quot;string&amp;quot;). Cette différence est importante car en fonction du type de variable, le résultat d'une même instruction sera différente.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 Addition = 3 + 5&lt;br /&gt;
* Cette instruction conduit à additionner les deux valeurs numériques '''3''' et '''5'''. Le résultat sera donc '''8'''.&lt;br /&gt;
 Addition = &amp;quot;3&amp;quot; + &amp;quot;5&amp;quot;&lt;br /&gt;
* Cette instruction conduit à associer les chaînes de caractères '''&amp;quot;3&amp;quot;''' et '''&amp;quot;5&amp;quot;'''. Le résultat sera donc '''&amp;quot;35&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
Les variables sont dites à &amp;quot;faible typage&amp;quot;, c'est-à-dire qu'elles ne sont pas restreintes à un seul type. Elles se convertissent systématiquement aux valeurs qui leur sont assignées. Ainsi, une variable associée à une valeur numérique peut la remplacer par une chaîne de caractères et inversement sans provoquer d'erreur dans le code.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 AutoPilot = 128.643&lt;br /&gt;
* cette première instruction associe la variable '''AutoPilot''' à la valeur numérique '''128.643'''.&lt;br /&gt;
 AutoPilot= &amp;quot;Erreur détectée&amp;quot;&lt;br /&gt;
* La variable '''AutoPilot''' se convertit en s'associant à la chaîne de caractères '''&amp;quot;Erreur détectée&amp;quot;''' et la valeur numérique '''128.643''' est effacée.&lt;br /&gt;
&lt;br /&gt;
====Les valeurs numériques====&lt;br /&gt;
Les valeurs numérique dans le langage YOLOL sont des décimales à point fixe. La précision est de un millième: Jusqu'à trois nombre sous la décimale sont acceptés. Fournir une valeur plus précise fonctionne, mais n'affecte pas le résultat final.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 Pi = 3,14159265&lt;br /&gt;
* Le script ci-dessus tente d'associer la variable '''Pi''' à la valeur numérique '''3,14159265'''. Le résultat final sera cependant '''Pi = 3.141''', coupant la précision à trois nombre sous la décimale.&lt;br /&gt;
&lt;br /&gt;
La taille maximale d'une valeur numérique est de 64-bit. De ce fait, la portée maximale (même après opération) est de [-9223372036854775.808, 9223372036854775.807]. Toutes valeurs supérieures ou inférieures seront ramenées aux limites de la portée.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 StarTrek = 9999999999999999.999&lt;br /&gt;
* Ici, on tente d'associer la variable '''StarTrek''' à la valeur numérique '''9999999999999999.999'''. Celle-ci est cependant supérieure à la portée maximale et le résultat final sera '''StarTrek = 9223372036854775.807'''.&lt;br /&gt;
&lt;br /&gt;
====Les chaînes de caractères====&lt;br /&gt;
Pour signaler une chaîne de caractères au langage YOLOL, celle-ci doit être entourée de double-guillemets ('''&amp;quot; &amp;quot;''').&lt;br /&gt;
&lt;br /&gt;
 BadRobots= &amp;quot;Saltberia&amp;quot; &lt;br /&gt;
* Ce script associe la variable '''BadRobot''' à la chaîne de caractères '''&amp;quot;Saltberia&amp;quot;'''.&lt;br /&gt;
Comme pour les valeurs numériques, la taille maximale d'une chaîne de caractères est de 64-bit.&lt;br /&gt;
&lt;br /&gt;
====Remarques====&lt;br /&gt;
* Chaque variable ne peut être que d'un type à la fois, bien que celui-ci puisse être converti au besoin.&lt;br /&gt;
* Les valeurs &amp;quot;False&amp;quot; et &amp;quot;True&amp;quot; sont de type numérique: Elles correspondent respectivement à &amp;quot;0&amp;quot; et &amp;quot;non-0&amp;quot;.&lt;br /&gt;
* Une variable non définie préalablement a par défaut la valeur numérique &amp;quot;0&amp;quot;. L'absence de valeur (&amp;quot;null&amp;quot;) n'est pas reconnue.&lt;br /&gt;
&lt;br /&gt;
==Les Opérations==&lt;br /&gt;
A noter que si les opérations les plus basiques peuvent être utilisées par n'importe quelle [[YOLOL Chip/fr|puce YOLOL]], certaines plus complexes en nécessite des plus avancées, voire de qualité professionelle.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Les opérateurs arythmétiques ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Opération || Valeurs numériques || Chaînes de caractères || Puce nécessaire&lt;br /&gt;
|-&lt;br /&gt;
| A + B || Addition || &amp;quot;B&amp;quot; est ajouté à la suite de &amp;quot;A&amp;quot; || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A - B || Soustraction || La dernière occurence de &amp;quot;B&amp;quot; dans &amp;quot;A&amp;quot; est supprimée || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A * B || Multiplication || Erreur d'exécution. Le reste de la ligne est passé || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A / B || Division || Erreur d'exécution. Le reste de la ligne est passé || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A ^ B || Exponentielle || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| A % B || Modulo || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| ABS A || Absolue || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| A! || Factorielle || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| SQRT A || Racine carrée || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| SIN A || Sinus (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|-&lt;br /&gt;
| COS A || Cosinus (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|-&lt;br /&gt;
| TAN A || Tangente (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|-&lt;br /&gt;
| ASIN A || Sinus inversé (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|-&lt;br /&gt;
| ACOS A || Cosinus inversé (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|-&lt;br /&gt;
| ATAN A || Tangente inversée (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Les opérateurs d'assignation===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation || Valeurs numériques || Chaînes de caractères || Puce nécessaire&lt;br /&gt;
|-&lt;br /&gt;
| A = B || Assignation || Assignation || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A += B || Addition-assignation (A=A+B) || Addition-assignation (A=A+B) || Basique&lt;br /&gt;
|-&lt;br /&gt;
| ++ A  || Pré-incrémentation (A=A+1) || Ajoute un espace à la suite de &amp;quot;A&amp;quot;. Evalué sur la valeur modifiée || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A ++ || Post-incrémentation (A=A+1) || Ajoute un espace à la suite de &amp;quot;A&amp;quot;. Evalué sur la valeur d'origine || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A -= B || Soustraction-assignation (A=A-B) || Soustraction-assignation (A=A-B) || Basique&lt;br /&gt;
|-&lt;br /&gt;
| -- A || Pré-décrémentation (A=A-1) || Retire le dernier caractère de la chaîne. Erreur d'éxecution si la chaîne est vide. Evalué sur la valeur modifiée || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A -- || Post-décrémentation (A=A-1) || Retire le dernier caractère de la chaîne. Erreur d'éxecution si la chaîne est vide. Evalué sur la valeur d'origine || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A *= B || Multiplication-assignation (A=A*B) || Erreur d'exécution. Le reste de la ligne est passé || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A /= B || Division-assignation (A=A/B) || Erreur d'exécution. Le reste de la ligne est passé || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A ^= B || Exponentielle-assignation (A=A^B) || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| A %= B || Modulo-assignation (A=A%B) || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Les opérateurs logiques ===&lt;br /&gt;
&lt;br /&gt;
Logical operators are checks that identify if the statement is true or false.&amp;lt;br&amp;gt;&lt;br /&gt;
All logical operations return either '''&amp;quot;0 for False&amp;quot;''' or '''&amp;quot;1 for True&amp;quot;'''. &lt;br /&gt;
The '''NOT''', '''AND''', and '''OR''' keywords consider 0 to be falsy and anything not 0 to be truthy.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation || Numeric operation || String operation || Chip availability&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;lt; B || A est plus petit que B || &amp;quot;A&amp;quot; est avant &amp;quot;B&amp;quot; dans l'ordre alphabétique || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;gt; B || A est plus grand que B || &amp;quot;A&amp;quot; est après &amp;quot;B&amp;quot; dans l'ordre alphabétique || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A == B || A est égal à B || &amp;quot;A&amp;quot; est égale à &amp;quot;B&amp;quot; || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;lt;= B || &amp;lt; ou == || &amp;lt; ou == || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;gt;= B || &amp;gt; ou == || &amp;gt; ou == || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A != B || A n'est pas égal à B || &amp;quot;A&amp;quot; n'est pas égale à &amp;quot;B&amp;quot; || Basique&lt;br /&gt;
|-&lt;br /&gt;
| NOT A || A est égal à 0 || &amp;quot;A&amp;quot; est 0 || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A AND B || A et B ne sont pas égaux à 0  || &amp;quot;A&amp;quot; et &amp;quot;B&amp;quot; ne sont pas 0 || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A OR B || A ou B n'est pas égal à 0 || &amp;quot;A&amp;quot; ou &amp;quot;B&amp;quot; n'est pas 0 || Basique&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Opérations sur des variables mixtes ===&lt;br /&gt;
&lt;br /&gt;
Mixing variable types in an operation handles the operation using all parameters as ''strings''.&lt;br /&gt;
&lt;br /&gt;
 previouslyNumber= &amp;quot;10&amp;quot; + 15&lt;br /&gt;
* The above script results in '''previouslyNumber''' containing the string value &amp;quot;1015&amp;quot;.&lt;br /&gt;
** Note that the involved parameters themselves don't change types, their values are just cast as strings for the purpose of the operation:&lt;br /&gt;
 &lt;br /&gt;
 purelyNumber = 15&lt;br /&gt;
 purelyString = &amp;quot;10&amp;quot; + purelyNumber&lt;br /&gt;
* When this script has executed, '''purelyString''' contains the string value of &amp;quot;1015&amp;quot;, while '''purelyNumber''' still contains the numeric value of 15.&lt;br /&gt;
&lt;br /&gt;
=== Ordre des opérations ===&lt;br /&gt;
Lorsqu'une instruction comprend plusieurs opérations, celle-ci sont réalisées en suivant l'ordre de précédence suivant, de haut en bas, de gauche à droite:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operateurs&lt;br /&gt;
|-&lt;br /&gt;
| ++, --&lt;br /&gt;
|-&lt;br /&gt;
| !&lt;br /&gt;
|-&lt;br /&gt;
| sqrt, %, abs, sin, cos, tan&lt;br /&gt;
|-&lt;br /&gt;
| - (valeur négative)&lt;br /&gt;
|-&lt;br /&gt;
| ^&lt;br /&gt;
|-&lt;br /&gt;
| *, /&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;, &amp;gt;, ==, !=, &amp;lt;=, &amp;gt;=&lt;br /&gt;
|-&lt;br /&gt;
| +, -&lt;br /&gt;
|-&lt;br /&gt;
| Not&lt;br /&gt;
|-&lt;br /&gt;
| Or&lt;br /&gt;
|-&lt;br /&gt;
| And&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Les Commandes==&lt;br /&gt;
&lt;br /&gt;
=== If-else conditional ===&lt;br /&gt;
&lt;br /&gt;
If-else statements are used to branch out the script into different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
They use the following syntax:&lt;br /&gt;
* '''if ''condition'' then ''statement'' else ''statement'' end'''&lt;br /&gt;
** Condition is a statement that results in a numeric value (where 0 is parsed as False, anything else as True), and statements are pieces of script that are run.&lt;br /&gt;
** All If-else conditional stations must have '''end''' syntax written after statement is complete.&lt;br /&gt;
** The statement has to be on one line. The if, then, else and end cannot be on different lines.&lt;br /&gt;
&lt;br /&gt;
If can be used to branch script execution into two possible outcomes temporarily based on variable value(s).&amp;lt;br&amp;gt;&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable != 2 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 3 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; endResult = 4 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* This script sets the value of '''endResult''' to 3 if '''variable''' does not have the value of 2.&lt;br /&gt;
* If '''variable''''s value is 2, '''endResult''' is set to the value of 4.&lt;br /&gt;
&lt;br /&gt;
Note that the else statement -part can be left out if not needed. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable != 2 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 3 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
*This script only sets the value of 3 to '''endResult''' if '''variable''' does not have a value of 2, and doesn't do anything else.&lt;br /&gt;
&lt;br /&gt;
==== Nesting if statements ====&lt;br /&gt;
&lt;br /&gt;
It is possible to place if-conditionals inside the true/false statement blocks to achieve further branching of execution.&amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 0 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 1 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 1 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 2 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &lt;br /&gt;
* This script sets '''endResult''' to 1 if '''variable''' equals 0.&lt;br /&gt;
* If '''variable''' doesn't equal 0, but it equals 1, '''endResult''' is set to 2.&lt;br /&gt;
&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 0 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; endResult == 1 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 2 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; endResult = 1 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
* This script sets '''endResult''' to 2 if '''variable''' has a value of 0, and '''endResult''' equals to 1.&lt;br /&gt;
* Otherwise it sets '''endResult''' to 1.&lt;br /&gt;
&lt;br /&gt;
=== Goto ===&lt;br /&gt;
&lt;br /&gt;
Goto syntax is used when the normal script reading order from 1-&amp;gt;20 is not desired, or needs to be altered.&lt;br /&gt;
&lt;br /&gt;
Goto is used with the following syntax:&lt;br /&gt;
*'''goto lineNumber'''&lt;br /&gt;
** lineNumber is the line which this command will take the script execution.&amp;lt;br&amp;gt;&lt;br /&gt;
** Any remaining script that is on the same line after the goto-command will not be executed.&lt;br /&gt;
*** using if statements before goto ignores goto syntax, assuming the if-statement is false&lt;br /&gt;
** Multiple goto commands can be added on the same line using conditionals, as '''False''' goto commands are skipped.&lt;br /&gt;
** Numeric values outside the [1,20] range are clamped to this range.&lt;br /&gt;
** Non-integer values are floored.&lt;br /&gt;
** String values will result in a Runtime Error.&lt;br /&gt;
&lt;br /&gt;
 if variable == 5 then '''goto 4''' end '''goto 6'''&lt;br /&gt;
&lt;br /&gt;
The script above will go to line number 4, if '''variable''' has a value of 5.&amp;lt;br&amp;gt;&lt;br /&gt;
Otherwise it will go to line number 6. Numerical operations can also be done &amp;quot;inside&amp;quot; the goto, e.g. &lt;br /&gt;
&lt;br /&gt;
  goto 4+1&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
Comments are useful when writing code that is used by a lot of programmers.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that comments also use up space from the pre-determined 70 character line limit and are not excluded from it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commenting is used with the following syntax:&lt;br /&gt;
*// '''text'''&lt;br /&gt;
** Text can be any single-line set of characters.&lt;br /&gt;
&lt;br /&gt;
 '''//''' This is a comment. It will explain how other lines of script work.&lt;br /&gt;
* An example of a possible comment syntax&lt;br /&gt;
&lt;br /&gt;
== Les erreurs ==&lt;br /&gt;
&lt;br /&gt;
Il y a deux types d'erreurs qui peuvent survenir pendant l'éxecution d'une séquence YOLOL:&lt;br /&gt;
# '''Les erreurs de syntaxe (&amp;quot;syntax errors&amp;quot;)''': elles résultent d'un script invalide et empêchent l'interprétation de la ligne toute entière, qui est donc ignorée pour passer directement à la suivante.&lt;br /&gt;
# '''Les erreurs d'exécution (&amp;quot;runtime errors&amp;quot;)''': elles ne sont détectées que pendant l'éxecution du script et provoquent l'arrêt de l'interprétation de la ligne en cours pour passer à la suivante. Elles n'impactent donc pas les instructions antérieures.&lt;br /&gt;
&lt;br /&gt;
== Bugs connus/Comportements indésirables==&lt;br /&gt;
Voici une liste des problèmes relevés avec l'utilisation du langage YOLOL:&amp;lt;br&amp;gt;&lt;br /&gt;
* Les noms de variables contenant les mots-clé &amp;quot;if&amp;quot;, &amp;quot;else&amp;quot; et &amp;quot;end&amp;quot; sont mal interprétés par le langage et provoquent une erreur de syntaxe. Les noms tels que '''life''' ou '''endurance''' sont donc à éviter.&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
==YOLOL Tips &amp;amp; Tricks==&lt;br /&gt;
* [[Common YOLOL|Common YOLOL scripts]]&lt;br /&gt;
* [[YOLOL Tricks]]&lt;br /&gt;
&lt;br /&gt;
== Pages associées ==&lt;br /&gt;
* [[Data networks/fr|Réseaux de données]]&lt;br /&gt;
* [[Devices and machines/fr|Appareils et machines]]&lt;br /&gt;
* [[Device fields/fr|Champs de périphérique ]]&lt;br /&gt;
* [[Universal tool/fr|Outil universel]]&lt;br /&gt;
* [[YOLOL Chip/fr|Puce YOLOL]]&lt;br /&gt;
* [[Chip socket/fr|Socle à puce]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Networks|YOLOL/fr]]&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=Page_d%E2%80%99accueil&amp;diff=30522</id>
		<title>Page d’accueil</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=Page_d%E2%80%99accueil&amp;diff=30522"/>
		<updated>2022-04-09T12:23:15Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: Reformulation de &amp;quot;langage YOLOL&amp;quot; pour éviter la confusion&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- For normal pages, use Otherlang2 instead of OtherlangMP --&amp;gt;&lt;br /&gt;
{{OtherlangMP&lt;br /&gt;
|en=Main_Page&lt;br /&gt;
|de=Main_Page:de&lt;br /&gt;
|ru=Главная_страница&lt;br /&gt;
|zh-cn=主页&lt;br /&gt;
|pl=Main_Page:pl&lt;br /&gt;
|nl=Main_Page:nl&lt;br /&gt;
}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{#css:&lt;br /&gt;
  span.approvedAndLatestMsg {&lt;br /&gt;
    display: none;&lt;br /&gt;
  }&lt;br /&gt;
  span.approvingUser {&lt;br /&gt;
    display: none;&lt;br /&gt;
  }&lt;br /&gt;
  h1 {&lt;br /&gt;
    display: none;&lt;br /&gt;
  }&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;div class=&amp;quot;mpRow&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;mpLeftPadding&amp;quot;&amp;gt; &amp;lt;!-- LEFT COLUMN STARTS HERE --&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitableNoGrid&amp;quot; style=&amp;quot;border: 0px !important; margin: -10px; width: calc(100% + 20px);&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|&amp;lt;span class=&amp;quot;tableheader&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-size:110%&amp;quot;&amp;gt;&amp;lt;font color=&amp;quot;White&amp;quot;&amp;gt;À propos de Starbase&amp;lt;/font&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
[[File:AboutStarbaseRobot.png|150px|right]] &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Dans l'univers de Starbase tout le monde contrôle un [[Endoskeleton/fr|endosquelette]] robotique, un corps assez durable étant idéal pour l'exploration spatiale et la colonisation. La société, formée de ces robotiques endosquelettes est actuellement concentrée sur de gigantesques [[Capital_Mega_Station/fr|Super Stations]] et de plus petites Mini Stations, les &amp;quot;banlieues&amp;quot; dans l'espace. Les stations fournissent sécurité, [[jobs/fr|travail]], point de rencontre et possibilités d'échange pour leurs habitants, faisant d'elles des bases idéales où commencer la colonisation de la galaxie.&lt;br /&gt;
&lt;br /&gt;
Dans la galaxie, les deux principales factions sont deux factions rivales, le [[Kingdom/fr|Royaume]] et l'[[Empire/fr|Empire]], l'Empire ayant le contrôle de la majorité des stations centrales. Les autres factions peuvent tout de même espérer ce placer à coté de ces deux géants un jour, avec l'évolution et la progression la société.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
La [[News Broadcasts/fr|vie]] dans l'[[Space/fr|espace]] étant actuellement centrée sur l'orbite céleste d'une planète gazeuse, les courageux aventuriers devront constamment explorer les limites du voyage spatial et d'autres technologies afin de pouvoir, un jour atteindre les coins les plus reculés de la galaxie.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitableNoGrid&amp;quot; style=&amp;quot;border: 0px !important; margin: -10px; width: calc(100% + 20px);&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|&amp;lt;span class=&amp;quot;tableheader&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-size:110%&amp;quot;&amp;gt;&amp;lt;font color=&amp;quot;White&amp;quot;&amp;gt;Menu&amp;lt;/font&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Main_Page/fr|Menu principal]]&lt;br /&gt;
&lt;br /&gt;
[[Special:AllPages|Toutes les pages]]&lt;br /&gt;
&lt;br /&gt;
[[Special:RecentChanges|Changement récent]]&lt;br /&gt;
&lt;br /&gt;
[[Special:SpecialPages|Page spécial]]&lt;br /&gt;
&lt;br /&gt;
[[News Broadcasts/fr|Diffusions de nouvelles]]&lt;br /&gt;
&lt;br /&gt;
[[Special:Random|Page aléatoire]]&lt;br /&gt;
&lt;br /&gt;
[[Rules/fr|Règlement]]&lt;br /&gt;
&lt;br /&gt;
[[Jobs/fr|Carrière]]&lt;br /&gt;
&lt;br /&gt;
[[Endoskeleton CV/fr|Curriculum vitæ]]&lt;br /&gt;
&lt;br /&gt;
[[Emotes/fr|Emotes]]&lt;br /&gt;
&lt;br /&gt;
[[Endoskeleton/fr|Endosquelette]]&lt;br /&gt;
&lt;br /&gt;
[[Insurance/fr|Assurance]]&lt;br /&gt;
&lt;br /&gt;
[[Data networks/fr|Réseaux de données]]&lt;br /&gt;
&lt;br /&gt;
[[Pipe networks/fr|Réseaux de canalisation]]&lt;br /&gt;
&lt;br /&gt;
[[Resource networks/fr|Réseau de ressources]]&lt;br /&gt;
&lt;br /&gt;
[[YOLOL/fr|Programmation YOLOL]]&lt;br /&gt;
&lt;br /&gt;
[[FAQ/fr|Foire au questions]]&lt;br /&gt;
&lt;br /&gt;
[[Spaceship assembly guide/fr|Guide d'assemblage du vaisseau spatial]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;mpMiddle&amp;quot;&amp;gt; &amp;lt;!-- MIDDLE COLUMN STARTS HERE --&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitableTransparent&amp;quot; style=&amp;quot;margin-right: auto; margin-left: auto; border: none; margin-top: -3px;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Armes&amp;lt;/span&amp;gt;[[File:Combat_simulations_notext.png|175px|link=Weapons/fr|center]]&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Équipements&amp;lt;/span&amp;gt;[[File:Devices_notext.png|175px|link=Devices_and_machines/fr|center]]&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Matériaux&amp;lt;/span&amp;gt;[[File:Materials_notext.png|175px|link=Materials/fr|center]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Vaisseaux&amp;lt;/span&amp;gt;[[File:Spaceships_notext.png|175px|link=Spaceships/fr|center]]&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Stations&amp;lt;/span&amp;gt;[[File:Stations_Table_Test_notext.png|175px|link=Stations/fr|center]]&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Outils&amp;lt;/span&amp;gt;[[File:Tools_notext.png|175px|link=Tools/fr|center]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Univers&amp;lt;/span&amp;gt;[[File:Space_category.png|175px|link=Space/fr|center]]&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Politiques&amp;lt;/span&amp;gt;[[File:Factions_notext.png|175px|link=Factions/fr|center]]&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Construction&amp;lt;/span&amp;gt;[[File:Sb_building_feature_block.png|175px|link=Building/fr|center]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{#evt:&lt;br /&gt;
service=youtube&lt;br /&gt;
|id=https://www.youtube.com/watch?v=zXLTFwoYM_s&lt;br /&gt;
|dimensions= 530&lt;br /&gt;
|alignment=center&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitableTransparent&amp;quot; style=&amp;quot;margin-right: auto; margin-left: auto; border: none&lt;br /&gt;
!colspan=&amp;quot;6&amp;quot;|&amp;lt;span class=&amp;quot;tableheader&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-size:110%&amp;quot;&amp;gt;&amp;lt;font color=&amp;quot;White&amp;quot;&amp;gt;Galerie de Fonctionnalités&amp;lt;/font&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;|[[File:Starbase_marketing_screenshot_derelict_1080p.png|214px]]&lt;br /&gt;
|[[File:Screnshot_several_spaceships.png |96px]]&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;|[[File:Screenshot_Bolt_tool.png|214px]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| [[File:Screenshot_megastation_1080p.png|96px]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;mpRight&amp;quot;&amp;gt; &amp;lt;!-- RIGHT COLUMN STARTS HERE --&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitableNoGrid&amp;quot; style=&amp;quot;margin: auto; border: none&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|&amp;lt;span class=&amp;quot;tableheader&amp;quot;&amp;gt;[[Weapons/fr|Armes]]&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| [[File:Assault rifle thumb.png|120px|link=Assault_rifle/fr|thumb|center|Fusil d’assaut]]&lt;br /&gt;
| [[File:Antigel thumb.png|120px|link=Antigel_rifle/fr|thumb|center|Fusil antigel]]&lt;br /&gt;
| [[File:Battle rifle thumb.png|120px|link=Battle_rifle/fr|thumb|center|Fusil de combat]]&lt;br /&gt;
| [[File:Bolter thumb.png|120px|link=Bolter/fr|thumb|center|Fusil à arc électrique]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| [[File:Flamer thumb.png|120px|link=Flamethrower/fr|thumb|center|Lance-flamme]]&lt;br /&gt;
| [[File:Gauss rifle thumb.png|120px|link=Gauss_rifle/fr|thumb|center|Fusil magnétique]]&lt;br /&gt;
| [[File:Laser rifle thumb.png|120px|link=Laser_rifle/fr|thumb|center|Fusil laser]]&lt;br /&gt;
| [[File:Long rifle thumb.png|120px|link=Long_rifle/fr|thumb|center|Fusil à longue portée]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| [[File:Pistol thumb.png|120px|link=Pistol/fr|thumb|center|Pistolet]]&lt;br /&gt;
| [[File:Repeater thumb.png|120px|link=Repeater_pistol/fr|thumb|center|Pistolet-mitrailleur]]&lt;br /&gt;
| [[File:Revolver thumb.png|120px|link=Revolver/fr|thumb|center|Revolver]]&lt;br /&gt;
| [[File:Shotgun thumb.png|120px|link=Shotgun/fr|thumb|center|Fusil à pompe]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitableNoGrid&amp;quot; style=&amp;quot;margin: auto; border: none;&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|&amp;lt;span class=&amp;quot;tableheader&amp;quot;&amp;gt;[[Mounted weapons/fr|Armes Montées]]&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| [[File:Autocannon.png|120px|link=Autocannon/fr|thumb|center|Auto-canon]]&lt;br /&gt;
| [[File:Laser weapon.png|120px|link=Laser cannon/fr|thumb|center|Canon laser]]&lt;br /&gt;
| [[File:Plasma cannon.png|120px|link=Plasma thrower/fr|thumb|center|Lance-plasma]]&lt;br /&gt;
| [[File:Rail weapon.png|120px|link=Rail cannon/fr|thumb|center|Canon à rail]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitableNoGrid&amp;quot; style=&amp;quot;margin: auto;&amp;quot; border: none&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|&amp;lt;span class=&amp;quot;tableheader&amp;quot;&amp;gt;[[Spaceships/fr|Vaisseaux]]&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| [[File:Spaceship hedron decal.jpg|120px|link=Hedron/fr|thumb|center|Hedron]]&lt;br /&gt;
| [[File:Spaceship Ithaca.jpg|120px|link=Ithaca/fr|thumb|center|Ithaca]]&lt;br /&gt;
| [[File:Spaceship remus.jpg|120px|link=Remus/fr|thumb|center|Remus]]&lt;br /&gt;
| [[File:Spaceship urchin decal.jpg|120px|link=Urchin/fr|thumb|center|Urchin]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| [[File:Spaceship Empire Lictor.JPG|120px|link=Lictor/fr|thumb|center|Lictor]]&lt;br /&gt;
| [[File:Empire_spatha.jpg|120px|link=Spatha/fr|thumb|center|Spatha]]&lt;br /&gt;
| [[File:Kingdom_knight.jpg|120px|link=Knight/fr|thumb|center|Knight]]&lt;br /&gt;
| [[File:Kingdom_lancer.jpg|120px|link=Lancer/fr|thumb|center|Lancer]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=Common_YOLOL&amp;diff=30521</id>
		<title>Common YOLOL</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=Common_YOLOL&amp;diff=30521"/>
		<updated>2022-04-08T18:12:54Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: /* Single Forward/Backward Lever */  Add a reminder to modify control binds&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A collection of small common scripts meant to be easily copied and understood for the [[YOLOL|YOLOL]] beginners.&lt;br /&gt;
&lt;br /&gt;
''This page is a &amp;quot;Work In Progress&amp;quot;. Don't hesitate to contribute! Just make sure to respect the following rules:&lt;br /&gt;
* Avoid complex codes. As said, These must be easily understood by beginners. If you can't simplify your scripts, please add some comments to explain the most technical parts.&lt;br /&gt;
* Avoid as possible to modify the [[Device fields|device fields]]. If necessary, it must be specified which field has to be renamed (left column) and/or set to a given value (right column). ''&lt;br /&gt;
&lt;br /&gt;
==[[Flight control unit|Flight Control Unit]]==&lt;br /&gt;
&lt;br /&gt;
===Single Forward/Backward Lever===&lt;br /&gt;
Requires a center lever bound to '''&amp;quot;FcuForward&amp;quot;'''. ''Note: You can easily modify the default regular lever from most prebuilt ships and cockpit modules to be used as a center Lever. Just change the '''&amp;quot;LeverMinOutput&amp;quot;''' value from 0 to -100. Also don't forget to modify your control binds (&amp;quot;V&amp;quot; on keyboard by default).''&lt;br /&gt;
&lt;br /&gt;
 :FcuBackward=-:FcuForward goto1&lt;br /&gt;
&lt;br /&gt;
===Speed Limiter===&lt;br /&gt;
Requires to modify the lever bound to '''&amp;quot;FcuForward&amp;quot;''' which shall be renamed '''&amp;quot;Fwd&amp;quot;''' and another regular lever with '''&amp;quot;LeverState&amp;quot;''' renamed '''&amp;quot;Limiter&amp;quot;'''. This script allow you to set a maximum forward speed to your ship, which is useful when you need more accurate movements (e.g. while mining or docking).&lt;br /&gt;
&lt;br /&gt;
 :FcuForward=:Fwd/100*:Limiter goto1&lt;br /&gt;
&lt;br /&gt;
''Note: If you already modified your '''&amp;quot;FcuFoward&amp;quot;''' lever to be used as a '''&amp;quot;Single Forward/Backward Lever&amp;quot;''' (see above), you can use the '''&amp;quot;Backward&amp;quot;''' lever made useless as the '''&amp;quot;Limiter&amp;quot;''' lever. Just make sure you have '''&amp;quot;FcuForward&amp;quot;''' renamed '''&amp;quot;FwdBwd&amp;quot;''' instead so you can modify forward and backward thrust individually. This way your YOLOL scripts should be written as follows:''&lt;br /&gt;
&lt;br /&gt;
 :FcuForward=:FwdBwd/100*:Limiter goto1&lt;br /&gt;
&lt;br /&gt;
 :FcuBackward=-:FwdBwd goto1&lt;br /&gt;
&lt;br /&gt;
===Turtle Mode===&lt;br /&gt;
Similar to the previous script but with a button instead of a lever. '''&amp;quot;ButtonState&amp;quot;''' should be renamed '''&amp;quot;Turtle&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''. In addition set the '''&amp;quot;ButtonOffStateValue&amp;quot;''' to '''&amp;quot;100&amp;quot;''' and the '''&amp;quot;ButtonOnStateValue&amp;quot;''' to the desired speed reduction. For example having '''&amp;quot;30&amp;quot;''' means 30% of maximum speed when the button is active.&lt;br /&gt;
&lt;br /&gt;
 :FcuForward=:Fwd/100*:Turtle goto1&lt;br /&gt;
&lt;br /&gt;
==[[Fuel chamber|Fuel Chamber]]==&lt;br /&gt;
&lt;br /&gt;
The following scripts are made to be used with the ship &amp;quot;[[Laborer module|Laborer Module]]&amp;quot; rewarded during the tutorials. To make it compatible with other prebuilt or own-made ships, refer to the table below for the corresponding modifications in the [[Device fields|device fields]]. ''Note: Most scripts make the &amp;quot;Generator&amp;quot; button irrelevant as it replace its use. Some may make another use of it.''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Ship Part !! Default Field Name !! Laborer Module Field Name&lt;br /&gt;
|-&lt;br /&gt;
| Hybrid Button || ButtonState || Generator&lt;br /&gt;
|-&lt;br /&gt;
| Fuel Chamber || FuelChamberUnitRateLimit || Generator&lt;br /&gt;
|-&lt;br /&gt;
| First Battery || StoredBatteryPower || Battery_1&lt;br /&gt;
|-&lt;br /&gt;
| Second Battery || StoredBatteryPower || Battery_2 &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Also, ships will require enough batteries to act as buffers during the generator spool up time. ''Note: When in use, all batteries discharge at the same rate. The more batteries you have, the slower the discharge is.''&lt;br /&gt;
&lt;br /&gt;
===Gradual Generator Script===&lt;br /&gt;
Makes the fuel rate limit of the fuel chamber inversely proportional to the charge level of the batteries.&lt;br /&gt;
&lt;br /&gt;
 :Generator=100-:Battery_1/100 goto1&lt;br /&gt;
&lt;br /&gt;
Alternatively, the script below will keep the batteries fuller by setting the fuel rate limit to its maximum when batteries are below 90% of charge.&lt;br /&gt;
&lt;br /&gt;
 :Generator=1000-:Battery_1/10 goto1&lt;br /&gt;
&lt;br /&gt;
Additionally, you can use the &amp;quot;Generator&amp;quot; button by renaming it &amp;quot;Eco&amp;quot; so it switch fuel saving on and off with the following script. Useful for more power consuming activities like mining.&lt;br /&gt;
&lt;br /&gt;
 :Generator=100-:Eco*:Battery_1/100 goto1&lt;br /&gt;
&lt;br /&gt;
===Flagged Generator Script===&lt;br /&gt;
This script set the fuel rate limit to 25% (just enough to supply 2 box thrusters with a bit of spare charge) if the level of the batteries is below 9999 and adding 50% if below 5000. 0.001% is enough fuel rate to let the generator &amp;quot;sleep&amp;quot; when the ship stand still and the batteries are full.&lt;br /&gt;
&lt;br /&gt;
 :Generator=25*(:Battery_1&amp;lt;9999)+50*(:Battery_1&amp;lt;5000)+0.001 goto1&lt;br /&gt;
&lt;br /&gt;
===Advanced Generator Script===&lt;br /&gt;
This script is tweakable to your ship configuration. Field names are those of the Laborer Module, except for the '''&amp;quot;Generator&amp;quot;''' button which should be renamed '''&amp;quot;PWR&amp;quot;''' so the script can control the fuel rate while the button still being functional. Optionally you can add an override lever with '''&amp;quot;LeverState&amp;quot;''' renamed '''&amp;quot;PWR&amp;quot;''' as well.&lt;br /&gt;
&lt;br /&gt;
 MaxBattery=20000           // total capacity&lt;br /&gt;
 LowBattery=0.99*MaxBattery // start charging below 99%&lt;br /&gt;
 MinBattery=0.20*MaxBattery // max charge rate below 20%&lt;br /&gt;
 MaxGenerator=100           // max fuel rate&lt;br /&gt;
 MinGenerator=2             // min fuel rate (near 100% charge)&lt;br /&gt;
 h=MaxGenerator c=MinGenerator          // auxiliary variables,&lt;br /&gt;
 f=MaxBattery l=LowBattery e=MinBattery // no need to change these&lt;br /&gt;
 r=(h-c)/(f-e) z=h-r*l a=r*(f-l)      // reboot: remove &amp;quot;goto9&amp;quot; briefly&lt;br /&gt;
 y=:PWR-z-r*(:Battery_1+:Battery_2)+c*(y&amp;gt;c)+a*(y&amp;gt;0) :Generator=y goto9&lt;br /&gt;
&lt;br /&gt;
It is assumed that the following device fields are set as explained (''Note: The &amp;quot;PWR&amp;quot; button is already set up in the Laborer Module''):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Ship Part !! Field Name !! Set Field value&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Button || ButtonOnStateValue|| 100&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Button || ButtonOffStateValue|| 0 &lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Button || ButtonStyle || 1&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Lever (optional) || LeverMinOutput || 0 &lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Lever (optional) || LeverMaxOutput || 200 &lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Lever (optional) || LeverCenteringSpeed || 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==[[Material point scanner|Material Point Scanner]]==&lt;br /&gt;
&lt;br /&gt;
===Material Point Scanner Script===&lt;br /&gt;
Requires two displays for '''&amp;quot;Material&amp;quot;''' and '''&amp;quot;Volume&amp;quot;''', two buttons to toggle the '''&amp;quot;Active&amp;quot;''' and '''&amp;quot;Scan&amp;quot;''' fields of the scanner, and a third button with '''&amp;quot;ButtonState&amp;quot;''' renamed '''&amp;quot;Next&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
 :Index=(:Index+:Next)*(:Index&amp;lt;:ScanResults) :Next=0&lt;br /&gt;
 :Material=:Material :Volume=:Volume goto1&lt;br /&gt;
&lt;br /&gt;
===Automatic Material Point Scanner Script===&lt;br /&gt;
This is a modified version of the above script so it can be used when the scanner is '''&amp;quot;Active&amp;quot;''' without the need of any additional buttons.&lt;br /&gt;
''Note: launching a new scan reinitialize the index to '''&amp;quot;0&amp;quot;'''.''&lt;br /&gt;
&lt;br /&gt;
 :Scan=1&lt;br /&gt;
 //Pause&lt;br /&gt;
 :Index=Next&lt;br /&gt;
 Next=(Next+1)*(Next&amp;lt;:ScanResults)&lt;br /&gt;
 :Material=:Material :Volume=:Volume goto1&lt;br /&gt;
&lt;br /&gt;
==[[Mining laser|Mining Laser]]==&lt;br /&gt;
&lt;br /&gt;
===Pulsed Mining Laser===&lt;br /&gt;
Requires a button with '''&amp;quot;ButtonState&amp;quot;''' renamed '''&amp;quot;Mining&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''. Reduces power consumption by continuously switching mining laser &amp;quot;On&amp;quot; and &amp;quot;Off&amp;quot; while the button is active.&lt;br /&gt;
&lt;br /&gt;
 :MiningLaserOn=(1-:MiningLaserOn)*:Mining goto1&lt;br /&gt;
&lt;br /&gt;
===Configurable Pulsed Mining Laser===&lt;br /&gt;
Similar to the previous script but with configurable timers for the &amp;quot;On&amp;quot; and &amp;quot;Off&amp;quot; phases of the laser.&lt;br /&gt;
''Note: Each phase is calculated in a number of YOLOL &amp;quot;tick&amp;quot; (0.2sec). So in the example, the &amp;quot;On&amp;quot; phase last 2*0.2=0.4sec and the &amp;quot;Off&amp;quot; phase 3*0.2=0.6 sec, which makes the power comsumption just a bit lower than the power production of a regular generator module (= one fuel chamber and three generator units, all in tier 1).''&lt;br /&gt;
&lt;br /&gt;
 On=2 Off=3 :MiningLaserOn=(T&amp;lt;On)*:Mining T++ T*=T&amp;lt;(On+Off) goto1&lt;br /&gt;
&lt;br /&gt;
==[[Navigation receivers|Navigation Receiver]]==&lt;br /&gt;
&lt;br /&gt;
===Received Signal Display===&lt;br /&gt;
Requires a text panel with '''&amp;quot;PanelValue&amp;quot;''' renamed '''&amp;quot;Nav&amp;quot;'''. &lt;br /&gt;
&lt;br /&gt;
 if :SignalStrength&amp;gt;0 then goto2 else :Nav=&amp;quot;No Signal&amp;quot; goto1 end&lt;br /&gt;
 :Nav=:Message+&amp;quot;\n&amp;quot;+(1000000-:SignalStrength)/1000+&amp;quot;km&amp;quot; goto1&lt;br /&gt;
&lt;br /&gt;
==[[Ore collector|Ore Collector]]==&lt;br /&gt;
&lt;br /&gt;
===Mining Laser/ Ore Collector Swapping Power===&lt;br /&gt;
Requires a button with '''&amp;quot;ButtonState&amp;quot;''' renamed '''&amp;quot;Collecting&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''. Reduces power consumption by switching ore collector &amp;quot;On&amp;quot; only if the button is active And the mining laser is &amp;quot;Off&amp;quot;. ''Note: this script works best alongside the &amp;quot;Pulsed Mining Laser&amp;quot; scripts.''&lt;br /&gt;
&lt;br /&gt;
 :ToggleOn=(1-:MiningLaserOn)*:Collecting goto1&lt;br /&gt;
&lt;br /&gt;
==[[Ship transponder|Ship Transponder]]==&lt;br /&gt;
&lt;br /&gt;
===Outside Safezone Warning===&lt;br /&gt;
Requires an active transponder and either a warning button or a safety lid button. The button blink whenever you're outside of the safe zone. ''Note: the button needs to be active in order to blink.''&lt;br /&gt;
&lt;br /&gt;
 :ButtonEnableBlink=1-:InsideSafeZone goto1&lt;br /&gt;
&lt;br /&gt;
===Stations Building Availability===&lt;br /&gt;
Same as the previous one, but the button blink wherever you're allowed to build a station.&lt;br /&gt;
&lt;br /&gt;
 :ButtonEnableBlink=:StationsAllowed goto1&lt;br /&gt;
&lt;br /&gt;
[[Category:Networks|Common YOLOL]]&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=Common_YOLOL&amp;diff=30520</id>
		<title>Common YOLOL</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=Common_YOLOL&amp;diff=30520"/>
		<updated>2022-04-08T17:53:00Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: /* Fuel Chamber */  add comment regarding potential uses of the &amp;quot;Generator&amp;quot; button&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A collection of small common scripts meant to be easily copied and understood for the [[YOLOL|YOLOL]] beginners.&lt;br /&gt;
&lt;br /&gt;
''This page is a &amp;quot;Work In Progress&amp;quot;. Don't hesitate to contribute! Just make sure to respect the following rules:&lt;br /&gt;
* Avoid complex codes. As said, These must be easily understood by beginners. If you can't simplify your scripts, please add some comments to explain the most technical parts.&lt;br /&gt;
* Avoid as possible to modify the [[Device fields|device fields]]. If necessary, it must be specified which field has to be renamed (left column) and/or set to a given value (right column). ''&lt;br /&gt;
&lt;br /&gt;
==[[Flight control unit|Flight Control Unit]]==&lt;br /&gt;
&lt;br /&gt;
===Single Forward/Backward Lever===&lt;br /&gt;
Requires a center lever bound to '''&amp;quot;FcuForward&amp;quot;'''. ''Note: You can easily modify the default regular lever from most prebuilt ships and cockpit modules to be used as a center Lever. Just change the '''&amp;quot;LeverMinOutput&amp;quot;''' value from 0 to -100.''&lt;br /&gt;
&lt;br /&gt;
 :FcuBackward=-:FcuForward goto1&lt;br /&gt;
&lt;br /&gt;
===Speed Limiter===&lt;br /&gt;
Requires to modify the lever bound to '''&amp;quot;FcuForward&amp;quot;''' which shall be renamed '''&amp;quot;Fwd&amp;quot;''' and another regular lever with '''&amp;quot;LeverState&amp;quot;''' renamed '''&amp;quot;Limiter&amp;quot;'''. This script allow you to set a maximum forward speed to your ship, which is useful when you need more accurate movements (e.g. while mining or docking).&lt;br /&gt;
&lt;br /&gt;
 :FcuForward=:Fwd/100*:Limiter goto1&lt;br /&gt;
&lt;br /&gt;
''Note: If you already modified your '''&amp;quot;FcuFoward&amp;quot;''' lever to be used as a '''&amp;quot;Single Forward/Backward Lever&amp;quot;''' (see above), you can use the '''&amp;quot;Backward&amp;quot;''' lever made useless as the '''&amp;quot;Limiter&amp;quot;''' lever. Just make sure you have '''&amp;quot;FcuForward&amp;quot;''' renamed '''&amp;quot;FwdBwd&amp;quot;''' instead so you can modify forward and backward thrust individually. This way your YOLOL scripts should be written as follows:''&lt;br /&gt;
&lt;br /&gt;
 :FcuForward=:FwdBwd/100*:Limiter goto1&lt;br /&gt;
&lt;br /&gt;
 :FcuBackward=-:FwdBwd goto1&lt;br /&gt;
&lt;br /&gt;
===Turtle Mode===&lt;br /&gt;
Similar to the previous script but with a button instead of a lever. '''&amp;quot;ButtonState&amp;quot;''' should be renamed '''&amp;quot;Turtle&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''. In addition set the '''&amp;quot;ButtonOffStateValue&amp;quot;''' to '''&amp;quot;100&amp;quot;''' and the '''&amp;quot;ButtonOnStateValue&amp;quot;''' to the desired speed reduction. For example having '''&amp;quot;30&amp;quot;''' means 30% of maximum speed when the button is active.&lt;br /&gt;
&lt;br /&gt;
 :FcuForward=:Fwd/100*:Turtle goto1&lt;br /&gt;
&lt;br /&gt;
==[[Fuel chamber|Fuel Chamber]]==&lt;br /&gt;
&lt;br /&gt;
The following scripts are made to be used with the ship &amp;quot;[[Laborer module|Laborer Module]]&amp;quot; rewarded during the tutorials. To make it compatible with other prebuilt or own-made ships, refer to the table below for the corresponding modifications in the [[Device fields|device fields]]. ''Note: Most scripts make the &amp;quot;Generator&amp;quot; button irrelevant as it replace its use. Some may make another use of it.''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Ship Part !! Default Field Name !! Laborer Module Field Name&lt;br /&gt;
|-&lt;br /&gt;
| Hybrid Button || ButtonState || Generator&lt;br /&gt;
|-&lt;br /&gt;
| Fuel Chamber || FuelChamberUnitRateLimit || Generator&lt;br /&gt;
|-&lt;br /&gt;
| First Battery || StoredBatteryPower || Battery_1&lt;br /&gt;
|-&lt;br /&gt;
| Second Battery || StoredBatteryPower || Battery_2 &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Also, ships will require enough batteries to act as buffers during the generator spool up time. ''Note: When in use, all batteries discharge at the same rate. The more batteries you have, the slower the discharge is.''&lt;br /&gt;
&lt;br /&gt;
===Gradual Generator Script===&lt;br /&gt;
Makes the fuel rate limit of the fuel chamber inversely proportional to the charge level of the batteries.&lt;br /&gt;
&lt;br /&gt;
 :Generator=100-:Battery_1/100 goto1&lt;br /&gt;
&lt;br /&gt;
Alternatively, the script below will keep the batteries fuller by setting the fuel rate limit to its maximum when batteries are below 90% of charge.&lt;br /&gt;
&lt;br /&gt;
 :Generator=1000-:Battery_1/10 goto1&lt;br /&gt;
&lt;br /&gt;
Additionally, you can use the &amp;quot;Generator&amp;quot; button by renaming it &amp;quot;Eco&amp;quot; so it switch fuel saving on and off with the following script. Useful for more power consuming activities like mining.&lt;br /&gt;
&lt;br /&gt;
 :Generator=100-:Eco*:Battery_1/100 goto1&lt;br /&gt;
&lt;br /&gt;
===Flagged Generator Script===&lt;br /&gt;
This script set the fuel rate limit to 25% (just enough to supply 2 box thrusters with a bit of spare charge) if the level of the batteries is below 9999 and adding 50% if below 5000. 0.001% is enough fuel rate to let the generator &amp;quot;sleep&amp;quot; when the ship stand still and the batteries are full.&lt;br /&gt;
&lt;br /&gt;
 :Generator=25*(:Battery_1&amp;lt;9999)+50*(:Battery_1&amp;lt;5000)+0.001 goto1&lt;br /&gt;
&lt;br /&gt;
===Advanced Generator Script===&lt;br /&gt;
This script is tweakable to your ship configuration. Field names are those of the Laborer Module, except for the '''&amp;quot;Generator&amp;quot;''' button which should be renamed '''&amp;quot;PWR&amp;quot;''' so the script can control the fuel rate while the button still being functional. Optionally you can add an override lever with '''&amp;quot;LeverState&amp;quot;''' renamed '''&amp;quot;PWR&amp;quot;''' as well.&lt;br /&gt;
&lt;br /&gt;
 MaxBattery=20000           // total capacity&lt;br /&gt;
 LowBattery=0.99*MaxBattery // start charging below 99%&lt;br /&gt;
 MinBattery=0.20*MaxBattery // max charge rate below 20%&lt;br /&gt;
 MaxGenerator=100           // max fuel rate&lt;br /&gt;
 MinGenerator=2             // min fuel rate (near 100% charge)&lt;br /&gt;
 h=MaxGenerator c=MinGenerator          // auxiliary variables,&lt;br /&gt;
 f=MaxBattery l=LowBattery e=MinBattery // no need to change these&lt;br /&gt;
 r=(h-c)/(f-e) z=h-r*l a=r*(f-l)      // reboot: remove &amp;quot;goto9&amp;quot; briefly&lt;br /&gt;
 y=:PWR-z-r*(:Battery_1+:Battery_2)+c*(y&amp;gt;c)+a*(y&amp;gt;0) :Generator=y goto9&lt;br /&gt;
&lt;br /&gt;
It is assumed that the following device fields are set as explained (''Note: The &amp;quot;PWR&amp;quot; button is already set up in the Laborer Module''):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Ship Part !! Field Name !! Set Field value&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Button || ButtonOnStateValue|| 100&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Button || ButtonOffStateValue|| 0 &lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Button || ButtonStyle || 1&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Lever (optional) || LeverMinOutput || 0 &lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Lever (optional) || LeverMaxOutput || 200 &lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Lever (optional) || LeverCenteringSpeed || 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==[[Material point scanner|Material Point Scanner]]==&lt;br /&gt;
&lt;br /&gt;
===Material Point Scanner Script===&lt;br /&gt;
Requires two displays for '''&amp;quot;Material&amp;quot;''' and '''&amp;quot;Volume&amp;quot;''', two buttons to toggle the '''&amp;quot;Active&amp;quot;''' and '''&amp;quot;Scan&amp;quot;''' fields of the scanner, and a third button with '''&amp;quot;ButtonState&amp;quot;''' renamed '''&amp;quot;Next&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
 :Index=(:Index+:Next)*(:Index&amp;lt;:ScanResults) :Next=0&lt;br /&gt;
 :Material=:Material :Volume=:Volume goto1&lt;br /&gt;
&lt;br /&gt;
===Automatic Material Point Scanner Script===&lt;br /&gt;
This is a modified version of the above script so it can be used when the scanner is '''&amp;quot;Active&amp;quot;''' without the need of any additional buttons.&lt;br /&gt;
''Note: launching a new scan reinitialize the index to '''&amp;quot;0&amp;quot;'''.''&lt;br /&gt;
&lt;br /&gt;
 :Scan=1&lt;br /&gt;
 //Pause&lt;br /&gt;
 :Index=Next&lt;br /&gt;
 Next=(Next+1)*(Next&amp;lt;:ScanResults)&lt;br /&gt;
 :Material=:Material :Volume=:Volume goto1&lt;br /&gt;
&lt;br /&gt;
==[[Mining laser|Mining Laser]]==&lt;br /&gt;
&lt;br /&gt;
===Pulsed Mining Laser===&lt;br /&gt;
Requires a button with '''&amp;quot;ButtonState&amp;quot;''' renamed '''&amp;quot;Mining&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''. Reduces power consumption by continuously switching mining laser &amp;quot;On&amp;quot; and &amp;quot;Off&amp;quot; while the button is active.&lt;br /&gt;
&lt;br /&gt;
 :MiningLaserOn=(1-:MiningLaserOn)*:Mining goto1&lt;br /&gt;
&lt;br /&gt;
===Configurable Pulsed Mining Laser===&lt;br /&gt;
Similar to the previous script but with configurable timers for the &amp;quot;On&amp;quot; and &amp;quot;Off&amp;quot; phases of the laser.&lt;br /&gt;
''Note: Each phase is calculated in a number of YOLOL &amp;quot;tick&amp;quot; (0.2sec). So in the example, the &amp;quot;On&amp;quot; phase last 2*0.2=0.4sec and the &amp;quot;Off&amp;quot; phase 3*0.2=0.6 sec, which makes the power comsumption just a bit lower than the power production of a regular generator module (= one fuel chamber and three generator units, all in tier 1).''&lt;br /&gt;
&lt;br /&gt;
 On=2 Off=3 :MiningLaserOn=(T&amp;lt;On)*:Mining T++ T*=T&amp;lt;(On+Off) goto1&lt;br /&gt;
&lt;br /&gt;
==[[Navigation receivers|Navigation Receiver]]==&lt;br /&gt;
&lt;br /&gt;
===Received Signal Display===&lt;br /&gt;
Requires a text panel with '''&amp;quot;PanelValue&amp;quot;''' renamed '''&amp;quot;Nav&amp;quot;'''. &lt;br /&gt;
&lt;br /&gt;
 if :SignalStrength&amp;gt;0 then goto2 else :Nav=&amp;quot;No Signal&amp;quot; goto1 end&lt;br /&gt;
 :Nav=:Message+&amp;quot;\n&amp;quot;+(1000000-:SignalStrength)/1000+&amp;quot;km&amp;quot; goto1&lt;br /&gt;
&lt;br /&gt;
==[[Ore collector|Ore Collector]]==&lt;br /&gt;
&lt;br /&gt;
===Mining Laser/ Ore Collector Swapping Power===&lt;br /&gt;
Requires a button with '''&amp;quot;ButtonState&amp;quot;''' renamed '''&amp;quot;Collecting&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''. Reduces power consumption by switching ore collector &amp;quot;On&amp;quot; only if the button is active And the mining laser is &amp;quot;Off&amp;quot;. ''Note: this script works best alongside the &amp;quot;Pulsed Mining Laser&amp;quot; scripts.''&lt;br /&gt;
&lt;br /&gt;
 :ToggleOn=(1-:MiningLaserOn)*:Collecting goto1&lt;br /&gt;
&lt;br /&gt;
==[[Ship transponder|Ship Transponder]]==&lt;br /&gt;
&lt;br /&gt;
===Outside Safezone Warning===&lt;br /&gt;
Requires an active transponder and either a warning button or a safety lid button. The button blink whenever you're outside of the safe zone. ''Note: the button needs to be active in order to blink.''&lt;br /&gt;
&lt;br /&gt;
 :ButtonEnableBlink=1-:InsideSafeZone goto1&lt;br /&gt;
&lt;br /&gt;
===Stations Building Availability===&lt;br /&gt;
Same as the previous one, but the button blink wherever you're allowed to build a station.&lt;br /&gt;
&lt;br /&gt;
 :ButtonEnableBlink=:StationsAllowed goto1&lt;br /&gt;
&lt;br /&gt;
[[Category:Networks|Common YOLOL]]&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=Common_YOLOL&amp;diff=30519</id>
		<title>Common YOLOL</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=Common_YOLOL&amp;diff=30519"/>
		<updated>2022-04-08T17:49:38Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: /* Gradual Generator Script */  adding a use for the &amp;quot;Generator&amp;quot; button made useless&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A collection of small common scripts meant to be easily copied and understood for the [[YOLOL|YOLOL]] beginners.&lt;br /&gt;
&lt;br /&gt;
''This page is a &amp;quot;Work In Progress&amp;quot;. Don't hesitate to contribute! Just make sure to respect the following rules:&lt;br /&gt;
* Avoid complex codes. As said, These must be easily understood by beginners. If you can't simplify your scripts, please add some comments to explain the most technical parts.&lt;br /&gt;
* Avoid as possible to modify the [[Device fields|device fields]]. If necessary, it must be specified which field has to be renamed (left column) and/or set to a given value (right column). ''&lt;br /&gt;
&lt;br /&gt;
==[[Flight control unit|Flight Control Unit]]==&lt;br /&gt;
&lt;br /&gt;
===Single Forward/Backward Lever===&lt;br /&gt;
Requires a center lever bound to '''&amp;quot;FcuForward&amp;quot;'''. ''Note: You can easily modify the default regular lever from most prebuilt ships and cockpit modules to be used as a center Lever. Just change the '''&amp;quot;LeverMinOutput&amp;quot;''' value from 0 to -100.''&lt;br /&gt;
&lt;br /&gt;
 :FcuBackward=-:FcuForward goto1&lt;br /&gt;
&lt;br /&gt;
===Speed Limiter===&lt;br /&gt;
Requires to modify the lever bound to '''&amp;quot;FcuForward&amp;quot;''' which shall be renamed '''&amp;quot;Fwd&amp;quot;''' and another regular lever with '''&amp;quot;LeverState&amp;quot;''' renamed '''&amp;quot;Limiter&amp;quot;'''. This script allow you to set a maximum forward speed to your ship, which is useful when you need more accurate movements (e.g. while mining or docking).&lt;br /&gt;
&lt;br /&gt;
 :FcuForward=:Fwd/100*:Limiter goto1&lt;br /&gt;
&lt;br /&gt;
''Note: If you already modified your '''&amp;quot;FcuFoward&amp;quot;''' lever to be used as a '''&amp;quot;Single Forward/Backward Lever&amp;quot;''' (see above), you can use the '''&amp;quot;Backward&amp;quot;''' lever made useless as the '''&amp;quot;Limiter&amp;quot;''' lever. Just make sure you have '''&amp;quot;FcuForward&amp;quot;''' renamed '''&amp;quot;FwdBwd&amp;quot;''' instead so you can modify forward and backward thrust individually. This way your YOLOL scripts should be written as follows:''&lt;br /&gt;
&lt;br /&gt;
 :FcuForward=:FwdBwd/100*:Limiter goto1&lt;br /&gt;
&lt;br /&gt;
 :FcuBackward=-:FwdBwd goto1&lt;br /&gt;
&lt;br /&gt;
===Turtle Mode===&lt;br /&gt;
Similar to the previous script but with a button instead of a lever. '''&amp;quot;ButtonState&amp;quot;''' should be renamed '''&amp;quot;Turtle&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''. In addition set the '''&amp;quot;ButtonOffStateValue&amp;quot;''' to '''&amp;quot;100&amp;quot;''' and the '''&amp;quot;ButtonOnStateValue&amp;quot;''' to the desired speed reduction. For example having '''&amp;quot;30&amp;quot;''' means 30% of maximum speed when the button is active.&lt;br /&gt;
&lt;br /&gt;
 :FcuForward=:Fwd/100*:Turtle goto1&lt;br /&gt;
&lt;br /&gt;
==[[Fuel chamber|Fuel Chamber]]==&lt;br /&gt;
&lt;br /&gt;
The following scripts are made to be used with the ship &amp;quot;[[Laborer module|Laborer Module]]&amp;quot; rewarded during the tutorials. To make it compatible with other prebuilt or own-made ships, refer to the table below for the corresponding modifications in the [[Device fields|device fields]]. ''Note: Most scripts make the &amp;quot;Generator&amp;quot; button irrelevant as it replace its use.''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Ship Part !! Default Field Name !! Laborer Module Field Name&lt;br /&gt;
|-&lt;br /&gt;
| Hybrid Button || ButtonState || Generator&lt;br /&gt;
|-&lt;br /&gt;
| Fuel Chamber || FuelChamberUnitRateLimit || Generator&lt;br /&gt;
|-&lt;br /&gt;
| First Battery || StoredBatteryPower || Battery_1&lt;br /&gt;
|-&lt;br /&gt;
| Second Battery || StoredBatteryPower || Battery_2 &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Also, ships will require enough batteries to act as buffers during the generator spool up time. ''Note: When in use, all batteries discharge at the same rate. The more batteries you have, the slower the discharge is.''&lt;br /&gt;
&lt;br /&gt;
===Gradual Generator Script===&lt;br /&gt;
Makes the fuel rate limit of the fuel chamber inversely proportional to the charge level of the batteries.&lt;br /&gt;
&lt;br /&gt;
 :Generator=100-:Battery_1/100 goto1&lt;br /&gt;
&lt;br /&gt;
Alternatively, the script below will keep the batteries fuller by setting the fuel rate limit to its maximum when batteries are below 90% of charge.&lt;br /&gt;
&lt;br /&gt;
 :Generator=1000-:Battery_1/10 goto1&lt;br /&gt;
&lt;br /&gt;
Additionally, you can use the &amp;quot;Generator&amp;quot; button by renaming it &amp;quot;Eco&amp;quot; so it switch fuel saving on and off with the following script. Useful for more power consuming activities like mining.&lt;br /&gt;
&lt;br /&gt;
 :Generator=100-:Eco*:Battery_1/100 goto1&lt;br /&gt;
&lt;br /&gt;
===Flagged Generator Script===&lt;br /&gt;
This script set the fuel rate limit to 25% (just enough to supply 2 box thrusters with a bit of spare charge) if the level of the batteries is below 9999 and adding 50% if below 5000. 0.001% is enough fuel rate to let the generator &amp;quot;sleep&amp;quot; when the ship stand still and the batteries are full.&lt;br /&gt;
&lt;br /&gt;
 :Generator=25*(:Battery_1&amp;lt;9999)+50*(:Battery_1&amp;lt;5000)+0.001 goto1&lt;br /&gt;
&lt;br /&gt;
===Advanced Generator Script===&lt;br /&gt;
This script is tweakable to your ship configuration. Field names are those of the Laborer Module, except for the '''&amp;quot;Generator&amp;quot;''' button which should be renamed '''&amp;quot;PWR&amp;quot;''' so the script can control the fuel rate while the button still being functional. Optionally you can add an override lever with '''&amp;quot;LeverState&amp;quot;''' renamed '''&amp;quot;PWR&amp;quot;''' as well.&lt;br /&gt;
&lt;br /&gt;
 MaxBattery=20000           // total capacity&lt;br /&gt;
 LowBattery=0.99*MaxBattery // start charging below 99%&lt;br /&gt;
 MinBattery=0.20*MaxBattery // max charge rate below 20%&lt;br /&gt;
 MaxGenerator=100           // max fuel rate&lt;br /&gt;
 MinGenerator=2             // min fuel rate (near 100% charge)&lt;br /&gt;
 h=MaxGenerator c=MinGenerator          // auxiliary variables,&lt;br /&gt;
 f=MaxBattery l=LowBattery e=MinBattery // no need to change these&lt;br /&gt;
 r=(h-c)/(f-e) z=h-r*l a=r*(f-l)      // reboot: remove &amp;quot;goto9&amp;quot; briefly&lt;br /&gt;
 y=:PWR-z-r*(:Battery_1+:Battery_2)+c*(y&amp;gt;c)+a*(y&amp;gt;0) :Generator=y goto9&lt;br /&gt;
&lt;br /&gt;
It is assumed that the following device fields are set as explained (''Note: The &amp;quot;PWR&amp;quot; button is already set up in the Laborer Module''):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Ship Part !! Field Name !! Set Field value&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Button || ButtonOnStateValue|| 100&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Button || ButtonOffStateValue|| 0 &lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Button || ButtonStyle || 1&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Lever (optional) || LeverMinOutput || 0 &lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Lever (optional) || LeverMaxOutput || 200 &lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Lever (optional) || LeverCenteringSpeed || 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==[[Material point scanner|Material Point Scanner]]==&lt;br /&gt;
&lt;br /&gt;
===Material Point Scanner Script===&lt;br /&gt;
Requires two displays for '''&amp;quot;Material&amp;quot;''' and '''&amp;quot;Volume&amp;quot;''', two buttons to toggle the '''&amp;quot;Active&amp;quot;''' and '''&amp;quot;Scan&amp;quot;''' fields of the scanner, and a third button with '''&amp;quot;ButtonState&amp;quot;''' renamed '''&amp;quot;Next&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
 :Index=(:Index+:Next)*(:Index&amp;lt;:ScanResults) :Next=0&lt;br /&gt;
 :Material=:Material :Volume=:Volume goto1&lt;br /&gt;
&lt;br /&gt;
===Automatic Material Point Scanner Script===&lt;br /&gt;
This is a modified version of the above script so it can be used when the scanner is '''&amp;quot;Active&amp;quot;''' without the need of any additional buttons.&lt;br /&gt;
''Note: launching a new scan reinitialize the index to '''&amp;quot;0&amp;quot;'''.''&lt;br /&gt;
&lt;br /&gt;
 :Scan=1&lt;br /&gt;
 //Pause&lt;br /&gt;
 :Index=Next&lt;br /&gt;
 Next=(Next+1)*(Next&amp;lt;:ScanResults)&lt;br /&gt;
 :Material=:Material :Volume=:Volume goto1&lt;br /&gt;
&lt;br /&gt;
==[[Mining laser|Mining Laser]]==&lt;br /&gt;
&lt;br /&gt;
===Pulsed Mining Laser===&lt;br /&gt;
Requires a button with '''&amp;quot;ButtonState&amp;quot;''' renamed '''&amp;quot;Mining&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''. Reduces power consumption by continuously switching mining laser &amp;quot;On&amp;quot; and &amp;quot;Off&amp;quot; while the button is active.&lt;br /&gt;
&lt;br /&gt;
 :MiningLaserOn=(1-:MiningLaserOn)*:Mining goto1&lt;br /&gt;
&lt;br /&gt;
===Configurable Pulsed Mining Laser===&lt;br /&gt;
Similar to the previous script but with configurable timers for the &amp;quot;On&amp;quot; and &amp;quot;Off&amp;quot; phases of the laser.&lt;br /&gt;
''Note: Each phase is calculated in a number of YOLOL &amp;quot;tick&amp;quot; (0.2sec). So in the example, the &amp;quot;On&amp;quot; phase last 2*0.2=0.4sec and the &amp;quot;Off&amp;quot; phase 3*0.2=0.6 sec, which makes the power comsumption just a bit lower than the power production of a regular generator module (= one fuel chamber and three generator units, all in tier 1).''&lt;br /&gt;
&lt;br /&gt;
 On=2 Off=3 :MiningLaserOn=(T&amp;lt;On)*:Mining T++ T*=T&amp;lt;(On+Off) goto1&lt;br /&gt;
&lt;br /&gt;
==[[Navigation receivers|Navigation Receiver]]==&lt;br /&gt;
&lt;br /&gt;
===Received Signal Display===&lt;br /&gt;
Requires a text panel with '''&amp;quot;PanelValue&amp;quot;''' renamed '''&amp;quot;Nav&amp;quot;'''. &lt;br /&gt;
&lt;br /&gt;
 if :SignalStrength&amp;gt;0 then goto2 else :Nav=&amp;quot;No Signal&amp;quot; goto1 end&lt;br /&gt;
 :Nav=:Message+&amp;quot;\n&amp;quot;+(1000000-:SignalStrength)/1000+&amp;quot;km&amp;quot; goto1&lt;br /&gt;
&lt;br /&gt;
==[[Ore collector|Ore Collector]]==&lt;br /&gt;
&lt;br /&gt;
===Mining Laser/ Ore Collector Swapping Power===&lt;br /&gt;
Requires a button with '''&amp;quot;ButtonState&amp;quot;''' renamed '''&amp;quot;Collecting&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''. Reduces power consumption by switching ore collector &amp;quot;On&amp;quot; only if the button is active And the mining laser is &amp;quot;Off&amp;quot;. ''Note: this script works best alongside the &amp;quot;Pulsed Mining Laser&amp;quot; scripts.''&lt;br /&gt;
&lt;br /&gt;
 :ToggleOn=(1-:MiningLaserOn)*:Collecting goto1&lt;br /&gt;
&lt;br /&gt;
==[[Ship transponder|Ship Transponder]]==&lt;br /&gt;
&lt;br /&gt;
===Outside Safezone Warning===&lt;br /&gt;
Requires an active transponder and either a warning button or a safety lid button. The button blink whenever you're outside of the safe zone. ''Note: the button needs to be active in order to blink.''&lt;br /&gt;
&lt;br /&gt;
 :ButtonEnableBlink=1-:InsideSafeZone goto1&lt;br /&gt;
&lt;br /&gt;
===Stations Building Availability===&lt;br /&gt;
Same as the previous one, but the button blink wherever you're allowed to build a station.&lt;br /&gt;
&lt;br /&gt;
 :ButtonEnableBlink=:StationsAllowed goto1&lt;br /&gt;
&lt;br /&gt;
[[Category:Networks|Common YOLOL]]&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=Common_YOLOL&amp;diff=30518</id>
		<title>Common YOLOL</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=Common_YOLOL&amp;diff=30518"/>
		<updated>2022-04-08T17:13:34Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: /* Mining Laser/ Ore Collector Switching */  Renamed&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A collection of small common scripts meant to be easily copied and understood for the [[YOLOL|YOLOL]] beginners.&lt;br /&gt;
&lt;br /&gt;
''This page is a &amp;quot;Work In Progress&amp;quot;. Don't hesitate to contribute! Just make sure to respect the following rules:&lt;br /&gt;
* Avoid complex codes. As said, These must be easily understood by beginners. If you can't simplify your scripts, please add some comments to explain the most technical parts.&lt;br /&gt;
* Avoid as possible to modify the [[Device fields|device fields]]. If necessary, it must be specified which field has to be renamed (left column) and/or set to a given value (right column). ''&lt;br /&gt;
&lt;br /&gt;
==[[Flight control unit|Flight Control Unit]]==&lt;br /&gt;
&lt;br /&gt;
===Single Forward/Backward Lever===&lt;br /&gt;
Requires a center lever bound to '''&amp;quot;FcuForward&amp;quot;'''. ''Note: You can easily modify the default regular lever from most prebuilt ships and cockpit modules to be used as a center Lever. Just change the '''&amp;quot;LeverMinOutput&amp;quot;''' value from 0 to -100.''&lt;br /&gt;
&lt;br /&gt;
 :FcuBackward=-:FcuForward goto1&lt;br /&gt;
&lt;br /&gt;
===Speed Limiter===&lt;br /&gt;
Requires to modify the lever bound to '''&amp;quot;FcuForward&amp;quot;''' which shall be renamed '''&amp;quot;Fwd&amp;quot;''' and another regular lever with '''&amp;quot;LeverState&amp;quot;''' renamed '''&amp;quot;Limiter&amp;quot;'''. This script allow you to set a maximum forward speed to your ship, which is useful when you need more accurate movements (e.g. while mining or docking).&lt;br /&gt;
&lt;br /&gt;
 :FcuForward=:Fwd/100*:Limiter goto1&lt;br /&gt;
&lt;br /&gt;
''Note: If you already modified your '''&amp;quot;FcuFoward&amp;quot;''' lever to be used as a '''&amp;quot;Single Forward/Backward Lever&amp;quot;''' (see above), you can use the '''&amp;quot;Backward&amp;quot;''' lever made useless as the '''&amp;quot;Limiter&amp;quot;''' lever. Just make sure you have '''&amp;quot;FcuForward&amp;quot;''' renamed '''&amp;quot;FwdBwd&amp;quot;''' instead so you can modify forward and backward thrust individually. This way your YOLOL scripts should be written as follows:''&lt;br /&gt;
&lt;br /&gt;
 :FcuForward=:FwdBwd/100*:Limiter goto1&lt;br /&gt;
&lt;br /&gt;
 :FcuBackward=-:FwdBwd goto1&lt;br /&gt;
&lt;br /&gt;
===Turtle Mode===&lt;br /&gt;
Similar to the previous script but with a button instead of a lever. '''&amp;quot;ButtonState&amp;quot;''' should be renamed '''&amp;quot;Turtle&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''. In addition set the '''&amp;quot;ButtonOffStateValue&amp;quot;''' to '''&amp;quot;100&amp;quot;''' and the '''&amp;quot;ButtonOnStateValue&amp;quot;''' to the desired speed reduction. For example having '''&amp;quot;30&amp;quot;''' means 30% of maximum speed when the button is active.&lt;br /&gt;
&lt;br /&gt;
 :FcuForward=:Fwd/100*:Turtle goto1&lt;br /&gt;
&lt;br /&gt;
==[[Fuel chamber|Fuel Chamber]]==&lt;br /&gt;
&lt;br /&gt;
The following scripts are made to be used with the ship &amp;quot;[[Laborer module|Laborer Module]]&amp;quot; rewarded during the tutorials. To make it compatible with other prebuilt or own-made ships, refer to the table below for the corresponding modifications in the [[Device fields|device fields]]. ''Note: Most scripts make the &amp;quot;Generator&amp;quot; button irrelevant as it replace its use.''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Ship Part !! Default Field Name !! Laborer Module Field Name&lt;br /&gt;
|-&lt;br /&gt;
| Hybrid Button || ButtonState || Generator&lt;br /&gt;
|-&lt;br /&gt;
| Fuel Chamber || FuelChamberUnitRateLimit || Generator&lt;br /&gt;
|-&lt;br /&gt;
| First Battery || StoredBatteryPower || Battery_1&lt;br /&gt;
|-&lt;br /&gt;
| Second Battery || StoredBatteryPower || Battery_2 &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Also, ships will require enough batteries to act as buffers during the generator spool up time. ''Note: When in use, all batteries discharge at the same rate. The more batteries you have, the slower the discharge is.''&lt;br /&gt;
&lt;br /&gt;
===Gradual Generator Script===&lt;br /&gt;
Makes the fuel rate limit of the fuel chamber inversely proportional to the charge level of the batteries.&lt;br /&gt;
&lt;br /&gt;
 :Generator=100-:Battery_1/100 goto1&lt;br /&gt;
&lt;br /&gt;
Alternatively, this script will keep the batteries fuller by setting the fuel rate limit to its maximum when batteries are below 90% of charge.&lt;br /&gt;
&lt;br /&gt;
 :Generator=1000-:Battery_1/10 goto1&lt;br /&gt;
&lt;br /&gt;
Additionally, you can add a button to switch fuel saving on and off. Useful for more power consuming activities like mining. &amp;quot;ButtonState&amp;quot; should be renamed &amp;quot;Eco&amp;quot; and &amp;quot;ButtonStyle&amp;quot; set to &amp;quot;1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 :Generator=100-:Eco*:Battery_1/100 goto1&lt;br /&gt;
&lt;br /&gt;
===Flagged Generator Script===&lt;br /&gt;
This script set the fuel rate limit to 25% (just enough to supply 2 box thrusters with a bit of spare charge) if the level of the batteries is below 9999 and adding 50% if below 5000. 0.001% is enough fuel rate to let the generator &amp;quot;sleep&amp;quot; when the ship stand still and the batteries are full.&lt;br /&gt;
&lt;br /&gt;
 :Generator=25*(:Battery_1&amp;lt;9999)+50*(:Battery_1&amp;lt;5000)+0.001 goto1&lt;br /&gt;
&lt;br /&gt;
===Advanced Generator Script===&lt;br /&gt;
This script is tweakable to your ship configuration. Field names are those of the Laborer Module, except for the '''&amp;quot;Generator&amp;quot;''' button which should be renamed '''&amp;quot;PWR&amp;quot;''' so the script can control the fuel rate while the button still being functional. Optionally you can add an override lever with '''&amp;quot;LeverState&amp;quot;''' renamed '''&amp;quot;PWR&amp;quot;''' as well.&lt;br /&gt;
&lt;br /&gt;
 MaxBattery=20000           // total capacity&lt;br /&gt;
 LowBattery=0.99*MaxBattery // start charging below 99%&lt;br /&gt;
 MinBattery=0.20*MaxBattery // max charge rate below 20%&lt;br /&gt;
 MaxGenerator=100           // max fuel rate&lt;br /&gt;
 MinGenerator=2             // min fuel rate (near 100% charge)&lt;br /&gt;
 h=MaxGenerator c=MinGenerator          // auxiliary variables,&lt;br /&gt;
 f=MaxBattery l=LowBattery e=MinBattery // no need to change these&lt;br /&gt;
 r=(h-c)/(f-e) z=h-r*l a=r*(f-l)      // reboot: remove &amp;quot;goto9&amp;quot; briefly&lt;br /&gt;
 y=:PWR-z-r*(:Battery_1+:Battery_2)+c*(y&amp;gt;c)+a*(y&amp;gt;0) :Generator=y goto9&lt;br /&gt;
&lt;br /&gt;
It is assumed that the following device fields are set as explained (''Note: The &amp;quot;PWR&amp;quot; button is already set up in the Laborer Module''):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Ship Part !! Field Name !! Set Field value&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Button || ButtonOnStateValue|| 100&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Button || ButtonOffStateValue|| 0 &lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Button || ButtonStyle || 1&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Lever (optional) || LeverMinOutput || 0 &lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Lever (optional) || LeverMaxOutput || 200 &lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Lever (optional) || LeverCenteringSpeed || 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==[[Material point scanner|Material Point Scanner]]==&lt;br /&gt;
&lt;br /&gt;
===Material Point Scanner Script===&lt;br /&gt;
Requires two displays for '''&amp;quot;Material&amp;quot;''' and '''&amp;quot;Volume&amp;quot;''', two buttons to toggle the '''&amp;quot;Active&amp;quot;''' and '''&amp;quot;Scan&amp;quot;''' fields of the scanner, and a third button with '''&amp;quot;ButtonState&amp;quot;''' renamed '''&amp;quot;Next&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
 :Index=(:Index+:Next)*(:Index&amp;lt;:ScanResults) :Next=0&lt;br /&gt;
 :Material=:Material :Volume=:Volume goto1&lt;br /&gt;
&lt;br /&gt;
===Automatic Material Point Scanner Script===&lt;br /&gt;
This is a modified version of the above script so it can be used when the scanner is '''&amp;quot;Active&amp;quot;''' without the need of any additional buttons.&lt;br /&gt;
''Note: launching a new scan reinitialize the index to '''&amp;quot;0&amp;quot;'''.''&lt;br /&gt;
&lt;br /&gt;
 :Scan=1&lt;br /&gt;
 //Pause&lt;br /&gt;
 :Index=Next&lt;br /&gt;
 Next=(Next+1)*(Next&amp;lt;:ScanResults)&lt;br /&gt;
 :Material=:Material :Volume=:Volume goto1&lt;br /&gt;
&lt;br /&gt;
==[[Mining laser|Mining Laser]]==&lt;br /&gt;
&lt;br /&gt;
===Pulsed Mining Laser===&lt;br /&gt;
Requires a button with '''&amp;quot;ButtonState&amp;quot;''' renamed '''&amp;quot;Mining&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''. Reduces power consumption by continuously switching mining laser &amp;quot;On&amp;quot; and &amp;quot;Off&amp;quot; while the button is active.&lt;br /&gt;
&lt;br /&gt;
 :MiningLaserOn=(1-:MiningLaserOn)*:Mining goto1&lt;br /&gt;
&lt;br /&gt;
===Configurable Pulsed Mining Laser===&lt;br /&gt;
Similar to the previous script but with configurable timers for the &amp;quot;On&amp;quot; and &amp;quot;Off&amp;quot; phases of the laser.&lt;br /&gt;
''Note: Each phase is calculated in a number of YOLOL &amp;quot;tick&amp;quot; (0.2sec). So in the example, the &amp;quot;On&amp;quot; phase last 2*0.2=0.4sec and the &amp;quot;Off&amp;quot; phase 3*0.2=0.6 sec, which makes the power comsumption just a bit lower than the power production of a regular generator module (= one fuel chamber and three generator units, all in tier 1).''&lt;br /&gt;
&lt;br /&gt;
 On=2 Off=3 :MiningLaserOn=(T&amp;lt;On)*:Mining T++ T*=T&amp;lt;(On+Off) goto1&lt;br /&gt;
&lt;br /&gt;
==[[Navigation receivers|Navigation Receiver]]==&lt;br /&gt;
&lt;br /&gt;
===Received Signal Display===&lt;br /&gt;
Requires a text panel with '''&amp;quot;PanelValue&amp;quot;''' renamed '''&amp;quot;Nav&amp;quot;'''. &lt;br /&gt;
&lt;br /&gt;
 if :SignalStrength&amp;gt;0 then goto2 else :Nav=&amp;quot;No Signal&amp;quot; goto1 end&lt;br /&gt;
 :Nav=:Message+&amp;quot;\n&amp;quot;+(1000000-:SignalStrength)/1000+&amp;quot;km&amp;quot; goto1&lt;br /&gt;
&lt;br /&gt;
==[[Ore collector|Ore Collector]]==&lt;br /&gt;
&lt;br /&gt;
===Mining Laser/ Ore Collector Swapping Power===&lt;br /&gt;
Requires a button with '''&amp;quot;ButtonState&amp;quot;''' renamed '''&amp;quot;Collecting&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''. Reduces power consumption by switching ore collector &amp;quot;On&amp;quot; only if the button is active And the mining laser is &amp;quot;Off&amp;quot;. ''Note: this script works best alongside the &amp;quot;Pulsed Mining Laser&amp;quot; scripts.''&lt;br /&gt;
&lt;br /&gt;
 :ToggleOn=(1-:MiningLaserOn)*:Collecting goto1&lt;br /&gt;
&lt;br /&gt;
==[[Ship transponder|Ship Transponder]]==&lt;br /&gt;
&lt;br /&gt;
===Outside Safezone Warning===&lt;br /&gt;
Requires an active transponder and either a warning button or a safety lid button. The button blink whenever you're outside of the safe zone. ''Note: the button needs to be active in order to blink.''&lt;br /&gt;
&lt;br /&gt;
 :ButtonEnableBlink=1-:InsideSafeZone goto1&lt;br /&gt;
&lt;br /&gt;
===Stations Building Availability===&lt;br /&gt;
Same as the previous one, but the button blink wherever you're allowed to build a station.&lt;br /&gt;
&lt;br /&gt;
 :ButtonEnableBlink=:StationsAllowed goto1&lt;br /&gt;
&lt;br /&gt;
[[Category:Networks|Common YOLOL]]&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=YOLOL/fr&amp;diff=30517</id>
		<title>YOLOL/fr</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=YOLOL/fr&amp;diff=30517"/>
		<updated>2022-04-08T16:32:25Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: /* Remarques */  précision sur l'ordre des instructions dans une même ligne&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Otherlang2&lt;br /&gt;
|en=YOLOL&lt;br /&gt;
|de=YOLOL:de&lt;br /&gt;
|fr=YOLOL/fr&lt;br /&gt;
|ru=YOLOL:ru&lt;br /&gt;
|ua=YOLOL:ua&lt;br /&gt;
|jp=YOLOL:jp&lt;br /&gt;
|zh-cn=YOLOL语言&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
{{#evt:service=youtube|id=https://www.youtube.com/watch?v=7lXK6_bktUk|alignment=center}}&lt;br /&gt;
&lt;br /&gt;
le YOLOL est un langage de programmation spécifique à Starbase qui est utilisé en parallèle du l'[[Universal tool/fr|outil universel]] pour contrôler et gérer les [[Devices_and_machines/fr|appareils]].&amp;lt;br&amp;gt;&lt;br /&gt;
Le code est écrit ligne par ligne sur une [[YOLOL Chip/fr|puce YOLOL]] qui est ensuite insérée dans un [[Chip socket/fr|socle à puce]] connecté au [[Data networks/fr|réseau de données]] du vaisseau afin d'accéder aux [[Device fields/fr|champs de périphérique]].&amp;lt;br&amp;gt;&lt;br /&gt;
Le langage YOLOL est compatible avec presque tous les équipements et engins de l'univers connu.&lt;br /&gt;
&lt;br /&gt;
===Comment ça marche?===&lt;br /&gt;
Le YOLOL fonctionne par cycle: Les lignes de code sont exécutées les unes après les autres du haut vers le bas, puis la séquence reprend une fois la dernière ligne passée. Chaque ligne est lue dans un intervalle de temps constant de 0.2 secondes, quelque soit sa longueur et le nombre d'instructions qui y sont contenues.&lt;br /&gt;
&lt;br /&gt;
Pour faire simple:&lt;br /&gt;
# Le code se lance en commençant par la ligne 1&lt;br /&gt;
# La ligne en cours est exécutée, puis le programme passe à la suivante après un intervalle de temps de 0.2 secondes&lt;br /&gt;
# L'étape 2 est répétée pour les lignes 2, 3, 4... jusqu'à la dernière&lt;br /&gt;
# La puce se réinitialise à l'étape 1 une fois le processus terminé&lt;br /&gt;
&lt;br /&gt;
===Limites===&lt;br /&gt;
* Chaque puce YOLOL contient 20 lignes de code. Ni plus, ni moins. L'exécution d'un cycle complet prend donc 20 * 0.2 = 4 secondes si il est mené à son terme.&lt;br /&gt;
* Chaque lignes peut contenir un maximum de 70 caractères (symboles et espaces inclus).&lt;br /&gt;
&lt;br /&gt;
===Remarques===&lt;br /&gt;
* Les puces YOLOL possèdent une fonction de mise en pause, qui fige l'exécution du code à la ligne en cours.&lt;br /&gt;
* Les lignes vides nécessitent tout de même l'intervalle de temps des 0.2 secondes pour être passées, provoquant de courts délais d'exécution (il en va de même pour les lignes ne contenant que des commentaires).&lt;br /&gt;
* Une seule ligne de code peut contenir plusieurs instructions à la fois, autant que peut le supporter la limite maximale de caractères. Celle-ci seront alors lues dans l'ordre de gauche à droite.&lt;br /&gt;
* Certaines instructions permettent de passer à une ligne spécifique, ce qui rend le code plus modulable.&lt;br /&gt;
&lt;br /&gt;
== Les Variables ==&lt;br /&gt;
Les variables permettent d'associer un '''nom''' à une '''valeur''' pour faciliter l'acquisition ultérieure de cette dernière. Dès lors, à chaque fois que le '''nom''' de la variable sera appelé, c'est sa '''valeur''' qui sera demandée et/ou modifiée suivant l'instruction utilisée.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 ButtonState = 1&lt;br /&gt;
* Dans ce script, on attribue à la variable nommée '''ButtonState''' la valeur numérique '''1'''.&lt;br /&gt;
 if ButtonState &amp;gt;= 1 then DoorState = 1 end&lt;br /&gt;
* Maintenant, on vérifie si la valeur de la variable '''ButtonState''' est supérieure ou égale à '''1''', auquel cas la variable '''DoorState''' se voit elle aussi associée à '''1'''.&lt;br /&gt;
&lt;br /&gt;
===Les Noms de Variables===&lt;br /&gt;
====Sensibilité à la casse====&lt;br /&gt;
Le langage YOLOL est dit &amp;quot;insensible à la casse&amp;quot;, ce qui signifie que les noms des variables peuvent contenir des majuscules et des minuscules sans différencier les deux. Ainsi '''ButtonState''' et '''buttonstate''' désignent indistinctement la même variable. C'est une fonctionnalité très pratique pour rendre le code plus lisible.&lt;br /&gt;
&lt;br /&gt;
====Les variables internes et externes====&lt;br /&gt;
Il existe deux genre de variables: les '''variables internes''' qui ne peuvent être utilisées qu'au sein de la puce YOLOL où elles ont été initiées et les '''variables externes''' qui font appel aux [[device fields/fr|champs de périphérique]] des appareils branchés sur le même [[data networks/fr|réseau de données]] pour en demander ou modifier les valeurs.&amp;lt;br&amp;gt;&lt;br /&gt;
Pour les différencier, les variables externes sont précédées d'un double-point (''':''').&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 if :ButtonState &amp;gt;= 1 then :DoorState = 1 end&lt;br /&gt;
* Comme vu précédemment, ce script évalue la valeur de '''ButtonState''' et, si elle est supérieure ou égale à '''1''', associe '''DoorState''' à '''1'''. Les deux variables seront cependant ici appelées sur l'ensemble des équipements présents sur le réseau de données, par exemple pour ouvrir une porte si un bouton est appuyé.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Remarques====&lt;br /&gt;
* Les champs ayant le même nom au sein du réseau de données sont liées et ont presque toujours la même valeur. Ainsi, une variable externe qui en modifie la valeur le fera sur tout les appareils associés.&lt;br /&gt;
* Il n'est actuellement pas possible d'appeler une variable initiée sur un puce YOLOL depuis une autre puce YOLOL.&lt;br /&gt;
&lt;br /&gt;
===Les Valeurs de Variables===&lt;br /&gt;
====Typage====&lt;br /&gt;
Le langage YOLOL supporte deux types de valeurs pour les variables: Les '''valeurs numériques''' et les '''chaînes de caractères''' (ou &amp;quot;string&amp;quot;). Cette différence est importante car en fonction du type de variable, le résultat d'une même instruction sera différente.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 Addition = 3 + 5&lt;br /&gt;
* Cette instruction conduit à additionner les deux valeurs numériques '''3''' et '''5'''. Le résultat sera donc '''8'''.&lt;br /&gt;
 Addition = &amp;quot;3&amp;quot; + &amp;quot;5&amp;quot;&lt;br /&gt;
* Cette instruction conduit à associer les chaînes de caractères '''&amp;quot;3&amp;quot;''' et '''&amp;quot;5&amp;quot;'''. Le résultat sera donc '''&amp;quot;35&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
Les variables sont dites à &amp;quot;faible typage&amp;quot;, c'est-à-dire qu'elles ne sont pas restreintes à un seul type. Elles se convertissent systématiquement aux valeurs qui leur sont assignées. Ainsi, une variable associée à une valeur numérique peut la remplacer par une chaîne de caractères et inversement sans provoquer d'erreur dans le code.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 AutoPilot = 128.643&lt;br /&gt;
* cette première instruction associe la variable '''AutoPilot''' à la valeur numérique '''128.643'''.&lt;br /&gt;
 AutoPilot= &amp;quot;Erreur détectée&amp;quot;&lt;br /&gt;
* La variable '''AutoPilot''' se convertit en s'associant à la chaîne de caractères '''&amp;quot;Erreur détectée&amp;quot;''' et la valeur numérique '''128.643''' est effacée.&lt;br /&gt;
&lt;br /&gt;
====Les valeurs numériques====&lt;br /&gt;
Les valeurs numérique dans le langage YOLOL sont des décimales à point fixe. La précision est de un millième: Jusqu'à trois nombre sous la décimale sont acceptés. Fournir une valeur plus précise fonctionne, mais n'affecte pas le résultat final.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 Pi = 3,14159265&lt;br /&gt;
* Le script ci-dessus tente d'associer la variable '''Pi''' à la valeur numérique '''3,14159265'''. Le résultat final sera cependant '''Pi = 3.141''', coupant la précision à trois nombre sous la décimale.&lt;br /&gt;
&lt;br /&gt;
La taille maximale d'une valeur numérique est de 64-bit. De ce fait, la portée maximale (même après opération) est de [-9223372036854775.808, 9223372036854775.807]. Toutes valeurs supérieures ou inférieures seront ramenées aux limites de la portée.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 StarTrek = 9999999999999999.999&lt;br /&gt;
* Ici, on tente d'associer la variable '''StarTrek''' à la valeur numérique '''9999999999999999.999'''. Celle-ci est cependant supérieure à la portée maximale et le résultat final sera '''StarTrek = 9223372036854775.807'''.&lt;br /&gt;
&lt;br /&gt;
====Les chaînes de caractères====&lt;br /&gt;
Pour signaler une chaîne de caractères au langage YOLOL, celle-ci doit être entourée de double-guillemets ('''&amp;quot; &amp;quot;''').&lt;br /&gt;
&lt;br /&gt;
 BadRobots= &amp;quot;Saltberia&amp;quot; &lt;br /&gt;
* Ce script associe la variable '''BadRobot''' à la chaîne de caractères '''&amp;quot;Saltberia&amp;quot;'''.&lt;br /&gt;
Comme pour les valeurs numériques, la taille maximale d'une chaîne de caractères est de 64-bit.&lt;br /&gt;
&lt;br /&gt;
====Remarques====&lt;br /&gt;
* Chaque variable ne peut être que d'un type à la fois, bien que celui-ci puisse être converti au besoin.&lt;br /&gt;
* Les valeurs &amp;quot;False&amp;quot; et &amp;quot;True&amp;quot; sont de type numérique: Elles correspondent respectivement à &amp;quot;0&amp;quot; et &amp;quot;non-0&amp;quot;.&lt;br /&gt;
* Une variable non définie préalablement a par défaut la valeur numérique &amp;quot;0&amp;quot;. L'absence de valeur (&amp;quot;null&amp;quot;) n'est pas reconnue.&lt;br /&gt;
&lt;br /&gt;
==Les Opérations==&lt;br /&gt;
A noter que si les opérations les plus basiques peuvent être utilisées par n'importe quelle [[YOLOL Chip/fr|puce YOLOL]], certaines plus complexes en nécessite des plus avancées, voire de qualité professionelle.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Les opérateurs arythmétiques ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Opération || Valeurs numériques || Chaînes de caractères || Puce nécessaire&lt;br /&gt;
|-&lt;br /&gt;
| A + B || Addition || &amp;quot;B&amp;quot; est ajouté à la suite de &amp;quot;A&amp;quot; || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A - B || Soustraction || La dernière occurence de &amp;quot;B&amp;quot; dans &amp;quot;A&amp;quot; est supprimée || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A * B || Multiplication || Erreur d'exécution. Le reste de la ligne est passé || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A / B || Division || Erreur d'exécution. Le reste de la ligne est passé || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A ^ B || Exponentielle || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| A % B || Modulo || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| ABS A || Absolue || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| A! || Factorielle || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| SQRT A || Racine carrée || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| SIN A || Sinus (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|-&lt;br /&gt;
| COS A || Cosinus (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|-&lt;br /&gt;
| TAN A || Tangente (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|-&lt;br /&gt;
| ASIN A || Sinus inversé (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|-&lt;br /&gt;
| ACOS A || Cosinus inversé (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|-&lt;br /&gt;
| ATAN A || Tangente inversée (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Les opérateurs d'assignation===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation || Valeurs numériques || Chaînes de caractères || Puce nécessaire&lt;br /&gt;
|-&lt;br /&gt;
| A = B || Assignation || Assignation || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A += B || Addition-assignation (A=A+B) || Addition-assignation (A=A+B) || Basique&lt;br /&gt;
|-&lt;br /&gt;
| ++ A  || Pré-incrémentation (A=A+1) || Ajoute un espace à la suite de &amp;quot;A&amp;quot;. Evalué sur la valeur modifiée || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A ++ || Post-incrémentation (A=A+1) || Ajoute un espace à la suite de &amp;quot;A&amp;quot;. Evalué sur la valeur d'origine || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A -= B || Soustraction-assignation (A=A-B) || Soustraction-assignation (A=A-B) || Basique&lt;br /&gt;
|-&lt;br /&gt;
| -- A || Pré-décrémentation (A=A-1) || Retire le dernier caractère de la chaîne. Erreur d'éxecution si la chaîne est vide. Evalué sur la valeur modifiée || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A -- || Post-décrémentation (A=A-1) || Retire le dernier caractère de la chaîne. Erreur d'éxecution si la chaîne est vide. Evalué sur la valeur d'origine || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A *= B || Multiplication-assignation (A=A*B) || Erreur d'exécution. Le reste de la ligne est passé || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A /= B || Division-assignation (A=A/B) || Erreur d'exécution. Le reste de la ligne est passé || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A ^= B || Exponentielle-assignation (A=A^B) || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| A %= B || Modulo-assignation (A=A%B) || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Les opérateurs logiques ===&lt;br /&gt;
&lt;br /&gt;
Logical operators are checks that identify if the statement is true or false.&amp;lt;br&amp;gt;&lt;br /&gt;
All logical operations return either '''&amp;quot;0 for False&amp;quot;''' or '''&amp;quot;1 for True&amp;quot;'''. &lt;br /&gt;
The '''NOT''', '''AND''', and '''OR''' keywords consider 0 to be falsy and anything not 0 to be truthy.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation || Numeric operation || String operation || Chip availability&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;lt; B || A est plus petit que B || &amp;quot;A&amp;quot; est avant &amp;quot;B&amp;quot; dans l'ordre alphabétique || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;gt; B || A est plus grand que B || &amp;quot;A&amp;quot; est après &amp;quot;B&amp;quot; dans l'ordre alphabétique || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A == B || A est égal à B || &amp;quot;A&amp;quot; est égale à &amp;quot;B&amp;quot; || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;lt;= B || &amp;lt; ou == || &amp;lt; ou == || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;gt;= B || &amp;gt; ou == || &amp;gt; ou == || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A != B || A n'est pas égal à B || &amp;quot;A&amp;quot; n'est pas égale à &amp;quot;B&amp;quot; || Basique&lt;br /&gt;
|-&lt;br /&gt;
| NOT A || A est égal à 0 || &amp;quot;A&amp;quot; est 0 || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A AND B || A et B ne sont pas égaux à 0  || &amp;quot;A&amp;quot; et &amp;quot;B&amp;quot; ne sont pas 0 || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A OR B || A ou B n'est pas égal à 0 || &amp;quot;A&amp;quot; ou &amp;quot;B&amp;quot; n'est pas 0 || Basique&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Opérations sur des variables mixtes ===&lt;br /&gt;
&lt;br /&gt;
Mixing variable types in an operation handles the operation using all parameters as ''strings''.&lt;br /&gt;
&lt;br /&gt;
 previouslyNumber= &amp;quot;10&amp;quot; + 15&lt;br /&gt;
* The above script results in '''previouslyNumber''' containing the string value &amp;quot;1015&amp;quot;.&lt;br /&gt;
** Note that the involved parameters themselves don't change types, their values are just cast as strings for the purpose of the operation:&lt;br /&gt;
 &lt;br /&gt;
 purelyNumber = 15&lt;br /&gt;
 purelyString = &amp;quot;10&amp;quot; + purelyNumber&lt;br /&gt;
* When this script has executed, '''purelyString''' contains the string value of &amp;quot;1015&amp;quot;, while '''purelyNumber''' still contains the numeric value of 15.&lt;br /&gt;
&lt;br /&gt;
=== Ordre des opérations ===&lt;br /&gt;
Lorsqu'une instruction comprend plusieurs opérations, celle-ci sont réalisées en suivant l'ordre de précédence suivant, de haut en bas, de gauche à droite:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operateurs&lt;br /&gt;
|-&lt;br /&gt;
| ++, --&lt;br /&gt;
|-&lt;br /&gt;
| !&lt;br /&gt;
|-&lt;br /&gt;
| sqrt, %, abs, sin, cos, tan&lt;br /&gt;
|-&lt;br /&gt;
| - (valeur négative)&lt;br /&gt;
|-&lt;br /&gt;
| ^&lt;br /&gt;
|-&lt;br /&gt;
| *, /&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;, &amp;gt;, ==, !=, &amp;lt;=, &amp;gt;=&lt;br /&gt;
|-&lt;br /&gt;
| +, -&lt;br /&gt;
|-&lt;br /&gt;
| Not&lt;br /&gt;
|-&lt;br /&gt;
| Or&lt;br /&gt;
|-&lt;br /&gt;
| And&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Les Commandes==&lt;br /&gt;
&lt;br /&gt;
=== If-else conditional ===&lt;br /&gt;
&lt;br /&gt;
If-else statements are used to branch out the script into different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
They use the following syntax:&lt;br /&gt;
* '''if ''condition'' then ''statement'' else ''statement'' end'''&lt;br /&gt;
** Condition is a statement that results in a numeric value (where 0 is parsed as False, anything else as True), and statements are pieces of script that are run.&lt;br /&gt;
** All If-else conditional stations must have '''end''' syntax written after statement is complete.&lt;br /&gt;
** The statement has to be on one line. The if, then, else and end cannot be on different lines.&lt;br /&gt;
&lt;br /&gt;
If can be used to branch script execution into two possible outcomes temporarily based on variable value(s).&amp;lt;br&amp;gt;&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable != 2 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 3 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; endResult = 4 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* This script sets the value of '''endResult''' to 3 if '''variable''' does not have the value of 2.&lt;br /&gt;
* If '''variable''''s value is 2, '''endResult''' is set to the value of 4.&lt;br /&gt;
&lt;br /&gt;
Note that the else statement -part can be left out if not needed. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable != 2 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 3 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
*This script only sets the value of 3 to '''endResult''' if '''variable''' does not have a value of 2, and doesn't do anything else.&lt;br /&gt;
&lt;br /&gt;
==== Nesting if statements ====&lt;br /&gt;
&lt;br /&gt;
It is possible to place if-conditionals inside the true/false statement blocks to achieve further branching of execution.&amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 0 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 1 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 1 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 2 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &lt;br /&gt;
* This script sets '''endResult''' to 1 if '''variable''' equals 0.&lt;br /&gt;
* If '''variable''' doesn't equal 0, but it equals 1, '''endResult''' is set to 2.&lt;br /&gt;
&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 0 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; endResult == 1 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 2 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; endResult = 1 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
* This script sets '''endResult''' to 2 if '''variable''' has a value of 0, and '''endResult''' equals to 1.&lt;br /&gt;
* Otherwise it sets '''endResult''' to 1.&lt;br /&gt;
&lt;br /&gt;
=== Goto ===&lt;br /&gt;
&lt;br /&gt;
Goto syntax is used when the normal script reading order from 1-&amp;gt;20 is not desired, or needs to be altered.&lt;br /&gt;
&lt;br /&gt;
Goto is used with the following syntax:&lt;br /&gt;
*'''goto lineNumber'''&lt;br /&gt;
** lineNumber is the line which this command will take the script execution.&amp;lt;br&amp;gt;&lt;br /&gt;
** Any remaining script that is on the same line after the goto-command will not be executed.&lt;br /&gt;
*** using if statements before goto ignores goto syntax, assuming the if-statement is false&lt;br /&gt;
** Multiple goto commands can be added on the same line using conditionals, as '''False''' goto commands are skipped.&lt;br /&gt;
** Numeric values outside the [1,20] range are clamped to this range.&lt;br /&gt;
** Non-integer values are floored.&lt;br /&gt;
** String values will result in a Runtime Error.&lt;br /&gt;
&lt;br /&gt;
 if variable == 5 then '''goto 4''' end '''goto 6'''&lt;br /&gt;
&lt;br /&gt;
The script above will go to line number 4, if '''variable''' has a value of 5.&amp;lt;br&amp;gt;&lt;br /&gt;
Otherwise it will go to line number 6. Numerical operations can also be done &amp;quot;inside&amp;quot; the goto, e.g. &lt;br /&gt;
&lt;br /&gt;
  goto 4+1&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
Comments are useful when writing code that is used by a lot of programmers.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that comments also use up space from the pre-determined 70 character line limit and are not excluded from it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commenting is used with the following syntax:&lt;br /&gt;
*// '''text'''&lt;br /&gt;
** Text can be any single-line set of characters.&lt;br /&gt;
&lt;br /&gt;
 '''//''' This is a comment. It will explain how other lines of script work.&lt;br /&gt;
* An example of a possible comment syntax&lt;br /&gt;
&lt;br /&gt;
== Les erreurs ==&lt;br /&gt;
&lt;br /&gt;
Il y a deux types d'erreurs qui peuvent survenir pendant l'éxecution d'une séquence YOLOL:&lt;br /&gt;
# '''Les erreurs de syntaxe (&amp;quot;syntax errors&amp;quot;)''': elles résultent d'un script invalide et empêchent l'interprétation de la ligne toute entière, qui est donc ignorée pour passer directement à la suivante.&lt;br /&gt;
# '''Les erreurs d'exécution (&amp;quot;runtime errors&amp;quot;)''': elles ne sont détectées que pendant l'éxecution du script et provoquent l'arrêt de l'interprétation de la ligne en cours pour passer à la suivante. Elles n'impactent donc pas les instructions antérieures.&lt;br /&gt;
&lt;br /&gt;
== Bugs connus/Comportements indésirables==&lt;br /&gt;
Voici une liste des problèmes relevés avec l'utilisation du langage YOLOL:&amp;lt;br&amp;gt;&lt;br /&gt;
* Les noms de variables contenant les mots-clé &amp;quot;if&amp;quot;, &amp;quot;else&amp;quot; et &amp;quot;end&amp;quot; sont mal interprétés par le langage et provoquent une erreur de syntaxe. Les noms tels que '''life''' ou '''endurance''' sont donc à éviter.&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
==YOLOL Tips &amp;amp; Tricks==&lt;br /&gt;
* [[Common YOLOL|Common YOLOL scripts]]&lt;br /&gt;
* [[YOLOL Tricks]]&lt;br /&gt;
&lt;br /&gt;
== Pages associées ==&lt;br /&gt;
* [[Data networks/fr|Réseaux de données]]&lt;br /&gt;
* [[Devices and machines/fr|Appareils et machines]]&lt;br /&gt;
* [[Device fields/fr|Champs de périphérique ]]&lt;br /&gt;
* [[Universal tool/fr|Outil universel]]&lt;br /&gt;
* [[YOLOL Chip/fr|Puce YOLOL]]&lt;br /&gt;
* [[Chip socket/fr|Socle à puce]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Networks|YOLOL/fr]]&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=YOLOL/fr&amp;diff=30516</id>
		<title>YOLOL/fr</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=YOLOL/fr&amp;diff=30516"/>
		<updated>2022-04-08T16:21:43Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: /* Ordre des opérations */  traduction et simplification&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Otherlang2&lt;br /&gt;
|en=YOLOL&lt;br /&gt;
|de=YOLOL:de&lt;br /&gt;
|fr=YOLOL/fr&lt;br /&gt;
|ru=YOLOL:ru&lt;br /&gt;
|ua=YOLOL:ua&lt;br /&gt;
|jp=YOLOL:jp&lt;br /&gt;
|zh-cn=YOLOL语言&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
{{#evt:service=youtube|id=https://www.youtube.com/watch?v=7lXK6_bktUk|alignment=center}}&lt;br /&gt;
&lt;br /&gt;
le YOLOL est un langage de programmation spécifique à Starbase qui est utilisé en parallèle du l'[[Universal tool/fr|outil universel]] pour contrôler et gérer les [[Devices_and_machines/fr|appareils]].&amp;lt;br&amp;gt;&lt;br /&gt;
Le code est écrit ligne par ligne sur une [[YOLOL Chip/fr|puce YOLOL]] qui est ensuite insérée dans un [[Chip socket/fr|socle à puce]] connecté au [[Data networks/fr|réseau de données]] du vaisseau afin d'accéder aux [[Device fields/fr|champs de périphérique]].&amp;lt;br&amp;gt;&lt;br /&gt;
Le langage YOLOL est compatible avec presque tous les équipements et engins de l'univers connu.&lt;br /&gt;
&lt;br /&gt;
===Comment ça marche?===&lt;br /&gt;
Le YOLOL fonctionne par cycle: Les lignes de code sont exécutées les unes après les autres du haut vers le bas, puis la séquence reprend une fois la dernière ligne passée. Chaque ligne est lue dans un intervalle de temps constant de 0.2 secondes, quelque soit sa longueur et le nombre d'instructions qui y sont contenues.&lt;br /&gt;
&lt;br /&gt;
Pour faire simple:&lt;br /&gt;
# Le code se lance en commençant par la ligne 1&lt;br /&gt;
# La ligne en cours est exécutée, puis le programme passe à la suivante après un intervalle de temps de 0.2 secondes&lt;br /&gt;
# L'étape 2 est répétée pour les lignes 2, 3, 4... jusqu'à la dernière&lt;br /&gt;
# La puce se réinitialise à l'étape 1 une fois le processus terminé&lt;br /&gt;
&lt;br /&gt;
===Limites===&lt;br /&gt;
* Chaque puce YOLOL contient 20 lignes de code. Ni plus, ni moins. L'exécution d'un cycle complet prend donc 20 * 0.2 = 4 secondes si il est mené à son terme.&lt;br /&gt;
* Chaque lignes peut contenir un maximum de 70 caractères (symboles et espaces inclus).&lt;br /&gt;
&lt;br /&gt;
===Remarques===&lt;br /&gt;
* Les puces YOLOL possèdent une fonction de mise en pause, qui fige l'exécution du code à la ligne en cours.&lt;br /&gt;
* Les lignes blanches nécessitent tout de même l'intervalle de temps des 0.2 secondes pour être passées, provoquant de courts délais d'exécution (il en va de même pour les lignes ne contenant que des commentaires).&lt;br /&gt;
* Une seule ligne de code peut contenir plusieurs instructions à la fois, autant que peut le supporter la limite maximale de caractères.&lt;br /&gt;
* Certaines instructions permettent de passer à une ligne spécifique, ce qui rend le code plus modulable.&lt;br /&gt;
&lt;br /&gt;
== Les Variables ==&lt;br /&gt;
Les variables permettent d'associer un '''nom''' à une '''valeur''' pour faciliter l'acquisition ultérieure de cette dernière. Dès lors, à chaque fois que le '''nom''' de la variable sera appelé, c'est sa '''valeur''' qui sera demandée et/ou modifiée suivant l'instruction utilisée.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 ButtonState = 1&lt;br /&gt;
* Dans ce script, on attribue à la variable nommée '''ButtonState''' la valeur numérique '''1'''.&lt;br /&gt;
 if ButtonState &amp;gt;= 1 then DoorState = 1 end&lt;br /&gt;
* Maintenant, on vérifie si la valeur de la variable '''ButtonState''' est supérieure ou égale à '''1''', auquel cas la variable '''DoorState''' se voit elle aussi associée à '''1'''.&lt;br /&gt;
&lt;br /&gt;
===Les Noms de Variables===&lt;br /&gt;
====Sensibilité à la casse====&lt;br /&gt;
Le langage YOLOL est dit &amp;quot;insensible à la casse&amp;quot;, ce qui signifie que les noms des variables peuvent contenir des majuscules et des minuscules sans différencier les deux. Ainsi '''ButtonState''' et '''buttonstate''' désignent indistinctement la même variable. C'est une fonctionnalité très pratique pour rendre le code plus lisible.&lt;br /&gt;
&lt;br /&gt;
====Les variables internes et externes====&lt;br /&gt;
Il existe deux genre de variables: les '''variables internes''' qui ne peuvent être utilisées qu'au sein de la puce YOLOL où elles ont été initiées et les '''variables externes''' qui font appel aux [[device fields/fr|champs de périphérique]] des appareils branchés sur le même [[data networks/fr|réseau de données]] pour en demander ou modifier les valeurs.&amp;lt;br&amp;gt;&lt;br /&gt;
Pour les différencier, les variables externes sont précédées d'un double-point (''':''').&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 if :ButtonState &amp;gt;= 1 then :DoorState = 1 end&lt;br /&gt;
* Comme vu précédemment, ce script évalue la valeur de '''ButtonState''' et, si elle est supérieure ou égale à '''1''', associe '''DoorState''' à '''1'''. Les deux variables seront cependant ici appelées sur l'ensemble des équipements présents sur le réseau de données, par exemple pour ouvrir une porte si un bouton est appuyé.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Remarques====&lt;br /&gt;
* Les champs ayant le même nom au sein du réseau de données sont liées et ont presque toujours la même valeur. Ainsi, une variable externe qui en modifie la valeur le fera sur tout les appareils associés.&lt;br /&gt;
* Il n'est actuellement pas possible d'appeler une variable initiée sur un puce YOLOL depuis une autre puce YOLOL.&lt;br /&gt;
&lt;br /&gt;
===Les Valeurs de Variables===&lt;br /&gt;
====Typage====&lt;br /&gt;
Le langage YOLOL supporte deux types de valeurs pour les variables: Les '''valeurs numériques''' et les '''chaînes de caractères''' (ou &amp;quot;string&amp;quot;). Cette différence est importante car en fonction du type de variable, le résultat d'une même instruction sera différente.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 Addition = 3 + 5&lt;br /&gt;
* Cette instruction conduit à additionner les deux valeurs numériques '''3''' et '''5'''. Le résultat sera donc '''8'''.&lt;br /&gt;
 Addition = &amp;quot;3&amp;quot; + &amp;quot;5&amp;quot;&lt;br /&gt;
* Cette instruction conduit à associer les chaînes de caractères '''&amp;quot;3&amp;quot;''' et '''&amp;quot;5&amp;quot;'''. Le résultat sera donc '''&amp;quot;35&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
Les variables sont dites à &amp;quot;faible typage&amp;quot;, c'est-à-dire qu'elles ne sont pas restreintes à un seul type. Elles se convertissent systématiquement aux valeurs qui leur sont assignées. Ainsi, une variable associée à une valeur numérique peut la remplacer par une chaîne de caractères et inversement sans provoquer d'erreur dans le code.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 AutoPilot = 128.643&lt;br /&gt;
* cette première instruction associe la variable '''AutoPilot''' à la valeur numérique '''128.643'''.&lt;br /&gt;
 AutoPilot= &amp;quot;Erreur détectée&amp;quot;&lt;br /&gt;
* La variable '''AutoPilot''' se convertit en s'associant à la chaîne de caractères '''&amp;quot;Erreur détectée&amp;quot;''' et la valeur numérique '''128.643''' est effacée.&lt;br /&gt;
&lt;br /&gt;
====Les valeurs numériques====&lt;br /&gt;
Les valeurs numérique dans le langage YOLOL sont des décimales à point fixe. La précision est de un millième: Jusqu'à trois nombre sous la décimale sont acceptés. Fournir une valeur plus précise fonctionne, mais n'affecte pas le résultat final.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 Pi = 3,14159265&lt;br /&gt;
* Le script ci-dessus tente d'associer la variable '''Pi''' à la valeur numérique '''3,14159265'''. Le résultat final sera cependant '''Pi = 3.141''', coupant la précision à trois nombre sous la décimale.&lt;br /&gt;
&lt;br /&gt;
La taille maximale d'une valeur numérique est de 64-bit. De ce fait, la portée maximale (même après opération) est de [-9223372036854775.808, 9223372036854775.807]. Toutes valeurs supérieures ou inférieures seront ramenées aux limites de la portée.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 StarTrek = 9999999999999999.999&lt;br /&gt;
* Ici, on tente d'associer la variable '''StarTrek''' à la valeur numérique '''9999999999999999.999'''. Celle-ci est cependant supérieure à la portée maximale et le résultat final sera '''StarTrek = 9223372036854775.807'''.&lt;br /&gt;
&lt;br /&gt;
====Les chaînes de caractères====&lt;br /&gt;
Pour signaler une chaîne de caractères au langage YOLOL, celle-ci doit être entourée de double-guillemets ('''&amp;quot; &amp;quot;''').&lt;br /&gt;
&lt;br /&gt;
 BadRobots= &amp;quot;Saltberia&amp;quot; &lt;br /&gt;
* Ce script associe la variable '''BadRobot''' à la chaîne de caractères '''&amp;quot;Saltberia&amp;quot;'''.&lt;br /&gt;
Comme pour les valeurs numériques, la taille maximale d'une chaîne de caractères est de 64-bit.&lt;br /&gt;
&lt;br /&gt;
====Remarques====&lt;br /&gt;
* Chaque variable ne peut être que d'un type à la fois, bien que celui-ci puisse être converti au besoin.&lt;br /&gt;
* Les valeurs &amp;quot;False&amp;quot; et &amp;quot;True&amp;quot; sont de type numérique: Elles correspondent respectivement à &amp;quot;0&amp;quot; et &amp;quot;non-0&amp;quot;.&lt;br /&gt;
* Une variable non définie préalablement a par défaut la valeur numérique &amp;quot;0&amp;quot;. L'absence de valeur (&amp;quot;null&amp;quot;) n'est pas reconnue.&lt;br /&gt;
&lt;br /&gt;
==Les Opérations==&lt;br /&gt;
A noter que si les opérations les plus basiques peuvent être utilisées par n'importe quelle [[YOLOL Chip/fr|puce YOLOL]], certaines plus complexes en nécessite des plus avancées, voire de qualité professionelle.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Les opérateurs arythmétiques ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Opération || Valeurs numériques || Chaînes de caractères || Puce nécessaire&lt;br /&gt;
|-&lt;br /&gt;
| A + B || Addition || &amp;quot;B&amp;quot; est ajouté à la suite de &amp;quot;A&amp;quot; || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A - B || Soustraction || La dernière occurence de &amp;quot;B&amp;quot; dans &amp;quot;A&amp;quot; est supprimée || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A * B || Multiplication || Erreur d'exécution. Le reste de la ligne est passé || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A / B || Division || Erreur d'exécution. Le reste de la ligne est passé || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A ^ B || Exponentielle || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| A % B || Modulo || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| ABS A || Absolue || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| A! || Factorielle || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| SQRT A || Racine carrée || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| SIN A || Sinus (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|-&lt;br /&gt;
| COS A || Cosinus (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|-&lt;br /&gt;
| TAN A || Tangente (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|-&lt;br /&gt;
| ASIN A || Sinus inversé (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|-&lt;br /&gt;
| ACOS A || Cosinus inversé (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|-&lt;br /&gt;
| ATAN A || Tangente inversée (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Les opérateurs d'assignation===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation || Valeurs numériques || Chaînes de caractères || Puce nécessaire&lt;br /&gt;
|-&lt;br /&gt;
| A = B || Assignation || Assignation || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A += B || Addition-assignation (A=A+B) || Addition-assignation (A=A+B) || Basique&lt;br /&gt;
|-&lt;br /&gt;
| ++ A  || Pré-incrémentation (A=A+1) || Ajoute un espace à la suite de &amp;quot;A&amp;quot;. Evalué sur la valeur modifiée || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A ++ || Post-incrémentation (A=A+1) || Ajoute un espace à la suite de &amp;quot;A&amp;quot;. Evalué sur la valeur d'origine || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A -= B || Soustraction-assignation (A=A-B) || Soustraction-assignation (A=A-B) || Basique&lt;br /&gt;
|-&lt;br /&gt;
| -- A || Pré-décrémentation (A=A-1) || Retire le dernier caractère de la chaîne. Erreur d'éxecution si la chaîne est vide. Evalué sur la valeur modifiée || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A -- || Post-décrémentation (A=A-1) || Retire le dernier caractère de la chaîne. Erreur d'éxecution si la chaîne est vide. Evalué sur la valeur d'origine || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A *= B || Multiplication-assignation (A=A*B) || Erreur d'exécution. Le reste de la ligne est passé || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A /= B || Division-assignation (A=A/B) || Erreur d'exécution. Le reste de la ligne est passé || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A ^= B || Exponentielle-assignation (A=A^B) || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| A %= B || Modulo-assignation (A=A%B) || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Les opérateurs logiques ===&lt;br /&gt;
&lt;br /&gt;
Logical operators are checks that identify if the statement is true or false.&amp;lt;br&amp;gt;&lt;br /&gt;
All logical operations return either '''&amp;quot;0 for False&amp;quot;''' or '''&amp;quot;1 for True&amp;quot;'''. &lt;br /&gt;
The '''NOT''', '''AND''', and '''OR''' keywords consider 0 to be falsy and anything not 0 to be truthy.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation || Numeric operation || String operation || Chip availability&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;lt; B || A est plus petit que B || &amp;quot;A&amp;quot; est avant &amp;quot;B&amp;quot; dans l'ordre alphabétique || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;gt; B || A est plus grand que B || &amp;quot;A&amp;quot; est après &amp;quot;B&amp;quot; dans l'ordre alphabétique || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A == B || A est égal à B || &amp;quot;A&amp;quot; est égale à &amp;quot;B&amp;quot; || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;lt;= B || &amp;lt; ou == || &amp;lt; ou == || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;gt;= B || &amp;gt; ou == || &amp;gt; ou == || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A != B || A n'est pas égal à B || &amp;quot;A&amp;quot; n'est pas égale à &amp;quot;B&amp;quot; || Basique&lt;br /&gt;
|-&lt;br /&gt;
| NOT A || A est égal à 0 || &amp;quot;A&amp;quot; est 0 || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A AND B || A et B ne sont pas égaux à 0  || &amp;quot;A&amp;quot; et &amp;quot;B&amp;quot; ne sont pas 0 || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A OR B || A ou B n'est pas égal à 0 || &amp;quot;A&amp;quot; ou &amp;quot;B&amp;quot; n'est pas 0 || Basique&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Opérations sur des variables mixtes ===&lt;br /&gt;
&lt;br /&gt;
Mixing variable types in an operation handles the operation using all parameters as ''strings''.&lt;br /&gt;
&lt;br /&gt;
 previouslyNumber= &amp;quot;10&amp;quot; + 15&lt;br /&gt;
* The above script results in '''previouslyNumber''' containing the string value &amp;quot;1015&amp;quot;.&lt;br /&gt;
** Note that the involved parameters themselves don't change types, their values are just cast as strings for the purpose of the operation:&lt;br /&gt;
 &lt;br /&gt;
 purelyNumber = 15&lt;br /&gt;
 purelyString = &amp;quot;10&amp;quot; + purelyNumber&lt;br /&gt;
* When this script has executed, '''purelyString''' contains the string value of &amp;quot;1015&amp;quot;, while '''purelyNumber''' still contains the numeric value of 15.&lt;br /&gt;
&lt;br /&gt;
=== Ordre des opérations ===&lt;br /&gt;
Lorsqu'une instruction comprend plusieurs opérations, celle-ci sont réalisées en suivant l'ordre de précédence suivant, de haut en bas, de gauche à droite:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operateurs&lt;br /&gt;
|-&lt;br /&gt;
| ++, --&lt;br /&gt;
|-&lt;br /&gt;
| !&lt;br /&gt;
|-&lt;br /&gt;
| sqrt, %, abs, sin, cos, tan&lt;br /&gt;
|-&lt;br /&gt;
| - (valeur négative)&lt;br /&gt;
|-&lt;br /&gt;
| ^&lt;br /&gt;
|-&lt;br /&gt;
| *, /&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;, &amp;gt;, ==, !=, &amp;lt;=, &amp;gt;=&lt;br /&gt;
|-&lt;br /&gt;
| +, -&lt;br /&gt;
|-&lt;br /&gt;
| Not&lt;br /&gt;
|-&lt;br /&gt;
| Or&lt;br /&gt;
|-&lt;br /&gt;
| And&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Les Commandes==&lt;br /&gt;
&lt;br /&gt;
=== If-else conditional ===&lt;br /&gt;
&lt;br /&gt;
If-else statements are used to branch out the script into different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
They use the following syntax:&lt;br /&gt;
* '''if ''condition'' then ''statement'' else ''statement'' end'''&lt;br /&gt;
** Condition is a statement that results in a numeric value (where 0 is parsed as False, anything else as True), and statements are pieces of script that are run.&lt;br /&gt;
** All If-else conditional stations must have '''end''' syntax written after statement is complete.&lt;br /&gt;
** The statement has to be on one line. The if, then, else and end cannot be on different lines.&lt;br /&gt;
&lt;br /&gt;
If can be used to branch script execution into two possible outcomes temporarily based on variable value(s).&amp;lt;br&amp;gt;&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable != 2 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 3 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; endResult = 4 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* This script sets the value of '''endResult''' to 3 if '''variable''' does not have the value of 2.&lt;br /&gt;
* If '''variable''''s value is 2, '''endResult''' is set to the value of 4.&lt;br /&gt;
&lt;br /&gt;
Note that the else statement -part can be left out if not needed. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable != 2 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 3 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
*This script only sets the value of 3 to '''endResult''' if '''variable''' does not have a value of 2, and doesn't do anything else.&lt;br /&gt;
&lt;br /&gt;
==== Nesting if statements ====&lt;br /&gt;
&lt;br /&gt;
It is possible to place if-conditionals inside the true/false statement blocks to achieve further branching of execution.&amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 0 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 1 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 1 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 2 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &lt;br /&gt;
* This script sets '''endResult''' to 1 if '''variable''' equals 0.&lt;br /&gt;
* If '''variable''' doesn't equal 0, but it equals 1, '''endResult''' is set to 2.&lt;br /&gt;
&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 0 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; endResult == 1 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 2 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; endResult = 1 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
* This script sets '''endResult''' to 2 if '''variable''' has a value of 0, and '''endResult''' equals to 1.&lt;br /&gt;
* Otherwise it sets '''endResult''' to 1.&lt;br /&gt;
&lt;br /&gt;
=== Goto ===&lt;br /&gt;
&lt;br /&gt;
Goto syntax is used when the normal script reading order from 1-&amp;gt;20 is not desired, or needs to be altered.&lt;br /&gt;
&lt;br /&gt;
Goto is used with the following syntax:&lt;br /&gt;
*'''goto lineNumber'''&lt;br /&gt;
** lineNumber is the line which this command will take the script execution.&amp;lt;br&amp;gt;&lt;br /&gt;
** Any remaining script that is on the same line after the goto-command will not be executed.&lt;br /&gt;
*** using if statements before goto ignores goto syntax, assuming the if-statement is false&lt;br /&gt;
** Multiple goto commands can be added on the same line using conditionals, as '''False''' goto commands are skipped.&lt;br /&gt;
** Numeric values outside the [1,20] range are clamped to this range.&lt;br /&gt;
** Non-integer values are floored.&lt;br /&gt;
** String values will result in a Runtime Error.&lt;br /&gt;
&lt;br /&gt;
 if variable == 5 then '''goto 4''' end '''goto 6'''&lt;br /&gt;
&lt;br /&gt;
The script above will go to line number 4, if '''variable''' has a value of 5.&amp;lt;br&amp;gt;&lt;br /&gt;
Otherwise it will go to line number 6. Numerical operations can also be done &amp;quot;inside&amp;quot; the goto, e.g. &lt;br /&gt;
&lt;br /&gt;
  goto 4+1&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
Comments are useful when writing code that is used by a lot of programmers.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that comments also use up space from the pre-determined 70 character line limit and are not excluded from it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commenting is used with the following syntax:&lt;br /&gt;
*// '''text'''&lt;br /&gt;
** Text can be any single-line set of characters.&lt;br /&gt;
&lt;br /&gt;
 '''//''' This is a comment. It will explain how other lines of script work.&lt;br /&gt;
* An example of a possible comment syntax&lt;br /&gt;
&lt;br /&gt;
== Les erreurs ==&lt;br /&gt;
&lt;br /&gt;
Il y a deux types d'erreurs qui peuvent survenir pendant l'éxecution d'une séquence YOLOL:&lt;br /&gt;
# '''Les erreurs de syntaxe (&amp;quot;syntax errors&amp;quot;)''': elles résultent d'un script invalide et empêchent l'interprétation de la ligne toute entière, qui est donc ignorée pour passer directement à la suivante.&lt;br /&gt;
# '''Les erreurs d'exécution (&amp;quot;runtime errors&amp;quot;)''': elles ne sont détectées que pendant l'éxecution du script et provoquent l'arrêt de l'interprétation de la ligne en cours pour passer à la suivante. Elles n'impactent donc pas les instructions antérieures.&lt;br /&gt;
&lt;br /&gt;
== Bugs connus/Comportements indésirables==&lt;br /&gt;
Voici une liste des problèmes relevés avec l'utilisation du langage YOLOL:&amp;lt;br&amp;gt;&lt;br /&gt;
* Les noms de variables contenant les mots-clé &amp;quot;if&amp;quot;, &amp;quot;else&amp;quot; et &amp;quot;end&amp;quot; sont mal interprétés par le langage et provoquent une erreur de syntaxe. Les noms tels que '''life''' ou '''endurance''' sont donc à éviter.&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
==YOLOL Tips &amp;amp; Tricks==&lt;br /&gt;
* [[Common YOLOL|Common YOLOL scripts]]&lt;br /&gt;
* [[YOLOL Tricks]]&lt;br /&gt;
&lt;br /&gt;
== Pages associées ==&lt;br /&gt;
* [[Data networks/fr|Réseaux de données]]&lt;br /&gt;
* [[Devices and machines/fr|Appareils et machines]]&lt;br /&gt;
* [[Device fields/fr|Champs de périphérique ]]&lt;br /&gt;
* [[Universal tool/fr|Outil universel]]&lt;br /&gt;
* [[YOLOL Chip/fr|Puce YOLOL]]&lt;br /&gt;
* [[Chip socket/fr|Socle à puce]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Networks|YOLOL/fr]]&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=Device_fields/fr&amp;diff=30515</id>
		<title>Device fields/fr</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=Device_fields/fr&amp;diff=30515"/>
		<updated>2022-04-08T15:59:39Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: Minor errata&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Otherlang2&lt;br /&gt;
|en=Device_fields&lt;br /&gt;
|de=Device_fields:de&lt;br /&gt;
|fr=Device_fields/fr&lt;br /&gt;
|zh-cn=设备参数&lt;br /&gt;
}}&lt;br /&gt;
Les champs de périphérique sont des variables qui définissent le fonctionnement des [[Devices_and_machines/fr|appareils]] dont ils dépendent. Ils peuvent être lus ou modifiés en utilisant l'[[Universal tool/fr|outil universel]] ainsi que via une [[YOLOL Chip/fr|puce YOLOL]] ou tout autre appareil connectés au même [[Data_networks/fr|réseau de données]]. Les champs de périphérique sont essentiels à l'utilisation du [[YOLOL/fr|langage YOLOL]].&lt;br /&gt;
&lt;br /&gt;
= Liste des champs de périphérique =&lt;br /&gt;
== Appareils montés sur la base ==&lt;br /&gt;
&lt;br /&gt;
===[[Battery/fr|Batterie]]===&lt;br /&gt;
{{#lsth:Battery/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Cargo beam/fr|Poutre de chargement]]===&lt;br /&gt;
{{#lsth:Cargo beam/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Fixed mount/fr|Fixation fixe]]===&lt;br /&gt;
{{#lsth:Fixed mount/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Generator/fr|Générateur]]===&lt;br /&gt;
{{#lsth:Generator/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Hinges/fr|Charnières]]===&lt;br /&gt;
{{#lsth:Hinges/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Mounted weapons/fr|Armes montées]]===&lt;br /&gt;
{{#lsth:Mounted weapons/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Radio transmitters/fr|Emetteurs radio]]===&lt;br /&gt;
{{#lsth:Radio transmitters/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Range finder/fr|Télémètre]]===&lt;br /&gt;
{{#lsth:Range finder/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Robot arms/fr|Bras de robot]]===&lt;br /&gt;
{{#lsth:Robot arms/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Thrusters/fr|Propulseurs]]===&lt;br /&gt;
{{#lsth:Thrusters/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Turntable/fr|Plaque tournante]]===&lt;br /&gt;
{{#lsth:Turntable/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
== Interaction ==&lt;br /&gt;
&lt;br /&gt;
=== [[Buttons/fr|Boutons]] ===&lt;br /&gt;
{{#lsth:Buttons/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Lamps/fr|Les lampes]]===&lt;br /&gt;
{{#lsth:Lamps/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Levers/fr|Leviers]]===&lt;br /&gt;
{{#lsth:Levers/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Propellant/fr|Propergol]]===&lt;br /&gt;
{{#lsth:Propellant/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
== Dispositifs ferroviaires ==&lt;br /&gt;
&lt;br /&gt;
===[[Rail mover/fr|Déménageur]]===&lt;br /&gt;
{{#lsth:Rail mover/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Rail relay/fr|Relais]]===&lt;br /&gt;
{{#lsth:Rail relay/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Rail sensor strip/fr|Bande de capteur]]===&lt;br /&gt;
{{#lsth:Rail sensor strip/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===[[Rail trigger/fr|Déclencheur]]===&lt;br /&gt;
{{#lsth:Rail trigger/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
== Screens ==&lt;br /&gt;
&lt;br /&gt;
=== [[Information screen/fr|Écran d'information]] ===&lt;br /&gt;
{{#lsth:Information screen/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Modular displays/fr|Afficheurs modulaires]]===&lt;br /&gt;
{{#lsth:Modular displays/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
== Périphériques utilitaires ==&lt;br /&gt;
&lt;br /&gt;
===[[Cargo lock frame/fr|Cadre de verrouillage de la cargaison]]===&lt;br /&gt;
{{#lsth:Cargo lock frame/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Flight control unit/fr|Unité de contrôle de vol]]===&lt;br /&gt;
{{#lsth:Flight control unit/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Main flight computer/fr|Ordinateur de vol principal]]===&lt;br /&gt;
{{#lsth:Main flight computer/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Mining laser (Assembly)/fr|Laser minier]]===&lt;br /&gt;
{{#lsth:Mining laser/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Network relay/fr|Relais réseau]]===&lt;br /&gt;
{{#lsth:Network relay/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Tractor beam/fr|Rayon tracteur]]===&lt;br /&gt;
{{#lsth:Tractor beam/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
== Appareils YOLOL ==&lt;br /&gt;
&lt;br /&gt;
===[[YOLOL Chip/fr|Puce YOLOL]]===&lt;br /&gt;
{{#lsth:YOLOL Chip/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Chip socket/fr|Prise de puce]]===&lt;br /&gt;
{{#lsth:Chip socket/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Memory chip/fr|Puce mémoire]]===&lt;br /&gt;
{{#lsth:Memory chip/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Modular device rack/fr|Rack modulaire pour appareils]]===&lt;br /&gt;
{{#lsth:Modular device rack/fr|Champs de l'appareil}}&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=YOLOL/fr&amp;diff=30514</id>
		<title>YOLOL/fr</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=YOLOL/fr&amp;diff=30514"/>
		<updated>2022-04-08T15:58:29Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: :fr -&amp;gt; /fr&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Otherlang2&lt;br /&gt;
|en=YOLOL&lt;br /&gt;
|de=YOLOL:de&lt;br /&gt;
|fr=YOLOL/fr&lt;br /&gt;
|ru=YOLOL:ru&lt;br /&gt;
|ua=YOLOL:ua&lt;br /&gt;
|jp=YOLOL:jp&lt;br /&gt;
|zh-cn=YOLOL语言&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
{{#evt:service=youtube|id=https://www.youtube.com/watch?v=7lXK6_bktUk|alignment=center}}&lt;br /&gt;
&lt;br /&gt;
le YOLOL est un langage de programmation spécifique à Starbase qui est utilisé en parallèle du l'[[Universal tool/fr|outil universel]] pour contrôler et gérer les [[Devices_and_machines/fr|appareils]].&amp;lt;br&amp;gt;&lt;br /&gt;
Le code est écrit ligne par ligne sur une [[YOLOL Chip/fr|puce YOLOL]] qui est ensuite insérée dans un [[Chip socket/fr|socle à puce]] connecté au [[Data networks/fr|réseau de données]] du vaisseau afin d'accéder aux [[Device fields/fr|champs de périphérique]].&amp;lt;br&amp;gt;&lt;br /&gt;
Le langage YOLOL est compatible avec presque tous les équipements et engins de l'univers connu.&lt;br /&gt;
&lt;br /&gt;
===Comment ça marche?===&lt;br /&gt;
Le YOLOL fonctionne par cycle: Les lignes de code sont exécutées les unes après les autres du haut vers le bas, puis la séquence reprend une fois la dernière ligne passée. Chaque ligne est lue dans un intervalle de temps constant de 0.2 secondes, quelque soit sa longueur et le nombre d'instructions qui y sont contenues.&lt;br /&gt;
&lt;br /&gt;
Pour faire simple:&lt;br /&gt;
# Le code se lance en commençant par la ligne 1&lt;br /&gt;
# La ligne en cours est exécutée, puis le programme passe à la suivante après un intervalle de temps de 0.2 secondes&lt;br /&gt;
# L'étape 2 est répétée pour les lignes 2, 3, 4... jusqu'à la dernière&lt;br /&gt;
# La puce se réinitialise à l'étape 1 une fois le processus terminé&lt;br /&gt;
&lt;br /&gt;
===Limites===&lt;br /&gt;
* Chaque puce YOLOL contient 20 lignes de code. Ni plus, ni moins. L'exécution d'un cycle complet prend donc 20 * 0.2 = 4 secondes si il est mené à son terme.&lt;br /&gt;
* Chaque lignes peut contenir un maximum de 70 caractères (symboles et espaces inclus).&lt;br /&gt;
&lt;br /&gt;
===Remarques===&lt;br /&gt;
* Les puces YOLOL possèdent une fonction de mise en pause, qui fige l'exécution du code à la ligne en cours.&lt;br /&gt;
* Les lignes blanches nécessitent tout de même l'intervalle de temps des 0.2 secondes pour être passées, provoquant de courts délais d'exécution (il en va de même pour les lignes ne contenant que des commentaires).&lt;br /&gt;
* Une seule ligne de code peut contenir plusieurs instructions à la fois, autant que peut le supporter la limite maximale de caractères.&lt;br /&gt;
* Certaines instructions permettent de passer à une ligne spécifique, ce qui rend le code plus modulable.&lt;br /&gt;
&lt;br /&gt;
== Les Variables ==&lt;br /&gt;
Les variables permettent d'associer un '''nom''' à une '''valeur''' pour faciliter l'acquisition ultérieure de cette dernière. Dès lors, à chaque fois que le '''nom''' de la variable sera appelé, c'est sa '''valeur''' qui sera demandée et/ou modifiée suivant l'instruction utilisée.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 ButtonState = 1&lt;br /&gt;
* Dans ce script, on attribue à la variable nommée '''ButtonState''' la valeur numérique '''1'''.&lt;br /&gt;
 if ButtonState &amp;gt;= 1 then DoorState = 1 end&lt;br /&gt;
* Maintenant, on vérifie si la valeur de la variable '''ButtonState''' est supérieure ou égale à '''1''', auquel cas la variable '''DoorState''' se voit elle aussi associée à '''1'''.&lt;br /&gt;
&lt;br /&gt;
===Les Noms de Variables===&lt;br /&gt;
====Sensibilité à la casse====&lt;br /&gt;
Le langage YOLOL est dit &amp;quot;insensible à la casse&amp;quot;, ce qui signifie que les noms des variables peuvent contenir des majuscules et des minuscules sans différencier les deux. Ainsi '''ButtonState''' et '''buttonstate''' désignent indistinctement la même variable. C'est une fonctionnalité très pratique pour rendre le code plus lisible.&lt;br /&gt;
&lt;br /&gt;
====Les variables internes et externes====&lt;br /&gt;
Il existe deux genre de variables: les '''variables internes''' qui ne peuvent être utilisées qu'au sein de la puce YOLOL où elles ont été initiées et les '''variables externes''' qui font appel aux [[device fields/fr|champs de périphérique]] des appareils branchés sur le même [[data networks/fr|réseau de données]] pour en demander ou modifier les valeurs.&amp;lt;br&amp;gt;&lt;br /&gt;
Pour les différencier, les variables externes sont précédées d'un double-point (''':''').&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 if :ButtonState &amp;gt;= 1 then :DoorState = 1 end&lt;br /&gt;
* Comme vu précédemment, ce script évalue la valeur de '''ButtonState''' et, si elle est supérieure ou égale à '''1''', associe '''DoorState''' à '''1'''. Les deux variables seront cependant ici appelées sur l'ensemble des équipements présents sur le réseau de données, par exemple pour ouvrir une porte si un bouton est appuyé.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Remarques====&lt;br /&gt;
* Les champs ayant le même nom au sein du réseau de données sont liées et ont presque toujours la même valeur. Ainsi, une variable externe qui en modifie la valeur le fera sur tout les appareils associés.&lt;br /&gt;
* Il n'est actuellement pas possible d'appeler une variable initiée sur un puce YOLOL depuis une autre puce YOLOL.&lt;br /&gt;
&lt;br /&gt;
===Les Valeurs de Variables===&lt;br /&gt;
====Typage====&lt;br /&gt;
Le langage YOLOL supporte deux types de valeurs pour les variables: Les '''valeurs numériques''' et les '''chaînes de caractères''' (ou &amp;quot;string&amp;quot;). Cette différence est importante car en fonction du type de variable, le résultat d'une même instruction sera différente.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 Addition = 3 + 5&lt;br /&gt;
* Cette instruction conduit à additionner les deux valeurs numériques '''3''' et '''5'''. Le résultat sera donc '''8'''.&lt;br /&gt;
 Addition = &amp;quot;3&amp;quot; + &amp;quot;5&amp;quot;&lt;br /&gt;
* Cette instruction conduit à associer les chaînes de caractères '''&amp;quot;3&amp;quot;''' et '''&amp;quot;5&amp;quot;'''. Le résultat sera donc '''&amp;quot;35&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
Les variables sont dites à &amp;quot;faible typage&amp;quot;, c'est-à-dire qu'elles ne sont pas restreintes à un seul type. Elles se convertissent systématiquement aux valeurs qui leur sont assignées. Ainsi, une variable associée à une valeur numérique peut la remplacer par une chaîne de caractères et inversement sans provoquer d'erreur dans le code.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 AutoPilot = 128.643&lt;br /&gt;
* cette première instruction associe la variable '''AutoPilot''' à la valeur numérique '''128.643'''.&lt;br /&gt;
 AutoPilot= &amp;quot;Erreur détectée&amp;quot;&lt;br /&gt;
* La variable '''AutoPilot''' se convertit en s'associant à la chaîne de caractères '''&amp;quot;Erreur détectée&amp;quot;''' et la valeur numérique '''128.643''' est effacée.&lt;br /&gt;
&lt;br /&gt;
====Les valeurs numériques====&lt;br /&gt;
Les valeurs numérique dans le langage YOLOL sont des décimales à point fixe. La précision est de un millième: Jusqu'à trois nombre sous la décimale sont acceptés. Fournir une valeur plus précise fonctionne, mais n'affecte pas le résultat final.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 Pi = 3,14159265&lt;br /&gt;
* Le script ci-dessus tente d'associer la variable '''Pi''' à la valeur numérique '''3,14159265'''. Le résultat final sera cependant '''Pi = 3.141''', coupant la précision à trois nombre sous la décimale.&lt;br /&gt;
&lt;br /&gt;
La taille maximale d'une valeur numérique est de 64-bit. De ce fait, la portée maximale (même après opération) est de [-9223372036854775.808, 9223372036854775.807]. Toutes valeurs supérieures ou inférieures seront ramenées aux limites de la portée.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 StarTrek = 9999999999999999.999&lt;br /&gt;
* Ici, on tente d'associer la variable '''StarTrek''' à la valeur numérique '''9999999999999999.999'''. Celle-ci est cependant supérieure à la portée maximale et le résultat final sera '''StarTrek = 9223372036854775.807'''.&lt;br /&gt;
&lt;br /&gt;
====Les chaînes de caractères====&lt;br /&gt;
Pour signaler une chaîne de caractères au langage YOLOL, celle-ci doit être entourée de double-guillemets ('''&amp;quot; &amp;quot;''').&lt;br /&gt;
&lt;br /&gt;
 BadRobots= &amp;quot;Saltberia&amp;quot; &lt;br /&gt;
* Ce script associe la variable '''BadRobot''' à la chaîne de caractères '''&amp;quot;Saltberia&amp;quot;'''.&lt;br /&gt;
Comme pour les valeurs numériques, la taille maximale d'une chaîne de caractères est de 64-bit.&lt;br /&gt;
&lt;br /&gt;
====Remarques====&lt;br /&gt;
* Chaque variable ne peut être que d'un type à la fois, bien que celui-ci puisse être converti au besoin.&lt;br /&gt;
* Les valeurs &amp;quot;False&amp;quot; et &amp;quot;True&amp;quot; sont de type numérique: Elles correspondent respectivement à &amp;quot;0&amp;quot; et &amp;quot;non-0&amp;quot;.&lt;br /&gt;
* Une variable non définie préalablement a par défaut la valeur numérique &amp;quot;0&amp;quot;. L'absence de valeur (&amp;quot;null&amp;quot;) n'est pas reconnue.&lt;br /&gt;
&lt;br /&gt;
==Les Opérations==&lt;br /&gt;
A noter que si les opérations les plus basiques peuvent être utilisées par n'importe quelle [[YOLOL Chip/fr|puce YOLOL]], certaines plus complexes en nécessite des plus avancées, voire de qualité professionelle.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Les opérateurs arythmétiques ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Opération || Valeurs numériques || Chaînes de caractères || Puce nécessaire&lt;br /&gt;
|-&lt;br /&gt;
| A + B || Addition || &amp;quot;B&amp;quot; est ajouté à la suite de &amp;quot;A&amp;quot; || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A - B || Soustraction || La dernière occurence de &amp;quot;B&amp;quot; dans &amp;quot;A&amp;quot; est supprimée || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A * B || Multiplication || Erreur d'exécution. Le reste de la ligne est passé || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A / B || Division || Erreur d'exécution. Le reste de la ligne est passé || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A ^ B || Exponentielle || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| A % B || Modulo || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| ABS A || Absolue || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| A! || Factorielle || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| SQRT A || Racine carrée || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| SIN A || Sinus (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|-&lt;br /&gt;
| COS A || Cosinus (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|-&lt;br /&gt;
| TAN A || Tangente (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|-&lt;br /&gt;
| ASIN A || Sinus inversé (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|-&lt;br /&gt;
| ACOS A || Cosinus inversé (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|-&lt;br /&gt;
| ATAN A || Tangente inversée (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Les opérateurs d'assignation===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation || Valeurs numériques || Chaînes de caractères || Puce nécessaire&lt;br /&gt;
|-&lt;br /&gt;
| A = B || Assignation || Assignation || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A += B || Addition-assignation (A=A+B) || Addition-assignation (A=A+B) || Basique&lt;br /&gt;
|-&lt;br /&gt;
| ++ A  || Pré-incrémentation (A=A+1) || Ajoute un espace à la suite de &amp;quot;A&amp;quot;. Evalué sur la valeur modifiée || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A ++ || Post-incrémentation (A=A+1) || Ajoute un espace à la suite de &amp;quot;A&amp;quot;. Evalué sur la valeur d'origine || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A -= B || Soustraction-assignation (A=A-B) || Soustraction-assignation (A=A-B) || Basique&lt;br /&gt;
|-&lt;br /&gt;
| -- A || Pré-décrémentation (A=A-1) || Retire le dernier caractère de la chaîne. Erreur d'éxecution si la chaîne est vide. Evalué sur la valeur modifiée || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A -- || Post-décrémentation (A=A-1) || Retire le dernier caractère de la chaîne. Erreur d'éxecution si la chaîne est vide. Evalué sur la valeur d'origine || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A *= B || Multiplication-assignation (A=A*B) || Erreur d'exécution. Le reste de la ligne est passé || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A /= B || Division-assignation (A=A/B) || Erreur d'exécution. Le reste de la ligne est passé || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A ^= B || Exponentielle-assignation (A=A^B) || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| A %= B || Modulo-assignation (A=A%B) || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Les opérateurs logiques ===&lt;br /&gt;
&lt;br /&gt;
Logical operators are checks that identify if the statement is true or false.&amp;lt;br&amp;gt;&lt;br /&gt;
All logical operations return either '''&amp;quot;0 for False&amp;quot;''' or '''&amp;quot;1 for True&amp;quot;'''. &lt;br /&gt;
The '''NOT''', '''AND''', and '''OR''' keywords consider 0 to be falsy and anything not 0 to be truthy.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation || Numeric operation || String operation || Chip availability&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;lt; B || A est plus petit que B || &amp;quot;A&amp;quot; est avant &amp;quot;B&amp;quot; dans l'ordre alphabétique || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;gt; B || A est plus grand que B || &amp;quot;A&amp;quot; est après &amp;quot;B&amp;quot; dans l'ordre alphabétique || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A == B || A est égal à B || &amp;quot;A&amp;quot; est égale à &amp;quot;B&amp;quot; || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;lt;= B || &amp;lt; ou == || &amp;lt; ou == || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;gt;= B || &amp;gt; ou == || &amp;gt; ou == || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A != B || A n'est pas égal à B || &amp;quot;A&amp;quot; n'est pas égale à &amp;quot;B&amp;quot; || Basique&lt;br /&gt;
|-&lt;br /&gt;
| NOT A || A est égal à 0 || &amp;quot;A&amp;quot; est 0 || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A AND B || A et B ne sont pas égaux à 0  || &amp;quot;A&amp;quot; et &amp;quot;B&amp;quot; ne sont pas 0 || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A OR B || A ou B n'est pas égal à 0 || &amp;quot;A&amp;quot; ou &amp;quot;B&amp;quot; n'est pas 0 || Basique&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Opérations sur des variables mixtes ===&lt;br /&gt;
&lt;br /&gt;
Mixing variable types in an operation handles the operation using all parameters as ''strings''.&lt;br /&gt;
&lt;br /&gt;
 previouslyNumber= &amp;quot;10&amp;quot; + 15&lt;br /&gt;
* The above script results in '''previouslyNumber''' containing the string value &amp;quot;1015&amp;quot;.&lt;br /&gt;
** Note that the involved parameters themselves don't change types, their values are just cast as strings for the purpose of the operation:&lt;br /&gt;
 &lt;br /&gt;
 purelyNumber = 15&lt;br /&gt;
 purelyString = &amp;quot;10&amp;quot; + purelyNumber&lt;br /&gt;
* When this script has executed, '''purelyString''' contains the string value of &amp;quot;1015&amp;quot;, while '''purelyNumber''' still contains the numeric value of 15.&lt;br /&gt;
&lt;br /&gt;
=== Ordre des opérations ===&lt;br /&gt;
&lt;br /&gt;
Operations are conducted in the following order, when operators have the same precidence, left to right.&amp;lt;br&amp;gt;&lt;br /&gt;
Where a line has multiple statements, they are executed left to right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operateurs&lt;br /&gt;
|-&lt;br /&gt;
| Incrémentation (++), décrémentation (--)&lt;br /&gt;
|-&lt;br /&gt;
| Factorielle (!)&lt;br /&gt;
|-&lt;br /&gt;
| Racine carrée (sqrt), modulo (%), absolue (abs), sinus (sin), cosinus (cos), tangente (tan)&lt;br /&gt;
|-&lt;br /&gt;
| Négatif arythmétique (-)&lt;br /&gt;
|-&lt;br /&gt;
| Exponentielle (^)&lt;br /&gt;
|-&lt;br /&gt;
| Multiplication (*), division (/)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;, &amp;gt;, ==, !=, &amp;lt;=, &amp;gt;=&lt;br /&gt;
|-&lt;br /&gt;
| Addition (+), soustraction (-)&lt;br /&gt;
|-&lt;br /&gt;
| Négation logique (not)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;Ou&amp;quot; logique (or)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;Et&amp;quot; logique (and)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Les Commandes==&lt;br /&gt;
&lt;br /&gt;
=== If-else conditional ===&lt;br /&gt;
&lt;br /&gt;
If-else statements are used to branch out the script into different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
They use the following syntax:&lt;br /&gt;
* '''if ''condition'' then ''statement'' else ''statement'' end'''&lt;br /&gt;
** Condition is a statement that results in a numeric value (where 0 is parsed as False, anything else as True), and statements are pieces of script that are run.&lt;br /&gt;
** All If-else conditional stations must have '''end''' syntax written after statement is complete.&lt;br /&gt;
** The statement has to be on one line. The if, then, else and end cannot be on different lines.&lt;br /&gt;
&lt;br /&gt;
If can be used to branch script execution into two possible outcomes temporarily based on variable value(s).&amp;lt;br&amp;gt;&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable != 2 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 3 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; endResult = 4 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* This script sets the value of '''endResult''' to 3 if '''variable''' does not have the value of 2.&lt;br /&gt;
* If '''variable''''s value is 2, '''endResult''' is set to the value of 4.&lt;br /&gt;
&lt;br /&gt;
Note that the else statement -part can be left out if not needed. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable != 2 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 3 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
*This script only sets the value of 3 to '''endResult''' if '''variable''' does not have a value of 2, and doesn't do anything else.&lt;br /&gt;
&lt;br /&gt;
==== Nesting if statements ====&lt;br /&gt;
&lt;br /&gt;
It is possible to place if-conditionals inside the true/false statement blocks to achieve further branching of execution.&amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 0 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 1 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 1 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 2 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &lt;br /&gt;
* This script sets '''endResult''' to 1 if '''variable''' equals 0.&lt;br /&gt;
* If '''variable''' doesn't equal 0, but it equals 1, '''endResult''' is set to 2.&lt;br /&gt;
&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 0 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; endResult == 1 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 2 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; endResult = 1 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
* This script sets '''endResult''' to 2 if '''variable''' has a value of 0, and '''endResult''' equals to 1.&lt;br /&gt;
* Otherwise it sets '''endResult''' to 1.&lt;br /&gt;
&lt;br /&gt;
=== Goto ===&lt;br /&gt;
&lt;br /&gt;
Goto syntax is used when the normal script reading order from 1-&amp;gt;20 is not desired, or needs to be altered.&lt;br /&gt;
&lt;br /&gt;
Goto is used with the following syntax:&lt;br /&gt;
*'''goto lineNumber'''&lt;br /&gt;
** lineNumber is the line which this command will take the script execution.&amp;lt;br&amp;gt;&lt;br /&gt;
** Any remaining script that is on the same line after the goto-command will not be executed.&lt;br /&gt;
*** using if statements before goto ignores goto syntax, assuming the if-statement is false&lt;br /&gt;
** Multiple goto commands can be added on the same line using conditionals, as '''False''' goto commands are skipped.&lt;br /&gt;
** Numeric values outside the [1,20] range are clamped to this range.&lt;br /&gt;
** Non-integer values are floored.&lt;br /&gt;
** String values will result in a Runtime Error.&lt;br /&gt;
&lt;br /&gt;
 if variable == 5 then '''goto 4''' end '''goto 6'''&lt;br /&gt;
&lt;br /&gt;
The script above will go to line number 4, if '''variable''' has a value of 5.&amp;lt;br&amp;gt;&lt;br /&gt;
Otherwise it will go to line number 6. Numerical operations can also be done &amp;quot;inside&amp;quot; the goto, e.g. &lt;br /&gt;
&lt;br /&gt;
  goto 4+1&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
Comments are useful when writing code that is used by a lot of programmers.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that comments also use up space from the pre-determined 70 character line limit and are not excluded from it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commenting is used with the following syntax:&lt;br /&gt;
*// '''text'''&lt;br /&gt;
** Text can be any single-line set of characters.&lt;br /&gt;
&lt;br /&gt;
 '''//''' This is a comment. It will explain how other lines of script work.&lt;br /&gt;
* An example of a possible comment syntax&lt;br /&gt;
&lt;br /&gt;
== Les erreurs ==&lt;br /&gt;
&lt;br /&gt;
Il y a deux types d'erreurs qui peuvent survenir pendant l'éxecution d'une séquence YOLOL:&lt;br /&gt;
# '''Les erreurs de syntaxe (&amp;quot;syntax errors&amp;quot;)''': elles résultent d'un script invalide et empêchent l'interprétation de la ligne toute entière, qui est donc ignorée pour passer directement à la suivante.&lt;br /&gt;
# '''Les erreurs d'exécution (&amp;quot;runtime errors&amp;quot;)''': elles ne sont détectées que pendant l'éxecution du script et provoquent l'arrêt de l'interprétation de la ligne en cours pour passer à la suivante. Elles n'impactent donc pas les instructions antérieures.&lt;br /&gt;
&lt;br /&gt;
== Bugs connus/Comportements indésirables==&lt;br /&gt;
Voici une liste des problèmes relevés avec l'utilisation du langage YOLOL:&amp;lt;br&amp;gt;&lt;br /&gt;
* Les noms de variables contenant les mots-clé &amp;quot;if&amp;quot;, &amp;quot;else&amp;quot; et &amp;quot;end&amp;quot; sont mal interprétés par le langage et provoquent une erreur de syntaxe. Les noms tels que '''life''' ou '''endurance''' sont donc à éviter.&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
==YOLOL Tips &amp;amp; Tricks==&lt;br /&gt;
* [[Common YOLOL|Common YOLOL scripts]]&lt;br /&gt;
* [[YOLOL Tricks]]&lt;br /&gt;
&lt;br /&gt;
== Pages associées ==&lt;br /&gt;
* [[Data networks/fr|Réseaux de données]]&lt;br /&gt;
* [[Devices and machines/fr|Appareils et machines]]&lt;br /&gt;
* [[Device fields/fr|Champs de périphérique ]]&lt;br /&gt;
* [[Universal tool/fr|Outil universel]]&lt;br /&gt;
* [[YOLOL Chip/fr|Puce YOLOL]]&lt;br /&gt;
* [[Chip socket/fr|Socle à puce]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Networks|YOLOL/fr]]&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=Page_d%E2%80%99accueil&amp;diff=30513</id>
		<title>Page d’accueil</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=Page_d%E2%80%99accueil&amp;diff=30513"/>
		<updated>2022-04-08T15:53:54Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: :fr -&amp;gt; /fr&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- For normal pages, use Otherlang2 instead of OtherlangMP --&amp;gt;&lt;br /&gt;
{{OtherlangMP&lt;br /&gt;
|en=Main_Page&lt;br /&gt;
|de=Main_Page:de&lt;br /&gt;
|ru=Главная_страница&lt;br /&gt;
|zh-cn=主页&lt;br /&gt;
|pl=Main_Page:pl&lt;br /&gt;
|nl=Main_Page:nl&lt;br /&gt;
}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{#css:&lt;br /&gt;
  span.approvedAndLatestMsg {&lt;br /&gt;
    display: none;&lt;br /&gt;
  }&lt;br /&gt;
  span.approvingUser {&lt;br /&gt;
    display: none;&lt;br /&gt;
  }&lt;br /&gt;
  h1 {&lt;br /&gt;
    display: none;&lt;br /&gt;
  }&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;div class=&amp;quot;mpRow&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;mpLeftPadding&amp;quot;&amp;gt; &amp;lt;!-- LEFT COLUMN STARTS HERE --&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitableNoGrid&amp;quot; style=&amp;quot;border: 0px !important; margin: -10px; width: calc(100% + 20px);&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|&amp;lt;span class=&amp;quot;tableheader&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-size:110%&amp;quot;&amp;gt;&amp;lt;font color=&amp;quot;White&amp;quot;&amp;gt;À propos de Starbase&amp;lt;/font&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
[[File:AboutStarbaseRobot.png|150px|right]] &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Dans l'univers de Starbase tout le monde contrôle un [[Endoskeleton/fr|endosquelette]] robotique, un corps assez durable étant idéal pour l'exploration spatiale et la colonisation. La société, formée de ces robotiques endosquelettes est actuellement concentrée sur de gigantesques [[Capital_Mega_Station/fr|Super Stations]] et de plus petites Mini Stations, les &amp;quot;banlieues&amp;quot; dans l'espace. Les stations fournissent sécurité, [[jobs/fr|travail]], point de rencontre et possibilités d'échange pour leurs habitants, faisant d'elles des bases idéales où commencer la colonisation de la galaxie.&lt;br /&gt;
&lt;br /&gt;
Dans la galaxie, les deux principales factions sont deux factions rivales, le [[Kingdom/fr|Royaume]] et l'[[Empire/fr|Empire]], l'Empire ayant le contrôle de la majorité des stations centrales. Les autres factions peuvent tout de même espérer ce placer à coté de ces deux géants un jour, avec l'évolution et la progression la société.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
La [[News Broadcasts/fr|vie]] dans l'[[Space/fr|espace]] étant actuellement centrée sur l'orbite céleste d'une planète gazeuse, les courageux aventuriers devront constamment explorer les limites du voyage spatial et d'autres technologies afin de pouvoir, un jour atteindre les coins les plus reculés de la galaxie.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitableNoGrid&amp;quot; style=&amp;quot;border: 0px !important; margin: -10px; width: calc(100% + 20px);&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|&amp;lt;span class=&amp;quot;tableheader&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-size:110%&amp;quot;&amp;gt;&amp;lt;font color=&amp;quot;White&amp;quot;&amp;gt;Menu&amp;lt;/font&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Main_Page/fr|Menu principal]]&lt;br /&gt;
&lt;br /&gt;
[[Special:AllPages|Toutes les pages]]&lt;br /&gt;
&lt;br /&gt;
[[Special:RecentChanges|Changement récent]]&lt;br /&gt;
&lt;br /&gt;
[[Special:SpecialPages|Page spécial]]&lt;br /&gt;
&lt;br /&gt;
[[News Broadcasts/fr|Diffusions de nouvelles]]&lt;br /&gt;
&lt;br /&gt;
[[Special:Random|Page aléatoire]]&lt;br /&gt;
&lt;br /&gt;
[[Rules/fr|Règlement]]&lt;br /&gt;
&lt;br /&gt;
[[Jobs/fr|Carrière]]&lt;br /&gt;
&lt;br /&gt;
[[Endoskeleton CV/fr|Curriculum vitæ]]&lt;br /&gt;
&lt;br /&gt;
[[Emotes/fr|Emotes]]&lt;br /&gt;
&lt;br /&gt;
[[Endoskeleton/fr|Endosquelette]]&lt;br /&gt;
&lt;br /&gt;
[[Insurance/fr|Assurance]]&lt;br /&gt;
&lt;br /&gt;
[[Data networks/fr|Réseaux de données]]&lt;br /&gt;
&lt;br /&gt;
[[Pipe networks/fr|Réseaux de canalisation]]&lt;br /&gt;
&lt;br /&gt;
[[Resource networks/fr|Réseau de ressources]]&lt;br /&gt;
&lt;br /&gt;
[[YOLOL/fr|Langage YOLOL]]&lt;br /&gt;
&lt;br /&gt;
[[FAQ/fr|Foire au questions]]&lt;br /&gt;
&lt;br /&gt;
[[Spaceship assembly guide/fr|Guide d'assemblage du vaisseau spatial]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;mpMiddle&amp;quot;&amp;gt; &amp;lt;!-- MIDDLE COLUMN STARTS HERE --&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitableTransparent&amp;quot; style=&amp;quot;margin-right: auto; margin-left: auto; border: none; margin-top: -3px;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Armes&amp;lt;/span&amp;gt;[[File:Combat_simulations_notext.png|175px|link=Weapons/fr|center]]&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Équipements&amp;lt;/span&amp;gt;[[File:Devices_notext.png|175px|link=Devices_and_machines/fr|center]]&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Matériaux&amp;lt;/span&amp;gt;[[File:Materials_notext.png|175px|link=Materials/fr|center]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Vaisseaux&amp;lt;/span&amp;gt;[[File:Spaceships_notext.png|175px|link=Spaceships/fr|center]]&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Stations&amp;lt;/span&amp;gt;[[File:Stations_Table_Test_notext.png|175px|link=Stations/fr|center]]&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Outils&amp;lt;/span&amp;gt;[[File:Tools_notext.png|175px|link=Tools/fr|center]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Univers&amp;lt;/span&amp;gt;[[File:Space_category.png|175px|link=Space/fr|center]]&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Politiques&amp;lt;/span&amp;gt;[[File:Factions_notext.png|175px|link=Factions/fr|center]]&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Construction&amp;lt;/span&amp;gt;[[File:Sb_building_feature_block.png|175px|link=Building/fr|center]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{#evt:&lt;br /&gt;
service=youtube&lt;br /&gt;
|id=https://www.youtube.com/watch?v=zXLTFwoYM_s&lt;br /&gt;
|dimensions= 530&lt;br /&gt;
|alignment=center&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitableTransparent&amp;quot; style=&amp;quot;margin-right: auto; margin-left: auto; border: none&lt;br /&gt;
!colspan=&amp;quot;6&amp;quot;|&amp;lt;span class=&amp;quot;tableheader&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-size:110%&amp;quot;&amp;gt;&amp;lt;font color=&amp;quot;White&amp;quot;&amp;gt;Galerie de Fonctionnalités&amp;lt;/font&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;|[[File:Starbase_marketing_screenshot_derelict_1080p.png|214px]]&lt;br /&gt;
|[[File:Screnshot_several_spaceships.png |96px]]&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;|[[File:Screenshot_Bolt_tool.png|214px]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| [[File:Screenshot_megastation_1080p.png|96px]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;mpRight&amp;quot;&amp;gt; &amp;lt;!-- RIGHT COLUMN STARTS HERE --&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitableNoGrid&amp;quot; style=&amp;quot;margin: auto; border: none&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|&amp;lt;span class=&amp;quot;tableheader&amp;quot;&amp;gt;[[Weapons/fr|Armes]]&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| [[File:Assault rifle thumb.png|120px|link=Assault_rifle/fr|thumb|center|Fusil d’assaut]]&lt;br /&gt;
| [[File:Antigel thumb.png|120px|link=Antigel_rifle/fr|thumb|center|Fusil antigel]]&lt;br /&gt;
| [[File:Battle rifle thumb.png|120px|link=Battle_rifle/fr|thumb|center|Fusil de combat]]&lt;br /&gt;
| [[File:Bolter thumb.png|120px|link=Bolter/fr|thumb|center|Fusil à arc électrique]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| [[File:Flamer thumb.png|120px|link=Flamethrower/fr|thumb|center|Lance-flamme]]&lt;br /&gt;
| [[File:Gauss rifle thumb.png|120px|link=Gauss_rifle/fr|thumb|center|Fusil magnétique]]&lt;br /&gt;
| [[File:Laser rifle thumb.png|120px|link=Laser_rifle/fr|thumb|center|Fusil laser]]&lt;br /&gt;
| [[File:Long rifle thumb.png|120px|link=Long_rifle/fr|thumb|center|Fusil à longue portée]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| [[File:Pistol thumb.png|120px|link=Pistol/fr|thumb|center|Pistolet]]&lt;br /&gt;
| [[File:Repeater thumb.png|120px|link=Repeater_pistol/fr|thumb|center|Pistolet-mitrailleur]]&lt;br /&gt;
| [[File:Revolver thumb.png|120px|link=Revolver/fr|thumb|center|Revolver]]&lt;br /&gt;
| [[File:Shotgun thumb.png|120px|link=Shotgun/fr|thumb|center|Fusil à pompe]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitableNoGrid&amp;quot; style=&amp;quot;margin: auto; border: none;&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|&amp;lt;span class=&amp;quot;tableheader&amp;quot;&amp;gt;[[Mounted weapons/fr|Armes Montées]]&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| [[File:Autocannon.png|120px|link=Autocannon/fr|thumb|center|Auto-canon]]&lt;br /&gt;
| [[File:Laser weapon.png|120px|link=Laser cannon/fr|thumb|center|Canon laser]]&lt;br /&gt;
| [[File:Plasma cannon.png|120px|link=Plasma thrower/fr|thumb|center|Lance-plasma]]&lt;br /&gt;
| [[File:Rail weapon.png|120px|link=Rail cannon/fr|thumb|center|Canon à rail]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitableNoGrid&amp;quot; style=&amp;quot;margin: auto;&amp;quot; border: none&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|&amp;lt;span class=&amp;quot;tableheader&amp;quot;&amp;gt;[[Spaceships/fr|Vaisseaux]]&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| [[File:Spaceship hedron decal.jpg|120px|link=Hedron/fr|thumb|center|Hedron]]&lt;br /&gt;
| [[File:Spaceship Ithaca.jpg|120px|link=Ithaca/fr|thumb|center|Ithaca]]&lt;br /&gt;
| [[File:Spaceship remus.jpg|120px|link=Remus/fr|thumb|center|Remus]]&lt;br /&gt;
| [[File:Spaceship urchin decal.jpg|120px|link=Urchin/fr|thumb|center|Urchin]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| [[File:Spaceship Empire Lictor.JPG|120px|link=Lictor/fr|thumb|center|Lictor]]&lt;br /&gt;
| [[File:Empire_spatha.jpg|120px|link=Spatha/fr|thumb|center|Spatha]]&lt;br /&gt;
| [[File:Kingdom_knight.jpg|120px|link=Knight/fr|thumb|center|Knight]]&lt;br /&gt;
| [[File:Kingdom_lancer.jpg|120px|link=Lancer/fr|thumb|center|Lancer]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=Spaceship_assembly_guide:fr&amp;diff=30512</id>
		<title>Spaceship assembly guide:fr</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=Spaceship_assembly_guide:fr&amp;diff=30512"/>
		<updated>2022-04-08T15:52:28Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: Danthbyrth moved page Spaceship assembly guide:fr to Spaceship assembly guide/fr: Conforming to multilingual organizational standards&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Spaceship assembly guide/fr]]&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=Spaceship_assembly_guide/fr&amp;diff=30511</id>
		<title>Spaceship assembly guide/fr</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=Spaceship_assembly_guide/fr&amp;diff=30511"/>
		<updated>2022-04-08T15:52:27Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: Danthbyrth moved page Spaceship assembly guide:fr to Spaceship assembly guide/fr: Conforming to multilingual organizational standards&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Otherlang2&lt;br /&gt;
|en=spaceship assembly guide&lt;br /&gt;
|fr=spaceship assembly guide:fr&lt;br /&gt;
|ru=Гайд по созданию кораблей&lt;br /&gt;
|ua=Гайд по будівництву кораблів&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
{{#evt:service=youtube|id=https://www.youtube.com/watch?v=qLIkz2IO5iA|alignment=center}}&lt;br /&gt;
&lt;br /&gt;
This guide is an introduction to spaceship building in Starbase. It will introduce the basics of spaceship hull structure, and basic devices and machinery needed for a working spaceship.&lt;br /&gt;
&lt;br /&gt;
== Good To Know Before Starting ==&lt;br /&gt;
*You should have basic knowledge of device configurations and YOLOL in Starbase, as this guide includes machinery and devices.&lt;br /&gt;
*You should have basic knowledge of the Spaceship Designer before attempting spaceship assembly.&lt;br /&gt;
*Spaceship Designer: Pre-made blueprints/Tutorials/Tutorial Starter Spaceship&lt;br /&gt;
*In [[Spaceship_resources|Spaceship resources]] you will find information about different resources that spaceships will use.&lt;br /&gt;
&lt;br /&gt;
== Spaceship Requirements ==&lt;br /&gt;
Each spaceship requires the following things to fly: &lt;br /&gt;
&lt;br /&gt;
*Valid Frame/Hull &lt;br /&gt;
*Thrusters &lt;br /&gt;
*Powersource: Generator or Batteries &lt;br /&gt;
*Propellant for thrusters &lt;br /&gt;
*Data Network &lt;br /&gt;
*Pipe network for propellant &lt;br /&gt;
*Ship controls and basic configuration &lt;br /&gt;
&lt;br /&gt;
== Valid Frame And Hull Structure ==&lt;br /&gt;
*All spaceships need to be built according to the durability rules in order to be able to fly without breaking.&lt;br /&gt;
**Foundation of the durability rules is the frame of beams which forms the ship’s hull, and to which everything else is attached to.&lt;br /&gt;
&lt;br /&gt;
*A valid ship frame consists of beams connected to each other with attachment plates and bolts, and a valid thruster base (Device hardpoint) is connected to the beams directly.&lt;br /&gt;
**The hardpoint is connected to beams with at least two bolts, and an actual thruster is in contact with the hardpoint. &lt;br /&gt;
**The thruster has to be properly positioned (forming a data connection with the base) and connected to the same frame as the base.&lt;br /&gt;
&lt;br /&gt;
*Ship frame must be consistent, there can't be two different frames that are not connected to each other.&lt;br /&gt;
**If there are two separate frames, the bigger one will be used as there can be only one frame.&lt;br /&gt;
&amp;lt;gallery widths=500px heights=400px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Frame_example.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Beam Frame ===&lt;br /&gt;
&amp;lt;gallery widths=500px heights=400px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Attachment_plate_beam_example.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Plates === &lt;br /&gt;
====Outer Plates====&lt;br /&gt;
*Outer plating protects the ship from weapon fire, collisions and radiation during warp travel.&lt;br /&gt;
*There should not be any gaps on the exterior plating of the ship, otherwise radiation gets through during warp travel. Beams and plates withstand normal flying and there can be exposed beams if the ship is not meant for warp travel.&lt;br /&gt;
*Plates are connected to the frame with bolts.&lt;br /&gt;
&lt;br /&gt;
====Inner Plates====&lt;br /&gt;
*The main difference between inner and outer plates is the material.&lt;br /&gt;
*Inner plating is not necessary regarding the ship's durability and ability fly, but makes it easier to walk inside the ship, and helps with weapon damage.&lt;br /&gt;
*It is recommended to have at least some interior plating to make character movement smoother and make the ship interior more aesthetic.&lt;br /&gt;
*Interior plating also helps when placing machinery, devices, cables and piping.&lt;br /&gt;
&amp;lt;gallery widths=300px heights=300px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Outer_inner_plates_example.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Hardpoints ===&lt;br /&gt;
*Thrusters and other machinery outside the ship’s hull have to be connected to the ship’s '''data network'''. &lt;br /&gt;
*Thrusters also need to be connected to the ship’s '''propellant gas network.'''&lt;br /&gt;
*Connecting thrusters and machinery to the spaceship networks is done with '''hardpoints'''. &lt;br /&gt;
*Hardpoints have pipe and cable slots for connecting pipes and cables. This means hardpoints need to be placed on the frame so that cabling and piping can be done.&lt;br /&gt;
&lt;br /&gt;
*As thrusters need hardpoints to work, it is important to pay attention to where to place the hardpoints. Thruster locations greatly affect how the ship flies and how easily the ship can be maneuvered.&lt;br /&gt;
&amp;lt;gallery widths=400px heights=400px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Hardpoint_example_.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Modules ===&lt;br /&gt;
&lt;br /&gt;
*Modules are plates, beams, etc. which are grouped together. The purpose of the modules is to make constructing spaceships faster and easier than using single parts.&lt;br /&gt;
&lt;br /&gt;
*Every module has at least one Parent Object (Green Sphere) that ties the objects in the module together. Modules can be moved and rotated as a whole by having green sphere selected (module icon).&lt;br /&gt;
&lt;br /&gt;
*'''It is highly recommended that beginners start building with modules.'''&lt;br /&gt;
**Using modules should automatically ensure that the spaceship structure is correct.&lt;br /&gt;
**Modules are the best way to learn the building grid and good building patterns.&lt;br /&gt;
**There is a lot of different building parts in the game and this can be overwhelming at first. Using modules reduces the number of building parts you need to remember.&lt;br /&gt;
**The building process will be faster and the progress is easier to notice.&lt;br /&gt;
**Basic modules for smaller and medium sized ships are introduced in: Premade blueprints/Tutorials/Tutorial Starter Spaceship&lt;br /&gt;
**The basic modules are for building 90 degree angles. This means the hull will have box-like appearance at first. The hull can be decorated with decoration parts and normal plates later on. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;gallery widths=800px heights=900px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Basic_starter_set_modules_guide_picture.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The Grid ===&lt;br /&gt;
*Spaceship modules use a 48 cm grid. This is because the basic hull thickness is 48 cm.&lt;br /&gt;
*Outer plating (12 cm) + beam frame (24 cm) + inner plating (12 cm) = 48 cm&lt;br /&gt;
*Keeping the hull structure in the grid ensures that beams connect easily.&lt;br /&gt;
&amp;lt;gallery widths=400px heights=400px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Grid_example.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bolting And Durability ===&lt;br /&gt;
*Each part of the ship has its own mass. In durability calculations, the mass of different parts is transferred towards the frame via connections (bolts) and other parts. This means parts close to the frame need to support all the parts further away from the frame.&lt;br /&gt;
&lt;br /&gt;
*When building your first spaceship, it is good to do test bolting and durability checks in the middle of the building process. This way you can avoid unnecessary extra work and keep the hull structure consistent all the time.&lt;br /&gt;
&lt;br /&gt;
*Durability Tool will report '''No ship frame''' when there are no thruster bases with connected thrusters connected to the frame. When there is at least one thruster properly connected to the thruster base and both are connected to the frame with bolts, Durability Tool will show '''Ship Warp Class X'''. If the ship warp class is lower than one, it means there are parts which are poorly connected to the frame.&lt;br /&gt;
&lt;br /&gt;
*When the Durability Tool shows warp class for the ship, it also means that '''a frame integrity check''' can be done. (Durability tool→ Right mouse button). The frame integrity check basically studies how solidly each frame beam (and whatever it supports) is connected to the frame-attached thrusters.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=400px heights=400px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Frame_integrity_check_SSC.jpg|If the frame design is not balanced enough, certain sections may encounter too much stress. This creates a durability error for the frame beam.&lt;br /&gt;
File:Frame_integrity_check_SSC_2.jpg|This is the same spot but some attachment plates and bolts have been removed between beams. Notice the color change which means those beams are about to fail.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Thrusters ==&lt;br /&gt;
A spaceship needs thrusters to be able to fly and thrusters need to be bolted to the hull.&lt;br /&gt;
&lt;br /&gt;
*Thrusters can be divided to two types: '''main thrusters''' and '''maneuver thrusters'''. Main thrusters generate forward movement and maneuver thrusters enable yaw, pitch and roll for example. Each thruster model can act as a main thruster or a maneuver thruster. To which movement the thruster will contribute, the defining factor is position and orientation of the thruster.&lt;br /&gt;
&lt;br /&gt;
*Location of thrusters greatly affects how easy the ship is to maneuver. For example if your ship is missing forward facing thrusters, your ship won’t be able to fly backwards.&lt;br /&gt;
&lt;br /&gt;
*Mass is also a factor when placing thrusters to your spaceship. Each beam, plate and machinery you have placed on your ship has mass. The bigger your ship is, more thrust it will need.&lt;br /&gt;
&lt;br /&gt;
*Thrusters need '''electricity''' and '''propellant''' to work. Thrusters consume more propellant than power. This means civilian ships without weaponry can have smaller generators and mainly focus on propellant containers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Maneuver thrusters'''&lt;br /&gt;
*Maneuver thrusters are usually smaller and don’t need to provide much thrust.&lt;br /&gt;
*There are three sizes of thrusters in Starbase: box thruster, triangle thruster and maneuver thruster. Each thruster can be used as a maneuver thruster even thought only one is named a ”maneuver thruster”.&lt;br /&gt;
&lt;br /&gt;
'''Main thrusters'''&lt;br /&gt;
*Main thrusters are usually the thrusters that are facing backwards as this enables forward movement for the ship.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Maneuver thruster&lt;br /&gt;
*Max thrust: 50 000&lt;br /&gt;
*The small maneuver thruster is placed on a hardpoint&lt;br /&gt;
&lt;br /&gt;
Box thruster&lt;br /&gt;
*Max thrust: 500 000&lt;br /&gt;
*The box thruster is connected to a hardpoint from the side and this thruster can’t be stacked&lt;br /&gt;
&lt;br /&gt;
Triangle thruster&lt;br /&gt;
*Max thrust: 300 000&lt;br /&gt;
*The biggest difference the triangle thruster has compared to the other two thrusters is that it can be stacked. Only one triangle thruster needs connection with a hardpoint and more triangle thrusters can be connected to that thruster. Stacked triangle thrusters share same device field name which is linked to MFC and operate as a whole.&lt;br /&gt;
&lt;br /&gt;
== Power Source ==&lt;br /&gt;
Machines and devices need power in spaceships. Power can be provided with generator or batteries&lt;br /&gt;
&lt;br /&gt;
=== Generator === &lt;br /&gt;
Generator pieces are modular and can be used to build bigger and smaller generators. &amp;lt;br&amp;gt;&lt;br /&gt;
Working generator will need at least one '''generator fuel chamber''', one '''small fuelrod,''' one '''generator unit''', one '''generator socket board''', one '''generator cooling rack''' and one '''small cooling cell'''.&lt;br /&gt;
*Place the generator in a way that there is enough room to pull out the fuel rod&lt;br /&gt;
*Also make sure there is an easy access to the socket board and to the coolant cells.&lt;br /&gt;
*The generator parts need to be bolted together and the generator needs to be bolted to the ship.&lt;br /&gt;
*Generator cooling can also provided by using Radiator&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=400px heights=400px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Generator_example.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Propellant ==&lt;br /&gt;
Thrusters need and consume propellant to work. Propellant is stored in propellant containers. The amount of containers spaceship will need depends on how many thrusters it has.&lt;br /&gt;
*There are three sizes of propellant containers: small, medium and large.&lt;br /&gt;
*While placing the propellant containers make sure there is an access to at least two of the sockets found in the tank support.&lt;br /&gt;
*The propellant container needs to be bolted to the ship.&lt;br /&gt;
&lt;br /&gt;
== Data Network ==&lt;br /&gt;
The spaceship needs a cable network to transfer electricity to all the machinery and data between all the devices.&lt;br /&gt;
*Use the cabling tool to connect all the machinery and devices to the same network.&lt;br /&gt;
*Make sure that all the devices and machinery: thrusters, doors, MCU, FCU, levers, lamps and buttons are connected to the network.&lt;br /&gt;
&amp;lt;gallery widths=800px heights=800px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Data_network_example.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;gallery widths=400px heights=400px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Data_network_example_02.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pipe Network For Propellant ==&lt;br /&gt;
The spaceship needs a pipe network to transfer propellant to all thrusters from propellant containers.&lt;br /&gt;
*Use [[Pipe tool]] to connect all propellant containers and hardpoints with thrusters.&lt;br /&gt;
*To get information from propellant network, containers also need to be in electricity network. Connecting one propellant container support to electricity network can be used to show the total amount of propellant in the pipe network.&lt;br /&gt;
&amp;lt;gallery widths=800px heights=800px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Pipe_network_example.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;gallery widths=400px heights=400px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Cable_piping_example.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Ship Controls And Basic Configuration ==&lt;br /&gt;
Spaceship thrusters can be controlled directly with levers, buttons and YOLOL. However YOLOL-configured thruster balance settings and flying are very ship specific configurations. The following guide explains how to use and configure Flight Control Unit (FCU) and Main Flight Computer (MFC) to do thruster balance calculations and settings for you.&lt;br /&gt;
*If you are interested about YOLOL configured thruster balance settings and flying you can examine Spaceship Vasama in the Spaceship Designer.&lt;br /&gt;
&lt;br /&gt;
===Flight Control Unit (FCU)===&lt;br /&gt;
&lt;br /&gt;
*'''The FCU''' gets input from control devices (levers and buttons) and sends it to the '''Main Flight Computer''', which forwards it to the thrusters.&lt;br /&gt;
*The arrows on top of the FCU define the ”forward” direction of the ship. &lt;br /&gt;
*There can be more than one FCU connected to one Main Flight Computer.&lt;br /&gt;
*There are currently three FCU models in Starbase:  Basic, Advanced and Premium model. Each model has a different set of ship movements available.&lt;br /&gt;
&lt;br /&gt;
'''Basic model''':&lt;br /&gt;
* FcuMfcIO (for connecting the MFC)&lt;br /&gt;
* FcuInputRange (Lever input range) &lt;br /&gt;
* FcuGeneralMultiplier (a &amp;quot;soft power switch&amp;quot;, scales all output)&lt;br /&gt;
* FcuForward (moves the ship straight forward or combines FcuFwdBwd rotations with the forward movement)&lt;br /&gt;
* FcuBackward (moves the ship straight backward or combines FcuFwdBwd rotations with the backward movement)&lt;br /&gt;
* FcuRotationalPitch (in-place pitch rotation)&lt;br /&gt;
* FcuRotationalYaw (in-place yaw rotation)&lt;br /&gt;
* FcuRotationalRoll (in-place roll rotation)&lt;br /&gt;
&lt;br /&gt;
'''Advanced model''' (in addition to the Basic controls):&lt;br /&gt;
* FcuUpDown (moves the ship straight up or down)&lt;br /&gt;
* FcuRightLeft (moves the ship straight right or left)&lt;br /&gt;
&lt;br /&gt;
'''Premium model''' (in addition to the Advanced controls):&lt;br /&gt;
* FcuFwdBwdPitch (rotation combined to forward/backward movement)&lt;br /&gt;
* FcuFwdBwdYaw (rotation combined to forward/backward movement)&lt;br /&gt;
* FcuFwdBwdRoll (rotation combined to forward/backward movement)&lt;br /&gt;
&lt;br /&gt;
[[File:FCU_and_MFC_assembly_guide.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
===Main Flight Computer (MFC)===&lt;br /&gt;
&lt;br /&gt;
*'''MFC''' is placed in the same data network with a '''Flight Control Unit''' and '''thrusters'''.  The MFC and FCU share one identical device field name.&lt;br /&gt;
*MFC gets input from the Flight Control Unit and sends this data to the thrusters, telling them what to do. For example &amp;quot;pilot interacts with yaw lever&amp;quot;. The FCU receives the information and sends it to the Main Flight Computer. The MFC then automatically decides which thursters are used to make the ship yaw. &lt;br /&gt;
*Each thruster group is controlled by exactly one MFC. There can be several MFCs in one ship.&lt;br /&gt;
&lt;br /&gt;
===Levers===&lt;br /&gt;
&lt;br /&gt;
The Flight Control Unit (FCU) gets input from control devices like levers and buttons. To get the levers to work with an FCU you need to configure the lever device fields to match with the FCU device fields (see picture below).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=600px heights=600px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Lever_fcu_assembly_example.jpg|Examine '''FCU''' device fields and levers.  Also notice matching device fields in the '''MFC'''  and the '''FCU'''&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Lever Examples====&lt;br /&gt;
&lt;br /&gt;
'''Note!''' These are examples for a ship that has an FCU and an MFC. Also the FCU input Range is set to 100. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=500px heights=500px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File:Lever_assembly_example_1.jpg|Lever settings for '''forward thrust'''. If the FCU input range would be 1000, then LeverMaxOutput  would be 1000 and LeverBindsMoveSpeed would be also higher&lt;br /&gt;
File:Lever_assembly_example_2.jpg|Centered lever settings for yaw.  Notice LeverCenteringSpeed. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Thruster configuration===&lt;br /&gt;
&lt;br /&gt;
The Main Flight Computer controls the thrusters. One MFC can handle 50 thrusters, which means there are 50 device fields for thrusters in an MFC (thrusterPowerLevelXX). These field names are set for ship's thrusters. Field names can be renamed but each thruster should have a unique device field name (excluding stacked triangle thrusters).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=800px heights=600px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:data_network_example.jpg| Examine the '''MFC''' device fields (thrusterpowerlevel...) and thruster device field names set to thrusters throughout the data network&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;gallery widths=500px heights=600px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Thruster_device_field_example_01.jpg|A configured thruster: When a thruster is connected to same data network with an MFC and is given matching field name with the MFC thruster list, the values should automatically update and be the same. Also in this case '''ThrusterCurrentThrust''' field name has been changed to '''T07''' ( This can be linked to Progress Bar)  &lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
&lt;br /&gt;
'''Checklist'''&lt;br /&gt;
&lt;br /&gt;
Each spaceship needs the following things to fly:&lt;br /&gt;
*Valid frame/Hull&lt;br /&gt;
*Thrusters&lt;br /&gt;
*Powersource&lt;br /&gt;
*Propellant for thrusters&lt;br /&gt;
*Data Network&lt;br /&gt;
*Pipe network for propellant&lt;br /&gt;
*Ship controls and basic configuration&lt;br /&gt;
&lt;br /&gt;
'''My ship is not moving?'''&lt;br /&gt;
# Check durability and bolting→ Thruster hardpoints are bolted to the frame and thrusters are bolted to the hardpoints/ hull.  The ship frame is consistent and bolted.&lt;br /&gt;
# Thrusters need electricity and propellant → Check  cabling and piping (all thruster hardpoints are connected to the electricity network and to the propellant pipe network. &lt;br /&gt;
# Electricity network (cable) is connected to the generator.  Check that the generator has all the necessary parts → see 3. Powersource/generator&lt;br /&gt;
# Pipe network is connected to the propellant containers → see Pipe network for propellant&lt;br /&gt;
# Check the thruster configuration → see thruster configuration  (matching device field names and values in MFC and in thrusters  '''(If the ship is using an MFC)'''&lt;br /&gt;
# Check matching device field names in the MFC and FCU → see picture in Levers section&lt;br /&gt;
# Check matching device field names in the levers and in the FCU → see picture in Levers section&lt;br /&gt;
&lt;br /&gt;
'''When I start flying my ship, some pieces of the ship detach?'''&lt;br /&gt;
*Use the Durability Tool.  Check that everything is green and bolted. &lt;br /&gt;
'''My ship is almost symmetrical but still doesn’t fly straight/ turns easier to one direction?'''&lt;br /&gt;
*Some thrusters might not be working → Check :  1 , 2,  3, 4 ,5&lt;br /&gt;
'''All thrusters seem to working but ship yaw/pitch/roll is slow?'''&lt;br /&gt;
*In some cases you might need re-position thrusters or add more thrusters. Upgrading FCU to premium model which has combined movements possibilities can also be helpful in some cases.&lt;br /&gt;
&lt;br /&gt;
[[Category:Guides]] [[Category:Spaceships]]&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=YOLOL/fr&amp;diff=30503</id>
		<title>YOLOL/fr</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=YOLOL/fr&amp;diff=30503"/>
		<updated>2022-04-08T00:59:56Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: /* Les Opérateurs */  Traduction partielle&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Otherlang2&lt;br /&gt;
|en=YOLOL&lt;br /&gt;
|de=YOLOL:de&lt;br /&gt;
|fr=YOLOL:fr&lt;br /&gt;
|ru=YOLOL:ru&lt;br /&gt;
|ua=YOLOL:ua&lt;br /&gt;
|jp=YOLOL:jp&lt;br /&gt;
|zh-cn=YOLOL语言&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
{{#evt:service=youtube|id=https://www.youtube.com/watch?v=7lXK6_bktUk|alignment=center}}&lt;br /&gt;
&lt;br /&gt;
le YOLOL est un langage de programmation spécifique à Starbase qui est utilisé en parallèle du l'[[Universal tool:fr|outil universel]] pour contrôler et gérer les [[Devices_and_machines:fr|appareils]].&amp;lt;br&amp;gt;&lt;br /&gt;
Le code est écrit ligne par ligne sur une [[YOLOL Chip:fr|puce YOLOL]] qui est ensuite insérée dans un [[Chip socket:fr|socle à puce]] connecté au [[Data networks:fr|réseau de données]] du vaisseau afin d'accéder aux [[Device fields:fr|champs de périphérique]].&amp;lt;br&amp;gt;&lt;br /&gt;
Le langage YOLOL est compatible avec presque tous les équipements et engins de l'univers connu.&lt;br /&gt;
&lt;br /&gt;
===Comment ça marche?===&lt;br /&gt;
Le YOLOL fonctionne par cycle: Les lignes de code sont exécutées les unes après les autres du haut vers le bas, puis la séquence reprend une fois la dernière ligne passée. Chaque ligne est lue dans un intervalle de temps constant de 0.2 secondes, quelque soit sa longueur et le nombre d'instructions qui y sont contenues.&lt;br /&gt;
&lt;br /&gt;
Pour faire simple:&lt;br /&gt;
# Le code se lance en commençant par la ligne 1&lt;br /&gt;
# La ligne en cours est exécutée, puis le programme passe à la suivante après un intervalle de temps de 0.2 secondes&lt;br /&gt;
# L'étape 2 est répétée pour les lignes 2, 3, 4... jusqu'à la dernière&lt;br /&gt;
# La puce se réinitialise à l'étape 1 une fois le processus terminé&lt;br /&gt;
&lt;br /&gt;
===Limites===&lt;br /&gt;
* Chaque puce YOLOL contient 20 lignes de code. Ni plus, ni moins. L'exécution d'un cycle complet prend donc 20 * 0.2 = 4 secondes si il est mené à son terme.&lt;br /&gt;
* Chaque lignes peut contenir un maximum de 70 caractères (symboles et espaces inclus).&lt;br /&gt;
&lt;br /&gt;
===Remarques===&lt;br /&gt;
* Les puces YOLOL possèdent une fonction de mise en pause, qui fige l'exécution du code à la ligne en cours.&lt;br /&gt;
* Les lignes blanches nécessitent tout de même l'intervalle de temps des 0.2 secondes pour être passées, provoquant de courts délais d'exécution (il en va de même pour les lignes ne contenant que des commentaires).&lt;br /&gt;
* Une seule ligne de code peut contenir plusieurs instructions à la fois, autant que peut le supporter la limite maximale de caractères.&lt;br /&gt;
* Certaines instructions permettent de passer à une ligne spécifique, ce qui rend le code plus modulable.&lt;br /&gt;
&lt;br /&gt;
== Les Variables ==&lt;br /&gt;
Les variables permettent d'associer un '''nom''' à une '''valeur''' pour faciliter l'acquisition ultérieure de cette dernière. Dès lors, à chaque fois que le '''nom''' de la variable sera appelé, c'est sa '''valeur''' qui sera demandée et/ou modifiée suivant l'instruction utilisée.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 ButtonState = 1&lt;br /&gt;
* Dans ce script, on attribue à la variable nommée '''ButtonState''' la valeur numérique '''1'''.&lt;br /&gt;
 if ButtonState &amp;gt;= 1 then DoorState = 1 end&lt;br /&gt;
* Maintenant, on vérifie si la valeur de la variable '''ButtonState''' est supérieure ou égale à '''1''', auquel cas la variable '''DoorState''' se voit elle aussi associée à '''1'''.&lt;br /&gt;
&lt;br /&gt;
===Les Noms de Variables===&lt;br /&gt;
====Sensibilité à la casse====&lt;br /&gt;
Le langage YOLOL est dit &amp;quot;insensible à la casse&amp;quot;, ce qui signifie que les noms des variables peuvent contenir des majuscules et des minuscules sans différencier les deux. Ainsi '''ButtonState''' et '''buttonstate''' désignent indistinctement la même variable. C'est une fonctionnalité très pratique pour rendre le code plus lisible.&lt;br /&gt;
&lt;br /&gt;
====Les variables internes et externes====&lt;br /&gt;
Il existe deux genre de variables: les '''variables internes''' qui ne peuvent être utilisées qu'au sein de la puce YOLOL où elles ont été initiées et les '''variables externes''' qui font appel aux [[device fields:fr|champs de périphérique]] des appareils branchés sur le même [[data networks:fr|réseau de données]] pour en demander ou modifier les valeurs.&amp;lt;br&amp;gt;&lt;br /&gt;
Pour les différencier, les variables externes sont précédées d'un double-point (''':''').&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 if :ButtonState &amp;gt;= 1 then :DoorState = 1 end&lt;br /&gt;
* Comme vu précédemment, ce script évalue la valeur de '''ButtonState''' et, si elle est supérieure ou égale à '''1''', associe '''DoorState''' à '''1'''. Les deux variables seront cependant ici appelées sur l'ensemble des équipements présents sur le réseau de données, par exemple pour ouvrir une porte si un bouton est appuyé.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Remarques====&lt;br /&gt;
* Les champs ayant le même nom au sein du réseau de données sont liées et ont presque toujours la même valeur. Ainsi, une variable externe qui en modifie la valeur le fera sur tout les appareils associés.&lt;br /&gt;
* Il n'est actuellement pas possible d'appeler une variable initiée sur un puce YOLOL depuis une autre puce YOLOL.&lt;br /&gt;
&lt;br /&gt;
===Les Valeurs de Variables===&lt;br /&gt;
====Typage====&lt;br /&gt;
Le langage YOLOL supporte deux types de valeurs pour les variables: Les '''valeurs numériques''' et les '''chaînes de caractères''' (ou &amp;quot;string&amp;quot;). Cette différence est importante car en fonction du type de variable, le résultat d'une même instruction sera différente.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 Addition = 3 + 5&lt;br /&gt;
* Cette instruction conduit à additionner les deux valeurs numériques '''3''' et '''5'''. Le résultat sera donc '''8'''.&lt;br /&gt;
 Addition = &amp;quot;3&amp;quot; + &amp;quot;5&amp;quot;&lt;br /&gt;
* Cette instruction conduit à associer les chaînes de caractères '''&amp;quot;3&amp;quot;''' et '''&amp;quot;5&amp;quot;'''. Le résultat sera donc '''&amp;quot;35&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
Les variables sont dites à &amp;quot;faible typage&amp;quot;, c'est-à-dire qu'elles ne sont pas restreintes à un seul type. Elles se convertissent systématiquement aux valeurs qui leur sont assignées. Ainsi, une variable associée à une valeur numérique peut la remplacer par une chaîne de caractères et inversement sans provoquer d'erreur dans le code.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 AutoPilot = 128.643&lt;br /&gt;
* cette première instruction associe la variable '''AutoPilot''' à la valeur numérique '''128.643'''.&lt;br /&gt;
 AutoPilot= &amp;quot;Erreur détectée&amp;quot;&lt;br /&gt;
* La variable '''AutoPilot''' se convertit en s'associant à la chaîne de caractères '''&amp;quot;Erreur détectée&amp;quot;''' et la valeur numérique '''128.643''' est effacée.&lt;br /&gt;
&lt;br /&gt;
====Les valeurs numériques====&lt;br /&gt;
Les valeurs numérique dans le langage YOLOL sont des décimales à point fixe. La précision est de un millième: Jusqu'à trois nombre sous la décimale sont acceptés. Fournir une valeur plus précise fonctionne, mais n'affecte pas le résultat final.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 Pi = 3,14159265&lt;br /&gt;
* Le script ci-dessus tente d'associer la variable '''Pi''' à la valeur numérique '''3,14159265'''. Le résultat final sera cependant '''Pi = 3.141''', coupant la précision à trois nombre sous la décimale.&lt;br /&gt;
&lt;br /&gt;
La taille maximale d'une valeur numérique est de 64-bit. De ce fait, la portée maximale (même après opération) est de [-9223372036854775.808, 9223372036854775.807]. Toutes valeurs supérieures ou inférieures seront ramenées aux limites de la portée.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 StarTrek = 9999999999999999.999&lt;br /&gt;
* Ici, on tente d'associer la variable '''StarTrek''' à la valeur numérique '''9999999999999999.999'''. Celle-ci est cependant supérieure à la portée maximale et le résultat final sera '''StarTrek = 9223372036854775.807'''.&lt;br /&gt;
&lt;br /&gt;
====Les chaînes de caractères====&lt;br /&gt;
Pour signaler une chaîne de caractères au langage YOLOL, celle-ci doit être entourée de double-guillemets ('''&amp;quot; &amp;quot;''').&lt;br /&gt;
&lt;br /&gt;
 BadRobots= &amp;quot;Saltberia&amp;quot; &lt;br /&gt;
* Ce script associe la variable '''BadRobot''' à la chaîne de caractères '''&amp;quot;Saltberia&amp;quot;'''.&lt;br /&gt;
Comme pour les valeurs numériques, la taille maximale d'une chaîne de caractères est de 64-bit.&lt;br /&gt;
&lt;br /&gt;
====Remarques====&lt;br /&gt;
* Chaque variable ne peut être que d'un type à la fois, bien que celui-ci puisse être converti au besoin.&lt;br /&gt;
* Les valeurs &amp;quot;False&amp;quot; et &amp;quot;True&amp;quot; sont de type numérique: Elles correspondent respectivement à &amp;quot;0&amp;quot; et &amp;quot;non-0&amp;quot;.&lt;br /&gt;
* Une variable non définie préalablement a par défaut la valeur numérique &amp;quot;0&amp;quot;. L'absence de valeur (&amp;quot;null&amp;quot;) n'est pas reconnue.&lt;br /&gt;
&lt;br /&gt;
==Les Opérations==&lt;br /&gt;
A noter que si les opérations les plus basiques peuvent être utilisées par n'importe quelle [[YOLOL Chip:fr|puce YOLOL]], certaines plus complexes en nécessite des plus avancées, voire de qualité professionelle.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Les opérateurs arythmétiques ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Opération || Valeurs numériques || Chaînes de caractères || Puce nécessaire&lt;br /&gt;
|-&lt;br /&gt;
| A + B || Addition || &amp;quot;B&amp;quot; est ajouté à la suite de &amp;quot;A&amp;quot; || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A - B || Soustraction || La dernière occurence de &amp;quot;B&amp;quot; dans &amp;quot;A&amp;quot; est supprimée || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A * B || Multiplication || Erreur d'exécution. Le reste de la ligne est passé || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A / B || Division || Erreur d'exécution. Le reste de la ligne est passé || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A ^ B || Exponentielle || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| A % B || Modulo || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| ABS A || Absolue || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| A! || Factorielle || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| SQRT A || Racine carrée || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| SIN A || Sinus (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|-&lt;br /&gt;
| COS A || Cosinus (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|-&lt;br /&gt;
| TAN A || Tangente (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|-&lt;br /&gt;
| ASIN A || Sinus inversé (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|-&lt;br /&gt;
| ACOS A || Cosinus inversé (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|-&lt;br /&gt;
| ATAN A || Tangente inversée (degrés) || Erreur d'exécution. Le reste de la ligne est passé || Professionnelle&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Les opérateurs d'assignation===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation || Valeurs numériques || Chaînes de caractères || Puce nécessaire&lt;br /&gt;
|-&lt;br /&gt;
| A = B || Assignation || Assignation || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A += B || Addition-assignation (A=A+B) || Addition-assignation (A=A+B) || Basique&lt;br /&gt;
|-&lt;br /&gt;
| ++ A  || Pré-incrémentation (A=A+1) || Ajoute un espace à la suite de &amp;quot;A&amp;quot;. Evalué sur la valeur modifiée || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A ++ || Post-incrémentation (A=A+1) || Ajoute un espace à la suite de &amp;quot;A&amp;quot;. Evalué sur la valeur d'origine || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A -= B || Soustraction-assignation (A=A-B) || Soustraction-assignation (A=A-B) || Basique&lt;br /&gt;
|-&lt;br /&gt;
| -- A || Pré-décrémentation (A=A-1) || Retire le dernier caractère de la chaîne. Erreur d'éxecution si la chaîne est vide. Evalué sur la valeur modifiée || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A -- || Post-décrémentation (A=A-1) || Retire le dernier caractère de la chaîne. Erreur d'éxecution si la chaîne est vide. Evalué sur la valeur d'origine || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A *= B || Multiplication-assignation (A=A*B) || Erreur d'exécution. Le reste de la ligne est passé || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A /= B || Division-assignation (A=A/B) || Erreur d'exécution. Le reste de la ligne est passé || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A ^= B || Exponentielle-assignation (A=A^B) || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
| A %= B || Modulo-assignation (A=A%B) || Erreur d'exécution. Le reste de la ligne est passé || Avancée&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Les opérateurs logiques ===&lt;br /&gt;
&lt;br /&gt;
Logical operators are checks that identify if the statement is true or false.&amp;lt;br&amp;gt;&lt;br /&gt;
All logical operations return either '''&amp;quot;0 for False&amp;quot;''' or '''&amp;quot;1 for True&amp;quot;'''. &lt;br /&gt;
The '''NOT''', '''AND''', and '''OR''' keywords consider 0 to be falsy and anything not 0 to be truthy.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation || Numeric operation || String operation || Chip availability&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;lt; B || A est plus petit que B || &amp;quot;A&amp;quot; est avant &amp;quot;B&amp;quot; dans l'ordre alphabétique || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;gt; B || A est plus grand que B || &amp;quot;A&amp;quot; est après &amp;quot;B&amp;quot; dans l'ordre alphabétique || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A == B || A est égal à B || &amp;quot;A&amp;quot; est égale à &amp;quot;B&amp;quot; || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;lt;= B || &amp;lt; ou == || &amp;lt; ou == || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;gt;= B || &amp;gt; ou == || &amp;gt; ou == || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A != B || A n'est pas égal à B || &amp;quot;A&amp;quot; n'est pas égale à &amp;quot;B&amp;quot; || Basique&lt;br /&gt;
|-&lt;br /&gt;
| NOT A || A est égal à 0 || &amp;quot;A&amp;quot; est 0 || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A AND B || A et B ne sont pas égaux à 0  || &amp;quot;A&amp;quot; et &amp;quot;B&amp;quot; ne sont pas 0 || Basique&lt;br /&gt;
|-&lt;br /&gt;
| A OR B || A ou B n'est pas égal à 0 || &amp;quot;A&amp;quot; ou &amp;quot;B&amp;quot; n'est pas 0 || Basique&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Opérations sur des variables mixtes ===&lt;br /&gt;
&lt;br /&gt;
Mixing variable types in an operation handles the operation using all parameters as ''strings''.&lt;br /&gt;
&lt;br /&gt;
 previouslyNumber= &amp;quot;10&amp;quot; + 15&lt;br /&gt;
* The above script results in '''previouslyNumber''' containing the string value &amp;quot;1015&amp;quot;.&lt;br /&gt;
** Note that the involved parameters themselves don't change types, their values are just cast as strings for the purpose of the operation:&lt;br /&gt;
 &lt;br /&gt;
 purelyNumber = 15&lt;br /&gt;
 purelyString = &amp;quot;10&amp;quot; + purelyNumber&lt;br /&gt;
* When this script has executed, '''purelyString''' contains the string value of &amp;quot;1015&amp;quot;, while '''purelyNumber''' still contains the numeric value of 15.&lt;br /&gt;
&lt;br /&gt;
=== Ordre des opérations ===&lt;br /&gt;
&lt;br /&gt;
Operations are conducted in the following order, when operators have the same precidence, left to right.&amp;lt;br&amp;gt;&lt;br /&gt;
Where a line has multiple statements, they are executed left to right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operateurs&lt;br /&gt;
|-&lt;br /&gt;
| Incrémentation (++), décrémentation (--)&lt;br /&gt;
|-&lt;br /&gt;
| Factorielle (!)&lt;br /&gt;
|-&lt;br /&gt;
| Racine carrée (sqrt), modulo (%), absolue (abs), sinus (sin), cosinus (cos), tangente (tan)&lt;br /&gt;
|-&lt;br /&gt;
| Négatif arythmétique (-)&lt;br /&gt;
|-&lt;br /&gt;
| Exponentielle (^)&lt;br /&gt;
|-&lt;br /&gt;
| Multiplication (*), division (/)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;, &amp;gt;, ==, !=, &amp;lt;=, &amp;gt;=&lt;br /&gt;
|-&lt;br /&gt;
| Addition (+), soustraction (-)&lt;br /&gt;
|-&lt;br /&gt;
| Négation logique (not)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;Ou&amp;quot; logique (or)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;Et&amp;quot; logique (and)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Les Commandes==&lt;br /&gt;
&lt;br /&gt;
=== If-else conditional ===&lt;br /&gt;
&lt;br /&gt;
If-else statements are used to branch out the script into different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
They use the following syntax:&lt;br /&gt;
* '''if ''condition'' then ''statement'' else ''statement'' end'''&lt;br /&gt;
** Condition is a statement that results in a numeric value (where 0 is parsed as False, anything else as True), and statements are pieces of script that are run.&lt;br /&gt;
** All If-else conditional stations must have '''end''' syntax written after statement is complete.&lt;br /&gt;
** The statement has to be on one line. The if, then, else and end cannot be on different lines.&lt;br /&gt;
&lt;br /&gt;
If can be used to branch script execution into two possible outcomes temporarily based on variable value(s).&amp;lt;br&amp;gt;&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable != 2 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 3 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; endResult = 4 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* This script sets the value of '''endResult''' to 3 if '''variable''' does not have the value of 2.&lt;br /&gt;
* If '''variable''''s value is 2, '''endResult''' is set to the value of 4.&lt;br /&gt;
&lt;br /&gt;
Note that the else statement -part can be left out if not needed. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable != 2 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 3 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
*This script only sets the value of 3 to '''endResult''' if '''variable''' does not have a value of 2, and doesn't do anything else.&lt;br /&gt;
&lt;br /&gt;
==== Nesting if statements ====&lt;br /&gt;
&lt;br /&gt;
It is possible to place if-conditionals inside the true/false statement blocks to achieve further branching of execution.&amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 0 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 1 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 1 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 2 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &lt;br /&gt;
* This script sets '''endResult''' to 1 if '''variable''' equals 0.&lt;br /&gt;
* If '''variable''' doesn't equal 0, but it equals 1, '''endResult''' is set to 2.&lt;br /&gt;
&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 0 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; endResult == 1 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 2 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; endResult = 1 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
* This script sets '''endResult''' to 2 if '''variable''' has a value of 0, and '''endResult''' equals to 1.&lt;br /&gt;
* Otherwise it sets '''endResult''' to 1.&lt;br /&gt;
&lt;br /&gt;
=== Goto ===&lt;br /&gt;
&lt;br /&gt;
Goto syntax is used when the normal script reading order from 1-&amp;gt;20 is not desired, or needs to be altered.&lt;br /&gt;
&lt;br /&gt;
Goto is used with the following syntax:&lt;br /&gt;
*'''goto lineNumber'''&lt;br /&gt;
** lineNumber is the line which this command will take the script execution.&amp;lt;br&amp;gt;&lt;br /&gt;
** Any remaining script that is on the same line after the goto-command will not be executed.&lt;br /&gt;
*** using if statements before goto ignores goto syntax, assuming the if-statement is false&lt;br /&gt;
** Multiple goto commands can be added on the same line using conditionals, as '''False''' goto commands are skipped.&lt;br /&gt;
** Numeric values outside the [1,20] range are clamped to this range.&lt;br /&gt;
** Non-integer values are floored.&lt;br /&gt;
** String values will result in a Runtime Error.&lt;br /&gt;
&lt;br /&gt;
 if variable == 5 then '''goto 4''' end '''goto 6'''&lt;br /&gt;
&lt;br /&gt;
The script above will go to line number 4, if '''variable''' has a value of 5.&amp;lt;br&amp;gt;&lt;br /&gt;
Otherwise it will go to line number 6. Numerical operations can also be done &amp;quot;inside&amp;quot; the goto, e.g. &lt;br /&gt;
&lt;br /&gt;
  goto 4+1&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
Comments are useful when writing code that is used by a lot of programmers.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that comments also use up space from the pre-determined 70 character line limit and are not excluded from it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commenting is used with the following syntax:&lt;br /&gt;
*// '''text'''&lt;br /&gt;
** Text can be any single-line set of characters.&lt;br /&gt;
&lt;br /&gt;
 '''//''' This is a comment. It will explain how other lines of script work.&lt;br /&gt;
* An example of a possible comment syntax&lt;br /&gt;
&lt;br /&gt;
== Les erreurs ==&lt;br /&gt;
&lt;br /&gt;
Il y a deux types d'erreurs qui peuvent survenir pendant l'éxecution d'une séquence YOLOL:&lt;br /&gt;
# '''Les erreurs de syntaxe (&amp;quot;syntax errors&amp;quot;)''': elles résultent d'un script invalide et empêchent l'interprétation de la ligne toute entière, qui est donc ignorée pour passer directement à la suivante.&lt;br /&gt;
# '''Les erreurs d'exécution (&amp;quot;runtime errors&amp;quot;)''': elles ne sont détectées que pendant l'éxecution du script et provoquent l'arrêt de l'interprétation de la ligne en cours pour passer à la suivante. Elles n'impactent donc pas les instructions antérieures.&lt;br /&gt;
&lt;br /&gt;
== Bugs connus/Comportements indésirables==&lt;br /&gt;
Voici une liste des problèmes relevés avec l'utilisation du langage YOLOL:&amp;lt;br&amp;gt;&lt;br /&gt;
* Les noms de variables contenant les mots-clé &amp;quot;if&amp;quot;, &amp;quot;else&amp;quot; et &amp;quot;end&amp;quot; sont mal interprétés par le langage et provoquent une erreur de syntaxe. Les noms tels que '''life''' ou '''endurance''' sont donc à éviter.&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
==YOLOL Tips &amp;amp; Tricks==&lt;br /&gt;
* [[Common YOLOL|Common YOLOL scripts]]&lt;br /&gt;
* [[YOLOL Tricks]]&lt;br /&gt;
&lt;br /&gt;
== Pages associées ==&lt;br /&gt;
* [[Data networks:fr|Réseaux de données]]&lt;br /&gt;
* [[Devices and machines:fr|Appareils et machines]]&lt;br /&gt;
* [[Device fields:fr|Champs de périphérique ]]&lt;br /&gt;
* [[Universal tool:fr|Outil universel]]&lt;br /&gt;
* [[YOLOL Chip:fr|Puce YOLOL]]&lt;br /&gt;
* [[Chip socket:fr|Socle à puce]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Networks|YOLOL:fr]]&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=Spaceship_assembly_guide/fr&amp;diff=30502</id>
		<title>Spaceship assembly guide/fr</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=Spaceship_assembly_guide/fr&amp;diff=30502"/>
		<updated>2022-04-07T22:51:01Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: Errata&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Otherlang2&lt;br /&gt;
|en=spaceship assembly guide&lt;br /&gt;
|fr=spaceship assembly guide:fr&lt;br /&gt;
|ru=Гайд по созданию кораблей&lt;br /&gt;
|ua=Гайд по будівництву кораблів&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
{{#evt:service=youtube|id=https://www.youtube.com/watch?v=qLIkz2IO5iA|alignment=center}}&lt;br /&gt;
&lt;br /&gt;
This guide is an introduction to spaceship building in Starbase. It will introduce the basics of spaceship hull structure, and basic devices and machinery needed for a working spaceship.&lt;br /&gt;
&lt;br /&gt;
== Good To Know Before Starting ==&lt;br /&gt;
*You should have basic knowledge of device configurations and YOLOL in Starbase, as this guide includes machinery and devices.&lt;br /&gt;
*You should have basic knowledge of the Spaceship Designer before attempting spaceship assembly.&lt;br /&gt;
*Spaceship Designer: Pre-made blueprints/Tutorials/Tutorial Starter Spaceship&lt;br /&gt;
*In [[Spaceship_resources|Spaceship resources]] you will find information about different resources that spaceships will use.&lt;br /&gt;
&lt;br /&gt;
== Spaceship Requirements ==&lt;br /&gt;
Each spaceship requires the following things to fly: &lt;br /&gt;
&lt;br /&gt;
*Valid Frame/Hull &lt;br /&gt;
*Thrusters &lt;br /&gt;
*Powersource: Generator or Batteries &lt;br /&gt;
*Propellant for thrusters &lt;br /&gt;
*Data Network &lt;br /&gt;
*Pipe network for propellant &lt;br /&gt;
*Ship controls and basic configuration &lt;br /&gt;
&lt;br /&gt;
== Valid Frame And Hull Structure ==&lt;br /&gt;
*All spaceships need to be built according to the durability rules in order to be able to fly without breaking.&lt;br /&gt;
**Foundation of the durability rules is the frame of beams which forms the ship’s hull, and to which everything else is attached to.&lt;br /&gt;
&lt;br /&gt;
*A valid ship frame consists of beams connected to each other with attachment plates and bolts, and a valid thruster base (Device hardpoint) is connected to the beams directly.&lt;br /&gt;
**The hardpoint is connected to beams with at least two bolts, and an actual thruster is in contact with the hardpoint. &lt;br /&gt;
**The thruster has to be properly positioned (forming a data connection with the base) and connected to the same frame as the base.&lt;br /&gt;
&lt;br /&gt;
*Ship frame must be consistent, there can't be two different frames that are not connected to each other.&lt;br /&gt;
**If there are two separate frames, the bigger one will be used as there can be only one frame.&lt;br /&gt;
&amp;lt;gallery widths=500px heights=400px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Frame_example.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Beam Frame ===&lt;br /&gt;
&amp;lt;gallery widths=500px heights=400px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Attachment_plate_beam_example.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Plates === &lt;br /&gt;
====Outer Plates====&lt;br /&gt;
*Outer plating protects the ship from weapon fire, collisions and radiation during warp travel.&lt;br /&gt;
*There should not be any gaps on the exterior plating of the ship, otherwise radiation gets through during warp travel. Beams and plates withstand normal flying and there can be exposed beams if the ship is not meant for warp travel.&lt;br /&gt;
*Plates are connected to the frame with bolts.&lt;br /&gt;
&lt;br /&gt;
====Inner Plates====&lt;br /&gt;
*The main difference between inner and outer plates is the material.&lt;br /&gt;
*Inner plating is not necessary regarding the ship's durability and ability fly, but makes it easier to walk inside the ship, and helps with weapon damage.&lt;br /&gt;
*It is recommended to have at least some interior plating to make character movement smoother and make the ship interior more aesthetic.&lt;br /&gt;
*Interior plating also helps when placing machinery, devices, cables and piping.&lt;br /&gt;
&amp;lt;gallery widths=300px heights=300px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Outer_inner_plates_example.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Hardpoints ===&lt;br /&gt;
*Thrusters and other machinery outside the ship’s hull have to be connected to the ship’s '''data network'''. &lt;br /&gt;
*Thrusters also need to be connected to the ship’s '''propellant gas network.'''&lt;br /&gt;
*Connecting thrusters and machinery to the spaceship networks is done with '''hardpoints'''. &lt;br /&gt;
*Hardpoints have pipe and cable slots for connecting pipes and cables. This means hardpoints need to be placed on the frame so that cabling and piping can be done.&lt;br /&gt;
&lt;br /&gt;
*As thrusters need hardpoints to work, it is important to pay attention to where to place the hardpoints. Thruster locations greatly affect how the ship flies and how easily the ship can be maneuvered.&lt;br /&gt;
&amp;lt;gallery widths=400px heights=400px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Hardpoint_example_.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Modules ===&lt;br /&gt;
&lt;br /&gt;
*Modules are plates, beams, etc. which are grouped together. The purpose of the modules is to make constructing spaceships faster and easier than using single parts.&lt;br /&gt;
&lt;br /&gt;
*Every module has at least one Parent Object (Green Sphere) that ties the objects in the module together. Modules can be moved and rotated as a whole by having green sphere selected (module icon).&lt;br /&gt;
&lt;br /&gt;
*'''It is highly recommended that beginners start building with modules.'''&lt;br /&gt;
**Using modules should automatically ensure that the spaceship structure is correct.&lt;br /&gt;
**Modules are the best way to learn the building grid and good building patterns.&lt;br /&gt;
**There is a lot of different building parts in the game and this can be overwhelming at first. Using modules reduces the number of building parts you need to remember.&lt;br /&gt;
**The building process will be faster and the progress is easier to notice.&lt;br /&gt;
**Basic modules for smaller and medium sized ships are introduced in: Premade blueprints/Tutorials/Tutorial Starter Spaceship&lt;br /&gt;
**The basic modules are for building 90 degree angles. This means the hull will have box-like appearance at first. The hull can be decorated with decoration parts and normal plates later on. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;gallery widths=800px heights=900px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Basic_starter_set_modules_guide_picture.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The Grid ===&lt;br /&gt;
*Spaceship modules use a 48 cm grid. This is because the basic hull thickness is 48 cm.&lt;br /&gt;
*Outer plating (12 cm) + beam frame (24 cm) + inner plating (12 cm) = 48 cm&lt;br /&gt;
*Keeping the hull structure in the grid ensures that beams connect easily.&lt;br /&gt;
&amp;lt;gallery widths=400px heights=400px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Grid_example.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bolting And Durability ===&lt;br /&gt;
*Each part of the ship has its own mass. In durability calculations, the mass of different parts is transferred towards the frame via connections (bolts) and other parts. This means parts close to the frame need to support all the parts further away from the frame.&lt;br /&gt;
&lt;br /&gt;
*When building your first spaceship, it is good to do test bolting and durability checks in the middle of the building process. This way you can avoid unnecessary extra work and keep the hull structure consistent all the time.&lt;br /&gt;
&lt;br /&gt;
*Durability Tool will report '''No ship frame''' when there are no thruster bases with connected thrusters connected to the frame. When there is at least one thruster properly connected to the thruster base and both are connected to the frame with bolts, Durability Tool will show '''Ship Warp Class X'''. If the ship warp class is lower than one, it means there are parts which are poorly connected to the frame.&lt;br /&gt;
&lt;br /&gt;
*When the Durability Tool shows warp class for the ship, it also means that '''a frame integrity check''' can be done. (Durability tool→ Right mouse button). The frame integrity check basically studies how solidly each frame beam (and whatever it supports) is connected to the frame-attached thrusters.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=400px heights=400px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Frame_integrity_check_SSC.jpg|If the frame design is not balanced enough, certain sections may encounter too much stress. This creates a durability error for the frame beam.&lt;br /&gt;
File:Frame_integrity_check_SSC_2.jpg|This is the same spot but some attachment plates and bolts have been removed between beams. Notice the color change which means those beams are about to fail.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Thrusters ==&lt;br /&gt;
A spaceship needs thrusters to be able to fly and thrusters need to be bolted to the hull.&lt;br /&gt;
&lt;br /&gt;
*Thrusters can be divided to two types: '''main thrusters''' and '''maneuver thrusters'''. Main thrusters generate forward movement and maneuver thrusters enable yaw, pitch and roll for example. Each thruster model can act as a main thruster or a maneuver thruster. To which movement the thruster will contribute, the defining factor is position and orientation of the thruster.&lt;br /&gt;
&lt;br /&gt;
*Location of thrusters greatly affects how easy the ship is to maneuver. For example if your ship is missing forward facing thrusters, your ship won’t be able to fly backwards.&lt;br /&gt;
&lt;br /&gt;
*Mass is also a factor when placing thrusters to your spaceship. Each beam, plate and machinery you have placed on your ship has mass. The bigger your ship is, more thrust it will need.&lt;br /&gt;
&lt;br /&gt;
*Thrusters need '''electricity''' and '''propellant''' to work. Thrusters consume more propellant than power. This means civilian ships without weaponry can have smaller generators and mainly focus on propellant containers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Maneuver thrusters'''&lt;br /&gt;
*Maneuver thrusters are usually smaller and don’t need to provide much thrust.&lt;br /&gt;
*There are three sizes of thrusters in Starbase: box thruster, triangle thruster and maneuver thruster. Each thruster can be used as a maneuver thruster even thought only one is named a ”maneuver thruster”.&lt;br /&gt;
&lt;br /&gt;
'''Main thrusters'''&lt;br /&gt;
*Main thrusters are usually the thrusters that are facing backwards as this enables forward movement for the ship.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Maneuver thruster&lt;br /&gt;
*Max thrust: 50 000&lt;br /&gt;
*The small maneuver thruster is placed on a hardpoint&lt;br /&gt;
&lt;br /&gt;
Box thruster&lt;br /&gt;
*Max thrust: 500 000&lt;br /&gt;
*The box thruster is connected to a hardpoint from the side and this thruster can’t be stacked&lt;br /&gt;
&lt;br /&gt;
Triangle thruster&lt;br /&gt;
*Max thrust: 300 000&lt;br /&gt;
*The biggest difference the triangle thruster has compared to the other two thrusters is that it can be stacked. Only one triangle thruster needs connection with a hardpoint and more triangle thrusters can be connected to that thruster. Stacked triangle thrusters share same device field name which is linked to MFC and operate as a whole.&lt;br /&gt;
&lt;br /&gt;
== Power Source ==&lt;br /&gt;
Machines and devices need power in spaceships. Power can be provided with generator or batteries&lt;br /&gt;
&lt;br /&gt;
=== Generator === &lt;br /&gt;
Generator pieces are modular and can be used to build bigger and smaller generators. &amp;lt;br&amp;gt;&lt;br /&gt;
Working generator will need at least one '''generator fuel chamber''', one '''small fuelrod,''' one '''generator unit''', one '''generator socket board''', one '''generator cooling rack''' and one '''small cooling cell'''.&lt;br /&gt;
*Place the generator in a way that there is enough room to pull out the fuel rod&lt;br /&gt;
*Also make sure there is an easy access to the socket board and to the coolant cells.&lt;br /&gt;
*The generator parts need to be bolted together and the generator needs to be bolted to the ship.&lt;br /&gt;
*Generator cooling can also provided by using Radiator&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=400px heights=400px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Generator_example.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Propellant ==&lt;br /&gt;
Thrusters need and consume propellant to work. Propellant is stored in propellant containers. The amount of containers spaceship will need depends on how many thrusters it has.&lt;br /&gt;
*There are three sizes of propellant containers: small, medium and large.&lt;br /&gt;
*While placing the propellant containers make sure there is an access to at least two of the sockets found in the tank support.&lt;br /&gt;
*The propellant container needs to be bolted to the ship.&lt;br /&gt;
&lt;br /&gt;
== Data Network ==&lt;br /&gt;
The spaceship needs a cable network to transfer electricity to all the machinery and data between all the devices.&lt;br /&gt;
*Use the cabling tool to connect all the machinery and devices to the same network.&lt;br /&gt;
*Make sure that all the devices and machinery: thrusters, doors, MCU, FCU, levers, lamps and buttons are connected to the network.&lt;br /&gt;
&amp;lt;gallery widths=800px heights=800px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Data_network_example.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;gallery widths=400px heights=400px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Data_network_example_02.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pipe Network For Propellant ==&lt;br /&gt;
The spaceship needs a pipe network to transfer propellant to all thrusters from propellant containers.&lt;br /&gt;
*Use [[Pipe tool]] to connect all propellant containers and hardpoints with thrusters.&lt;br /&gt;
*To get information from propellant network, containers also need to be in electricity network. Connecting one propellant container support to electricity network can be used to show the total amount of propellant in the pipe network.&lt;br /&gt;
&amp;lt;gallery widths=800px heights=800px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Pipe_network_example.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;gallery widths=400px heights=400px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Cable_piping_example.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Ship Controls And Basic Configuration ==&lt;br /&gt;
Spaceship thrusters can be controlled directly with levers, buttons and YOLOL. However YOLOL-configured thruster balance settings and flying are very ship specific configurations. The following guide explains how to use and configure Flight Control Unit (FCU) and Main Flight Computer (MFC) to do thruster balance calculations and settings for you.&lt;br /&gt;
*If you are interested about YOLOL configured thruster balance settings and flying you can examine Spaceship Vasama in the Spaceship Designer.&lt;br /&gt;
&lt;br /&gt;
===Flight Control Unit (FCU)===&lt;br /&gt;
&lt;br /&gt;
*'''The FCU''' gets input from control devices (levers and buttons) and sends it to the '''Main Flight Computer''', which forwards it to the thrusters.&lt;br /&gt;
*The arrows on top of the FCU define the ”forward” direction of the ship. &lt;br /&gt;
*There can be more than one FCU connected to one Main Flight Computer.&lt;br /&gt;
*There are currently three FCU models in Starbase:  Basic, Advanced and Premium model. Each model has a different set of ship movements available.&lt;br /&gt;
&lt;br /&gt;
'''Basic model''':&lt;br /&gt;
* FcuMfcIO (for connecting the MFC)&lt;br /&gt;
* FcuInputRange (Lever input range) &lt;br /&gt;
* FcuGeneralMultiplier (a &amp;quot;soft power switch&amp;quot;, scales all output)&lt;br /&gt;
* FcuForward (moves the ship straight forward or combines FcuFwdBwd rotations with the forward movement)&lt;br /&gt;
* FcuBackward (moves the ship straight backward or combines FcuFwdBwd rotations with the backward movement)&lt;br /&gt;
* FcuRotationalPitch (in-place pitch rotation)&lt;br /&gt;
* FcuRotationalYaw (in-place yaw rotation)&lt;br /&gt;
* FcuRotationalRoll (in-place roll rotation)&lt;br /&gt;
&lt;br /&gt;
'''Advanced model''' (in addition to the Basic controls):&lt;br /&gt;
* FcuUpDown (moves the ship straight up or down)&lt;br /&gt;
* FcuRightLeft (moves the ship straight right or left)&lt;br /&gt;
&lt;br /&gt;
'''Premium model''' (in addition to the Advanced controls):&lt;br /&gt;
* FcuFwdBwdPitch (rotation combined to forward/backward movement)&lt;br /&gt;
* FcuFwdBwdYaw (rotation combined to forward/backward movement)&lt;br /&gt;
* FcuFwdBwdRoll (rotation combined to forward/backward movement)&lt;br /&gt;
&lt;br /&gt;
[[File:FCU_and_MFC_assembly_guide.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
===Main Flight Computer (MFC)===&lt;br /&gt;
&lt;br /&gt;
*'''MFC''' is placed in the same data network with a '''Flight Control Unit''' and '''thrusters'''.  The MFC and FCU share one identical device field name.&lt;br /&gt;
*MFC gets input from the Flight Control Unit and sends this data to the thrusters, telling them what to do. For example &amp;quot;pilot interacts with yaw lever&amp;quot;. The FCU receives the information and sends it to the Main Flight Computer. The MFC then automatically decides which thursters are used to make the ship yaw. &lt;br /&gt;
*Each thruster group is controlled by exactly one MFC. There can be several MFCs in one ship.&lt;br /&gt;
&lt;br /&gt;
===Levers===&lt;br /&gt;
&lt;br /&gt;
The Flight Control Unit (FCU) gets input from control devices like levers and buttons. To get the levers to work with an FCU you need to configure the lever device fields to match with the FCU device fields (see picture below).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=600px heights=600px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Lever_fcu_assembly_example.jpg|Examine '''FCU''' device fields and levers.  Also notice matching device fields in the '''MFC'''  and the '''FCU'''&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Lever Examples====&lt;br /&gt;
&lt;br /&gt;
'''Note!''' These are examples for a ship that has an FCU and an MFC. Also the FCU input Range is set to 100. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=500px heights=500px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File:Lever_assembly_example_1.jpg|Lever settings for '''forward thrust'''. If the FCU input range would be 1000, then LeverMaxOutput  would be 1000 and LeverBindsMoveSpeed would be also higher&lt;br /&gt;
File:Lever_assembly_example_2.jpg|Centered lever settings for yaw.  Notice LeverCenteringSpeed. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Thruster configuration===&lt;br /&gt;
&lt;br /&gt;
The Main Flight Computer controls the thrusters. One MFC can handle 50 thrusters, which means there are 50 device fields for thrusters in an MFC (thrusterPowerLevelXX). These field names are set for ship's thrusters. Field names can be renamed but each thruster should have a unique device field name (excluding stacked triangle thrusters).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=800px heights=600px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:data_network_example.jpg| Examine the '''MFC''' device fields (thrusterpowerlevel...) and thruster device field names set to thrusters throughout the data network&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;gallery widths=500px heights=600px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Thruster_device_field_example_01.jpg|A configured thruster: When a thruster is connected to same data network with an MFC and is given matching field name with the MFC thruster list, the values should automatically update and be the same. Also in this case '''ThrusterCurrentThrust''' field name has been changed to '''T07''' ( This can be linked to Progress Bar)  &lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
&lt;br /&gt;
'''Checklist'''&lt;br /&gt;
&lt;br /&gt;
Each spaceship needs the following things to fly:&lt;br /&gt;
*Valid frame/Hull&lt;br /&gt;
*Thrusters&lt;br /&gt;
*Powersource&lt;br /&gt;
*Propellant for thrusters&lt;br /&gt;
*Data Network&lt;br /&gt;
*Pipe network for propellant&lt;br /&gt;
*Ship controls and basic configuration&lt;br /&gt;
&lt;br /&gt;
'''My ship is not moving?'''&lt;br /&gt;
# Check durability and bolting→ Thruster hardpoints are bolted to the frame and thrusters are bolted to the hardpoints/ hull.  The ship frame is consistent and bolted.&lt;br /&gt;
# Thrusters need electricity and propellant → Check  cabling and piping (all thruster hardpoints are connected to the electricity network and to the propellant pipe network. &lt;br /&gt;
# Electricity network (cable) is connected to the generator.  Check that the generator has all the necessary parts → see 3. Powersource/generator&lt;br /&gt;
# Pipe network is connected to the propellant containers → see Pipe network for propellant&lt;br /&gt;
# Check the thruster configuration → see thruster configuration  (matching device field names and values in MFC and in thrusters  '''(If the ship is using an MFC)'''&lt;br /&gt;
# Check matching device field names in the MFC and FCU → see picture in Levers section&lt;br /&gt;
# Check matching device field names in the levers and in the FCU → see picture in Levers section&lt;br /&gt;
&lt;br /&gt;
'''When I start flying my ship, some pieces of the ship detach?'''&lt;br /&gt;
*Use the Durability Tool.  Check that everything is green and bolted. &lt;br /&gt;
'''My ship is almost symmetrical but still doesn’t fly straight/ turns easier to one direction?'''&lt;br /&gt;
*Some thrusters might not be working → Check :  1 , 2,  3, 4 ,5&lt;br /&gt;
'''All thrusters seem to working but ship yaw/pitch/roll is slow?'''&lt;br /&gt;
*In some cases you might need re-position thrusters or add more thrusters. Upgrading FCU to premium model which has combined movements possibilities can also be helpful in some cases.&lt;br /&gt;
&lt;br /&gt;
[[Category:Guides]] [[Category:Spaceships]]&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=Spaceship_assembly_guide/fr&amp;diff=30501</id>
		<title>Spaceship assembly guide/fr</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=Spaceship_assembly_guide/fr&amp;diff=30501"/>
		<updated>2022-04-07T22:50:32Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: Ajout d'un lien vers la video Youtube&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Otherlang2&lt;br /&gt;
|en=spaceship assembly guide&lt;br /&gt;
|fr=spaceship assembly guide:fr&lt;br /&gt;
|ru=Гайд по созданию кораблей&lt;br /&gt;
|ua=Гайд по будівництву кораблів&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{#evt:service=youtube|id=https://www.youtube.com/watch?v=qLIkz2IO5iA|alignment=center}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
This guide is an introduction to spaceship building in Starbase. It will introduce the basics of spaceship hull structure, and basic devices and machinery needed for a working spaceship.&lt;br /&gt;
&lt;br /&gt;
== Good To Know Before Starting ==&lt;br /&gt;
*You should have basic knowledge of device configurations and YOLOL in Starbase, as this guide includes machinery and devices.&lt;br /&gt;
*You should have basic knowledge of the Spaceship Designer before attempting spaceship assembly.&lt;br /&gt;
*Spaceship Designer: Pre-made blueprints/Tutorials/Tutorial Starter Spaceship&lt;br /&gt;
*In [[Spaceship_resources|Spaceship resources]] you will find information about different resources that spaceships will use.&lt;br /&gt;
&lt;br /&gt;
== Spaceship Requirements ==&lt;br /&gt;
Each spaceship requires the following things to fly: &lt;br /&gt;
&lt;br /&gt;
*Valid Frame/Hull &lt;br /&gt;
*Thrusters &lt;br /&gt;
*Powersource: Generator or Batteries &lt;br /&gt;
*Propellant for thrusters &lt;br /&gt;
*Data Network &lt;br /&gt;
*Pipe network for propellant &lt;br /&gt;
*Ship controls and basic configuration &lt;br /&gt;
&lt;br /&gt;
== Valid Frame And Hull Structure ==&lt;br /&gt;
*All spaceships need to be built according to the durability rules in order to be able to fly without breaking.&lt;br /&gt;
**Foundation of the durability rules is the frame of beams which forms the ship’s hull, and to which everything else is attached to.&lt;br /&gt;
&lt;br /&gt;
*A valid ship frame consists of beams connected to each other with attachment plates and bolts, and a valid thruster base (Device hardpoint) is connected to the beams directly.&lt;br /&gt;
**The hardpoint is connected to beams with at least two bolts, and an actual thruster is in contact with the hardpoint. &lt;br /&gt;
**The thruster has to be properly positioned (forming a data connection with the base) and connected to the same frame as the base.&lt;br /&gt;
&lt;br /&gt;
*Ship frame must be consistent, there can't be two different frames that are not connected to each other.&lt;br /&gt;
**If there are two separate frames, the bigger one will be used as there can be only one frame.&lt;br /&gt;
&amp;lt;gallery widths=500px heights=400px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Frame_example.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Beam Frame ===&lt;br /&gt;
&amp;lt;gallery widths=500px heights=400px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Attachment_plate_beam_example.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Plates === &lt;br /&gt;
====Outer Plates====&lt;br /&gt;
*Outer plating protects the ship from weapon fire, collisions and radiation during warp travel.&lt;br /&gt;
*There should not be any gaps on the exterior plating of the ship, otherwise radiation gets through during warp travel. Beams and plates withstand normal flying and there can be exposed beams if the ship is not meant for warp travel.&lt;br /&gt;
*Plates are connected to the frame with bolts.&lt;br /&gt;
&lt;br /&gt;
====Inner Plates====&lt;br /&gt;
*The main difference between inner and outer plates is the material.&lt;br /&gt;
*Inner plating is not necessary regarding the ship's durability and ability fly, but makes it easier to walk inside the ship, and helps with weapon damage.&lt;br /&gt;
*It is recommended to have at least some interior plating to make character movement smoother and make the ship interior more aesthetic.&lt;br /&gt;
*Interior plating also helps when placing machinery, devices, cables and piping.&lt;br /&gt;
&amp;lt;gallery widths=300px heights=300px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Outer_inner_plates_example.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Hardpoints ===&lt;br /&gt;
*Thrusters and other machinery outside the ship’s hull have to be connected to the ship’s '''data network'''. &lt;br /&gt;
*Thrusters also need to be connected to the ship’s '''propellant gas network.'''&lt;br /&gt;
*Connecting thrusters and machinery to the spaceship networks is done with '''hardpoints'''. &lt;br /&gt;
*Hardpoints have pipe and cable slots for connecting pipes and cables. This means hardpoints need to be placed on the frame so that cabling and piping can be done.&lt;br /&gt;
&lt;br /&gt;
*As thrusters need hardpoints to work, it is important to pay attention to where to place the hardpoints. Thruster locations greatly affect how the ship flies and how easily the ship can be maneuvered.&lt;br /&gt;
&amp;lt;gallery widths=400px heights=400px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Hardpoint_example_.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Modules ===&lt;br /&gt;
&lt;br /&gt;
*Modules are plates, beams, etc. which are grouped together. The purpose of the modules is to make constructing spaceships faster and easier than using single parts.&lt;br /&gt;
&lt;br /&gt;
*Every module has at least one Parent Object (Green Sphere) that ties the objects in the module together. Modules can be moved and rotated as a whole by having green sphere selected (module icon).&lt;br /&gt;
&lt;br /&gt;
*'''It is highly recommended that beginners start building with modules.'''&lt;br /&gt;
**Using modules should automatically ensure that the spaceship structure is correct.&lt;br /&gt;
**Modules are the best way to learn the building grid and good building patterns.&lt;br /&gt;
**There is a lot of different building parts in the game and this can be overwhelming at first. Using modules reduces the number of building parts you need to remember.&lt;br /&gt;
**The building process will be faster and the progress is easier to notice.&lt;br /&gt;
**Basic modules for smaller and medium sized ships are introduced in: Premade blueprints/Tutorials/Tutorial Starter Spaceship&lt;br /&gt;
**The basic modules are for building 90 degree angles. This means the hull will have box-like appearance at first. The hull can be decorated with decoration parts and normal plates later on. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;gallery widths=800px heights=900px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Basic_starter_set_modules_guide_picture.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The Grid ===&lt;br /&gt;
*Spaceship modules use a 48 cm grid. This is because the basic hull thickness is 48 cm.&lt;br /&gt;
*Outer plating (12 cm) + beam frame (24 cm) + inner plating (12 cm) = 48 cm&lt;br /&gt;
*Keeping the hull structure in the grid ensures that beams connect easily.&lt;br /&gt;
&amp;lt;gallery widths=400px heights=400px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Grid_example.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bolting And Durability ===&lt;br /&gt;
*Each part of the ship has its own mass. In durability calculations, the mass of different parts is transferred towards the frame via connections (bolts) and other parts. This means parts close to the frame need to support all the parts further away from the frame.&lt;br /&gt;
&lt;br /&gt;
*When building your first spaceship, it is good to do test bolting and durability checks in the middle of the building process. This way you can avoid unnecessary extra work and keep the hull structure consistent all the time.&lt;br /&gt;
&lt;br /&gt;
*Durability Tool will report '''No ship frame''' when there are no thruster bases with connected thrusters connected to the frame. When there is at least one thruster properly connected to the thruster base and both are connected to the frame with bolts, Durability Tool will show '''Ship Warp Class X'''. If the ship warp class is lower than one, it means there are parts which are poorly connected to the frame.&lt;br /&gt;
&lt;br /&gt;
*When the Durability Tool shows warp class for the ship, it also means that '''a frame integrity check''' can be done. (Durability tool→ Right mouse button). The frame integrity check basically studies how solidly each frame beam (and whatever it supports) is connected to the frame-attached thrusters.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=400px heights=400px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Frame_integrity_check_SSC.jpg|If the frame design is not balanced enough, certain sections may encounter too much stress. This creates a durability error for the frame beam.&lt;br /&gt;
File:Frame_integrity_check_SSC_2.jpg|This is the same spot but some attachment plates and bolts have been removed between beams. Notice the color change which means those beams are about to fail.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Thrusters ==&lt;br /&gt;
A spaceship needs thrusters to be able to fly and thrusters need to be bolted to the hull.&lt;br /&gt;
&lt;br /&gt;
*Thrusters can be divided to two types: '''main thrusters''' and '''maneuver thrusters'''. Main thrusters generate forward movement and maneuver thrusters enable yaw, pitch and roll for example. Each thruster model can act as a main thruster or a maneuver thruster. To which movement the thruster will contribute, the defining factor is position and orientation of the thruster.&lt;br /&gt;
&lt;br /&gt;
*Location of thrusters greatly affects how easy the ship is to maneuver. For example if your ship is missing forward facing thrusters, your ship won’t be able to fly backwards.&lt;br /&gt;
&lt;br /&gt;
*Mass is also a factor when placing thrusters to your spaceship. Each beam, plate and machinery you have placed on your ship has mass. The bigger your ship is, more thrust it will need.&lt;br /&gt;
&lt;br /&gt;
*Thrusters need '''electricity''' and '''propellant''' to work. Thrusters consume more propellant than power. This means civilian ships without weaponry can have smaller generators and mainly focus on propellant containers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Maneuver thrusters'''&lt;br /&gt;
*Maneuver thrusters are usually smaller and don’t need to provide much thrust.&lt;br /&gt;
*There are three sizes of thrusters in Starbase: box thruster, triangle thruster and maneuver thruster. Each thruster can be used as a maneuver thruster even thought only one is named a ”maneuver thruster”.&lt;br /&gt;
&lt;br /&gt;
'''Main thrusters'''&lt;br /&gt;
*Main thrusters are usually the thrusters that are facing backwards as this enables forward movement for the ship.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Maneuver thruster&lt;br /&gt;
*Max thrust: 50 000&lt;br /&gt;
*The small maneuver thruster is placed on a hardpoint&lt;br /&gt;
&lt;br /&gt;
Box thruster&lt;br /&gt;
*Max thrust: 500 000&lt;br /&gt;
*The box thruster is connected to a hardpoint from the side and this thruster can’t be stacked&lt;br /&gt;
&lt;br /&gt;
Triangle thruster&lt;br /&gt;
*Max thrust: 300 000&lt;br /&gt;
*The biggest difference the triangle thruster has compared to the other two thrusters is that it can be stacked. Only one triangle thruster needs connection with a hardpoint and more triangle thrusters can be connected to that thruster. Stacked triangle thrusters share same device field name which is linked to MFC and operate as a whole.&lt;br /&gt;
&lt;br /&gt;
== Power Source ==&lt;br /&gt;
Machines and devices need power in spaceships. Power can be provided with generator or batteries&lt;br /&gt;
&lt;br /&gt;
=== Generator === &lt;br /&gt;
Generator pieces are modular and can be used to build bigger and smaller generators. &amp;lt;br&amp;gt;&lt;br /&gt;
Working generator will need at least one '''generator fuel chamber''', one '''small fuelrod,''' one '''generator unit''', one '''generator socket board''', one '''generator cooling rack''' and one '''small cooling cell'''.&lt;br /&gt;
*Place the generator in a way that there is enough room to pull out the fuel rod&lt;br /&gt;
*Also make sure there is an easy access to the socket board and to the coolant cells.&lt;br /&gt;
*The generator parts need to be bolted together and the generator needs to be bolted to the ship.&lt;br /&gt;
*Generator cooling can also provided by using Radiator&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=400px heights=400px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Generator_example.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Propellant ==&lt;br /&gt;
Thrusters need and consume propellant to work. Propellant is stored in propellant containers. The amount of containers spaceship will need depends on how many thrusters it has.&lt;br /&gt;
*There are three sizes of propellant containers: small, medium and large.&lt;br /&gt;
*While placing the propellant containers make sure there is an access to at least two of the sockets found in the tank support.&lt;br /&gt;
*The propellant container needs to be bolted to the ship.&lt;br /&gt;
&lt;br /&gt;
== Data Network ==&lt;br /&gt;
The spaceship needs a cable network to transfer electricity to all the machinery and data between all the devices.&lt;br /&gt;
*Use the cabling tool to connect all the machinery and devices to the same network.&lt;br /&gt;
*Make sure that all the devices and machinery: thrusters, doors, MCU, FCU, levers, lamps and buttons are connected to the network.&lt;br /&gt;
&amp;lt;gallery widths=800px heights=800px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Data_network_example.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;gallery widths=400px heights=400px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Data_network_example_02.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pipe Network For Propellant ==&lt;br /&gt;
The spaceship needs a pipe network to transfer propellant to all thrusters from propellant containers.&lt;br /&gt;
*Use [[Pipe tool]] to connect all propellant containers and hardpoints with thrusters.&lt;br /&gt;
*To get information from propellant network, containers also need to be in electricity network. Connecting one propellant container support to electricity network can be used to show the total amount of propellant in the pipe network.&lt;br /&gt;
&amp;lt;gallery widths=800px heights=800px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Pipe_network_example.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;gallery widths=400px heights=400px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Cable_piping_example.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Ship Controls And Basic Configuration ==&lt;br /&gt;
Spaceship thrusters can be controlled directly with levers, buttons and YOLOL. However YOLOL-configured thruster balance settings and flying are very ship specific configurations. The following guide explains how to use and configure Flight Control Unit (FCU) and Main Flight Computer (MFC) to do thruster balance calculations and settings for you.&lt;br /&gt;
*If you are interested about YOLOL configured thruster balance settings and flying you can examine Spaceship Vasama in the Spaceship Designer.&lt;br /&gt;
&lt;br /&gt;
===Flight Control Unit (FCU)===&lt;br /&gt;
&lt;br /&gt;
*'''The FCU''' gets input from control devices (levers and buttons) and sends it to the '''Main Flight Computer''', which forwards it to the thrusters.&lt;br /&gt;
*The arrows on top of the FCU define the ”forward” direction of the ship. &lt;br /&gt;
*There can be more than one FCU connected to one Main Flight Computer.&lt;br /&gt;
*There are currently three FCU models in Starbase:  Basic, Advanced and Premium model. Each model has a different set of ship movements available.&lt;br /&gt;
&lt;br /&gt;
'''Basic model''':&lt;br /&gt;
* FcuMfcIO (for connecting the MFC)&lt;br /&gt;
* FcuInputRange (Lever input range) &lt;br /&gt;
* FcuGeneralMultiplier (a &amp;quot;soft power switch&amp;quot;, scales all output)&lt;br /&gt;
* FcuForward (moves the ship straight forward or combines FcuFwdBwd rotations with the forward movement)&lt;br /&gt;
* FcuBackward (moves the ship straight backward or combines FcuFwdBwd rotations with the backward movement)&lt;br /&gt;
* FcuRotationalPitch (in-place pitch rotation)&lt;br /&gt;
* FcuRotationalYaw (in-place yaw rotation)&lt;br /&gt;
* FcuRotationalRoll (in-place roll rotation)&lt;br /&gt;
&lt;br /&gt;
'''Advanced model''' (in addition to the Basic controls):&lt;br /&gt;
* FcuUpDown (moves the ship straight up or down)&lt;br /&gt;
* FcuRightLeft (moves the ship straight right or left)&lt;br /&gt;
&lt;br /&gt;
'''Premium model''' (in addition to the Advanced controls):&lt;br /&gt;
* FcuFwdBwdPitch (rotation combined to forward/backward movement)&lt;br /&gt;
* FcuFwdBwdYaw (rotation combined to forward/backward movement)&lt;br /&gt;
* FcuFwdBwdRoll (rotation combined to forward/backward movement)&lt;br /&gt;
&lt;br /&gt;
[[File:FCU_and_MFC_assembly_guide.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
===Main Flight Computer (MFC)===&lt;br /&gt;
&lt;br /&gt;
*'''MFC''' is placed in the same data network with a '''Flight Control Unit''' and '''thrusters'''.  The MFC and FCU share one identical device field name.&lt;br /&gt;
*MFC gets input from the Flight Control Unit and sends this data to the thrusters, telling them what to do. For example &amp;quot;pilot interacts with yaw lever&amp;quot;. The FCU receives the information and sends it to the Main Flight Computer. The MFC then automatically decides which thursters are used to make the ship yaw. &lt;br /&gt;
*Each thruster group is controlled by exactly one MFC. There can be several MFCs in one ship.&lt;br /&gt;
&lt;br /&gt;
===Levers===&lt;br /&gt;
&lt;br /&gt;
The Flight Control Unit (FCU) gets input from control devices like levers and buttons. To get the levers to work with an FCU you need to configure the lever device fields to match with the FCU device fields (see picture below).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=600px heights=600px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Lever_fcu_assembly_example.jpg|Examine '''FCU''' device fields and levers.  Also notice matching device fields in the '''MFC'''  and the '''FCU'''&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Lever Examples====&lt;br /&gt;
&lt;br /&gt;
'''Note!''' These are examples for a ship that has an FCU and an MFC. Also the FCU input Range is set to 100. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=500px heights=500px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File:Lever_assembly_example_1.jpg|Lever settings for '''forward thrust'''. If the FCU input range would be 1000, then LeverMaxOutput  would be 1000 and LeverBindsMoveSpeed would be also higher&lt;br /&gt;
File:Lever_assembly_example_2.jpg|Centered lever settings for yaw.  Notice LeverCenteringSpeed. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Thruster configuration===&lt;br /&gt;
&lt;br /&gt;
The Main Flight Computer controls the thrusters. One MFC can handle 50 thrusters, which means there are 50 device fields for thrusters in an MFC (thrusterPowerLevelXX). These field names are set for ship's thrusters. Field names can be renamed but each thruster should have a unique device field name (excluding stacked triangle thrusters).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=800px heights=600px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:data_network_example.jpg| Examine the '''MFC''' device fields (thrusterpowerlevel...) and thruster device field names set to thrusters throughout the data network&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;gallery widths=500px heights=600px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Thruster_device_field_example_01.jpg|A configured thruster: When a thruster is connected to same data network with an MFC and is given matching field name with the MFC thruster list, the values should automatically update and be the same. Also in this case '''ThrusterCurrentThrust''' field name has been changed to '''T07''' ( This can be linked to Progress Bar)  &lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
&lt;br /&gt;
'''Checklist'''&lt;br /&gt;
&lt;br /&gt;
Each spaceship needs the following things to fly:&lt;br /&gt;
*Valid frame/Hull&lt;br /&gt;
*Thrusters&lt;br /&gt;
*Powersource&lt;br /&gt;
*Propellant for thrusters&lt;br /&gt;
*Data Network&lt;br /&gt;
*Pipe network for propellant&lt;br /&gt;
*Ship controls and basic configuration&lt;br /&gt;
&lt;br /&gt;
'''My ship is not moving?'''&lt;br /&gt;
# Check durability and bolting→ Thruster hardpoints are bolted to the frame and thrusters are bolted to the hardpoints/ hull.  The ship frame is consistent and bolted.&lt;br /&gt;
# Thrusters need electricity and propellant → Check  cabling and piping (all thruster hardpoints are connected to the electricity network and to the propellant pipe network. &lt;br /&gt;
# Electricity network (cable) is connected to the generator.  Check that the generator has all the necessary parts → see 3. Powersource/generator&lt;br /&gt;
# Pipe network is connected to the propellant containers → see Pipe network for propellant&lt;br /&gt;
# Check the thruster configuration → see thruster configuration  (matching device field names and values in MFC and in thrusters  '''(If the ship is using an MFC)'''&lt;br /&gt;
# Check matching device field names in the MFC and FCU → see picture in Levers section&lt;br /&gt;
# Check matching device field names in the levers and in the FCU → see picture in Levers section&lt;br /&gt;
&lt;br /&gt;
'''When I start flying my ship, some pieces of the ship detach?'''&lt;br /&gt;
*Use the Durability Tool.  Check that everything is green and bolted. &lt;br /&gt;
'''My ship is almost symmetrical but still doesn’t fly straight/ turns easier to one direction?'''&lt;br /&gt;
*Some thrusters might not be working → Check :  1 , 2,  3, 4 ,5&lt;br /&gt;
'''All thrusters seem to working but ship yaw/pitch/roll is slow?'''&lt;br /&gt;
*In some cases you might need re-position thrusters or add more thrusters. Upgrading FCU to premium model which has combined movements possibilities can also be helpful in some cases.&lt;br /&gt;
&lt;br /&gt;
[[Category:Guides]] [[Category:Spaceships]]&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=Spaceship_assembly_guide/fr&amp;diff=30500</id>
		<title>Spaceship assembly guide/fr</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=Spaceship_assembly_guide/fr&amp;diff=30500"/>
		<updated>2022-04-07T22:46:33Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: Mise en place de la structure de base&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Otherlang2&lt;br /&gt;
|ru=Гайд по созданию кораблей |ua=Гайд по будівництву кораблів&lt;br /&gt;
}}&lt;br /&gt;
== Summary ==&lt;br /&gt;
This guide is an introduction to spaceship building in Starbase. It will introduce the basics of spaceship hull structure, and basic devices and machinery needed for a working spaceship.&lt;br /&gt;
&lt;br /&gt;
== Good To Know Before Starting ==&lt;br /&gt;
*You should have basic knowledge of device configurations and YOLOL in Starbase, as this guide includes machinery and devices.&lt;br /&gt;
*You should have basic knowledge of the Spaceship Designer before attempting spaceship assembly.&lt;br /&gt;
*Spaceship Designer: Pre-made blueprints/Tutorials/Tutorial Starter Spaceship&lt;br /&gt;
*In [[Spaceship_resources|Spaceship resources]] you will find information about different resources that spaceships will use.&lt;br /&gt;
&lt;br /&gt;
== Spaceship Requirements ==&lt;br /&gt;
Each spaceship requires the following things to fly: &lt;br /&gt;
&lt;br /&gt;
*Valid Frame/Hull &lt;br /&gt;
*Thrusters &lt;br /&gt;
*Powersource: Generator or Batteries &lt;br /&gt;
*Propellant for thrusters &lt;br /&gt;
*Data Network &lt;br /&gt;
*Pipe network for propellant &lt;br /&gt;
*Ship controls and basic configuration &lt;br /&gt;
&lt;br /&gt;
== Valid Frame And Hull Structure ==&lt;br /&gt;
*All spaceships need to be built according to the durability rules in order to be able to fly without breaking.&lt;br /&gt;
**Foundation of the durability rules is the frame of beams which forms the ship’s hull, and to which everything else is attached to.&lt;br /&gt;
&lt;br /&gt;
*A valid ship frame consists of beams connected to each other with attachment plates and bolts, and a valid thruster base (Device hardpoint) is connected to the beams directly.&lt;br /&gt;
**The hardpoint is connected to beams with at least two bolts, and an actual thruster is in contact with the hardpoint. &lt;br /&gt;
**The thruster has to be properly positioned (forming a data connection with the base) and connected to the same frame as the base.&lt;br /&gt;
&lt;br /&gt;
*Ship frame must be consistent, there can't be two different frames that are not connected to each other.&lt;br /&gt;
**If there are two separate frames, the bigger one will be used as there can be only one frame.&lt;br /&gt;
&amp;lt;gallery widths=500px heights=400px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Frame_example.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Beam Frame ===&lt;br /&gt;
&amp;lt;gallery widths=500px heights=400px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Attachment_plate_beam_example.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Plates === &lt;br /&gt;
====Outer Plates====&lt;br /&gt;
*Outer plating protects the ship from weapon fire, collisions and radiation during warp travel.&lt;br /&gt;
*There should not be any gaps on the exterior plating of the ship, otherwise radiation gets through during warp travel. Beams and plates withstand normal flying and there can be exposed beams if the ship is not meant for warp travel.&lt;br /&gt;
*Plates are connected to the frame with bolts.&lt;br /&gt;
&lt;br /&gt;
====Inner Plates====&lt;br /&gt;
*The main difference between inner and outer plates is the material.&lt;br /&gt;
*Inner plating is not necessary regarding the ship's durability and ability fly, but makes it easier to walk inside the ship, and helps with weapon damage.&lt;br /&gt;
*It is recommended to have at least some interior plating to make character movement smoother and make the ship interior more aesthetic.&lt;br /&gt;
*Interior plating also helps when placing machinery, devices, cables and piping.&lt;br /&gt;
&amp;lt;gallery widths=300px heights=300px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Outer_inner_plates_example.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Hardpoints ===&lt;br /&gt;
*Thrusters and other machinery outside the ship’s hull have to be connected to the ship’s '''data network'''. &lt;br /&gt;
*Thrusters also need to be connected to the ship’s '''propellant gas network.'''&lt;br /&gt;
*Connecting thrusters and machinery to the spaceship networks is done with '''hardpoints'''. &lt;br /&gt;
*Hardpoints have pipe and cable slots for connecting pipes and cables. This means hardpoints need to be placed on the frame so that cabling and piping can be done.&lt;br /&gt;
&lt;br /&gt;
*As thrusters need hardpoints to work, it is important to pay attention to where to place the hardpoints. Thruster locations greatly affect how the ship flies and how easily the ship can be maneuvered.&lt;br /&gt;
&amp;lt;gallery widths=400px heights=400px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Hardpoint_example_.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Modules ===&lt;br /&gt;
&lt;br /&gt;
*Modules are plates, beams, etc. which are grouped together. The purpose of the modules is to make constructing spaceships faster and easier than using single parts.&lt;br /&gt;
&lt;br /&gt;
*Every module has at least one Parent Object (Green Sphere) that ties the objects in the module together. Modules can be moved and rotated as a whole by having green sphere selected (module icon).&lt;br /&gt;
&lt;br /&gt;
*'''It is highly recommended that beginners start building with modules.'''&lt;br /&gt;
**Using modules should automatically ensure that the spaceship structure is correct.&lt;br /&gt;
**Modules are the best way to learn the building grid and good building patterns.&lt;br /&gt;
**There is a lot of different building parts in the game and this can be overwhelming at first. Using modules reduces the number of building parts you need to remember.&lt;br /&gt;
**The building process will be faster and the progress is easier to notice.&lt;br /&gt;
**Basic modules for smaller and medium sized ships are introduced in: Premade blueprints/Tutorials/Tutorial Starter Spaceship&lt;br /&gt;
**The basic modules are for building 90 degree angles. This means the hull will have box-like appearance at first. The hull can be decorated with decoration parts and normal plates later on. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;gallery widths=800px heights=900px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Basic_starter_set_modules_guide_picture.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The Grid ===&lt;br /&gt;
*Spaceship modules use a 48 cm grid. This is because the basic hull thickness is 48 cm.&lt;br /&gt;
*Outer plating (12 cm) + beam frame (24 cm) + inner plating (12 cm) = 48 cm&lt;br /&gt;
*Keeping the hull structure in the grid ensures that beams connect easily.&lt;br /&gt;
&amp;lt;gallery widths=400px heights=400px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Grid_example.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bolting And Durability ===&lt;br /&gt;
*Each part of the ship has its own mass. In durability calculations, the mass of different parts is transferred towards the frame via connections (bolts) and other parts. This means parts close to the frame need to support all the parts further away from the frame.&lt;br /&gt;
&lt;br /&gt;
*When building your first spaceship, it is good to do test bolting and durability checks in the middle of the building process. This way you can avoid unnecessary extra work and keep the hull structure consistent all the time.&lt;br /&gt;
&lt;br /&gt;
*Durability Tool will report '''No ship frame''' when there are no thruster bases with connected thrusters connected to the frame. When there is at least one thruster properly connected to the thruster base and both are connected to the frame with bolts, Durability Tool will show '''Ship Warp Class X'''. If the ship warp class is lower than one, it means there are parts which are poorly connected to the frame.&lt;br /&gt;
&lt;br /&gt;
*When the Durability Tool shows warp class for the ship, it also means that '''a frame integrity check''' can be done. (Durability tool→ Right mouse button). The frame integrity check basically studies how solidly each frame beam (and whatever it supports) is connected to the frame-attached thrusters.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=400px heights=400px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Frame_integrity_check_SSC.jpg|If the frame design is not balanced enough, certain sections may encounter too much stress. This creates a durability error for the frame beam.&lt;br /&gt;
File:Frame_integrity_check_SSC_2.jpg|This is the same spot but some attachment plates and bolts have been removed between beams. Notice the color change which means those beams are about to fail.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Thrusters ==&lt;br /&gt;
A spaceship needs thrusters to be able to fly and thrusters need to be bolted to the hull.&lt;br /&gt;
&lt;br /&gt;
*Thrusters can be divided to two types: '''main thrusters''' and '''maneuver thrusters'''. Main thrusters generate forward movement and maneuver thrusters enable yaw, pitch and roll for example. Each thruster model can act as a main thruster or a maneuver thruster. To which movement the thruster will contribute, the defining factor is position and orientation of the thruster.&lt;br /&gt;
&lt;br /&gt;
*Location of thrusters greatly affects how easy the ship is to maneuver. For example if your ship is missing forward facing thrusters, your ship won’t be able to fly backwards.&lt;br /&gt;
&lt;br /&gt;
*Mass is also a factor when placing thrusters to your spaceship. Each beam, plate and machinery you have placed on your ship has mass. The bigger your ship is, more thrust it will need.&lt;br /&gt;
&lt;br /&gt;
*Thrusters need '''electricity''' and '''propellant''' to work. Thrusters consume more propellant than power. This means civilian ships without weaponry can have smaller generators and mainly focus on propellant containers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Maneuver thrusters'''&lt;br /&gt;
*Maneuver thrusters are usually smaller and don’t need to provide much thrust.&lt;br /&gt;
*There are three sizes of thrusters in Starbase: box thruster, triangle thruster and maneuver thruster. Each thruster can be used as a maneuver thruster even thought only one is named a ”maneuver thruster”.&lt;br /&gt;
&lt;br /&gt;
'''Main thrusters'''&lt;br /&gt;
*Main thrusters are usually the thrusters that are facing backwards as this enables forward movement for the ship.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Maneuver thruster&lt;br /&gt;
*Max thrust: 50 000&lt;br /&gt;
*The small maneuver thruster is placed on a hardpoint&lt;br /&gt;
&lt;br /&gt;
Box thruster&lt;br /&gt;
*Max thrust: 500 000&lt;br /&gt;
*The box thruster is connected to a hardpoint from the side and this thruster can’t be stacked&lt;br /&gt;
&lt;br /&gt;
Triangle thruster&lt;br /&gt;
*Max thrust: 300 000&lt;br /&gt;
*The biggest difference the triangle thruster has compared to the other two thrusters is that it can be stacked. Only one triangle thruster needs connection with a hardpoint and more triangle thrusters can be connected to that thruster. Stacked triangle thrusters share same device field name which is linked to MFC and operate as a whole.&lt;br /&gt;
&lt;br /&gt;
== Power Source ==&lt;br /&gt;
Machines and devices need power in spaceships. Power can be provided with generator or batteries&lt;br /&gt;
&lt;br /&gt;
=== Generator === &lt;br /&gt;
Generator pieces are modular and can be used to build bigger and smaller generators. &amp;lt;br&amp;gt;&lt;br /&gt;
Working generator will need at least one '''generator fuel chamber''', one '''small fuelrod,''' one '''generator unit''', one '''generator socket board''', one '''generator cooling rack''' and one '''small cooling cell'''.&lt;br /&gt;
*Place the generator in a way that there is enough room to pull out the fuel rod&lt;br /&gt;
*Also make sure there is an easy access to the socket board and to the coolant cells.&lt;br /&gt;
*The generator parts need to be bolted together and the generator needs to be bolted to the ship.&lt;br /&gt;
*Generator cooling can also provided by using Radiator&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=400px heights=400px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Generator_example.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Propellant ==&lt;br /&gt;
Thrusters need and consume propellant to work. Propellant is stored in propellant containers. The amount of containers spaceship will need depends on how many thrusters it has.&lt;br /&gt;
*There are three sizes of propellant containers: small, medium and large.&lt;br /&gt;
*While placing the propellant containers make sure there is an access to at least two of the sockets found in the tank support.&lt;br /&gt;
*The propellant container needs to be bolted to the ship.&lt;br /&gt;
&lt;br /&gt;
== Data Network ==&lt;br /&gt;
The spaceship needs a cable network to transfer electricity to all the machinery and data between all the devices.&lt;br /&gt;
*Use the cabling tool to connect all the machinery and devices to the same network.&lt;br /&gt;
*Make sure that all the devices and machinery: thrusters, doors, MCU, FCU, levers, lamps and buttons are connected to the network.&lt;br /&gt;
&amp;lt;gallery widths=800px heights=800px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Data_network_example.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;gallery widths=400px heights=400px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Data_network_example_02.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pipe Network For Propellant ==&lt;br /&gt;
The spaceship needs a pipe network to transfer propellant to all thrusters from propellant containers.&lt;br /&gt;
*Use [[Pipe tool]] to connect all propellant containers and hardpoints with thrusters.&lt;br /&gt;
*To get information from propellant network, containers also need to be in electricity network. Connecting one propellant container support to electricity network can be used to show the total amount of propellant in the pipe network.&lt;br /&gt;
&amp;lt;gallery widths=800px heights=800px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Pipe_network_example.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;gallery widths=400px heights=400px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Cable_piping_example.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Ship Controls And Basic Configuration ==&lt;br /&gt;
Spaceship thrusters can be controlled directly with levers, buttons and YOLOL. However YOLOL-configured thruster balance settings and flying are very ship specific configurations. The following guide explains how to use and configure Flight Control Unit (FCU) and Main Flight Computer (MFC) to do thruster balance calculations and settings for you.&lt;br /&gt;
*If you are interested about YOLOL configured thruster balance settings and flying you can examine Spaceship Vasama in the Spaceship Designer.&lt;br /&gt;
&lt;br /&gt;
===Flight Control Unit (FCU)===&lt;br /&gt;
&lt;br /&gt;
*'''The FCU''' gets input from control devices (levers and buttons) and sends it to the '''Main Flight Computer''', which forwards it to the thrusters.&lt;br /&gt;
*The arrows on top of the FCU define the ”forward” direction of the ship. &lt;br /&gt;
*There can be more than one FCU connected to one Main Flight Computer.&lt;br /&gt;
*There are currently three FCU models in Starbase:  Basic, Advanced and Premium model. Each model has a different set of ship movements available.&lt;br /&gt;
&lt;br /&gt;
'''Basic model''':&lt;br /&gt;
* FcuMfcIO (for connecting the MFC)&lt;br /&gt;
* FcuInputRange (Lever input range) &lt;br /&gt;
* FcuGeneralMultiplier (a &amp;quot;soft power switch&amp;quot;, scales all output)&lt;br /&gt;
* FcuForward (moves the ship straight forward or combines FcuFwdBwd rotations with the forward movement)&lt;br /&gt;
* FcuBackward (moves the ship straight backward or combines FcuFwdBwd rotations with the backward movement)&lt;br /&gt;
* FcuRotationalPitch (in-place pitch rotation)&lt;br /&gt;
* FcuRotationalYaw (in-place yaw rotation)&lt;br /&gt;
* FcuRotationalRoll (in-place roll rotation)&lt;br /&gt;
&lt;br /&gt;
'''Advanced model''' (in addition to the Basic controls):&lt;br /&gt;
* FcuUpDown (moves the ship straight up or down)&lt;br /&gt;
* FcuRightLeft (moves the ship straight right or left)&lt;br /&gt;
&lt;br /&gt;
'''Premium model''' (in addition to the Advanced controls):&lt;br /&gt;
* FcuFwdBwdPitch (rotation combined to forward/backward movement)&lt;br /&gt;
* FcuFwdBwdYaw (rotation combined to forward/backward movement)&lt;br /&gt;
* FcuFwdBwdRoll (rotation combined to forward/backward movement)&lt;br /&gt;
&lt;br /&gt;
[[File:FCU_and_MFC_assembly_guide.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
===Main Flight Computer (MFC)===&lt;br /&gt;
&lt;br /&gt;
*'''MFC''' is placed in the same data network with a '''Flight Control Unit''' and '''thrusters'''.  The MFC and FCU share one identical device field name.&lt;br /&gt;
*MFC gets input from the Flight Control Unit and sends this data to the thrusters, telling them what to do. For example &amp;quot;pilot interacts with yaw lever&amp;quot;. The FCU receives the information and sends it to the Main Flight Computer. The MFC then automatically decides which thursters are used to make the ship yaw. &lt;br /&gt;
*Each thruster group is controlled by exactly one MFC. There can be several MFCs in one ship.&lt;br /&gt;
&lt;br /&gt;
===Levers===&lt;br /&gt;
&lt;br /&gt;
The Flight Control Unit (FCU) gets input from control devices like levers and buttons. To get the levers to work with an FCU you need to configure the lever device fields to match with the FCU device fields (see picture below).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=600px heights=600px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Lever_fcu_assembly_example.jpg|Examine '''FCU''' device fields and levers.  Also notice matching device fields in the '''MFC'''  and the '''FCU'''&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Lever Examples====&lt;br /&gt;
&lt;br /&gt;
'''Note!''' These are examples for a ship that has an FCU and an MFC. Also the FCU input Range is set to 100. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=500px heights=500px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File:Lever_assembly_example_1.jpg|Lever settings for '''forward thrust'''. If the FCU input range would be 1000, then LeverMaxOutput  would be 1000 and LeverBindsMoveSpeed would be also higher&lt;br /&gt;
File:Lever_assembly_example_2.jpg|Centered lever settings for yaw.  Notice LeverCenteringSpeed. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Thruster configuration===&lt;br /&gt;
&lt;br /&gt;
The Main Flight Computer controls the thrusters. One MFC can handle 50 thrusters, which means there are 50 device fields for thrusters in an MFC (thrusterPowerLevelXX). These field names are set for ship's thrusters. Field names can be renamed but each thruster should have a unique device field name (excluding stacked triangle thrusters).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=800px heights=600px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:data_network_example.jpg| Examine the '''MFC''' device fields (thrusterpowerlevel...) and thruster device field names set to thrusters throughout the data network&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;gallery widths=500px heights=600px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Thruster_device_field_example_01.jpg|A configured thruster: When a thruster is connected to same data network with an MFC and is given matching field name with the MFC thruster list, the values should automatically update and be the same. Also in this case '''ThrusterCurrentThrust''' field name has been changed to '''T07''' ( This can be linked to Progress Bar)  &lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
&lt;br /&gt;
'''Checklist'''&lt;br /&gt;
&lt;br /&gt;
Each spaceship needs the following things to fly:&lt;br /&gt;
*Valid frame/Hull&lt;br /&gt;
*Thrusters&lt;br /&gt;
*Powersource&lt;br /&gt;
*Propellant for thrusters&lt;br /&gt;
*Data Network&lt;br /&gt;
*Pipe network for propellant&lt;br /&gt;
*Ship controls and basic configuration&lt;br /&gt;
&lt;br /&gt;
'''My ship is not moving?'''&lt;br /&gt;
# Check durability and bolting→ Thruster hardpoints are bolted to the frame and thrusters are bolted to the hardpoints/ hull.  The ship frame is consistent and bolted.&lt;br /&gt;
# Thrusters need electricity and propellant → Check  cabling and piping (all thruster hardpoints are connected to the electricity network and to the propellant pipe network. &lt;br /&gt;
# Electricity network (cable) is connected to the generator.  Check that the generator has all the necessary parts → see 3. Powersource/generator&lt;br /&gt;
# Pipe network is connected to the propellant containers → see Pipe network for propellant&lt;br /&gt;
# Check the thruster configuration → see thruster configuration  (matching device field names and values in MFC and in thrusters  '''(If the ship is using an MFC)'''&lt;br /&gt;
# Check matching device field names in the MFC and FCU → see picture in Levers section&lt;br /&gt;
# Check matching device field names in the levers and in the FCU → see picture in Levers section&lt;br /&gt;
&lt;br /&gt;
'''When I start flying my ship, some pieces of the ship detach?'''&lt;br /&gt;
*Use the Durability Tool.  Check that everything is green and bolted. &lt;br /&gt;
'''My ship is almost symmetrical but still doesn’t fly straight/ turns easier to one direction?'''&lt;br /&gt;
*Some thrusters might not be working → Check :  1 , 2,  3, 4 ,5&lt;br /&gt;
'''All thrusters seem to working but ship yaw/pitch/roll is slow?'''&lt;br /&gt;
*In some cases you might need re-position thrusters or add more thrusters. Upgrading FCU to premium model which has combined movements possibilities can also be helpful in some cases.&lt;br /&gt;
&lt;br /&gt;
[[Category:Guides]] [[Category:Spaceships]]&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=Page_d%E2%80%99accueil&amp;diff=30499</id>
		<title>Page d’accueil</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=Page_d%E2%80%99accueil&amp;diff=30499"/>
		<updated>2022-04-07T22:45:51Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: errata&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- For normal pages, use Otherlang2 instead of OtherlangMP --&amp;gt;&lt;br /&gt;
{{OtherlangMP&lt;br /&gt;
|en=Main_Page&lt;br /&gt;
|de=Main_Page:de&lt;br /&gt;
|ru=Главная_страница&lt;br /&gt;
|zh-cn=主页&lt;br /&gt;
|pl=Main_Page:pl&lt;br /&gt;
|nl=Main_Page:nl&lt;br /&gt;
}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{#css:&lt;br /&gt;
  span.approvedAndLatestMsg {&lt;br /&gt;
    display: none;&lt;br /&gt;
  }&lt;br /&gt;
  span.approvingUser {&lt;br /&gt;
    display: none;&lt;br /&gt;
  }&lt;br /&gt;
  h1 {&lt;br /&gt;
    display: none;&lt;br /&gt;
  }&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;div class=&amp;quot;mpRow&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;mpLeftPadding&amp;quot;&amp;gt; &amp;lt;!-- LEFT COLUMN STARTS HERE --&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitableNoGrid&amp;quot; style=&amp;quot;border: 0px !important; margin: -10px; width: calc(100% + 20px);&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|&amp;lt;span class=&amp;quot;tableheader&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-size:110%&amp;quot;&amp;gt;&amp;lt;font color=&amp;quot;White&amp;quot;&amp;gt;À propos de Starbase&amp;lt;/font&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
[[File:AboutStarbaseRobot.png|150px|right]] &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Dans l'univers de Starbase tout le monde contrôle un [[Endoskeleton/fr|endosquelette]] robotique, un corps assez durable étant idéal pour l'exploration spatiale et la colonisation. La société, formée de ces robotiques endosquelettes est actuellement concentrée sur de gigantesques [[Capital_Mega_Station/fr|Super Stations]] et de plus petites Mini Stations, les &amp;quot;banlieues&amp;quot; dans l'espace. Les stations fournissent sécurité, [[jobs/fr|travail]], point de rencontre et possibilités d'échange pour leurs habitants, faisant d'elles des bases idéales où commencer la colonisation de la galaxie.&lt;br /&gt;
&lt;br /&gt;
Dans la galaxie, les deux principales factions sont deux factions rivales, le [[Kingdom/fr|Royaume]] et l'[[Empire/fr|Empire]], l'Empire ayant le contrôle de la majorité des stations centrales. Les autres factions peuvent tout de même espérer ce placer à coté de ces deux géants un jour, avec l'évolution et la progression la société.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
La [[News Broadcasts/fr|vie]] dans l'[[Space/fr|espace]] étant actuellement centrée sur l'orbite céleste d'une planète gazeuse, les courageux aventuriers devront constamment explorer les limites du voyage spatial et d'autres technologies afin de pouvoir, un jour atteindre les coins les plus reculés de la galaxie.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitableNoGrid&amp;quot; style=&amp;quot;border: 0px !important; margin: -10px; width: calc(100% + 20px);&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|&amp;lt;span class=&amp;quot;tableheader&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-size:110%&amp;quot;&amp;gt;&amp;lt;font color=&amp;quot;White&amp;quot;&amp;gt;Menu&amp;lt;/font&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Main_Page/fr|Menu principal]]&lt;br /&gt;
&lt;br /&gt;
[[Special:AllPages|Toutes les pages]]&lt;br /&gt;
&lt;br /&gt;
[[Special:RecentChanges|Changement récent]]&lt;br /&gt;
&lt;br /&gt;
[[Special:SpecialPages|Page spécial]]&lt;br /&gt;
&lt;br /&gt;
[[News Broadcasts/fr|Diffusions de nouvelles]]&lt;br /&gt;
&lt;br /&gt;
[[Special:Random|Page aléatoire]]&lt;br /&gt;
&lt;br /&gt;
[[Rules/fr|Règlement]]&lt;br /&gt;
&lt;br /&gt;
[[Jobs/fr|Carrière]]&lt;br /&gt;
&lt;br /&gt;
[[Endoskeleton CV/fr|Curriculum vitæ]]&lt;br /&gt;
&lt;br /&gt;
[[Emotes/fr|Emotes]]&lt;br /&gt;
&lt;br /&gt;
[[Endoskeleton/fr|Endosquelette]]&lt;br /&gt;
&lt;br /&gt;
[[Insurance/fr|Assurance]]&lt;br /&gt;
&lt;br /&gt;
[[Data networks/fr|Réseaux de données]]&lt;br /&gt;
&lt;br /&gt;
[[Pipe networks/fr|Réseaux de canalisation]]&lt;br /&gt;
&lt;br /&gt;
[[Resource networks/fr|Réseau de ressources]]&lt;br /&gt;
&lt;br /&gt;
[[YOLOL:fr|Langage YOLOL]]&lt;br /&gt;
&lt;br /&gt;
[[FAQ/fr|Foire au questions]]&lt;br /&gt;
&lt;br /&gt;
[[Spaceship assembly guide:fr|Guide d'assemblage du vaisseau spatial]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;mpMiddle&amp;quot;&amp;gt; &amp;lt;!-- MIDDLE COLUMN STARTS HERE --&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitableTransparent&amp;quot; style=&amp;quot;margin-right: auto; margin-left: auto; border: none; margin-top: -3px;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Armes&amp;lt;/span&amp;gt;[[File:Combat_simulations_notext.png|175px|link=Weapons/fr|center]]&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Équipements&amp;lt;/span&amp;gt;[[File:Devices_notext.png|175px|link=Devices_and_machines/fr|center]]&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Matériaux&amp;lt;/span&amp;gt;[[File:Materials_notext.png|175px|link=Materials/fr|center]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Vaisseaux&amp;lt;/span&amp;gt;[[File:Spaceships_notext.png|175px|link=Spaceships/fr|center]]&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Stations&amp;lt;/span&amp;gt;[[File:Stations_Table_Test_notext.png|175px|link=Stations/fr|center]]&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Outils&amp;lt;/span&amp;gt;[[File:Tools_notext.png|175px|link=Tools/fr|center]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Univers&amp;lt;/span&amp;gt;[[File:Space_category.png|175px|link=Space/fr|center]]&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Politiques&amp;lt;/span&amp;gt;[[File:Factions_notext.png|175px|link=Factions/fr|center]]&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Construction&amp;lt;/span&amp;gt;[[File:Sb_building_feature_block.png|175px|link=Building/fr|center]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{#evt:&lt;br /&gt;
service=youtube&lt;br /&gt;
|id=https://www.youtube.com/watch?v=zXLTFwoYM_s&lt;br /&gt;
|dimensions= 530&lt;br /&gt;
|alignment=center&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitableTransparent&amp;quot; style=&amp;quot;margin-right: auto; margin-left: auto; border: none&lt;br /&gt;
!colspan=&amp;quot;6&amp;quot;|&amp;lt;span class=&amp;quot;tableheader&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-size:110%&amp;quot;&amp;gt;&amp;lt;font color=&amp;quot;White&amp;quot;&amp;gt;Galerie de Fonctionnalités&amp;lt;/font&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;|[[File:Starbase_marketing_screenshot_derelict_1080p.png|214px]]&lt;br /&gt;
|[[File:Screnshot_several_spaceships.png |96px]]&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;|[[File:Screenshot_Bolt_tool.png|214px]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| [[File:Screenshot_megastation_1080p.png|96px]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;mpRight&amp;quot;&amp;gt; &amp;lt;!-- RIGHT COLUMN STARTS HERE --&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitableNoGrid&amp;quot; style=&amp;quot;margin: auto; border: none&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|&amp;lt;span class=&amp;quot;tableheader&amp;quot;&amp;gt;[[Weapons/fr|Armes]]&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| [[File:Assault rifle thumb.png|120px|link=Assault_rifle/fr|thumb|center|Fusil d’assaut]]&lt;br /&gt;
| [[File:Antigel thumb.png|120px|link=Antigel_rifle/fr|thumb|center|Fusil antigel]]&lt;br /&gt;
| [[File:Battle rifle thumb.png|120px|link=Battle_rifle/fr|thumb|center|Fusil de combat]]&lt;br /&gt;
| [[File:Bolter thumb.png|120px|link=Bolter/fr|thumb|center|Fusil à arc électrique]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| [[File:Flamer thumb.png|120px|link=Flamethrower/fr|thumb|center|Lance-flamme]]&lt;br /&gt;
| [[File:Gauss rifle thumb.png|120px|link=Gauss_rifle/fr|thumb|center|Fusil magnétique]]&lt;br /&gt;
| [[File:Laser rifle thumb.png|120px|link=Laser_rifle/fr|thumb|center|Fusil laser]]&lt;br /&gt;
| [[File:Long rifle thumb.png|120px|link=Long_rifle/fr|thumb|center|Fusil à longue portée]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| [[File:Pistol thumb.png|120px|link=Pistol/fr|thumb|center|Pistolet]]&lt;br /&gt;
| [[File:Repeater thumb.png|120px|link=Repeater_pistol/fr|thumb|center|Pistolet-mitrailleur]]&lt;br /&gt;
| [[File:Revolver thumb.png|120px|link=Revolver/fr|thumb|center|Revolver]]&lt;br /&gt;
| [[File:Shotgun thumb.png|120px|link=Shotgun/fr|thumb|center|Fusil à pompe]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitableNoGrid&amp;quot; style=&amp;quot;margin: auto; border: none;&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|&amp;lt;span class=&amp;quot;tableheader&amp;quot;&amp;gt;[[Mounted weapons/fr|Armes Montées]]&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| [[File:Autocannon.png|120px|link=Autocannon/fr|thumb|center|Auto-canon]]&lt;br /&gt;
| [[File:Laser weapon.png|120px|link=Laser cannon/fr|thumb|center|Canon laser]]&lt;br /&gt;
| [[File:Plasma cannon.png|120px|link=Plasma thrower/fr|thumb|center|Lance-plasma]]&lt;br /&gt;
| [[File:Rail weapon.png|120px|link=Rail cannon/fr|thumb|center|Canon à rail]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitableNoGrid&amp;quot; style=&amp;quot;margin: auto;&amp;quot; border: none&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|&amp;lt;span class=&amp;quot;tableheader&amp;quot;&amp;gt;[[Spaceships/fr|Vaisseaux]]&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| [[File:Spaceship hedron decal.jpg|120px|link=Hedron/fr|thumb|center|Hedron]]&lt;br /&gt;
| [[File:Spaceship Ithaca.jpg|120px|link=Ithaca/fr|thumb|center|Ithaca]]&lt;br /&gt;
| [[File:Spaceship remus.jpg|120px|link=Remus/fr|thumb|center|Remus]]&lt;br /&gt;
| [[File:Spaceship urchin decal.jpg|120px|link=Urchin/fr|thumb|center|Urchin]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| [[File:Spaceship Empire Lictor.JPG|120px|link=Lictor/fr|thumb|center|Lictor]]&lt;br /&gt;
| [[File:Empire_spatha.jpg|120px|link=Spatha/fr|thumb|center|Spatha]]&lt;br /&gt;
| [[File:Kingdom_knight.jpg|120px|link=Knight/fr|thumb|center|Knight]]&lt;br /&gt;
| [[File:Kingdom_lancer.jpg|120px|link=Lancer/fr|thumb|center|Lancer]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=Page_d%E2%80%99accueil&amp;diff=30498</id>
		<title>Page d’accueil</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=Page_d%E2%80%99accueil&amp;diff=30498"/>
		<updated>2022-04-07T22:44:46Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: ajout d'un lien vers &amp;quot;spaceship assembly guide:fr&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- For normal pages, use Otherlang2 instead of OtherlangMP --&amp;gt;&lt;br /&gt;
{{OtherlangMP&lt;br /&gt;
|en=Main_Page&lt;br /&gt;
|de=Main_Page:de&lt;br /&gt;
|ru=Главная_страница&lt;br /&gt;
|zh-cn=主页&lt;br /&gt;
|pl=Main_Page:pl&lt;br /&gt;
|nl=Main_Page:nl&lt;br /&gt;
}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{#css:&lt;br /&gt;
  span.approvedAndLatestMsg {&lt;br /&gt;
    display: none;&lt;br /&gt;
  }&lt;br /&gt;
  span.approvingUser {&lt;br /&gt;
    display: none;&lt;br /&gt;
  }&lt;br /&gt;
  h1 {&lt;br /&gt;
    display: none;&lt;br /&gt;
  }&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;div class=&amp;quot;mpRow&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;mpLeftPadding&amp;quot;&amp;gt; &amp;lt;!-- LEFT COLUMN STARTS HERE --&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitableNoGrid&amp;quot; style=&amp;quot;border: 0px !important; margin: -10px; width: calc(100% + 20px);&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|&amp;lt;span class=&amp;quot;tableheader&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-size:110%&amp;quot;&amp;gt;&amp;lt;font color=&amp;quot;White&amp;quot;&amp;gt;À propos de Starbase&amp;lt;/font&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
[[File:AboutStarbaseRobot.png|150px|right]] &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Dans l'univers de Starbase tout le monde contrôle un [[Endoskeleton/fr|endosquelette]] robotique, un corps assez durable étant idéal pour l'exploration spatiale et la colonisation. La société, formée de ces robotiques endosquelettes est actuellement concentrée sur de gigantesques [[Capital_Mega_Station/fr|Super Stations]] et de plus petites Mini Stations, les &amp;quot;banlieues&amp;quot; dans l'espace. Les stations fournissent sécurité, [[jobs/fr|travail]], point de rencontre et possibilités d'échange pour leurs habitants, faisant d'elles des bases idéales où commencer la colonisation de la galaxie.&lt;br /&gt;
&lt;br /&gt;
Dans la galaxie, les deux principales factions sont deux factions rivales, le [[Kingdom/fr|Royaume]] et l'[[Empire/fr|Empire]], l'Empire ayant le contrôle de la majorité des stations centrales. Les autres factions peuvent tout de même espérer ce placer à coté de ces deux géants un jour, avec l'évolution et la progression la société.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
La [[News Broadcasts/fr|vie]] dans l'[[Space/fr|espace]] étant actuellement centrée sur l'orbite céleste d'une planète gazeuse, les courageux aventuriers devront constamment explorer les limites du voyage spatial et d'autres technologies afin de pouvoir, un jour atteindre les coins les plus reculés de la galaxie.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitableNoGrid&amp;quot; style=&amp;quot;border: 0px !important; margin: -10px; width: calc(100% + 20px);&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|&amp;lt;span class=&amp;quot;tableheader&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-size:110%&amp;quot;&amp;gt;&amp;lt;font color=&amp;quot;White&amp;quot;&amp;gt;Menu&amp;lt;/font&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Main_Page/fr|Menu principal]]&lt;br /&gt;
&lt;br /&gt;
[[Special:AllPages|Toutes les pages]]&lt;br /&gt;
&lt;br /&gt;
[[Special:RecentChanges|Changement récent]]&lt;br /&gt;
&lt;br /&gt;
[[Special:SpecialPages|Page spécial]]&lt;br /&gt;
&lt;br /&gt;
[[News Broadcasts/fr|Diffusions de nouvelles]]&lt;br /&gt;
&lt;br /&gt;
[[Special:Random|Page aléatoire]]&lt;br /&gt;
&lt;br /&gt;
[[Rules/fr|Règlement]]&lt;br /&gt;
&lt;br /&gt;
[[Jobs/fr|Carrière]]&lt;br /&gt;
&lt;br /&gt;
[[Endoskeleton CV/fr|Curriculum vitæ]]&lt;br /&gt;
&lt;br /&gt;
[[Emotes/fr|Emotes]]&lt;br /&gt;
&lt;br /&gt;
[[Endoskeleton/fr|Endosquelette]]&lt;br /&gt;
&lt;br /&gt;
[[Insurance/fr|Assurance]]&lt;br /&gt;
&lt;br /&gt;
[[Data networks/fr|Réseaux de données]]&lt;br /&gt;
&lt;br /&gt;
[[Pipe networks/fr|Réseaux de canalisation]]&lt;br /&gt;
&lt;br /&gt;
[[Resource networks/fr|Réseau de ressources]]&lt;br /&gt;
&lt;br /&gt;
[[YOLOL:fr|Langage YOLOL]]&lt;br /&gt;
&lt;br /&gt;
[[FAQ/fr|Foire au questions]]&lt;br /&gt;
&lt;br /&gt;
[[Spaceship_Assembly_Guide:fr|Guide d'assemblage du vaisseau spatial]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;mpMiddle&amp;quot;&amp;gt; &amp;lt;!-- MIDDLE COLUMN STARTS HERE --&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitableTransparent&amp;quot; style=&amp;quot;margin-right: auto; margin-left: auto; border: none; margin-top: -3px;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Armes&amp;lt;/span&amp;gt;[[File:Combat_simulations_notext.png|175px|link=Weapons/fr|center]]&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Équipements&amp;lt;/span&amp;gt;[[File:Devices_notext.png|175px|link=Devices_and_machines/fr|center]]&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Matériaux&amp;lt;/span&amp;gt;[[File:Materials_notext.png|175px|link=Materials/fr|center]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Vaisseaux&amp;lt;/span&amp;gt;[[File:Spaceships_notext.png|175px|link=Spaceships/fr|center]]&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Stations&amp;lt;/span&amp;gt;[[File:Stations_Table_Test_notext.png|175px|link=Stations/fr|center]]&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Outils&amp;lt;/span&amp;gt;[[File:Tools_notext.png|175px|link=Tools/fr|center]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Univers&amp;lt;/span&amp;gt;[[File:Space_category.png|175px|link=Space/fr|center]]&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Politiques&amp;lt;/span&amp;gt;[[File:Factions_notext.png|175px|link=Factions/fr|center]]&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Construction&amp;lt;/span&amp;gt;[[File:Sb_building_feature_block.png|175px|link=Building/fr|center]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{#evt:&lt;br /&gt;
service=youtube&lt;br /&gt;
|id=https://www.youtube.com/watch?v=zXLTFwoYM_s&lt;br /&gt;
|dimensions= 530&lt;br /&gt;
|alignment=center&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitableTransparent&amp;quot; style=&amp;quot;margin-right: auto; margin-left: auto; border: none&lt;br /&gt;
!colspan=&amp;quot;6&amp;quot;|&amp;lt;span class=&amp;quot;tableheader&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-size:110%&amp;quot;&amp;gt;&amp;lt;font color=&amp;quot;White&amp;quot;&amp;gt;Galerie de Fonctionnalités&amp;lt;/font&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;|[[File:Starbase_marketing_screenshot_derelict_1080p.png|214px]]&lt;br /&gt;
|[[File:Screnshot_several_spaceships.png |96px]]&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;|[[File:Screenshot_Bolt_tool.png|214px]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| [[File:Screenshot_megastation_1080p.png|96px]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;mpRight&amp;quot;&amp;gt; &amp;lt;!-- RIGHT COLUMN STARTS HERE --&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitableNoGrid&amp;quot; style=&amp;quot;margin: auto; border: none&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|&amp;lt;span class=&amp;quot;tableheader&amp;quot;&amp;gt;[[Weapons/fr|Armes]]&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| [[File:Assault rifle thumb.png|120px|link=Assault_rifle/fr|thumb|center|Fusil d’assaut]]&lt;br /&gt;
| [[File:Antigel thumb.png|120px|link=Antigel_rifle/fr|thumb|center|Fusil antigel]]&lt;br /&gt;
| [[File:Battle rifle thumb.png|120px|link=Battle_rifle/fr|thumb|center|Fusil de combat]]&lt;br /&gt;
| [[File:Bolter thumb.png|120px|link=Bolter/fr|thumb|center|Fusil à arc électrique]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| [[File:Flamer thumb.png|120px|link=Flamethrower/fr|thumb|center|Lance-flamme]]&lt;br /&gt;
| [[File:Gauss rifle thumb.png|120px|link=Gauss_rifle/fr|thumb|center|Fusil magnétique]]&lt;br /&gt;
| [[File:Laser rifle thumb.png|120px|link=Laser_rifle/fr|thumb|center|Fusil laser]]&lt;br /&gt;
| [[File:Long rifle thumb.png|120px|link=Long_rifle/fr|thumb|center|Fusil à longue portée]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| [[File:Pistol thumb.png|120px|link=Pistol/fr|thumb|center|Pistolet]]&lt;br /&gt;
| [[File:Repeater thumb.png|120px|link=Repeater_pistol/fr|thumb|center|Pistolet-mitrailleur]]&lt;br /&gt;
| [[File:Revolver thumb.png|120px|link=Revolver/fr|thumb|center|Revolver]]&lt;br /&gt;
| [[File:Shotgun thumb.png|120px|link=Shotgun/fr|thumb|center|Fusil à pompe]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitableNoGrid&amp;quot; style=&amp;quot;margin: auto; border: none;&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|&amp;lt;span class=&amp;quot;tableheader&amp;quot;&amp;gt;[[Mounted weapons/fr|Armes Montées]]&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| [[File:Autocannon.png|120px|link=Autocannon/fr|thumb|center|Auto-canon]]&lt;br /&gt;
| [[File:Laser weapon.png|120px|link=Laser cannon/fr|thumb|center|Canon laser]]&lt;br /&gt;
| [[File:Plasma cannon.png|120px|link=Plasma thrower/fr|thumb|center|Lance-plasma]]&lt;br /&gt;
| [[File:Rail weapon.png|120px|link=Rail cannon/fr|thumb|center|Canon à rail]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitableNoGrid&amp;quot; style=&amp;quot;margin: auto;&amp;quot; border: none&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|&amp;lt;span class=&amp;quot;tableheader&amp;quot;&amp;gt;[[Spaceships/fr|Vaisseaux]]&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| [[File:Spaceship hedron decal.jpg|120px|link=Hedron/fr|thumb|center|Hedron]]&lt;br /&gt;
| [[File:Spaceship Ithaca.jpg|120px|link=Ithaca/fr|thumb|center|Ithaca]]&lt;br /&gt;
| [[File:Spaceship remus.jpg|120px|link=Remus/fr|thumb|center|Remus]]&lt;br /&gt;
| [[File:Spaceship urchin decal.jpg|120px|link=Urchin/fr|thumb|center|Urchin]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| [[File:Spaceship Empire Lictor.JPG|120px|link=Lictor/fr|thumb|center|Lictor]]&lt;br /&gt;
| [[File:Empire_spatha.jpg|120px|link=Spatha/fr|thumb|center|Spatha]]&lt;br /&gt;
| [[File:Kingdom_knight.jpg|120px|link=Knight/fr|thumb|center|Knight]]&lt;br /&gt;
| [[File:Kingdom_lancer.jpg|120px|link=Lancer/fr|thumb|center|Lancer]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=Spaceship_assembly_guide/fr&amp;diff=30497</id>
		<title>Spaceship assembly guide/fr</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=Spaceship_assembly_guide/fr&amp;diff=30497"/>
		<updated>2022-04-07T22:42:06Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: Created blank page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=YOLOL/fr&amp;diff=30496</id>
		<title>YOLOL/fr</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=YOLOL/fr&amp;diff=30496"/>
		<updated>2022-04-07T22:30:12Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: /* Errors */  Traduction&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Otherlang2&lt;br /&gt;
|en=YOLOL&lt;br /&gt;
|de=YOLOL:de&lt;br /&gt;
|fr=YOLOL:fr&lt;br /&gt;
|ru=YOLOL:ru&lt;br /&gt;
|ua=YOLOL:ua&lt;br /&gt;
|jp=YOLOL:jp&lt;br /&gt;
|zh-cn=YOLOL语言&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
{{#evt:service=youtube|id=https://www.youtube.com/watch?v=7lXK6_bktUk|alignment=center}}&lt;br /&gt;
&lt;br /&gt;
le YOLOL est un langage de programmation spécifique à Starbase qui est utilisé en parallèle du l'[[Universal tool:fr|outil universel]] pour contrôler et gérer les [[Devices_and_machines:fr|appareils]].&amp;lt;br&amp;gt;&lt;br /&gt;
Le code est écrit ligne par ligne sur une [[YOLOL Chip:fr|puce YOLOL]] qui est ensuite insérée dans un [[Chip socket:fr|socle à puce]] connecté au [[Data networks:fr|réseau de données]] du vaisseau afin d'accéder aux [[Device fields:fr|champs de périphérique]].&amp;lt;br&amp;gt;&lt;br /&gt;
Le langage YOLOL est compatible avec presque tous les équipements et engins de l'univers connu.&lt;br /&gt;
&lt;br /&gt;
===Comment ça marche?===&lt;br /&gt;
Le YOLOL fonctionne par cycle: Les lignes de code sont exécutées les unes après les autres du haut vers le bas, puis la séquence reprend une fois la dernière ligne passée. Chaque ligne est lue dans un intervalle de temps constant de 0.2 secondes, quelque soit sa longueur et le nombre d'instructions qui y sont contenues.&lt;br /&gt;
&lt;br /&gt;
Pour faire simple:&lt;br /&gt;
# Le code se lance en commençant par la ligne 1&lt;br /&gt;
# La ligne en cours est exécutée, puis le programme passe à la suivante après un intervalle de temps de 0.2 secondes&lt;br /&gt;
# L'étape 2 est répétée pour les lignes 2, 3, 4... jusqu'à la dernière&lt;br /&gt;
# La puce se réinitialise à l'étape 1 une fois le processus terminé&lt;br /&gt;
&lt;br /&gt;
===Limites===&lt;br /&gt;
* Chaque puce YOLOL contient 20 lignes de code. Ni plus, ni moins. L'exécution d'un cycle complet prend donc 20 * 0.2 = 4 secondes si il est mené à son terme.&lt;br /&gt;
* Chaque lignes peut contenir un maximum de 70 caractères (symboles et espaces inclus).&lt;br /&gt;
&lt;br /&gt;
===Remarques===&lt;br /&gt;
* Les puces YOLOL possèdent une fonction de mise en pause, qui fige l'exécution du code à la ligne en cours.&lt;br /&gt;
* Les lignes blanches nécessitent tout de même l'intervalle de temps des 0.2 secondes pour être passées, provoquant de courts délais d'exécution (il en va de même pour les lignes ne contenant que des commentaires).&lt;br /&gt;
* Une seule ligne de code peut contenir plusieurs instructions à la fois, autant que peut le supporter la limite maximale de caractères.&lt;br /&gt;
* Certaines instructions permettent de passer à une ligne spécifique, ce qui rend le code plus modulable.&lt;br /&gt;
&lt;br /&gt;
== Les Variables ==&lt;br /&gt;
Les variables permettent d'associer un '''nom''' à une '''valeur''' pour faciliter l'acquisition ultérieure de cette dernière. Dès lors, à chaque fois que le '''nom''' de la variable sera appelé, c'est sa '''valeur''' qui sera demandée et/ou modifiée suivant l'instruction utilisée.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 ButtonState = 1&lt;br /&gt;
* Dans ce script, on attribue à la variable nommée '''ButtonState''' la valeur numérique '''1'''.&lt;br /&gt;
 if ButtonState &amp;gt;= 1 then DoorState = 1 end&lt;br /&gt;
* Maintenant, on vérifie si la valeur de la variable '''ButtonState''' est supérieure ou égale à '''1''', auquel cas la variable '''DoorState''' se voit elle aussi associée à '''1'''.&lt;br /&gt;
&lt;br /&gt;
===Les Noms de Variables===&lt;br /&gt;
====Sensibilité à la casse====&lt;br /&gt;
Le langage YOLOL est dit &amp;quot;insensible à la casse&amp;quot;, ce qui signifie que les noms des variables peuvent contenir des majuscules et des minuscules sans différencier les deux. Ainsi '''ButtonState''' et '''buttonstate''' désignent indistinctement la même variable. C'est une fonctionnalité très pratique pour rendre le code plus lisible.&lt;br /&gt;
&lt;br /&gt;
====Les variables internes et externes====&lt;br /&gt;
Il existe deux genre de variables: les '''variables internes''' qui ne peuvent être utilisées qu'au sein de la puce YOLOL où elles ont été initiées et les '''variables externes''' qui font appel aux [[device fields:fr|champs de périphérique]] des appareils branchés sur le même [[data networks:fr|réseau de données]] pour en demander ou modifier les valeurs.&amp;lt;br&amp;gt;&lt;br /&gt;
Pour les différencier, les variables externes sont précédées d'un double-point (''':''').&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 if :ButtonState &amp;gt;= 1 then :DoorState = 1 end&lt;br /&gt;
* Comme vu précédemment, ce script évalue la valeur de '''ButtonState''' et, si elle est supérieure ou égale à '''1''', associe '''DoorState''' à '''1'''. Les deux variables seront cependant ici appelées sur l'ensemble des équipements présents sur le réseau de données, par exemple pour ouvrir une porte si un bouton est appuyé.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Remarques====&lt;br /&gt;
* Les champs ayant le même nom au sein du réseau de données sont liées et ont presque toujours la même valeur. Ainsi, une variable externe qui en modifie la valeur le fera sur tout les appareils associés.&lt;br /&gt;
* Il n'est actuellement pas possible d'appeler une variable initiée sur un puce YOLOL depuis une autre puce YOLOL.&lt;br /&gt;
&lt;br /&gt;
===Les Valeurs de Variables===&lt;br /&gt;
====Typage====&lt;br /&gt;
Le langage YOLOL supporte deux types de valeurs pour les variables: Les '''valeurs numériques''' et les '''chaînes de caractères''' (ou &amp;quot;string&amp;quot;). Cette différence est importante car en fonction du type de variable, le résultat d'une même instruction sera différente.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 Addition = 3 + 5&lt;br /&gt;
* Cette instruction conduit à additionner les deux valeurs numériques '''3''' et '''5'''. Le résultat sera donc '''8'''.&lt;br /&gt;
 Addition = &amp;quot;3&amp;quot; + &amp;quot;5&amp;quot;&lt;br /&gt;
* Cette instruction conduit à associer les chaînes de caractères '''&amp;quot;3&amp;quot;''' et '''&amp;quot;5&amp;quot;'''. Le résultat sera donc '''&amp;quot;35&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
Les variables sont dites à &amp;quot;faible typage&amp;quot;, c'est-à-dire qu'elles ne sont pas restreintes à un seul type. Elles se convertissent systématiquement aux valeurs qui leur sont assignées. Ainsi, une variable associée à une valeur numérique peut la remplacer par une chaîne de caractères et inversement sans provoquer d'erreur dans le code.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 AutoPilot = 128.643&lt;br /&gt;
* cette première instruction associe la variable '''AutoPilot''' à la valeur numérique '''128.643'''.&lt;br /&gt;
 AutoPilot= &amp;quot;Erreur détectée&amp;quot;&lt;br /&gt;
* La variable '''AutoPilot''' se convertit en s'associant à la chaîne de caractères '''&amp;quot;Erreur détectée&amp;quot;''' et la valeur numérique '''128.643''' est effacée.&lt;br /&gt;
&lt;br /&gt;
====Les valeurs numériques====&lt;br /&gt;
Les valeurs numérique dans le langage YOLOL sont des décimales à point fixe. La précision est de un millième: Jusqu'à trois nombre sous la décimale sont acceptés. Fournir une valeur plus précise fonctionne, mais n'affecte pas le résultat final.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 Pi = 3,14159265&lt;br /&gt;
* Le script ci-dessus tente d'associer la variable '''Pi''' à la valeur numérique '''3,14159265'''. Le résultat final sera cependant '''Pi = 3.141''', coupant la précision à trois nombre sous la décimale.&lt;br /&gt;
&lt;br /&gt;
La taille maximale d'une valeur numérique est de 64-bit. De ce fait, la portée maximale (même après opération) est de [-9223372036854775.808, 9223372036854775.807]. Toutes valeurs supérieures ou inférieures seront ramenées aux limites de la portée.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 StarTrek = 9999999999999999.999&lt;br /&gt;
* Ici, on tente d'associer la variable '''StarTrek''' à la valeur numérique '''9999999999999999.999'''. Celle-ci est cependant supérieure à la portée maximale et le résultat final sera '''StarTrek = 9223372036854775.807'''.&lt;br /&gt;
&lt;br /&gt;
====Les chaînes de caractères====&lt;br /&gt;
Pour signaler une chaîne de caractères au langage YOLOL, celle-ci doit être entourée de double-guillemets ('''&amp;quot; &amp;quot;''').&lt;br /&gt;
&lt;br /&gt;
 BadRobots= &amp;quot;Saltberia&amp;quot; &lt;br /&gt;
* Ce script associe la variable '''BadRobot''' à la chaîne de caractères '''&amp;quot;Saltberia&amp;quot;'''.&lt;br /&gt;
Comme pour les valeurs numériques, la taille maximale d'une chaîne de caractères est de 64-bit.&lt;br /&gt;
&lt;br /&gt;
====Remarques====&lt;br /&gt;
* Chaque variable ne peut être que d'un type à la fois, bien que celui-ci puisse être converti au besoin.&lt;br /&gt;
* Les valeurs &amp;quot;False&amp;quot; et &amp;quot;True&amp;quot; sont de type numérique: Elles correspondent respectivement à &amp;quot;0&amp;quot; et &amp;quot;non-0&amp;quot;.&lt;br /&gt;
* Une variable non définie préalablement a par défaut la valeur numérique &amp;quot;0&amp;quot;. L'absence de valeur (&amp;quot;null&amp;quot;) n'est pas reconnue.&lt;br /&gt;
&lt;br /&gt;
==Les Opérateurs==&lt;br /&gt;
&lt;br /&gt;
Note that the available operators may be limited by the type of the programmable [[YOLOL Chip|chip]].&amp;lt;br&amp;gt;&lt;br /&gt;
Basic chips have a limited selection of functions while more advanced ones can perform more complex operations natively.&lt;br /&gt;
&lt;br /&gt;
=== Basic arithmetic and assignment operators ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation || Numeric operation || String operation || Chip availability&lt;br /&gt;
|-&lt;br /&gt;
| A + B || Addition || String A is appended by String B. || All&lt;br /&gt;
|-&lt;br /&gt;
| A - B || Subtraction || The last appearance of String B in String A is removed from String A. || All&lt;br /&gt;
|-&lt;br /&gt;
| A * B || Multiplication || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A / B || Division || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A ++ || PostIncrement (A=A+1) || Appends a space to String A. Evaluates to the original value. || All&lt;br /&gt;
|-&lt;br /&gt;
| A -- || PostDecrement (A=A-1) || Removes the last character of the string. Results in runtime error when trying to remove &amp;quot;&amp;quot;. Evaluates to the original value. || All&lt;br /&gt;
|-&lt;br /&gt;
| ++ A  || PreIncrement (A=A+1) || Appends a space to String A. Evaluates to the modified value. || All&lt;br /&gt;
|-&lt;br /&gt;
| -- A || PreDecrement (A=A-1) || Removes the last character of the string. Results in runtime error when trying to remove &amp;quot;&amp;quot;. Evaluates to the modified value. || All&lt;br /&gt;
|-&lt;br /&gt;
| A = B || Assignment (Variable A is set to the value of variable B) || Assignment || All&lt;br /&gt;
|-&lt;br /&gt;
| A += B || Addition-assignment (A=A+B) || A is assigned the value of string-operation A+B || All&lt;br /&gt;
|-&lt;br /&gt;
| A -= B || Subtraction-assignment (A=A-B) || A is assigned the value of string-operation A-B || All&lt;br /&gt;
|-&lt;br /&gt;
| A *= B || Multiplication-assignment (A=A*B) || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A /= B || Division-assignment (A=A/B) || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A ^= B || Exponentiation-assignment (A=A^B) || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A %= B || Modulo-assignment (A=A%B) || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A ^ B || Exponentiation || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A % B || Modulo || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| ABS A || Modulus (absol value) (A=A if A&amp;gt;=0, else A=-A) || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A! || Factorial || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| SQRT A || Square root of A || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| SIN A || Sine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| COS A || Cosine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| TAN A || Tangent of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| ASIN A || Inverse sine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| ACOS A || Inverse cosine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| ATAN A || Inverse tangent of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Logical operators ===&lt;br /&gt;
&lt;br /&gt;
Logical operators are checks that identify if the statement is true or false.&amp;lt;br&amp;gt;&lt;br /&gt;
All logical operations return either '''&amp;quot;0 for False&amp;quot;''' or '''&amp;quot;1 for True&amp;quot;'''. &lt;br /&gt;
The '''NOT''', '''AND''', and '''OR''' keywords consider 0 to be falsy and anything not 0 to be truthy.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation || Numeric operation || String operation || Chip availability&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;lt; B || Less than || returns 1 if String A is first in alphabetical order, returns 0 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;gt; B || Greater than || returns 0 if String A is first in alphabetical order, returns 1 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;lt;= B ||Less than or equal to || returns 1 if String A is first in alphabetical order or identical to String B, returns 0 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;gt;= B || Greater than or equal to || returns 0 if String A is first in alphabetical order or identical to String B, returns 1 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A != B || Not equal to || returns 1 if String A is not equal to String B, 0 if it is. || All&lt;br /&gt;
|-&lt;br /&gt;
| A == B || Equal to || returns 1 if String A is equal to String B, 0 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| NOT A || Not || Returns 1 if A is 0, otherwise returns 0. || All&lt;br /&gt;
|-&lt;br /&gt;
| A AND B || And || Returns 1 if neither A nor B are 0, otherwise returns 0. || All&lt;br /&gt;
|-&lt;br /&gt;
| A OR B || Or || Returns 1 if either A or B is not 0, otherwise returns 0. || All&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Mixing variable types in operations ===&lt;br /&gt;
&lt;br /&gt;
Mixing variable types in an operation handles the operation using all parameters as ''strings''.&lt;br /&gt;
&lt;br /&gt;
 previouslyNumber= &amp;quot;10&amp;quot; + 15&lt;br /&gt;
* The above script results in '''previouslyNumber''' containing the string value &amp;quot;1015&amp;quot;.&lt;br /&gt;
** Note that the involved parameters themselves don't change types, their values are just cast as strings for the purpose of the operation:&lt;br /&gt;
 &lt;br /&gt;
 purelyNumber = 15&lt;br /&gt;
 purelyString = &amp;quot;10&amp;quot; + purelyNumber&lt;br /&gt;
* When this script has executed, '''purelyString''' contains the string value of &amp;quot;1015&amp;quot;, while '''purelyNumber''' still contains the numeric value of 15.&lt;br /&gt;
&lt;br /&gt;
=== Order of Operations ===&lt;br /&gt;
&lt;br /&gt;
Operations are conducted in the following order, when operators have the same precidence, left to right.&amp;lt;br&amp;gt;&lt;br /&gt;
Where a line has multiple statements, they are executed left to right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operators &lt;br /&gt;
! Comments&lt;br /&gt;
|-&lt;br /&gt;
| ++ --&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;!&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| operators &lt;br /&gt;
| sqrt, abs, sin etc.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| negate&lt;br /&gt;
|-&lt;br /&gt;
| ^&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| */&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt; &amp;gt; == != &amp;lt;= &amp;gt;=&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Surprise!&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;+-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| not (logical negation)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| or&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| and&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Les Commandes==&lt;br /&gt;
&lt;br /&gt;
=== If-else conditional ===&lt;br /&gt;
&lt;br /&gt;
If-else statements are used to branch out the script into different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
They use the following syntax:&lt;br /&gt;
* '''if ''condition'' then ''statement'' else ''statement'' end'''&lt;br /&gt;
** Condition is a statement that results in a numeric value (where 0 is parsed as False, anything else as True), and statements are pieces of script that are run.&lt;br /&gt;
** All If-else conditional stations must have '''end''' syntax written after statement is complete.&lt;br /&gt;
** The statement has to be on one line. The if, then, else and end cannot be on different lines.&lt;br /&gt;
&lt;br /&gt;
If can be used to branch script execution into two possible outcomes temporarily based on variable value(s).&amp;lt;br&amp;gt;&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable != 2 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 3 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; endResult = 4 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* This script sets the value of '''endResult''' to 3 if '''variable''' does not have the value of 2.&lt;br /&gt;
* If '''variable''''s value is 2, '''endResult''' is set to the value of 4.&lt;br /&gt;
&lt;br /&gt;
Note that the else statement -part can be left out if not needed. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable != 2 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 3 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
*This script only sets the value of 3 to '''endResult''' if '''variable''' does not have a value of 2, and doesn't do anything else.&lt;br /&gt;
&lt;br /&gt;
==== Nesting if statements ====&lt;br /&gt;
&lt;br /&gt;
It is possible to place if-conditionals inside the true/false statement blocks to achieve further branching of execution.&amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 0 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 1 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 1 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 2 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &lt;br /&gt;
* This script sets '''endResult''' to 1 if '''variable''' equals 0.&lt;br /&gt;
* If '''variable''' doesn't equal 0, but it equals 1, '''endResult''' is set to 2.&lt;br /&gt;
&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 0 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; endResult == 1 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 2 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; endResult = 1 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
* This script sets '''endResult''' to 2 if '''variable''' has a value of 0, and '''endResult''' equals to 1.&lt;br /&gt;
* Otherwise it sets '''endResult''' to 1.&lt;br /&gt;
&lt;br /&gt;
=== Goto ===&lt;br /&gt;
&lt;br /&gt;
Goto syntax is used when the normal script reading order from 1-&amp;gt;20 is not desired, or needs to be altered.&lt;br /&gt;
&lt;br /&gt;
Goto is used with the following syntax:&lt;br /&gt;
*'''goto lineNumber'''&lt;br /&gt;
** lineNumber is the line which this command will take the script execution.&amp;lt;br&amp;gt;&lt;br /&gt;
** Any remaining script that is on the same line after the goto-command will not be executed.&lt;br /&gt;
*** using if statements before goto ignores goto syntax, assuming the if-statement is false&lt;br /&gt;
** Multiple goto commands can be added on the same line using conditionals, as '''False''' goto commands are skipped.&lt;br /&gt;
** Numeric values outside the [1,20] range are clamped to this range.&lt;br /&gt;
** Non-integer values are floored.&lt;br /&gt;
** String values will result in a Runtime Error.&lt;br /&gt;
&lt;br /&gt;
 if variable == 5 then '''goto 4''' end '''goto 6'''&lt;br /&gt;
&lt;br /&gt;
The script above will go to line number 4, if '''variable''' has a value of 5.&amp;lt;br&amp;gt;&lt;br /&gt;
Otherwise it will go to line number 6. Numerical operations can also be done &amp;quot;inside&amp;quot; the goto, e.g. &lt;br /&gt;
&lt;br /&gt;
  goto 4+1&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
Comments are useful when writing code that is used by a lot of programmers.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that comments also use up space from the pre-determined 70 character line limit and are not excluded from it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commenting is used with the following syntax:&lt;br /&gt;
*// '''text'''&lt;br /&gt;
** Text can be any single-line set of characters.&lt;br /&gt;
&lt;br /&gt;
 '''//''' This is a comment. It will explain how other lines of script work.&lt;br /&gt;
* An example of a possible comment syntax&lt;br /&gt;
&lt;br /&gt;
== Les erreurs ==&lt;br /&gt;
&lt;br /&gt;
Il y a deux types d'erreurs qui peuvent survenir pendant l'éxecution d'une séquence YOLOL:&lt;br /&gt;
# '''Les erreurs de syntaxe (&amp;quot;syntax errors&amp;quot;)''': elles résultent d'un script invalide et empêchent l'interprétation de la ligne toute entière, qui est donc ignorée pour passer directement à la suivante.&lt;br /&gt;
# '''Les erreurs d'exécution (&amp;quot;runtime errors&amp;quot;)''': elles ne sont détectées que pendant l'éxecution du script et provoquent l'arrêt de l'interprétation de la ligne en cours pour passer à la suivante. Elles n'impactent donc pas les instructions antérieures.&lt;br /&gt;
&lt;br /&gt;
== Bugs connus/Comportements indésirables==&lt;br /&gt;
Voici une liste des problèmes relevés avec l'utilisation du langage YOLOL:&amp;lt;br&amp;gt;&lt;br /&gt;
* Les noms de variables contenant les mots-clé &amp;quot;if&amp;quot;, &amp;quot;else&amp;quot; et &amp;quot;end&amp;quot; sont mal interprétés par le langage et provoquent une erreur de syntaxe. Les noms tels que '''life''' ou '''endurance''' sont donc à éviter.&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
==YOLOL Tips &amp;amp; Tricks==&lt;br /&gt;
* [[Common YOLOL|Common YOLOL scripts]]&lt;br /&gt;
* [[YOLOL Tricks]]&lt;br /&gt;
&lt;br /&gt;
== Pages associées ==&lt;br /&gt;
* [[Data networks:fr|Réseaux de données]]&lt;br /&gt;
* [[Devices and machines:fr|Appareils et machines]]&lt;br /&gt;
* [[Device fields:fr|Champs de périphérique ]]&lt;br /&gt;
* [[Universal tool:fr|Outil universel]]&lt;br /&gt;
* [[YOLOL Chip:fr|Puce YOLOL]]&lt;br /&gt;
* [[Chip socket:fr|Socle à puce]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Networks|YOLOL:fr]]&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=YOLOL/fr&amp;diff=30495</id>
		<title>YOLOL/fr</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=YOLOL/fr&amp;diff=30495"/>
		<updated>2022-04-07T22:10:15Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: /* Known Bugs/Unintended Behavior */  Traduction&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Otherlang2&lt;br /&gt;
|en=YOLOL&lt;br /&gt;
|de=YOLOL:de&lt;br /&gt;
|fr=YOLOL:fr&lt;br /&gt;
|ru=YOLOL:ru&lt;br /&gt;
|ua=YOLOL:ua&lt;br /&gt;
|jp=YOLOL:jp&lt;br /&gt;
|zh-cn=YOLOL语言&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
{{#evt:service=youtube|id=https://www.youtube.com/watch?v=7lXK6_bktUk|alignment=center}}&lt;br /&gt;
&lt;br /&gt;
le YOLOL est un langage de programmation spécifique à Starbase qui est utilisé en parallèle du l'[[Universal tool:fr|outil universel]] pour contrôler et gérer les [[Devices_and_machines:fr|appareils]].&amp;lt;br&amp;gt;&lt;br /&gt;
Le code est écrit ligne par ligne sur une [[YOLOL Chip:fr|puce YOLOL]] qui est ensuite insérée dans un [[Chip socket:fr|socle à puce]] connecté au [[Data networks:fr|réseau de données]] du vaisseau afin d'accéder aux [[Device fields:fr|champs de périphérique]].&amp;lt;br&amp;gt;&lt;br /&gt;
Le langage YOLOL est compatible avec presque tous les équipements et engins de l'univers connu.&lt;br /&gt;
&lt;br /&gt;
===Comment ça marche?===&lt;br /&gt;
Le YOLOL fonctionne par cycle: Les lignes de code sont exécutées les unes après les autres du haut vers le bas, puis la séquence reprend une fois la dernière ligne passée. Chaque ligne est lue dans un intervalle de temps constant de 0.2 secondes, quelque soit sa longueur et le nombre d'instructions qui y sont contenues.&lt;br /&gt;
&lt;br /&gt;
Pour faire simple:&lt;br /&gt;
# Le code se lance en commençant par la ligne 1&lt;br /&gt;
# La ligne en cours est exécutée, puis le programme passe à la suivante après un intervalle de temps de 0.2 secondes&lt;br /&gt;
# L'étape 2 est répétée pour les lignes 2, 3, 4... jusqu'à la dernière&lt;br /&gt;
# La puce se réinitialise à l'étape 1 une fois le processus terminé&lt;br /&gt;
&lt;br /&gt;
===Limites===&lt;br /&gt;
* Chaque puce YOLOL contient 20 lignes de code. Ni plus, ni moins. L'exécution d'un cycle complet prend donc 20 * 0.2 = 4 secondes si il est mené à son terme.&lt;br /&gt;
* Chaque lignes peut contenir un maximum de 70 caractères (symboles et espaces inclus).&lt;br /&gt;
&lt;br /&gt;
===Remarques===&lt;br /&gt;
* Les puces YOLOL possèdent une fonction de mise en pause, qui fige l'exécution du code à la ligne en cours.&lt;br /&gt;
* Les lignes blanches nécessitent tout de même l'intervalle de temps des 0.2 secondes pour être passées, provoquant de courts délais d'exécution (il en va de même pour les lignes ne contenant que des commentaires).&lt;br /&gt;
* Une seule ligne de code peut contenir plusieurs instructions à la fois, autant que peut le supporter la limite maximale de caractères.&lt;br /&gt;
* Certaines instructions permettent de passer à une ligne spécifique, ce qui rend le code plus modulable.&lt;br /&gt;
&lt;br /&gt;
== Les Variables ==&lt;br /&gt;
Les variables permettent d'associer un '''nom''' à une '''valeur''' pour faciliter l'acquisition ultérieure de cette dernière. Dès lors, à chaque fois que le '''nom''' de la variable sera appelé, c'est sa '''valeur''' qui sera demandée et/ou modifiée suivant l'instruction utilisée.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 ButtonState = 1&lt;br /&gt;
* Dans ce script, on attribue à la variable nommée '''ButtonState''' la valeur numérique '''1'''.&lt;br /&gt;
 if ButtonState &amp;gt;= 1 then DoorState = 1 end&lt;br /&gt;
* Maintenant, on vérifie si la valeur de la variable '''ButtonState''' est supérieure ou égale à '''1''', auquel cas la variable '''DoorState''' se voit elle aussi associée à '''1'''.&lt;br /&gt;
&lt;br /&gt;
===Les Noms de Variables===&lt;br /&gt;
====Sensibilité à la casse====&lt;br /&gt;
Le langage YOLOL est dit &amp;quot;insensible à la casse&amp;quot;, ce qui signifie que les noms des variables peuvent contenir des majuscules et des minuscules sans différencier les deux. Ainsi '''ButtonState''' et '''buttonstate''' désignent indistinctement la même variable. C'est une fonctionnalité très pratique pour rendre le code plus lisible.&lt;br /&gt;
&lt;br /&gt;
====Les variables internes et externes====&lt;br /&gt;
Il existe deux genre de variables: les '''variables internes''' qui ne peuvent être utilisées qu'au sein de la puce YOLOL où elles ont été initiées et les '''variables externes''' qui font appel aux [[device fields:fr|champs de périphérique]] des appareils branchés sur le même [[data networks:fr|réseau de données]] pour en demander ou modifier les valeurs.&amp;lt;br&amp;gt;&lt;br /&gt;
Pour les différencier, les variables externes sont précédées d'un double-point (''':''').&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 if :ButtonState &amp;gt;= 1 then :DoorState = 1 end&lt;br /&gt;
* Comme vu précédemment, ce script évalue la valeur de '''ButtonState''' et, si elle est supérieure ou égale à '''1''', associe '''DoorState''' à '''1'''. Les deux variables seront cependant ici appelées sur l'ensemble des équipements présents sur le réseau de données, par exemple pour ouvrir une porte si un bouton est appuyé.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Remarques====&lt;br /&gt;
* Les champs ayant le même nom au sein du réseau de données sont liées et ont presque toujours la même valeur. Ainsi, une variable externe qui en modifie la valeur le fera sur tout les appareils associés.&lt;br /&gt;
* Il n'est actuellement pas possible d'appeler une variable initiée sur un puce YOLOL depuis une autre puce YOLOL.&lt;br /&gt;
&lt;br /&gt;
===Les Valeurs de Variables===&lt;br /&gt;
====Typage====&lt;br /&gt;
Le langage YOLOL supporte deux types de valeurs pour les variables: Les '''valeurs numériques''' et les '''chaînes de caractères''' (ou &amp;quot;string&amp;quot;). Cette différence est importante car en fonction du type de variable, le résultat d'une même instruction sera différente.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 Addition = 3 + 5&lt;br /&gt;
* Cette instruction conduit à additionner les deux valeurs numériques '''3''' et '''5'''. Le résultat sera donc '''8'''.&lt;br /&gt;
 Addition = &amp;quot;3&amp;quot; + &amp;quot;5&amp;quot;&lt;br /&gt;
* Cette instruction conduit à associer les chaînes de caractères '''&amp;quot;3&amp;quot;''' et '''&amp;quot;5&amp;quot;'''. Le résultat sera donc '''&amp;quot;35&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
Les variables sont dites à &amp;quot;faible typage&amp;quot;, c'est-à-dire qu'elles ne sont pas restreintes à un seul type. Elles se convertissent systématiquement aux valeurs qui leur sont assignées. Ainsi, une variable associée à une valeur numérique peut la remplacer par une chaîne de caractères et inversement sans provoquer d'erreur dans le code.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 AutoPilot = 128.643&lt;br /&gt;
* cette première instruction associe la variable '''AutoPilot''' à la valeur numérique '''128.643'''.&lt;br /&gt;
 AutoPilot= &amp;quot;Erreur détectée&amp;quot;&lt;br /&gt;
* La variable '''AutoPilot''' se convertit en s'associant à la chaîne de caractères '''&amp;quot;Erreur détectée&amp;quot;''' et la valeur numérique '''128.643''' est effacée.&lt;br /&gt;
&lt;br /&gt;
====Les valeurs numériques====&lt;br /&gt;
Les valeurs numérique dans le langage YOLOL sont des décimales à point fixe. La précision est de un millième: Jusqu'à trois nombre sous la décimale sont acceptés. Fournir une valeur plus précise fonctionne, mais n'affecte pas le résultat final.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 Pi = 3,14159265&lt;br /&gt;
* Le script ci-dessus tente d'associer la variable '''Pi''' à la valeur numérique '''3,14159265'''. Le résultat final sera cependant '''Pi = 3.141''', coupant la précision à trois nombre sous la décimale.&lt;br /&gt;
&lt;br /&gt;
La taille maximale d'une valeur numérique est de 64-bit. De ce fait, la portée maximale (même après opération) est de [-9223372036854775.808, 9223372036854775.807]. Toutes valeurs supérieures ou inférieures seront ramenées aux limites de la portée.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 StarTrek = 9999999999999999.999&lt;br /&gt;
* Ici, on tente d'associer la variable '''StarTrek''' à la valeur numérique '''9999999999999999.999'''. Celle-ci est cependant supérieure à la portée maximale et le résultat final sera '''StarTrek = 9223372036854775.807'''.&lt;br /&gt;
&lt;br /&gt;
====Les chaînes de caractères====&lt;br /&gt;
Pour signaler une chaîne de caractères au langage YOLOL, celle-ci doit être entourée de double-guillemets ('''&amp;quot; &amp;quot;''').&lt;br /&gt;
&lt;br /&gt;
 BadRobots= &amp;quot;Saltberia&amp;quot; &lt;br /&gt;
* Ce script associe la variable '''BadRobot''' à la chaîne de caractères '''&amp;quot;Saltberia&amp;quot;'''.&lt;br /&gt;
Comme pour les valeurs numériques, la taille maximale d'une chaîne de caractères est de 64-bit.&lt;br /&gt;
&lt;br /&gt;
====Remarques====&lt;br /&gt;
* Chaque variable ne peut être que d'un type à la fois, bien que celui-ci puisse être converti au besoin.&lt;br /&gt;
* Les valeurs &amp;quot;False&amp;quot; et &amp;quot;True&amp;quot; sont de type numérique: Elles correspondent respectivement à &amp;quot;0&amp;quot; et &amp;quot;non-0&amp;quot;.&lt;br /&gt;
* Une variable non définie préalablement a par défaut la valeur numérique &amp;quot;0&amp;quot;. L'absence de valeur (&amp;quot;null&amp;quot;) n'est pas reconnue.&lt;br /&gt;
&lt;br /&gt;
==Les Opérateurs==&lt;br /&gt;
&lt;br /&gt;
Note that the available operators may be limited by the type of the programmable [[YOLOL Chip|chip]].&amp;lt;br&amp;gt;&lt;br /&gt;
Basic chips have a limited selection of functions while more advanced ones can perform more complex operations natively.&lt;br /&gt;
&lt;br /&gt;
=== Basic arithmetic and assignment operators ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation || Numeric operation || String operation || Chip availability&lt;br /&gt;
|-&lt;br /&gt;
| A + B || Addition || String A is appended by String B. || All&lt;br /&gt;
|-&lt;br /&gt;
| A - B || Subtraction || The last appearance of String B in String A is removed from String A. || All&lt;br /&gt;
|-&lt;br /&gt;
| A * B || Multiplication || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A / B || Division || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A ++ || PostIncrement (A=A+1) || Appends a space to String A. Evaluates to the original value. || All&lt;br /&gt;
|-&lt;br /&gt;
| A -- || PostDecrement (A=A-1) || Removes the last character of the string. Results in runtime error when trying to remove &amp;quot;&amp;quot;. Evaluates to the original value. || All&lt;br /&gt;
|-&lt;br /&gt;
| ++ A  || PreIncrement (A=A+1) || Appends a space to String A. Evaluates to the modified value. || All&lt;br /&gt;
|-&lt;br /&gt;
| -- A || PreDecrement (A=A-1) || Removes the last character of the string. Results in runtime error when trying to remove &amp;quot;&amp;quot;. Evaluates to the modified value. || All&lt;br /&gt;
|-&lt;br /&gt;
| A = B || Assignment (Variable A is set to the value of variable B) || Assignment || All&lt;br /&gt;
|-&lt;br /&gt;
| A += B || Addition-assignment (A=A+B) || A is assigned the value of string-operation A+B || All&lt;br /&gt;
|-&lt;br /&gt;
| A -= B || Subtraction-assignment (A=A-B) || A is assigned the value of string-operation A-B || All&lt;br /&gt;
|-&lt;br /&gt;
| A *= B || Multiplication-assignment (A=A*B) || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A /= B || Division-assignment (A=A/B) || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A ^= B || Exponentiation-assignment (A=A^B) || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A %= B || Modulo-assignment (A=A%B) || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A ^ B || Exponentiation || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A % B || Modulo || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| ABS A || Modulus (absol value) (A=A if A&amp;gt;=0, else A=-A) || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A! || Factorial || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| SQRT A || Square root of A || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| SIN A || Sine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| COS A || Cosine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| TAN A || Tangent of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| ASIN A || Inverse sine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| ACOS A || Inverse cosine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| ATAN A || Inverse tangent of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Logical operators ===&lt;br /&gt;
&lt;br /&gt;
Logical operators are checks that identify if the statement is true or false.&amp;lt;br&amp;gt;&lt;br /&gt;
All logical operations return either '''&amp;quot;0 for False&amp;quot;''' or '''&amp;quot;1 for True&amp;quot;'''. &lt;br /&gt;
The '''NOT''', '''AND''', and '''OR''' keywords consider 0 to be falsy and anything not 0 to be truthy.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation || Numeric operation || String operation || Chip availability&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;lt; B || Less than || returns 1 if String A is first in alphabetical order, returns 0 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;gt; B || Greater than || returns 0 if String A is first in alphabetical order, returns 1 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;lt;= B ||Less than or equal to || returns 1 if String A is first in alphabetical order or identical to String B, returns 0 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;gt;= B || Greater than or equal to || returns 0 if String A is first in alphabetical order or identical to String B, returns 1 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A != B || Not equal to || returns 1 if String A is not equal to String B, 0 if it is. || All&lt;br /&gt;
|-&lt;br /&gt;
| A == B || Equal to || returns 1 if String A is equal to String B, 0 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| NOT A || Not || Returns 1 if A is 0, otherwise returns 0. || All&lt;br /&gt;
|-&lt;br /&gt;
| A AND B || And || Returns 1 if neither A nor B are 0, otherwise returns 0. || All&lt;br /&gt;
|-&lt;br /&gt;
| A OR B || Or || Returns 1 if either A or B is not 0, otherwise returns 0. || All&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Mixing variable types in operations ===&lt;br /&gt;
&lt;br /&gt;
Mixing variable types in an operation handles the operation using all parameters as ''strings''.&lt;br /&gt;
&lt;br /&gt;
 previouslyNumber= &amp;quot;10&amp;quot; + 15&lt;br /&gt;
* The above script results in '''previouslyNumber''' containing the string value &amp;quot;1015&amp;quot;.&lt;br /&gt;
** Note that the involved parameters themselves don't change types, their values are just cast as strings for the purpose of the operation:&lt;br /&gt;
 &lt;br /&gt;
 purelyNumber = 15&lt;br /&gt;
 purelyString = &amp;quot;10&amp;quot; + purelyNumber&lt;br /&gt;
* When this script has executed, '''purelyString''' contains the string value of &amp;quot;1015&amp;quot;, while '''purelyNumber''' still contains the numeric value of 15.&lt;br /&gt;
&lt;br /&gt;
=== Order of Operations ===&lt;br /&gt;
&lt;br /&gt;
Operations are conducted in the following order, when operators have the same precidence, left to right.&amp;lt;br&amp;gt;&lt;br /&gt;
Where a line has multiple statements, they are executed left to right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operators &lt;br /&gt;
! Comments&lt;br /&gt;
|-&lt;br /&gt;
| ++ --&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;!&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| operators &lt;br /&gt;
| sqrt, abs, sin etc.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| negate&lt;br /&gt;
|-&lt;br /&gt;
| ^&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| */&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt; &amp;gt; == != &amp;lt;= &amp;gt;=&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Surprise!&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;+-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| not (logical negation)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| or&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| and&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Les Commandes==&lt;br /&gt;
&lt;br /&gt;
=== If-else conditional ===&lt;br /&gt;
&lt;br /&gt;
If-else statements are used to branch out the script into different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
They use the following syntax:&lt;br /&gt;
* '''if ''condition'' then ''statement'' else ''statement'' end'''&lt;br /&gt;
** Condition is a statement that results in a numeric value (where 0 is parsed as False, anything else as True), and statements are pieces of script that are run.&lt;br /&gt;
** All If-else conditional stations must have '''end''' syntax written after statement is complete.&lt;br /&gt;
** The statement has to be on one line. The if, then, else and end cannot be on different lines.&lt;br /&gt;
&lt;br /&gt;
If can be used to branch script execution into two possible outcomes temporarily based on variable value(s).&amp;lt;br&amp;gt;&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable != 2 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 3 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; endResult = 4 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* This script sets the value of '''endResult''' to 3 if '''variable''' does not have the value of 2.&lt;br /&gt;
* If '''variable''''s value is 2, '''endResult''' is set to the value of 4.&lt;br /&gt;
&lt;br /&gt;
Note that the else statement -part can be left out if not needed. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable != 2 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 3 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
*This script only sets the value of 3 to '''endResult''' if '''variable''' does not have a value of 2, and doesn't do anything else.&lt;br /&gt;
&lt;br /&gt;
==== Nesting if statements ====&lt;br /&gt;
&lt;br /&gt;
It is possible to place if-conditionals inside the true/false statement blocks to achieve further branching of execution.&amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 0 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 1 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 1 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 2 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &lt;br /&gt;
* This script sets '''endResult''' to 1 if '''variable''' equals 0.&lt;br /&gt;
* If '''variable''' doesn't equal 0, but it equals 1, '''endResult''' is set to 2.&lt;br /&gt;
&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 0 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; endResult == 1 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 2 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; endResult = 1 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
* This script sets '''endResult''' to 2 if '''variable''' has a value of 0, and '''endResult''' equals to 1.&lt;br /&gt;
* Otherwise it sets '''endResult''' to 1.&lt;br /&gt;
&lt;br /&gt;
=== Goto ===&lt;br /&gt;
&lt;br /&gt;
Goto syntax is used when the normal script reading order from 1-&amp;gt;20 is not desired, or needs to be altered.&lt;br /&gt;
&lt;br /&gt;
Goto is used with the following syntax:&lt;br /&gt;
*'''goto lineNumber'''&lt;br /&gt;
** lineNumber is the line which this command will take the script execution.&amp;lt;br&amp;gt;&lt;br /&gt;
** Any remaining script that is on the same line after the goto-command will not be executed.&lt;br /&gt;
*** using if statements before goto ignores goto syntax, assuming the if-statement is false&lt;br /&gt;
** Multiple goto commands can be added on the same line using conditionals, as '''False''' goto commands are skipped.&lt;br /&gt;
** Numeric values outside the [1,20] range are clamped to this range.&lt;br /&gt;
** Non-integer values are floored.&lt;br /&gt;
** String values will result in a Runtime Error.&lt;br /&gt;
&lt;br /&gt;
 if variable == 5 then '''goto 4''' end '''goto 6'''&lt;br /&gt;
&lt;br /&gt;
The script above will go to line number 4, if '''variable''' has a value of 5.&amp;lt;br&amp;gt;&lt;br /&gt;
Otherwise it will go to line number 6. Numerical operations can also be done &amp;quot;inside&amp;quot; the goto, e.g. &lt;br /&gt;
&lt;br /&gt;
  goto 4+1&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
Comments are useful when writing code that is used by a lot of programmers.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that comments also use up space from the pre-determined 70 character line limit and are not excluded from it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commenting is used with the following syntax:&lt;br /&gt;
*// '''text'''&lt;br /&gt;
** Text can be any single-line set of characters.&lt;br /&gt;
&lt;br /&gt;
 '''//''' This is a comment. It will explain how other lines of script work.&lt;br /&gt;
* An example of a possible comment syntax&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
&lt;br /&gt;
There are two types of errors that can happen with the programming language.&lt;br /&gt;
# Syntax errors&lt;br /&gt;
# Runtime errors&lt;br /&gt;
&lt;br /&gt;
* Syntax errors come from invalid and unparseable script and will result in the whole line not being executed.&lt;br /&gt;
* Runtime errors are only catchable while the script is being executed. They result in the execution of the line being interrupted, but any effects until the error will remain.&lt;br /&gt;
&lt;br /&gt;
== Bugs connus/Comportements indésirables==&lt;br /&gt;
Voici une liste des problèmes relevés avec l'utilisation du langage YOLOL:&amp;lt;br&amp;gt;&lt;br /&gt;
* Les noms de variables contenant les mots-clé &amp;quot;if&amp;quot;, &amp;quot;else&amp;quot; et &amp;quot;end&amp;quot; sont mal interprétés par le langage et provoquent une erreur de syntaxe. Les noms tels que '''life''' ou '''endurance''' sont donc à éviter.&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
==YOLOL Tips &amp;amp; Tricks==&lt;br /&gt;
* [[Common YOLOL|Common YOLOL scripts]]&lt;br /&gt;
* [[YOLOL Tricks]]&lt;br /&gt;
&lt;br /&gt;
== Pages associées ==&lt;br /&gt;
* [[Data networks:fr|Réseaux de données]]&lt;br /&gt;
* [[Devices and machines:fr|Appareils et machines]]&lt;br /&gt;
* [[Device fields:fr|Champs de périphérique ]]&lt;br /&gt;
* [[Universal tool:fr|Outil universel]]&lt;br /&gt;
* [[YOLOL Chip:fr|Puce YOLOL]]&lt;br /&gt;
* [[Chip socket:fr|Socle à puce]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Networks|YOLOL:fr]]&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=Page_d%E2%80%99accueil&amp;diff=30494</id>
		<title>Page d’accueil</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=Page_d%E2%80%99accueil&amp;diff=30494"/>
		<updated>2022-04-07T20:55:20Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: Reformulation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- For normal pages, use Otherlang2 instead of OtherlangMP --&amp;gt;&lt;br /&gt;
{{OtherlangMP&lt;br /&gt;
|en=Main_Page&lt;br /&gt;
|de=Main_Page:de&lt;br /&gt;
|ru=Главная_страница&lt;br /&gt;
|zh-cn=主页&lt;br /&gt;
|pl=Main_Page:pl&lt;br /&gt;
|nl=Main_Page:nl&lt;br /&gt;
}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{#css:&lt;br /&gt;
  span.approvedAndLatestMsg {&lt;br /&gt;
    display: none;&lt;br /&gt;
  }&lt;br /&gt;
  span.approvingUser {&lt;br /&gt;
    display: none;&lt;br /&gt;
  }&lt;br /&gt;
  h1 {&lt;br /&gt;
    display: none;&lt;br /&gt;
  }&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;div class=&amp;quot;mpRow&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;mpLeftPadding&amp;quot;&amp;gt; &amp;lt;!-- LEFT COLUMN STARTS HERE --&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitableNoGrid&amp;quot; style=&amp;quot;border: 0px !important; margin: -10px; width: calc(100% + 20px);&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|&amp;lt;span class=&amp;quot;tableheader&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-size:110%&amp;quot;&amp;gt;&amp;lt;font color=&amp;quot;White&amp;quot;&amp;gt;À propos de Starbase&amp;lt;/font&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
[[File:AboutStarbaseRobot.png|150px|right]] &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Dans l'univers de Starbase tout le monde contrôle un [[Endoskeleton/fr|endosquelette]] robotique, un corps assez durable étant idéal pour l'exploration spatiale et la colonisation. La société, formée de ces robotiques endosquelettes est actuellement concentrée sur de gigantesques [[Capital_Mega_Station/fr|Super Stations]] et de plus petites Mini Stations, les &amp;quot;banlieues&amp;quot; dans l'espace. Les stations fournissent sécurité, [[jobs/fr|travail]], point de rencontre et possibilités d'échange pour leurs habitants, faisant d'elles des bases idéales où commencer la colonisation de la galaxie.&lt;br /&gt;
&lt;br /&gt;
Dans la galaxie, les deux principales factions sont deux factions rivales, le [[Kingdom/fr|Royaume]] et l'[[Empire/fr|Empire]], l'Empire ayant le contrôle de la majorité des stations centrales. Les autres factions peuvent tout de même espérer ce placer à coté de ces deux géants un jour, avec l'évolution et la progression la société.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
La [[News Broadcasts/fr|vie]] dans l'[[Space/fr|espace]] étant actuellement centrée sur l'orbite céleste d'une planète gazeuse, les courageux aventuriers devront constamment explorer les limites du voyage spatial et d'autres technologies afin de pouvoir, un jour atteindre les coins les plus reculés de la galaxie.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitableNoGrid&amp;quot; style=&amp;quot;border: 0px !important; margin: -10px; width: calc(100% + 20px);&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;1&amp;quot;|&amp;lt;span class=&amp;quot;tableheader&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-size:110%&amp;quot;&amp;gt;&amp;lt;font color=&amp;quot;White&amp;quot;&amp;gt;Menu&amp;lt;/font&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Main_Page/fr|Menu principal]]&lt;br /&gt;
&lt;br /&gt;
[[Special:AllPages|Toutes les pages]]&lt;br /&gt;
&lt;br /&gt;
[[Special:RecentChanges|Changement récent]]&lt;br /&gt;
&lt;br /&gt;
[[Special:SpecialPages|Page spécial]]&lt;br /&gt;
&lt;br /&gt;
[[News Broadcasts/fr|Diffusions de nouvelles]]&lt;br /&gt;
&lt;br /&gt;
[[Special:Random|Page aléatoire]]&lt;br /&gt;
&lt;br /&gt;
[[Rules/fr|Règlement]]&lt;br /&gt;
&lt;br /&gt;
[[Jobs/fr|Carrière]]&lt;br /&gt;
&lt;br /&gt;
[[Endoskeleton CV/fr|Curriculum vitæ]]&lt;br /&gt;
&lt;br /&gt;
[[Emotes/fr|Emotes]]&lt;br /&gt;
&lt;br /&gt;
[[Endoskeleton/fr|Endosquelette]]&lt;br /&gt;
&lt;br /&gt;
[[Insurance/fr|Assurance]]&lt;br /&gt;
&lt;br /&gt;
[[Data networks/fr|Réseaux de données]]&lt;br /&gt;
&lt;br /&gt;
[[Pipe networks/fr|Réseaux de canalisation]]&lt;br /&gt;
&lt;br /&gt;
[[Resource networks/fr|Réseau de ressources]]&lt;br /&gt;
&lt;br /&gt;
[[YOLOL:fr|Langage YOLOL]]&lt;br /&gt;
&lt;br /&gt;
[[FAQ/fr|Foire au questions]]&lt;br /&gt;
&lt;br /&gt;
[[Spaceship_Assembly_Guide/fr|Guide d'assemblage du vaisseau spatial]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;mpMiddle&amp;quot;&amp;gt; &amp;lt;!-- MIDDLE COLUMN STARTS HERE --&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitableTransparent&amp;quot; style=&amp;quot;margin-right: auto; margin-left: auto; border: none; margin-top: -3px;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Armes&amp;lt;/span&amp;gt;[[File:Combat_simulations_notext.png|175px|link=Weapons/fr|center]]&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Équipements&amp;lt;/span&amp;gt;[[File:Devices_notext.png|175px|link=Devices_and_machines/fr|center]]&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Matériaux&amp;lt;/span&amp;gt;[[File:Materials_notext.png|175px|link=Materials/fr|center]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Vaisseaux&amp;lt;/span&amp;gt;[[File:Spaceships_notext.png|175px|link=Spaceships/fr|center]]&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Stations&amp;lt;/span&amp;gt;[[File:Stations_Table_Test_notext.png|175px|link=Stations/fr|center]]&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Outils&amp;lt;/span&amp;gt;[[File:Tools_notext.png|175px|link=Tools/fr|center]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Univers&amp;lt;/span&amp;gt;[[File:Space_category.png|175px|link=Space/fr|center]]&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Politiques&amp;lt;/span&amp;gt;[[File:Factions_notext.png|175px|link=Factions/fr|center]]&lt;br /&gt;
| &amp;lt;span class=&amp;quot;textOverlay&amp;quot;&amp;gt;Construction&amp;lt;/span&amp;gt;[[File:Sb_building_feature_block.png|175px|link=Building/fr|center]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{#evt:&lt;br /&gt;
service=youtube&lt;br /&gt;
|id=https://www.youtube.com/watch?v=zXLTFwoYM_s&lt;br /&gt;
|dimensions= 530&lt;br /&gt;
|alignment=center&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitableTransparent&amp;quot; style=&amp;quot;margin-right: auto; margin-left: auto; border: none&lt;br /&gt;
!colspan=&amp;quot;6&amp;quot;|&amp;lt;span class=&amp;quot;tableheader&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-size:110%&amp;quot;&amp;gt;&amp;lt;font color=&amp;quot;White&amp;quot;&amp;gt;Galerie de Fonctionnalités&amp;lt;/font&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;|[[File:Starbase_marketing_screenshot_derelict_1080p.png|214px]]&lt;br /&gt;
|[[File:Screnshot_several_spaceships.png |96px]]&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;|[[File:Screenshot_Bolt_tool.png|214px]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| [[File:Screenshot_megastation_1080p.png|96px]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;mpRight&amp;quot;&amp;gt; &amp;lt;!-- RIGHT COLUMN STARTS HERE --&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitableNoGrid&amp;quot; style=&amp;quot;margin: auto; border: none&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|&amp;lt;span class=&amp;quot;tableheader&amp;quot;&amp;gt;[[Weapons/fr|Armes]]&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| [[File:Assault rifle thumb.png|120px|link=Assault_rifle/fr|thumb|center|Fusil d’assaut]]&lt;br /&gt;
| [[File:Antigel thumb.png|120px|link=Antigel_rifle/fr|thumb|center|Fusil antigel]]&lt;br /&gt;
| [[File:Battle rifle thumb.png|120px|link=Battle_rifle/fr|thumb|center|Fusil de combat]]&lt;br /&gt;
| [[File:Bolter thumb.png|120px|link=Bolter/fr|thumb|center|Fusil à arc électrique]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| [[File:Flamer thumb.png|120px|link=Flamethrower/fr|thumb|center|Lance-flamme]]&lt;br /&gt;
| [[File:Gauss rifle thumb.png|120px|link=Gauss_rifle/fr|thumb|center|Fusil magnétique]]&lt;br /&gt;
| [[File:Laser rifle thumb.png|120px|link=Laser_rifle/fr|thumb|center|Fusil laser]]&lt;br /&gt;
| [[File:Long rifle thumb.png|120px|link=Long_rifle/fr|thumb|center|Fusil à longue portée]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| [[File:Pistol thumb.png|120px|link=Pistol/fr|thumb|center|Pistolet]]&lt;br /&gt;
| [[File:Repeater thumb.png|120px|link=Repeater_pistol/fr|thumb|center|Pistolet-mitrailleur]]&lt;br /&gt;
| [[File:Revolver thumb.png|120px|link=Revolver/fr|thumb|center|Revolver]]&lt;br /&gt;
| [[File:Shotgun thumb.png|120px|link=Shotgun/fr|thumb|center|Fusil à pompe]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitableNoGrid&amp;quot; style=&amp;quot;margin: auto; border: none;&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|&amp;lt;span class=&amp;quot;tableheader&amp;quot;&amp;gt;[[Mounted weapons/fr|Armes Montées]]&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| [[File:Autocannon.png|120px|link=Autocannon/fr|thumb|center|Auto-canon]]&lt;br /&gt;
| [[File:Laser weapon.png|120px|link=Laser cannon/fr|thumb|center|Canon laser]]&lt;br /&gt;
| [[File:Plasma cannon.png|120px|link=Plasma thrower/fr|thumb|center|Lance-plasma]]&lt;br /&gt;
| [[File:Rail weapon.png|120px|link=Rail cannon/fr|thumb|center|Canon à rail]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitableNoGrid&amp;quot; style=&amp;quot;margin: auto;&amp;quot; border: none&lt;br /&gt;
!colspan=&amp;quot;4&amp;quot;|&amp;lt;span class=&amp;quot;tableheader&amp;quot;&amp;gt;[[Spaceships/fr|Vaisseaux]]&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| [[File:Spaceship hedron decal.jpg|120px|link=Hedron/fr|thumb|center|Hedron]]&lt;br /&gt;
| [[File:Spaceship Ithaca.jpg|120px|link=Ithaca/fr|thumb|center|Ithaca]]&lt;br /&gt;
| [[File:Spaceship remus.jpg|120px|link=Remus/fr|thumb|center|Remus]]&lt;br /&gt;
| [[File:Spaceship urchin decal.jpg|120px|link=Urchin/fr|thumb|center|Urchin]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| [[File:Spaceship Empire Lictor.JPG|120px|link=Lictor/fr|thumb|center|Lictor]]&lt;br /&gt;
| [[File:Empire_spatha.jpg|120px|link=Spatha/fr|thumb|center|Spatha]]&lt;br /&gt;
| [[File:Kingdom_knight.jpg|120px|link=Knight/fr|thumb|center|Knight]]&lt;br /&gt;
| [[File:Kingdom_lancer.jpg|120px|link=Lancer/fr|thumb|center|Lancer]]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=%E8%AE%BE%E5%A4%87%E5%8F%82%E6%95%B0&amp;diff=30493</id>
		<title>设备参数</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=%E8%AE%BE%E5%A4%87%E5%8F%82%E6%95%B0&amp;diff=30493"/>
		<updated>2022-04-07T20:48:51Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: Adding languages&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Otherlang2&lt;br /&gt;
|en=Device_fields&lt;br /&gt;
|de=Device_fields:de&lt;br /&gt;
|fr=Device_fields:fr&lt;br /&gt;
|zh-cn=设备参数&lt;br /&gt;
}}&lt;br /&gt;
'''本页面由“[[Helios|Helios公会Wiki制作组]]”翻译制作'''&lt;br /&gt;
&lt;br /&gt;
设备参数用于控制和读取连接到[[数据网络|数据网络]]的[[设备和机器|设备]]的状态。[[交互屏]]，[[YOLOL芯片]]或同一网络上的其他设备可以读取或设置它们。&lt;br /&gt;
&lt;br /&gt;
= 设备参数列表 =&lt;br /&gt;
== 基座式设备 ==&lt;br /&gt;
&lt;br /&gt;
===[[电池]]===&lt;br /&gt;
{{#lsth:电池|设备参数}}&lt;br /&gt;
&lt;br /&gt;
===[[货运光束|货运光束]]===&lt;br /&gt;
{{#lsth:货运光束|设备参数}}&lt;br /&gt;
&lt;br /&gt;
===[[固定支架|固定支架]]===&lt;br /&gt;
{{#lsth:固定支架|设备参数}}&lt;br /&gt;
&lt;br /&gt;
===[[发电机|发电机]]===&lt;br /&gt;
{{#lsth:发电机|设备参数}}&lt;br /&gt;
&lt;br /&gt;
===[[铰链|铰链]]===&lt;br /&gt;
{{#lsth:铰链|设备参数}}&lt;br /&gt;
&lt;br /&gt;
===[[舰载武器]]===&lt;br /&gt;
{{#lsth:舰载武器|设备参数}}&lt;br /&gt;
&lt;br /&gt;
===[[无线电收发设备|无线电收发设备]]===&lt;br /&gt;
{{#lsth:无线电收发设备|设备参数}}&lt;br /&gt;
&lt;br /&gt;
===[[测距仪|测距仪]]===&lt;br /&gt;
{{#lsth:测距仪|设备参数}}&lt;br /&gt;
&lt;br /&gt;
===[[机械臂|机械臂]]===&lt;br /&gt;
{{#lsth:机械臂|设备参数}}&lt;br /&gt;
&lt;br /&gt;
===[[推进器|推进器]]===&lt;br /&gt;
{{#lsth:推进器|设备参数}}&lt;br /&gt;
&lt;br /&gt;
===[[转盘|转盘]]===&lt;br /&gt;
{{#lsth:转盘|设备参数}}&lt;br /&gt;
&lt;br /&gt;
== 可交互设备 ==&lt;br /&gt;
&lt;br /&gt;
=== [[按钮]] ===&lt;br /&gt;
{{#lsth:按钮|设备参数}}&lt;br /&gt;
&lt;br /&gt;
===[[按钮|按钮]]===&lt;br /&gt;
{{#lsth:按钮|设备参数}}&lt;br /&gt;
&lt;br /&gt;
===[[控制杆|控制杆]]===&lt;br /&gt;
{{#lsth:控制杆|设备参数}}&lt;br /&gt;
&lt;br /&gt;
===[[推进剂|推进剂]]===&lt;br /&gt;
{{#lsth:推进剂|设备参数}}&lt;br /&gt;
&lt;br /&gt;
== 轨道设备 ==&lt;br /&gt;
&lt;br /&gt;
===[[轨道车|轨道车]]===&lt;br /&gt;
{{#lsth:轨道车|设备参数}}&lt;br /&gt;
&lt;br /&gt;
===[[单向轨道中继器|单向轨道中继器]]===&lt;br /&gt;
{{#lsth:单向轨道中继器|设备参数}}&lt;br /&gt;
&lt;br /&gt;
===[[轨道传感器|轨道传感器]]===&lt;br /&gt;
{{#lsth:轨道传感器|设备参数}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===[[轨道触发器|轨道触发器]]===&lt;br /&gt;
{{#lsth:轨道触发器|设备参数}}&lt;br /&gt;
&lt;br /&gt;
== 屏幕 ==&lt;br /&gt;
&lt;br /&gt;
=== [[信息屏幕]] ===&lt;br /&gt;
{{#lsth:信息屏幕|设备参数}}&lt;br /&gt;
&lt;br /&gt;
===[[模块化显示器|模块化显示器]]===&lt;br /&gt;
{{#lsth:模块化显示器|设备参数}}&lt;br /&gt;
&lt;br /&gt;
== 实用设备 ==&lt;br /&gt;
&lt;br /&gt;
===[[货运锁架]]===&lt;br /&gt;
{{#lsth:货运锁架|设备参数}}&lt;br /&gt;
&lt;br /&gt;
===[[飞行控制单元|飞行控制单元]]===&lt;br /&gt;
{{#lsth:飞行控制单元|设备参数}}&lt;br /&gt;
&lt;br /&gt;
===[[主飞行计算机|主飞行计算机]]===&lt;br /&gt;
{{#lsth:主飞行计算机|设备参数}}&lt;br /&gt;
&lt;br /&gt;
===[[采矿激光|采矿激光]]===&lt;br /&gt;
{{#lsth:采矿激光|设备参数}}&lt;br /&gt;
&lt;br /&gt;
===[[单向网络中继器]]===&lt;br /&gt;
{{#lsth:单向网络中继器|设备参数}}&lt;br /&gt;
&lt;br /&gt;
===[[牵引光束]]===&lt;br /&gt;
{{#lsth:牵引光束|设备参数}}&lt;br /&gt;
&lt;br /&gt;
== YOLOL设备 ==&lt;br /&gt;
&lt;br /&gt;
===[[YOLOL芯片]]===&lt;br /&gt;
{{#lsth:YOLOL芯片|设备参数}}&lt;br /&gt;
&lt;br /&gt;
===[[芯片槽]]===&lt;br /&gt;
{{#lsth:芯片槽|设备参数}}&lt;br /&gt;
&lt;br /&gt;
===[[记忆芯片]]===&lt;br /&gt;
{{#lsth:记忆芯片|设备参数}}&lt;br /&gt;
&lt;br /&gt;
===[[模块化芯片槽]]===&lt;br /&gt;
{{#lsth:模块化芯片槽|设备参数}}&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=Device_fields:de&amp;diff=30492</id>
		<title>Device fields:de</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=Device_fields:de&amp;diff=30492"/>
		<updated>2022-04-07T20:47:55Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: Adding languages&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Otherlang2&lt;br /&gt;
|en=Device_fields&lt;br /&gt;
|de=Device_fields:de&lt;br /&gt;
|fr=Device_fields:fr&lt;br /&gt;
|zh-cn=设备参数&lt;br /&gt;
}}&lt;br /&gt;
Gerätefelder werden verwendet um den Status von [[Devices_and_machines:de|Geräten]] zu steuern und zu lesen, die mit einem [[Data_networks:de|Datennetzwerk]] verbunden sind. Sie können vom [[Universal tool:de|Universalwerkzeug]], [[YOLOL Chip:de|YOLOL-Chip]] oder von anderen Geräten im selben Netzwerk gelesen oder eingestellt werden.&lt;br /&gt;
&lt;br /&gt;
= List der Gerätefelder =&lt;br /&gt;
== Basismontierte Geräte ==&lt;br /&gt;
&lt;br /&gt;
===[[Cargo beam:de|Ladestrahl]]===&lt;br /&gt;
{{#lsth:Cargo beam:de|Gerätefelder}}&lt;br /&gt;
&lt;br /&gt;
===[[Fixed mount:de|Fixierte Halterung]]===&lt;br /&gt;
{{#lsth:Fixed mount:de|Gerätefelder}}&lt;br /&gt;
&lt;br /&gt;
===[[Mounted weapons:de|Montierte Waffen]]===&lt;br /&gt;
{{#lsth:Mounted weapons:de|Gerätefelder}}&lt;br /&gt;
&lt;br /&gt;
===[[Radio transmitters:de|Funksender]]===&lt;br /&gt;
{{#lsth:Radio transmitters:de|Gerätefelder}}&lt;br /&gt;
&lt;br /&gt;
===[[Range finder:de|Entfernungsmesser]]===&lt;br /&gt;
{{#lsth:Range finder:de|Gerätefelder}}&lt;br /&gt;
&lt;br /&gt;
===[[Robot arms:de|Roboterarme]]===&lt;br /&gt;
{{#lsth:Robot arms:de|Gerätefelder}}&lt;br /&gt;
&lt;br /&gt;
===[[Thrusters:de|Triebwerke]]===&lt;br /&gt;
{{#lsth:Thrusters:de|Gerätefelder}}&lt;br /&gt;
&lt;br /&gt;
===[[Turntable:de|Drehscheibe]]===&lt;br /&gt;
{{#lsth:Turntable:de|Gerätefelder}}&lt;br /&gt;
&lt;br /&gt;
== Strom und Treibstoff ==&lt;br /&gt;
&lt;br /&gt;
===[[Generator:de|Generator]]===&lt;br /&gt;
{{#lsth:Generator:de|Gerätefelder}}&lt;br /&gt;
&lt;br /&gt;
===[[Battery:de|Batterie]]===&lt;br /&gt;
{{#lsth:Battery:de|Gerätefelder}}&lt;br /&gt;
&lt;br /&gt;
===[[Propellant:de|Treibstoff]]===&lt;br /&gt;
{{#lsth:Propellant:de|Gerätefelder}}&lt;br /&gt;
&lt;br /&gt;
===[[Solar_Panel:de|Solarpanel]]===&lt;br /&gt;
{{#lsth:Solar_Panel:de|Gerätefelder}}&lt;br /&gt;
&lt;br /&gt;
== Interaktion ==&lt;br /&gt;
&lt;br /&gt;
=== [[Buttons:de|Knöpfe]] ===&lt;br /&gt;
{{#lsth:Buttons:de|Gerätefelder}}&lt;br /&gt;
&lt;br /&gt;
=== [[Chairs:de|Stühle]] ===&lt;br /&gt;
{{#lsth:Chairs:de|Gerätefelder}}&lt;br /&gt;
&lt;br /&gt;
===[[Lamps:de|Lampen]]===&lt;br /&gt;
{{#lsth:Lamps:de|Gerätefelder}}&lt;br /&gt;
&lt;br /&gt;
===[[Levers:de|Hebel]]===&lt;br /&gt;
{{#lsth:Levers:de|Gerätefelder}}&lt;br /&gt;
&lt;br /&gt;
===[[Resource Bridge:de|Ressourcenbrücke]]===&lt;br /&gt;
{{#lsth:Resource Bridge:de|Gerätefelder}}&lt;br /&gt;
&lt;br /&gt;
== Bildschirme ==&lt;br /&gt;
&lt;br /&gt;
=== [[Information screen:de|Informationsbildschirm]] ===&lt;br /&gt;
{{#lsth:Information screen:de|Gerätefelder}}&lt;br /&gt;
&lt;br /&gt;
===[[Modular displays:de|Modulare Bildschirme]]===&lt;br /&gt;
{{#lsth:Modular displays:de|Gerätefelder}}&lt;br /&gt;
&lt;br /&gt;
== Schienenvorrichtungen ==&lt;br /&gt;
&lt;br /&gt;
===[[Rail mover:de|Beweger]]===&lt;br /&gt;
{{#lsth:Rail mover:de|Gerätefelder}}&lt;br /&gt;
&lt;br /&gt;
===[[Rail relay:de|Relais]]===&lt;br /&gt;
{{#lsth:Rail relay:de|Gerätefelder}}&lt;br /&gt;
&lt;br /&gt;
===[[Rail sensor strip:de|Sensorleiste]]===&lt;br /&gt;
{{#lsth:Rail sensor strip:de|Gerätefelder}}&lt;br /&gt;
&lt;br /&gt;
===[[Rail socket:de|Sockel]]===&lt;br /&gt;
{{#lsth:Rail socket:de|Gerätefelder}}&lt;br /&gt;
&lt;br /&gt;
===[[Rail trigger:de|Auslöser]]===&lt;br /&gt;
{{#lsth:Rail trigger:de|Gerätefelder}}&lt;br /&gt;
&lt;br /&gt;
== YOLOL Geräte ==&lt;br /&gt;
&lt;br /&gt;
===[[YOLOL Chip:de|YOLOL Chip]]===&lt;br /&gt;
{{#lsth:YOLOL Chip:de|Gerätefelder}}&lt;br /&gt;
&lt;br /&gt;
===[[Chip socket:de|Chip-Sockel]]===&lt;br /&gt;
{{#lsth:Chip socket:de|Gerätefelder}}&lt;br /&gt;
&lt;br /&gt;
===[[Memory chip:de|Speicherchip]]===&lt;br /&gt;
{{#lsth:Memory chip:de|Gerätefelder}}&lt;br /&gt;
&lt;br /&gt;
===[[Modular device rack:de|Modularer Geräteträger]]===&lt;br /&gt;
{{#lsth:Modular device rack:de|Gerätefelder}}&lt;br /&gt;
&lt;br /&gt;
== Hilfsgeräte ==&lt;br /&gt;
&lt;br /&gt;
===[[Hinges:de|Schaniere]]===&lt;br /&gt;
{{#lsth:Hinges:de|Gerätefelder}}&lt;br /&gt;
&lt;br /&gt;
===[[Cargo lock frame:de|Frachtschlossrahmen]]===&lt;br /&gt;
{{#lsth:Cargo lock frame:de|Gerätefelder}}&lt;br /&gt;
&lt;br /&gt;
===[[Modular ore cargo crate:de|Modulare Erzfrachtkiste]]===&lt;br /&gt;
{{#lsth:Modular ore cargo crate:de|Gerätefelder}}&lt;br /&gt;
&lt;br /&gt;
===[[Flight control unit:de|Flugsteuerungseinheit]]===&lt;br /&gt;
{{#lsth:Flight control unit:de|Gerätefelder}}&lt;br /&gt;
&lt;br /&gt;
===[[Main flight computer:de|Hauptflugcomputer]]===&lt;br /&gt;
{{#lsth:Main flight computer:de|Gerätefelder}}&lt;br /&gt;
&lt;br /&gt;
===[[Mining laser (Assembly):de|Bergbaulaser]]===&lt;br /&gt;
{{#lsth:Mining laser:de|Gerätefelder}}&lt;br /&gt;
&lt;br /&gt;
===[[Tractor beam:de|Traktorstrahl]]===&lt;br /&gt;
{{#lsth:Tractor beam:de|Gerätefelder}}&lt;br /&gt;
&lt;br /&gt;
===[[Network relay:de|Netzwerkrelais]]===&lt;br /&gt;
{{#lsth:Network relay:de|Gerätefelder}}&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=Device_fields&amp;diff=30491</id>
		<title>Device fields</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=Device_fields&amp;diff=30491"/>
		<updated>2022-04-07T20:47:27Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: Adding languages&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Otherlang2&lt;br /&gt;
|en=Device_fields&lt;br /&gt;
|de=Device_fields:de&lt;br /&gt;
|fr=Device_fields:fr&lt;br /&gt;
|zh-cn=设备参数&lt;br /&gt;
}}&lt;br /&gt;
Device fields are used to control and read the status of [[Devices_and_machines|devices]] connected to a [[Data_networks|data network]]. They can be read or set by the [[Universal tool]], [[YOLOL Chip]], or by other devices on the same network.&lt;br /&gt;
&lt;br /&gt;
= List of Device Fields =&lt;br /&gt;
== Base mounted devices ==&lt;br /&gt;
&lt;br /&gt;
===[[Battery]]===&lt;br /&gt;
{{#lsth:Battery|Device fields}}&lt;br /&gt;
&lt;br /&gt;
===[[Cargo beam|Cargo beam]]===&lt;br /&gt;
{{#lsth:Cargo beam|Device fields}}&lt;br /&gt;
&lt;br /&gt;
===[[Fixed mount|Fixed mount]]===&lt;br /&gt;
{{#lsth:Fixed mount|Device fields}}&lt;br /&gt;
&lt;br /&gt;
===[[Generator (Assembly)|Generator]]===&lt;br /&gt;
{{#lsth:Generator|Device fields}}&lt;br /&gt;
&lt;br /&gt;
===[[Hinges|Hinges]]===&lt;br /&gt;
{{#lsth:Hinges|Device fields}}&lt;br /&gt;
&lt;br /&gt;
===[[Mounted weapons]]===&lt;br /&gt;
{{#lsth:Mounted weapons|Device fields}}&lt;br /&gt;
&lt;br /&gt;
===[[Radio transmitters|Radio transmitters]]===&lt;br /&gt;
{{#lsth:Radio transmitters|Device fields}}&lt;br /&gt;
&lt;br /&gt;
===[[Range finder|Range finder]]===&lt;br /&gt;
{{#lsth:Range finder|Device fields}}&lt;br /&gt;
&lt;br /&gt;
===[[Robot arms|Robot arms]]===&lt;br /&gt;
{{#lsth:Robot arms|Device fields}}&lt;br /&gt;
&lt;br /&gt;
===[[Thrusters|Thrusters]]===&lt;br /&gt;
{{#lsth:Thrusters|Device fields}}&lt;br /&gt;
&lt;br /&gt;
===[[Turntable|Turntable]]===&lt;br /&gt;
{{#lsth:Turntable|Device fields}}&lt;br /&gt;
&lt;br /&gt;
== Interactables ==&lt;br /&gt;
&lt;br /&gt;
=== [[Buttons]] ===&lt;br /&gt;
{{#lsth:Buttons|Device fields}}&lt;br /&gt;
&lt;br /&gt;
===[[Lamps|Lamps]]===&lt;br /&gt;
{{#lsth:Lamps|Device fields}}&lt;br /&gt;
&lt;br /&gt;
===[[Levers|Levers]]===&lt;br /&gt;
{{#lsth:Levers|Device fields}}&lt;br /&gt;
&lt;br /&gt;
===[[Propellant tank|Propellant]]===&lt;br /&gt;
{{#lsth:Propellant tank|Device fields}}&lt;br /&gt;
&lt;br /&gt;
== Rail devices ==&lt;br /&gt;
&lt;br /&gt;
===[[Rail mover|Mover]]===&lt;br /&gt;
{{#lsth:Rail mover|Device fields}}&lt;br /&gt;
&lt;br /&gt;
===[[Rail relay|Relay]]===&lt;br /&gt;
{{#lsth:Rail relay|Device fields}}&lt;br /&gt;
&lt;br /&gt;
===[[Rail sensor strip|Sensor strip]]===&lt;br /&gt;
{{#lsth:Rail sensor strip|Device fields}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===[[Rail trigger|Trigger]]===&lt;br /&gt;
{{#lsth:Rail trigger|Device fields}}&lt;br /&gt;
&lt;br /&gt;
== Screens ==&lt;br /&gt;
&lt;br /&gt;
=== [[Information screen]] ===&lt;br /&gt;
{{#lsth:Information screen|Device fields}}&lt;br /&gt;
&lt;br /&gt;
===[[Modular displays|Modular displays]]===&lt;br /&gt;
{{#lsth:Modular displays|Device fields}}&lt;br /&gt;
&lt;br /&gt;
== Utility Devices ==&lt;br /&gt;
&lt;br /&gt;
===[[Cargo lock frame (Assembly)]]===&lt;br /&gt;
{{#lsth:Cargo lock frame (Assembly)|Device fields}}&lt;br /&gt;
&lt;br /&gt;
===[[Flight control unit|Flight control unit]]===&lt;br /&gt;
{{#lsth:Flight control unit|Device fields}}&lt;br /&gt;
&lt;br /&gt;
===[[Main flight computer|Main flight computer]]===&lt;br /&gt;
{{#lsth:Main flight computer|Device fields}}&lt;br /&gt;
&lt;br /&gt;
===[[Mining laser (Assembly)|Mining laser]]===&lt;br /&gt;
{{#lsth:Mining laser|Device fields}}&lt;br /&gt;
&lt;br /&gt;
===[[Network relay]]===&lt;br /&gt;
{{#lsth:Network relay|Device fields}}&lt;br /&gt;
&lt;br /&gt;
===[[Tractor beam (Assembly)|Tractor beam]]===&lt;br /&gt;
{{#lsth:Tractor beam|Device fields}}&lt;br /&gt;
&lt;br /&gt;
== YOLOL devices ==&lt;br /&gt;
&lt;br /&gt;
===[[YOLOL Chip]]===&lt;br /&gt;
{{#lsth:YOLOL Chip|Device fields}}&lt;br /&gt;
&lt;br /&gt;
===[[Chip socket]]===&lt;br /&gt;
{{#lsth:Chip socket|Device fields}}&lt;br /&gt;
&lt;br /&gt;
===[[Memory chip]]===&lt;br /&gt;
{{#lsth:Memory chip|Device fields}}&lt;br /&gt;
&lt;br /&gt;
===[[Modular device rack]]===&lt;br /&gt;
{{#lsth:Modular device rack|Device fields}}&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=Device_fields/fr&amp;diff=30490</id>
		<title>Device fields/fr</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=Device_fields/fr&amp;diff=30490"/>
		<updated>2022-04-07T20:46:43Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: Rajout de langage&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Otherlang2&lt;br /&gt;
|en=Device_fields&lt;br /&gt;
|de=Device_fields:de&lt;br /&gt;
|fr=Device_fields:fr&lt;br /&gt;
|zh-cn=设备参数&lt;br /&gt;
}}&lt;br /&gt;
Les champs de périphérique sont des variables qui définissent le fonctionnement des [[Devices_and_machines/fr|appareils]] dont ils dépendent. Ils peuvent être lus ou modifiés en utilisant l'[[Universal tool/fr|outil universel]] ainsi que via une [[YOLOL Chip/fr|puce YOLOL]] ou tout autre appareil connectés au même [[Data_networks/fr|réseau de données]]. Les champs de périphérique sont essentiels à l'utilisation du [[YOLOL/fr|langage YOLOL]].&lt;br /&gt;
&lt;br /&gt;
= Liste des champs de périphérique =&lt;br /&gt;
== Appareils montés sur la base ==&lt;br /&gt;
&lt;br /&gt;
===[[Battery/fr|Batterie]]===&lt;br /&gt;
{{#lsth:Battery/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Cargo beam/fr|Poutre de chargement]]===&lt;br /&gt;
{{#lsth:Cargo beam/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Fixed mount/fr|Fixation fixe]]===&lt;br /&gt;
{{#lsth:Fixed mount/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Generator/fr|Générateur]]===&lt;br /&gt;
{{#lsth:Generator/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Hinges/fr|Charnières]]===&lt;br /&gt;
{{#lsth:Hinges/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Mounted weapons/fr|Armes montées]]===&lt;br /&gt;
{{#lsth:Mounted weapons/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Radio transmitters/fr|Emetteurs radio]]===&lt;br /&gt;
{{#lsth:Radio transmitters/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Range finder/fr|Télémètre]]===&lt;br /&gt;
{{#lsth:Range finder/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Robot arms/fr|Bras de robot]]===&lt;br /&gt;
{{#lsth:Robot arms/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Thrusters/fr|Propulseurs]]===&lt;br /&gt;
{{#lsth:Thrusters/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Turntable/fr|Plaque tournante]]===&lt;br /&gt;
{{#lsth:Turntable/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
== Interaction ==&lt;br /&gt;
&lt;br /&gt;
=== [[Buttons/fr|Boutons]] ===&lt;br /&gt;
{{#lsth:Buttons/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Lamps/fr|Les lampes]]===&lt;br /&gt;
{{#lsth:Lamps/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Levers/fr|Leviers]]===&lt;br /&gt;
{{#lsth:Levers/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Propellant/fr|Propergol]]===&lt;br /&gt;
{{#lsth:Propellant/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
== Dispositifs ferroviaires ==&lt;br /&gt;
&lt;br /&gt;
===[[Rail mover/fr|Déménageur]]===&lt;br /&gt;
{{#lsth:Rail mover/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Rail relay/fr|Relais]]===&lt;br /&gt;
{{#lsth:Rail relay/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Rail sensor strip/fr|Bande de capteur]]===&lt;br /&gt;
{{#lsth:Rail sensor strip/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===[[Rail trigger/fr|Déclencheur]]===&lt;br /&gt;
{{#lsth:Rail trigger/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
== Screens ==&lt;br /&gt;
&lt;br /&gt;
=== [[Information screen/fr|Écran d'information]] ===&lt;br /&gt;
{{#lsth:Information screen/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Modular displays/fr|Afficheurs modulaires]]===&lt;br /&gt;
{{#lsth:Modular displays/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
== Périphériques utilitaires ==&lt;br /&gt;
&lt;br /&gt;
===[[Cargo lock frame/fr|Cadre de verrouillage de la cargaison]]===&lt;br /&gt;
{{#lsth:Cargo lock frame/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Flight control unit/fr|Unité de contrôle de vol]]===&lt;br /&gt;
{{#lsth:Flight control unit/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Main flight computer/fr|Ordinateur de vol principal]]===&lt;br /&gt;
{{#lsth:Main flight computer/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Mining laser (Assembly)/fr|Laser minier]]===&lt;br /&gt;
{{#lsth:Mining laser/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Network relay/fr|Relais réseau]]===&lt;br /&gt;
{{#lsth:Network relay/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Tractor beam/fr|Rayon tracteur]]===&lt;br /&gt;
{{#lsth:Tractor beam/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
== Appareils YOLOL ==&lt;br /&gt;
&lt;br /&gt;
===[[YOLOL Chip/fr|Puce YOLOL]]===&lt;br /&gt;
{{#lsth:YOLOL Chip/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Chip socket/fr|Prise de puce]]===&lt;br /&gt;
{{#lsth:Chip socket/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Memory chip/fr|Puce mémoire]]===&lt;br /&gt;
{{#lsth:Memory chip/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Modular device rack/fr|Rack modulaire pour appareils]]===&lt;br /&gt;
{{#lsth:Modular device rack/fr|Champs de l'appareil}}&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=YOLOL/fr&amp;diff=30489</id>
		<title>YOLOL/fr</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=YOLOL/fr&amp;diff=30489"/>
		<updated>2022-04-07T18:28:50Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: Normalisation avec la nomenclature internationale&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Otherlang2&lt;br /&gt;
|en=YOLOL&lt;br /&gt;
|de=YOLOL:de&lt;br /&gt;
|fr=YOLOL:fr&lt;br /&gt;
|ru=YOLOL:ru&lt;br /&gt;
|ua=YOLOL:ua&lt;br /&gt;
|jp=YOLOL:jp&lt;br /&gt;
|zh-cn=YOLOL语言&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
{{#evt:service=youtube|id=https://www.youtube.com/watch?v=7lXK6_bktUk|alignment=center}}&lt;br /&gt;
&lt;br /&gt;
le YOLOL est un langage de programmation spécifique à Starbase qui est utilisé en parallèle du l'[[Universal tool:fr|outil universel]] pour contrôler et gérer les [[Devices_and_machines:fr|appareils]].&amp;lt;br&amp;gt;&lt;br /&gt;
Le code est écrit ligne par ligne sur une [[YOLOL Chip:fr|puce YOLOL]] qui est ensuite insérée dans un [[Chip socket:fr|socle à puce]] connecté au [[Data networks:fr|réseau de données]] du vaisseau afin d'accéder aux [[Device fields:fr|champs de périphérique]].&amp;lt;br&amp;gt;&lt;br /&gt;
Le langage YOLOL est compatible avec presque tous les équipements et engins de l'univers connu.&lt;br /&gt;
&lt;br /&gt;
===Comment ça marche?===&lt;br /&gt;
Le YOLOL fonctionne par cycle: Les lignes de code sont exécutées les unes après les autres du haut vers le bas, puis la séquence reprend une fois la dernière ligne passée. Chaque ligne est lue dans un intervalle de temps constant de 0.2 secondes, quelque soit sa longueur et le nombre d'instructions qui y sont contenues.&lt;br /&gt;
&lt;br /&gt;
Pour faire simple:&lt;br /&gt;
# Le code se lance en commençant par la ligne 1&lt;br /&gt;
# La ligne en cours est exécutée, puis le programme passe à la suivante après un intervalle de temps de 0.2 secondes&lt;br /&gt;
# L'étape 2 est répétée pour les lignes 2, 3, 4... jusqu'à la dernière&lt;br /&gt;
# La puce se réinitialise à l'étape 1 une fois le processus terminé&lt;br /&gt;
&lt;br /&gt;
===Limites===&lt;br /&gt;
* Chaque puce YOLOL contient 20 lignes de code. Ni plus, ni moins. L'exécution d'un cycle complet prend donc 20 * 0.2 = 4 secondes si il est mené à son terme.&lt;br /&gt;
* Chaque lignes peut contenir un maximum de 70 caractères (symboles et espaces inclus).&lt;br /&gt;
&lt;br /&gt;
===Remarques===&lt;br /&gt;
* Les puces YOLOL possèdent une fonction de mise en pause, qui fige l'exécution du code à la ligne en cours.&lt;br /&gt;
* Les lignes blanches nécessitent tout de même l'intervalle de temps des 0.2 secondes pour être passées, provoquant de courts délais d'exécution (il en va de même pour les lignes ne contenant que des commentaires).&lt;br /&gt;
* Une seule ligne de code peut contenir plusieurs instructions à la fois, autant que peut le supporter la limite maximale de caractères.&lt;br /&gt;
* Certaines instructions permettent de passer à une ligne spécifique, ce qui rend le code plus modulable.&lt;br /&gt;
&lt;br /&gt;
== Les Variables ==&lt;br /&gt;
Les variables permettent d'associer un '''nom''' à une '''valeur''' pour faciliter l'acquisition ultérieure de cette dernière. Dès lors, à chaque fois que le '''nom''' de la variable sera appelé, c'est sa '''valeur''' qui sera demandée et/ou modifiée suivant l'instruction utilisée.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 ButtonState = 1&lt;br /&gt;
* Dans ce script, on attribue à la variable nommée '''ButtonState''' la valeur numérique '''1'''.&lt;br /&gt;
 if ButtonState &amp;gt;= 1 then DoorState = 1 end&lt;br /&gt;
* Maintenant, on vérifie si la valeur de la variable '''ButtonState''' est supérieure ou égale à '''1''', auquel cas la variable '''DoorState''' se voit elle aussi associée à '''1'''.&lt;br /&gt;
&lt;br /&gt;
===Les Noms de Variables===&lt;br /&gt;
====Sensibilité à la casse====&lt;br /&gt;
Le langage YOLOL est dit &amp;quot;insensible à la casse&amp;quot;, ce qui signifie que les noms des variables peuvent contenir des majuscules et des minuscules sans différencier les deux. Ainsi '''ButtonState''' et '''buttonstate''' désignent indistinctement la même variable. C'est une fonctionnalité très pratique pour rendre le code plus lisible.&lt;br /&gt;
&lt;br /&gt;
====Les variables internes et externes====&lt;br /&gt;
Il existe deux genre de variables: les '''variables internes''' qui ne peuvent être utilisées qu'au sein de la puce YOLOL où elles ont été initiées et les '''variables externes''' qui font appel aux [[device fields:fr|champs de périphérique]] des appareils branchés sur le même [[data networks:fr|réseau de données]] pour en demander ou modifier les valeurs.&amp;lt;br&amp;gt;&lt;br /&gt;
Pour les différencier, les variables externes sont précédées d'un double-point (''':''').&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 if :ButtonState &amp;gt;= 1 then :DoorState = 1 end&lt;br /&gt;
* Comme vu précédemment, ce script évalue la valeur de '''ButtonState''' et, si elle est supérieure ou égale à '''1''', associe '''DoorState''' à '''1'''. Les deux variables seront cependant ici appelées sur l'ensemble des équipements présents sur le réseau de données, par exemple pour ouvrir une porte si un bouton est appuyé.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Remarques====&lt;br /&gt;
* Les champs ayant le même nom au sein du réseau de données sont liées et ont presque toujours la même valeur. Ainsi, une variable externe qui en modifie la valeur le fera sur tout les appareils associés.&lt;br /&gt;
* Il n'est actuellement pas possible d'appeler une variable initiée sur un puce YOLOL depuis une autre puce YOLOL.&lt;br /&gt;
&lt;br /&gt;
===Les Valeurs de Variables===&lt;br /&gt;
====Typage====&lt;br /&gt;
Le langage YOLOL supporte deux types de valeurs pour les variables: Les '''valeurs numériques''' et les '''chaînes de caractères''' (ou &amp;quot;string&amp;quot;). Cette différence est importante car en fonction du type de variable, le résultat d'une même instruction sera différente.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 Addition = 3 + 5&lt;br /&gt;
* Cette instruction conduit à additionner les deux valeurs numériques '''3''' et '''5'''. Le résultat sera donc '''8'''.&lt;br /&gt;
 Addition = &amp;quot;3&amp;quot; + &amp;quot;5&amp;quot;&lt;br /&gt;
* Cette instruction conduit à associer les chaînes de caractères '''&amp;quot;3&amp;quot;''' et '''&amp;quot;5&amp;quot;'''. Le résultat sera donc '''&amp;quot;35&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
Les variables sont dites à &amp;quot;faible typage&amp;quot;, c'est-à-dire qu'elles ne sont pas restreintes à un seul type. Elles se convertissent systématiquement aux valeurs qui leur sont assignées. Ainsi, une variable associée à une valeur numérique peut la remplacer par une chaîne de caractères et inversement sans provoquer d'erreur dans le code.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 AutoPilot = 128.643&lt;br /&gt;
* cette première instruction associe la variable '''AutoPilot''' à la valeur numérique '''128.643'''.&lt;br /&gt;
 AutoPilot= &amp;quot;Erreur détectée&amp;quot;&lt;br /&gt;
* La variable '''AutoPilot''' se convertit en s'associant à la chaîne de caractères '''&amp;quot;Erreur détectée&amp;quot;''' et la valeur numérique '''128.643''' est effacée.&lt;br /&gt;
&lt;br /&gt;
====Les valeurs numériques====&lt;br /&gt;
Les valeurs numérique dans le langage YOLOL sont des décimales à point fixe. La précision est de un millième: Jusqu'à trois nombre sous la décimale sont acceptés. Fournir une valeur plus précise fonctionne, mais n'affecte pas le résultat final.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 Pi = 3,14159265&lt;br /&gt;
* Le script ci-dessus tente d'associer la variable '''Pi''' à la valeur numérique '''3,14159265'''. Le résultat final sera cependant '''Pi = 3.141''', coupant la précision à trois nombre sous la décimale.&lt;br /&gt;
&lt;br /&gt;
La taille maximale d'une valeur numérique est de 64-bit. De ce fait, la portée maximale (même après opération) est de [-9223372036854775.808, 9223372036854775.807]. Toutes valeurs supérieures ou inférieures seront ramenées aux limites de la portée.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 StarTrek = 9999999999999999.999&lt;br /&gt;
* Ici, on tente d'associer la variable '''StarTrek''' à la valeur numérique '''9999999999999999.999'''. Celle-ci est cependant supérieure à la portée maximale et le résultat final sera '''StarTrek = 9223372036854775.807'''.&lt;br /&gt;
&lt;br /&gt;
====Les chaînes de caractères====&lt;br /&gt;
Pour signaler une chaîne de caractères au langage YOLOL, celle-ci doit être entourée de double-guillemets ('''&amp;quot; &amp;quot;''').&lt;br /&gt;
&lt;br /&gt;
 BadRobots= &amp;quot;Saltberia&amp;quot; &lt;br /&gt;
* Ce script associe la variable '''BadRobot''' à la chaîne de caractères '''&amp;quot;Saltberia&amp;quot;'''.&lt;br /&gt;
Comme pour les valeurs numériques, la taille maximale d'une chaîne de caractères est de 64-bit.&lt;br /&gt;
&lt;br /&gt;
====Remarques====&lt;br /&gt;
* Chaque variable ne peut être que d'un type à la fois, bien que celui-ci puisse être converti au besoin.&lt;br /&gt;
* Les valeurs &amp;quot;False&amp;quot; et &amp;quot;True&amp;quot; sont de type numérique: Elles correspondent respectivement à &amp;quot;0&amp;quot; et &amp;quot;non-0&amp;quot;.&lt;br /&gt;
* Une variable non définie préalablement a par défaut la valeur numérique &amp;quot;0&amp;quot;. L'absence de valeur (&amp;quot;null&amp;quot;) n'est pas reconnue.&lt;br /&gt;
&lt;br /&gt;
==Les Opérateurs==&lt;br /&gt;
&lt;br /&gt;
Note that the available operators may be limited by the type of the programmable [[YOLOL Chip|chip]].&amp;lt;br&amp;gt;&lt;br /&gt;
Basic chips have a limited selection of functions while more advanced ones can perform more complex operations natively.&lt;br /&gt;
&lt;br /&gt;
=== Basic arithmetic and assignment operators ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation || Numeric operation || String operation || Chip availability&lt;br /&gt;
|-&lt;br /&gt;
| A + B || Addition || String A is appended by String B. || All&lt;br /&gt;
|-&lt;br /&gt;
| A - B || Subtraction || The last appearance of String B in String A is removed from String A. || All&lt;br /&gt;
|-&lt;br /&gt;
| A * B || Multiplication || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A / B || Division || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A ++ || PostIncrement (A=A+1) || Appends a space to String A. Evaluates to the original value. || All&lt;br /&gt;
|-&lt;br /&gt;
| A -- || PostDecrement (A=A-1) || Removes the last character of the string. Results in runtime error when trying to remove &amp;quot;&amp;quot;. Evaluates to the original value. || All&lt;br /&gt;
|-&lt;br /&gt;
| ++ A  || PreIncrement (A=A+1) || Appends a space to String A. Evaluates to the modified value. || All&lt;br /&gt;
|-&lt;br /&gt;
| -- A || PreDecrement (A=A-1) || Removes the last character of the string. Results in runtime error when trying to remove &amp;quot;&amp;quot;. Evaluates to the modified value. || All&lt;br /&gt;
|-&lt;br /&gt;
| A = B || Assignment (Variable A is set to the value of variable B) || Assignment || All&lt;br /&gt;
|-&lt;br /&gt;
| A += B || Addition-assignment (A=A+B) || A is assigned the value of string-operation A+B || All&lt;br /&gt;
|-&lt;br /&gt;
| A -= B || Subtraction-assignment (A=A-B) || A is assigned the value of string-operation A-B || All&lt;br /&gt;
|-&lt;br /&gt;
| A *= B || Multiplication-assignment (A=A*B) || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A /= B || Division-assignment (A=A/B) || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A ^= B || Exponentiation-assignment (A=A^B) || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A %= B || Modulo-assignment (A=A%B) || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A ^ B || Exponentiation || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A % B || Modulo || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| ABS A || Modulus (absol value) (A=A if A&amp;gt;=0, else A=-A) || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A! || Factorial || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| SQRT A || Square root of A || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| SIN A || Sine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| COS A || Cosine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| TAN A || Tangent of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| ASIN A || Inverse sine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| ACOS A || Inverse cosine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| ATAN A || Inverse tangent of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Logical operators ===&lt;br /&gt;
&lt;br /&gt;
Logical operators are checks that identify if the statement is true or false.&amp;lt;br&amp;gt;&lt;br /&gt;
All logical operations return either '''&amp;quot;0 for False&amp;quot;''' or '''&amp;quot;1 for True&amp;quot;'''. &lt;br /&gt;
The '''NOT''', '''AND''', and '''OR''' keywords consider 0 to be falsy and anything not 0 to be truthy.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation || Numeric operation || String operation || Chip availability&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;lt; B || Less than || returns 1 if String A is first in alphabetical order, returns 0 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;gt; B || Greater than || returns 0 if String A is first in alphabetical order, returns 1 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;lt;= B ||Less than or equal to || returns 1 if String A is first in alphabetical order or identical to String B, returns 0 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;gt;= B || Greater than or equal to || returns 0 if String A is first in alphabetical order or identical to String B, returns 1 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A != B || Not equal to || returns 1 if String A is not equal to String B, 0 if it is. || All&lt;br /&gt;
|-&lt;br /&gt;
| A == B || Equal to || returns 1 if String A is equal to String B, 0 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| NOT A || Not || Returns 1 if A is 0, otherwise returns 0. || All&lt;br /&gt;
|-&lt;br /&gt;
| A AND B || And || Returns 1 if neither A nor B are 0, otherwise returns 0. || All&lt;br /&gt;
|-&lt;br /&gt;
| A OR B || Or || Returns 1 if either A or B is not 0, otherwise returns 0. || All&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Mixing variable types in operations ===&lt;br /&gt;
&lt;br /&gt;
Mixing variable types in an operation handles the operation using all parameters as ''strings''.&lt;br /&gt;
&lt;br /&gt;
 previouslyNumber= &amp;quot;10&amp;quot; + 15&lt;br /&gt;
* The above script results in '''previouslyNumber''' containing the string value &amp;quot;1015&amp;quot;.&lt;br /&gt;
** Note that the involved parameters themselves don't change types, their values are just cast as strings for the purpose of the operation:&lt;br /&gt;
 &lt;br /&gt;
 purelyNumber = 15&lt;br /&gt;
 purelyString = &amp;quot;10&amp;quot; + purelyNumber&lt;br /&gt;
* When this script has executed, '''purelyString''' contains the string value of &amp;quot;1015&amp;quot;, while '''purelyNumber''' still contains the numeric value of 15.&lt;br /&gt;
&lt;br /&gt;
=== Order of Operations ===&lt;br /&gt;
&lt;br /&gt;
Operations are conducted in the following order, when operators have the same precidence, left to right.&amp;lt;br&amp;gt;&lt;br /&gt;
Where a line has multiple statements, they are executed left to right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operators &lt;br /&gt;
! Comments&lt;br /&gt;
|-&lt;br /&gt;
| ++ --&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;!&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| operators &lt;br /&gt;
| sqrt, abs, sin etc.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| negate&lt;br /&gt;
|-&lt;br /&gt;
| ^&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| */&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt; &amp;gt; == != &amp;lt;= &amp;gt;=&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Surprise!&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;+-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| not (logical negation)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| or&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| and&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Les Commandes==&lt;br /&gt;
&lt;br /&gt;
=== If-else conditional ===&lt;br /&gt;
&lt;br /&gt;
If-else statements are used to branch out the script into different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
They use the following syntax:&lt;br /&gt;
* '''if ''condition'' then ''statement'' else ''statement'' end'''&lt;br /&gt;
** Condition is a statement that results in a numeric value (where 0 is parsed as False, anything else as True), and statements are pieces of script that are run.&lt;br /&gt;
** All If-else conditional stations must have '''end''' syntax written after statement is complete.&lt;br /&gt;
** The statement has to be on one line. The if, then, else and end cannot be on different lines.&lt;br /&gt;
&lt;br /&gt;
If can be used to branch script execution into two possible outcomes temporarily based on variable value(s).&amp;lt;br&amp;gt;&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable != 2 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 3 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; endResult = 4 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* This script sets the value of '''endResult''' to 3 if '''variable''' does not have the value of 2.&lt;br /&gt;
* If '''variable''''s value is 2, '''endResult''' is set to the value of 4.&lt;br /&gt;
&lt;br /&gt;
Note that the else statement -part can be left out if not needed. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable != 2 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 3 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
*This script only sets the value of 3 to '''endResult''' if '''variable''' does not have a value of 2, and doesn't do anything else.&lt;br /&gt;
&lt;br /&gt;
==== Nesting if statements ====&lt;br /&gt;
&lt;br /&gt;
It is possible to place if-conditionals inside the true/false statement blocks to achieve further branching of execution.&amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 0 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 1 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 1 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 2 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &lt;br /&gt;
* This script sets '''endResult''' to 1 if '''variable''' equals 0.&lt;br /&gt;
* If '''variable''' doesn't equal 0, but it equals 1, '''endResult''' is set to 2.&lt;br /&gt;
&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 0 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; endResult == 1 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 2 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; endResult = 1 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
* This script sets '''endResult''' to 2 if '''variable''' has a value of 0, and '''endResult''' equals to 1.&lt;br /&gt;
* Otherwise it sets '''endResult''' to 1.&lt;br /&gt;
&lt;br /&gt;
=== Goto ===&lt;br /&gt;
&lt;br /&gt;
Goto syntax is used when the normal script reading order from 1-&amp;gt;20 is not desired, or needs to be altered.&lt;br /&gt;
&lt;br /&gt;
Goto is used with the following syntax:&lt;br /&gt;
*'''goto lineNumber'''&lt;br /&gt;
** lineNumber is the line which this command will take the script execution.&amp;lt;br&amp;gt;&lt;br /&gt;
** Any remaining script that is on the same line after the goto-command will not be executed.&lt;br /&gt;
*** using if statements before goto ignores goto syntax, assuming the if-statement is false&lt;br /&gt;
** Multiple goto commands can be added on the same line using conditionals, as '''False''' goto commands are skipped.&lt;br /&gt;
** Numeric values outside the [1,20] range are clamped to this range.&lt;br /&gt;
** Non-integer values are floored.&lt;br /&gt;
** String values will result in a Runtime Error.&lt;br /&gt;
&lt;br /&gt;
 if variable == 5 then '''goto 4''' end '''goto 6'''&lt;br /&gt;
&lt;br /&gt;
The script above will go to line number 4, if '''variable''' has a value of 5.&amp;lt;br&amp;gt;&lt;br /&gt;
Otherwise it will go to line number 6. Numerical operations can also be done &amp;quot;inside&amp;quot; the goto, e.g. &lt;br /&gt;
&lt;br /&gt;
  goto 4+1&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
Comments are useful when writing code that is used by a lot of programmers.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that comments also use up space from the pre-determined 70 character line limit and are not excluded from it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commenting is used with the following syntax:&lt;br /&gt;
*// '''text'''&lt;br /&gt;
** Text can be any single-line set of characters.&lt;br /&gt;
&lt;br /&gt;
 '''//''' This is a comment. It will explain how other lines of script work.&lt;br /&gt;
* An example of a possible comment syntax&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
&lt;br /&gt;
There are two types of errors that can happen with the programming language.&lt;br /&gt;
# Syntax errors&lt;br /&gt;
# Runtime errors&lt;br /&gt;
&lt;br /&gt;
* Syntax errors come from invalid and unparseable script and will result in the whole line not being executed.&lt;br /&gt;
* Runtime errors are only catchable while the script is being executed. They result in the execution of the line being interrupted, but any effects until the error will remain.&lt;br /&gt;
&lt;br /&gt;
== Known Bugs/Unintended Behavior ==&lt;br /&gt;
This is a list of known problems regarding yolol:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* variablenames including keywords like &amp;quot;if&amp;quot; in them will parse with the keyword in mind, resulting in a syntax error. Example: :life would be parsed as :l if e&lt;br /&gt;
&lt;br /&gt;
==YOLOL Tips &amp;amp; Tricks==&lt;br /&gt;
* [[Common YOLOL|Common YOLOL scripts]]&lt;br /&gt;
* [[YOLOL Tricks]]&lt;br /&gt;
&lt;br /&gt;
== Pages associées ==&lt;br /&gt;
* [[Data networks:fr|Réseaux de données]]&lt;br /&gt;
* [[Devices and machines:fr|Appareils et machines]]&lt;br /&gt;
* [[Device fields:fr|Champs de périphérique ]]&lt;br /&gt;
* [[Universal tool:fr|Outil universel]]&lt;br /&gt;
* [[YOLOL Chip:fr|Puce YOLOL]]&lt;br /&gt;
* [[Chip socket:fr|Socle à puce]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Networks|YOLOL:fr]]&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=YOLOL/fr&amp;diff=30488</id>
		<title>YOLOL/fr</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=YOLOL/fr&amp;diff=30488"/>
		<updated>2022-04-07T18:04:34Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: /* Related Pages */  Traduction et transfert de lien&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Otherlang2&lt;br /&gt;
|en=YOLOL&lt;br /&gt;
|de=YOLOL:de&lt;br /&gt;
|fr=YOLOL:fr&lt;br /&gt;
|ru=YOLOL:ru&lt;br /&gt;
|ua=YOLOL:ua&lt;br /&gt;
|jp=YOLOL:jp&lt;br /&gt;
|zh-cn=YOLOL语言&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
{{#evt:service=youtube|id=https://www.youtube.com/watch?v=7lXK6_bktUk|alignment=center}}&lt;br /&gt;
&lt;br /&gt;
le YOLOL est un langage de programmation spécifique à Starbase qui est utilisé en parallèle du l'[[Universal tool/fr|outil universel]] pour contrôler et gérer les [[Devices_and_machines/fr|appareils]].&amp;lt;br&amp;gt;&lt;br /&gt;
Le code est écrit ligne par ligne sur une [[YOLOL Chip/fr|puce YOLOL]] qui est ensuite insérée dans un [[Chip socket/fr|socle à puce]] connecté au [[Data networks/fr|réseau de données]] du vaisseau afin d'accéder aux [[Device fields/fr|champs de périphérique]].&amp;lt;br&amp;gt;&lt;br /&gt;
Le langage YOLOL est compatible avec presque tous les équipements et engins de l'univers connu.&lt;br /&gt;
&lt;br /&gt;
===Comment ça marche?===&lt;br /&gt;
Le YOLOL fonctionne par cycle: Les lignes de code sont exécutées les unes après les autres du haut vers le bas, puis la séquence reprend une fois la dernière ligne passée. Chaque ligne est lue dans un intervalle de temps constant de 0.2 secondes, quelque soit sa longueur et le nombre d'instructions qui y sont contenues.&lt;br /&gt;
&lt;br /&gt;
Pour faire simple:&lt;br /&gt;
# Le code se lance en commençant par la ligne 1&lt;br /&gt;
# La ligne en cours est exécutée, puis le programme passe à la suivante après un intervalle de temps de 0.2 secondes&lt;br /&gt;
# L'étape 2 est répétée pour les lignes 2, 3, 4... jusqu'à la dernière&lt;br /&gt;
# La puce se réinitialise à l'étape 1 une fois le processus terminé&lt;br /&gt;
&lt;br /&gt;
===Limites===&lt;br /&gt;
* Chaque puce YOLOL contient 20 lignes de code. Ni plus, ni moins. L'exécution d'un cycle complet prend donc 20 * 0.2 = 4 secondes si il est mené à son terme.&lt;br /&gt;
* Chaque lignes peut contenir un maximum de 70 caractères (symboles et espaces inclus).&lt;br /&gt;
&lt;br /&gt;
===Remarques===&lt;br /&gt;
* Les puces YOLOL possèdent une fonction de mise en pause, qui fige l'exécution du code à la ligne en cours.&lt;br /&gt;
* Les lignes blanches nécessitent tout de même l'intervalle de temps des 0.2 secondes pour être passées, provoquant de courts délais d'exécution (il en va de même pour les lignes ne contenant que des commentaires).&lt;br /&gt;
* Une seule ligne de code peut contenir plusieurs instructions à la fois, autant que peut le supporter la limite maximale de caractères.&lt;br /&gt;
* Certaines instructions permettent de passer à une ligne spécifique, ce qui rend le code plus modulable.&lt;br /&gt;
&lt;br /&gt;
== Les Variables ==&lt;br /&gt;
Les variables permettent d'associer un '''nom''' à une '''valeur''' pour faciliter l'acquisition ultérieure de cette dernière. Dès lors, à chaque fois que le '''nom''' de la variable sera appelé, c'est sa '''valeur''' qui sera demandée et/ou modifiée suivant l'instruction utilisée.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 ButtonState = 1&lt;br /&gt;
* Dans ce script, on attribue à la variable nommée '''ButtonState''' la valeur numérique '''1'''.&lt;br /&gt;
 if ButtonState &amp;gt;= 1 then DoorState = 1 end&lt;br /&gt;
* Maintenant, on vérifie si la valeur de la variable '''ButtonState''' est supérieure ou égale à '''1''', auquel cas la variable '''DoorState''' se voit elle aussi associée à '''1'''.&lt;br /&gt;
&lt;br /&gt;
===Les Noms de Variables===&lt;br /&gt;
====Sensibilité à la casse====&lt;br /&gt;
Le langage YOLOL est dit &amp;quot;insensible à la casse&amp;quot;, ce qui signifie que les noms des variables peuvent contenir des majuscules et des minuscules sans différencier les deux. Ainsi '''ButtonState''' et '''buttonstate''' désignent indistinctement la même variable. C'est une fonctionnalité très pratique pour rendre le code plus lisible.&lt;br /&gt;
&lt;br /&gt;
====Les variables internes et externes====&lt;br /&gt;
Il existe deux genre de variables: les '''variables internes''' qui ne peuvent être utilisées qu'au sein de la puce YOLOL où elles ont été initiées et les '''variables externes''' qui font appel aux [[device fields/fr|champs de périphérique]] des appareils branchés sur le même [[data networks/fr|réseau de données]] pour en demander ou modifier les valeurs.&amp;lt;br&amp;gt;&lt;br /&gt;
Pour les différencier, les variables externes sont précédées d'un double-point (''':''').&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 if :ButtonState &amp;gt;= 1 then :DoorState = 1 end&lt;br /&gt;
* Comme vu précédemment, ce script évalue la valeur de '''ButtonState''' et, si elle est supérieure ou égale à '''1''', associe '''DoorState''' à '''1'''. Les deux variables seront cependant ici appelées sur l'ensemble des équipements présents sur le réseau de données, par exemple pour ouvrir une porte si un bouton est appuyé.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Remarques====&lt;br /&gt;
* Les champs ayant le même nom au sein du réseau de données sont liées et ont presque toujours la même valeur. Ainsi, une variable externe qui en modifie la valeur le fera sur tout les appareils associés.&lt;br /&gt;
* Il n'est actuellement pas possible d'appeler une variable initiée sur un puce YOLOL depuis une autre puce YOLOL.&lt;br /&gt;
&lt;br /&gt;
===Les Valeurs de Variables===&lt;br /&gt;
====Typage====&lt;br /&gt;
Le langage YOLOL supporte deux types de valeurs pour les variables: Les '''valeurs numériques''' et les '''chaînes de caractères''' (ou &amp;quot;string&amp;quot;). Cette différence est importante car en fonction du type de variable, le résultat d'une même instruction sera différente.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 Addition = 3 + 5&lt;br /&gt;
* Cette instruction conduit à additionner les deux valeurs numériques '''3''' et '''5'''. Le résultat sera donc '''8'''.&lt;br /&gt;
 Addition = &amp;quot;3&amp;quot; + &amp;quot;5&amp;quot;&lt;br /&gt;
* Cette instruction conduit à associer les chaînes de caractères '''&amp;quot;3&amp;quot;''' et '''&amp;quot;5&amp;quot;'''. Le résultat sera donc '''&amp;quot;35&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
Les variables sont dites à &amp;quot;faible typage&amp;quot;, c'est-à-dire qu'elles ne sont pas restreintes à un seul type. Elles se convertissent systématiquement aux valeurs qui leur sont assignées. Ainsi, une variable associée à une valeur numérique peut la remplacer par une chaîne de caractères et inversement sans provoquer d'erreur dans le code.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 AutoPilot = 128.643&lt;br /&gt;
* cette première instruction associe la variable '''AutoPilot''' à la valeur numérique '''128.643'''.&lt;br /&gt;
 AutoPilot= &amp;quot;Erreur détectée&amp;quot;&lt;br /&gt;
* La variable '''AutoPilot''' se convertit en s'associant à la chaîne de caractères '''&amp;quot;Erreur détectée&amp;quot;''' et la valeur numérique '''128.643''' est effacée.&lt;br /&gt;
&lt;br /&gt;
====Les valeurs numériques====&lt;br /&gt;
Les valeurs numérique dans le langage YOLOL sont des décimales à point fixe. La précision est de un millième: Jusqu'à trois nombre sous la décimale sont acceptés. Fournir une valeur plus précise fonctionne, mais n'affecte pas le résultat final.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 Pi = 3,14159265&lt;br /&gt;
* Le script ci-dessus tente d'associer la variable '''Pi''' à la valeur numérique '''3,14159265'''. Le résultat final sera cependant '''Pi = 3.141''', coupant la précision à trois nombre sous la décimale.&lt;br /&gt;
&lt;br /&gt;
La taille maximale d'une valeur numérique est de 64-bit. De ce fait, la portée maximale (même après opération) est de [-9223372036854775.808, 9223372036854775.807]. Toutes valeurs supérieures ou inférieures seront ramenées aux limites de la portée.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 StarTrek = 9999999999999999.999&lt;br /&gt;
* Ici, on tente d'associer la variable '''StarTrek''' à la valeur numérique '''9999999999999999.999'''. Celle-ci est cependant supérieure à la portée maximale et le résultat final sera '''StarTrek = 9223372036854775.807'''.&lt;br /&gt;
&lt;br /&gt;
====Les chaînes de caractères====&lt;br /&gt;
Pour signaler une chaîne de caractères au langage YOLOL, celle-ci doit être entourée de double-guillemets ('''&amp;quot; &amp;quot;''').&lt;br /&gt;
&lt;br /&gt;
 BadRobots= &amp;quot;Saltberia&amp;quot; &lt;br /&gt;
* Ce script associe la variable '''BadRobot''' à la chaîne de caractères '''&amp;quot;Saltberia&amp;quot;'''.&lt;br /&gt;
Comme pour les valeurs numériques, la taille maximale d'une chaîne de caractères est de 64-bit.&lt;br /&gt;
&lt;br /&gt;
====Remarques====&lt;br /&gt;
* Chaque variable ne peut être que d'un type à la fois, bien que celui-ci puisse être converti au besoin.&lt;br /&gt;
* Les valeurs &amp;quot;False&amp;quot; et &amp;quot;True&amp;quot; sont de type numérique: Elles correspondent respectivement à &amp;quot;0&amp;quot; et &amp;quot;non-0&amp;quot;.&lt;br /&gt;
* Une variable non définie préalablement a par défaut la valeur numérique &amp;quot;0&amp;quot;. L'absence de valeur (&amp;quot;null&amp;quot;) n'est pas reconnue.&lt;br /&gt;
&lt;br /&gt;
==Les Opérateurs==&lt;br /&gt;
&lt;br /&gt;
Note that the available operators may be limited by the type of the programmable [[YOLOL Chip|chip]].&amp;lt;br&amp;gt;&lt;br /&gt;
Basic chips have a limited selection of functions while more advanced ones can perform more complex operations natively.&lt;br /&gt;
&lt;br /&gt;
=== Basic arithmetic and assignment operators ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation || Numeric operation || String operation || Chip availability&lt;br /&gt;
|-&lt;br /&gt;
| A + B || Addition || String A is appended by String B. || All&lt;br /&gt;
|-&lt;br /&gt;
| A - B || Subtraction || The last appearance of String B in String A is removed from String A. || All&lt;br /&gt;
|-&lt;br /&gt;
| A * B || Multiplication || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A / B || Division || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A ++ || PostIncrement (A=A+1) || Appends a space to String A. Evaluates to the original value. || All&lt;br /&gt;
|-&lt;br /&gt;
| A -- || PostDecrement (A=A-1) || Removes the last character of the string. Results in runtime error when trying to remove &amp;quot;&amp;quot;. Evaluates to the original value. || All&lt;br /&gt;
|-&lt;br /&gt;
| ++ A  || PreIncrement (A=A+1) || Appends a space to String A. Evaluates to the modified value. || All&lt;br /&gt;
|-&lt;br /&gt;
| -- A || PreDecrement (A=A-1) || Removes the last character of the string. Results in runtime error when trying to remove &amp;quot;&amp;quot;. Evaluates to the modified value. || All&lt;br /&gt;
|-&lt;br /&gt;
| A = B || Assignment (Variable A is set to the value of variable B) || Assignment || All&lt;br /&gt;
|-&lt;br /&gt;
| A += B || Addition-assignment (A=A+B) || A is assigned the value of string-operation A+B || All&lt;br /&gt;
|-&lt;br /&gt;
| A -= B || Subtraction-assignment (A=A-B) || A is assigned the value of string-operation A-B || All&lt;br /&gt;
|-&lt;br /&gt;
| A *= B || Multiplication-assignment (A=A*B) || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A /= B || Division-assignment (A=A/B) || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A ^= B || Exponentiation-assignment (A=A^B) || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A %= B || Modulo-assignment (A=A%B) || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A ^ B || Exponentiation || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A % B || Modulo || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| ABS A || Modulus (absol value) (A=A if A&amp;gt;=0, else A=-A) || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A! || Factorial || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| SQRT A || Square root of A || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| SIN A || Sine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| COS A || Cosine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| TAN A || Tangent of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| ASIN A || Inverse sine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| ACOS A || Inverse cosine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| ATAN A || Inverse tangent of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Logical operators ===&lt;br /&gt;
&lt;br /&gt;
Logical operators are checks that identify if the statement is true or false.&amp;lt;br&amp;gt;&lt;br /&gt;
All logical operations return either '''&amp;quot;0 for False&amp;quot;''' or '''&amp;quot;1 for True&amp;quot;'''. &lt;br /&gt;
The '''NOT''', '''AND''', and '''OR''' keywords consider 0 to be falsy and anything not 0 to be truthy.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation || Numeric operation || String operation || Chip availability&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;lt; B || Less than || returns 1 if String A is first in alphabetical order, returns 0 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;gt; B || Greater than || returns 0 if String A is first in alphabetical order, returns 1 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;lt;= B ||Less than or equal to || returns 1 if String A is first in alphabetical order or identical to String B, returns 0 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;gt;= B || Greater than or equal to || returns 0 if String A is first in alphabetical order or identical to String B, returns 1 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A != B || Not equal to || returns 1 if String A is not equal to String B, 0 if it is. || All&lt;br /&gt;
|-&lt;br /&gt;
| A == B || Equal to || returns 1 if String A is equal to String B, 0 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| NOT A || Not || Returns 1 if A is 0, otherwise returns 0. || All&lt;br /&gt;
|-&lt;br /&gt;
| A AND B || And || Returns 1 if neither A nor B are 0, otherwise returns 0. || All&lt;br /&gt;
|-&lt;br /&gt;
| A OR B || Or || Returns 1 if either A or B is not 0, otherwise returns 0. || All&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Mixing variable types in operations ===&lt;br /&gt;
&lt;br /&gt;
Mixing variable types in an operation handles the operation using all parameters as ''strings''.&lt;br /&gt;
&lt;br /&gt;
 previouslyNumber= &amp;quot;10&amp;quot; + 15&lt;br /&gt;
* The above script results in '''previouslyNumber''' containing the string value &amp;quot;1015&amp;quot;.&lt;br /&gt;
** Note that the involved parameters themselves don't change types, their values are just cast as strings for the purpose of the operation:&lt;br /&gt;
 &lt;br /&gt;
 purelyNumber = 15&lt;br /&gt;
 purelyString = &amp;quot;10&amp;quot; + purelyNumber&lt;br /&gt;
* When this script has executed, '''purelyString''' contains the string value of &amp;quot;1015&amp;quot;, while '''purelyNumber''' still contains the numeric value of 15.&lt;br /&gt;
&lt;br /&gt;
=== Order of Operations ===&lt;br /&gt;
&lt;br /&gt;
Operations are conducted in the following order, when operators have the same precidence, left to right.&amp;lt;br&amp;gt;&lt;br /&gt;
Where a line has multiple statements, they are executed left to right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operators &lt;br /&gt;
! Comments&lt;br /&gt;
|-&lt;br /&gt;
| ++ --&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;!&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| operators &lt;br /&gt;
| sqrt, abs, sin etc.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| negate&lt;br /&gt;
|-&lt;br /&gt;
| ^&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| */&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt; &amp;gt; == != &amp;lt;= &amp;gt;=&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Surprise!&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;+-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| not (logical negation)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| or&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| and&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Les Commandes==&lt;br /&gt;
&lt;br /&gt;
=== If-else conditional ===&lt;br /&gt;
&lt;br /&gt;
If-else statements are used to branch out the script into different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
They use the following syntax:&lt;br /&gt;
* '''if ''condition'' then ''statement'' else ''statement'' end'''&lt;br /&gt;
** Condition is a statement that results in a numeric value (where 0 is parsed as False, anything else as True), and statements are pieces of script that are run.&lt;br /&gt;
** All If-else conditional stations must have '''end''' syntax written after statement is complete.&lt;br /&gt;
** The statement has to be on one line. The if, then, else and end cannot be on different lines.&lt;br /&gt;
&lt;br /&gt;
If can be used to branch script execution into two possible outcomes temporarily based on variable value(s).&amp;lt;br&amp;gt;&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable != 2 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 3 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; endResult = 4 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* This script sets the value of '''endResult''' to 3 if '''variable''' does not have the value of 2.&lt;br /&gt;
* If '''variable''''s value is 2, '''endResult''' is set to the value of 4.&lt;br /&gt;
&lt;br /&gt;
Note that the else statement -part can be left out if not needed. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable != 2 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 3 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
*This script only sets the value of 3 to '''endResult''' if '''variable''' does not have a value of 2, and doesn't do anything else.&lt;br /&gt;
&lt;br /&gt;
==== Nesting if statements ====&lt;br /&gt;
&lt;br /&gt;
It is possible to place if-conditionals inside the true/false statement blocks to achieve further branching of execution.&amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 0 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 1 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 1 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 2 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &lt;br /&gt;
* This script sets '''endResult''' to 1 if '''variable''' equals 0.&lt;br /&gt;
* If '''variable''' doesn't equal 0, but it equals 1, '''endResult''' is set to 2.&lt;br /&gt;
&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 0 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; endResult == 1 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 2 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; endResult = 1 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
* This script sets '''endResult''' to 2 if '''variable''' has a value of 0, and '''endResult''' equals to 1.&lt;br /&gt;
* Otherwise it sets '''endResult''' to 1.&lt;br /&gt;
&lt;br /&gt;
=== Goto ===&lt;br /&gt;
&lt;br /&gt;
Goto syntax is used when the normal script reading order from 1-&amp;gt;20 is not desired, or needs to be altered.&lt;br /&gt;
&lt;br /&gt;
Goto is used with the following syntax:&lt;br /&gt;
*'''goto lineNumber'''&lt;br /&gt;
** lineNumber is the line which this command will take the script execution.&amp;lt;br&amp;gt;&lt;br /&gt;
** Any remaining script that is on the same line after the goto-command will not be executed.&lt;br /&gt;
*** using if statements before goto ignores goto syntax, assuming the if-statement is false&lt;br /&gt;
** Multiple goto commands can be added on the same line using conditionals, as '''False''' goto commands are skipped.&lt;br /&gt;
** Numeric values outside the [1,20] range are clamped to this range.&lt;br /&gt;
** Non-integer values are floored.&lt;br /&gt;
** String values will result in a Runtime Error.&lt;br /&gt;
&lt;br /&gt;
 if variable == 5 then '''goto 4''' end '''goto 6'''&lt;br /&gt;
&lt;br /&gt;
The script above will go to line number 4, if '''variable''' has a value of 5.&amp;lt;br&amp;gt;&lt;br /&gt;
Otherwise it will go to line number 6. Numerical operations can also be done &amp;quot;inside&amp;quot; the goto, e.g. &lt;br /&gt;
&lt;br /&gt;
  goto 4+1&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
Comments are useful when writing code that is used by a lot of programmers.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that comments also use up space from the pre-determined 70 character line limit and are not excluded from it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commenting is used with the following syntax:&lt;br /&gt;
*// '''text'''&lt;br /&gt;
** Text can be any single-line set of characters.&lt;br /&gt;
&lt;br /&gt;
 '''//''' This is a comment. It will explain how other lines of script work.&lt;br /&gt;
* An example of a possible comment syntax&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
&lt;br /&gt;
There are two types of errors that can happen with the programming language.&lt;br /&gt;
# Syntax errors&lt;br /&gt;
# Runtime errors&lt;br /&gt;
&lt;br /&gt;
* Syntax errors come from invalid and unparseable script and will result in the whole line not being executed.&lt;br /&gt;
* Runtime errors are only catchable while the script is being executed. They result in the execution of the line being interrupted, but any effects until the error will remain.&lt;br /&gt;
&lt;br /&gt;
== Known Bugs/Unintended Behavior ==&lt;br /&gt;
This is a list of known problems regarding yolol:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* variablenames including keywords like &amp;quot;if&amp;quot; in them will parse with the keyword in mind, resulting in a syntax error. Example: :life would be parsed as :l if e&lt;br /&gt;
&lt;br /&gt;
==YOLOL Tips &amp;amp; Tricks==&lt;br /&gt;
* [[Common YOLOL|Common YOLOL scripts]]&lt;br /&gt;
* [[YOLOL Tricks]]&lt;br /&gt;
&lt;br /&gt;
== Pages associées ==&lt;br /&gt;
* [[Data networks/fr|Réseaux de données]]&lt;br /&gt;
* [[Devices and machines/fr|Appareils et machines]]&lt;br /&gt;
* [[Device fields/fr|Champs de périphérique ]]&lt;br /&gt;
* [[Universal tool/fr|Outil universel]]&lt;br /&gt;
* [[YOLOL Chip/fr|Puce YOLOL]]&lt;br /&gt;
* [[Chip socket/fr|Socle à puce]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Networks|YOLOL/fr]]&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=YOLOL/fr&amp;diff=30487</id>
		<title>YOLOL/fr</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=YOLOL/fr&amp;diff=30487"/>
		<updated>2022-04-07T17:51:48Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: /* Introduction */  Ajout d'une note sur l'outil universel&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Otherlang2&lt;br /&gt;
|en=YOLOL&lt;br /&gt;
|de=YOLOL:de&lt;br /&gt;
|fr=YOLOL:fr&lt;br /&gt;
|ru=YOLOL:ru&lt;br /&gt;
|ua=YOLOL:ua&lt;br /&gt;
|jp=YOLOL:jp&lt;br /&gt;
|zh-cn=YOLOL语言&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
{{#evt:service=youtube|id=https://www.youtube.com/watch?v=7lXK6_bktUk|alignment=center}}&lt;br /&gt;
&lt;br /&gt;
le YOLOL est un langage de programmation spécifique à Starbase qui est utilisé en parallèle du l'[[Universal tool/fr|outil universel]] pour contrôler et gérer les [[Devices_and_machines/fr|appareils]].&amp;lt;br&amp;gt;&lt;br /&gt;
Le code est écrit ligne par ligne sur une [[YOLOL Chip/fr|puce YOLOL]] qui est ensuite insérée dans un [[Chip socket/fr|socle à puce]] connecté au [[Data networks/fr|réseau de données]] du vaisseau afin d'accéder aux [[Device fields/fr|champs de périphérique]].&amp;lt;br&amp;gt;&lt;br /&gt;
Le langage YOLOL est compatible avec presque tous les équipements et engins de l'univers connu.&lt;br /&gt;
&lt;br /&gt;
===Comment ça marche?===&lt;br /&gt;
Le YOLOL fonctionne par cycle: Les lignes de code sont exécutées les unes après les autres du haut vers le bas, puis la séquence reprend une fois la dernière ligne passée. Chaque ligne est lue dans un intervalle de temps constant de 0.2 secondes, quelque soit sa longueur et le nombre d'instructions qui y sont contenues.&lt;br /&gt;
&lt;br /&gt;
Pour faire simple:&lt;br /&gt;
# Le code se lance en commençant par la ligne 1&lt;br /&gt;
# La ligne en cours est exécutée, puis le programme passe à la suivante après un intervalle de temps de 0.2 secondes&lt;br /&gt;
# L'étape 2 est répétée pour les lignes 2, 3, 4... jusqu'à la dernière&lt;br /&gt;
# La puce se réinitialise à l'étape 1 une fois le processus terminé&lt;br /&gt;
&lt;br /&gt;
===Limites===&lt;br /&gt;
* Chaque puce YOLOL contient 20 lignes de code. Ni plus, ni moins. L'exécution d'un cycle complet prend donc 20 * 0.2 = 4 secondes si il est mené à son terme.&lt;br /&gt;
* Chaque lignes peut contenir un maximum de 70 caractères (symboles et espaces inclus).&lt;br /&gt;
&lt;br /&gt;
===Remarques===&lt;br /&gt;
* Les puces YOLOL possèdent une fonction de mise en pause, qui fige l'exécution du code à la ligne en cours.&lt;br /&gt;
* Les lignes blanches nécessitent tout de même l'intervalle de temps des 0.2 secondes pour être passées, provoquant de courts délais d'exécution (il en va de même pour les lignes ne contenant que des commentaires).&lt;br /&gt;
* Une seule ligne de code peut contenir plusieurs instructions à la fois, autant que peut le supporter la limite maximale de caractères.&lt;br /&gt;
* Certaines instructions permettent de passer à une ligne spécifique, ce qui rend le code plus modulable.&lt;br /&gt;
&lt;br /&gt;
== Les Variables ==&lt;br /&gt;
Les variables permettent d'associer un '''nom''' à une '''valeur''' pour faciliter l'acquisition ultérieure de cette dernière. Dès lors, à chaque fois que le '''nom''' de la variable sera appelé, c'est sa '''valeur''' qui sera demandée et/ou modifiée suivant l'instruction utilisée.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 ButtonState = 1&lt;br /&gt;
* Dans ce script, on attribue à la variable nommée '''ButtonState''' la valeur numérique '''1'''.&lt;br /&gt;
 if ButtonState &amp;gt;= 1 then DoorState = 1 end&lt;br /&gt;
* Maintenant, on vérifie si la valeur de la variable '''ButtonState''' est supérieure ou égale à '''1''', auquel cas la variable '''DoorState''' se voit elle aussi associée à '''1'''.&lt;br /&gt;
&lt;br /&gt;
===Les Noms de Variables===&lt;br /&gt;
====Sensibilité à la casse====&lt;br /&gt;
Le langage YOLOL est dit &amp;quot;insensible à la casse&amp;quot;, ce qui signifie que les noms des variables peuvent contenir des majuscules et des minuscules sans différencier les deux. Ainsi '''ButtonState''' et '''buttonstate''' désignent indistinctement la même variable. C'est une fonctionnalité très pratique pour rendre le code plus lisible.&lt;br /&gt;
&lt;br /&gt;
====Les variables internes et externes====&lt;br /&gt;
Il existe deux genre de variables: les '''variables internes''' qui ne peuvent être utilisées qu'au sein de la puce YOLOL où elles ont été initiées et les '''variables externes''' qui font appel aux [[device fields/fr|champs de périphérique]] des appareils branchés sur le même [[data networks/fr|réseau de données]] pour en demander ou modifier les valeurs.&amp;lt;br&amp;gt;&lt;br /&gt;
Pour les différencier, les variables externes sont précédées d'un double-point (''':''').&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 if :ButtonState &amp;gt;= 1 then :DoorState = 1 end&lt;br /&gt;
* Comme vu précédemment, ce script évalue la valeur de '''ButtonState''' et, si elle est supérieure ou égale à '''1''', associe '''DoorState''' à '''1'''. Les deux variables seront cependant ici appelées sur l'ensemble des équipements présents sur le réseau de données, par exemple pour ouvrir une porte si un bouton est appuyé.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Remarques====&lt;br /&gt;
* Les champs ayant le même nom au sein du réseau de données sont liées et ont presque toujours la même valeur. Ainsi, une variable externe qui en modifie la valeur le fera sur tout les appareils associés.&lt;br /&gt;
* Il n'est actuellement pas possible d'appeler une variable initiée sur un puce YOLOL depuis une autre puce YOLOL.&lt;br /&gt;
&lt;br /&gt;
===Les Valeurs de Variables===&lt;br /&gt;
====Typage====&lt;br /&gt;
Le langage YOLOL supporte deux types de valeurs pour les variables: Les '''valeurs numériques''' et les '''chaînes de caractères''' (ou &amp;quot;string&amp;quot;). Cette différence est importante car en fonction du type de variable, le résultat d'une même instruction sera différente.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 Addition = 3 + 5&lt;br /&gt;
* Cette instruction conduit à additionner les deux valeurs numériques '''3''' et '''5'''. Le résultat sera donc '''8'''.&lt;br /&gt;
 Addition = &amp;quot;3&amp;quot; + &amp;quot;5&amp;quot;&lt;br /&gt;
* Cette instruction conduit à associer les chaînes de caractères '''&amp;quot;3&amp;quot;''' et '''&amp;quot;5&amp;quot;'''. Le résultat sera donc '''&amp;quot;35&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
Les variables sont dites à &amp;quot;faible typage&amp;quot;, c'est-à-dire qu'elles ne sont pas restreintes à un seul type. Elles se convertissent systématiquement aux valeurs qui leur sont assignées. Ainsi, une variable associée à une valeur numérique peut la remplacer par une chaîne de caractères et inversement sans provoquer d'erreur dans le code.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 AutoPilot = 128.643&lt;br /&gt;
* cette première instruction associe la variable '''AutoPilot''' à la valeur numérique '''128.643'''.&lt;br /&gt;
 AutoPilot= &amp;quot;Erreur détectée&amp;quot;&lt;br /&gt;
* La variable '''AutoPilot''' se convertit en s'associant à la chaîne de caractères '''&amp;quot;Erreur détectée&amp;quot;''' et la valeur numérique '''128.643''' est effacée.&lt;br /&gt;
&lt;br /&gt;
====Les valeurs numériques====&lt;br /&gt;
Les valeurs numérique dans le langage YOLOL sont des décimales à point fixe. La précision est de un millième: Jusqu'à trois nombre sous la décimale sont acceptés. Fournir une valeur plus précise fonctionne, mais n'affecte pas le résultat final.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 Pi = 3,14159265&lt;br /&gt;
* Le script ci-dessus tente d'associer la variable '''Pi''' à la valeur numérique '''3,14159265'''. Le résultat final sera cependant '''Pi = 3.141''', coupant la précision à trois nombre sous la décimale.&lt;br /&gt;
&lt;br /&gt;
La taille maximale d'une valeur numérique est de 64-bit. De ce fait, la portée maximale (même après opération) est de [-9223372036854775.808, 9223372036854775.807]. Toutes valeurs supérieures ou inférieures seront ramenées aux limites de la portée.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 StarTrek = 9999999999999999.999&lt;br /&gt;
* Ici, on tente d'associer la variable '''StarTrek''' à la valeur numérique '''9999999999999999.999'''. Celle-ci est cependant supérieure à la portée maximale et le résultat final sera '''StarTrek = 9223372036854775.807'''.&lt;br /&gt;
&lt;br /&gt;
====Les chaînes de caractères====&lt;br /&gt;
Pour signaler une chaîne de caractères au langage YOLOL, celle-ci doit être entourée de double-guillemets ('''&amp;quot; &amp;quot;''').&lt;br /&gt;
&lt;br /&gt;
 BadRobots= &amp;quot;Saltberia&amp;quot; &lt;br /&gt;
* Ce script associe la variable '''BadRobot''' à la chaîne de caractères '''&amp;quot;Saltberia&amp;quot;'''.&lt;br /&gt;
Comme pour les valeurs numériques, la taille maximale d'une chaîne de caractères est de 64-bit.&lt;br /&gt;
&lt;br /&gt;
====Remarques====&lt;br /&gt;
* Chaque variable ne peut être que d'un type à la fois, bien que celui-ci puisse être converti au besoin.&lt;br /&gt;
* Les valeurs &amp;quot;False&amp;quot; et &amp;quot;True&amp;quot; sont de type numérique: Elles correspondent respectivement à &amp;quot;0&amp;quot; et &amp;quot;non-0&amp;quot;.&lt;br /&gt;
* Une variable non définie préalablement a par défaut la valeur numérique &amp;quot;0&amp;quot;. L'absence de valeur (&amp;quot;null&amp;quot;) n'est pas reconnue.&lt;br /&gt;
&lt;br /&gt;
==Les Opérateurs==&lt;br /&gt;
&lt;br /&gt;
Note that the available operators may be limited by the type of the programmable [[YOLOL Chip|chip]].&amp;lt;br&amp;gt;&lt;br /&gt;
Basic chips have a limited selection of functions while more advanced ones can perform more complex operations natively.&lt;br /&gt;
&lt;br /&gt;
=== Basic arithmetic and assignment operators ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation || Numeric operation || String operation || Chip availability&lt;br /&gt;
|-&lt;br /&gt;
| A + B || Addition || String A is appended by String B. || All&lt;br /&gt;
|-&lt;br /&gt;
| A - B || Subtraction || The last appearance of String B in String A is removed from String A. || All&lt;br /&gt;
|-&lt;br /&gt;
| A * B || Multiplication || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A / B || Division || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A ++ || PostIncrement (A=A+1) || Appends a space to String A. Evaluates to the original value. || All&lt;br /&gt;
|-&lt;br /&gt;
| A -- || PostDecrement (A=A-1) || Removes the last character of the string. Results in runtime error when trying to remove &amp;quot;&amp;quot;. Evaluates to the original value. || All&lt;br /&gt;
|-&lt;br /&gt;
| ++ A  || PreIncrement (A=A+1) || Appends a space to String A. Evaluates to the modified value. || All&lt;br /&gt;
|-&lt;br /&gt;
| -- A || PreDecrement (A=A-1) || Removes the last character of the string. Results in runtime error when trying to remove &amp;quot;&amp;quot;. Evaluates to the modified value. || All&lt;br /&gt;
|-&lt;br /&gt;
| A = B || Assignment (Variable A is set to the value of variable B) || Assignment || All&lt;br /&gt;
|-&lt;br /&gt;
| A += B || Addition-assignment (A=A+B) || A is assigned the value of string-operation A+B || All&lt;br /&gt;
|-&lt;br /&gt;
| A -= B || Subtraction-assignment (A=A-B) || A is assigned the value of string-operation A-B || All&lt;br /&gt;
|-&lt;br /&gt;
| A *= B || Multiplication-assignment (A=A*B) || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A /= B || Division-assignment (A=A/B) || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A ^= B || Exponentiation-assignment (A=A^B) || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A %= B || Modulo-assignment (A=A%B) || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A ^ B || Exponentiation || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A % B || Modulo || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| ABS A || Modulus (absol value) (A=A if A&amp;gt;=0, else A=-A) || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A! || Factorial || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| SQRT A || Square root of A || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| SIN A || Sine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| COS A || Cosine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| TAN A || Tangent of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| ASIN A || Inverse sine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| ACOS A || Inverse cosine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| ATAN A || Inverse tangent of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Logical operators ===&lt;br /&gt;
&lt;br /&gt;
Logical operators are checks that identify if the statement is true or false.&amp;lt;br&amp;gt;&lt;br /&gt;
All logical operations return either '''&amp;quot;0 for False&amp;quot;''' or '''&amp;quot;1 for True&amp;quot;'''. &lt;br /&gt;
The '''NOT''', '''AND''', and '''OR''' keywords consider 0 to be falsy and anything not 0 to be truthy.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation || Numeric operation || String operation || Chip availability&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;lt; B || Less than || returns 1 if String A is first in alphabetical order, returns 0 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;gt; B || Greater than || returns 0 if String A is first in alphabetical order, returns 1 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;lt;= B ||Less than or equal to || returns 1 if String A is first in alphabetical order or identical to String B, returns 0 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;gt;= B || Greater than or equal to || returns 0 if String A is first in alphabetical order or identical to String B, returns 1 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A != B || Not equal to || returns 1 if String A is not equal to String B, 0 if it is. || All&lt;br /&gt;
|-&lt;br /&gt;
| A == B || Equal to || returns 1 if String A is equal to String B, 0 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| NOT A || Not || Returns 1 if A is 0, otherwise returns 0. || All&lt;br /&gt;
|-&lt;br /&gt;
| A AND B || And || Returns 1 if neither A nor B are 0, otherwise returns 0. || All&lt;br /&gt;
|-&lt;br /&gt;
| A OR B || Or || Returns 1 if either A or B is not 0, otherwise returns 0. || All&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Mixing variable types in operations ===&lt;br /&gt;
&lt;br /&gt;
Mixing variable types in an operation handles the operation using all parameters as ''strings''.&lt;br /&gt;
&lt;br /&gt;
 previouslyNumber= &amp;quot;10&amp;quot; + 15&lt;br /&gt;
* The above script results in '''previouslyNumber''' containing the string value &amp;quot;1015&amp;quot;.&lt;br /&gt;
** Note that the involved parameters themselves don't change types, their values are just cast as strings for the purpose of the operation:&lt;br /&gt;
 &lt;br /&gt;
 purelyNumber = 15&lt;br /&gt;
 purelyString = &amp;quot;10&amp;quot; + purelyNumber&lt;br /&gt;
* When this script has executed, '''purelyString''' contains the string value of &amp;quot;1015&amp;quot;, while '''purelyNumber''' still contains the numeric value of 15.&lt;br /&gt;
&lt;br /&gt;
=== Order of Operations ===&lt;br /&gt;
&lt;br /&gt;
Operations are conducted in the following order, when operators have the same precidence, left to right.&amp;lt;br&amp;gt;&lt;br /&gt;
Where a line has multiple statements, they are executed left to right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operators &lt;br /&gt;
! Comments&lt;br /&gt;
|-&lt;br /&gt;
| ++ --&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;!&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| operators &lt;br /&gt;
| sqrt, abs, sin etc.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| negate&lt;br /&gt;
|-&lt;br /&gt;
| ^&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| */&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt; &amp;gt; == != &amp;lt;= &amp;gt;=&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Surprise!&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;+-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| not (logical negation)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| or&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| and&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Les Commandes==&lt;br /&gt;
&lt;br /&gt;
=== If-else conditional ===&lt;br /&gt;
&lt;br /&gt;
If-else statements are used to branch out the script into different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
They use the following syntax:&lt;br /&gt;
* '''if ''condition'' then ''statement'' else ''statement'' end'''&lt;br /&gt;
** Condition is a statement that results in a numeric value (where 0 is parsed as False, anything else as True), and statements are pieces of script that are run.&lt;br /&gt;
** All If-else conditional stations must have '''end''' syntax written after statement is complete.&lt;br /&gt;
** The statement has to be on one line. The if, then, else and end cannot be on different lines.&lt;br /&gt;
&lt;br /&gt;
If can be used to branch script execution into two possible outcomes temporarily based on variable value(s).&amp;lt;br&amp;gt;&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable != 2 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 3 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; endResult = 4 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* This script sets the value of '''endResult''' to 3 if '''variable''' does not have the value of 2.&lt;br /&gt;
* If '''variable''''s value is 2, '''endResult''' is set to the value of 4.&lt;br /&gt;
&lt;br /&gt;
Note that the else statement -part can be left out if not needed. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable != 2 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 3 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
*This script only sets the value of 3 to '''endResult''' if '''variable''' does not have a value of 2, and doesn't do anything else.&lt;br /&gt;
&lt;br /&gt;
==== Nesting if statements ====&lt;br /&gt;
&lt;br /&gt;
It is possible to place if-conditionals inside the true/false statement blocks to achieve further branching of execution.&amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 0 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 1 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 1 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 2 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &lt;br /&gt;
* This script sets '''endResult''' to 1 if '''variable''' equals 0.&lt;br /&gt;
* If '''variable''' doesn't equal 0, but it equals 1, '''endResult''' is set to 2.&lt;br /&gt;
&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 0 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; endResult == 1 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 2 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; endResult = 1 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
* This script sets '''endResult''' to 2 if '''variable''' has a value of 0, and '''endResult''' equals to 1.&lt;br /&gt;
* Otherwise it sets '''endResult''' to 1.&lt;br /&gt;
&lt;br /&gt;
=== Goto ===&lt;br /&gt;
&lt;br /&gt;
Goto syntax is used when the normal script reading order from 1-&amp;gt;20 is not desired, or needs to be altered.&lt;br /&gt;
&lt;br /&gt;
Goto is used with the following syntax:&lt;br /&gt;
*'''goto lineNumber'''&lt;br /&gt;
** lineNumber is the line which this command will take the script execution.&amp;lt;br&amp;gt;&lt;br /&gt;
** Any remaining script that is on the same line after the goto-command will not be executed.&lt;br /&gt;
*** using if statements before goto ignores goto syntax, assuming the if-statement is false&lt;br /&gt;
** Multiple goto commands can be added on the same line using conditionals, as '''False''' goto commands are skipped.&lt;br /&gt;
** Numeric values outside the [1,20] range are clamped to this range.&lt;br /&gt;
** Non-integer values are floored.&lt;br /&gt;
** String values will result in a Runtime Error.&lt;br /&gt;
&lt;br /&gt;
 if variable == 5 then '''goto 4''' end '''goto 6'''&lt;br /&gt;
&lt;br /&gt;
The script above will go to line number 4, if '''variable''' has a value of 5.&amp;lt;br&amp;gt;&lt;br /&gt;
Otherwise it will go to line number 6. Numerical operations can also be done &amp;quot;inside&amp;quot; the goto, e.g. &lt;br /&gt;
&lt;br /&gt;
  goto 4+1&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
Comments are useful when writing code that is used by a lot of programmers.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that comments also use up space from the pre-determined 70 character line limit and are not excluded from it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commenting is used with the following syntax:&lt;br /&gt;
*// '''text'''&lt;br /&gt;
** Text can be any single-line set of characters.&lt;br /&gt;
&lt;br /&gt;
 '''//''' This is a comment. It will explain how other lines of script work.&lt;br /&gt;
* An example of a possible comment syntax&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
&lt;br /&gt;
There are two types of errors that can happen with the programming language.&lt;br /&gt;
# Syntax errors&lt;br /&gt;
# Runtime errors&lt;br /&gt;
&lt;br /&gt;
* Syntax errors come from invalid and unparseable script and will result in the whole line not being executed.&lt;br /&gt;
* Runtime errors are only catchable while the script is being executed. They result in the execution of the line being interrupted, but any effects until the error will remain.&lt;br /&gt;
&lt;br /&gt;
== Known Bugs/Unintended Behavior ==&lt;br /&gt;
This is a list of known problems regarding yolol:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* variablenames including keywords like &amp;quot;if&amp;quot; in them will parse with the keyword in mind, resulting in a syntax error. Example: :life would be parsed as :l if e&lt;br /&gt;
&lt;br /&gt;
==YOLOL Tips &amp;amp; Tricks==&lt;br /&gt;
* [[Common YOLOL|Common YOLOL scripts]]&lt;br /&gt;
* [[YOLOL Tricks]]&lt;br /&gt;
&lt;br /&gt;
== Related Pages ==&lt;br /&gt;
* [[Data networks]]&lt;br /&gt;
* [[Devices and machines]]&lt;br /&gt;
* [[Device fields]]&lt;br /&gt;
* [[Universal tool|Universal tool]]&lt;br /&gt;
* [[YOLOL Chip]]&lt;br /&gt;
* [[Memory chip]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Networks|YOLOL:fr]]&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=YOLOL&amp;diff=30486</id>
		<title>YOLOL</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=YOLOL&amp;diff=30486"/>
		<updated>2022-04-07T15:29:21Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: /* Summary */  adding youtube link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Otherlang2&lt;br /&gt;
|en=YOLOL&lt;br /&gt;
|de=YOLOL:de&lt;br /&gt;
|fr=YOLOL:fr&lt;br /&gt;
|ru=YOLOL:ru&lt;br /&gt;
|ua=YOLOL:ua&lt;br /&gt;
|jp=YOLOL:jp&lt;br /&gt;
|zh-cn=YOLOL语言&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
{{#evt:service=youtube|id=https://www.youtube.com/watch?v=7lXK6_bktUk|alignment=center}}&lt;br /&gt;
&lt;br /&gt;
YOLOL is a programming language used to control and manage electrical [[Devices and machines|devices]].&amp;lt;br&amp;gt;&lt;br /&gt;
The code is written on lines in [[YOLOL Chip|YOLOL chips]] which are then inserted into [[Chip socket|chip sockets]], that read and relay their messages.&amp;lt;br&amp;gt;&lt;br /&gt;
The programming language enables the programming and controlling of almost any device within the known universe.&lt;br /&gt;
&lt;br /&gt;
== Basic information ==&lt;br /&gt;
&lt;br /&gt;
=== How it works ===&lt;br /&gt;
The code is written to and executed from programmable chips, and can be used to both monitor and control electrical [[Devices and machines|devices]] connected to a [[Data networks|data network]].&amp;lt;br&amp;gt;&lt;br /&gt;
Lines of code are executed in sequence from top to bottom, repeating the cycle of the chip after the last line has been executed, unless the script includes programmed instructions for specific line changes or stopping the execution completely.&lt;br /&gt;
&lt;br /&gt;
To put it simply:&lt;br /&gt;
&lt;br /&gt;
# Code execution starts from line 1&lt;br /&gt;
# After reading line 1, it proceeds to the next line based on the chip's time interval&lt;br /&gt;
# The process is then repeated for the lines 2, 3, 4... etc.&lt;br /&gt;
# The chip will begin executing line 1 again after the last line has been executed (unless the last line contains a goto statement or execution has been paused)&lt;br /&gt;
&lt;br /&gt;
So blank lines still use 0.2 seconds and can be used as a brief execution delay. (lines with only a comment are effectively the same as a blank line.)&lt;br /&gt;
&lt;br /&gt;
=== Limitations ===&lt;br /&gt;
&lt;br /&gt;
* Lines take 0.2 seconds to execute.&lt;br /&gt;
* A line can contain a maximum of 70 characters (comments and spaces included).*&lt;br /&gt;
* Some functions only work on specific YOLOL chips.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;*Note that because of this some examples shown below might not work in-game.&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Command references ==&lt;br /&gt;
&lt;br /&gt;
=== Case insensitive ===&lt;br /&gt;
&lt;br /&gt;
The programming language is fully case '''insensitive'''.&amp;lt;br&amp;gt;&lt;br /&gt;
This means that the following two example scripts function identically to each other:&lt;br /&gt;
&lt;br /&gt;
 if '''ButtonState''' == 1 then '''DoorState''' = 1 end&lt;br /&gt;
&lt;br /&gt;
 IF '''buttonstate''' == 1 THEN '''doorstate''' = 1 END&lt;br /&gt;
* Both scripts set the '''doorstate''' into 1, if '''buttonstate''' value is 1.&lt;br /&gt;
* The characters in the programming language can be written in either lowercase or uppercase letters.&lt;br /&gt;
** They are still parsed as case insensitive.&lt;br /&gt;
** This way it's possible to have the code look a bit more organized.&lt;br /&gt;
&lt;br /&gt;
=== Variables ===&lt;br /&gt;
&lt;br /&gt;
* The variables in the programming language are weakly typed (don't enforce type validity), and support two data types: '''Fixed-point decimals''' (up to 0.001 precision) and '''Strings''' (up to 1024 characters long).&lt;br /&gt;
** To put it simply, the variables can either be introduced as strings or numbers, ignoring the earlier variable type if the previous type is not identical, without causing an error.&lt;br /&gt;
* Each variable is always of a single type, though it will be implicitly converted when required.&lt;br /&gt;
* The default value of an uninitialized variable is 0, and null values are not supported.&lt;br /&gt;
* True/False are numerical values of non-0 and 0.&lt;br /&gt;
** True != 0&lt;br /&gt;
** False == 0&lt;br /&gt;
&lt;br /&gt;
Assigning a value to a variable always converts the variable to the newly assigned value's type.&lt;br /&gt;
&lt;br /&gt;
'''Example:'''&lt;br /&gt;
&lt;br /&gt;
 ultimateAutopilot= 128.643&lt;br /&gt;
* This results in the variable '''ultimateAutopilot''' containing a numeric value of 128.643&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ultimateAutopilot= &amp;quot;Error prone&amp;quot;&lt;br /&gt;
* This results in the variable '''ultimateAutopilot''' to be a string variable &amp;quot;''Error prone''&amp;quot;, and numeric value of 128.643 is removed.&lt;br /&gt;
&lt;br /&gt;
==== Decimals ====&lt;br /&gt;
&lt;br /&gt;
Numeric values in the programming language are 64-bit fixed-point decimals.&amp;lt;br&amp;gt;&lt;br /&gt;
The variables hold decimal numbers up to three decimal accuracy.&amp;lt;br&amp;gt;&lt;br /&gt;
As a result, the maximum value range (even during operations) is [-9223372036854775.808, 9223372036854775.807]&lt;br /&gt;
&lt;br /&gt;
 pieVariable= 3.142&lt;br /&gt;
* The above script assigns a numeric value of 3.142 to the variable '''pieVariable'''.&lt;br /&gt;
** Supplying more precise values than the variables can store works, but doesn't affect the end result.&lt;br /&gt;
&lt;br /&gt;
 notPieVariable= 0.5772156649&lt;br /&gt;
* The above script attempts to assign a numeric value of 0.5772156649 to the variable '''notPieVariable'''.&lt;br /&gt;
* The end result however is notPieVariable == 0.577&lt;br /&gt;
** Here, the more precise values are cut, leaving only three decimals behind.&lt;br /&gt;
&lt;br /&gt;
==== Strings ====&lt;br /&gt;
&lt;br /&gt;
To specify a string literal in the programming language, the desired string value must be surrounded with double quotation marks.&lt;br /&gt;
&lt;br /&gt;
 badRobots= &amp;quot;saltberia&amp;quot; &lt;br /&gt;
* This script assigns the string value of &amp;quot;''saltberia''&amp;quot; to the variable '''badRobots'''.&lt;br /&gt;
&lt;br /&gt;
==== Device fields / External variables ====&lt;br /&gt;
&lt;br /&gt;
External variables and device fields can be used in the programming language with the following syntax:&amp;lt;br&amp;gt;&lt;br /&gt;
* ''':variableName'''&lt;br /&gt;
**'''variableName''' being the configured device field id.&lt;br /&gt;
A colon prefix  ''':'''  is used to tell the script that an external variable is being accessed, instead of using one that may or may not be declared or used in the script.&amp;lt;br&amp;gt;&lt;br /&gt;
A programmable [[YOLOL Chip|chip]] that is connected to a [[Devices and machines|device]] has access to all the devices in the same [[Data networks|network]].&amp;lt;br&amp;gt;&lt;br /&gt;
It can then modify and listen to any device fields it has access to.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 if ''':ButtonState''' == 1 then ''':DoorState''' = 1 end&lt;br /&gt;
* The script above will send the value of 1 to any devices listening to the device field '''DoorState''' if the value of '''ButtonState''' is 1 in the data network.&lt;br /&gt;
&lt;br /&gt;
==== Naming Limitations ====&lt;br /&gt;
Currently variables containing keywords such as '''if''' or '''end''' can be parsed incorrectly, and must be avoided.&lt;br /&gt;
&lt;br /&gt;
== Operators and commands ==&lt;br /&gt;
&lt;br /&gt;
Note that the available operators may be limited by the type of the programmable [[YOLOL Chip|chip]].&amp;lt;br&amp;gt;&lt;br /&gt;
Basic chips have a limited selection of functions while more advanced ones can perform more complex operations natively.&lt;br /&gt;
&lt;br /&gt;
=== Basic arithmetic and assignment operators ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation || Numeric operation || String operation || Chip availability&lt;br /&gt;
|-&lt;br /&gt;
| A + B || Addition || String A is appended by String B. || All&lt;br /&gt;
|-&lt;br /&gt;
| A - B || Subtraction || The last appearance of String B in String A is removed from String A. || All&lt;br /&gt;
|-&lt;br /&gt;
| A * B || Multiplication || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A / B || Division || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A ++ || PostIncrement (A=A+1) || Appends a space to String A. Evaluates to the original value. || All&lt;br /&gt;
|-&lt;br /&gt;
| A -- || PostDecrement (A=A-1) || Removes the last character of the string. Results in runtime error when trying to remove &amp;quot;&amp;quot;. Evaluates to the original value. || All&lt;br /&gt;
|-&lt;br /&gt;
| ++ A  || PreIncrement (A=A+1) || Appends a space to String A. Evaluates to the modified value. || All&lt;br /&gt;
|-&lt;br /&gt;
| -- A || PreDecrement (A=A-1) || Removes the last character of the string. Results in runtime error when trying to remove &amp;quot;&amp;quot;. Evaluates to the modified value. || All&lt;br /&gt;
|-&lt;br /&gt;
| A = B || Assignment (Variable A is set to the value of variable B) || Assignment || All&lt;br /&gt;
|-&lt;br /&gt;
| A += B || Addition-assignment (A=A+B) || A is assigned the value of string-operation A+B || All&lt;br /&gt;
|-&lt;br /&gt;
| A -= B || Subtraction-assignment (A=A-B) || A is assigned the value of string-operation A-B || All&lt;br /&gt;
|-&lt;br /&gt;
| A *= B || Multiplication-assignment (A=A*B) || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A /= B || Division-assignment (A=A/B) || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A ^= B || Exponentiation-assignment (A=A^B) || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A %= B || Modulo-assignment (A=A%B) || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A ^ B || Exponentiation || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A % B || Modulo || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| ABS A || Modulus (absol value) (A=A if A&amp;gt;=0, else A=-A) || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A! || Factorial || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| SQRT A || Square root of A || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| SIN A || Sine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| COS A || Cosine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| TAN A || Tangent of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| ASIN A || Inverse sine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| ACOS A || Inverse cosine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| ATAN A || Inverse tangent of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Logical operators ===&lt;br /&gt;
&lt;br /&gt;
Logical operators are checks that identify if the statement is true or false.&amp;lt;br&amp;gt;&lt;br /&gt;
All logical operations return either '''&amp;quot;0 for False&amp;quot;''' or '''&amp;quot;1 for True&amp;quot;'''. &lt;br /&gt;
The '''NOT''', '''AND''', and '''OR''' keywords consider 0 to be falsy and anything not 0 to be truthy.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation || Numeric operation || String operation || Chip availability&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;lt; B || Less than || returns 1 if String A is first in alphabetical order, returns 0 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;gt; B || Greater than || returns 0 if String A is first in alphabetical order, returns 1 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;lt;= B ||Less than or equal to || returns 1 if String A is first in alphabetical order or identical to String B, returns 0 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;gt;= B || Greater than or equal to || returns 0 if String A is first in alphabetical order or identical to String B, returns 1 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A != B || Not equal to || returns 1 if String A is not equal to String B, 0 if it is. || All&lt;br /&gt;
|-&lt;br /&gt;
| A == B || Equal to || returns 1 if String A is equal to String B, 0 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| NOT A || Not || Returns 1 if A is 0, otherwise returns 0. || All&lt;br /&gt;
|-&lt;br /&gt;
| A AND B || And || Returns 1 if neither A nor B are 0, otherwise returns 0. || All&lt;br /&gt;
|-&lt;br /&gt;
| A OR B || Or || Returns 1 if either A or B is not 0, otherwise returns 0. || All&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Mixing variable types in operations ===&lt;br /&gt;
&lt;br /&gt;
Mixing variable types in an operation handles the operation using all parameters as ''strings''.&lt;br /&gt;
&lt;br /&gt;
 previouslyNumber= &amp;quot;10&amp;quot; + 15&lt;br /&gt;
* The above script results in '''previouslyNumber''' containing the string value &amp;quot;1015&amp;quot;.&lt;br /&gt;
** Note that the involved parameters themselves don't change types, their values are just cast as strings for the purpose of the operation:&lt;br /&gt;
 &lt;br /&gt;
 purelyNumber = 15&lt;br /&gt;
 purelyString = &amp;quot;10&amp;quot; + purelyNumber&lt;br /&gt;
* When this script has executed, '''purelyString''' contains the string value of &amp;quot;1015&amp;quot;, while '''purelyNumber''' still contains the numeric value of 15.&lt;br /&gt;
&lt;br /&gt;
=== Goto ===&lt;br /&gt;
&lt;br /&gt;
Goto syntax is used when the normal script reading order from 1-&amp;gt;20 is not desired, or needs to be altered.&lt;br /&gt;
&lt;br /&gt;
Goto is used with the following syntax:&lt;br /&gt;
*'''goto lineNumber'''&lt;br /&gt;
** lineNumber is the line which this command will take the script execution.&amp;lt;br&amp;gt;&lt;br /&gt;
** Any remaining script that is on the same line after the goto-command will not be executed.&lt;br /&gt;
*** using if statements before goto ignores goto syntax, assuming the if-statement is false&lt;br /&gt;
** Multiple goto commands can be added on the same line using conditionals, as '''False''' goto commands are skipped.&lt;br /&gt;
** Numeric values outside the [1,20] range are clamped to this range.&lt;br /&gt;
** Non-integer values are floored.&lt;br /&gt;
** String values will result in a Runtime Error.&lt;br /&gt;
&lt;br /&gt;
 if variable == 5 then '''goto 4''' end '''goto 6'''&lt;br /&gt;
&lt;br /&gt;
The script above will go to line number 4, if '''variable''' has a value of 5.&amp;lt;br&amp;gt;&lt;br /&gt;
Otherwise it will go to line number 6. Numerical operations can also be done &amp;quot;inside&amp;quot; the goto, e.g. &lt;br /&gt;
&lt;br /&gt;
  goto 4+1&lt;br /&gt;
&lt;br /&gt;
=== If-else conditional ===&lt;br /&gt;
&lt;br /&gt;
If-else statements are used to branch out the script into different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
They use the following syntax:&lt;br /&gt;
* '''if ''condition'' then ''statement'' else ''statement'' end'''&lt;br /&gt;
** Condition is a statement that results in a numeric value (where 0 is parsed as False, anything else as True), and statements are pieces of script that are run.&lt;br /&gt;
** All If-else conditional stations must have '''end''' syntax written after statement is complete.&lt;br /&gt;
** The statement has to be on one line. The if, then, else and end cannot be on different lines.&lt;br /&gt;
&lt;br /&gt;
If can be used to branch script execution into two possible outcomes temporarily based on variable value(s).&amp;lt;br&amp;gt;&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable != 2 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 3 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; endResult = 4 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* This script sets the value of '''endResult''' to 3 if '''variable''' does not have the value of 2.&lt;br /&gt;
* If '''variable''''s value is 2, '''endResult''' is set to the value of 4.&lt;br /&gt;
&lt;br /&gt;
Note that the else statement -part can be left out if not needed. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable != 2 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 3 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
*This script only sets the value of 3 to '''endResult''' if '''variable''' does not have a value of 2, and doesn't do anything else.&lt;br /&gt;
&lt;br /&gt;
==== Nesting if statements ====&lt;br /&gt;
&lt;br /&gt;
It is possible to place if-conditionals inside the true/false statement blocks to achieve further branching of execution.&amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 0 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 1 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 1 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 2 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &lt;br /&gt;
* This script sets '''endResult''' to 1 if '''variable''' equals 0.&lt;br /&gt;
* If '''variable''' doesn't equal 0, but it equals 1, '''endResult''' is set to 2.&lt;br /&gt;
&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 0 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; endResult == 1 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 2 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; endResult = 1 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
* This script sets '''endResult''' to 2 if '''variable''' has a value of 0, and '''endResult''' equals to 1.&lt;br /&gt;
* Otherwise it sets '''endResult''' to 1.&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
Comments are useful when writing code that is used by a lot of programmers.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that comments also use up space from the pre-determined 70 character line limit and are not excluded from it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commenting is used with the following syntax:&lt;br /&gt;
*// '''text'''&lt;br /&gt;
** Text can be any single-line set of characters.&lt;br /&gt;
&lt;br /&gt;
 '''//''' This is a comment. It will explain how other lines of script work.&lt;br /&gt;
* An example of a possible comment syntax&lt;br /&gt;
&lt;br /&gt;
== Order of Operations ==&lt;br /&gt;
&lt;br /&gt;
Operations are conducted in the following order, when operators have the same precidence, left to right.&amp;lt;br&amp;gt;&lt;br /&gt;
Where a line has multiple statements, they are executed left to right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operators &lt;br /&gt;
! Comments&lt;br /&gt;
|-&lt;br /&gt;
| ++ --&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;!&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| operators &lt;br /&gt;
| sqrt, abs, sin etc.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| negate&lt;br /&gt;
|-&lt;br /&gt;
| ^&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| */&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt; &amp;gt; == != &amp;lt;= &amp;gt;=&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Surprise!&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;+-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| not (logical negation)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| or&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| and&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
&lt;br /&gt;
There are two types of errors that can happen with the programming language.&lt;br /&gt;
# Syntax errors&lt;br /&gt;
# Runtime errors&lt;br /&gt;
&lt;br /&gt;
* Syntax errors come from invalid and unparseable script and will result in the whole line not being executed.&lt;br /&gt;
* Runtime errors are only catchable while the script is being executed. They result in the execution of the line being interrupted, but any effects until the error will remain.&lt;br /&gt;
&lt;br /&gt;
== Known Bugs/Unintended Behavior ==&lt;br /&gt;
This is a list of known problems regarding yolol:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* variablenames including keywords like &amp;quot;if&amp;quot; in them will parse with the keyword in mind, resulting in a syntax error. Example: :life would be parsed as :l if e&lt;br /&gt;
&lt;br /&gt;
==YOLOL Tips &amp;amp; Tricks==&lt;br /&gt;
* [[Common YOLOL|Common YOLOL scripts]]&lt;br /&gt;
* [[YOLOL Tricks]]&lt;br /&gt;
&lt;br /&gt;
== Related Pages ==&lt;br /&gt;
* [[Data networks]]&lt;br /&gt;
* [[Devices and machines]]&lt;br /&gt;
* [[Device fields]]&lt;br /&gt;
* [[Universal tool|Universal tool]]&lt;br /&gt;
* [[YOLOL Chip]]&lt;br /&gt;
* [[Memory chip]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Networks|YOLOL]]&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=YOLOL/fr&amp;diff=30485</id>
		<title>YOLOL/fr</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=YOLOL/fr&amp;diff=30485"/>
		<updated>2022-04-07T15:16:05Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: /* Les Noms de Variables */  removing &amp;quot;contraintes&amp;quot; section to avoid redundancy&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Otherlang2&lt;br /&gt;
|en=YOLOL&lt;br /&gt;
|de=YOLOL:de&lt;br /&gt;
|fr=YOLOL:fr&lt;br /&gt;
|ru=YOLOL:ru&lt;br /&gt;
|ua=YOLOL:ua&lt;br /&gt;
|jp=YOLOL:jp&lt;br /&gt;
|zh-cn=YOLOL语言&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
{{#evt:service=youtube|id=https://www.youtube.com/watch?v=7lXK6_bktUk|alignment=center}}&lt;br /&gt;
&lt;br /&gt;
le YOLOL est un langage de programmation spécifique à Starbase qui est utilisé pour contrôler et gérer les [[Devices_and_machines/fr|équipements]].&amp;lt;br&amp;gt;&lt;br /&gt;
Le code est écrit ligne par ligne sur une [[YOLOL Chip/fr|puce YOLOL]] qui est ensuite insérée dans un [[Chip socket/fr|socle à puce]] connecté au [[Data networks/fr|réseau de données]] du vaisseau afin d'accéder aux [[Device fields/fr|champs de périphérique]].&amp;lt;br&amp;gt;&lt;br /&gt;
Le langage YOLOL est compatible avec presque tous les équipements et engins de l'univers connu.&lt;br /&gt;
&lt;br /&gt;
===Comment ça marche?===&lt;br /&gt;
Le YOLOL fonctionne par cycle: Les lignes de code sont exécutées les unes après les autres du haut vers le bas, puis la séquence reprend une fois la dernière ligne passée. Chaque ligne est lue dans un intervalle de temps constant de 0.2 secondes, quelque soit sa longueur et le nombre d'instructions qui y sont contenues.&lt;br /&gt;
&lt;br /&gt;
Pour faire simple:&lt;br /&gt;
# Le code se lance en commençant par la ligne 1&lt;br /&gt;
# La ligne en cours est exécutée, puis le programme passe à la suivante après un intervalle de temps de 0.2 secondes&lt;br /&gt;
# L'étape 2 est répétée pour les lignes 2, 3, 4... jusqu'à la dernière&lt;br /&gt;
# La puce se réinitialise à l'étape 1 une fois le processus terminé&lt;br /&gt;
&lt;br /&gt;
===Limites===&lt;br /&gt;
* Chaque puce YOLOL contient 20 lignes de code. Ni plus, ni moins. L'exécution d'un cycle complet prend donc 20 * 0.2 = 4 secondes si il est mené à son terme.&lt;br /&gt;
* Chaque lignes peut contenir un maximum de 70 caractères (symboles et espaces inclus).&lt;br /&gt;
&lt;br /&gt;
===Remarques===&lt;br /&gt;
* Les puces YOLOL possèdent une fonction de mise en pause, qui fige l'exécution du code à la ligne en cours.&lt;br /&gt;
* Les lignes blanches nécessitent tout de même l'intervalle de temps des 0.2 secondes pour être passées, provoquant de courts délais d'exécution (il en va de même pour les lignes ne contenant que des commentaires).&lt;br /&gt;
* Une seule ligne de code peut contenir plusieurs instructions à la fois, autant que peut le supporter la limite maximale de caractères.&lt;br /&gt;
* Certaines instructions permettent de passer à une ligne spécifique, ce qui rend le code plus modulable.&lt;br /&gt;
&lt;br /&gt;
== Les Variables ==&lt;br /&gt;
Les variables permettent d'associer un '''nom''' à une '''valeur''' pour faciliter l'acquisition ultérieure de cette dernière. Dès lors, à chaque fois que le '''nom''' de la variable sera appelé, c'est sa '''valeur''' qui sera demandée et/ou modifiée suivant l'instruction utilisée.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 ButtonState = 1&lt;br /&gt;
* Dans ce script, on attribue à la variable nommée '''ButtonState''' la valeur numérique '''1'''.&lt;br /&gt;
 if ButtonState &amp;gt;= 1 then DoorState = 1 end&lt;br /&gt;
* Maintenant, on vérifie si la valeur de la variable '''ButtonState''' est supérieure ou égale à '''1''', auquel cas la variable '''DoorState''' se voit elle aussi associée à '''1'''.&lt;br /&gt;
&lt;br /&gt;
===Les Noms de Variables===&lt;br /&gt;
====Sensibilité à la casse====&lt;br /&gt;
Le langage YOLOL est dit &amp;quot;insensible à la casse&amp;quot;, ce qui signifie que les noms des variables peuvent contenir des majuscules et des minuscules sans différencier les deux. Ainsi '''ButtonState''' et '''buttonstate''' désignent indistinctement la même variable. C'est une fonctionnalité très pratique pour rendre le code plus lisible.&lt;br /&gt;
&lt;br /&gt;
====Les variables internes et externes====&lt;br /&gt;
Il existe deux genre de variables: les '''variables internes''' qui ne peuvent être utilisées qu'au sein de la puce YOLOL où elles ont été initiées et les '''variables externes''' qui font appel aux [[device fields/fr|champs de périphérique]] des appareils branchés sur le même [[data networks/fr|réseau de données]] pour en demander ou modifier les valeurs.&amp;lt;br&amp;gt;&lt;br /&gt;
Pour les différencier, les variables externes sont précédées d'un double-point (''':''').&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 if :ButtonState &amp;gt;= 1 then :DoorState = 1 end&lt;br /&gt;
* Comme vu précédemment, ce script évalue la valeur de '''ButtonState''' et, si elle est supérieure ou égale à '''1''', associe '''DoorState''' à '''1'''. Les deux variables seront cependant ici appelées sur l'ensemble des équipements présents sur le réseau de données, par exemple pour ouvrir une porte si un bouton est appuyé.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Remarques====&lt;br /&gt;
* Les champs ayant le même nom au sein du réseau de données sont liées et ont presque toujours la même valeur. Ainsi, une variable externe qui en modifie la valeur le fera sur tout les appareils associés.&lt;br /&gt;
* Il n'est actuellement pas possible d'appeler une variable initiée sur un puce YOLOL depuis une autre puce YOLOL.&lt;br /&gt;
&lt;br /&gt;
===Les Valeurs de Variables===&lt;br /&gt;
====Typage====&lt;br /&gt;
Le langage YOLOL supporte deux types de valeurs pour les variables: Les '''valeurs numériques''' et les '''chaînes de caractères''' (ou &amp;quot;string&amp;quot;). Cette différence est importante car en fonction du type de variable, le résultat d'une même instruction sera différente.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 Addition = 3 + 5&lt;br /&gt;
* Cette instruction conduit à additionner les deux valeurs numériques '''3''' et '''5'''. Le résultat sera donc '''8'''.&lt;br /&gt;
 Addition = &amp;quot;3&amp;quot; + &amp;quot;5&amp;quot;&lt;br /&gt;
* Cette instruction conduit à associer les chaînes de caractères '''&amp;quot;3&amp;quot;''' et '''&amp;quot;5&amp;quot;'''. Le résultat sera donc '''&amp;quot;35&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
Les variables sont dites à &amp;quot;faible typage&amp;quot;, c'est-à-dire qu'elles ne sont pas restreintes à un seul type. Elles se convertissent systématiquement aux valeurs qui leur sont assignées. Ainsi, une variable associée à une valeur numérique peut la remplacer par une chaîne de caractères et inversement sans provoquer d'erreur dans le code.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 AutoPilot = 128.643&lt;br /&gt;
* cette première instruction associe la variable '''AutoPilot''' à la valeur numérique '''128.643'''.&lt;br /&gt;
 AutoPilot= &amp;quot;Erreur détectée&amp;quot;&lt;br /&gt;
* La variable '''AutoPilot''' se convertit en s'associant à la chaîne de caractères '''&amp;quot;Erreur détectée&amp;quot;''' et la valeur numérique '''128.643''' est effacée.&lt;br /&gt;
&lt;br /&gt;
====Les valeurs numériques====&lt;br /&gt;
Les valeurs numérique dans le langage YOLOL sont des décimales à point fixe. La précision est de un millième: Jusqu'à trois nombre sous la décimale sont acceptés. Fournir une valeur plus précise fonctionne, mais n'affecte pas le résultat final.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 Pi = 3,14159265&lt;br /&gt;
* Le script ci-dessus tente d'associer la variable '''Pi''' à la valeur numérique '''3,14159265'''. Le résultat final sera cependant '''Pi = 3.141''', coupant la précision à trois nombre sous la décimale.&lt;br /&gt;
&lt;br /&gt;
La taille maximale d'une valeur numérique est de 64-bit. De ce fait, la portée maximale (même après opération) est de [-9223372036854775.808, 9223372036854775.807]. Toutes valeurs supérieures ou inférieures seront ramenées aux limites de la portée.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 StarTrek = 9999999999999999.999&lt;br /&gt;
* Ici, on tente d'associer la variable '''StarTrek''' à la valeur numérique '''9999999999999999.999'''. Celle-ci est cependant supérieure à la portée maximale et le résultat final sera '''StarTrek = 9223372036854775.807'''.&lt;br /&gt;
&lt;br /&gt;
====Les chaînes de caractères====&lt;br /&gt;
Pour signaler une chaîne de caractères au langage YOLOL, celle-ci doit être entourée de double-guillemets ('''&amp;quot; &amp;quot;''').&lt;br /&gt;
&lt;br /&gt;
 BadRobots= &amp;quot;Saltberia&amp;quot; &lt;br /&gt;
* Ce script associe la variable '''BadRobot''' à la chaîne de caractères '''&amp;quot;Saltberia&amp;quot;'''.&lt;br /&gt;
Comme pour les valeurs numériques, la taille maximale d'une chaîne de caractères est de 64-bit.&lt;br /&gt;
&lt;br /&gt;
====Remarques====&lt;br /&gt;
* Chaque variable ne peut être que d'un type à la fois, bien que celui-ci puisse être converti au besoin.&lt;br /&gt;
* Les valeurs &amp;quot;False&amp;quot; et &amp;quot;True&amp;quot; sont de type numérique: Elles correspondent respectivement à &amp;quot;0&amp;quot; et &amp;quot;non-0&amp;quot;.&lt;br /&gt;
* Une variable non définie préalablement a par défaut la valeur numérique &amp;quot;0&amp;quot;. L'absence de valeur (&amp;quot;null&amp;quot;) n'est pas reconnue.&lt;br /&gt;
&lt;br /&gt;
==Les Opérateurs==&lt;br /&gt;
&lt;br /&gt;
Note that the available operators may be limited by the type of the programmable [[YOLOL Chip|chip]].&amp;lt;br&amp;gt;&lt;br /&gt;
Basic chips have a limited selection of functions while more advanced ones can perform more complex operations natively.&lt;br /&gt;
&lt;br /&gt;
=== Basic arithmetic and assignment operators ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation || Numeric operation || String operation || Chip availability&lt;br /&gt;
|-&lt;br /&gt;
| A + B || Addition || String A is appended by String B. || All&lt;br /&gt;
|-&lt;br /&gt;
| A - B || Subtraction || The last appearance of String B in String A is removed from String A. || All&lt;br /&gt;
|-&lt;br /&gt;
| A * B || Multiplication || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A / B || Division || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A ++ || PostIncrement (A=A+1) || Appends a space to String A. Evaluates to the original value. || All&lt;br /&gt;
|-&lt;br /&gt;
| A -- || PostDecrement (A=A-1) || Removes the last character of the string. Results in runtime error when trying to remove &amp;quot;&amp;quot;. Evaluates to the original value. || All&lt;br /&gt;
|-&lt;br /&gt;
| ++ A  || PreIncrement (A=A+1) || Appends a space to String A. Evaluates to the modified value. || All&lt;br /&gt;
|-&lt;br /&gt;
| -- A || PreDecrement (A=A-1) || Removes the last character of the string. Results in runtime error when trying to remove &amp;quot;&amp;quot;. Evaluates to the modified value. || All&lt;br /&gt;
|-&lt;br /&gt;
| A = B || Assignment (Variable A is set to the value of variable B) || Assignment || All&lt;br /&gt;
|-&lt;br /&gt;
| A += B || Addition-assignment (A=A+B) || A is assigned the value of string-operation A+B || All&lt;br /&gt;
|-&lt;br /&gt;
| A -= B || Subtraction-assignment (A=A-B) || A is assigned the value of string-operation A-B || All&lt;br /&gt;
|-&lt;br /&gt;
| A *= B || Multiplication-assignment (A=A*B) || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A /= B || Division-assignment (A=A/B) || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A ^= B || Exponentiation-assignment (A=A^B) || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A %= B || Modulo-assignment (A=A%B) || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A ^ B || Exponentiation || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A % B || Modulo || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| ABS A || Modulus (absol value) (A=A if A&amp;gt;=0, else A=-A) || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A! || Factorial || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| SQRT A || Square root of A || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| SIN A || Sine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| COS A || Cosine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| TAN A || Tangent of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| ASIN A || Inverse sine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| ACOS A || Inverse cosine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| ATAN A || Inverse tangent of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Logical operators ===&lt;br /&gt;
&lt;br /&gt;
Logical operators are checks that identify if the statement is true or false.&amp;lt;br&amp;gt;&lt;br /&gt;
All logical operations return either '''&amp;quot;0 for False&amp;quot;''' or '''&amp;quot;1 for True&amp;quot;'''. &lt;br /&gt;
The '''NOT''', '''AND''', and '''OR''' keywords consider 0 to be falsy and anything not 0 to be truthy.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation || Numeric operation || String operation || Chip availability&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;lt; B || Less than || returns 1 if String A is first in alphabetical order, returns 0 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;gt; B || Greater than || returns 0 if String A is first in alphabetical order, returns 1 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;lt;= B ||Less than or equal to || returns 1 if String A is first in alphabetical order or identical to String B, returns 0 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;gt;= B || Greater than or equal to || returns 0 if String A is first in alphabetical order or identical to String B, returns 1 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A != B || Not equal to || returns 1 if String A is not equal to String B, 0 if it is. || All&lt;br /&gt;
|-&lt;br /&gt;
| A == B || Equal to || returns 1 if String A is equal to String B, 0 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| NOT A || Not || Returns 1 if A is 0, otherwise returns 0. || All&lt;br /&gt;
|-&lt;br /&gt;
| A AND B || And || Returns 1 if neither A nor B are 0, otherwise returns 0. || All&lt;br /&gt;
|-&lt;br /&gt;
| A OR B || Or || Returns 1 if either A or B is not 0, otherwise returns 0. || All&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Mixing variable types in operations ===&lt;br /&gt;
&lt;br /&gt;
Mixing variable types in an operation handles the operation using all parameters as ''strings''.&lt;br /&gt;
&lt;br /&gt;
 previouslyNumber= &amp;quot;10&amp;quot; + 15&lt;br /&gt;
* The above script results in '''previouslyNumber''' containing the string value &amp;quot;1015&amp;quot;.&lt;br /&gt;
** Note that the involved parameters themselves don't change types, their values are just cast as strings for the purpose of the operation:&lt;br /&gt;
 &lt;br /&gt;
 purelyNumber = 15&lt;br /&gt;
 purelyString = &amp;quot;10&amp;quot; + purelyNumber&lt;br /&gt;
* When this script has executed, '''purelyString''' contains the string value of &amp;quot;1015&amp;quot;, while '''purelyNumber''' still contains the numeric value of 15.&lt;br /&gt;
&lt;br /&gt;
=== Order of Operations ===&lt;br /&gt;
&lt;br /&gt;
Operations are conducted in the following order, when operators have the same precidence, left to right.&amp;lt;br&amp;gt;&lt;br /&gt;
Where a line has multiple statements, they are executed left to right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operators &lt;br /&gt;
! Comments&lt;br /&gt;
|-&lt;br /&gt;
| ++ --&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;!&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| operators &lt;br /&gt;
| sqrt, abs, sin etc.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| negate&lt;br /&gt;
|-&lt;br /&gt;
| ^&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| */&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt; &amp;gt; == != &amp;lt;= &amp;gt;=&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Surprise!&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;+-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| not (logical negation)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| or&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| and&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Les Commandes==&lt;br /&gt;
&lt;br /&gt;
=== If-else conditional ===&lt;br /&gt;
&lt;br /&gt;
If-else statements are used to branch out the script into different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
They use the following syntax:&lt;br /&gt;
* '''if ''condition'' then ''statement'' else ''statement'' end'''&lt;br /&gt;
** Condition is a statement that results in a numeric value (where 0 is parsed as False, anything else as True), and statements are pieces of script that are run.&lt;br /&gt;
** All If-else conditional stations must have '''end''' syntax written after statement is complete.&lt;br /&gt;
** The statement has to be on one line. The if, then, else and end cannot be on different lines.&lt;br /&gt;
&lt;br /&gt;
If can be used to branch script execution into two possible outcomes temporarily based on variable value(s).&amp;lt;br&amp;gt;&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable != 2 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 3 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; endResult = 4 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* This script sets the value of '''endResult''' to 3 if '''variable''' does not have the value of 2.&lt;br /&gt;
* If '''variable''''s value is 2, '''endResult''' is set to the value of 4.&lt;br /&gt;
&lt;br /&gt;
Note that the else statement -part can be left out if not needed. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable != 2 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 3 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
*This script only sets the value of 3 to '''endResult''' if '''variable''' does not have a value of 2, and doesn't do anything else.&lt;br /&gt;
&lt;br /&gt;
==== Nesting if statements ====&lt;br /&gt;
&lt;br /&gt;
It is possible to place if-conditionals inside the true/false statement blocks to achieve further branching of execution.&amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 0 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 1 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 1 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 2 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &lt;br /&gt;
* This script sets '''endResult''' to 1 if '''variable''' equals 0.&lt;br /&gt;
* If '''variable''' doesn't equal 0, but it equals 1, '''endResult''' is set to 2.&lt;br /&gt;
&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 0 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; endResult == 1 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 2 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; endResult = 1 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
* This script sets '''endResult''' to 2 if '''variable''' has a value of 0, and '''endResult''' equals to 1.&lt;br /&gt;
* Otherwise it sets '''endResult''' to 1.&lt;br /&gt;
&lt;br /&gt;
=== Goto ===&lt;br /&gt;
&lt;br /&gt;
Goto syntax is used when the normal script reading order from 1-&amp;gt;20 is not desired, or needs to be altered.&lt;br /&gt;
&lt;br /&gt;
Goto is used with the following syntax:&lt;br /&gt;
*'''goto lineNumber'''&lt;br /&gt;
** lineNumber is the line which this command will take the script execution.&amp;lt;br&amp;gt;&lt;br /&gt;
** Any remaining script that is on the same line after the goto-command will not be executed.&lt;br /&gt;
*** using if statements before goto ignores goto syntax, assuming the if-statement is false&lt;br /&gt;
** Multiple goto commands can be added on the same line using conditionals, as '''False''' goto commands are skipped.&lt;br /&gt;
** Numeric values outside the [1,20] range are clamped to this range.&lt;br /&gt;
** Non-integer values are floored.&lt;br /&gt;
** String values will result in a Runtime Error.&lt;br /&gt;
&lt;br /&gt;
 if variable == 5 then '''goto 4''' end '''goto 6'''&lt;br /&gt;
&lt;br /&gt;
The script above will go to line number 4, if '''variable''' has a value of 5.&amp;lt;br&amp;gt;&lt;br /&gt;
Otherwise it will go to line number 6. Numerical operations can also be done &amp;quot;inside&amp;quot; the goto, e.g. &lt;br /&gt;
&lt;br /&gt;
  goto 4+1&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
Comments are useful when writing code that is used by a lot of programmers.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that comments also use up space from the pre-determined 70 character line limit and are not excluded from it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commenting is used with the following syntax:&lt;br /&gt;
*// '''text'''&lt;br /&gt;
** Text can be any single-line set of characters.&lt;br /&gt;
&lt;br /&gt;
 '''//''' This is a comment. It will explain how other lines of script work.&lt;br /&gt;
* An example of a possible comment syntax&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
&lt;br /&gt;
There are two types of errors that can happen with the programming language.&lt;br /&gt;
# Syntax errors&lt;br /&gt;
# Runtime errors&lt;br /&gt;
&lt;br /&gt;
* Syntax errors come from invalid and unparseable script and will result in the whole line not being executed.&lt;br /&gt;
* Runtime errors are only catchable while the script is being executed. They result in the execution of the line being interrupted, but any effects until the error will remain.&lt;br /&gt;
&lt;br /&gt;
== Known Bugs/Unintended Behavior ==&lt;br /&gt;
This is a list of known problems regarding yolol:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* variablenames including keywords like &amp;quot;if&amp;quot; in them will parse with the keyword in mind, resulting in a syntax error. Example: :life would be parsed as :l if e&lt;br /&gt;
&lt;br /&gt;
==YOLOL Tips &amp;amp; Tricks==&lt;br /&gt;
* [[Common YOLOL|Common YOLOL scripts]]&lt;br /&gt;
* [[YOLOL Tricks]]&lt;br /&gt;
&lt;br /&gt;
== Related Pages ==&lt;br /&gt;
* [[Data networks]]&lt;br /&gt;
* [[Devices and machines]]&lt;br /&gt;
* [[Device fields]]&lt;br /&gt;
* [[Universal tool|Universal tool]]&lt;br /&gt;
* [[YOLOL Chip]]&lt;br /&gt;
* [[Memory chip]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Networks|YOLOL:fr]]&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=YOLOL/fr&amp;diff=30484</id>
		<title>YOLOL/fr</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=YOLOL/fr&amp;diff=30484"/>
		<updated>2022-04-07T15:13:43Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: /* Les Variables */  adding another &amp;quot;remarques&amp;quot; section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Otherlang2&lt;br /&gt;
|en=YOLOL&lt;br /&gt;
|de=YOLOL:de&lt;br /&gt;
|fr=YOLOL:fr&lt;br /&gt;
|ru=YOLOL:ru&lt;br /&gt;
|ua=YOLOL:ua&lt;br /&gt;
|jp=YOLOL:jp&lt;br /&gt;
|zh-cn=YOLOL语言&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
{{#evt:service=youtube|id=https://www.youtube.com/watch?v=7lXK6_bktUk|alignment=center}}&lt;br /&gt;
&lt;br /&gt;
le YOLOL est un langage de programmation spécifique à Starbase qui est utilisé pour contrôler et gérer les [[Devices_and_machines/fr|équipements]].&amp;lt;br&amp;gt;&lt;br /&gt;
Le code est écrit ligne par ligne sur une [[YOLOL Chip/fr|puce YOLOL]] qui est ensuite insérée dans un [[Chip socket/fr|socle à puce]] connecté au [[Data networks/fr|réseau de données]] du vaisseau afin d'accéder aux [[Device fields/fr|champs de périphérique]].&amp;lt;br&amp;gt;&lt;br /&gt;
Le langage YOLOL est compatible avec presque tous les équipements et engins de l'univers connu.&lt;br /&gt;
&lt;br /&gt;
===Comment ça marche?===&lt;br /&gt;
Le YOLOL fonctionne par cycle: Les lignes de code sont exécutées les unes après les autres du haut vers le bas, puis la séquence reprend une fois la dernière ligne passée. Chaque ligne est lue dans un intervalle de temps constant de 0.2 secondes, quelque soit sa longueur et le nombre d'instructions qui y sont contenues.&lt;br /&gt;
&lt;br /&gt;
Pour faire simple:&lt;br /&gt;
# Le code se lance en commençant par la ligne 1&lt;br /&gt;
# La ligne en cours est exécutée, puis le programme passe à la suivante après un intervalle de temps de 0.2 secondes&lt;br /&gt;
# L'étape 2 est répétée pour les lignes 2, 3, 4... jusqu'à la dernière&lt;br /&gt;
# La puce se réinitialise à l'étape 1 une fois le processus terminé&lt;br /&gt;
&lt;br /&gt;
===Limites===&lt;br /&gt;
* Chaque puce YOLOL contient 20 lignes de code. Ni plus, ni moins. L'exécution d'un cycle complet prend donc 20 * 0.2 = 4 secondes si il est mené à son terme.&lt;br /&gt;
* Chaque lignes peut contenir un maximum de 70 caractères (symboles et espaces inclus).&lt;br /&gt;
&lt;br /&gt;
===Remarques===&lt;br /&gt;
* Les puces YOLOL possèdent une fonction de mise en pause, qui fige l'exécution du code à la ligne en cours.&lt;br /&gt;
* Les lignes blanches nécessitent tout de même l'intervalle de temps des 0.2 secondes pour être passées, provoquant de courts délais d'exécution (il en va de même pour les lignes ne contenant que des commentaires).&lt;br /&gt;
* Une seule ligne de code peut contenir plusieurs instructions à la fois, autant que peut le supporter la limite maximale de caractères.&lt;br /&gt;
* Certaines instructions permettent de passer à une ligne spécifique, ce qui rend le code plus modulable.&lt;br /&gt;
&lt;br /&gt;
== Les Variables ==&lt;br /&gt;
Les variables permettent d'associer un '''nom''' à une '''valeur''' pour faciliter l'acquisition ultérieure de cette dernière. Dès lors, à chaque fois que le '''nom''' de la variable sera appelé, c'est sa '''valeur''' qui sera demandée et/ou modifiée suivant l'instruction utilisée.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 ButtonState = 1&lt;br /&gt;
* Dans ce script, on attribue à la variable nommée '''ButtonState''' la valeur numérique '''1'''.&lt;br /&gt;
 if ButtonState &amp;gt;= 1 then DoorState = 1 end&lt;br /&gt;
* Maintenant, on vérifie si la valeur de la variable '''ButtonState''' est supérieure ou égale à '''1''', auquel cas la variable '''DoorState''' se voit elle aussi associée à '''1'''.&lt;br /&gt;
&lt;br /&gt;
===Les Noms de Variables===&lt;br /&gt;
====Sensibilité à la casse====&lt;br /&gt;
Le langage YOLOL est dit &amp;quot;insensible à la casse&amp;quot;, ce qui signifie que les noms des variables peuvent contenir des majuscules et des minuscules sans différencier les deux. Ainsi '''ButtonState''' et '''buttonstate''' désignent indistinctement la même variable. C'est une fonctionnalité très pratique pour rendre le code plus lisible.&lt;br /&gt;
&lt;br /&gt;
====Les variables internes et externes====&lt;br /&gt;
Il existe deux genre de variables: les '''variables internes''' qui ne peuvent être utilisées qu'au sein de la puce YOLOL où elles ont été initiées et les '''variables externes''' qui font appel aux [[device fields/fr|champs de périphérique]] des appareils branchés sur le même [[data networks/fr|réseau de données]] pour en demander ou modifier les valeurs.&amp;lt;br&amp;gt;&lt;br /&gt;
Pour les différencier, les variables externes sont précédées d'un double-point (''':''').&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 if :ButtonState &amp;gt;= 1 then :DoorState = 1 end&lt;br /&gt;
* Comme vu précédemment, ce script évalue la valeur de '''ButtonState''' et, si elle est supérieure ou égale à '''1''', associe '''DoorState''' à '''1'''. Les deux variables seront cependant ici appelées sur l'ensemble des équipements présents sur le réseau de données, par exemple pour ouvrir une porte si un bouton est appuyé.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Remarques====&lt;br /&gt;
* Les champs ayant le même nom au sein du réseau de données sont liées et ont presque toujours la même valeur. Ainsi, une variable externe qui en modifie la valeur le fera sur tout les appareils associés.&lt;br /&gt;
* Il n'est actuellement pas possible d'appeler une variable initiée sur un puce YOLOL depuis une autre puce YOLOL.&lt;br /&gt;
&lt;br /&gt;
====Contraintes====&lt;br /&gt;
Actuellement, les noms de variables comprenant &amp;quot;if&amp;quot; et &amp;quot;end&amp;quot; peuvent être mal interprétés par le programme et doivent être évités.&lt;br /&gt;
&lt;br /&gt;
===Les Valeurs de Variables===&lt;br /&gt;
====Typage====&lt;br /&gt;
Le langage YOLOL supporte deux types de valeurs pour les variables: Les '''valeurs numériques''' et les '''chaînes de caractères''' (ou &amp;quot;string&amp;quot;). Cette différence est importante car en fonction du type de variable, le résultat d'une même instruction sera différente.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 Addition = 3 + 5&lt;br /&gt;
* Cette instruction conduit à additionner les deux valeurs numériques '''3''' et '''5'''. Le résultat sera donc '''8'''.&lt;br /&gt;
 Addition = &amp;quot;3&amp;quot; + &amp;quot;5&amp;quot;&lt;br /&gt;
* Cette instruction conduit à associer les chaînes de caractères '''&amp;quot;3&amp;quot;''' et '''&amp;quot;5&amp;quot;'''. Le résultat sera donc '''&amp;quot;35&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
Les variables sont dites à &amp;quot;faible typage&amp;quot;, c'est-à-dire qu'elles ne sont pas restreintes à un seul type. Elles se convertissent systématiquement aux valeurs qui leur sont assignées. Ainsi, une variable associée à une valeur numérique peut la remplacer par une chaîne de caractères et inversement sans provoquer d'erreur dans le code.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 AutoPilot = 128.643&lt;br /&gt;
* cette première instruction associe la variable '''AutoPilot''' à la valeur numérique '''128.643'''.&lt;br /&gt;
 AutoPilot= &amp;quot;Erreur détectée&amp;quot;&lt;br /&gt;
* La variable '''AutoPilot''' se convertit en s'associant à la chaîne de caractères '''&amp;quot;Erreur détectée&amp;quot;''' et la valeur numérique '''128.643''' est effacée.&lt;br /&gt;
&lt;br /&gt;
====Les valeurs numériques====&lt;br /&gt;
Les valeurs numérique dans le langage YOLOL sont des décimales à point fixe. La précision est de un millième: Jusqu'à trois nombre sous la décimale sont acceptés. Fournir une valeur plus précise fonctionne, mais n'affecte pas le résultat final.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 Pi = 3,14159265&lt;br /&gt;
* Le script ci-dessus tente d'associer la variable '''Pi''' à la valeur numérique '''3,14159265'''. Le résultat final sera cependant '''Pi = 3.141''', coupant la précision à trois nombre sous la décimale.&lt;br /&gt;
&lt;br /&gt;
La taille maximale d'une valeur numérique est de 64-bit. De ce fait, la portée maximale (même après opération) est de [-9223372036854775.808, 9223372036854775.807]. Toutes valeurs supérieures ou inférieures seront ramenées aux limites de la portée.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 StarTrek = 9999999999999999.999&lt;br /&gt;
* Ici, on tente d'associer la variable '''StarTrek''' à la valeur numérique '''9999999999999999.999'''. Celle-ci est cependant supérieure à la portée maximale et le résultat final sera '''StarTrek = 9223372036854775.807'''.&lt;br /&gt;
&lt;br /&gt;
====Les chaînes de caractères====&lt;br /&gt;
Pour signaler une chaîne de caractères au langage YOLOL, celle-ci doit être entourée de double-guillemets ('''&amp;quot; &amp;quot;''').&lt;br /&gt;
&lt;br /&gt;
 BadRobots= &amp;quot;Saltberia&amp;quot; &lt;br /&gt;
* Ce script associe la variable '''BadRobot''' à la chaîne de caractères '''&amp;quot;Saltberia&amp;quot;'''.&lt;br /&gt;
Comme pour les valeurs numériques, la taille maximale d'une chaîne de caractères est de 64-bit.&lt;br /&gt;
&lt;br /&gt;
====Remarques====&lt;br /&gt;
* Chaque variable ne peut être que d'un type à la fois, bien que celui-ci puisse être converti au besoin.&lt;br /&gt;
* Les valeurs &amp;quot;False&amp;quot; et &amp;quot;True&amp;quot; sont de type numérique: Elles correspondent respectivement à &amp;quot;0&amp;quot; et &amp;quot;non-0&amp;quot;.&lt;br /&gt;
* Une variable non définie préalablement a par défaut la valeur numérique &amp;quot;0&amp;quot;. L'absence de valeur (&amp;quot;null&amp;quot;) n'est pas reconnue.&lt;br /&gt;
&lt;br /&gt;
==Les Opérateurs==&lt;br /&gt;
&lt;br /&gt;
Note that the available operators may be limited by the type of the programmable [[YOLOL Chip|chip]].&amp;lt;br&amp;gt;&lt;br /&gt;
Basic chips have a limited selection of functions while more advanced ones can perform more complex operations natively.&lt;br /&gt;
&lt;br /&gt;
=== Basic arithmetic and assignment operators ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation || Numeric operation || String operation || Chip availability&lt;br /&gt;
|-&lt;br /&gt;
| A + B || Addition || String A is appended by String B. || All&lt;br /&gt;
|-&lt;br /&gt;
| A - B || Subtraction || The last appearance of String B in String A is removed from String A. || All&lt;br /&gt;
|-&lt;br /&gt;
| A * B || Multiplication || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A / B || Division || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A ++ || PostIncrement (A=A+1) || Appends a space to String A. Evaluates to the original value. || All&lt;br /&gt;
|-&lt;br /&gt;
| A -- || PostDecrement (A=A-1) || Removes the last character of the string. Results in runtime error when trying to remove &amp;quot;&amp;quot;. Evaluates to the original value. || All&lt;br /&gt;
|-&lt;br /&gt;
| ++ A  || PreIncrement (A=A+1) || Appends a space to String A. Evaluates to the modified value. || All&lt;br /&gt;
|-&lt;br /&gt;
| -- A || PreDecrement (A=A-1) || Removes the last character of the string. Results in runtime error when trying to remove &amp;quot;&amp;quot;. Evaluates to the modified value. || All&lt;br /&gt;
|-&lt;br /&gt;
| A = B || Assignment (Variable A is set to the value of variable B) || Assignment || All&lt;br /&gt;
|-&lt;br /&gt;
| A += B || Addition-assignment (A=A+B) || A is assigned the value of string-operation A+B || All&lt;br /&gt;
|-&lt;br /&gt;
| A -= B || Subtraction-assignment (A=A-B) || A is assigned the value of string-operation A-B || All&lt;br /&gt;
|-&lt;br /&gt;
| A *= B || Multiplication-assignment (A=A*B) || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A /= B || Division-assignment (A=A/B) || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A ^= B || Exponentiation-assignment (A=A^B) || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A %= B || Modulo-assignment (A=A%B) || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A ^ B || Exponentiation || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A % B || Modulo || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| ABS A || Modulus (absol value) (A=A if A&amp;gt;=0, else A=-A) || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A! || Factorial || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| SQRT A || Square root of A || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| SIN A || Sine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| COS A || Cosine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| TAN A || Tangent of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| ASIN A || Inverse sine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| ACOS A || Inverse cosine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| ATAN A || Inverse tangent of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Logical operators ===&lt;br /&gt;
&lt;br /&gt;
Logical operators are checks that identify if the statement is true or false.&amp;lt;br&amp;gt;&lt;br /&gt;
All logical operations return either '''&amp;quot;0 for False&amp;quot;''' or '''&amp;quot;1 for True&amp;quot;'''. &lt;br /&gt;
The '''NOT''', '''AND''', and '''OR''' keywords consider 0 to be falsy and anything not 0 to be truthy.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation || Numeric operation || String operation || Chip availability&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;lt; B || Less than || returns 1 if String A is first in alphabetical order, returns 0 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;gt; B || Greater than || returns 0 if String A is first in alphabetical order, returns 1 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;lt;= B ||Less than or equal to || returns 1 if String A is first in alphabetical order or identical to String B, returns 0 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;gt;= B || Greater than or equal to || returns 0 if String A is first in alphabetical order or identical to String B, returns 1 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A != B || Not equal to || returns 1 if String A is not equal to String B, 0 if it is. || All&lt;br /&gt;
|-&lt;br /&gt;
| A == B || Equal to || returns 1 if String A is equal to String B, 0 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| NOT A || Not || Returns 1 if A is 0, otherwise returns 0. || All&lt;br /&gt;
|-&lt;br /&gt;
| A AND B || And || Returns 1 if neither A nor B are 0, otherwise returns 0. || All&lt;br /&gt;
|-&lt;br /&gt;
| A OR B || Or || Returns 1 if either A or B is not 0, otherwise returns 0. || All&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Mixing variable types in operations ===&lt;br /&gt;
&lt;br /&gt;
Mixing variable types in an operation handles the operation using all parameters as ''strings''.&lt;br /&gt;
&lt;br /&gt;
 previouslyNumber= &amp;quot;10&amp;quot; + 15&lt;br /&gt;
* The above script results in '''previouslyNumber''' containing the string value &amp;quot;1015&amp;quot;.&lt;br /&gt;
** Note that the involved parameters themselves don't change types, their values are just cast as strings for the purpose of the operation:&lt;br /&gt;
 &lt;br /&gt;
 purelyNumber = 15&lt;br /&gt;
 purelyString = &amp;quot;10&amp;quot; + purelyNumber&lt;br /&gt;
* When this script has executed, '''purelyString''' contains the string value of &amp;quot;1015&amp;quot;, while '''purelyNumber''' still contains the numeric value of 15.&lt;br /&gt;
&lt;br /&gt;
=== Order of Operations ===&lt;br /&gt;
&lt;br /&gt;
Operations are conducted in the following order, when operators have the same precidence, left to right.&amp;lt;br&amp;gt;&lt;br /&gt;
Where a line has multiple statements, they are executed left to right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operators &lt;br /&gt;
! Comments&lt;br /&gt;
|-&lt;br /&gt;
| ++ --&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;!&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| operators &lt;br /&gt;
| sqrt, abs, sin etc.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| negate&lt;br /&gt;
|-&lt;br /&gt;
| ^&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| */&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt; &amp;gt; == != &amp;lt;= &amp;gt;=&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Surprise!&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;+-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| not (logical negation)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| or&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| and&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Les Commandes==&lt;br /&gt;
&lt;br /&gt;
=== If-else conditional ===&lt;br /&gt;
&lt;br /&gt;
If-else statements are used to branch out the script into different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
They use the following syntax:&lt;br /&gt;
* '''if ''condition'' then ''statement'' else ''statement'' end'''&lt;br /&gt;
** Condition is a statement that results in a numeric value (where 0 is parsed as False, anything else as True), and statements are pieces of script that are run.&lt;br /&gt;
** All If-else conditional stations must have '''end''' syntax written after statement is complete.&lt;br /&gt;
** The statement has to be on one line. The if, then, else and end cannot be on different lines.&lt;br /&gt;
&lt;br /&gt;
If can be used to branch script execution into two possible outcomes temporarily based on variable value(s).&amp;lt;br&amp;gt;&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable != 2 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 3 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; endResult = 4 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* This script sets the value of '''endResult''' to 3 if '''variable''' does not have the value of 2.&lt;br /&gt;
* If '''variable''''s value is 2, '''endResult''' is set to the value of 4.&lt;br /&gt;
&lt;br /&gt;
Note that the else statement -part can be left out if not needed. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable != 2 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 3 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
*This script only sets the value of 3 to '''endResult''' if '''variable''' does not have a value of 2, and doesn't do anything else.&lt;br /&gt;
&lt;br /&gt;
==== Nesting if statements ====&lt;br /&gt;
&lt;br /&gt;
It is possible to place if-conditionals inside the true/false statement blocks to achieve further branching of execution.&amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 0 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 1 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 1 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 2 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &lt;br /&gt;
* This script sets '''endResult''' to 1 if '''variable''' equals 0.&lt;br /&gt;
* If '''variable''' doesn't equal 0, but it equals 1, '''endResult''' is set to 2.&lt;br /&gt;
&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 0 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; endResult == 1 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 2 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; endResult = 1 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
* This script sets '''endResult''' to 2 if '''variable''' has a value of 0, and '''endResult''' equals to 1.&lt;br /&gt;
* Otherwise it sets '''endResult''' to 1.&lt;br /&gt;
&lt;br /&gt;
=== Goto ===&lt;br /&gt;
&lt;br /&gt;
Goto syntax is used when the normal script reading order from 1-&amp;gt;20 is not desired, or needs to be altered.&lt;br /&gt;
&lt;br /&gt;
Goto is used with the following syntax:&lt;br /&gt;
*'''goto lineNumber'''&lt;br /&gt;
** lineNumber is the line which this command will take the script execution.&amp;lt;br&amp;gt;&lt;br /&gt;
** Any remaining script that is on the same line after the goto-command will not be executed.&lt;br /&gt;
*** using if statements before goto ignores goto syntax, assuming the if-statement is false&lt;br /&gt;
** Multiple goto commands can be added on the same line using conditionals, as '''False''' goto commands are skipped.&lt;br /&gt;
** Numeric values outside the [1,20] range are clamped to this range.&lt;br /&gt;
** Non-integer values are floored.&lt;br /&gt;
** String values will result in a Runtime Error.&lt;br /&gt;
&lt;br /&gt;
 if variable == 5 then '''goto 4''' end '''goto 6'''&lt;br /&gt;
&lt;br /&gt;
The script above will go to line number 4, if '''variable''' has a value of 5.&amp;lt;br&amp;gt;&lt;br /&gt;
Otherwise it will go to line number 6. Numerical operations can also be done &amp;quot;inside&amp;quot; the goto, e.g. &lt;br /&gt;
&lt;br /&gt;
  goto 4+1&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
Comments are useful when writing code that is used by a lot of programmers.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that comments also use up space from the pre-determined 70 character line limit and are not excluded from it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commenting is used with the following syntax:&lt;br /&gt;
*// '''text'''&lt;br /&gt;
** Text can be any single-line set of characters.&lt;br /&gt;
&lt;br /&gt;
 '''//''' This is a comment. It will explain how other lines of script work.&lt;br /&gt;
* An example of a possible comment syntax&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
&lt;br /&gt;
There are two types of errors that can happen with the programming language.&lt;br /&gt;
# Syntax errors&lt;br /&gt;
# Runtime errors&lt;br /&gt;
&lt;br /&gt;
* Syntax errors come from invalid and unparseable script and will result in the whole line not being executed.&lt;br /&gt;
* Runtime errors are only catchable while the script is being executed. They result in the execution of the line being interrupted, but any effects until the error will remain.&lt;br /&gt;
&lt;br /&gt;
== Known Bugs/Unintended Behavior ==&lt;br /&gt;
This is a list of known problems regarding yolol:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* variablenames including keywords like &amp;quot;if&amp;quot; in them will parse with the keyword in mind, resulting in a syntax error. Example: :life would be parsed as :l if e&lt;br /&gt;
&lt;br /&gt;
==YOLOL Tips &amp;amp; Tricks==&lt;br /&gt;
* [[Common YOLOL|Common YOLOL scripts]]&lt;br /&gt;
* [[YOLOL Tricks]]&lt;br /&gt;
&lt;br /&gt;
== Related Pages ==&lt;br /&gt;
* [[Data networks]]&lt;br /&gt;
* [[Devices and machines]]&lt;br /&gt;
* [[Device fields]]&lt;br /&gt;
* [[Universal tool|Universal tool]]&lt;br /&gt;
* [[YOLOL Chip]]&lt;br /&gt;
* [[Memory chip]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Networks|YOLOL:fr]]&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=YOLOL/fr&amp;diff=30483</id>
		<title>YOLOL/fr</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=YOLOL/fr&amp;diff=30483"/>
		<updated>2022-04-07T14:58:47Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: /* Les variables internes et externes */  correcting link error&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Otherlang2&lt;br /&gt;
|en=YOLOL&lt;br /&gt;
|de=YOLOL:de&lt;br /&gt;
|fr=YOLOL:fr&lt;br /&gt;
|ru=YOLOL:ru&lt;br /&gt;
|ua=YOLOL:ua&lt;br /&gt;
|jp=YOLOL:jp&lt;br /&gt;
|zh-cn=YOLOL语言&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
{{#evt:service=youtube|id=https://www.youtube.com/watch?v=7lXK6_bktUk|alignment=center}}&lt;br /&gt;
&lt;br /&gt;
le YOLOL est un langage de programmation spécifique à Starbase qui est utilisé pour contrôler et gérer les [[Devices_and_machines/fr|équipements]].&amp;lt;br&amp;gt;&lt;br /&gt;
Le code est écrit ligne par ligne sur une [[YOLOL Chip/fr|puce YOLOL]] qui est ensuite insérée dans un [[Chip socket/fr|socle à puce]] connecté au [[Data networks/fr|réseau de données]] du vaisseau afin d'accéder aux [[Device fields/fr|champs de périphérique]].&amp;lt;br&amp;gt;&lt;br /&gt;
Le langage YOLOL est compatible avec presque tous les équipements et engins de l'univers connu.&lt;br /&gt;
&lt;br /&gt;
===Comment ça marche?===&lt;br /&gt;
Le YOLOL fonctionne par cycle: Les lignes de code sont exécutées les unes après les autres du haut vers le bas, puis la séquence reprend une fois la dernière ligne passée. Chaque ligne est lue dans un intervalle de temps constant de 0.2 secondes, quelque soit sa longueur et le nombre d'instructions qui y sont contenues.&lt;br /&gt;
&lt;br /&gt;
Pour faire simple:&lt;br /&gt;
# Le code se lance en commençant par la ligne 1&lt;br /&gt;
# La ligne en cours est exécutée, puis le programme passe à la suivante après un intervalle de temps de 0.2 secondes&lt;br /&gt;
# L'étape 2 est répétée pour les lignes 2, 3, 4... jusqu'à la dernière&lt;br /&gt;
# La puce se réinitialise à l'étape 1 une fois le processus terminé&lt;br /&gt;
&lt;br /&gt;
===Limites===&lt;br /&gt;
* Chaque puce YOLOL contient 20 lignes de code. Ni plus, ni moins. L'exécution d'un cycle complet prend donc 20 * 0.2 = 4 secondes si il est mené à son terme.&lt;br /&gt;
* Chaque lignes peut contenir un maximum de 70 caractères (symboles et espaces inclus).&lt;br /&gt;
&lt;br /&gt;
===Remarques===&lt;br /&gt;
* Les puces YOLOL possèdent une fonction de mise en pause, qui fige l'exécution du code à la ligne en cours.&lt;br /&gt;
* Les lignes blanches nécessitent tout de même l'intervalle de temps des 0.2 secondes pour être passées, provoquant de courts délais d'exécution (il en va de même pour les lignes ne contenant que des commentaires).&lt;br /&gt;
* Une seule ligne de code peut contenir plusieurs instructions à la fois, autant que peut le supporter la limite maximale de caractères.&lt;br /&gt;
* Certaines instructions permettent de passer à une ligne spécifique, ce qui rend le code plus modulable.&lt;br /&gt;
&lt;br /&gt;
== Les Variables ==&lt;br /&gt;
Les variables permettent d'associer un '''nom''' à une '''valeur''' pour faciliter l'acquisition ultérieure de cette dernière. Dès lors, à chaque fois que le '''nom''' de la variable sera appelé, c'est sa '''valeur''' qui sera demandée et/ou modifiée suivant l'instruction utilisée.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 ButtonState = 1&lt;br /&gt;
* Dans ce script, on attribue à la variable nommée '''ButtonState''' la valeur numérique '''1'''.&lt;br /&gt;
 if ButtonState &amp;gt;= 1 then DoorState = 1 end&lt;br /&gt;
* Maintenant, on vérifie si la valeur de la variable '''ButtonState''' est supérieure ou égale à '''1''', auquel cas la variable '''DoorState''' se voit elle aussi associée à '''1'''.&lt;br /&gt;
&lt;br /&gt;
===Les Noms de Variables===&lt;br /&gt;
====Sensibilité à la casse====&lt;br /&gt;
Le langage YOLOL est dit &amp;quot;insensible à la casse&amp;quot;, ce qui signifie que les noms des variables peuvent contenir des majuscules et des minuscules sans différencier les deux. Ainsi '''ButtonState''' et '''buttonstate''' désignent indistinctement la même variable. C'est une fonctionnalité très pratique pour rendre le code plus lisible.&lt;br /&gt;
&lt;br /&gt;
====Les variables internes et externes====&lt;br /&gt;
Il existe deux genre de variables: les '''variables internes''' qui ne peuvent être utilisées qu'au sein de la puce YOLOL où elles ont été initiées et les '''variables externes''' qui font appel aux [[device fields/fr|champs de périphérique]] des appareils branchés sur le même [[data networks/fr|réseau de données]] pour en demander ou modifier les valeurs.&amp;lt;br&amp;gt;&lt;br /&gt;
Pour les différencier, les variables externes sont précédées d'un double-point (''':''').&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 if :ButtonState &amp;gt;= 1 then :DoorState = 1 end&lt;br /&gt;
* Comme vu précédemment, ce script évalue la valeur de '''ButtonState''' et, si elle est supérieure ou égale à '''1''', associe '''DoorState''' à '''1'''. Les deux variables seront cependant ici appelées sur l'ensemble des équipements présents sur le réseau de données, par exemple pour ouvrir une porte si un bouton est appuyé.&amp;lt;br&amp;gt;&lt;br /&gt;
* ''À noter: Les champs et les variables externes ayant le même nom au sein du réseau de données sont liées et ont presque toujours la même valeur. Ainsi, si plusieurs équipements possèdent un champ nommé '''DoorState''', tous seront modifiés par le script. ''&lt;br /&gt;
&lt;br /&gt;
====Contraintes====&lt;br /&gt;
Actuellement, les noms de variables comprenant &amp;quot;if&amp;quot; et &amp;quot;end&amp;quot; peuvent être mal interprétés par le programme et doivent être évités.&lt;br /&gt;
&lt;br /&gt;
===Les Valeurs de Variables===&lt;br /&gt;
====Typage====&lt;br /&gt;
Le langage YOLOL supporte deux types de valeurs pour les variables: Les '''valeurs numériques''' et les '''chaînes de caractères''' (ou &amp;quot;string&amp;quot;). Cette différence est importante car en fonction du type de variable, le résultat d'une même instruction sera différente.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 Addition = 3 + 5&lt;br /&gt;
* Cette instruction conduit à additionner les deux valeurs numériques '''3''' et '''5'''. Le résultat sera donc '''8'''.&lt;br /&gt;
 Addition = &amp;quot;3&amp;quot; + &amp;quot;5&amp;quot;&lt;br /&gt;
* Cette instruction conduit à associer les chaînes de caractères '''&amp;quot;3&amp;quot;''' et '''&amp;quot;5&amp;quot;'''. Le résultat sera donc '''&amp;quot;35&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
Les variables sont dites à &amp;quot;faible typage&amp;quot;, c'est-à-dire qu'elles ne sont pas restreintes à un seul type. Elles se convertissent systématiquement aux valeurs qui leur sont assignées. Ainsi, une variable associée à une valeur numérique peut la remplacer par une chaîne de caractères et inversement sans provoquer d'erreur dans le code.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 AutoPilot = 128.643&lt;br /&gt;
* cette première instruction associe la variable '''AutoPilot''' à la valeur numérique '''128.643'''.&lt;br /&gt;
 AutoPilot= &amp;quot;Erreur détectée&amp;quot;&lt;br /&gt;
* La variable '''AutoPilot''' se convertit en s'associant à la chaîne de caractères '''&amp;quot;Erreur détectée&amp;quot;''' et la valeur numérique '''128.643''' est effacée.&lt;br /&gt;
&lt;br /&gt;
====Les valeurs numériques====&lt;br /&gt;
Les valeurs numérique dans le langage YOLOL sont des décimales à point fixe. La précision est de un millième: Jusqu'à trois nombre sous la décimale sont acceptés. Fournir une valeur plus précise fonctionne, mais n'affecte pas le résultat final.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 Pi = 3,14159265&lt;br /&gt;
* Le script ci-dessus tente d'associer la variable '''Pi''' à la valeur numérique '''3,14159265'''. Le résultat final sera cependant '''Pi = 3.141''', coupant la précision à trois nombre sous la décimale.&lt;br /&gt;
&lt;br /&gt;
La taille maximale d'une valeur numérique est de 64-bit. De ce fait, la portée maximale (même après opération) est de [-9223372036854775.808, 9223372036854775.807]. Toutes valeurs supérieures ou inférieures seront ramenées aux limites de la portée.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 StarTrek = 9999999999999999.999&lt;br /&gt;
* Ici, on tente d'associer la variable '''StarTrek''' à la valeur numérique '''9999999999999999.999'''. Celle-ci est cependant supérieure à la portée maximale et le résultat final sera '''StarTrek = 9223372036854775.807'''.&lt;br /&gt;
&lt;br /&gt;
====Les chaînes de caractères====&lt;br /&gt;
Pour signaler une chaîne de caractères au langage YOLOL, celle-ci doit être entourée de double-guillemets ('''&amp;quot; &amp;quot;''').&lt;br /&gt;
&lt;br /&gt;
 BadRobots= &amp;quot;Saltberia&amp;quot; &lt;br /&gt;
* Ce script associe la variable '''BadRobot''' à la chaîne de caractères '''&amp;quot;Saltberia&amp;quot;'''.&lt;br /&gt;
Comme pour les valeurs numériques, la taille maximale d'une chaîne de caractères est de 64-bit.&lt;br /&gt;
&lt;br /&gt;
===Remarques===&lt;br /&gt;
* Chaque variable ne peut être que d'un type à la fois, bien que celui-ci puisse être converti au besoin.&lt;br /&gt;
* Les valeurs &amp;quot;False&amp;quot; et &amp;quot;True&amp;quot; sont de type numérique: Elles correspondent respectivement à &amp;quot;0&amp;quot; et &amp;quot;non-0&amp;quot;.&lt;br /&gt;
* Une variable non définie préalablement a par défaut la valeur numérique &amp;quot;0&amp;quot;. L'absence de valeur (&amp;quot;null&amp;quot;) n'est pas reconnue.&lt;br /&gt;
&lt;br /&gt;
==Les Opérateurs==&lt;br /&gt;
&lt;br /&gt;
Note that the available operators may be limited by the type of the programmable [[YOLOL Chip|chip]].&amp;lt;br&amp;gt;&lt;br /&gt;
Basic chips have a limited selection of functions while more advanced ones can perform more complex operations natively.&lt;br /&gt;
&lt;br /&gt;
=== Basic arithmetic and assignment operators ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation || Numeric operation || String operation || Chip availability&lt;br /&gt;
|-&lt;br /&gt;
| A + B || Addition || String A is appended by String B. || All&lt;br /&gt;
|-&lt;br /&gt;
| A - B || Subtraction || The last appearance of String B in String A is removed from String A. || All&lt;br /&gt;
|-&lt;br /&gt;
| A * B || Multiplication || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A / B || Division || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A ++ || PostIncrement (A=A+1) || Appends a space to String A. Evaluates to the original value. || All&lt;br /&gt;
|-&lt;br /&gt;
| A -- || PostDecrement (A=A-1) || Removes the last character of the string. Results in runtime error when trying to remove &amp;quot;&amp;quot;. Evaluates to the original value. || All&lt;br /&gt;
|-&lt;br /&gt;
| ++ A  || PreIncrement (A=A+1) || Appends a space to String A. Evaluates to the modified value. || All&lt;br /&gt;
|-&lt;br /&gt;
| -- A || PreDecrement (A=A-1) || Removes the last character of the string. Results in runtime error when trying to remove &amp;quot;&amp;quot;. Evaluates to the modified value. || All&lt;br /&gt;
|-&lt;br /&gt;
| A = B || Assignment (Variable A is set to the value of variable B) || Assignment || All&lt;br /&gt;
|-&lt;br /&gt;
| A += B || Addition-assignment (A=A+B) || A is assigned the value of string-operation A+B || All&lt;br /&gt;
|-&lt;br /&gt;
| A -= B || Subtraction-assignment (A=A-B) || A is assigned the value of string-operation A-B || All&lt;br /&gt;
|-&lt;br /&gt;
| A *= B || Multiplication-assignment (A=A*B) || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A /= B || Division-assignment (A=A/B) || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A ^= B || Exponentiation-assignment (A=A^B) || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A %= B || Modulo-assignment (A=A%B) || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A ^ B || Exponentiation || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A % B || Modulo || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| ABS A || Modulus (absol value) (A=A if A&amp;gt;=0, else A=-A) || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A! || Factorial || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| SQRT A || Square root of A || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| SIN A || Sine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| COS A || Cosine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| TAN A || Tangent of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| ASIN A || Inverse sine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| ACOS A || Inverse cosine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| ATAN A || Inverse tangent of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Logical operators ===&lt;br /&gt;
&lt;br /&gt;
Logical operators are checks that identify if the statement is true or false.&amp;lt;br&amp;gt;&lt;br /&gt;
All logical operations return either '''&amp;quot;0 for False&amp;quot;''' or '''&amp;quot;1 for True&amp;quot;'''. &lt;br /&gt;
The '''NOT''', '''AND''', and '''OR''' keywords consider 0 to be falsy and anything not 0 to be truthy.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation || Numeric operation || String operation || Chip availability&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;lt; B || Less than || returns 1 if String A is first in alphabetical order, returns 0 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;gt; B || Greater than || returns 0 if String A is first in alphabetical order, returns 1 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;lt;= B ||Less than or equal to || returns 1 if String A is first in alphabetical order or identical to String B, returns 0 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;gt;= B || Greater than or equal to || returns 0 if String A is first in alphabetical order or identical to String B, returns 1 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A != B || Not equal to || returns 1 if String A is not equal to String B, 0 if it is. || All&lt;br /&gt;
|-&lt;br /&gt;
| A == B || Equal to || returns 1 if String A is equal to String B, 0 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| NOT A || Not || Returns 1 if A is 0, otherwise returns 0. || All&lt;br /&gt;
|-&lt;br /&gt;
| A AND B || And || Returns 1 if neither A nor B are 0, otherwise returns 0. || All&lt;br /&gt;
|-&lt;br /&gt;
| A OR B || Or || Returns 1 if either A or B is not 0, otherwise returns 0. || All&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Mixing variable types in operations ===&lt;br /&gt;
&lt;br /&gt;
Mixing variable types in an operation handles the operation using all parameters as ''strings''.&lt;br /&gt;
&lt;br /&gt;
 previouslyNumber= &amp;quot;10&amp;quot; + 15&lt;br /&gt;
* The above script results in '''previouslyNumber''' containing the string value &amp;quot;1015&amp;quot;.&lt;br /&gt;
** Note that the involved parameters themselves don't change types, their values are just cast as strings for the purpose of the operation:&lt;br /&gt;
 &lt;br /&gt;
 purelyNumber = 15&lt;br /&gt;
 purelyString = &amp;quot;10&amp;quot; + purelyNumber&lt;br /&gt;
* When this script has executed, '''purelyString''' contains the string value of &amp;quot;1015&amp;quot;, while '''purelyNumber''' still contains the numeric value of 15.&lt;br /&gt;
&lt;br /&gt;
=== Order of Operations ===&lt;br /&gt;
&lt;br /&gt;
Operations are conducted in the following order, when operators have the same precidence, left to right.&amp;lt;br&amp;gt;&lt;br /&gt;
Where a line has multiple statements, they are executed left to right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operators &lt;br /&gt;
! Comments&lt;br /&gt;
|-&lt;br /&gt;
| ++ --&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;!&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| operators &lt;br /&gt;
| sqrt, abs, sin etc.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| negate&lt;br /&gt;
|-&lt;br /&gt;
| ^&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| */&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt; &amp;gt; == != &amp;lt;= &amp;gt;=&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Surprise!&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;+-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| not (logical negation)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| or&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| and&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Les Commandes==&lt;br /&gt;
&lt;br /&gt;
=== If-else conditional ===&lt;br /&gt;
&lt;br /&gt;
If-else statements are used to branch out the script into different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
They use the following syntax:&lt;br /&gt;
* '''if ''condition'' then ''statement'' else ''statement'' end'''&lt;br /&gt;
** Condition is a statement that results in a numeric value (where 0 is parsed as False, anything else as True), and statements are pieces of script that are run.&lt;br /&gt;
** All If-else conditional stations must have '''end''' syntax written after statement is complete.&lt;br /&gt;
** The statement has to be on one line. The if, then, else and end cannot be on different lines.&lt;br /&gt;
&lt;br /&gt;
If can be used to branch script execution into two possible outcomes temporarily based on variable value(s).&amp;lt;br&amp;gt;&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable != 2 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 3 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; endResult = 4 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* This script sets the value of '''endResult''' to 3 if '''variable''' does not have the value of 2.&lt;br /&gt;
* If '''variable''''s value is 2, '''endResult''' is set to the value of 4.&lt;br /&gt;
&lt;br /&gt;
Note that the else statement -part can be left out if not needed. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable != 2 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 3 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
*This script only sets the value of 3 to '''endResult''' if '''variable''' does not have a value of 2, and doesn't do anything else.&lt;br /&gt;
&lt;br /&gt;
==== Nesting if statements ====&lt;br /&gt;
&lt;br /&gt;
It is possible to place if-conditionals inside the true/false statement blocks to achieve further branching of execution.&amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 0 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 1 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 1 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 2 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &lt;br /&gt;
* This script sets '''endResult''' to 1 if '''variable''' equals 0.&lt;br /&gt;
* If '''variable''' doesn't equal 0, but it equals 1, '''endResult''' is set to 2.&lt;br /&gt;
&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 0 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; endResult == 1 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 2 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; endResult = 1 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
* This script sets '''endResult''' to 2 if '''variable''' has a value of 0, and '''endResult''' equals to 1.&lt;br /&gt;
* Otherwise it sets '''endResult''' to 1.&lt;br /&gt;
&lt;br /&gt;
=== Goto ===&lt;br /&gt;
&lt;br /&gt;
Goto syntax is used when the normal script reading order from 1-&amp;gt;20 is not desired, or needs to be altered.&lt;br /&gt;
&lt;br /&gt;
Goto is used with the following syntax:&lt;br /&gt;
*'''goto lineNumber'''&lt;br /&gt;
** lineNumber is the line which this command will take the script execution.&amp;lt;br&amp;gt;&lt;br /&gt;
** Any remaining script that is on the same line after the goto-command will not be executed.&lt;br /&gt;
*** using if statements before goto ignores goto syntax, assuming the if-statement is false&lt;br /&gt;
** Multiple goto commands can be added on the same line using conditionals, as '''False''' goto commands are skipped.&lt;br /&gt;
** Numeric values outside the [1,20] range are clamped to this range.&lt;br /&gt;
** Non-integer values are floored.&lt;br /&gt;
** String values will result in a Runtime Error.&lt;br /&gt;
&lt;br /&gt;
 if variable == 5 then '''goto 4''' end '''goto 6'''&lt;br /&gt;
&lt;br /&gt;
The script above will go to line number 4, if '''variable''' has a value of 5.&amp;lt;br&amp;gt;&lt;br /&gt;
Otherwise it will go to line number 6. Numerical operations can also be done &amp;quot;inside&amp;quot; the goto, e.g. &lt;br /&gt;
&lt;br /&gt;
  goto 4+1&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
Comments are useful when writing code that is used by a lot of programmers.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that comments also use up space from the pre-determined 70 character line limit and are not excluded from it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commenting is used with the following syntax:&lt;br /&gt;
*// '''text'''&lt;br /&gt;
** Text can be any single-line set of characters.&lt;br /&gt;
&lt;br /&gt;
 '''//''' This is a comment. It will explain how other lines of script work.&lt;br /&gt;
* An example of a possible comment syntax&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
&lt;br /&gt;
There are two types of errors that can happen with the programming language.&lt;br /&gt;
# Syntax errors&lt;br /&gt;
# Runtime errors&lt;br /&gt;
&lt;br /&gt;
* Syntax errors come from invalid and unparseable script and will result in the whole line not being executed.&lt;br /&gt;
* Runtime errors are only catchable while the script is being executed. They result in the execution of the line being interrupted, but any effects until the error will remain.&lt;br /&gt;
&lt;br /&gt;
== Known Bugs/Unintended Behavior ==&lt;br /&gt;
This is a list of known problems regarding yolol:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* variablenames including keywords like &amp;quot;if&amp;quot; in them will parse with the keyword in mind, resulting in a syntax error. Example: :life would be parsed as :l if e&lt;br /&gt;
&lt;br /&gt;
==YOLOL Tips &amp;amp; Tricks==&lt;br /&gt;
* [[Common YOLOL|Common YOLOL scripts]]&lt;br /&gt;
* [[YOLOL Tricks]]&lt;br /&gt;
&lt;br /&gt;
== Related Pages ==&lt;br /&gt;
* [[Data networks]]&lt;br /&gt;
* [[Devices and machines]]&lt;br /&gt;
* [[Device fields]]&lt;br /&gt;
* [[Universal tool|Universal tool]]&lt;br /&gt;
* [[YOLOL Chip]]&lt;br /&gt;
* [[Memory chip]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Networks|YOLOL:fr]]&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=YOLOL/fr&amp;diff=30482</id>
		<title>YOLOL/fr</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=YOLOL/fr&amp;diff=30482"/>
		<updated>2022-04-07T14:57:34Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: /* Les variables internes et externes */  adding a link to the device fields and data networks articles. Clearing&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Otherlang2&lt;br /&gt;
|en=YOLOL&lt;br /&gt;
|de=YOLOL:de&lt;br /&gt;
|fr=YOLOL:fr&lt;br /&gt;
|ru=YOLOL:ru&lt;br /&gt;
|ua=YOLOL:ua&lt;br /&gt;
|jp=YOLOL:jp&lt;br /&gt;
|zh-cn=YOLOL语言&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
{{#evt:service=youtube|id=https://www.youtube.com/watch?v=7lXK6_bktUk|alignment=center}}&lt;br /&gt;
&lt;br /&gt;
le YOLOL est un langage de programmation spécifique à Starbase qui est utilisé pour contrôler et gérer les [[Devices_and_machines/fr|équipements]].&amp;lt;br&amp;gt;&lt;br /&gt;
Le code est écrit ligne par ligne sur une [[YOLOL Chip/fr|puce YOLOL]] qui est ensuite insérée dans un [[Chip socket/fr|socle à puce]] connecté au [[Data networks/fr|réseau de données]] du vaisseau afin d'accéder aux [[Device fields/fr|champs de périphérique]].&amp;lt;br&amp;gt;&lt;br /&gt;
Le langage YOLOL est compatible avec presque tous les équipements et engins de l'univers connu.&lt;br /&gt;
&lt;br /&gt;
===Comment ça marche?===&lt;br /&gt;
Le YOLOL fonctionne par cycle: Les lignes de code sont exécutées les unes après les autres du haut vers le bas, puis la séquence reprend une fois la dernière ligne passée. Chaque ligne est lue dans un intervalle de temps constant de 0.2 secondes, quelque soit sa longueur et le nombre d'instructions qui y sont contenues.&lt;br /&gt;
&lt;br /&gt;
Pour faire simple:&lt;br /&gt;
# Le code se lance en commençant par la ligne 1&lt;br /&gt;
# La ligne en cours est exécutée, puis le programme passe à la suivante après un intervalle de temps de 0.2 secondes&lt;br /&gt;
# L'étape 2 est répétée pour les lignes 2, 3, 4... jusqu'à la dernière&lt;br /&gt;
# La puce se réinitialise à l'étape 1 une fois le processus terminé&lt;br /&gt;
&lt;br /&gt;
===Limites===&lt;br /&gt;
* Chaque puce YOLOL contient 20 lignes de code. Ni plus, ni moins. L'exécution d'un cycle complet prend donc 20 * 0.2 = 4 secondes si il est mené à son terme.&lt;br /&gt;
* Chaque lignes peut contenir un maximum de 70 caractères (symboles et espaces inclus).&lt;br /&gt;
&lt;br /&gt;
===Remarques===&lt;br /&gt;
* Les puces YOLOL possèdent une fonction de mise en pause, qui fige l'exécution du code à la ligne en cours.&lt;br /&gt;
* Les lignes blanches nécessitent tout de même l'intervalle de temps des 0.2 secondes pour être passées, provoquant de courts délais d'exécution (il en va de même pour les lignes ne contenant que des commentaires).&lt;br /&gt;
* Une seule ligne de code peut contenir plusieurs instructions à la fois, autant que peut le supporter la limite maximale de caractères.&lt;br /&gt;
* Certaines instructions permettent de passer à une ligne spécifique, ce qui rend le code plus modulable.&lt;br /&gt;
&lt;br /&gt;
== Les Variables ==&lt;br /&gt;
Les variables permettent d'associer un '''nom''' à une '''valeur''' pour faciliter l'acquisition ultérieure de cette dernière. Dès lors, à chaque fois que le '''nom''' de la variable sera appelé, c'est sa '''valeur''' qui sera demandée et/ou modifiée suivant l'instruction utilisée.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 ButtonState = 1&lt;br /&gt;
* Dans ce script, on attribue à la variable nommée '''ButtonState''' la valeur numérique '''1'''.&lt;br /&gt;
 if ButtonState &amp;gt;= 1 then DoorState = 1 end&lt;br /&gt;
* Maintenant, on vérifie si la valeur de la variable '''ButtonState''' est supérieure ou égale à '''1''', auquel cas la variable '''DoorState''' se voit elle aussi associée à '''1'''.&lt;br /&gt;
&lt;br /&gt;
===Les Noms de Variables===&lt;br /&gt;
====Sensibilité à la casse====&lt;br /&gt;
Le langage YOLOL est dit &amp;quot;insensible à la casse&amp;quot;, ce qui signifie que les noms des variables peuvent contenir des majuscules et des minuscules sans différencier les deux. Ainsi '''ButtonState''' et '''buttonstate''' désignent indistinctement la même variable. C'est une fonctionnalité très pratique pour rendre le code plus lisible.&lt;br /&gt;
&lt;br /&gt;
====Les variables internes et externes====&lt;br /&gt;
Il existe deux genre de variables: les '''variables internes''' qui ne peuvent être utilisées qu'au sein de la puce YOLOL où elles ont été initiées et les '''variables externes''' qui font appel aux [[device fields/fr|champs de périphérique]] des appareils branchés sur le même [[data networks|réseau de données]] pour en demander ou modifier les valeurs.&amp;lt;br&amp;gt;&lt;br /&gt;
Pour les différencier, les variables externes sont précédées d'un double-point (''':''').&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 if :ButtonState &amp;gt;= 1 then :DoorState = 1 end&lt;br /&gt;
* Comme vu précédemment, ce script évalue la valeur de '''ButtonState''' et, si elle est supérieure ou égale à '''1''', associe '''DoorState''' à '''1'''. Les deux variables seront cependant ici appelées sur l'ensemble des équipements présents sur le réseau de données, par exemple pour ouvrir une porte si un bouton est appuyé.&amp;lt;br&amp;gt;&lt;br /&gt;
* ''À noter: Les champs et les variables externes ayant le même nom au sein du réseau de données sont liées et ont presque toujours la même valeur. Ainsi, si plusieurs équipements possèdent un champ nommé '''DoorState''', tous seront modifiés par le script. ''&lt;br /&gt;
&lt;br /&gt;
====Contraintes====&lt;br /&gt;
Actuellement, les noms de variables comprenant &amp;quot;if&amp;quot; et &amp;quot;end&amp;quot; peuvent être mal interprétés par le programme et doivent être évités.&lt;br /&gt;
&lt;br /&gt;
===Les Valeurs de Variables===&lt;br /&gt;
====Typage====&lt;br /&gt;
Le langage YOLOL supporte deux types de valeurs pour les variables: Les '''valeurs numériques''' et les '''chaînes de caractères''' (ou &amp;quot;string&amp;quot;). Cette différence est importante car en fonction du type de variable, le résultat d'une même instruction sera différente.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 Addition = 3 + 5&lt;br /&gt;
* Cette instruction conduit à additionner les deux valeurs numériques '''3''' et '''5'''. Le résultat sera donc '''8'''.&lt;br /&gt;
 Addition = &amp;quot;3&amp;quot; + &amp;quot;5&amp;quot;&lt;br /&gt;
* Cette instruction conduit à associer les chaînes de caractères '''&amp;quot;3&amp;quot;''' et '''&amp;quot;5&amp;quot;'''. Le résultat sera donc '''&amp;quot;35&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
Les variables sont dites à &amp;quot;faible typage&amp;quot;, c'est-à-dire qu'elles ne sont pas restreintes à un seul type. Elles se convertissent systématiquement aux valeurs qui leur sont assignées. Ainsi, une variable associée à une valeur numérique peut la remplacer par une chaîne de caractères et inversement sans provoquer d'erreur dans le code.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 AutoPilot = 128.643&lt;br /&gt;
* cette première instruction associe la variable '''AutoPilot''' à la valeur numérique '''128.643'''.&lt;br /&gt;
 AutoPilot= &amp;quot;Erreur détectée&amp;quot;&lt;br /&gt;
* La variable '''AutoPilot''' se convertit en s'associant à la chaîne de caractères '''&amp;quot;Erreur détectée&amp;quot;''' et la valeur numérique '''128.643''' est effacée.&lt;br /&gt;
&lt;br /&gt;
====Les valeurs numériques====&lt;br /&gt;
Les valeurs numérique dans le langage YOLOL sont des décimales à point fixe. La précision est de un millième: Jusqu'à trois nombre sous la décimale sont acceptés. Fournir une valeur plus précise fonctionne, mais n'affecte pas le résultat final.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 Pi = 3,14159265&lt;br /&gt;
* Le script ci-dessus tente d'associer la variable '''Pi''' à la valeur numérique '''3,14159265'''. Le résultat final sera cependant '''Pi = 3.141''', coupant la précision à trois nombre sous la décimale.&lt;br /&gt;
&lt;br /&gt;
La taille maximale d'une valeur numérique est de 64-bit. De ce fait, la portée maximale (même après opération) est de [-9223372036854775.808, 9223372036854775.807]. Toutes valeurs supérieures ou inférieures seront ramenées aux limites de la portée.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 StarTrek = 9999999999999999.999&lt;br /&gt;
* Ici, on tente d'associer la variable '''StarTrek''' à la valeur numérique '''9999999999999999.999'''. Celle-ci est cependant supérieure à la portée maximale et le résultat final sera '''StarTrek = 9223372036854775.807'''.&lt;br /&gt;
&lt;br /&gt;
====Les chaînes de caractères====&lt;br /&gt;
Pour signaler une chaîne de caractères au langage YOLOL, celle-ci doit être entourée de double-guillemets ('''&amp;quot; &amp;quot;''').&lt;br /&gt;
&lt;br /&gt;
 BadRobots= &amp;quot;Saltberia&amp;quot; &lt;br /&gt;
* Ce script associe la variable '''BadRobot''' à la chaîne de caractères '''&amp;quot;Saltberia&amp;quot;'''.&lt;br /&gt;
Comme pour les valeurs numériques, la taille maximale d'une chaîne de caractères est de 64-bit.&lt;br /&gt;
&lt;br /&gt;
===Remarques===&lt;br /&gt;
* Chaque variable ne peut être que d'un type à la fois, bien que celui-ci puisse être converti au besoin.&lt;br /&gt;
* Les valeurs &amp;quot;False&amp;quot; et &amp;quot;True&amp;quot; sont de type numérique: Elles correspondent respectivement à &amp;quot;0&amp;quot; et &amp;quot;non-0&amp;quot;.&lt;br /&gt;
* Une variable non définie préalablement a par défaut la valeur numérique &amp;quot;0&amp;quot;. L'absence de valeur (&amp;quot;null&amp;quot;) n'est pas reconnue.&lt;br /&gt;
&lt;br /&gt;
==Les Opérateurs==&lt;br /&gt;
&lt;br /&gt;
Note that the available operators may be limited by the type of the programmable [[YOLOL Chip|chip]].&amp;lt;br&amp;gt;&lt;br /&gt;
Basic chips have a limited selection of functions while more advanced ones can perform more complex operations natively.&lt;br /&gt;
&lt;br /&gt;
=== Basic arithmetic and assignment operators ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation || Numeric operation || String operation || Chip availability&lt;br /&gt;
|-&lt;br /&gt;
| A + B || Addition || String A is appended by String B. || All&lt;br /&gt;
|-&lt;br /&gt;
| A - B || Subtraction || The last appearance of String B in String A is removed from String A. || All&lt;br /&gt;
|-&lt;br /&gt;
| A * B || Multiplication || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A / B || Division || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A ++ || PostIncrement (A=A+1) || Appends a space to String A. Evaluates to the original value. || All&lt;br /&gt;
|-&lt;br /&gt;
| A -- || PostDecrement (A=A-1) || Removes the last character of the string. Results in runtime error when trying to remove &amp;quot;&amp;quot;. Evaluates to the original value. || All&lt;br /&gt;
|-&lt;br /&gt;
| ++ A  || PreIncrement (A=A+1) || Appends a space to String A. Evaluates to the modified value. || All&lt;br /&gt;
|-&lt;br /&gt;
| -- A || PreDecrement (A=A-1) || Removes the last character of the string. Results in runtime error when trying to remove &amp;quot;&amp;quot;. Evaluates to the modified value. || All&lt;br /&gt;
|-&lt;br /&gt;
| A = B || Assignment (Variable A is set to the value of variable B) || Assignment || All&lt;br /&gt;
|-&lt;br /&gt;
| A += B || Addition-assignment (A=A+B) || A is assigned the value of string-operation A+B || All&lt;br /&gt;
|-&lt;br /&gt;
| A -= B || Subtraction-assignment (A=A-B) || A is assigned the value of string-operation A-B || All&lt;br /&gt;
|-&lt;br /&gt;
| A *= B || Multiplication-assignment (A=A*B) || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A /= B || Division-assignment (A=A/B) || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A ^= B || Exponentiation-assignment (A=A^B) || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A %= B || Modulo-assignment (A=A%B) || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A ^ B || Exponentiation || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A % B || Modulo || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| ABS A || Modulus (absol value) (A=A if A&amp;gt;=0, else A=-A) || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A! || Factorial || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| SQRT A || Square root of A || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| SIN A || Sine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| COS A || Cosine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| TAN A || Tangent of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| ASIN A || Inverse sine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| ACOS A || Inverse cosine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| ATAN A || Inverse tangent of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Logical operators ===&lt;br /&gt;
&lt;br /&gt;
Logical operators are checks that identify if the statement is true or false.&amp;lt;br&amp;gt;&lt;br /&gt;
All logical operations return either '''&amp;quot;0 for False&amp;quot;''' or '''&amp;quot;1 for True&amp;quot;'''. &lt;br /&gt;
The '''NOT''', '''AND''', and '''OR''' keywords consider 0 to be falsy and anything not 0 to be truthy.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation || Numeric operation || String operation || Chip availability&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;lt; B || Less than || returns 1 if String A is first in alphabetical order, returns 0 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;gt; B || Greater than || returns 0 if String A is first in alphabetical order, returns 1 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;lt;= B ||Less than or equal to || returns 1 if String A is first in alphabetical order or identical to String B, returns 0 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;gt;= B || Greater than or equal to || returns 0 if String A is first in alphabetical order or identical to String B, returns 1 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A != B || Not equal to || returns 1 if String A is not equal to String B, 0 if it is. || All&lt;br /&gt;
|-&lt;br /&gt;
| A == B || Equal to || returns 1 if String A is equal to String B, 0 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| NOT A || Not || Returns 1 if A is 0, otherwise returns 0. || All&lt;br /&gt;
|-&lt;br /&gt;
| A AND B || And || Returns 1 if neither A nor B are 0, otherwise returns 0. || All&lt;br /&gt;
|-&lt;br /&gt;
| A OR B || Or || Returns 1 if either A or B is not 0, otherwise returns 0. || All&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Mixing variable types in operations ===&lt;br /&gt;
&lt;br /&gt;
Mixing variable types in an operation handles the operation using all parameters as ''strings''.&lt;br /&gt;
&lt;br /&gt;
 previouslyNumber= &amp;quot;10&amp;quot; + 15&lt;br /&gt;
* The above script results in '''previouslyNumber''' containing the string value &amp;quot;1015&amp;quot;.&lt;br /&gt;
** Note that the involved parameters themselves don't change types, their values are just cast as strings for the purpose of the operation:&lt;br /&gt;
 &lt;br /&gt;
 purelyNumber = 15&lt;br /&gt;
 purelyString = &amp;quot;10&amp;quot; + purelyNumber&lt;br /&gt;
* When this script has executed, '''purelyString''' contains the string value of &amp;quot;1015&amp;quot;, while '''purelyNumber''' still contains the numeric value of 15.&lt;br /&gt;
&lt;br /&gt;
=== Order of Operations ===&lt;br /&gt;
&lt;br /&gt;
Operations are conducted in the following order, when operators have the same precidence, left to right.&amp;lt;br&amp;gt;&lt;br /&gt;
Where a line has multiple statements, they are executed left to right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operators &lt;br /&gt;
! Comments&lt;br /&gt;
|-&lt;br /&gt;
| ++ --&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;!&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| operators &lt;br /&gt;
| sqrt, abs, sin etc.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| negate&lt;br /&gt;
|-&lt;br /&gt;
| ^&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| */&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt; &amp;gt; == != &amp;lt;= &amp;gt;=&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Surprise!&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;+-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| not (logical negation)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| or&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| and&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Les Commandes==&lt;br /&gt;
&lt;br /&gt;
=== If-else conditional ===&lt;br /&gt;
&lt;br /&gt;
If-else statements are used to branch out the script into different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
They use the following syntax:&lt;br /&gt;
* '''if ''condition'' then ''statement'' else ''statement'' end'''&lt;br /&gt;
** Condition is a statement that results in a numeric value (where 0 is parsed as False, anything else as True), and statements are pieces of script that are run.&lt;br /&gt;
** All If-else conditional stations must have '''end''' syntax written after statement is complete.&lt;br /&gt;
** The statement has to be on one line. The if, then, else and end cannot be on different lines.&lt;br /&gt;
&lt;br /&gt;
If can be used to branch script execution into two possible outcomes temporarily based on variable value(s).&amp;lt;br&amp;gt;&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable != 2 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 3 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; endResult = 4 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* This script sets the value of '''endResult''' to 3 if '''variable''' does not have the value of 2.&lt;br /&gt;
* If '''variable''''s value is 2, '''endResult''' is set to the value of 4.&lt;br /&gt;
&lt;br /&gt;
Note that the else statement -part can be left out if not needed. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable != 2 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 3 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
*This script only sets the value of 3 to '''endResult''' if '''variable''' does not have a value of 2, and doesn't do anything else.&lt;br /&gt;
&lt;br /&gt;
==== Nesting if statements ====&lt;br /&gt;
&lt;br /&gt;
It is possible to place if-conditionals inside the true/false statement blocks to achieve further branching of execution.&amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 0 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 1 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 1 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 2 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &lt;br /&gt;
* This script sets '''endResult''' to 1 if '''variable''' equals 0.&lt;br /&gt;
* If '''variable''' doesn't equal 0, but it equals 1, '''endResult''' is set to 2.&lt;br /&gt;
&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 0 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; endResult == 1 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 2 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; endResult = 1 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
* This script sets '''endResult''' to 2 if '''variable''' has a value of 0, and '''endResult''' equals to 1.&lt;br /&gt;
* Otherwise it sets '''endResult''' to 1.&lt;br /&gt;
&lt;br /&gt;
=== Goto ===&lt;br /&gt;
&lt;br /&gt;
Goto syntax is used when the normal script reading order from 1-&amp;gt;20 is not desired, or needs to be altered.&lt;br /&gt;
&lt;br /&gt;
Goto is used with the following syntax:&lt;br /&gt;
*'''goto lineNumber'''&lt;br /&gt;
** lineNumber is the line which this command will take the script execution.&amp;lt;br&amp;gt;&lt;br /&gt;
** Any remaining script that is on the same line after the goto-command will not be executed.&lt;br /&gt;
*** using if statements before goto ignores goto syntax, assuming the if-statement is false&lt;br /&gt;
** Multiple goto commands can be added on the same line using conditionals, as '''False''' goto commands are skipped.&lt;br /&gt;
** Numeric values outside the [1,20] range are clamped to this range.&lt;br /&gt;
** Non-integer values are floored.&lt;br /&gt;
** String values will result in a Runtime Error.&lt;br /&gt;
&lt;br /&gt;
 if variable == 5 then '''goto 4''' end '''goto 6'''&lt;br /&gt;
&lt;br /&gt;
The script above will go to line number 4, if '''variable''' has a value of 5.&amp;lt;br&amp;gt;&lt;br /&gt;
Otherwise it will go to line number 6. Numerical operations can also be done &amp;quot;inside&amp;quot; the goto, e.g. &lt;br /&gt;
&lt;br /&gt;
  goto 4+1&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
Comments are useful when writing code that is used by a lot of programmers.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that comments also use up space from the pre-determined 70 character line limit and are not excluded from it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commenting is used with the following syntax:&lt;br /&gt;
*// '''text'''&lt;br /&gt;
** Text can be any single-line set of characters.&lt;br /&gt;
&lt;br /&gt;
 '''//''' This is a comment. It will explain how other lines of script work.&lt;br /&gt;
* An example of a possible comment syntax&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
&lt;br /&gt;
There are two types of errors that can happen with the programming language.&lt;br /&gt;
# Syntax errors&lt;br /&gt;
# Runtime errors&lt;br /&gt;
&lt;br /&gt;
* Syntax errors come from invalid and unparseable script and will result in the whole line not being executed.&lt;br /&gt;
* Runtime errors are only catchable while the script is being executed. They result in the execution of the line being interrupted, but any effects until the error will remain.&lt;br /&gt;
&lt;br /&gt;
== Known Bugs/Unintended Behavior ==&lt;br /&gt;
This is a list of known problems regarding yolol:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* variablenames including keywords like &amp;quot;if&amp;quot; in them will parse with the keyword in mind, resulting in a syntax error. Example: :life would be parsed as :l if e&lt;br /&gt;
&lt;br /&gt;
==YOLOL Tips &amp;amp; Tricks==&lt;br /&gt;
* [[Common YOLOL|Common YOLOL scripts]]&lt;br /&gt;
* [[YOLOL Tricks]]&lt;br /&gt;
&lt;br /&gt;
== Related Pages ==&lt;br /&gt;
* [[Data networks]]&lt;br /&gt;
* [[Devices and machines]]&lt;br /&gt;
* [[Device fields]]&lt;br /&gt;
* [[Universal tool|Universal tool]]&lt;br /&gt;
* [[YOLOL Chip]]&lt;br /&gt;
* [[Memory chip]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Networks|YOLOL:fr]]&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=Device_fields/fr&amp;diff=30481</id>
		<title>Device fields/fr</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=Device_fields/fr&amp;diff=30481"/>
		<updated>2022-04-07T14:32:12Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: Adding a reference to the YOLOL language&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Otherlang2&lt;br /&gt;
|de=Device_fields:de&lt;br /&gt;
|en=Device_fields&lt;br /&gt;
|zh-cn=设备参数&lt;br /&gt;
}}&lt;br /&gt;
Les champs de périphérique sont des variables qui définissent le fonctionnement des [[Devices_and_machines/fr|appareils]] dont ils dépendent. Ils peuvent être lus ou modifiés en utilisant l'[[Universal tool/fr|outil universel]] ainsi que via une [[YOLOL Chip/fr|puce YOLOL]] ou tout autre appareil connectés au même [[Data_networks/fr|réseau de données]]. Les champs de périphérique sont essentiels à l'utilisation du [[YOLOL/fr|langage YOLOL]].&lt;br /&gt;
&lt;br /&gt;
= Liste des champs de périphérique =&lt;br /&gt;
== Appareils montés sur la base ==&lt;br /&gt;
&lt;br /&gt;
===[[Battery/fr|Batterie]]===&lt;br /&gt;
{{#lsth:Battery/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Cargo beam/fr|Poutre de chargement]]===&lt;br /&gt;
{{#lsth:Cargo beam/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Fixed mount/fr|Fixation fixe]]===&lt;br /&gt;
{{#lsth:Fixed mount/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Generator/fr|Générateur]]===&lt;br /&gt;
{{#lsth:Generator/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Hinges/fr|Charnières]]===&lt;br /&gt;
{{#lsth:Hinges/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Mounted weapons/fr|Armes montées]]===&lt;br /&gt;
{{#lsth:Mounted weapons/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Radio transmitters/fr|Emetteurs radio]]===&lt;br /&gt;
{{#lsth:Radio transmitters/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Range finder/fr|Télémètre]]===&lt;br /&gt;
{{#lsth:Range finder/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Robot arms/fr|Bras de robot]]===&lt;br /&gt;
{{#lsth:Robot arms/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Thrusters/fr|Propulseurs]]===&lt;br /&gt;
{{#lsth:Thrusters/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Turntable/fr|Plaque tournante]]===&lt;br /&gt;
{{#lsth:Turntable/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
== Interaction ==&lt;br /&gt;
&lt;br /&gt;
=== [[Buttons/fr|Boutons]] ===&lt;br /&gt;
{{#lsth:Buttons/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Lamps/fr|Les lampes]]===&lt;br /&gt;
{{#lsth:Lamps/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Levers/fr|Leviers]]===&lt;br /&gt;
{{#lsth:Levers/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Propellant/fr|Propergol]]===&lt;br /&gt;
{{#lsth:Propellant/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
== Dispositifs ferroviaires ==&lt;br /&gt;
&lt;br /&gt;
===[[Rail mover/fr|Déménageur]]===&lt;br /&gt;
{{#lsth:Rail mover/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Rail relay/fr|Relais]]===&lt;br /&gt;
{{#lsth:Rail relay/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Rail sensor strip/fr|Bande de capteur]]===&lt;br /&gt;
{{#lsth:Rail sensor strip/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===[[Rail trigger/fr|Déclencheur]]===&lt;br /&gt;
{{#lsth:Rail trigger/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
== Screens ==&lt;br /&gt;
&lt;br /&gt;
=== [[Information screen/fr|Écran d'information]] ===&lt;br /&gt;
{{#lsth:Information screen/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Modular displays/fr|Afficheurs modulaires]]===&lt;br /&gt;
{{#lsth:Modular displays/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
== Périphériques utilitaires ==&lt;br /&gt;
&lt;br /&gt;
===[[Cargo lock frame/fr|Cadre de verrouillage de la cargaison]]===&lt;br /&gt;
{{#lsth:Cargo lock frame/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Flight control unit/fr|Unité de contrôle de vol]]===&lt;br /&gt;
{{#lsth:Flight control unit/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Main flight computer/fr|Ordinateur de vol principal]]===&lt;br /&gt;
{{#lsth:Main flight computer/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Mining laser (Assembly)/fr|Laser minier]]===&lt;br /&gt;
{{#lsth:Mining laser/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Network relay/fr|Relais réseau]]===&lt;br /&gt;
{{#lsth:Network relay/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Tractor beam/fr|Rayon tracteur]]===&lt;br /&gt;
{{#lsth:Tractor beam/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
== Appareils YOLOL ==&lt;br /&gt;
&lt;br /&gt;
===[[YOLOL Chip/fr|Puce YOLOL]]===&lt;br /&gt;
{{#lsth:YOLOL Chip/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Chip socket/fr|Prise de puce]]===&lt;br /&gt;
{{#lsth:Chip socket/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Memory chip/fr|Puce mémoire]]===&lt;br /&gt;
{{#lsth:Memory chip/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Modular device rack/fr|Rack modulaire pour appareils]]===&lt;br /&gt;
{{#lsth:Modular device rack/fr|Champs de l'appareil}}&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=Device_fields/fr&amp;diff=30480</id>
		<title>Device fields/fr</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=Device_fields/fr&amp;diff=30480"/>
		<updated>2022-04-07T14:26:17Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: Increase understandability of the definition&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Otherlang2&lt;br /&gt;
|de=Device_fields:de&lt;br /&gt;
|en=Device_fields&lt;br /&gt;
|zh-cn=设备参数&lt;br /&gt;
}}&lt;br /&gt;
Les champs de périphérique sont des variables qui définissent le fonctionnement des [[Devices_and_machines/fr|appareils]] dont ils dépendent. Ils peuvent être lus ou modifiés en utilisant l'[[Universal tool/fr|outil universel]] ainsi que via une [[YOLOL Chip/fr|puce YOLOL]] ou tout autre appareil connectés au même [[Data_networks/fr|réseau de données]].&lt;br /&gt;
&lt;br /&gt;
= Liste des champs de périphérique =&lt;br /&gt;
== Appareils montés sur la base ==&lt;br /&gt;
&lt;br /&gt;
===[[Battery/fr|Batterie]]===&lt;br /&gt;
{{#lsth:Battery/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Cargo beam/fr|Poutre de chargement]]===&lt;br /&gt;
{{#lsth:Cargo beam/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Fixed mount/fr|Fixation fixe]]===&lt;br /&gt;
{{#lsth:Fixed mount/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Generator/fr|Générateur]]===&lt;br /&gt;
{{#lsth:Generator/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Hinges/fr|Charnières]]===&lt;br /&gt;
{{#lsth:Hinges/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Mounted weapons/fr|Armes montées]]===&lt;br /&gt;
{{#lsth:Mounted weapons/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Radio transmitters/fr|Emetteurs radio]]===&lt;br /&gt;
{{#lsth:Radio transmitters/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Range finder/fr|Télémètre]]===&lt;br /&gt;
{{#lsth:Range finder/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Robot arms/fr|Bras de robot]]===&lt;br /&gt;
{{#lsth:Robot arms/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Thrusters/fr|Propulseurs]]===&lt;br /&gt;
{{#lsth:Thrusters/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Turntable/fr|Plaque tournante]]===&lt;br /&gt;
{{#lsth:Turntable/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
== Interaction ==&lt;br /&gt;
&lt;br /&gt;
=== [[Buttons/fr|Boutons]] ===&lt;br /&gt;
{{#lsth:Buttons/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Lamps/fr|Les lampes]]===&lt;br /&gt;
{{#lsth:Lamps/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Levers/fr|Leviers]]===&lt;br /&gt;
{{#lsth:Levers/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Propellant/fr|Propergol]]===&lt;br /&gt;
{{#lsth:Propellant/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
== Dispositifs ferroviaires ==&lt;br /&gt;
&lt;br /&gt;
===[[Rail mover/fr|Déménageur]]===&lt;br /&gt;
{{#lsth:Rail mover/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Rail relay/fr|Relais]]===&lt;br /&gt;
{{#lsth:Rail relay/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Rail sensor strip/fr|Bande de capteur]]===&lt;br /&gt;
{{#lsth:Rail sensor strip/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===[[Rail trigger/fr|Déclencheur]]===&lt;br /&gt;
{{#lsth:Rail trigger/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
== Screens ==&lt;br /&gt;
&lt;br /&gt;
=== [[Information screen/fr|Écran d'information]] ===&lt;br /&gt;
{{#lsth:Information screen/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Modular displays/fr|Afficheurs modulaires]]===&lt;br /&gt;
{{#lsth:Modular displays/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
== Périphériques utilitaires ==&lt;br /&gt;
&lt;br /&gt;
===[[Cargo lock frame/fr|Cadre de verrouillage de la cargaison]]===&lt;br /&gt;
{{#lsth:Cargo lock frame/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Flight control unit/fr|Unité de contrôle de vol]]===&lt;br /&gt;
{{#lsth:Flight control unit/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Main flight computer/fr|Ordinateur de vol principal]]===&lt;br /&gt;
{{#lsth:Main flight computer/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Mining laser (Assembly)/fr|Laser minier]]===&lt;br /&gt;
{{#lsth:Mining laser/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Network relay/fr|Relais réseau]]===&lt;br /&gt;
{{#lsth:Network relay/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Tractor beam/fr|Rayon tracteur]]===&lt;br /&gt;
{{#lsth:Tractor beam/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
== Appareils YOLOL ==&lt;br /&gt;
&lt;br /&gt;
===[[YOLOL Chip/fr|Puce YOLOL]]===&lt;br /&gt;
{{#lsth:YOLOL Chip/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Chip socket/fr|Prise de puce]]===&lt;br /&gt;
{{#lsth:Chip socket/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Memory chip/fr|Puce mémoire]]===&lt;br /&gt;
{{#lsth:Memory chip/fr|Champs de l'appareil}}&lt;br /&gt;
&lt;br /&gt;
===[[Modular device rack/fr|Rack modulaire pour appareils]]===&lt;br /&gt;
{{#lsth:Modular device rack/fr|Champs de l'appareil}}&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=Common_YOLOL&amp;diff=30119</id>
		<title>Common YOLOL</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=Common_YOLOL&amp;diff=30119"/>
		<updated>2022-02-22T23:28:24Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: /* Fuel Chamber */  Adding a note regarding the &amp;quot;Generator&amp;quot; button&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A collection of small common scripts meant to be easily copied and understood for the [[YOLOL|YOLOL]] beginners.&lt;br /&gt;
&lt;br /&gt;
''This page is a &amp;quot;Work In Progress&amp;quot;. Don't hesitate to contribute! Just make sure to respect the following rules:&lt;br /&gt;
* Avoid complex codes. As said, These must be easily understood by beginners. If you can't simplify your scripts, please add some comments to explain the most technical parts.&lt;br /&gt;
* Avoid as possible to modify the [[Device fields|device fields]]. If necessary, it must be specified which field has to be renamed (left column) and/or set to a given value (right column). ''&lt;br /&gt;
&lt;br /&gt;
==[[Flight control unit|Flight Control Unit]]==&lt;br /&gt;
&lt;br /&gt;
===Single Forward/Backward Lever===&lt;br /&gt;
Requires a center lever bound to '''&amp;quot;FcuForward&amp;quot;'''. ''Note: You can easily modify the default regular lever from most prebuilt ships and cockpit modules to be used as a center Lever. Just change the '''&amp;quot;LeverMinOutput&amp;quot;''' value from 0 to -100.''&lt;br /&gt;
&lt;br /&gt;
 :FcuBackward=-:FcuForward goto1&lt;br /&gt;
&lt;br /&gt;
===Speed Limiter===&lt;br /&gt;
Requires to modify the lever bound to '''&amp;quot;FcuForward&amp;quot;''' which shall be renamed '''&amp;quot;Fwd&amp;quot;''' and another regular lever with '''&amp;quot;LeverState&amp;quot;''' renamed '''&amp;quot;Limiter&amp;quot;'''. This script allow you to set a maximum forward speed to your ship, which is useful when you need more accurate movements (e.g. while mining or docking).&lt;br /&gt;
&lt;br /&gt;
 :FcuForward=:Fwd/100*:Limiter goto1&lt;br /&gt;
&lt;br /&gt;
''Note: If you already modified your '''&amp;quot;FcuFoward&amp;quot;''' lever to be used as a '''&amp;quot;Single Forward/Backward Lever&amp;quot;''' (see above), you can use the '''&amp;quot;Backward&amp;quot;''' lever made useless as the '''&amp;quot;Limiter&amp;quot;''' lever. Just make sure you have '''&amp;quot;FcuForward&amp;quot;''' renamed '''&amp;quot;FwdBwd&amp;quot;''' instead so you can modify forward and backward thrust individually. This way your YOLOL scripts should be written as follows:''&lt;br /&gt;
&lt;br /&gt;
 :FcuForward=:FwdBwd/100*:Limiter goto1&lt;br /&gt;
&lt;br /&gt;
 :FcuBackward=-:FwdBwd goto1&lt;br /&gt;
&lt;br /&gt;
===Turtle Mode===&lt;br /&gt;
Similar to the previous script but with a button instead of a lever. '''&amp;quot;ButtonState&amp;quot;''' should be renamed '''&amp;quot;Turtle&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''. In addition set the '''&amp;quot;ButtonOffStateValue&amp;quot;''' to '''&amp;quot;100&amp;quot;''' and the '''&amp;quot;ButtonOnStateValue&amp;quot;''' to the desired speed reduction. For example having '''&amp;quot;30&amp;quot;''' means 30% of maximum speed when the button is active.&lt;br /&gt;
&lt;br /&gt;
 :FcuForward=:Fwd/100*:Turtle goto1&lt;br /&gt;
&lt;br /&gt;
==[[Fuel chamber|Fuel Chamber]]==&lt;br /&gt;
&lt;br /&gt;
The following scripts are made to be used with the ship &amp;quot;[[Laborer module|Laborer Module]]&amp;quot; rewarded during the tutorials. To make it compatible with other prebuilt or own-made ships, refer to the table below for the corresponding modifications in the [[Device fields|device fields]]. ''Note: Most scripts make the &amp;quot;Generator&amp;quot; button irrelevant as it replace its use.''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Ship Part !! Default Field Name !! Laborer Module Field Name&lt;br /&gt;
|-&lt;br /&gt;
| Hybrid Button || ButtonState || Generator&lt;br /&gt;
|-&lt;br /&gt;
| Fuel Chamber || FuelChamberUnitRateLimit || Generator&lt;br /&gt;
|-&lt;br /&gt;
| First Battery || StoredBatteryPower || Battery_1&lt;br /&gt;
|-&lt;br /&gt;
| Second Battery || StoredBatteryPower || Battery_2 &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Also, ships will require enough batteries to act as buffers during the generator spool up time. ''Note: When in use, all batteries discharge at the same rate. The more batteries you have, the slower the discharge is.''&lt;br /&gt;
&lt;br /&gt;
===Gradual Generator Script===&lt;br /&gt;
Makes the fuel rate limit of the fuel chamber inversely proportional to the charge level of the batteries.&lt;br /&gt;
&lt;br /&gt;
 :Generator=100-:Battery_1/100 goto1&lt;br /&gt;
&lt;br /&gt;
Alternatively, this script will keep the batteries fuller by setting the fuel rate limit to its maximum when batteries are below 90% of charge.&lt;br /&gt;
&lt;br /&gt;
 :Generator=1000-:Battery_1/10 goto1&lt;br /&gt;
&lt;br /&gt;
Additionally, you can add a button to switch fuel saving on and off. Useful for more power consuming activities like mining. &amp;quot;ButtonState&amp;quot; should be renamed &amp;quot;Eco&amp;quot; and &amp;quot;ButtonStyle&amp;quot; set to &amp;quot;1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 :Generator=100-:Eco*:Battery_1/100 goto1&lt;br /&gt;
&lt;br /&gt;
===Flagged Generator Script===&lt;br /&gt;
This script set the fuel rate limit to 25% (just enough to supply 2 box thrusters with a bit of spare charge) if the level of the batteries is below 9999 and adding 50% if below 5000. 0.001% is enough fuel rate to let the generator &amp;quot;sleep&amp;quot; when the ship stand still and the batteries are full.&lt;br /&gt;
&lt;br /&gt;
 :Generator=25*(:Battery_1&amp;lt;9999)+50*(:Battery_1&amp;lt;5000)+0.001 goto1&lt;br /&gt;
&lt;br /&gt;
===Advanced Generator Script===&lt;br /&gt;
This script is tweakable to your ship configuration. Field names are those of the Laborer Module, except for the '''&amp;quot;Generator&amp;quot;''' button which should be renamed '''&amp;quot;PWR&amp;quot;''' so the script can control the fuel rate while the button still being functional. Optionally you can add an override lever with '''&amp;quot;LeverState&amp;quot;''' renamed '''&amp;quot;PWR&amp;quot;''' as well.&lt;br /&gt;
&lt;br /&gt;
 MaxBattery=20000           // total capacity&lt;br /&gt;
 LowBattery=0.99*MaxBattery // start charging below 99%&lt;br /&gt;
 MinBattery=0.20*MaxBattery // max charge rate below 20%&lt;br /&gt;
 MaxGenerator=100           // max fuel rate&lt;br /&gt;
 MinGenerator=2             // min fuel rate (near 100% charge)&lt;br /&gt;
 h=MaxGenerator c=MinGenerator          // auxiliary variables,&lt;br /&gt;
 f=MaxBattery l=LowBattery e=MinBattery // no need to change these&lt;br /&gt;
 r=(h-c)/(f-e) z=h-r*l a=r*(f-l)      // reboot: remove &amp;quot;goto9&amp;quot; briefly&lt;br /&gt;
 y=:PWR-z-r*(:Battery_1+:Battery_2)+c*(y&amp;gt;c)+a*(y&amp;gt;0) :Generator=y goto9&lt;br /&gt;
&lt;br /&gt;
It is assumed that the following device fields are set as explained (''Note: The &amp;quot;PWR&amp;quot; button is already set up in the Laborer Module''):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Ship Part !! Field Name !! Set Field value&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Button || ButtonOnStateValue|| 100&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Button || ButtonOffStateValue|| 0 &lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Button || ButtonStyle || 1&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Lever (optional) || LeverMinOutput || 0 &lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Lever (optional) || LeverMaxOutput || 200 &lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Lever (optional) || LeverCenteringSpeed || 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==[[Material point scanner|Material Point Scanner]]==&lt;br /&gt;
&lt;br /&gt;
===Material Point Scanner Script===&lt;br /&gt;
Requires two displays for '''&amp;quot;Material&amp;quot;''' and '''&amp;quot;Volume&amp;quot;''', two buttons to toggle the '''&amp;quot;Active&amp;quot;''' and '''&amp;quot;Scan&amp;quot;''' fields of the scanner, and a third button with '''&amp;quot;ButtonState&amp;quot;''' renamed '''&amp;quot;Next&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
 :Index=(:Index+:Next)*(:Index&amp;lt;:ScanResults) :Next=0&lt;br /&gt;
 :Material=:Material :Volume=:Volume goto1&lt;br /&gt;
&lt;br /&gt;
===Automatic Material Point Scanner Script===&lt;br /&gt;
This is a modified version of the above script so it can be used when the scanner is '''&amp;quot;Active&amp;quot;''' without the need of any additional buttons.&lt;br /&gt;
''Note: launching a new scan reinitialize the index to '''&amp;quot;0&amp;quot;'''.''&lt;br /&gt;
&lt;br /&gt;
 :Scan=1&lt;br /&gt;
 //Pause&lt;br /&gt;
 :Index=Next&lt;br /&gt;
 Next=(Next+1)*(Next&amp;lt;:ScanResults)&lt;br /&gt;
 :Material=:Material :Volume=:Volume goto1&lt;br /&gt;
&lt;br /&gt;
==[[Mining laser|Mining Laser]]==&lt;br /&gt;
&lt;br /&gt;
===Pulsed Mining Laser===&lt;br /&gt;
Requires a button with '''&amp;quot;ButtonState&amp;quot;''' renamed '''&amp;quot;Mining&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''. Reduces power consumption by continuously switching mining laser &amp;quot;On&amp;quot; and &amp;quot;Off&amp;quot; while the button is active.&lt;br /&gt;
&lt;br /&gt;
 :MiningLaserOn=(1-:MiningLaserOn)*:Mining goto1&lt;br /&gt;
&lt;br /&gt;
===Configurable Pulsed Mining Laser===&lt;br /&gt;
Similar to the previous script but with configurable timers for the &amp;quot;On&amp;quot; and &amp;quot;Off&amp;quot; phases of the laser.&lt;br /&gt;
''Note: Each phase is calculated in a number of YOLOL &amp;quot;tick&amp;quot; (0.2sec). So in the example, the &amp;quot;On&amp;quot; phase last 2*0.2=0.4sec and the &amp;quot;Off&amp;quot; phase 3*0.2=0.6 sec, which makes the power comsumption just a bit lower than the power production of a regular generator module (= one fuel chamber and three generator units, all in tier 1).''&lt;br /&gt;
&lt;br /&gt;
 On=2 Off=3 :MiningLaserOn=(T&amp;lt;On)*:Mining T++ T*=T&amp;lt;(On+Off) goto1&lt;br /&gt;
&lt;br /&gt;
==[[Navigation receivers|Navigation Receiver]]==&lt;br /&gt;
&lt;br /&gt;
===Received Signal Display===&lt;br /&gt;
Requires a text panel with '''&amp;quot;PanelValue&amp;quot;''' renamed '''&amp;quot;Nav&amp;quot;'''. &lt;br /&gt;
&lt;br /&gt;
 if :SignalStrength&amp;gt;0 then goto2 else :Nav=&amp;quot;No Signal&amp;quot; goto1 end&lt;br /&gt;
 :Nav=:Message+&amp;quot;\n&amp;quot;+(1000000-:SignalStrength)/1000+&amp;quot;km&amp;quot; goto1&lt;br /&gt;
&lt;br /&gt;
==[[Ore collector|Ore Collector]]==&lt;br /&gt;
&lt;br /&gt;
===Mining Laser/ Ore Collector Switching===&lt;br /&gt;
Requires a button with '''&amp;quot;ButtonState&amp;quot;''' renamed '''&amp;quot;Collecting&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''. Reduces power consumption by switching ore collector &amp;quot;On&amp;quot; only if the button is active And the mining laser is &amp;quot;Off&amp;quot;. ''Note: this script works best alongside the &amp;quot;Pulsed Mining Laser&amp;quot; scripts.''&lt;br /&gt;
&lt;br /&gt;
 :ToggleOn=(1-:MiningLaserOn)*:Collecting goto1&lt;br /&gt;
&lt;br /&gt;
==[[Ship transponder|Ship Transponder]]==&lt;br /&gt;
&lt;br /&gt;
===Outside Safezone Warning===&lt;br /&gt;
Requires an active transponder and either a warning button or a safety lid button. The button blink whenever you're outside of the safe zone. ''Note: the button needs to be active in order to blink.''&lt;br /&gt;
&lt;br /&gt;
 :ButtonEnableBlink=1-:InsideSafeZone goto1&lt;br /&gt;
&lt;br /&gt;
===Stations Building Availability===&lt;br /&gt;
Same as the previous one, but the button blink wherever you're allowed to build a station.&lt;br /&gt;
&lt;br /&gt;
 :ButtonEnableBlink=:StationsAllowed goto1&lt;br /&gt;
&lt;br /&gt;
[[Category:Networks|Common YOLOL]]&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=Common_YOLOL&amp;diff=30118</id>
		<title>Common YOLOL</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=Common_YOLOL&amp;diff=30118"/>
		<updated>2022-02-22T23:04:09Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: /* Fuel Chamber */  Modifying script name to be more relevant relatively to the other scripts&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A collection of small common scripts meant to be easily copied and understood for the [[YOLOL|YOLOL]] beginners.&lt;br /&gt;
&lt;br /&gt;
''This page is a &amp;quot;Work In Progress&amp;quot;. Don't hesitate to contribute! Just make sure to respect the following rules:&lt;br /&gt;
* Avoid complex codes. As said, These must be easily understood by beginners. If you can't simplify your scripts, please add some comments to explain the most technical parts.&lt;br /&gt;
* Avoid as possible to modify the [[Device fields|device fields]]. If necessary, it must be specified which field has to be renamed (left column) and/or set to a given value (right column). ''&lt;br /&gt;
&lt;br /&gt;
==[[Flight control unit|Flight Control Unit]]==&lt;br /&gt;
&lt;br /&gt;
===Single Forward/Backward Lever===&lt;br /&gt;
Requires a center lever bound to '''&amp;quot;FcuForward&amp;quot;'''. ''Note: You can easily modify the default regular lever from most prebuilt ships and cockpit modules to be used as a center Lever. Just change the '''&amp;quot;LeverMinOutput&amp;quot;''' value from 0 to -100.''&lt;br /&gt;
&lt;br /&gt;
 :FcuBackward=-:FcuForward goto1&lt;br /&gt;
&lt;br /&gt;
===Speed Limiter===&lt;br /&gt;
Requires to modify the lever bound to '''&amp;quot;FcuForward&amp;quot;''' which shall be renamed '''&amp;quot;Fwd&amp;quot;''' and another regular lever with '''&amp;quot;LeverState&amp;quot;''' renamed '''&amp;quot;Limiter&amp;quot;'''. This script allow you to set a maximum forward speed to your ship, which is useful when you need more accurate movements (e.g. while mining or docking).&lt;br /&gt;
&lt;br /&gt;
 :FcuForward=:Fwd/100*:Limiter goto1&lt;br /&gt;
&lt;br /&gt;
''Note: If you already modified your '''&amp;quot;FcuFoward&amp;quot;''' lever to be used as a '''&amp;quot;Single Forward/Backward Lever&amp;quot;''' (see above), you can use the '''&amp;quot;Backward&amp;quot;''' lever made useless as the '''&amp;quot;Limiter&amp;quot;''' lever. Just make sure you have '''&amp;quot;FcuForward&amp;quot;''' renamed '''&amp;quot;FwdBwd&amp;quot;''' instead so you can modify forward and backward thrust individually. This way your YOLOL scripts should be written as follows:''&lt;br /&gt;
&lt;br /&gt;
 :FcuForward=:FwdBwd/100*:Limiter goto1&lt;br /&gt;
&lt;br /&gt;
 :FcuBackward=-:FwdBwd goto1&lt;br /&gt;
&lt;br /&gt;
===Turtle Mode===&lt;br /&gt;
Similar to the previous script but with a button instead of a lever. '''&amp;quot;ButtonState&amp;quot;''' should be renamed '''&amp;quot;Turtle&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''. In addition set the '''&amp;quot;ButtonOffStateValue&amp;quot;''' to '''&amp;quot;100&amp;quot;''' and the '''&amp;quot;ButtonOnStateValue&amp;quot;''' to the desired speed reduction. For example having '''&amp;quot;30&amp;quot;''' means 30% of maximum speed when the button is active.&lt;br /&gt;
&lt;br /&gt;
 :FcuForward=:Fwd/100*:Turtle goto1&lt;br /&gt;
&lt;br /&gt;
==[[Fuel chamber|Fuel Chamber]]==&lt;br /&gt;
&lt;br /&gt;
The following scripts are made to be used with the ship &amp;quot;[[Laborer module|Laborer Module]]&amp;quot; rewarded during the tutorials. To make it compatible with other prebuilt or own-made ships, refer to the table below for the corresponding modifications in the [[Device fields|device fields]]. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Ship Part !! Default Field Name !! Laborer Module Field Name&lt;br /&gt;
|-&lt;br /&gt;
| Hybrid Button || ButtonState || Generator&lt;br /&gt;
|-&lt;br /&gt;
| Fuel Chamber || FuelChamberUnitRateLimit || Generator&lt;br /&gt;
|-&lt;br /&gt;
| First Battery || StoredBatteryPower || Battery_1&lt;br /&gt;
|-&lt;br /&gt;
| Second Battery || StoredBatteryPower || Battery_2 &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Also, ships will require enough batteries to act as buffers during the generator spool up time. ''Note: When in use, all batteries discharge at the same rate. The more batteries you have, the slower the discharge is.''&lt;br /&gt;
&lt;br /&gt;
===Gradual Generator Script===&lt;br /&gt;
Makes the fuel rate limit of the fuel chamber inversely proportional to the charge level of the batteries.&lt;br /&gt;
&lt;br /&gt;
 :Generator=100-:Battery_1/100 goto1&lt;br /&gt;
&lt;br /&gt;
Alternatively, this script will keep the batteries fuller by setting the fuel rate limit to its maximum when batteries are below 90% of charge.&lt;br /&gt;
&lt;br /&gt;
 :Generator=1000-:Battery_1/10 goto1&lt;br /&gt;
&lt;br /&gt;
Additionally, you can add a button to switch fuel saving on and off. Useful for more power consuming activities like mining. &amp;quot;ButtonState&amp;quot; should be renamed &amp;quot;Eco&amp;quot; and &amp;quot;ButtonStyle&amp;quot; set to &amp;quot;1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 :Generator=100-:Eco*:Battery_1/100 goto1&lt;br /&gt;
&lt;br /&gt;
===Flagged Generator Script===&lt;br /&gt;
This script set the fuel rate limit to 25% (just enough to supply 2 box thrusters with a bit of spare charge) if the level of the batteries is below 9999 and adding 50% if below 5000. 0.001% is enough fuel rate to let the generator &amp;quot;sleep&amp;quot; when the ship stand still and the batteries are full.&lt;br /&gt;
&lt;br /&gt;
 :Generator=25*(:Battery_1&amp;lt;9999)+50*(:Battery_1&amp;lt;5000)+0.001 goto1&lt;br /&gt;
&lt;br /&gt;
===Advanced Generator Script===&lt;br /&gt;
This script is tweakable to your ship configuration. Field names are those of the Laborer Module, except for the '''&amp;quot;Generator&amp;quot;''' button which should be renamed '''&amp;quot;PWR&amp;quot;''' so the script can control the fuel rate while the button still being functional. Optionally you can add an override lever with '''&amp;quot;LeverState&amp;quot;''' renamed '''&amp;quot;PWR&amp;quot;''' as well.&lt;br /&gt;
&lt;br /&gt;
 MaxBattery=20000           // total capacity&lt;br /&gt;
 LowBattery=0.99*MaxBattery // start charging below 99%&lt;br /&gt;
 MinBattery=0.20*MaxBattery // max charge rate below 20%&lt;br /&gt;
 MaxGenerator=100           // max fuel rate&lt;br /&gt;
 MinGenerator=2             // min fuel rate (near 100% charge)&lt;br /&gt;
 h=MaxGenerator c=MinGenerator          // auxiliary variables,&lt;br /&gt;
 f=MaxBattery l=LowBattery e=MinBattery // no need to change these&lt;br /&gt;
 r=(h-c)/(f-e) z=h-r*l a=r*(f-l)      // reboot: remove &amp;quot;goto9&amp;quot; briefly&lt;br /&gt;
 y=:PWR-z-r*(:Battery_1+:Battery_2)+c*(y&amp;gt;c)+a*(y&amp;gt;0) :Generator=y goto9&lt;br /&gt;
&lt;br /&gt;
It is assumed that the following device fields are set as explained (''Note: The &amp;quot;PWR&amp;quot; button is already set up in the Laborer Module''):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Ship Part !! Field Name !! Set Field value&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Button || ButtonOnStateValue|| 100&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Button || ButtonOffStateValue|| 0 &lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Button || ButtonStyle || 1&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Lever (optional) || LeverMinOutput || 0 &lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Lever (optional) || LeverMaxOutput || 200 &lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Lever (optional) || LeverCenteringSpeed || 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==[[Material point scanner|Material Point Scanner]]==&lt;br /&gt;
&lt;br /&gt;
===Material Point Scanner Script===&lt;br /&gt;
Requires two displays for '''&amp;quot;Material&amp;quot;''' and '''&amp;quot;Volume&amp;quot;''', two buttons to toggle the '''&amp;quot;Active&amp;quot;''' and '''&amp;quot;Scan&amp;quot;''' fields of the scanner, and a third button with '''&amp;quot;ButtonState&amp;quot;''' renamed '''&amp;quot;Next&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
 :Index=(:Index+:Next)*(:Index&amp;lt;:ScanResults) :Next=0&lt;br /&gt;
 :Material=:Material :Volume=:Volume goto1&lt;br /&gt;
&lt;br /&gt;
===Automatic Material Point Scanner Script===&lt;br /&gt;
This is a modified version of the above script so it can be used when the scanner is '''&amp;quot;Active&amp;quot;''' without the need of any additional buttons.&lt;br /&gt;
''Note: launching a new scan reinitialize the index to '''&amp;quot;0&amp;quot;'''.''&lt;br /&gt;
&lt;br /&gt;
 :Scan=1&lt;br /&gt;
 //Pause&lt;br /&gt;
 :Index=Next&lt;br /&gt;
 Next=(Next+1)*(Next&amp;lt;:ScanResults)&lt;br /&gt;
 :Material=:Material :Volume=:Volume goto1&lt;br /&gt;
&lt;br /&gt;
==[[Mining laser|Mining Laser]]==&lt;br /&gt;
&lt;br /&gt;
===Pulsed Mining Laser===&lt;br /&gt;
Requires a button with '''&amp;quot;ButtonState&amp;quot;''' renamed '''&amp;quot;Mining&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''. Reduces power consumption by continuously switching mining laser &amp;quot;On&amp;quot; and &amp;quot;Off&amp;quot; while the button is active.&lt;br /&gt;
&lt;br /&gt;
 :MiningLaserOn=(1-:MiningLaserOn)*:Mining goto1&lt;br /&gt;
&lt;br /&gt;
===Configurable Pulsed Mining Laser===&lt;br /&gt;
Similar to the previous script but with configurable timers for the &amp;quot;On&amp;quot; and &amp;quot;Off&amp;quot; phases of the laser.&lt;br /&gt;
''Note: Each phase is calculated in a number of YOLOL &amp;quot;tick&amp;quot; (0.2sec). So in the example, the &amp;quot;On&amp;quot; phase last 2*0.2=0.4sec and the &amp;quot;Off&amp;quot; phase 3*0.2=0.6 sec, which makes the power comsumption just a bit lower than the power production of a regular generator module (= one fuel chamber and three generator units, all in tier 1).''&lt;br /&gt;
&lt;br /&gt;
 On=2 Off=3 :MiningLaserOn=(T&amp;lt;On)*:Mining T++ T*=T&amp;lt;(On+Off) goto1&lt;br /&gt;
&lt;br /&gt;
==[[Navigation receivers|Navigation Receiver]]==&lt;br /&gt;
&lt;br /&gt;
===Received Signal Display===&lt;br /&gt;
Requires a text panel with '''&amp;quot;PanelValue&amp;quot;''' renamed '''&amp;quot;Nav&amp;quot;'''. &lt;br /&gt;
&lt;br /&gt;
 if :SignalStrength&amp;gt;0 then goto2 else :Nav=&amp;quot;No Signal&amp;quot; goto1 end&lt;br /&gt;
 :Nav=:Message+&amp;quot;\n&amp;quot;+(1000000-:SignalStrength)/1000+&amp;quot;km&amp;quot; goto1&lt;br /&gt;
&lt;br /&gt;
==[[Ore collector|Ore Collector]]==&lt;br /&gt;
&lt;br /&gt;
===Mining Laser/ Ore Collector Switching===&lt;br /&gt;
Requires a button with '''&amp;quot;ButtonState&amp;quot;''' renamed '''&amp;quot;Collecting&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''. Reduces power consumption by switching ore collector &amp;quot;On&amp;quot; only if the button is active And the mining laser is &amp;quot;Off&amp;quot;. ''Note: this script works best alongside the &amp;quot;Pulsed Mining Laser&amp;quot; scripts.''&lt;br /&gt;
&lt;br /&gt;
 :ToggleOn=(1-:MiningLaserOn)*:Collecting goto1&lt;br /&gt;
&lt;br /&gt;
==[[Ship transponder|Ship Transponder]]==&lt;br /&gt;
&lt;br /&gt;
===Outside Safezone Warning===&lt;br /&gt;
Requires an active transponder and either a warning button or a safety lid button. The button blink whenever you're outside of the safe zone. ''Note: the button needs to be active in order to blink.''&lt;br /&gt;
&lt;br /&gt;
 :ButtonEnableBlink=1-:InsideSafeZone goto1&lt;br /&gt;
&lt;br /&gt;
===Stations Building Availability===&lt;br /&gt;
Same as the previous one, but the button blink wherever you're allowed to build a station.&lt;br /&gt;
&lt;br /&gt;
 :ButtonEnableBlink=:StationsAllowed goto1&lt;br /&gt;
&lt;br /&gt;
[[Category:Networks|Common YOLOL]]&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=Common_YOLOL&amp;diff=30117</id>
		<title>Common YOLOL</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=Common_YOLOL&amp;diff=30117"/>
		<updated>2022-02-22T22:53:41Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: /* Flagged Generator Script */  Minor modification to make the script more modulable&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A collection of small common scripts meant to be easily copied and understood for the [[YOLOL|YOLOL]] beginners.&lt;br /&gt;
&lt;br /&gt;
''This page is a &amp;quot;Work In Progress&amp;quot;. Don't hesitate to contribute! Just make sure to respect the following rules:&lt;br /&gt;
* Avoid complex codes. As said, These must be easily understood by beginners. If you can't simplify your scripts, please add some comments to explain the most technical parts.&lt;br /&gt;
* Avoid as possible to modify the [[Device fields|device fields]]. If necessary, it must be specified which field has to be renamed (left column) and/or set to a given value (right column). ''&lt;br /&gt;
&lt;br /&gt;
==[[Flight control unit|Flight Control Unit]]==&lt;br /&gt;
&lt;br /&gt;
===Single Forward/Backward Lever===&lt;br /&gt;
Requires a center lever bound to '''&amp;quot;FcuForward&amp;quot;'''. ''Note: You can easily modify the default regular lever from most prebuilt ships and cockpit modules to be used as a center Lever. Just change the '''&amp;quot;LeverMinOutput&amp;quot;''' value from 0 to -100.''&lt;br /&gt;
&lt;br /&gt;
 :FcuBackward=-:FcuForward goto1&lt;br /&gt;
&lt;br /&gt;
===Speed Limiter===&lt;br /&gt;
Requires to modify the lever bound to '''&amp;quot;FcuForward&amp;quot;''' which shall be renamed '''&amp;quot;Fwd&amp;quot;''' and another regular lever with '''&amp;quot;LeverState&amp;quot;''' renamed '''&amp;quot;Limiter&amp;quot;'''. This script allow you to set a maximum forward speed to your ship, which is useful when you need more accurate movements (e.g. while mining or docking).&lt;br /&gt;
&lt;br /&gt;
 :FcuForward=:Fwd/100*:Limiter goto1&lt;br /&gt;
&lt;br /&gt;
''Note: If you already modified your '''&amp;quot;FcuFoward&amp;quot;''' lever to be used as a '''&amp;quot;Single Forward/Backward Lever&amp;quot;''' (see above), you can use the '''&amp;quot;Backward&amp;quot;''' lever made useless as the '''&amp;quot;Limiter&amp;quot;''' lever. Just make sure you have '''&amp;quot;FcuForward&amp;quot;''' renamed '''&amp;quot;FwdBwd&amp;quot;''' instead so you can modify forward and backward thrust individually. This way your YOLOL scripts should be written as follows:''&lt;br /&gt;
&lt;br /&gt;
 :FcuForward=:FwdBwd/100*:Limiter goto1&lt;br /&gt;
&lt;br /&gt;
 :FcuBackward=-:FwdBwd goto1&lt;br /&gt;
&lt;br /&gt;
===Turtle Mode===&lt;br /&gt;
Similar to the previous script but with a button instead of a lever. '''&amp;quot;ButtonState&amp;quot;''' should be renamed '''&amp;quot;Turtle&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''. In addition set the '''&amp;quot;ButtonOffStateValue&amp;quot;''' to '''&amp;quot;100&amp;quot;''' and the '''&amp;quot;ButtonOnStateValue&amp;quot;''' to the desired speed reduction. For example having '''&amp;quot;30&amp;quot;''' means 30% of maximum speed when the button is active.&lt;br /&gt;
&lt;br /&gt;
 :FcuForward=:Fwd/100*:Turtle goto1&lt;br /&gt;
&lt;br /&gt;
==[[Fuel chamber|Fuel Chamber]]==&lt;br /&gt;
&lt;br /&gt;
The following scripts are made to be used with the ship &amp;quot;[[Laborer module|Laborer Module]]&amp;quot; rewarded during the tutorials. To make it compatible with other prebuilt or own-made ships, refer to the table below for the corresponding modifications in the [[Device fields|device fields]]. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Ship Part !! Default Field Name !! Laborer Module Field Name&lt;br /&gt;
|-&lt;br /&gt;
| Fuel Chamber || FuelChamberUnitRateLimit || Generator&lt;br /&gt;
|-&lt;br /&gt;
| First Battery || StoredBatteryPower || Battery_1&lt;br /&gt;
|-&lt;br /&gt;
| Second Battery || StoredBatteryPower || Battery_2 &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Also, ships will require enough batteries to act as buffers during the generator spool up time. ''Note: When in use, all batteries discharge at the same rate. The more batteries you have, the slower the discharge is.''&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;Standard&amp;quot; Generator Script===&lt;br /&gt;
Makes the fuel rate limit of the fuel chamber inversely proportional to the charge level of the batteries.&lt;br /&gt;
&lt;br /&gt;
 :Generator=100-:Battery_1/100 goto1&lt;br /&gt;
&lt;br /&gt;
Alternatively, this script will keep the batteries fuller by setting the fuel rate limit to its maximum when batteries are below 90% of charge.&lt;br /&gt;
&lt;br /&gt;
 :Generator=1000-:Battery_1/10 goto1&lt;br /&gt;
&lt;br /&gt;
Additionally, you can add a button to switch fuel saving on and off. Useful for more power consuming activities like mining. &amp;quot;ButtonState&amp;quot; should be renamed &amp;quot;Eco&amp;quot; and &amp;quot;ButtonStyle&amp;quot; set to &amp;quot;1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 :Generator=100-:Eco*:Battery_1/100 goto1&lt;br /&gt;
&lt;br /&gt;
===Flagged Generator Script===&lt;br /&gt;
This script set the fuel rate limit to 25% (just enough to supply 2 box thrusters with a bit of spare charge) if the level of the batteries is below 9999 and adding 50% if below 5000. 0.001% is enough fuel rate to let the generator &amp;quot;sleep&amp;quot; when the ship stand still and the batteries are full.&lt;br /&gt;
&lt;br /&gt;
 :Generator=25*(:Battery_1&amp;lt;9999)+50*(:Battery_1&amp;lt;5000)+0.001 goto1&lt;br /&gt;
&lt;br /&gt;
===Advanced Generator Script===&lt;br /&gt;
This script is tweakable to your ship configuration. Field names are those of the Laborer Module, except for the '''&amp;quot;Generator&amp;quot;''' button which should be renamed '''&amp;quot;PWR&amp;quot;''' so the script can control the fuel rate while the button still being functional. Optionally you can add an override lever with '''&amp;quot;LeverState&amp;quot;''' renamed '''&amp;quot;PWR&amp;quot;''' as well.&lt;br /&gt;
&lt;br /&gt;
 MaxBattery=20000           // total capacity&lt;br /&gt;
 LowBattery=0.99*MaxBattery // start charging below 99%&lt;br /&gt;
 MinBattery=0.20*MaxBattery // max charge rate below 20%&lt;br /&gt;
 MaxGenerator=100           // max fuel rate&lt;br /&gt;
 MinGenerator=2             // min fuel rate (near 100% charge)&lt;br /&gt;
 h=MaxGenerator c=MinGenerator          // auxiliary variables,&lt;br /&gt;
 f=MaxBattery l=LowBattery e=MinBattery // no need to change these&lt;br /&gt;
 r=(h-c)/(f-e) z=h-r*l a=r*(f-l)      // reboot: remove &amp;quot;goto9&amp;quot; briefly&lt;br /&gt;
 y=:PWR-z-r*(:Battery_1+:Battery_2)+c*(y&amp;gt;c)+a*(y&amp;gt;0) :Generator=y goto9&lt;br /&gt;
&lt;br /&gt;
It is assumed that the following device fields are set as explained (''Note: The &amp;quot;PWR&amp;quot; button is already set up in the Laborer Module''):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Ship Part !! Field Name !! Set Field value&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Button || ButtonOnStateValue|| 100&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Button || ButtonOffStateValue|| 0 &lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Button || ButtonStyle || 1&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Lever (optional) || LeverMinOutput || 0 &lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Lever (optional) || LeverMaxOutput || 200 &lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Lever (optional) || LeverCenteringSpeed || 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==[[Material point scanner|Material Point Scanner]]==&lt;br /&gt;
&lt;br /&gt;
===Material Point Scanner Script===&lt;br /&gt;
Requires two displays for '''&amp;quot;Material&amp;quot;''' and '''&amp;quot;Volume&amp;quot;''', two buttons to toggle the '''&amp;quot;Active&amp;quot;''' and '''&amp;quot;Scan&amp;quot;''' fields of the scanner, and a third button with '''&amp;quot;ButtonState&amp;quot;''' renamed '''&amp;quot;Next&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
 :Index=(:Index+:Next)*(:Index&amp;lt;:ScanResults) :Next=0&lt;br /&gt;
 :Material=:Material :Volume=:Volume goto1&lt;br /&gt;
&lt;br /&gt;
===Automatic Material Point Scanner Script===&lt;br /&gt;
This is a modified version of the above script so it can be used when the scanner is '''&amp;quot;Active&amp;quot;''' without the need of any additional buttons.&lt;br /&gt;
''Note: launching a new scan reinitialize the index to '''&amp;quot;0&amp;quot;'''.''&lt;br /&gt;
&lt;br /&gt;
 :Scan=1&lt;br /&gt;
 //Pause&lt;br /&gt;
 :Index=Next&lt;br /&gt;
 Next=(Next+1)*(Next&amp;lt;:ScanResults)&lt;br /&gt;
 :Material=:Material :Volume=:Volume goto1&lt;br /&gt;
&lt;br /&gt;
==[[Mining laser|Mining Laser]]==&lt;br /&gt;
&lt;br /&gt;
===Pulsed Mining Laser===&lt;br /&gt;
Requires a button with '''&amp;quot;ButtonState&amp;quot;''' renamed '''&amp;quot;Mining&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''. Reduces power consumption by continuously switching mining laser &amp;quot;On&amp;quot; and &amp;quot;Off&amp;quot; while the button is active.&lt;br /&gt;
&lt;br /&gt;
 :MiningLaserOn=(1-:MiningLaserOn)*:Mining goto1&lt;br /&gt;
&lt;br /&gt;
===Configurable Pulsed Mining Laser===&lt;br /&gt;
Similar to the previous script but with configurable timers for the &amp;quot;On&amp;quot; and &amp;quot;Off&amp;quot; phases of the laser.&lt;br /&gt;
''Note: Each phase is calculated in a number of YOLOL &amp;quot;tick&amp;quot; (0.2sec). So in the example, the &amp;quot;On&amp;quot; phase last 2*0.2=0.4sec and the &amp;quot;Off&amp;quot; phase 3*0.2=0.6 sec, which makes the power comsumption just a bit lower than the power production of a regular generator module (= one fuel chamber and three generator units, all in tier 1).''&lt;br /&gt;
&lt;br /&gt;
 On=2 Off=3 :MiningLaserOn=(T&amp;lt;On)*:Mining T++ T*=T&amp;lt;(On+Off) goto1&lt;br /&gt;
&lt;br /&gt;
==[[Navigation receivers|Navigation Receiver]]==&lt;br /&gt;
&lt;br /&gt;
===Received Signal Display===&lt;br /&gt;
Requires a text panel with '''&amp;quot;PanelValue&amp;quot;''' renamed '''&amp;quot;Nav&amp;quot;'''. &lt;br /&gt;
&lt;br /&gt;
 if :SignalStrength&amp;gt;0 then goto2 else :Nav=&amp;quot;No Signal&amp;quot; goto1 end&lt;br /&gt;
 :Nav=:Message+&amp;quot;\n&amp;quot;+(1000000-:SignalStrength)/1000+&amp;quot;km&amp;quot; goto1&lt;br /&gt;
&lt;br /&gt;
==[[Ore collector|Ore Collector]]==&lt;br /&gt;
&lt;br /&gt;
===Mining Laser/ Ore Collector Switching===&lt;br /&gt;
Requires a button with '''&amp;quot;ButtonState&amp;quot;''' renamed '''&amp;quot;Collecting&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''. Reduces power consumption by switching ore collector &amp;quot;On&amp;quot; only if the button is active And the mining laser is &amp;quot;Off&amp;quot;. ''Note: this script works best alongside the &amp;quot;Pulsed Mining Laser&amp;quot; scripts.''&lt;br /&gt;
&lt;br /&gt;
 :ToggleOn=(1-:MiningLaserOn)*:Collecting goto1&lt;br /&gt;
&lt;br /&gt;
==[[Ship transponder|Ship Transponder]]==&lt;br /&gt;
&lt;br /&gt;
===Outside Safezone Warning===&lt;br /&gt;
Requires an active transponder and either a warning button or a safety lid button. The button blink whenever you're outside of the safe zone. ''Note: the button needs to be active in order to blink.''&lt;br /&gt;
&lt;br /&gt;
 :ButtonEnableBlink=1-:InsideSafeZone goto1&lt;br /&gt;
&lt;br /&gt;
===Stations Building Availability===&lt;br /&gt;
Same as the previous one, but the button blink wherever you're allowed to build a station.&lt;br /&gt;
&lt;br /&gt;
 :ButtonEnableBlink=:StationsAllowed goto1&lt;br /&gt;
&lt;br /&gt;
[[Category:Networks|Common YOLOL]]&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=Common_YOLOL&amp;diff=30116</id>
		<title>Common YOLOL</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=Common_YOLOL&amp;diff=30116"/>
		<updated>2022-02-22T22:42:32Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: /* &amp;quot;Standard&amp;quot; Generator Script */  Adding script for an on/off button&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A collection of small common scripts meant to be easily copied and understood for the [[YOLOL|YOLOL]] beginners.&lt;br /&gt;
&lt;br /&gt;
''This page is a &amp;quot;Work In Progress&amp;quot;. Don't hesitate to contribute! Just make sure to respect the following rules:&lt;br /&gt;
* Avoid complex codes. As said, These must be easily understood by beginners. If you can't simplify your scripts, please add some comments to explain the most technical parts.&lt;br /&gt;
* Avoid as possible to modify the [[Device fields|device fields]]. If necessary, it must be specified which field has to be renamed (left column) and/or set to a given value (right column). ''&lt;br /&gt;
&lt;br /&gt;
==[[Flight control unit|Flight Control Unit]]==&lt;br /&gt;
&lt;br /&gt;
===Single Forward/Backward Lever===&lt;br /&gt;
Requires a center lever bound to '''&amp;quot;FcuForward&amp;quot;'''. ''Note: You can easily modify the default regular lever from most prebuilt ships and cockpit modules to be used as a center Lever. Just change the '''&amp;quot;LeverMinOutput&amp;quot;''' value from 0 to -100.''&lt;br /&gt;
&lt;br /&gt;
 :FcuBackward=-:FcuForward goto1&lt;br /&gt;
&lt;br /&gt;
===Speed Limiter===&lt;br /&gt;
Requires to modify the lever bound to '''&amp;quot;FcuForward&amp;quot;''' which shall be renamed '''&amp;quot;Fwd&amp;quot;''' and another regular lever with '''&amp;quot;LeverState&amp;quot;''' renamed '''&amp;quot;Limiter&amp;quot;'''. This script allow you to set a maximum forward speed to your ship, which is useful when you need more accurate movements (e.g. while mining or docking).&lt;br /&gt;
&lt;br /&gt;
 :FcuForward=:Fwd/100*:Limiter goto1&lt;br /&gt;
&lt;br /&gt;
''Note: If you already modified your '''&amp;quot;FcuFoward&amp;quot;''' lever to be used as a '''&amp;quot;Single Forward/Backward Lever&amp;quot;''' (see above), you can use the '''&amp;quot;Backward&amp;quot;''' lever made useless as the '''&amp;quot;Limiter&amp;quot;''' lever. Just make sure you have '''&amp;quot;FcuForward&amp;quot;''' renamed '''&amp;quot;FwdBwd&amp;quot;''' instead so you can modify forward and backward thrust individually. This way your YOLOL scripts should be written as follows:''&lt;br /&gt;
&lt;br /&gt;
 :FcuForward=:FwdBwd/100*:Limiter goto1&lt;br /&gt;
&lt;br /&gt;
 :FcuBackward=-:FwdBwd goto1&lt;br /&gt;
&lt;br /&gt;
===Turtle Mode===&lt;br /&gt;
Similar to the previous script but with a button instead of a lever. '''&amp;quot;ButtonState&amp;quot;''' should be renamed '''&amp;quot;Turtle&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''. In addition set the '''&amp;quot;ButtonOffStateValue&amp;quot;''' to '''&amp;quot;100&amp;quot;''' and the '''&amp;quot;ButtonOnStateValue&amp;quot;''' to the desired speed reduction. For example having '''&amp;quot;30&amp;quot;''' means 30% of maximum speed when the button is active.&lt;br /&gt;
&lt;br /&gt;
 :FcuForward=:Fwd/100*:Turtle goto1&lt;br /&gt;
&lt;br /&gt;
==[[Fuel chamber|Fuel Chamber]]==&lt;br /&gt;
&lt;br /&gt;
The following scripts are made to be used with the ship &amp;quot;[[Laborer module|Laborer Module]]&amp;quot; rewarded during the tutorials. To make it compatible with other prebuilt or own-made ships, refer to the table below for the corresponding modifications in the [[Device fields|device fields]]. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Ship Part !! Default Field Name !! Laborer Module Field Name&lt;br /&gt;
|-&lt;br /&gt;
| Fuel Chamber || FuelChamberUnitRateLimit || Generator&lt;br /&gt;
|-&lt;br /&gt;
| First Battery || StoredBatteryPower || Battery_1&lt;br /&gt;
|-&lt;br /&gt;
| Second Battery || StoredBatteryPower || Battery_2 &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Also, ships will require enough batteries to act as buffers during the generator spool up time. ''Note: When in use, all batteries discharge at the same rate. The more batteries you have, the slower the discharge is.''&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;Standard&amp;quot; Generator Script===&lt;br /&gt;
Makes the fuel rate limit of the fuel chamber inversely proportional to the charge level of the batteries.&lt;br /&gt;
&lt;br /&gt;
 :Generator=100-:Battery_1/100 goto1&lt;br /&gt;
&lt;br /&gt;
Alternatively, this script will keep the batteries fuller by setting the fuel rate limit to its maximum when batteries are below 90% of charge.&lt;br /&gt;
&lt;br /&gt;
 :Generator=1000-:Battery_1/10 goto1&lt;br /&gt;
&lt;br /&gt;
Additionally, you can add a button to switch fuel saving on and off. Useful for more power consuming activities like mining. &amp;quot;ButtonState&amp;quot; should be renamed &amp;quot;Eco&amp;quot; and &amp;quot;ButtonStyle&amp;quot; set to &amp;quot;1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 :Generator=100-:Eco*:Battery_1/100 goto1&lt;br /&gt;
&lt;br /&gt;
===Flagged Generator Script===&lt;br /&gt;
This script set the fuel rate limit to 25% (just enough to supply 2 box thrusters with a bit of spare charge) if the level of the batteries is below 9999 and twice as much if below 5000. 0.001% is enough fuel rate to let the generator &amp;quot;sleep&amp;quot; when the batteries are full.&lt;br /&gt;
&lt;br /&gt;
 :Generator=25*(:Battery_1&amp;lt;9999)*(:Battery_1&amp;lt;5000)+0.001 goto1&lt;br /&gt;
&lt;br /&gt;
===Advanced Generator Script===&lt;br /&gt;
This script is tweakable to your ship configuration. Field names are those of the Laborer Module, except for the '''&amp;quot;Generator&amp;quot;''' button which should be renamed '''&amp;quot;PWR&amp;quot;''' so the script can control the fuel rate while the button still being functional. Optionally you can add an override lever with '''&amp;quot;LeverState&amp;quot;''' renamed '''&amp;quot;PWR&amp;quot;''' as well.&lt;br /&gt;
&lt;br /&gt;
 MaxBattery=20000           // total capacity&lt;br /&gt;
 LowBattery=0.99*MaxBattery // start charging below 99%&lt;br /&gt;
 MinBattery=0.20*MaxBattery // max charge rate below 20%&lt;br /&gt;
 MaxGenerator=100           // max fuel rate&lt;br /&gt;
 MinGenerator=2             // min fuel rate (near 100% charge)&lt;br /&gt;
 h=MaxGenerator c=MinGenerator          // auxiliary variables,&lt;br /&gt;
 f=MaxBattery l=LowBattery e=MinBattery // no need to change these&lt;br /&gt;
 r=(h-c)/(f-e) z=h-r*l a=r*(f-l)      // reboot: remove &amp;quot;goto9&amp;quot; briefly&lt;br /&gt;
 y=:PWR-z-r*(:Battery_1+:Battery_2)+c*(y&amp;gt;c)+a*(y&amp;gt;0) :Generator=y goto9&lt;br /&gt;
&lt;br /&gt;
It is assumed that the following device fields are set as explained (''Note: The &amp;quot;PWR&amp;quot; button is already set up in the Laborer Module''):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Ship Part !! Field Name !! Set Field value&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Button || ButtonOnStateValue|| 100&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Button || ButtonOffStateValue|| 0 &lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Button || ButtonStyle || 1&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Lever (optional) || LeverMinOutput || 0 &lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Lever (optional) || LeverMaxOutput || 200 &lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Lever (optional) || LeverCenteringSpeed || 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==[[Material point scanner|Material Point Scanner]]==&lt;br /&gt;
&lt;br /&gt;
===Material Point Scanner Script===&lt;br /&gt;
Requires two displays for '''&amp;quot;Material&amp;quot;''' and '''&amp;quot;Volume&amp;quot;''', two buttons to toggle the '''&amp;quot;Active&amp;quot;''' and '''&amp;quot;Scan&amp;quot;''' fields of the scanner, and a third button with '''&amp;quot;ButtonState&amp;quot;''' renamed '''&amp;quot;Next&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
 :Index=(:Index+:Next)*(:Index&amp;lt;:ScanResults) :Next=0&lt;br /&gt;
 :Material=:Material :Volume=:Volume goto1&lt;br /&gt;
&lt;br /&gt;
===Automatic Material Point Scanner Script===&lt;br /&gt;
This is a modified version of the above script so it can be used when the scanner is '''&amp;quot;Active&amp;quot;''' without the need of any additional buttons.&lt;br /&gt;
''Note: launching a new scan reinitialize the index to '''&amp;quot;0&amp;quot;'''.''&lt;br /&gt;
&lt;br /&gt;
 :Scan=1&lt;br /&gt;
 //Pause&lt;br /&gt;
 :Index=Next&lt;br /&gt;
 Next=(Next+1)*(Next&amp;lt;:ScanResults)&lt;br /&gt;
 :Material=:Material :Volume=:Volume goto1&lt;br /&gt;
&lt;br /&gt;
==[[Mining laser|Mining Laser]]==&lt;br /&gt;
&lt;br /&gt;
===Pulsed Mining Laser===&lt;br /&gt;
Requires a button with '''&amp;quot;ButtonState&amp;quot;''' renamed '''&amp;quot;Mining&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''. Reduces power consumption by continuously switching mining laser &amp;quot;On&amp;quot; and &amp;quot;Off&amp;quot; while the button is active.&lt;br /&gt;
&lt;br /&gt;
 :MiningLaserOn=(1-:MiningLaserOn)*:Mining goto1&lt;br /&gt;
&lt;br /&gt;
===Configurable Pulsed Mining Laser===&lt;br /&gt;
Similar to the previous script but with configurable timers for the &amp;quot;On&amp;quot; and &amp;quot;Off&amp;quot; phases of the laser.&lt;br /&gt;
''Note: Each phase is calculated in a number of YOLOL &amp;quot;tick&amp;quot; (0.2sec). So in the example, the &amp;quot;On&amp;quot; phase last 2*0.2=0.4sec and the &amp;quot;Off&amp;quot; phase 3*0.2=0.6 sec, which makes the power comsumption just a bit lower than the power production of a regular generator module (= one fuel chamber and three generator units, all in tier 1).''&lt;br /&gt;
&lt;br /&gt;
 On=2 Off=3 :MiningLaserOn=(T&amp;lt;On)*:Mining T++ T*=T&amp;lt;(On+Off) goto1&lt;br /&gt;
&lt;br /&gt;
==[[Navigation receivers|Navigation Receiver]]==&lt;br /&gt;
&lt;br /&gt;
===Received Signal Display===&lt;br /&gt;
Requires a text panel with '''&amp;quot;PanelValue&amp;quot;''' renamed '''&amp;quot;Nav&amp;quot;'''. &lt;br /&gt;
&lt;br /&gt;
 if :SignalStrength&amp;gt;0 then goto2 else :Nav=&amp;quot;No Signal&amp;quot; goto1 end&lt;br /&gt;
 :Nav=:Message+&amp;quot;\n&amp;quot;+(1000000-:SignalStrength)/1000+&amp;quot;km&amp;quot; goto1&lt;br /&gt;
&lt;br /&gt;
==[[Ore collector|Ore Collector]]==&lt;br /&gt;
&lt;br /&gt;
===Mining Laser/ Ore Collector Switching===&lt;br /&gt;
Requires a button with '''&amp;quot;ButtonState&amp;quot;''' renamed '''&amp;quot;Collecting&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''. Reduces power consumption by switching ore collector &amp;quot;On&amp;quot; only if the button is active And the mining laser is &amp;quot;Off&amp;quot;. ''Note: this script works best alongside the &amp;quot;Pulsed Mining Laser&amp;quot; scripts.''&lt;br /&gt;
&lt;br /&gt;
 :ToggleOn=(1-:MiningLaserOn)*:Collecting goto1&lt;br /&gt;
&lt;br /&gt;
==[[Ship transponder|Ship Transponder]]==&lt;br /&gt;
&lt;br /&gt;
===Outside Safezone Warning===&lt;br /&gt;
Requires an active transponder and either a warning button or a safety lid button. The button blink whenever you're outside of the safe zone. ''Note: the button needs to be active in order to blink.''&lt;br /&gt;
&lt;br /&gt;
 :ButtonEnableBlink=1-:InsideSafeZone goto1&lt;br /&gt;
&lt;br /&gt;
===Stations Building Availability===&lt;br /&gt;
Same as the previous one, but the button blink wherever you're allowed to build a station.&lt;br /&gt;
&lt;br /&gt;
 :ButtonEnableBlink=:StationsAllowed goto1&lt;br /&gt;
&lt;br /&gt;
[[Category:Networks|Common YOLOL]]&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=Common_YOLOL&amp;diff=30106</id>
		<title>Common YOLOL</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=Common_YOLOL&amp;diff=30106"/>
		<updated>2022-02-16T18:37:33Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: /* Flagged Generator Script */  Making the script more relevant&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A collection of small common scripts meant to be easily copied and understood for the [[YOLOL|YOLOL]] beginners.&lt;br /&gt;
&lt;br /&gt;
''This page is a &amp;quot;Work In Progress&amp;quot;. Don't hesitate to contribute! Just make sure to respect the following rules:&lt;br /&gt;
* Avoid complex codes. As said, These must be easily understood by beginners. If you can't simplify your scripts, please add some comments to explain the most technical parts.&lt;br /&gt;
* Avoid as possible to modify the [[Device fields|device fields]]. If necessary, it must be specified which field has to be renamed (left column) and/or set to a given value (right column). ''&lt;br /&gt;
&lt;br /&gt;
==[[Flight control unit|Flight Control Unit]]==&lt;br /&gt;
&lt;br /&gt;
===Single Forward/Backward Lever===&lt;br /&gt;
Requires a center lever bound to '''&amp;quot;FcuForward&amp;quot;'''. ''Note: You can easily modify the default regular lever from most prebuilt ships and cockpit modules to be used as a center Lever. Just change the '''&amp;quot;LeverMinOutput&amp;quot;''' value from 0 to -100.''&lt;br /&gt;
&lt;br /&gt;
 :FcuBackward=-:FcuForward goto1&lt;br /&gt;
&lt;br /&gt;
===Speed Limiter===&lt;br /&gt;
Requires to modify the lever bound to '''&amp;quot;FcuForward&amp;quot;''' which shall be renamed '''&amp;quot;Fwd&amp;quot;''' and another regular lever with '''&amp;quot;LeverState&amp;quot;''' renamed '''&amp;quot;Limiter&amp;quot;'''. This script allow you to set a maximum forward speed to your ship, which is useful when you need more accurate movements (e.g. while mining or docking).&lt;br /&gt;
&lt;br /&gt;
 :FcuForward=:Fwd/100*:Limiter goto1&lt;br /&gt;
&lt;br /&gt;
''Note: If you already modified your '''&amp;quot;FcuFoward&amp;quot;''' lever to be used as a '''&amp;quot;Single Forward/Backward Lever&amp;quot;''' (see above), you can use the '''&amp;quot;Backward&amp;quot;''' lever made useless as the '''&amp;quot;Limiter&amp;quot;''' lever. Just make sure you have '''&amp;quot;FcuForward&amp;quot;''' renamed '''&amp;quot;FwdBwd&amp;quot;''' instead so you can modify forward and backward thrust individually. This way your YOLOL scripts should be written as follows:''&lt;br /&gt;
&lt;br /&gt;
 :FcuForward=:FwdBwd/100*:Limiter goto1&lt;br /&gt;
&lt;br /&gt;
 :FcuBackward=-:FwdBwd goto1&lt;br /&gt;
&lt;br /&gt;
===Turtle Mode===&lt;br /&gt;
Similar to the previous script but with a button instead of a lever. '''&amp;quot;ButtonState&amp;quot;''' should be renamed '''&amp;quot;Turtle&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''. In addition set the '''&amp;quot;ButtonOffStateValue&amp;quot;''' to '''&amp;quot;100&amp;quot;''' and the '''&amp;quot;ButtonOnStateValue&amp;quot;''' to the desired speed reduction. For example having '''&amp;quot;30&amp;quot;''' means 30% of maximum speed when the button is active.&lt;br /&gt;
&lt;br /&gt;
 :FcuForward=:Fwd/100*:Turtle goto1&lt;br /&gt;
&lt;br /&gt;
==[[Fuel chamber|Fuel Chamber]]==&lt;br /&gt;
&lt;br /&gt;
The following scripts are made to be used with the ship &amp;quot;[[Laborer module|Laborer Module]]&amp;quot; rewarded during the tutorials. To make it compatible with other prebuilt or own-made ships, refer to the table below for the corresponding modifications in the [[Device fields|device fields]]. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Ship Part !! Default Field Name !! Laborer Module Field Name&lt;br /&gt;
|-&lt;br /&gt;
| Fuel Chamber || FuelChamberUnitRateLimit || Generator&lt;br /&gt;
|-&lt;br /&gt;
| First Battery || StoredBatteryPower || Battery_1&lt;br /&gt;
|-&lt;br /&gt;
| Second Battery || StoredBatteryPower || Battery_2 &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Also, ships will require enough batteries to act as buffers during the generator spool up time. ''Note: When in use, all batteries discharge at the same rate. The more batteries you have, the slower the discharge is.''&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;Standard&amp;quot; Generator Script===&lt;br /&gt;
Makes the fuel rate limit of the fuel chamber inversely proportional to the charge level of the batteries.&lt;br /&gt;
&lt;br /&gt;
 :Generator=100-:Battery_1/100 goto1&lt;br /&gt;
&lt;br /&gt;
Alternatively, this script will keep the batteries fuller by setting the fuel rate limit to its maximum when batteries are below 90% of charge.&lt;br /&gt;
&lt;br /&gt;
 :Generator=1000-:Battery_1/10 goto1&lt;br /&gt;
&lt;br /&gt;
===Flagged Generator Script===&lt;br /&gt;
This script set the fuel rate limit to 25% (just enough to supply 2 box thrusters with a bit of spare charge) if the level of the batteries is below 9999 and twice as much if below 5000. 0.001% is enough fuel rate to let the generator &amp;quot;sleep&amp;quot; when the batteries are full.&lt;br /&gt;
&lt;br /&gt;
 :Generator=25*(:Battery_1&amp;lt;9999)*(:Battery_1&amp;lt;5000)+0.001 goto1&lt;br /&gt;
&lt;br /&gt;
===Advanced Generator Script===&lt;br /&gt;
This script is tweakable to your ship configuration. Field names are those of the Laborer Module, except for the '''&amp;quot;Generator&amp;quot;''' button which should be renamed '''&amp;quot;PWR&amp;quot;''' so the script can control the fuel rate while the button still being functional. Optionally you can add an override lever with '''&amp;quot;LeverState&amp;quot;''' renamed '''&amp;quot;PWR&amp;quot;''' as well.&lt;br /&gt;
&lt;br /&gt;
 MaxBattery=20000           // total capacity&lt;br /&gt;
 LowBattery=0.99*MaxBattery // start charging below 99%&lt;br /&gt;
 MinBattery=0.20*MaxBattery // max charge rate below 20%&lt;br /&gt;
 MaxGenerator=100           // max fuel rate&lt;br /&gt;
 MinGenerator=2             // min fuel rate (near 100% charge)&lt;br /&gt;
 h=MaxGenerator c=MinGenerator          // auxiliary variables,&lt;br /&gt;
 f=MaxBattery l=LowBattery e=MinBattery // no need to change these&lt;br /&gt;
 r=(h-c)/(f-e) z=h-r*l a=r*(f-l)      // reboot: remove &amp;quot;goto9&amp;quot; briefly&lt;br /&gt;
 y=:PWR-z-r*(:Battery_1+:Battery_2)+c*(y&amp;gt;c)+a*(y&amp;gt;0) :Generator=y goto9&lt;br /&gt;
&lt;br /&gt;
It is assumed that the following device fields are set as explained (''Note: The &amp;quot;PWR&amp;quot; button is already set up in the Laborer Module''):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Ship Part !! Field Name !! Set Field value&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Button || ButtonOnStateValue|| 100&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Button || ButtonOffStateValue|| 0 &lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Button || ButtonStyle || 1&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Lever (optional) || LeverMinOutput || 0 &lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Lever (optional) || LeverMaxOutput || 200 &lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Lever (optional) || LeverCenteringSpeed || 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==[[Material point scanner|Material Point Scanner]]==&lt;br /&gt;
&lt;br /&gt;
===Material Point Scanner Script===&lt;br /&gt;
Requires two displays for '''&amp;quot;Material&amp;quot;''' and '''&amp;quot;Volume&amp;quot;''', two buttons to toggle the '''&amp;quot;Active&amp;quot;''' and '''&amp;quot;Scan&amp;quot;''' fields of the scanner, and a third button with '''&amp;quot;ButtonState&amp;quot;''' renamed '''&amp;quot;Next&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
 :Index=(:Index+:Next)*(:Index&amp;lt;:ScanResults) :Next=0&lt;br /&gt;
 :Material=:Material :Volume=:Volume goto1&lt;br /&gt;
&lt;br /&gt;
===Automatic Material Point Scanner Script===&lt;br /&gt;
This is a modified version of the above script so it can be used when the scanner is '''&amp;quot;Active&amp;quot;''' without the need of any additional buttons.&lt;br /&gt;
''Note: launching a new scan reinitialize the index to '''&amp;quot;0&amp;quot;'''.''&lt;br /&gt;
&lt;br /&gt;
 :Scan=1&lt;br /&gt;
 //Pause&lt;br /&gt;
 :Index=Next&lt;br /&gt;
 Next=(Next+1)*(Next&amp;lt;:ScanResults)&lt;br /&gt;
 :Material=:Material :Volume=:Volume goto1&lt;br /&gt;
&lt;br /&gt;
==[[Mining laser|Mining Laser]]==&lt;br /&gt;
&lt;br /&gt;
===Pulsed Mining Laser===&lt;br /&gt;
Requires a button with '''&amp;quot;ButtonState&amp;quot;''' renamed '''&amp;quot;Mining&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''. Reduces power consumption by continuously switching mining laser &amp;quot;On&amp;quot; and &amp;quot;Off&amp;quot; while the button is active.&lt;br /&gt;
&lt;br /&gt;
 :MiningLaserOn=(1-:MiningLaserOn)*:Mining goto1&lt;br /&gt;
&lt;br /&gt;
===Configurable Pulsed Mining Laser===&lt;br /&gt;
Similar to the previous script but with configurable timers for the &amp;quot;On&amp;quot; and &amp;quot;Off&amp;quot; phases of the laser.&lt;br /&gt;
''Note: Each phase is calculated in a number of YOLOL &amp;quot;tick&amp;quot; (0.2sec). So in the example, the &amp;quot;On&amp;quot; phase last 2*0.2=0.4sec and the &amp;quot;Off&amp;quot; phase 3*0.2=0.6 sec, which makes the power comsumption just a bit lower than the power production of a regular generator module (= one fuel chamber and three generator units, all in tier 1).''&lt;br /&gt;
&lt;br /&gt;
 On=2 Off=3 :MiningLaserOn=(T&amp;lt;On)*:Mining T++ T*=T&amp;lt;(On+Off) goto1&lt;br /&gt;
&lt;br /&gt;
==[[Navigation receivers|Navigation Receiver]]==&lt;br /&gt;
&lt;br /&gt;
===Received Signal Display===&lt;br /&gt;
Requires a text panel with '''&amp;quot;PanelValue&amp;quot;''' renamed '''&amp;quot;Nav&amp;quot;'''. &lt;br /&gt;
&lt;br /&gt;
 if :SignalStrength&amp;gt;0 then goto2 else :Nav=&amp;quot;No Signal&amp;quot; goto1 end&lt;br /&gt;
 :Nav=:Message+&amp;quot;\n&amp;quot;+(1000000-:SignalStrength)/1000+&amp;quot;km&amp;quot; goto1&lt;br /&gt;
&lt;br /&gt;
==[[Ore collector|Ore Collector]]==&lt;br /&gt;
&lt;br /&gt;
===Mining Laser/ Ore Collector Switching===&lt;br /&gt;
Requires a button with '''&amp;quot;ButtonState&amp;quot;''' renamed '''&amp;quot;Collecting&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''. Reduces power consumption by switching ore collector &amp;quot;On&amp;quot; only if the button is active And the mining laser is &amp;quot;Off&amp;quot;. ''Note: this script works best alongside the &amp;quot;Pulsed Mining Laser&amp;quot; scripts.''&lt;br /&gt;
&lt;br /&gt;
 :ToggleOn=(1-:MiningLaserOn)*:Collecting goto1&lt;br /&gt;
&lt;br /&gt;
==[[Ship transponder|Ship Transponder]]==&lt;br /&gt;
&lt;br /&gt;
===Outside Safezone Warning===&lt;br /&gt;
Requires an active transponder and either a warning button or a safety lid button. The button blink whenever you're outside of the safe zone. ''Note: the button needs to be active in order to blink.''&lt;br /&gt;
&lt;br /&gt;
 :ButtonEnableBlink=1-:InsideSafeZone goto1&lt;br /&gt;
&lt;br /&gt;
===Stations Building Availability===&lt;br /&gt;
Same as the previous one, but the button blink wherever you're allowed to build a station.&lt;br /&gt;
&lt;br /&gt;
 :ButtonEnableBlink=:StationsAllowed goto1&lt;br /&gt;
&lt;br /&gt;
[[Category:Networks|Common YOLOL]]&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=Common_YOLOL&amp;diff=30104</id>
		<title>Common YOLOL</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=Common_YOLOL&amp;diff=30104"/>
		<updated>2022-02-15T19:20:50Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: /* Material Point Scanner Script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A collection of small common scripts meant to be easily copied and understood for the [[YOLOL|YOLOL]] beginners.&lt;br /&gt;
&lt;br /&gt;
''This page is a &amp;quot;Work In Progress&amp;quot;. Don't hesitate to contribute! Just make sure to respect the following rules:&lt;br /&gt;
* Avoid complex codes. As said, These must be easily understood by beginners. If you can't simplify your scripts, please add some comments to explain the most technical parts.&lt;br /&gt;
* Avoid as possible to modify the [[Device fields|device fields]]. If necessary, it must be specified which field has to be renamed (left column) and/or set to a given value (right column). ''&lt;br /&gt;
&lt;br /&gt;
==[[Flight control unit|Flight Control Unit]]==&lt;br /&gt;
&lt;br /&gt;
===Single Forward/Backward Lever===&lt;br /&gt;
Requires a center lever bound to '''&amp;quot;FcuForward&amp;quot;'''. ''Note: You can easily modify the default regular lever from most prebuilt ships and cockpit modules to be used as a center Lever. Just change the '''&amp;quot;LeverMinOutput&amp;quot;''' value from 0 to -100.''&lt;br /&gt;
&lt;br /&gt;
 :FcuBackward=-:FcuForward goto1&lt;br /&gt;
&lt;br /&gt;
===Speed Limiter===&lt;br /&gt;
Requires to modify the lever bound to '''&amp;quot;FcuForward&amp;quot;''' which shall be renamed '''&amp;quot;Fwd&amp;quot;''' and another regular lever with '''&amp;quot;LeverState&amp;quot;''' renamed '''&amp;quot;Limiter&amp;quot;'''. This script allow you to set a maximum forward speed to your ship, which is useful when you need more accurate movements (e.g. while mining or docking).&lt;br /&gt;
&lt;br /&gt;
 :FcuForward=:Fwd/100*:Limiter goto1&lt;br /&gt;
&lt;br /&gt;
''Note: If you already modified your '''&amp;quot;FcuFoward&amp;quot;''' lever to be used as a '''&amp;quot;Single Forward/Backward Lever&amp;quot;''' (see above), you can use the '''&amp;quot;Backward&amp;quot;''' lever made useless as the '''&amp;quot;Limiter&amp;quot;''' lever. Just make sure you have '''&amp;quot;FcuForward&amp;quot;''' renamed '''&amp;quot;FwdBwd&amp;quot;''' instead so you can modify forward and backward thrust individually. This way your YOLOL scripts should be written as follows:''&lt;br /&gt;
&lt;br /&gt;
 :FcuForward=:FwdBwd/100*:Limiter goto1&lt;br /&gt;
&lt;br /&gt;
 :FcuBackward=-:FwdBwd goto1&lt;br /&gt;
&lt;br /&gt;
===Turtle Mode===&lt;br /&gt;
Similar to the previous script but with a button instead of a lever. '''&amp;quot;ButtonState&amp;quot;''' should be renamed '''&amp;quot;Turtle&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''. In addition set the '''&amp;quot;ButtonOffStateValue&amp;quot;''' to '''&amp;quot;100&amp;quot;''' and the '''&amp;quot;ButtonOnStateValue&amp;quot;''' to the desired speed reduction. For example having '''&amp;quot;30&amp;quot;''' means 30% of maximum speed when the button is active.&lt;br /&gt;
&lt;br /&gt;
 :FcuForward=:Fwd/100*:Turtle goto1&lt;br /&gt;
&lt;br /&gt;
==[[Fuel chamber|Fuel Chamber]]==&lt;br /&gt;
&lt;br /&gt;
The following scripts are made to be used with the ship &amp;quot;[[Laborer module|Laborer Module]]&amp;quot; rewarded during the tutorials. To make it compatible with other prebuilt or own-made ships, refer to the table below for the corresponding modifications in the [[Device fields|device fields]]. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Ship Part !! Default Field Name !! Laborer Module Field Name&lt;br /&gt;
|-&lt;br /&gt;
| Fuel Chamber || FuelChamberUnitRateLimit || Generator&lt;br /&gt;
|-&lt;br /&gt;
| First Battery || StoredBatteryPower || Battery_1&lt;br /&gt;
|-&lt;br /&gt;
| Second Battery || StoredBatteryPower || Battery_2 &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Also, ships will require enough batteries to act as buffers during the generator spool up time. ''Note: When in use, all batteries discharge at the same rate. The more batteries you have, the slower the discharge is.''&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;Standard&amp;quot; Generator Script===&lt;br /&gt;
Makes the fuel rate limit of the fuel chamber inversely proportional to the charge level of the batteries.&lt;br /&gt;
&lt;br /&gt;
 :Generator=100-:Battery_1/100 goto1&lt;br /&gt;
&lt;br /&gt;
Alternatively, this script will keep the batteries fuller by setting the fuel rate limit to its maximum when batteries are below 90% of charge.&lt;br /&gt;
&lt;br /&gt;
 :Generator=1000-:Battery_1/10 goto1&lt;br /&gt;
&lt;br /&gt;
===Flagged Generator Script===&lt;br /&gt;
This script set the fuel rate limit to 22% (just enough to supply 2 box thrusters) if the charge level of the batteries is between 5000 (start-charging level) and 9999 (stop-charging level). 0.001% is enough fuel rate to let the generator &amp;quot;sleep&amp;quot; when the ship is not moving.&lt;br /&gt;
&lt;br /&gt;
 :Generator=22*(:Battery_1&amp;gt;5000)*(:Battery_1&amp;lt;9999)+0.001 goto1&lt;br /&gt;
&lt;br /&gt;
===Advanced Generator Script===&lt;br /&gt;
This script is tweakable to your ship configuration. Field names are those of the Laborer Module, except for the '''&amp;quot;Generator&amp;quot;''' button which should be renamed '''&amp;quot;PWR&amp;quot;''' so the script can control the fuel rate while the button still being functional. Optionally you can add an override lever with '''&amp;quot;LeverState&amp;quot;''' renamed '''&amp;quot;PWR&amp;quot;''' as well.&lt;br /&gt;
&lt;br /&gt;
 MaxBattery=20000           // total capacity&lt;br /&gt;
 LowBattery=0.99*MaxBattery // start charging below 99%&lt;br /&gt;
 MinBattery=0.20*MaxBattery // max charge rate below 20%&lt;br /&gt;
 MaxGenerator=100           // max fuel rate&lt;br /&gt;
 MinGenerator=2             // min fuel rate (near 100% charge)&lt;br /&gt;
 h=MaxGenerator c=MinGenerator          // auxiliary variables,&lt;br /&gt;
 f=MaxBattery l=LowBattery e=MinBattery // no need to change these&lt;br /&gt;
 r=(h-c)/(f-e) z=h-r*l a=r*(f-l)      // reboot: remove &amp;quot;goto9&amp;quot; briefly&lt;br /&gt;
 y=:PWR-z-r*(:Battery_1+:Battery_2)+c*(y&amp;gt;c)+a*(y&amp;gt;0) :Generator=y goto9&lt;br /&gt;
&lt;br /&gt;
It is assumed that the following device fields are set as explained (''Note: The &amp;quot;PWR&amp;quot; button is already set up in the Laborer Module''):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Ship Part !! Field Name !! Set Field value&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Button || ButtonOnStateValue|| 100&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Button || ButtonOffStateValue|| 0 &lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Button || ButtonStyle || 1&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Lever (optional) || LeverMinOutput || 0 &lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Lever (optional) || LeverMaxOutput || 200 &lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Lever (optional) || LeverCenteringSpeed || 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==[[Material point scanner|Material Point Scanner]]==&lt;br /&gt;
&lt;br /&gt;
===Material Point Scanner Script===&lt;br /&gt;
Requires two displays for '''&amp;quot;Material&amp;quot;''' and '''&amp;quot;Volume&amp;quot;''', two buttons to toggle the '''&amp;quot;Active&amp;quot;''' and '''&amp;quot;Scan&amp;quot;''' fields of the scanner, and a third button with '''&amp;quot;ButtonState&amp;quot;''' renamed '''&amp;quot;Next&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
 :Index=(:Index+:Next)*(:Index&amp;lt;:ScanResults) :Next=0&lt;br /&gt;
 :Material=:Material :Volume=:Volume goto1&lt;br /&gt;
&lt;br /&gt;
===Automatic Material Point Scanner Script===&lt;br /&gt;
This is a modified version of the above script so it can be used when the scanner is '''&amp;quot;Active&amp;quot;''' without the need of any additional buttons.&lt;br /&gt;
''Note: launching a new scan reinitialize the index to '''&amp;quot;0&amp;quot;'''.''&lt;br /&gt;
&lt;br /&gt;
 :Scan=1&lt;br /&gt;
 //Pause&lt;br /&gt;
 :Index=Next&lt;br /&gt;
 Next=(Next+1)*(Next&amp;lt;:ScanResults)&lt;br /&gt;
 :Material=:Material :Volume=:Volume goto1&lt;br /&gt;
&lt;br /&gt;
==[[Mining laser|Mining Laser]]==&lt;br /&gt;
&lt;br /&gt;
===Pulsed Mining Laser===&lt;br /&gt;
Requires a button with '''&amp;quot;ButtonState&amp;quot;''' renamed '''&amp;quot;Mining&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''. Reduces power consumption by continuously switching mining laser &amp;quot;On&amp;quot; and &amp;quot;Off&amp;quot; while the button is active.&lt;br /&gt;
&lt;br /&gt;
 :MiningLaserOn=(1-:MiningLaserOn)*:Mining goto1&lt;br /&gt;
&lt;br /&gt;
===Configurable Pulsed Mining Laser===&lt;br /&gt;
Similar to the previous script but with configurable timers for the &amp;quot;On&amp;quot; and &amp;quot;Off&amp;quot; phases of the laser.&lt;br /&gt;
''Note: Each phase is calculated in a number of YOLOL &amp;quot;tick&amp;quot; (0.2sec). So in the example, the &amp;quot;On&amp;quot; phase last 2*0.2=0.4sec and the &amp;quot;Off&amp;quot; phase 3*0.2=0.6 sec, which makes the power comsumption just a bit lower than the power production of a regular generator module (= one fuel chamber and three generator units, all in tier 1).''&lt;br /&gt;
&lt;br /&gt;
 On=2 Off=3 :MiningLaserOn=(T&amp;lt;On)*:Mining T++ T*=T&amp;lt;(On+Off) goto1&lt;br /&gt;
&lt;br /&gt;
==[[Navigation receivers|Navigation Receiver]]==&lt;br /&gt;
&lt;br /&gt;
===Received Signal Display===&lt;br /&gt;
Requires a text panel with '''&amp;quot;PanelValue&amp;quot;''' renamed '''&amp;quot;Nav&amp;quot;'''. &lt;br /&gt;
&lt;br /&gt;
 if :SignalStrength&amp;gt;0 then goto2 else :Nav=&amp;quot;No Signal&amp;quot; goto1 end&lt;br /&gt;
 :Nav=:Message+&amp;quot;\n&amp;quot;+(1000000-:SignalStrength)/1000+&amp;quot;km&amp;quot; goto1&lt;br /&gt;
&lt;br /&gt;
==[[Ore collector|Ore Collector]]==&lt;br /&gt;
&lt;br /&gt;
===Mining Laser/ Ore Collector Switching===&lt;br /&gt;
Requires a button with '''&amp;quot;ButtonState&amp;quot;''' renamed '''&amp;quot;Collecting&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''. Reduces power consumption by switching ore collector &amp;quot;On&amp;quot; only if the button is active And the mining laser is &amp;quot;Off&amp;quot;. ''Note: this script works best alongside the &amp;quot;Pulsed Mining Laser&amp;quot; scripts.''&lt;br /&gt;
&lt;br /&gt;
 :ToggleOn=(1-:MiningLaserOn)*:Collecting goto1&lt;br /&gt;
&lt;br /&gt;
==[[Ship transponder|Ship Transponder]]==&lt;br /&gt;
&lt;br /&gt;
===Outside Safezone Warning===&lt;br /&gt;
Requires an active transponder and either a warning button or a safety lid button. The button blink whenever you're outside of the safe zone. ''Note: the button needs to be active in order to blink.''&lt;br /&gt;
&lt;br /&gt;
 :ButtonEnableBlink=1-:InsideSafeZone goto1&lt;br /&gt;
&lt;br /&gt;
===Stations Building Availability===&lt;br /&gt;
Same as the previous one, but the button blink wherever you're allowed to build a station.&lt;br /&gt;
&lt;br /&gt;
 :ButtonEnableBlink=:StationsAllowed goto1&lt;br /&gt;
&lt;br /&gt;
[[Category:Networks|Common YOLOL]]&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=YOLOL/fr&amp;diff=30103</id>
		<title>YOLOL/fr</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=YOLOL/fr&amp;diff=30103"/>
		<updated>2022-02-15T19:11:41Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: /* Les variables internes et externes */  errata mineur&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Otherlang2&lt;br /&gt;
|en=YOLOL&lt;br /&gt;
|de=YOLOL:de&lt;br /&gt;
|fr=YOLOL:fr&lt;br /&gt;
|ru=YOLOL:ru&lt;br /&gt;
|ua=YOLOL:ua&lt;br /&gt;
|jp=YOLOL:jp&lt;br /&gt;
|zh-cn=YOLOL语言&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
{{#evt:service=youtube|id=https://www.youtube.com/watch?v=7lXK6_bktUk|alignment=center}}&lt;br /&gt;
&lt;br /&gt;
le YOLOL est un langage de programmation spécifique à Starbase qui est utilisé pour contrôler et gérer les [[Devices_and_machines/fr|équipements]].&amp;lt;br&amp;gt;&lt;br /&gt;
Le code est écrit ligne par ligne sur une [[YOLOL Chip/fr|puce YOLOL]] qui est ensuite insérée dans un [[Chip socket/fr|socle à puce]] connecté au [[Data networks/fr|réseau de données]] du vaisseau afin d'accéder aux [[Device fields/fr|champs de périphérique]].&amp;lt;br&amp;gt;&lt;br /&gt;
Le langage YOLOL est compatible avec presque tous les équipements et engins de l'univers connu.&lt;br /&gt;
&lt;br /&gt;
===Comment ça marche?===&lt;br /&gt;
Le YOLOL fonctionne par cycle: Les lignes de code sont exécutées les unes après les autres du haut vers le bas, puis la séquence reprend une fois la dernière ligne passée. Chaque ligne est lue dans un intervalle de temps constant de 0.2 secondes, quelque soit sa longueur et le nombre d'instructions qui y sont contenues.&lt;br /&gt;
&lt;br /&gt;
Pour faire simple:&lt;br /&gt;
# Le code se lance en commençant par la ligne 1&lt;br /&gt;
# La ligne en cours est exécutée, puis le programme passe à la suivante après un intervalle de temps de 0.2 secondes&lt;br /&gt;
# L'étape 2 est répétée pour les lignes 2, 3, 4... jusqu'à la dernière&lt;br /&gt;
# La puce se réinitialise à l'étape 1 une fois le processus terminé&lt;br /&gt;
&lt;br /&gt;
===Limites===&lt;br /&gt;
* Chaque puce YOLOL contient 20 lignes de code. Ni plus, ni moins. L'exécution d'un cycle complet prend donc 20 * 0.2 = 4 secondes si il est mené à son terme.&lt;br /&gt;
* Chaque lignes peut contenir un maximum de 70 caractères (symboles et espaces inclus).&lt;br /&gt;
&lt;br /&gt;
===Remarques===&lt;br /&gt;
* Les puces YOLOL possèdent une fonction de mise en pause, qui fige l'exécution du code à la ligne en cours.&lt;br /&gt;
* Les lignes blanches nécessitent tout de même l'intervalle de temps des 0.2 secondes pour être passées, provoquant de courts délais d'exécution (il en va de même pour les lignes ne contenant que des commentaires).&lt;br /&gt;
* Une seule ligne de code peut contenir plusieurs instructions à la fois, autant que peut le supporter la limite maximale de caractères.&lt;br /&gt;
* Certaines instructions permettent de passer à une ligne spécifique, ce qui rend le code plus modulable.&lt;br /&gt;
&lt;br /&gt;
== Les Variables ==&lt;br /&gt;
Les variables permettent d'associer un '''nom''' à une '''valeur''' pour faciliter l'acquisition ultérieure de cette dernière. Dès lors, à chaque fois que le '''nom''' de la variable sera appelé, c'est sa '''valeur''' qui sera demandée et/ou modifiée suivant l'instruction utilisée.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 ButtonState = 1&lt;br /&gt;
* Dans ce script, on attribue à la variable nommée '''ButtonState''' la valeur numérique '''1'''.&lt;br /&gt;
 if ButtonState &amp;gt;= 1 then DoorState = 1 end&lt;br /&gt;
* Maintenant, on vérifie si la valeur de la variable '''ButtonState''' est supérieure ou égale à '''1''', auquel cas la variable '''DoorState''' se voit elle aussi associée à '''1'''.&lt;br /&gt;
&lt;br /&gt;
===Les Noms de Variables===&lt;br /&gt;
====Sensibilité à la casse====&lt;br /&gt;
Le langage YOLOL est dit &amp;quot;insensible à la casse&amp;quot;, ce qui signifie que les noms des variables peuvent contenir des majuscules et des minuscules sans différencier les deux. Ainsi '''ButtonState''' et '''buttonstate''' désignent indistinctement la même variable. C'est une fonctionnalité très pratique pour rendre le code plus lisible.&lt;br /&gt;
&lt;br /&gt;
====Les variables internes et externes====&lt;br /&gt;
Il existe deux genre de variables: les '''variables internes''' qui ne peuvent être utilisées qu'au sein de la puce YOLOL où elles ont été initiées et les '''variables externes''' provenant des champs de périphériques. Ceux-ci peuvent être appelés par toute puce YOLOL branchée sur le même réseau de données pour en demander ou modifier librement les valeurs.&amp;lt;br&amp;gt;&lt;br /&gt;
Pour les différencier, les variables externes sont précédées d'un double-point (''':''').&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 if :ButtonState &amp;gt;= 1 then :DoorState = 1 end&lt;br /&gt;
* Comme vu précédemment, ce script évalue la valeur de '''ButtonState''' et, si elle est supérieure ou égale à '''1''', associe '''DoorState''' à '''1'''. Les deux variables seront cependant ici appelées sur l'ensemble des équipements présents sur le réseau de données, par exemple pour ouvrir une porte si un bouton est appuyé.&amp;lt;br&amp;gt;&lt;br /&gt;
* ''À noter: Les champs et les variables externes ayant le même nom au sein du réseau de données sont liées et ont presque toujours la même valeur. Ainsi, si plusieurs équipements possèdent un champ nommé '''DoorState''', tous seront modifiés par le script. ''&lt;br /&gt;
&lt;br /&gt;
====Contraintes====&lt;br /&gt;
Actuellement, les noms de variables comprenant &amp;quot;if&amp;quot; et &amp;quot;end&amp;quot; peuvent être mal interprétés par le programme et doivent être évités.&lt;br /&gt;
&lt;br /&gt;
===Les Valeurs de Variables===&lt;br /&gt;
====Typage====&lt;br /&gt;
Le langage YOLOL supporte deux types de valeurs pour les variables: Les '''valeurs numériques''' et les '''chaînes de caractères''' (ou &amp;quot;string&amp;quot;). Cette différence est importante car en fonction du type de variable, le résultat d'une même instruction sera différente.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 Addition = 3 + 5&lt;br /&gt;
* Cette instruction conduit à additionner les deux valeurs numériques '''3''' et '''5'''. Le résultat sera donc '''8'''.&lt;br /&gt;
 Addition = &amp;quot;3&amp;quot; + &amp;quot;5&amp;quot;&lt;br /&gt;
* Cette instruction conduit à associer les chaînes de caractères '''&amp;quot;3&amp;quot;''' et '''&amp;quot;5&amp;quot;'''. Le résultat sera donc '''&amp;quot;35&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
Les variables sont dites à &amp;quot;faible typage&amp;quot;, c'est-à-dire qu'elles ne sont pas restreintes à un seul type. Elles se convertissent systématiquement aux valeurs qui leur sont assignées. Ainsi, une variable associée à une valeur numérique peut la remplacer par une chaîne de caractères et inversement sans provoquer d'erreur dans le code.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 AutoPilot = 128.643&lt;br /&gt;
* cette première instruction associe la variable '''AutoPilot''' à la valeur numérique '''128.643'''.&lt;br /&gt;
 AutoPilot= &amp;quot;Erreur détectée&amp;quot;&lt;br /&gt;
* La variable '''AutoPilot''' se convertit en s'associant à la chaîne de caractères '''&amp;quot;Erreur détectée&amp;quot;''' et la valeur numérique '''128.643''' est effacée.&lt;br /&gt;
&lt;br /&gt;
====Les valeurs numériques====&lt;br /&gt;
Les valeurs numérique dans le langage YOLOL sont des décimales à point fixe. La précision est de un millième: Jusqu'à trois nombre sous la décimale sont acceptés. Fournir une valeur plus précise fonctionne, mais n'affecte pas le résultat final.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 Pi = 3,14159265&lt;br /&gt;
* Le script ci-dessus tente d'associer la variable '''Pi''' à la valeur numérique '''3,14159265'''. Le résultat final sera cependant '''Pi = 3.141''', coupant la précision à trois nombre sous la décimale.&lt;br /&gt;
&lt;br /&gt;
La taille maximale d'une valeur numérique est de 64-bit. De ce fait, la portée maximale (même après opération) est de [-9223372036854775.808, 9223372036854775.807]. Toutes valeurs supérieures ou inférieures seront ramenées aux limites de la portée.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 StarTrek = 9999999999999999.999&lt;br /&gt;
* Ici, on tente d'associer la variable '''StarTrek''' à la valeur numérique '''9999999999999999.999'''. Celle-ci est cependant supérieure à la portée maximale et le résultat final sera '''StarTrek = 9223372036854775.807'''.&lt;br /&gt;
&lt;br /&gt;
====Les chaînes de caractères====&lt;br /&gt;
Pour signaler une chaîne de caractères au langage YOLOL, celle-ci doit être entourée de double-guillemets ('''&amp;quot; &amp;quot;''').&lt;br /&gt;
&lt;br /&gt;
 BadRobots= &amp;quot;Saltberia&amp;quot; &lt;br /&gt;
* Ce script associe la variable '''BadRobot''' à la chaîne de caractères '''&amp;quot;Saltberia&amp;quot;'''.&lt;br /&gt;
Comme pour les valeurs numériques, la taille maximale d'une chaîne de caractères est de 64-bit.&lt;br /&gt;
&lt;br /&gt;
===Remarques===&lt;br /&gt;
* Chaque variable ne peut être que d'un type à la fois, bien que celui-ci puisse être converti au besoin.&lt;br /&gt;
* Les valeurs &amp;quot;False&amp;quot; et &amp;quot;True&amp;quot; sont de type numérique: Elles correspondent respectivement à &amp;quot;0&amp;quot; et &amp;quot;non-0&amp;quot;.&lt;br /&gt;
* Une variable non définie préalablement a par défaut la valeur numérique &amp;quot;0&amp;quot;. L'absence de valeur (&amp;quot;null&amp;quot;) n'est pas reconnue.&lt;br /&gt;
&lt;br /&gt;
==Les Opérateurs==&lt;br /&gt;
&lt;br /&gt;
Note that the available operators may be limited by the type of the programmable [[YOLOL Chip|chip]].&amp;lt;br&amp;gt;&lt;br /&gt;
Basic chips have a limited selection of functions while more advanced ones can perform more complex operations natively.&lt;br /&gt;
&lt;br /&gt;
=== Basic arithmetic and assignment operators ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation || Numeric operation || String operation || Chip availability&lt;br /&gt;
|-&lt;br /&gt;
| A + B || Addition || String A is appended by String B. || All&lt;br /&gt;
|-&lt;br /&gt;
| A - B || Subtraction || The last appearance of String B in String A is removed from String A. || All&lt;br /&gt;
|-&lt;br /&gt;
| A * B || Multiplication || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A / B || Division || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A ++ || PostIncrement (A=A+1) || Appends a space to String A. Evaluates to the original value. || All&lt;br /&gt;
|-&lt;br /&gt;
| A -- || PostDecrement (A=A-1) || Removes the last character of the string. Results in runtime error when trying to remove &amp;quot;&amp;quot;. Evaluates to the original value. || All&lt;br /&gt;
|-&lt;br /&gt;
| ++ A  || PreIncrement (A=A+1) || Appends a space to String A. Evaluates to the modified value. || All&lt;br /&gt;
|-&lt;br /&gt;
| -- A || PreDecrement (A=A-1) || Removes the last character of the string. Results in runtime error when trying to remove &amp;quot;&amp;quot;. Evaluates to the modified value. || All&lt;br /&gt;
|-&lt;br /&gt;
| A = B || Assignment (Variable A is set to the value of variable B) || Assignment || All&lt;br /&gt;
|-&lt;br /&gt;
| A += B || Addition-assignment (A=A+B) || A is assigned the value of string-operation A+B || All&lt;br /&gt;
|-&lt;br /&gt;
| A -= B || Subtraction-assignment (A=A-B) || A is assigned the value of string-operation A-B || All&lt;br /&gt;
|-&lt;br /&gt;
| A *= B || Multiplication-assignment (A=A*B) || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A /= B || Division-assignment (A=A/B) || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A ^= B || Exponentiation-assignment (A=A^B) || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A %= B || Modulo-assignment (A=A%B) || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A ^ B || Exponentiation || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A % B || Modulo || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| ABS A || Modulus (absol value) (A=A if A&amp;gt;=0, else A=-A) || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A! || Factorial || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| SQRT A || Square root of A || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| SIN A || Sine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| COS A || Cosine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| TAN A || Tangent of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| ASIN A || Inverse sine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| ACOS A || Inverse cosine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| ATAN A || Inverse tangent of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Logical operators ===&lt;br /&gt;
&lt;br /&gt;
Logical operators are checks that identify if the statement is true or false.&amp;lt;br&amp;gt;&lt;br /&gt;
All logical operations return either '''&amp;quot;0 for False&amp;quot;''' or '''&amp;quot;1 for True&amp;quot;'''. &lt;br /&gt;
The '''NOT''', '''AND''', and '''OR''' keywords consider 0 to be falsy and anything not 0 to be truthy.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation || Numeric operation || String operation || Chip availability&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;lt; B || Less than || returns 1 if String A is first in alphabetical order, returns 0 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;gt; B || Greater than || returns 0 if String A is first in alphabetical order, returns 1 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;lt;= B ||Less than or equal to || returns 1 if String A is first in alphabetical order or identical to String B, returns 0 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;gt;= B || Greater than or equal to || returns 0 if String A is first in alphabetical order or identical to String B, returns 1 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A != B || Not equal to || returns 1 if String A is not equal to String B, 0 if it is. || All&lt;br /&gt;
|-&lt;br /&gt;
| A == B || Equal to || returns 1 if String A is equal to String B, 0 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| NOT A || Not || Returns 1 if A is 0, otherwise returns 0. || All&lt;br /&gt;
|-&lt;br /&gt;
| A AND B || And || Returns 1 if neither A nor B are 0, otherwise returns 0. || All&lt;br /&gt;
|-&lt;br /&gt;
| A OR B || Or || Returns 1 if either A or B is not 0, otherwise returns 0. || All&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Mixing variable types in operations ===&lt;br /&gt;
&lt;br /&gt;
Mixing variable types in an operation handles the operation using all parameters as ''strings''.&lt;br /&gt;
&lt;br /&gt;
 previouslyNumber= &amp;quot;10&amp;quot; + 15&lt;br /&gt;
* The above script results in '''previouslyNumber''' containing the string value &amp;quot;1015&amp;quot;.&lt;br /&gt;
** Note that the involved parameters themselves don't change types, their values are just cast as strings for the purpose of the operation:&lt;br /&gt;
 &lt;br /&gt;
 purelyNumber = 15&lt;br /&gt;
 purelyString = &amp;quot;10&amp;quot; + purelyNumber&lt;br /&gt;
* When this script has executed, '''purelyString''' contains the string value of &amp;quot;1015&amp;quot;, while '''purelyNumber''' still contains the numeric value of 15.&lt;br /&gt;
&lt;br /&gt;
=== Order of Operations ===&lt;br /&gt;
&lt;br /&gt;
Operations are conducted in the following order, when operators have the same precidence, left to right.&amp;lt;br&amp;gt;&lt;br /&gt;
Where a line has multiple statements, they are executed left to right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operators &lt;br /&gt;
! Comments&lt;br /&gt;
|-&lt;br /&gt;
| ++ --&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;!&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| operators &lt;br /&gt;
| sqrt, abs, sin etc.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| negate&lt;br /&gt;
|-&lt;br /&gt;
| ^&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| */&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt; &amp;gt; == != &amp;lt;= &amp;gt;=&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Surprise!&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;+-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| not (logical negation)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| or&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| and&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Les Commandes==&lt;br /&gt;
&lt;br /&gt;
=== If-else conditional ===&lt;br /&gt;
&lt;br /&gt;
If-else statements are used to branch out the script into different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
They use the following syntax:&lt;br /&gt;
* '''if ''condition'' then ''statement'' else ''statement'' end'''&lt;br /&gt;
** Condition is a statement that results in a numeric value (where 0 is parsed as False, anything else as True), and statements are pieces of script that are run.&lt;br /&gt;
** All If-else conditional stations must have '''end''' syntax written after statement is complete.&lt;br /&gt;
** The statement has to be on one line. The if, then, else and end cannot be on different lines.&lt;br /&gt;
&lt;br /&gt;
If can be used to branch script execution into two possible outcomes temporarily based on variable value(s).&amp;lt;br&amp;gt;&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable != 2 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 3 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; endResult = 4 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* This script sets the value of '''endResult''' to 3 if '''variable''' does not have the value of 2.&lt;br /&gt;
* If '''variable''''s value is 2, '''endResult''' is set to the value of 4.&lt;br /&gt;
&lt;br /&gt;
Note that the else statement -part can be left out if not needed. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable != 2 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 3 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
*This script only sets the value of 3 to '''endResult''' if '''variable''' does not have a value of 2, and doesn't do anything else.&lt;br /&gt;
&lt;br /&gt;
==== Nesting if statements ====&lt;br /&gt;
&lt;br /&gt;
It is possible to place if-conditionals inside the true/false statement blocks to achieve further branching of execution.&amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 0 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 1 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 1 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 2 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &lt;br /&gt;
* This script sets '''endResult''' to 1 if '''variable''' equals 0.&lt;br /&gt;
* If '''variable''' doesn't equal 0, but it equals 1, '''endResult''' is set to 2.&lt;br /&gt;
&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 0 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; endResult == 1 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 2 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; endResult = 1 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
* This script sets '''endResult''' to 2 if '''variable''' has a value of 0, and '''endResult''' equals to 1.&lt;br /&gt;
* Otherwise it sets '''endResult''' to 1.&lt;br /&gt;
&lt;br /&gt;
=== Goto ===&lt;br /&gt;
&lt;br /&gt;
Goto syntax is used when the normal script reading order from 1-&amp;gt;20 is not desired, or needs to be altered.&lt;br /&gt;
&lt;br /&gt;
Goto is used with the following syntax:&lt;br /&gt;
*'''goto lineNumber'''&lt;br /&gt;
** lineNumber is the line which this command will take the script execution.&amp;lt;br&amp;gt;&lt;br /&gt;
** Any remaining script that is on the same line after the goto-command will not be executed.&lt;br /&gt;
*** using if statements before goto ignores goto syntax, assuming the if-statement is false&lt;br /&gt;
** Multiple goto commands can be added on the same line using conditionals, as '''False''' goto commands are skipped.&lt;br /&gt;
** Numeric values outside the [1,20] range are clamped to this range.&lt;br /&gt;
** Non-integer values are floored.&lt;br /&gt;
** String values will result in a Runtime Error.&lt;br /&gt;
&lt;br /&gt;
 if variable == 5 then '''goto 4''' end '''goto 6'''&lt;br /&gt;
&lt;br /&gt;
The script above will go to line number 4, if '''variable''' has a value of 5.&amp;lt;br&amp;gt;&lt;br /&gt;
Otherwise it will go to line number 6. Numerical operations can also be done &amp;quot;inside&amp;quot; the goto, e.g. &lt;br /&gt;
&lt;br /&gt;
  goto 4+1&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
Comments are useful when writing code that is used by a lot of programmers.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that comments also use up space from the pre-determined 70 character line limit and are not excluded from it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commenting is used with the following syntax:&lt;br /&gt;
*// '''text'''&lt;br /&gt;
** Text can be any single-line set of characters.&lt;br /&gt;
&lt;br /&gt;
 '''//''' This is a comment. It will explain how other lines of script work.&lt;br /&gt;
* An example of a possible comment syntax&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
&lt;br /&gt;
There are two types of errors that can happen with the programming language.&lt;br /&gt;
# Syntax errors&lt;br /&gt;
# Runtime errors&lt;br /&gt;
&lt;br /&gt;
* Syntax errors come from invalid and unparseable script and will result in the whole line not being executed.&lt;br /&gt;
* Runtime errors are only catchable while the script is being executed. They result in the execution of the line being interrupted, but any effects until the error will remain.&lt;br /&gt;
&lt;br /&gt;
== Known Bugs/Unintended Behavior ==&lt;br /&gt;
This is a list of known problems regarding yolol:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* variablenames including keywords like &amp;quot;if&amp;quot; in them will parse with the keyword in mind, resulting in a syntax error. Example: :life would be parsed as :l if e&lt;br /&gt;
&lt;br /&gt;
==YOLOL Tips &amp;amp; Tricks==&lt;br /&gt;
* [[Common YOLOL|Common YOLOL scripts]]&lt;br /&gt;
* [[YOLOL Tricks]]&lt;br /&gt;
&lt;br /&gt;
== Related Pages ==&lt;br /&gt;
* [[Data networks]]&lt;br /&gt;
* [[Devices and machines]]&lt;br /&gt;
* [[Device fields]]&lt;br /&gt;
* [[Universal tool|Universal tool]]&lt;br /&gt;
* [[YOLOL Chip]]&lt;br /&gt;
* [[Memory chip]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Networks|YOLOL:fr]]&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=YOLOL/fr&amp;diff=30102</id>
		<title>YOLOL/fr</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=YOLOL/fr&amp;diff=30102"/>
		<updated>2022-02-15T19:09:47Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: /* Les variables internes et externes */  Clarification de la condition des champs&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Otherlang2&lt;br /&gt;
|en=YOLOL&lt;br /&gt;
|de=YOLOL:de&lt;br /&gt;
|fr=YOLOL:fr&lt;br /&gt;
|ru=YOLOL:ru&lt;br /&gt;
|ua=YOLOL:ua&lt;br /&gt;
|jp=YOLOL:jp&lt;br /&gt;
|zh-cn=YOLOL语言&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
{{#evt:service=youtube|id=https://www.youtube.com/watch?v=7lXK6_bktUk|alignment=center}}&lt;br /&gt;
&lt;br /&gt;
le YOLOL est un langage de programmation spécifique à Starbase qui est utilisé pour contrôler et gérer les [[Devices_and_machines/fr|équipements]].&amp;lt;br&amp;gt;&lt;br /&gt;
Le code est écrit ligne par ligne sur une [[YOLOL Chip/fr|puce YOLOL]] qui est ensuite insérée dans un [[Chip socket/fr|socle à puce]] connecté au [[Data networks/fr|réseau de données]] du vaisseau afin d'accéder aux [[Device fields/fr|champs de périphérique]].&amp;lt;br&amp;gt;&lt;br /&gt;
Le langage YOLOL est compatible avec presque tous les équipements et engins de l'univers connu.&lt;br /&gt;
&lt;br /&gt;
===Comment ça marche?===&lt;br /&gt;
Le YOLOL fonctionne par cycle: Les lignes de code sont exécutées les unes après les autres du haut vers le bas, puis la séquence reprend une fois la dernière ligne passée. Chaque ligne est lue dans un intervalle de temps constant de 0.2 secondes, quelque soit sa longueur et le nombre d'instructions qui y sont contenues.&lt;br /&gt;
&lt;br /&gt;
Pour faire simple:&lt;br /&gt;
# Le code se lance en commençant par la ligne 1&lt;br /&gt;
# La ligne en cours est exécutée, puis le programme passe à la suivante après un intervalle de temps de 0.2 secondes&lt;br /&gt;
# L'étape 2 est répétée pour les lignes 2, 3, 4... jusqu'à la dernière&lt;br /&gt;
# La puce se réinitialise à l'étape 1 une fois le processus terminé&lt;br /&gt;
&lt;br /&gt;
===Limites===&lt;br /&gt;
* Chaque puce YOLOL contient 20 lignes de code. Ni plus, ni moins. L'exécution d'un cycle complet prend donc 20 * 0.2 = 4 secondes si il est mené à son terme.&lt;br /&gt;
* Chaque lignes peut contenir un maximum de 70 caractères (symboles et espaces inclus).&lt;br /&gt;
&lt;br /&gt;
===Remarques===&lt;br /&gt;
* Les puces YOLOL possèdent une fonction de mise en pause, qui fige l'exécution du code à la ligne en cours.&lt;br /&gt;
* Les lignes blanches nécessitent tout de même l'intervalle de temps des 0.2 secondes pour être passées, provoquant de courts délais d'exécution (il en va de même pour les lignes ne contenant que des commentaires).&lt;br /&gt;
* Une seule ligne de code peut contenir plusieurs instructions à la fois, autant que peut le supporter la limite maximale de caractères.&lt;br /&gt;
* Certaines instructions permettent de passer à une ligne spécifique, ce qui rend le code plus modulable.&lt;br /&gt;
&lt;br /&gt;
== Les Variables ==&lt;br /&gt;
Les variables permettent d'associer un '''nom''' à une '''valeur''' pour faciliter l'acquisition ultérieure de cette dernière. Dès lors, à chaque fois que le '''nom''' de la variable sera appelé, c'est sa '''valeur''' qui sera demandée et/ou modifiée suivant l'instruction utilisée.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 ButtonState = 1&lt;br /&gt;
* Dans ce script, on attribue à la variable nommée '''ButtonState''' la valeur numérique '''1'''.&lt;br /&gt;
 if ButtonState &amp;gt;= 1 then DoorState = 1 end&lt;br /&gt;
* Maintenant, on vérifie si la valeur de la variable '''ButtonState''' est supérieure ou égale à '''1''', auquel cas la variable '''DoorState''' se voit elle aussi associée à '''1'''.&lt;br /&gt;
&lt;br /&gt;
===Les Noms de Variables===&lt;br /&gt;
====Sensibilité à la casse====&lt;br /&gt;
Le langage YOLOL est dit &amp;quot;insensible à la casse&amp;quot;, ce qui signifie que les noms des variables peuvent contenir des majuscules et des minuscules sans différencier les deux. Ainsi '''ButtonState''' et '''buttonstate''' désignent indistinctement la même variable. C'est une fonctionnalité très pratique pour rendre le code plus lisible.&lt;br /&gt;
&lt;br /&gt;
====Les variables internes et externes====&lt;br /&gt;
Il existe deux genre de variables: les '''variables internes''' qui ne peuvent être utilisées qu'au sein de la puce YOLOL où elles ont été initiées et les '''variables externes''' provenant des champs de périphériques. Ceux-ci peuvent être appelés par toute puce YOLOL branchée sur le même réseau de données pour en demander ou modifier librement les valeurs.&amp;lt;br&amp;gt;&lt;br /&gt;
Pour les différencier, les variables externes sont précédées d'un double-point (''':''').&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 if :ButtonState &amp;gt;= 1 then :DoorState = 1 end&lt;br /&gt;
* Comme vu précédemment, ce script évalue la valeur de '''ButtonState''' et, si elle est supérieure ou égale à '''1''', associe '''DoorState''' à '''1'''. Les deux variables seront cependant ici appelées sur l'ensemble des équipements présents sur le réseau de données, par exemple pour ouvrir une porte si un bouton est appuyé.&amp;lt;br&amp;gt;&lt;br /&gt;
* ''À noter: Les champs et les variables externes ayant le même nom au sein du réseau de données sont liées et ont presque toujours la même valeur. Ainsi, si plusieurs équipements possèdent une variable '''DoorState''', toutes seront modifiées par le script. ''&lt;br /&gt;
&lt;br /&gt;
====Contraintes====&lt;br /&gt;
Actuellement, les noms de variables comprenant &amp;quot;if&amp;quot; et &amp;quot;end&amp;quot; peuvent être mal interprétés par le programme et doivent être évités.&lt;br /&gt;
&lt;br /&gt;
===Les Valeurs de Variables===&lt;br /&gt;
====Typage====&lt;br /&gt;
Le langage YOLOL supporte deux types de valeurs pour les variables: Les '''valeurs numériques''' et les '''chaînes de caractères''' (ou &amp;quot;string&amp;quot;). Cette différence est importante car en fonction du type de variable, le résultat d'une même instruction sera différente.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 Addition = 3 + 5&lt;br /&gt;
* Cette instruction conduit à additionner les deux valeurs numériques '''3''' et '''5'''. Le résultat sera donc '''8'''.&lt;br /&gt;
 Addition = &amp;quot;3&amp;quot; + &amp;quot;5&amp;quot;&lt;br /&gt;
* Cette instruction conduit à associer les chaînes de caractères '''&amp;quot;3&amp;quot;''' et '''&amp;quot;5&amp;quot;'''. Le résultat sera donc '''&amp;quot;35&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
Les variables sont dites à &amp;quot;faible typage&amp;quot;, c'est-à-dire qu'elles ne sont pas restreintes à un seul type. Elles se convertissent systématiquement aux valeurs qui leur sont assignées. Ainsi, une variable associée à une valeur numérique peut la remplacer par une chaîne de caractères et inversement sans provoquer d'erreur dans le code.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 AutoPilot = 128.643&lt;br /&gt;
* cette première instruction associe la variable '''AutoPilot''' à la valeur numérique '''128.643'''.&lt;br /&gt;
 AutoPilot= &amp;quot;Erreur détectée&amp;quot;&lt;br /&gt;
* La variable '''AutoPilot''' se convertit en s'associant à la chaîne de caractères '''&amp;quot;Erreur détectée&amp;quot;''' et la valeur numérique '''128.643''' est effacée.&lt;br /&gt;
&lt;br /&gt;
====Les valeurs numériques====&lt;br /&gt;
Les valeurs numérique dans le langage YOLOL sont des décimales à point fixe. La précision est de un millième: Jusqu'à trois nombre sous la décimale sont acceptés. Fournir une valeur plus précise fonctionne, mais n'affecte pas le résultat final.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 Pi = 3,14159265&lt;br /&gt;
* Le script ci-dessus tente d'associer la variable '''Pi''' à la valeur numérique '''3,14159265'''. Le résultat final sera cependant '''Pi = 3.141''', coupant la précision à trois nombre sous la décimale.&lt;br /&gt;
&lt;br /&gt;
La taille maximale d'une valeur numérique est de 64-bit. De ce fait, la portée maximale (même après opération) est de [-9223372036854775.808, 9223372036854775.807]. Toutes valeurs supérieures ou inférieures seront ramenées aux limites de la portée.&lt;br /&gt;
&lt;br /&gt;
* Exemple:&lt;br /&gt;
 StarTrek = 9999999999999999.999&lt;br /&gt;
* Ici, on tente d'associer la variable '''StarTrek''' à la valeur numérique '''9999999999999999.999'''. Celle-ci est cependant supérieure à la portée maximale et le résultat final sera '''StarTrek = 9223372036854775.807'''.&lt;br /&gt;
&lt;br /&gt;
====Les chaînes de caractères====&lt;br /&gt;
Pour signaler une chaîne de caractères au langage YOLOL, celle-ci doit être entourée de double-guillemets ('''&amp;quot; &amp;quot;''').&lt;br /&gt;
&lt;br /&gt;
 BadRobots= &amp;quot;Saltberia&amp;quot; &lt;br /&gt;
* Ce script associe la variable '''BadRobot''' à la chaîne de caractères '''&amp;quot;Saltberia&amp;quot;'''.&lt;br /&gt;
Comme pour les valeurs numériques, la taille maximale d'une chaîne de caractères est de 64-bit.&lt;br /&gt;
&lt;br /&gt;
===Remarques===&lt;br /&gt;
* Chaque variable ne peut être que d'un type à la fois, bien que celui-ci puisse être converti au besoin.&lt;br /&gt;
* Les valeurs &amp;quot;False&amp;quot; et &amp;quot;True&amp;quot; sont de type numérique: Elles correspondent respectivement à &amp;quot;0&amp;quot; et &amp;quot;non-0&amp;quot;.&lt;br /&gt;
* Une variable non définie préalablement a par défaut la valeur numérique &amp;quot;0&amp;quot;. L'absence de valeur (&amp;quot;null&amp;quot;) n'est pas reconnue.&lt;br /&gt;
&lt;br /&gt;
==Les Opérateurs==&lt;br /&gt;
&lt;br /&gt;
Note that the available operators may be limited by the type of the programmable [[YOLOL Chip|chip]].&amp;lt;br&amp;gt;&lt;br /&gt;
Basic chips have a limited selection of functions while more advanced ones can perform more complex operations natively.&lt;br /&gt;
&lt;br /&gt;
=== Basic arithmetic and assignment operators ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation || Numeric operation || String operation || Chip availability&lt;br /&gt;
|-&lt;br /&gt;
| A + B || Addition || String A is appended by String B. || All&lt;br /&gt;
|-&lt;br /&gt;
| A - B || Subtraction || The last appearance of String B in String A is removed from String A. || All&lt;br /&gt;
|-&lt;br /&gt;
| A * B || Multiplication || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A / B || Division || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A ++ || PostIncrement (A=A+1) || Appends a space to String A. Evaluates to the original value. || All&lt;br /&gt;
|-&lt;br /&gt;
| A -- || PostDecrement (A=A-1) || Removes the last character of the string. Results in runtime error when trying to remove &amp;quot;&amp;quot;. Evaluates to the original value. || All&lt;br /&gt;
|-&lt;br /&gt;
| ++ A  || PreIncrement (A=A+1) || Appends a space to String A. Evaluates to the modified value. || All&lt;br /&gt;
|-&lt;br /&gt;
| -- A || PreDecrement (A=A-1) || Removes the last character of the string. Results in runtime error when trying to remove &amp;quot;&amp;quot;. Evaluates to the modified value. || All&lt;br /&gt;
|-&lt;br /&gt;
| A = B || Assignment (Variable A is set to the value of variable B) || Assignment || All&lt;br /&gt;
|-&lt;br /&gt;
| A += B || Addition-assignment (A=A+B) || A is assigned the value of string-operation A+B || All&lt;br /&gt;
|-&lt;br /&gt;
| A -= B || Subtraction-assignment (A=A-B) || A is assigned the value of string-operation A-B || All&lt;br /&gt;
|-&lt;br /&gt;
| A *= B || Multiplication-assignment (A=A*B) || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A /= B || Division-assignment (A=A/B) || Runtime error. The rest of the line is skipped. || All&lt;br /&gt;
|-&lt;br /&gt;
| A ^= B || Exponentiation-assignment (A=A^B) || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A %= B || Modulo-assignment (A=A%B) || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A ^ B || Exponentiation || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A % B || Modulo || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| ABS A || Modulus (absol value) (A=A if A&amp;gt;=0, else A=-A) || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| A! || Factorial || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| SQRT A || Square root of A || Runtime error. The rest of the line is skipped. || Advanced, Professional&lt;br /&gt;
|-&lt;br /&gt;
| SIN A || Sine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| COS A || Cosine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| TAN A || Tangent of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| ASIN A || Inverse sine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| ACOS A || Inverse cosine of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|-&lt;br /&gt;
| ATAN A || Inverse tangent of A (degrees) || Runtime error. The rest of the line is skipped. || Professional&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Logical operators ===&lt;br /&gt;
&lt;br /&gt;
Logical operators are checks that identify if the statement is true or false.&amp;lt;br&amp;gt;&lt;br /&gt;
All logical operations return either '''&amp;quot;0 for False&amp;quot;''' or '''&amp;quot;1 for True&amp;quot;'''. &lt;br /&gt;
The '''NOT''', '''AND''', and '''OR''' keywords consider 0 to be falsy and anything not 0 to be truthy.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation || Numeric operation || String operation || Chip availability&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;lt; B || Less than || returns 1 if String A is first in alphabetical order, returns 0 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;gt; B || Greater than || returns 0 if String A is first in alphabetical order, returns 1 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;lt;= B ||Less than or equal to || returns 1 if String A is first in alphabetical order or identical to String B, returns 0 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A &amp;gt;= B || Greater than or equal to || returns 0 if String A is first in alphabetical order or identical to String B, returns 1 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| A != B || Not equal to || returns 1 if String A is not equal to String B, 0 if it is. || All&lt;br /&gt;
|-&lt;br /&gt;
| A == B || Equal to || returns 1 if String A is equal to String B, 0 if not. || All&lt;br /&gt;
|-&lt;br /&gt;
| NOT A || Not || Returns 1 if A is 0, otherwise returns 0. || All&lt;br /&gt;
|-&lt;br /&gt;
| A AND B || And || Returns 1 if neither A nor B are 0, otherwise returns 0. || All&lt;br /&gt;
|-&lt;br /&gt;
| A OR B || Or || Returns 1 if either A or B is not 0, otherwise returns 0. || All&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Mixing variable types in operations ===&lt;br /&gt;
&lt;br /&gt;
Mixing variable types in an operation handles the operation using all parameters as ''strings''.&lt;br /&gt;
&lt;br /&gt;
 previouslyNumber= &amp;quot;10&amp;quot; + 15&lt;br /&gt;
* The above script results in '''previouslyNumber''' containing the string value &amp;quot;1015&amp;quot;.&lt;br /&gt;
** Note that the involved parameters themselves don't change types, their values are just cast as strings for the purpose of the operation:&lt;br /&gt;
 &lt;br /&gt;
 purelyNumber = 15&lt;br /&gt;
 purelyString = &amp;quot;10&amp;quot; + purelyNumber&lt;br /&gt;
* When this script has executed, '''purelyString''' contains the string value of &amp;quot;1015&amp;quot;, while '''purelyNumber''' still contains the numeric value of 15.&lt;br /&gt;
&lt;br /&gt;
=== Order of Operations ===&lt;br /&gt;
&lt;br /&gt;
Operations are conducted in the following order, when operators have the same precidence, left to right.&amp;lt;br&amp;gt;&lt;br /&gt;
Where a line has multiple statements, they are executed left to right.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operators &lt;br /&gt;
! Comments&lt;br /&gt;
|-&lt;br /&gt;
| ++ --&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;!&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| operators &lt;br /&gt;
| sqrt, abs, sin etc.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| negate&lt;br /&gt;
|-&lt;br /&gt;
| ^&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| */&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;&amp;lt; &amp;gt; == != &amp;lt;= &amp;gt;=&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Surprise!&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;+-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| not (logical negation)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| or&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| and&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Les Commandes==&lt;br /&gt;
&lt;br /&gt;
=== If-else conditional ===&lt;br /&gt;
&lt;br /&gt;
If-else statements are used to branch out the script into different paths.&amp;lt;br&amp;gt;&lt;br /&gt;
They use the following syntax:&lt;br /&gt;
* '''if ''condition'' then ''statement'' else ''statement'' end'''&lt;br /&gt;
** Condition is a statement that results in a numeric value (where 0 is parsed as False, anything else as True), and statements are pieces of script that are run.&lt;br /&gt;
** All If-else conditional stations must have '''end''' syntax written after statement is complete.&lt;br /&gt;
** The statement has to be on one line. The if, then, else and end cannot be on different lines.&lt;br /&gt;
&lt;br /&gt;
If can be used to branch script execution into two possible outcomes temporarily based on variable value(s).&amp;lt;br&amp;gt;&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable != 2 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 3 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; endResult = 4 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* This script sets the value of '''endResult''' to 3 if '''variable''' does not have the value of 2.&lt;br /&gt;
* If '''variable''''s value is 2, '''endResult''' is set to the value of 4.&lt;br /&gt;
&lt;br /&gt;
Note that the else statement -part can be left out if not needed. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example:'''&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable != 2 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 3 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
*This script only sets the value of 3 to '''endResult''' if '''variable''' does not have a value of 2, and doesn't do anything else.&lt;br /&gt;
&lt;br /&gt;
==== Nesting if statements ====&lt;br /&gt;
&lt;br /&gt;
It is possible to place if-conditionals inside the true/false statement blocks to achieve further branching of execution.&amp;lt;br&amp;gt;&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 0 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 1 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 1 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 2 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &lt;br /&gt;
* This script sets '''endResult''' to 1 if '''variable''' equals 0.&lt;br /&gt;
* If '''variable''' doesn't equal 0, but it equals 1, '''endResult''' is set to 2.&lt;br /&gt;
&lt;br /&gt;
Example:&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; variable == 0 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''if'''&amp;lt;/font&amp;gt; endResult == 1 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''then'''&amp;lt;/font&amp;gt; endResult = 2 &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt; &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''else'''&amp;lt;/font&amp;gt; endResult = 1 &amp;lt;font color=&amp;quot;orangered&amp;quot;&amp;gt;'''end'''&amp;lt;/font&amp;gt;&lt;br /&gt;
* This script sets '''endResult''' to 2 if '''variable''' has a value of 0, and '''endResult''' equals to 1.&lt;br /&gt;
* Otherwise it sets '''endResult''' to 1.&lt;br /&gt;
&lt;br /&gt;
=== Goto ===&lt;br /&gt;
&lt;br /&gt;
Goto syntax is used when the normal script reading order from 1-&amp;gt;20 is not desired, or needs to be altered.&lt;br /&gt;
&lt;br /&gt;
Goto is used with the following syntax:&lt;br /&gt;
*'''goto lineNumber'''&lt;br /&gt;
** lineNumber is the line which this command will take the script execution.&amp;lt;br&amp;gt;&lt;br /&gt;
** Any remaining script that is on the same line after the goto-command will not be executed.&lt;br /&gt;
*** using if statements before goto ignores goto syntax, assuming the if-statement is false&lt;br /&gt;
** Multiple goto commands can be added on the same line using conditionals, as '''False''' goto commands are skipped.&lt;br /&gt;
** Numeric values outside the [1,20] range are clamped to this range.&lt;br /&gt;
** Non-integer values are floored.&lt;br /&gt;
** String values will result in a Runtime Error.&lt;br /&gt;
&lt;br /&gt;
 if variable == 5 then '''goto 4''' end '''goto 6'''&lt;br /&gt;
&lt;br /&gt;
The script above will go to line number 4, if '''variable''' has a value of 5.&amp;lt;br&amp;gt;&lt;br /&gt;
Otherwise it will go to line number 6. Numerical operations can also be done &amp;quot;inside&amp;quot; the goto, e.g. &lt;br /&gt;
&lt;br /&gt;
  goto 4+1&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
&lt;br /&gt;
Comments are useful when writing code that is used by a lot of programmers.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that comments also use up space from the pre-determined 70 character line limit and are not excluded from it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commenting is used with the following syntax:&lt;br /&gt;
*// '''text'''&lt;br /&gt;
** Text can be any single-line set of characters.&lt;br /&gt;
&lt;br /&gt;
 '''//''' This is a comment. It will explain how other lines of script work.&lt;br /&gt;
* An example of a possible comment syntax&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
&lt;br /&gt;
There are two types of errors that can happen with the programming language.&lt;br /&gt;
# Syntax errors&lt;br /&gt;
# Runtime errors&lt;br /&gt;
&lt;br /&gt;
* Syntax errors come from invalid and unparseable script and will result in the whole line not being executed.&lt;br /&gt;
* Runtime errors are only catchable while the script is being executed. They result in the execution of the line being interrupted, but any effects until the error will remain.&lt;br /&gt;
&lt;br /&gt;
== Known Bugs/Unintended Behavior ==&lt;br /&gt;
This is a list of known problems regarding yolol:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* variablenames including keywords like &amp;quot;if&amp;quot; in them will parse with the keyword in mind, resulting in a syntax error. Example: :life would be parsed as :l if e&lt;br /&gt;
&lt;br /&gt;
==YOLOL Tips &amp;amp; Tricks==&lt;br /&gt;
* [[Common YOLOL|Common YOLOL scripts]]&lt;br /&gt;
* [[YOLOL Tricks]]&lt;br /&gt;
&lt;br /&gt;
== Related Pages ==&lt;br /&gt;
* [[Data networks]]&lt;br /&gt;
* [[Devices and machines]]&lt;br /&gt;
* [[Device fields]]&lt;br /&gt;
* [[Universal tool|Universal tool]]&lt;br /&gt;
* [[YOLOL Chip]]&lt;br /&gt;
* [[Memory chip]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Networks|YOLOL:fr]]&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=Laborer_module&amp;diff=30101</id>
		<title>Laborer module</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=Laborer_module&amp;diff=30101"/>
		<updated>2022-02-15T18:42:42Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: First creation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A ship obtained as a reward during the tutorials. It is the first ship for all new players.&lt;br /&gt;
&amp;lt;/br&amp;gt; Actually the only prebuilt ship compatible with modules on easy build mode.&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=Common_YOLOL&amp;diff=30100</id>
		<title>Common YOLOL</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=Common_YOLOL&amp;diff=30100"/>
		<updated>2022-02-15T18:32:40Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: Increasing overall readability for future modifications&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A collection of small common scripts meant to be easily copied and understood for the [[YOLOL|YOLOL]] beginners.&lt;br /&gt;
&lt;br /&gt;
''This page is a &amp;quot;Work In Progress&amp;quot;. Don't hesitate to contribute! Just make sure to respect the following rules:&lt;br /&gt;
* Avoid complex codes. As said, These must be easily understood by beginners. If you can't simplify your scripts, please add some comments to explain the most technical parts.&lt;br /&gt;
* Avoid as possible to modify the [[Device fields|device fields]]. If necessary, it must be specified which field has to be renamed (left column) and/or set to a given value (right column). ''&lt;br /&gt;
&lt;br /&gt;
==[[Flight control unit|Flight Control Unit]]==&lt;br /&gt;
&lt;br /&gt;
===Single Forward/Backward Lever===&lt;br /&gt;
Requires a center lever bound to '''&amp;quot;FcuForward&amp;quot;'''. ''Note: You can easily modify the default regular lever from most prebuilt ships and cockpit modules to be used as a center Lever. Just change the '''&amp;quot;LeverMinOutput&amp;quot;''' value from 0 to -100.''&lt;br /&gt;
&lt;br /&gt;
 :FcuBackward=-:FcuForward goto1&lt;br /&gt;
&lt;br /&gt;
===Speed Limiter===&lt;br /&gt;
Requires to modify the lever bound to '''&amp;quot;FcuForward&amp;quot;''' which shall be renamed '''&amp;quot;Fwd&amp;quot;''' and another regular lever with '''&amp;quot;LeverState&amp;quot;''' renamed '''&amp;quot;Limiter&amp;quot;'''. This script allow you to set a maximum forward speed to your ship, which is useful when you need more accurate movements (e.g. while mining or docking).&lt;br /&gt;
&lt;br /&gt;
 :FcuForward=:Fwd/100*:Limiter goto1&lt;br /&gt;
&lt;br /&gt;
''Note: If you already modified your '''&amp;quot;FcuFoward&amp;quot;''' lever to be used as a '''&amp;quot;Single Forward/Backward Lever&amp;quot;''' (see above), you can use the '''&amp;quot;Backward&amp;quot;''' lever made useless as the '''&amp;quot;Limiter&amp;quot;''' lever. Just make sure you have '''&amp;quot;FcuForward&amp;quot;''' renamed '''&amp;quot;FwdBwd&amp;quot;''' instead so you can modify forward and backward thrust individually. This way your YOLOL scripts should be written as follows:''&lt;br /&gt;
&lt;br /&gt;
 :FcuForward=:FwdBwd/100*:Limiter goto1&lt;br /&gt;
&lt;br /&gt;
 :FcuBackward=-:FwdBwd goto1&lt;br /&gt;
&lt;br /&gt;
===Turtle Mode===&lt;br /&gt;
Similar to the previous script but with a button instead of a lever. '''&amp;quot;ButtonState&amp;quot;''' should be renamed '''&amp;quot;Turtle&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''. In addition set the '''&amp;quot;ButtonOffStateValue&amp;quot;''' to '''&amp;quot;100&amp;quot;''' and the '''&amp;quot;ButtonOnStateValue&amp;quot;''' to the desired speed reduction. For example having '''&amp;quot;30&amp;quot;''' means 30% of maximum speed when the button is active.&lt;br /&gt;
&lt;br /&gt;
 :FcuForward=:Fwd/100*:Turtle goto1&lt;br /&gt;
&lt;br /&gt;
==[[Fuel chamber|Fuel Chamber]]==&lt;br /&gt;
&lt;br /&gt;
The following scripts are made to be used with the ship &amp;quot;[[Laborer module|Laborer Module]]&amp;quot; rewarded during the tutorials. To make it compatible with other prebuilt or own-made ships, refer to the table below for the corresponding modifications in the [[Device fields|device fields]]. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Ship Part !! Default Field Name !! Laborer Module Field Name&lt;br /&gt;
|-&lt;br /&gt;
| Fuel Chamber || FuelChamberUnitRateLimit || Generator&lt;br /&gt;
|-&lt;br /&gt;
| First Battery || StoredBatteryPower || Battery_1&lt;br /&gt;
|-&lt;br /&gt;
| Second Battery || StoredBatteryPower || Battery_2 &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Also, ships will require enough batteries to act as buffers during the generator spool up time. ''Note: When in use, all batteries discharge at the same rate. The more batteries you have, the slower the discharge is.''&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;Standard&amp;quot; Generator Script===&lt;br /&gt;
Makes the fuel rate limit of the fuel chamber inversely proportional to the charge level of the batteries.&lt;br /&gt;
&lt;br /&gt;
 :Generator=100-:Battery_1/100 goto1&lt;br /&gt;
&lt;br /&gt;
Alternatively, this script will keep the batteries fuller by setting the fuel rate limit to its maximum when batteries are below 90% of charge.&lt;br /&gt;
&lt;br /&gt;
 :Generator=1000-:Battery_1/10 goto1&lt;br /&gt;
&lt;br /&gt;
===Flagged Generator Script===&lt;br /&gt;
This script set the fuel rate limit to 22% (just enough to supply 2 box thrusters) if the charge level of the batteries is between 5000 (start-charging level) and 9999 (stop-charging level). 0.001% is enough fuel rate to let the generator &amp;quot;sleep&amp;quot; when the ship is not moving.&lt;br /&gt;
&lt;br /&gt;
 :Generator=22*(:Battery_1&amp;gt;5000)*(:Battery_1&amp;lt;9999)+0.001 goto1&lt;br /&gt;
&lt;br /&gt;
===Advanced Generator Script===&lt;br /&gt;
This script is tweakable to your ship configuration. Field names are those of the Laborer Module, except for the '''&amp;quot;Generator&amp;quot;''' button which should be renamed '''&amp;quot;PWR&amp;quot;''' so the script can control the fuel rate while the button still being functional. Optionally you can add an override lever with '''&amp;quot;LeverState&amp;quot;''' renamed '''&amp;quot;PWR&amp;quot;''' as well.&lt;br /&gt;
&lt;br /&gt;
 MaxBattery=20000           // total capacity&lt;br /&gt;
 LowBattery=0.99*MaxBattery // start charging below 99%&lt;br /&gt;
 MinBattery=0.20*MaxBattery // max charge rate below 20%&lt;br /&gt;
 MaxGenerator=100           // max fuel rate&lt;br /&gt;
 MinGenerator=2             // min fuel rate (near 100% charge)&lt;br /&gt;
 h=MaxGenerator c=MinGenerator          // auxiliary variables,&lt;br /&gt;
 f=MaxBattery l=LowBattery e=MinBattery // no need to change these&lt;br /&gt;
 r=(h-c)/(f-e) z=h-r*l a=r*(f-l)      // reboot: remove &amp;quot;goto9&amp;quot; briefly&lt;br /&gt;
 y=:PWR-z-r*(:Battery_1+:Battery_2)+c*(y&amp;gt;c)+a*(y&amp;gt;0) :Generator=y goto9&lt;br /&gt;
&lt;br /&gt;
It is assumed that the following device fields are set as explained (''Note: The &amp;quot;PWR&amp;quot; button is already set up in the Laborer Module''):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Ship Part !! Field Name !! Set Field value&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Button || ButtonOnStateValue|| 100&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Button || ButtonOffStateValue|| 0 &lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Button || ButtonStyle || 1&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Lever (optional) || LeverMinOutput || 0 &lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Lever (optional) || LeverMaxOutput || 200 &lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Lever (optional) || LeverCenteringSpeed || 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==[[Material point scanner|Material Point Scanner]]==&lt;br /&gt;
&lt;br /&gt;
===Material Point Scanner Script===&lt;br /&gt;
Requires 2 displays for '''&amp;quot;Material&amp;quot;''' and '''&amp;quot;Volume&amp;quot;''', 2 buttons to toggle '''&amp;quot;Active&amp;quot;''' and '''&amp;quot;Scan&amp;quot;''' and a third one with '''&amp;quot;ButtonState&amp;quot;''' renamed '''&amp;quot;Next&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''.&lt;br /&gt;
&lt;br /&gt;
 :Index=(:Index+:Next)*(:Index&amp;lt;:ScanResults) :Next=0&lt;br /&gt;
 :Material=:Material :Volume=:Volume goto1&lt;br /&gt;
&lt;br /&gt;
===Automatic Material Point Scanner Script===&lt;br /&gt;
This is a modified version of the above script so it can be used when the scanner is '''&amp;quot;Active&amp;quot;''' without the need of any additional buttons.&lt;br /&gt;
''Note: launching a new scan reinitialize the index to '''&amp;quot;0&amp;quot;'''.''&lt;br /&gt;
&lt;br /&gt;
 :Scan=1&lt;br /&gt;
 //Pause&lt;br /&gt;
 :Index=Next&lt;br /&gt;
 Next=(Next+1)*(Next&amp;lt;:ScanResults)&lt;br /&gt;
 :Material=:Material :Volume=:Volume goto1&lt;br /&gt;
&lt;br /&gt;
==[[Mining laser|Mining Laser]]==&lt;br /&gt;
&lt;br /&gt;
===Pulsed Mining Laser===&lt;br /&gt;
Requires a button with '''&amp;quot;ButtonState&amp;quot;''' renamed '''&amp;quot;Mining&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''. Reduces power consumption by continuously switching mining laser &amp;quot;On&amp;quot; and &amp;quot;Off&amp;quot; while the button is active.&lt;br /&gt;
&lt;br /&gt;
 :MiningLaserOn=(1-:MiningLaserOn)*:Mining goto1&lt;br /&gt;
&lt;br /&gt;
===Configurable Pulsed Mining Laser===&lt;br /&gt;
Similar to the previous script but with configurable timers for the &amp;quot;On&amp;quot; and &amp;quot;Off&amp;quot; phases of the laser.&lt;br /&gt;
''Note: Each phase is calculated in a number of YOLOL &amp;quot;tick&amp;quot; (0.2sec). So in the example, the &amp;quot;On&amp;quot; phase last 2*0.2=0.4sec and the &amp;quot;Off&amp;quot; phase 3*0.2=0.6 sec, which makes the power comsumption just a bit lower than the power production of a regular generator module (= one fuel chamber and three generator units, all in tier 1).''&lt;br /&gt;
&lt;br /&gt;
 On=2 Off=3 :MiningLaserOn=(T&amp;lt;On)*:Mining T++ T*=T&amp;lt;(On+Off) goto1&lt;br /&gt;
&lt;br /&gt;
==[[Navigation receivers|Navigation Receiver]]==&lt;br /&gt;
&lt;br /&gt;
===Received Signal Display===&lt;br /&gt;
Requires a text panel with '''&amp;quot;PanelValue&amp;quot;''' renamed '''&amp;quot;Nav&amp;quot;'''. &lt;br /&gt;
&lt;br /&gt;
 if :SignalStrength&amp;gt;0 then goto2 else :Nav=&amp;quot;No Signal&amp;quot; goto1 end&lt;br /&gt;
 :Nav=:Message+&amp;quot;\n&amp;quot;+(1000000-:SignalStrength)/1000+&amp;quot;km&amp;quot; goto1&lt;br /&gt;
&lt;br /&gt;
==[[Ore collector|Ore Collector]]==&lt;br /&gt;
&lt;br /&gt;
===Mining Laser/ Ore Collector Switching===&lt;br /&gt;
Requires a button with '''&amp;quot;ButtonState&amp;quot;''' renamed '''&amp;quot;Collecting&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''. Reduces power consumption by switching ore collector &amp;quot;On&amp;quot; only if the button is active And the mining laser is &amp;quot;Off&amp;quot;. ''Note: this script works best alongside the &amp;quot;Pulsed Mining Laser&amp;quot; scripts.''&lt;br /&gt;
&lt;br /&gt;
 :ToggleOn=(1-:MiningLaserOn)*:Collecting goto1&lt;br /&gt;
&lt;br /&gt;
==[[Ship transponder|Ship Transponder]]==&lt;br /&gt;
&lt;br /&gt;
===Outside Safezone Warning===&lt;br /&gt;
Requires an active transponder and either a warning button or a safety lid button. The button blink whenever you're outside of the safe zone. ''Note: the button needs to be active in order to blink.''&lt;br /&gt;
&lt;br /&gt;
 :ButtonEnableBlink=1-:InsideSafeZone goto1&lt;br /&gt;
&lt;br /&gt;
===Stations Building Availability===&lt;br /&gt;
Same as the previous one, but the button blink wherever you're allowed to build a station.&lt;br /&gt;
&lt;br /&gt;
 :ButtonEnableBlink=:StationsAllowed goto1&lt;br /&gt;
&lt;br /&gt;
[[Category:Networks|Common YOLOL]]&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=Common_YOLOL&amp;diff=30099</id>
		<title>Common YOLOL</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=Common_YOLOL&amp;diff=30099"/>
		<updated>2022-02-15T18:21:42Z</updated>

		<summary type="html">&lt;p&gt;Danthbyrth: /* Fuel Chamber */  Making all scripts compatible with laborer module, adding a comparison table at the beginning for fields. Overall reformulation.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A collection of small common scripts meant to be easily copied and understood for the [[YOLOL|YOLOL]] beginner.&lt;br /&gt;
&lt;br /&gt;
''This page is a &amp;quot;Work In Progress&amp;quot;. Don't hesitate to contribute! Just make sure to respect the following rules:&lt;br /&gt;
* Avoid complex codes. As said, These must be easily understood by beginners. If you can't simplify your scripts, please add some comments to explain the most technical parts.&lt;br /&gt;
* Avoid as possible to modify the [[Device fields|device fields]]. If necessary, it must be specified which variable has to be renamed (left column) and/or set to a given value (right column). ''&lt;br /&gt;
&lt;br /&gt;
==[[Flight control unit|Flight Control Unit]]==&lt;br /&gt;
&lt;br /&gt;
===Single Forward/Backward Lever===&lt;br /&gt;
Requires a center lever bound to '''&amp;quot;FcuForward&amp;quot;'''. ''Note: You can easily modify the default regular lever from most prebuilt ships and cockpit modules to be used as a center Lever. Just change the '''&amp;quot;LeverMinOutput&amp;quot;''' value from 0 to -100.''&lt;br /&gt;
 :FcuBackward=-:FcuForward goto1&lt;br /&gt;
&lt;br /&gt;
===Speed Limiter===&lt;br /&gt;
Requires to modify the lever bound to '''&amp;quot;FcuForward&amp;quot;''' which shall be renamed '''&amp;quot;Fwd&amp;quot;''' and another regular lever with '''&amp;quot;LeverState&amp;quot;''' renamed '''&amp;quot;Limiter&amp;quot;'''. This script allow you to set a maximum forward speed to your ship, which is useful when you need more accurate movements (e.g. while mining or docking).&lt;br /&gt;
 :FcuForward=:Fwd/100*:Limiter goto1&lt;br /&gt;
''Note: If you already modified your '''&amp;quot;FcuFoward&amp;quot;''' lever to be used as a '''&amp;quot;Single Forward/Backward Lever&amp;quot;''' (see above), you can use the '''&amp;quot;Backward&amp;quot;''' lever made useless as the '''&amp;quot;Limiter&amp;quot;''' lever. Just make sure you have '''&amp;quot;FcuForward&amp;quot;''' renamed '''&amp;quot;FwdBwd&amp;quot;''' instead so you can modify forward and backward thrust individually. This way your YOLOL scripts should be written as follows:''&lt;br /&gt;
 :FcuForward=:FwdBwd/100*:Limiter goto1&lt;br /&gt;
&lt;br /&gt;
 :FcuBackward=-:FwdBwd goto1&lt;br /&gt;
&lt;br /&gt;
===Turtle Mode===&lt;br /&gt;
Similar to the previous script but with a button instead of a lever. '''&amp;quot;ButtonState&amp;quot;''' should be renamed '''&amp;quot;Turtle&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''. In addition set the '''&amp;quot;ButtonOffStateValue&amp;quot;''' to '''&amp;quot;100&amp;quot;''' and the '''&amp;quot;ButtonOnStateValue&amp;quot;''' to the desired speed reduction. For example having '''&amp;quot;30&amp;quot;''' means 30% of maximum speed when the button is active.&lt;br /&gt;
 :FcuForward=:Fwd/100*:Turtle goto1&lt;br /&gt;
&lt;br /&gt;
==[[Fuel chamber|Fuel Chamber]]==&lt;br /&gt;
&lt;br /&gt;
The following scripts are made to be used with the ship &amp;quot;[[Laborer module|Laborer Module]]&amp;quot; rewarded during the tutorials. To make it compatible with other prebuilt or own-made ships, refer to the table below for the corresponding modifications in the [[Device fields|device fields]]. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Ship Part !! Default Field Name !! Laborer Module Field Name&lt;br /&gt;
|-&lt;br /&gt;
| Fuel Chamber || FuelChamberUnitRateLimit || Generator&lt;br /&gt;
|-&lt;br /&gt;
| First Battery || StoredBatteryPower || Battery_1&lt;br /&gt;
|-&lt;br /&gt;
| Second Battery || StoredBatteryPower || Battery_2 &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Also, ships will require enough batteries to act as buffers during the generator spool up time. ''Note: When in use, all batteries discharge at the same rate. The more batteries you have, the slower the discharge is.''&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;Standard&amp;quot; Generator Script===&lt;br /&gt;
&lt;br /&gt;
Makes the fuel rate limit of the fuel chamber inversely proportional to the charge level of the batteries.&lt;br /&gt;
&lt;br /&gt;
 :Generator=100-:Battery_1/100 goto1&lt;br /&gt;
&lt;br /&gt;
Alternatively, this script will keep the batteries fuller by setting the fuel rate limit to its maximum when batteries are below 90% of charge.&lt;br /&gt;
&lt;br /&gt;
 :Generator=1000-:Battery_1/10 goto1&lt;br /&gt;
&lt;br /&gt;
===Flagged Generator Script===&lt;br /&gt;
&lt;br /&gt;
This script set the fuel rate limit to 22% (just enough to supply 2 box thrusters) if the charge level of the batteries is between 5000 (start-charging level) and 9999 (stop-charging level). 0.001% is enough fuel rate to let the generator &amp;quot;sleep&amp;quot; when the ship is not moving.&lt;br /&gt;
&lt;br /&gt;
 :Generator=22*(:Battery_1&amp;gt;5000)*(:Battery_1&amp;lt;9999)+0.001 goto1&lt;br /&gt;
&lt;br /&gt;
===Advanced Generator Script===&lt;br /&gt;
&lt;br /&gt;
This script is tweakable to your ship configuration. Field names are those of the Laborer Module, except for the '''&amp;quot;Generator&amp;quot;''' button which should be renamed '''&amp;quot;PWR&amp;quot;''' so the script can control the fuel rate while the button still being functional. Optionally you can add an override lever with '''&amp;quot;LeverState&amp;quot;''' renamed '''&amp;quot;PWR&amp;quot;''' as well.&lt;br /&gt;
&lt;br /&gt;
 MaxBattery=20000           // total capacity&lt;br /&gt;
 LowBattery=0.99*MaxBattery // start charging below 99%&lt;br /&gt;
 MinBattery=0.20*MaxBattery // max charge rate below 20%&lt;br /&gt;
 MaxGenerator=100           // max fuel rate&lt;br /&gt;
 MinGenerator=2             // min fuel rate (near 100% charge)&lt;br /&gt;
 h=MaxGenerator c=MinGenerator          // auxiliary variables,&lt;br /&gt;
 f=MaxBattery l=LowBattery e=MinBattery // no need to change these&lt;br /&gt;
 r=(h-c)/(f-e) z=h-r*l a=r*(f-l)      // reboot: remove &amp;quot;goto9&amp;quot; briefly&lt;br /&gt;
 y=:PWR-z-r*(:Battery_1+:Battery_2)+c*(y&amp;gt;c)+a*(y&amp;gt;0) :Generator=y goto9&lt;br /&gt;
&lt;br /&gt;
It is assumed that the following device fields are set as explained (''Note: The &amp;quot;PWR&amp;quot; button is already set up in the Laborer Module''):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Ship Part !! Field Name !! Set Field value&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Button || ButtonOnStateValue|| 100&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Button || ButtonOffStateValue|| 0 &lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Button || ButtonStyle || 1&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Lever (optional) || LeverMinOutput || 0 &lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Lever (optional) || LeverMaxOutput || 200 &lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;PWR&amp;quot; Lever (optional) || LeverCenteringSpeed || 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==[[Material point scanner|Material Point Scanner]]==&lt;br /&gt;
&lt;br /&gt;
===Material Point Scanner Script===&lt;br /&gt;
Requires 2 displays for '''&amp;quot;Material&amp;quot;''' and '''&amp;quot;Volume&amp;quot;''', 2 buttons to toggle '''&amp;quot;Active&amp;quot;''' and '''&amp;quot;Scan&amp;quot;''' and a third one with '''&amp;quot;ButtonState&amp;quot;''' renamed '''&amp;quot;Next&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''.&lt;br /&gt;
 :Index=(:Index+:Next)*(:Index&amp;lt;:ScanResults) :Next=0&lt;br /&gt;
 :Material=:Material :Volume=:Volume goto1&lt;br /&gt;
&lt;br /&gt;
===Automatic Material Point Scanner Script===&lt;br /&gt;
This is a modified version of the above script so it can be used when the scanner is '''&amp;quot;Active&amp;quot;''' without the need of any additional buttons.&lt;br /&gt;
''Note: launching a new scan reinitialize the index to '''&amp;quot;0&amp;quot;'''.''&lt;br /&gt;
 :Scan=1&lt;br /&gt;
 //Pause&lt;br /&gt;
 :Index=Next&lt;br /&gt;
 Next=(Next+1)*(Next&amp;lt;:ScanResults)&lt;br /&gt;
 :Material=:Material :Volume=:Volume goto1&lt;br /&gt;
&lt;br /&gt;
==[[Mining laser|Mining Laser]]==&lt;br /&gt;
&lt;br /&gt;
===Pulsed Mining Laser===&lt;br /&gt;
Requires a button with '''&amp;quot;ButtonState&amp;quot;''' renamed '''&amp;quot;Mining&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''. Reduces power consumption by continuously switching mining laser &amp;quot;on&amp;quot; and &amp;quot;off&amp;quot; while the button is active.&lt;br /&gt;
 :MiningLaserOn=(1-:MiningLaserOn)*:Mining goto1&lt;br /&gt;
&lt;br /&gt;
===Configurable Pulsed Mining Laser===&lt;br /&gt;
Similar to the previous script but with configurable timers for the &amp;quot;On&amp;quot; and &amp;quot;Off&amp;quot; phases of the laser.&lt;br /&gt;
''Note: Each phase is calculated in number of YOLOL &amp;quot;tick&amp;quot; (0.2sec). So in the example, the &amp;quot;On&amp;quot; phase last 2*0.2=0.4sec and the &amp;quot;Off&amp;quot; phase 3*0.2=0.6 sec, which makes the power comsumption just a bit lower than the power production of a generator module (= one fuel chamber and three generator units, all in tier 1).''&lt;br /&gt;
 On=2 Off=3 :MiningLaserOn=(T&amp;lt;On)*:Mining T++ T*=T&amp;lt;(On+Off) goto1&lt;br /&gt;
&lt;br /&gt;
==[[Navigation receivers|Navigation Receiver]]==&lt;br /&gt;
&lt;br /&gt;
===Received Signal Display===&lt;br /&gt;
Requires a text panel with '''&amp;quot;PanelValue&amp;quot;''' renamed '''&amp;quot;Nav&amp;quot;'''. &lt;br /&gt;
 if :SignalStrength&amp;gt;0 then goto2 else :Nav=&amp;quot;No Signal&amp;quot; goto1 end&lt;br /&gt;
 :Nav=:Message+&amp;quot;\n&amp;quot;+(1000000-:SignalStrength)/1000+&amp;quot;km&amp;quot; goto1&lt;br /&gt;
&lt;br /&gt;
==[[Ore collector|Ore Collector]]==&lt;br /&gt;
&lt;br /&gt;
===Mining Laser/ Ore Collector Switching===&lt;br /&gt;
Requires a button with '''&amp;quot;ButtonState&amp;quot;''' renamed '''&amp;quot;Collecting&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''. Reduces power consumption by switching ore collector &amp;quot;On&amp;quot; only if the button is active And the mining laser is &amp;quot;Off&amp;quot;. ''Note: this script works best alongside the &amp;quot;Pulsed Mining Laser&amp;quot; scripts.''&lt;br /&gt;
 :ToggleOn=(1-:MiningLaserOn)*:Collecting goto1&lt;br /&gt;
&lt;br /&gt;
==[[Ship transponder|Ship Transponder]]==&lt;br /&gt;
&lt;br /&gt;
===Outside Safezone Warning===&lt;br /&gt;
Requires an active transponder and either a warning button or a safety lid button. The button blink whenever you're outside of the safe zone. ''Note: the button needs to be On in order to blink.''&lt;br /&gt;
 :ButtonEnableBlink=1-:InsideSafeZone goto1&lt;br /&gt;
&lt;br /&gt;
===Stations Building Availability===&lt;br /&gt;
Same as the previous one, but the button blink wherever you're allowed to build a station.&lt;br /&gt;
 :ButtonEnableBlink=:StationsAllowed goto1&lt;br /&gt;
&lt;br /&gt;
[[Category:Networks|Common YOLOL]]&lt;/div&gt;</summary>
		<author><name>Danthbyrth</name></author>
	</entry>
</feed>