added pre version of a wiki

This commit is contained in:
Vlyan
2022-07-27 18:16:42 +02:00
parent 66cb3d08ad
commit ba5f27674d
14 changed files with 331 additions and 0 deletions

37
wiki/dev/dicepicker.md Normal file
View File

@@ -0,0 +1,37 @@
# DicePicker (DP)
The DicePicker is the entry point to any L5R roll (but chat command).
## Usage exemple
```js
new game.l5r5e.DicePickerDialog({
skillId: 'aesthetics',
ringId: 'water',
actor: game.user.character
}).render(true);
```
## Constructor Options
| Property | Type | Notes / Exemples |
|------------------|----------|-------------------------------------------------------------------------------------------------------------------------------|
| actor | Actor | Any `Actor` object instance.<br>ex : `game.user.character`, `canvas.tokens.controlled[0].actor` |
| actorId | string | This is the `id` not the `uuid` of an actor.<br>ex : "AbYgKrNwWeAxa9jT" |
| actorName | string | Careful this is case sensitive.<br>ex : "Isawa Aki" |
| difficulty | number | `1` to `9` |
| difficultyHidden | boolean | If `true`, hide the difficulty and lock the view for the player. |
| isInitiativeRoll | boolean | `true` if this is an initiative roll |
| itemUuid | string | The `uuid` of technique or weapon used for this roll. Can be anything retrieved by `fromUuid()` or `fromUuidSync()` |
| ringId | string | If not provided, take the current stance of the actor if any.<br>ex : "fire", "water" |
| skillId | string | Skill `id`<br>ex : "design", "aesthetics", "courtesy" |
| skillCatId | string | Skill category `id`<br>ex : "artisan", "scholar" |
| skillsList | string[] | `skillId`/`skillCatId` list coma separated.<br>Allow the player to select the skill used in a select<br>ex : "artisan,design" |
All these properties are optional.
For `actor*` properties, the resolution is in this order :
1. `option.actor`
2. `option.actorId`
3. `option.actorName`
4. Try to find the first controlled token by the player (`canvas.tokens.controlled[0]?.actor`)
5. Use the assigned character if any (`game.user.character`)
6. If nothing found, then no actor are set

9
wiki/dev/rnk.md Normal file
View File

@@ -0,0 +1,9 @@
# Roll n Keep (RnK)
The RnK use `ChatMessage` to retrieve the roll, alter it, add the new message and delete the old.
> If you have any idea how to modify directly the ChatMessage and update it, let me know.
Usage :
```js
new RollnKeepDialog(messageId).render(true);
```

34
wiki/dev/roll.md Normal file
View File

@@ -0,0 +1,34 @@
# Roll
The roll use the `RollL5r5e` class, who store a lot of additional variables.
Here is a view of `<roll>.l5r5e` properties :
```js
actor: null, // actor instance
dicesTypes: {
std: false, // true if have a standard roll (ex : 1d6)
l5r: false, // true if have a l5r roll (we need the RnK)
},
difficulty: 2,
difficultyHidden: false,
history: null, // Stored data of the RnK, can be big
initialFormula: null, // The initial formula use in DP
itemUuid: null, // technique or weapon uuid
isInitiativeRoll: false,
keepLimit: null, // Max number of dice to keep
rnkEnded: false, // false if the player can modify the roll.
skillAssistance: 0, // Number of skill assistance, needed to know the number of dice keept
skillCatId: "", // Skill category id
skillId: "", // Skill id
stance: "", // Ring id (fire, void...)
strifeApplied: 0, // how many strife point the linked actor have already taken
summary: {
totalSuccess: 0, // = success + explosive
totalBonus: 0, // = totalSuccess - difficulty
success: 0,
explosive: 0,
opportunity: 0,
strife: 0,
},
targetInfos: null, // "img" and "name" of the target if any
voidPointUsed: false, // if a void point as been used for this roll
```

94
wiki/dev/sockets.md Normal file
View File

