Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Malfrador committed Aug 27, 2024
1 parent 4fc043b commit 19421fd
Show file tree
Hide file tree
Showing 42 changed files with 16,289 additions and 2 deletions.
126 changes: 124 additions & 2 deletions docs/aether/intro.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,128 @@
---
title: Introduction
title: Allgemein
sidebar_position: 1
---

TODO
Genau wie Quests werden Mobs über unser [GitHub-Repository](https://github.com/DRE2N/Erethon) konfiguriert. Um Änderungen aus dem Repository auf den Testserver zu bringen, nutze `/q sync`. Nachdem die Synchronisierung abgeschlossen ist, ist es notwendig die Mobs mit `/ae reload` neu zu laden. Der erstellte Mob kann dann einfach mit `/ae spawn <id>` getestet werden.
### Dateien
Jeder Mob-Typ hat eine Konfigurationsdatei. Diese befindet sich in `Aether/creatures/` und ist eine YAML-Datei (Dateiendung `.yml`). Der Name der Datei ist die ID des Mobs, die dann ingame oder in QXL genutzt wird.
Wenn der Name der Datei `disabled` beinhaltet, wird der Mob nicht geladen.

### Spawner
Anstatt über QXL können Mobs auch mit einem Spawner gespawnt werden. Um einen Spawner zu erstellen, erstelle eine Config in `Aether/spawners`.
#### Spawner-Config
```yaml
# ID des Spawners. Eine Config kann mehrere Spawner beinhalten.
test:
# ID des Mobs
id: example
# Position des Spawners in der Welt
loc:
world: world
x: 5
y: 100
z: 17
# Ob dieser Spawner ticken soll, also regelmäßig spawnen. Deaktivieren wenn z.B. von Quest getriggert.
isTicking: true
# Radius, in dem die Mobs spawnen
radius: 10
# Y-Radius, in dem die Mobs spawnen
radiusY: 5
# Mobs per Spawn-Zyklus
mobsPerSpawn: 2
# Chance einen Mob zu spawnen
chance: 100.0
# Maximale Mobs. Der Spawner hört auf, wenn diese Zahl erreicht ist.
maxMobs: 10
# Entfernung in Blöcken, in der Mobs gezählt werden.
# Sollte größer als Spawn-Radius sein, da Mobs laufen (:O )
maxMobsRange: 32
# Cooldown zwischen Spawn-Versuchen. In Sekunden.
cooldown: 30
# Entfernung in Blöcken, ab der der Spawner aktiv wird.
# Idealerweise aus Performance-Gründen nicht zu hoch stellen.
activationRange: 32
```
### Models
:::caution Resourcepack-Generierung ist noch nicht automatisiert.
Daher bitte aktuell noch nicht nutzen.
:::
Aether unterstützt Models und Animationen im Blockbench-Format (`.bbmodel`). Diese müssen im Ordner `Aether/models/` platziert werden.

### Befehle
* **/ae reload** - Lädt alle Mobs neu aus ihren Konfigurationsdateien.
* **/ae spawn <ID\> [count]** Spawnt einen Mob.
* **/ae test model <ID\>** Spawnt ein Model an einer fixen Position. Debugging-Befehl.

### Beispiel Mob-Config
```yaml
# Required. What gets displayed to the players
displayType: vindicator
# Optional. The name of the NPC, displayed above the NPC
displayname: ExampleNPC
# Optional. If you change this, all NPCs of this type will recreate themselves on the next load.
#Required to be changed when changing attributes or equipment, as the changes will not be applied otherwise
version: 0
# Optional. Can be used to specify a different class for the NPC. Currently unused, as we don't have bosses yet
#class:
# Optional. A list of skins to use. The NPC will randomly choose one when spawned
skins:
- "https://minesk.in/03ca0fa19c644e71810e1f6fc29eefd4"
# Alternatively, you can use just `skin: "https://minesk.in/03ca0fa19c644e71810e1f6fc29eefd4" for a single skin
# Optional. The model of the NPC. If not specified, no model will be used
model: redstone_monstrosity
# Optional. The team the NPC is on. NPCs of the same team will not attack each other.
# NPCs of different teams can be set to attack each other
team: blablah
ai:
# See https://erethon.de/docs/aether/ai_goals
goals:
- 0;avoid_target;1.0;2.0;20;pig
- "goal2"
targets:
- ""
- ""
# All values here are optional.
config:
invulnerable: false # If true, the NPC will not take damage
collision: true # If true, the NPC will collide with players and other entities
persistent: true # If false, the NPC will not be saved
glowing: false # If true, the NPC will glow
gravity: true # If true, the NPC will be affected by gravity
nametagVisible: true # If true, the NPC's name will be visible
maximumAir: 300 # Maximum air the NPC can have
# Optional. Spells to cast. There are 5 types of triggers: onAttack, onDamaged, onDeath, onTarget, onTimer
spells:
onAttack:
Backstab: # Spellbook spell name
chance: 20 # Chance this spell is triggered
# Optional. The attributes the NPC should have. Supports all Minecraft and Spellbook attributes
attributes:
health: 5
speed: 0.01
damage: 20
# Optional. Equipment to wear. Hephaestus IDs
equipment:
hand: "minecraft:diamond_sword"
helmet: "minecraft:diamond_helmet"
chest: "minecraft:diamond_chestplate"
leggings: "minecraft:diamond_leggings"
boots: "minecraft:diamond_boots"
# Optional. Interaction options
interaction:
messages: # Messages to say when a player is nearby. They appear above the NPC
- "Test message"
- "Another test message"
randomTalker: true # If true, the NPC will randomly say one of the messages when a player is nearby
sounds: # Sounds to play
attack: entity.vindicator.celebrate
ambient: entity.vindicator.celebrate
shoot: entity.vindicator.celebrate
death: entity.vindicator.celebrate
hurt: entity.vindicator.celebrate
loot: # Optional. Loot to drop
xp: 200 # XP to drop
items: # Items to drop. Hephaestus IDs
- "erethon:theanor_mud"
```
20 changes: 20 additions & 0 deletions website/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
41 changes: 41 additions & 0 deletions website/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Website

This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.

### Installation

```
$ yarn
```

### Local Development

```
$ yarn start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build

```
$ yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment

Using SSH:

```
$ USE_SSH=true yarn deploy
```

Not using SSH:

```
$ GIT_USER=<Your GitHub username> yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
3 changes: 3 additions & 0 deletions website/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
12 changes: 12 additions & 0 deletions website/blog/2019-05-28-first-blog-post.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
slug: first-blog-post
title: First Blog Post
authors: [slorber, yangshun]
tags: [hola, docusaurus]
---

Lorem ipsum dolor sit amet...

<!-- truncate -->

...consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
44 changes: 44 additions & 0 deletions website/blog/2019-05-29-long-blog-post.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
slug: long-blog-post
title: Long Blog Post
authors: yangshun
tags: [hello, docusaurus]
---

This is the summary of a very long blog post,

Use a `<!--` `truncate` `-->` comment to limit blog post size in the list view.

<!-- truncate -->

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
24 changes: 24 additions & 0 deletions website/blog/2021-08-01-mdx-blog-post.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
slug: mdx-blog-post
title: MDX Blog Post
authors: [slorber]
tags: [docusaurus]
---

Blog posts support [Docusaurus Markdown features](https://docusaurus.io/docs/markdown-features), such as [MDX](https://mdxjs.com/).

:::tip

Use the power of React to create interactive blog posts.

:::

{/* truncate */}

For example, use JSX to create an interactive button:

```js
<button onClick={() => alert('button clicked!')}>Click me!</button>
```

<button onClick={() => alert('button clicked!')}>Click me!</button>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions website/blog/2021-08-26-welcome/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
slug: welcome
title: Welcome
authors: [slorber, yangshun]
tags: [facebook, hello, docusaurus]
---

[Docusaurus blogging features](https://docusaurus.io/docs/blog) are powered by the [blog plugin](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-blog).

Here are a few tips you might find useful.

<!-- truncate -->

Simply add Markdown files (or folders) to the `blog` directory.

Regular blog authors can be added to `authors.yml`.

The blog post date can be extracted from filenames, such as:

- `2019-05-30-welcome.md`
- `2019-05-30-welcome/index.md`

A blog post folder can be convenient to co-locate blog post images:

![Docusaurus Plushie](./docusaurus-plushie-banner.jpeg)

The blog supports tags as well!

**And if you don't want a blog**: just delete this directory, and use `blog: false` in your Docusaurus config.
23 changes: 23 additions & 0 deletions website/blog/authors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
yangshun:
name: Yangshun Tay
title: Front End Engineer @ Facebook
url: https://github.com/yangshun
image_url: https://github.com/yangshun.png
page: true
socials:
x: yangshunz
github: yangshun

slorber:
name: Sébastien Lorber
title: Docusaurus maintainer
url: https://sebastienlorber.com
image_url: https://github.com/slorber.png
page:
# customize the url of the author page at /blog/authors/<permalink>
permalink: '/all-sebastien-lorber-articles'
socials:
x: sebastienlorber
linkedin: sebastienlorber
github: slorber
newsletter: https://thisweekinreact.com
19 changes: 19 additions & 0 deletions website/blog/tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
facebook:
label: Facebook
permalink: /facebook
description: Facebook tag description

hello:
label: Hello
permalink: /hello
description: Hello tag description

docusaurus:
label: Docusaurus
permalink: /docusaurus
description: Docusaurus tag description

hola:
label: Hola
permalink: /hola
description: Hola tag description
Loading

0 comments on commit 19421fd

Please sign in to comment.