Skip to content

Commit 3ce0486

Browse files
authored
docs: add wiki documentation (#11)
* docs: add wiki documentation * cleanup
1 parent 242792f commit 3ce0486

7 files changed

Lines changed: 480 additions & 0 deletions

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"label": "EcoScrolls",
3+
"position": 18
4+
}

documentation/ecoscrolls/api.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: "API"
3+
sidebar_position: 7
4+
---
5+
6+
## Source Code
7+
8+
The source code can be found [here](https://github.com/Auxilor/EcoScrolls):
9+
10+
## API
11+
12+
Add this to your build.gradle.kts:
13+
14+
```kts
15+
repositories {
16+
maven("https://repo.auxilor.io/repository/maven-public/")
17+
}
18+
19+
dependencies {
20+
compileOnly("com.willfp:EcoScrolls:<version>")
21+
}
22+
```
23+
24+
The latest version available on the repo can be found [here](https://github.com/Auxilor/EcoScrolls/tags)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: "Commands and Permissions"
3+
sidebar_position: 5
4+
---
5+
6+
| Command | Description | Permission |
7+
|--------------------------------------------------|---------------------------------------------------------|--------------------------------------|
8+
| `/ecoscrolls reload` | Reloads the plugin | `ecoscrolls.command.reload` |
9+
| `/inscribe` | Opens the inscription GUI | `ecoscrolls.command.inscribe` |
10+
| `/ecoscrolls inscribe <player> <scroll> [level]` | Inscribe the held item | `ecoscrolls.command.inscribedirect` |
11+
| `/ecoscrolls give <player> <scroll> [quantity]` | Give the player an EcoScroll | `ecoscrolls.command.give` |
12+
| `/ecoscrolls import <id>` | Import a scroll from [lrcdb](https://lrcdb.auxilor.io/) | `ecoscrolls.command.import` |
13+
| `/ecoscrolls export <id>` | Export a scroll to [lrcdb](https://lrcdb.auxilor.io/) | `ecoscrolls.command.export` |
Lines changed: 225 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,225 @@
1+
---
2+
title: How to make a Scroll
3+
sidebar_position: 1
4+
---
5+
6+
## How to add scrolls
7+
Each scroll is its own config file, placed in the `/scrolls/` folder, and you can add or remove them as you please. There's an example config called `_example.yml` to help you out!
8+
9+
The ID of the Scroll is the file name. This is what you use in commands and placeholders.
10+
ID's must be lowercase letters, numbers, and underscores only.
11+
12+
## Example Scroll Config
13+
14+
```yaml
15+
name: "&6Example Scroll"
16+
lore:
17+
- ""
18+
- "&7This item has been inscribed with"
19+
- "&6Example Scroll"
20+
21+
max-level: 1
22+
max-uses: 1
23+
24+
targets:
25+
- sword
26+
conflicts: [ ]
27+
28+
type: combat
29+
30+
requirements:
31+
- scroll: my_requirement_scroll
32+
level: 2
33+
remove-requirements: false
34+
35+
placeholders:
36+
bonus: "%level% * 2"
37+
38+
effects:
39+
- id: send_message
40+
args:
41+
message: "&6You have used the Example Scroll!"
42+
triggers:
43+
- alt_click
44+
45+
conditions: [ ]
46+
47+
item:
48+
item: paper glint
49+
name: "&6&lExample Scroll"
50+
lore:
51+
- "&7This is an example scroll."
52+
- "&7It does nothing."
53+
craftable: false
54+
recipe-permission: []
55+
shapeless: false
56+
recipe: [ ]
57+
58+
inscription:
59+
inscription-table: true
60+
drag-and-drop: true
61+
price:
62+
value: 100
63+
type: coins
64+
display: "&e%value% coins"
65+
66+
price-level-multiplier: "1 + %level% * 0.5"
67+
68+
conditions: [ ]
69+
70+
effects: [ ]
71+
```
72+
73+
## Understanding all the sections
74+
75+
### The Scroll Info Section
76+
77+
```yaml
78+
name: "&6Example Scroll" # The name of the scroll
79+
lore: # The lore added to items when inscribed with the scroll
80+
- ""
81+
- "&7This item has been inscribed with"
82+
- "&6Example Scroll"
83+
84+
max-level: 1 # The max level of the scroll
85+
max-uses: 1 # The amount of times the scroll can be used
86+
```
87+
88+
### The Type Section:
89+
```yaml
90+
# (Optional) Assign this scroll to a type defined in types.yml.
91+
# Types group scrolls into categories and enforce a per-item limit on how many
92+
# different scrolls of that type can be inscribed on one item.
93+
# Leave out this field if the scroll should have no type restriction.
94+
type: combat
95+
```
96+
97+
:::tip
98+
See [Scroll Types](https://plugins.auxilor.io/ecoscrolls/scroll-types) for how to create and configure types.
99+
:::
100+
101+
### The Requirements and Conflicts Section:
102+
```yaml
103+
targets: # The items that the scroll can be applied to, see targets.yml
104+
- sword
105+
conflicts: [ ] # The conflicts that the scroll has with other scrolls
106+
107+
# (Optional) The type of the scroll. Types are defined in types.yml and limit
108+
# how many different scrolls of the same type can be inscribed on a single item.
109+
# See: Scroll Types
110+
type: combat
111+
112+
# The scroll(s) that must be applied to the item before this scroll can be applied
113+
requirements:
114+
- scroll: my_requirement_scroll # The ID of scroll to require
115+
level: 2 # The level required (optional)
116+
remove-requirements: false # If inscribing this scroll should remove the required scrolls
117+
```
118+
119+
### The Placeholders Section:
120+
```yaml
121+
# Item placeholders for dynamic lore in plugins like EcoItems
122+
# The placeholder is %ecoscrolls_scroll_<scroll>:<placeholder>%, e.g.
123+
# %ecoscrolls_scroll_example:bonus%
124+
placeholders:
125+
bonus: "%level% * 2"
126+
```
127+
128+
### The Effects Section:
129+
:::dangerEffects Section
130+
131+
The effects section is the core functionality of the scroll. You can configure effects, conditions, filters, mutators and triggers in this section to run whilst the scroll is applied and active.
132+
133+
Check out [Configuring an Effect](https://plugins.auxilor.io/effects/configuring-an-effect) to understand how to configure this section correctly.
134+
135+
For more advanced users or setups, you can configure chains in this section to string together different effects under one trigger. Check out [Configuring an Effect Chain](https://plugins.auxilor.io/effects/configuring-a-chain) for more info.
136+
137+
:::
138+
These are the effects that the scroll provides when applied and in use.
139+
```yaml
140+
# Read https://plugins.auxilor.io/effects/configuring-an-effect
141+
# The effects for the scroll to give
142+
effects:
143+
- id: send_message
144+
args:
145+
message: "&6You have used the Example Scroll!"
146+
triggers:
147+
- alt_click
148+
149+
# Read https://plugins.auxilor.io/effects/configuring-a-condition
150+
# The conditions for the scroll to work
151+
conditions: [ ]
152+
```
153+
154+
### The Scroll Item Section:
155+
```yaml
156+
# Options for the physical scroll item
157+
item:
158+
item: paper glint
159+
# Name and lore can use %uses%, %max_uses%, and %uses_left% placeholders
160+
name: "&6&lExample Scroll"
161+
lore:
162+
- "&7This is an example scroll."
163+
- "&7It does nothing."
164+
craftable: false
165+
recipe: [ ]
166+
```
167+
168+
:::tip
169+
170+
We support shaped and shapeless recipes. Check out [Recipes](https://plugins.auxilor.io/the-item-lookup-system/recipes) for more info on how to configure these.
171+
172+
:::
173+
174+
### The Inscription Section:
175+
:::dangerEffects Section
176+
177+
The inscription effects section is the core functionality for applying a scroll to an item. You can configure effects, conditions, filters, and mutators in this section to run when the scroll is applied.
178+
179+
Check out [Configuring an Effect](https://plugins.auxilor.io/effects/configuring-an-effect) to understand how to configure this section correctly.
180+
181+
For more advanced users or setups, you can configure chains in this section to string together different effects under one trigger. Check out [Configuring an Effect Chain](https://plugins.auxilor.io/effects/configuring-a-chain) for more info.
182+
183+
:::
184+
```yaml
185+
# Options for inscribing items with the scroll
186+
inscription:
187+
inscription-table: true # If the scroll can be applied to items via the inscription table
188+
drag-and-drop: true # If the scroll can be applied to items via drag-and-drop
189+
190+
# Read https://plugins.auxilor.io/all-plugins/prices
191+
# The price to inscribe the item
192+
price:
193+
value: 100
194+
type: coins
195+
display: "&e%value% coins"
196+
197+
# The formula to multiply the price depending on the level.
198+
# The %level% placeholder is the *current* level of the scroll
199+
price-level-multiplier: "1 + %level% * 0.5"
200+
201+
# The conditions required to inscribe the item
202+
# not-met-effects will run if someone tries to inscribe the item without meeting the conditions
203+
conditions: [ ]
204+
205+
# The effects that will be run when the item is inscribed
206+
# If your scroll works by modifying the item (e.g. adding enchantments, changing durability),
207+
# then put those effects here.
208+
effects:
209+
- id: send_message
210+
args:
211+
message: "&6You have inscribed the item with Example Scroll!"
212+
```
213+
## Internal Placeholders
214+
215+
| Placeholder | Value |
216+
| ------------- | ------------------------------------------------ |
217+
| `%uses%` | The amount of times the scroll has been used |
218+
| `%max_uses%` | The maximum amount of times a scroll can be used |
219+
| `%uses_left%` | The amount of uses left on the scroll |
220+
221+
<hr/>
222+
223+
## Default configs
224+
The default configs can be found [here](https://github.com/Auxilor/EcoScrolls/tree/master/eco-core/core-plugin/src/main/resources/scrolls). <br/>
225+
You can find additional user-created configs on [lrcdb](https://lrcdb.auxilor.io/).

documentation/ecoscrolls/index.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: "EcoScrolls"
3+
---
4+
5+
## What is EcoScrolls?
6+
7+
EcoScrolls is a plugin that adds item modifiers to your server. You can make custom item buffs, repeatable modifiers
8+
(e.g. Hot Potato Books), drag-and-drop upgrades, and more. There's also a new GUI called the Inscription Table that you
9+
can use to add these scrolls if you so desire.
10+

0 commit comments

Comments
 (0)