тест: перевод изображений на статику
|
@ -0,0 +1,31 @@
|
||||||
|
привмер работы `вдохновение барда`:
|
||||||
|
* после активации умения, происходит выбор актёра
|
||||||
|
* выдача "особенности" вдохновение барда с нужным кубом
|
||||||
|
* использование актёром вдохновения из своего инвентаря
|
||||||
|
|
||||||
|
гайды:
|
||||||
|
https://github.com/foundry-vtt-community/wiki/blob/main/API-Learning-API.md
|
||||||
|
https://www.youtube.com/@oatveal/videos
|
||||||
|
https://www.answeroverflow.com/m/905397822822703116
|
||||||
|
|
||||||
|
Получение id персонажа
|
||||||
|
```javascript
|
||||||
|
let actor = game.user.character
|
||||||
|
let actorId - actor.id
|
||||||
|
```
|
||||||
|
|
||||||
|
Добавление значения к характеристике:
|
||||||
|
```javascript
|
||||||
|
actor.update({'system.abilities.str.value': actor.data.system.abilities.str.value+1})
|
||||||
|
```
|
||||||
|
|
||||||
|
Добавление предмета из мира
|
||||||
|
```javascript
|
||||||
|
const item = game.items.getName("End Concentration")
|
||||||
|
await actor.createEmbeddedDocuments('Item', [item.toObject()])
|
||||||
|
```
|
||||||
|
|
||||||
|
Добавление предмета из компендиума
|
||||||
|
```javascript
|
||||||
|
(Array.from(game.packs)).filter(element => element.metadata.name == 'sc-items')
|
||||||
|
```
|
Before Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 69 KiB |
Before Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 4.8 KiB |