@@ -0,0 +1,94 @@
# Sockets API
Here is the list of Socket's methods, most of them is design to be use internally by the system, but you can find some useful for your projects.
## deleteChatMessage
Delete ChatMessage by his `id`, the GM permission is required, so a GM need to be connected for this to work. Used in RnK.
Usage :
```js
game.l5r5e.sockets.deleteChatMessage(messageId);
```
## refreshAppId
Refresh a application windows by it's `htmlId` (not `windowsId`). Used in RnK.
<br>Ex : `l5r5e-twenty-questions-dialog-kZHczAFghMNYFRWe`, not `65`.
Usage :
```js
game.l5r5e.sockets.refreshAppId(applicationId);
```
## updateMessageIdAndRefresh
Change the message in the selected application windows, and rerender the application to force the refresh. Used in RnK.
Usage :
```js
game.l5r5e.sockets.refreshAppId(applicationId, messageId);
```
## openDicePicker
Remotely open the DicePicker (DP) on targetted Users/Actors if they are active users. Used in initiative roll.
Arguments :
| Property | Type | Notes / Exemples |
|-----------|---------|----------------------------------------------------------------------------|
| users | User[] | Users list to trigger the DP (will be reduce to `id` for network perf.) |
| actors | Actor[] | Actors list to trigger the DP (will be reduce to `uuid` for network perf.) |
| dpOptions | Object | Any [DicePickerDialog.options](dicepicker.md#constructor-options) |
### Exemples
#### Fitness skill roll for the all combat targets
```js
game.l5r5e.sockets.openDicePicker({
actors: Array.from(game.user.targets).map(t => t.document.actor),
dpOptions: {
skillId: 'fitness',
difficulty: 3,
}
});
```
#### Initiative roll (skirmish) for all player's character who are in combat tracker
```js
game.l5r5e.sockets.openDicePicker({
actors: game.combat.combatants.filter(c => c.hasPlayerOwner && !c.isDefeated && !c.initiative).map(c => c.actor),
dpOptions: {
skillId: 'tactics',
difficulty: 1,
isInitiativeRoll: true,
}
});
```
#### Melee skill roll with "fire" ring, pre-selected for all the selected tokens
```js
game.l5r5e.sockets.openDicePicker({
actors: canvas.tokens.controlled.map(t => t.actor),
dpOptions: {
ringId: 'fire',
skillId: 'melee',
difficulty: 2,
}
});
```
#### Skill roll with skill list for all active players (but GM)
```js
game.l5r5e.sockets.openDicePicker({
users: game.users.players.filter(u => u.active && u.hasPlayerOwner),
dpOptions: {
ringId: 'water',
skillId: 'unarmed',
skillsList: 'melee,ranged,unarmed',
difficulty: 3,
difficultyHidden: true,
}
});
```

View File

@@ -0,0 +1,21 @@
# System helping (Contribute)
## Rules
You are free to contribute and propose corrections, modifications after fork. Try to respect theses rules:
- Make sure you are up-to-date with the referent branch (most of the time the `dev` branch).
- Clear and precise commit messages allow a quick review of the code.
- If possible, limit yourself to one Feature per Merge request so as not to block the process.
## Dev install
1. Clone the repository.
2. Use `npm ci` to install the dependence.
3. Create a link from `<repo>/system` to your foundry system data (by default `%localappdata%/FoundryVTT/data/systems/l5r5e`).
Windows exemple (modify the target and source directories, and run this in administrator) :
```bash
mklink /D /J "%localappdata%/FoundryVTT/data/systems/l5r5e" "D:/Projects/FVTT/l5r5e/system"
```
## Compiling SCSS
1. Run `npm watch` to watch and compile the `scss` files.

17
wiki/index.md Normal file
View File

@@ -0,0 +1,17 @@
# L5R5e System Wiki
## For users
- [Installation and modules](users/install.md)
- [Updating - Bests practices](users/updating.md)
- [Basic usage and filling sheets](users/basic-usage.md)
- [Dice Rolling](users/dice.md)
- [Symbols replacement list](users/symbols.md)
- [Advanced : Techniques skill and difficulty syntaxe](users/techniques-syntaxe.md)
- [Advanced : Custom Compendiums](users/custom-compendiums.md)
## For developers
- [System helping (Contribute)](dev/system-helping.md)
- [Sockets API](dev/sockets.md)
- [DicePicker (DP)](dev/dicepicker.md)
- [Roll n Keep (RnK)](dev/rnk.md)
- [Roll](dev/roll.md)

View File

@@ -0,0 +1,7 @@
# Basic usage and filling sheets
Mostly all the interactions are done with drag-n-drop.
## Creating a Character (PC)
Go in actor tab, and create a new `character`.
> TODO

View File

@@ -0,0 +1,10 @@
# Custom Compendiums
Never directly edit the system compendiums.
They will be erased anytime you update the system.
The better options to keep the links between items and properties for exemple, is to fill a custom compendium using babel.
This way, the system compendiums will be overridden by this module.
You will need to manually download the following module, and edit json files.
Please follow the instructions on :
> https://gitlab.com/teaml5r/l5r5e-custom-compendiums

3
wiki/users/dice.md Normal file
View File

@@ -0,0 +1,3 @@
# Dice Rolling
> TODO

BIN
wiki/users/img/symbols.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

52
wiki/users/install.md Normal file
View File

@@ -0,0 +1,52 @@
# Installation
## System Installation
### With Search (recommended)
1. Open FoundryVTT.
2. In the `Game Systems` tab, clic `Install system`.
3. Search `L5R`, on the line `Legend of the Five Rings (5th Edition)`, clic `Install`.
### With the manifest
1. Open FoundryVTT.
2. In the `Game Systems` tab, clic `Install system`.
3. Copy this link and use it in the `Manifest URL`, then clic `Install`.
> https://gitlab.com/teaml5r/l5r5e/-/raw/master/system/system.json
## Modules
L5R do not required a lot of module, i highly encourage you to start with a small number of it.
Some modules require others library/module, you need to install them to allow the primary module work.
Nothing fancy, just accept when FoundryVTT prompt you to download or activate the dependencies.
### Some recommended modules
| Module name | Notes |
|------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Babele](https://foundryvtt.com/packages/babele) | Required for non english compendium translation |
| [Permission Viewer](https://foundryvtt.com/packages/permission_viewer) | Lets you see instantly who has permissions to see what item |
| [Dice So Nice!](https://foundryvtt.com/packages/dice-so-nice) | Add 3D dices that bounce on the screen when you roll dice |
| [Small Legend of the 5 Rings Tools](https://foundryvtt.com/packages/l5r-dragruler) | Series of tools for L5R |
| [Search Anywhere](https://foundryvtt.com/packages/searchanywhere) | Don't spent too much time searching the right technique |
| [FXMaster](https://foundryvtt.com/packages/fxmaster) | More effects |
| [Scene Clicker](https://foundryvtt.com/packages/scene-clicker) | Clicking on a Scene or a Scene Link will now "view" the Scene instead of rendering the Scene Config Sheet |
| [Universal Battlemap Importer](https://foundryvtt.com/packages/dd-import) | Allows Importing [DungeonDraft](https://dungeondraft.net/), [DungeonFog](https://www.dungeonfog.com/) or [Arkenforge](https://arkenforge.com/) export files into FoundryVTT |
| [Compendium Folders](https://foundryvtt.com/packages/compendium-folders) | Add folders to compendiums |
| [Chat Images](https://foundryvtt.com/packages/chat-images) | Lets you drag images into the chat, one of the quicker ways to do 'he looks like this' |
| [Combat Utility Belt](https://foundryvtt.com/packages/combat-utility-belt) | A totally over-engineered but helpful app that will, among other things, let you set up custom statuses |
| [Timer](https://foundryvtt.com/packages/timer) | A simple timer, useful to stress a little your players |
### Map module
The official 5e Rokugan map is publish under the module section in FoundryVTT.
- [L5R5e - Rokugan map for Legend of the Five Rings (5th edition)](https://foundryvtt.com/packages/l5r5e-map)
## Worlds
We have published the official free content in form of worlds ready to play :
- [L5R5E - Cresting Waves](https://foundryvtt.com/packages/l5r5e-world-waves)
- [L5R5E - In the Palace of the Emerald Champion](https://foundryvtt.com/packages/l5r5e-world-palace)
- [L5R5E - The Highwayman](https://foundryvtt.com/packages/l5r5e-world-highwayman)
- [L5R5E - The Scroll or the Blade](https://foundryvtt.com/packages/l5r5e-world-scroll)
- [L5R5E - The Knotted Tails](https://foundryvtt.com/packages/l5r5e-world-tails)
- [L5R5E - Wedding at Kyotei castle](https://foundryvtt.com/packages/l5r_mariage)

13
wiki/users/symbols.md Normal file
View File

@@ -0,0 +1,13 @@
# Symbols replacement list
In sheets or journals, you can use these tags to use symbols :
```
Dice symbols : (op) (su) (ex) (st) (skill) (ring)
Rings : (earth) (water) (fire) (air) (void)
Tech: (kiho) (maho) (ninjutsu) (ritual) (shuji) (invocation) (kata) (prereq) (inversion) (mantra)
Clans: (imperial) (crab) (crane) (dragon) (lion) (mantis) (phoenix) (scorpion) (tortoise) (unicorn) (ronin)
Others : (courtier) (bushi) (shugenja)
```
Result :
![](img/symbols.png)

View File

@@ -0,0 +1,30 @@
# Techniques skill and difficulty syntaxe
On the Technique sheets, you will find two fields `Difficulty` and `Skill`.
These fields have special constraints, you will find theirs rules below.
## Difficulty
Can be :
- A integer number : `1` to `9`.
- Or specific syntaxe "@`S`:`prop1`" or "@`T`:`prop1`|`max`" or "@`T`:`prop1`|`max`(`prop2`)" :
- `@` fixed, trigger the parser
- `T` or `S` : `T`arget or `S`elf, define the actor to get the value.
- `prop1` / `prop2` : Can be any property in `actor` or `actor.system`. Limitations: currently no `size`, `distance` (range) or computation (a+b).
- `|` separator, optional if no min/max.
- `min` or `max` : Between the selected targets, search for the min/max of `prop2`. If no `prop2` provided, take `prop1` as `prop2` (irrelevant for `@S`).
- `(prop2)` : define the property for the actor selection in multiple target, can be omitted if same as `prop1`.
- Exemples :
- `@S:vigilance` : Difficulty will be my own `vigilance`.
- `@T:vigilance|min` : Difficulty will be the `vigilance` from the target with the minimum vigilance (implicit) value. it's the same to wrote `@T:vigilance|min(vigilance)`.
- `@T:vigilance|max(statusRank)` : Difficulty will be the `vigilance` from the target with the maximum `statusRank` value.
## Skill
Can be :
- Any `Skill` id : `melee`, `fitness`...
- Any `SkillCategory` id : `scholar`, `martial`...
- Or both in list, coma separated.
- Exemples :
- `theology`
- `melee,ranged,unarmed`
- `martial,fitness,performance`

4
wiki/users/updating.md Normal file
View File

@@ -0,0 +1,4 @@
# Updating - Bests practices
- Anytime you update to a major version make a backup of foundry's data directory (default : `%localappdata%/FoundryVTT/data/`).
- Take time to upgrading to a major version (ex FoundryVTT v9->v10).<br>A lot of bugs can be on firsts patchs, and a lots of systems/modules won't upgrade fast and will be incompatible or not tested (a lot of us do it only on our free time).<br>If you need some timing windows: let à least 2 weeks to 1 month.