runme | ||||
---|---|---|---|---|
|
PlaneteRolisteDiceTester est un environnement permettant de faciliter le développement des scripts de jets de dés spécifiques à un système de jeu, sur le site PlaneteRoliste.com.
PlaneteRolisteDiceTester est principalement constitué :
- d'un wrapper qui exécute un script LUA dans un environnement de développement simulant celui du site,
- d'un minifieur permettant de réduire le volume du script, dans l'hypothèse où un script s'avérerait trop volumineux par rapport aux limitations en vigueur sur le site.
PlaneteRolisteDiceTester utilise :
- lua-minify , une librairie de minification/beautification de script LUA, développée en LUA par Mark Langer aka Stravant.
- pegasus.lua, un serveur HTTP permettant d'exposer une application développée en LUA.
- f_strings, une librairie d'interpolation de chaînes de caractères.
- Installer lua, de préférence en version 5.4 (non testé dans les versions antérieures)
- Installer luarocks
- Installer pegasus-lua : luarocks install pegasus
- Installer f_strings : luarocks install f-strings
- Cloner ce dépôt avec Git : git clone https://github.com/yannlossouarn/PlaneteRolisteDiceTester
Vous pouvez vous inspirer des scripts exemple.lua et exemple-caller.lua situés dans le sous-répertoire scripts, en gardant le même schéma de nommage. Par exemple, si vous développez un script pour un jeu appelé Miaou, dans sa deuxième mouture, vous pouvez par exemple appeler les fichiers miaou2.lua et l'autre miaou2-caller.lua.
Pour le reste... c'est de la programmation LUA ! :)
Pour lancer un script dans sa version originale (exemples donnés pour le script wfrp4, pour le système Warhammer Fantasy Roleplay v4)
lua serve.lua wfrp4
ou
lua serve.lua wfrp4 original
lua serve.lua wfrp4 minified
lua minify.lua wfrp4 minify
Ce code est placé sous licence MIT.
Copyright (c) 2024 Yann Lossouarn
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
PlaneteRolisteDiceTester est testé dans un environnement LUA 5.4.
https://yann.lossouarn.net |