Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions website/docs/guides/helpguide/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "Survival Guide",
"position": 10,
"link": {
"type": "generated-index"
}
}

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
76 changes: 76 additions & 0 deletions website/docs/guides/helpguide/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
sidebar_position: 1
---

# Working with Survival Guide

As you may already know, the survival guide is a series of useful tips and tutorials available in-game.

![](assets/survivalguide.png)

But what if you wanted to add, edit or even delete specific guide entries? Starting with 0.5.0 [`GungnirIncarnate`](https://github.com/GungnirIncarnate) has implemented [support](https://github.com/Okaetsu/PalSchema/pull/57) for modifying the Survival Guide!

A Survival Guide JSON has three available fields:
1. `Title`: This is the name of the entry that will appear in the Survival Guide.
2. `Description`: This is the content inside the entry.
3. `Texture`: This is the image that will show inside the entry just above the title. You can omit this field entirely if you want a pure text guide entry. Texture is a [`TSoftObjectPtr`](../../types/softobjectptr.md) field.

## Adding Guides

### Adding a text only entry

```json
{
"Example_Help_1": {
"Title": "PalSchema Entry",
"Description": "This is an entry made solely using PalSchema :)\r\nThis is another line"
}
}
```

### Adding an entry with image

```json
{
"Example_Help_1": {
"Title": "PalSchema Entry (Image)",
"Description": "This is an entry made solely using PalSchema :)\r\nThis is another line",
"Texture": "/Game/Pal/Texture/HelpGuide/T_HelpGuide_3.T_HelpGuide_3"
}
}
```

### Adding an entry with image [using a resource on disk](../resources/importingimages.md)

```json
{
"Example_Help_1": {
"Title": "PalSchema Entry (Image Resource)",
"Description": "This is an entry made solely using PalSchema :)\r\nThis is another line",
"Texture": "$resource/mymod/mycoverimage"
}
}
```

## Editing Guides

Same rules apply as when adding guides except you'll want to use the name of an existing guide entry. Below is an example of editing the **Game Objective** guide entry.

```json
{
"Help_3": {
"Title": "Edited PalSchema Entry",
"Description": "Hello Palworld!"
}
}
```

## Deleting Guides

Deleting is very simple, you just specify the row as null like so:

```json
{
"Help_4": null
}
```
8 changes: 8 additions & 0 deletions website/docs/guides/resources/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "Resources",
"position": 9,
"link": {
"type": "generated-index"
}
}

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 45 additions & 0 deletions website/docs/guides/resources/importingimages.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
sidebar_position: 1
---

# Importing Images as Textures

Importing images is a new feature in 0.5.0 where you'll be able to import `.png`, `.jpg`, `.jpeg`, `.bmp` and `.tga` images into the game for use with your mods. This allows you to skip the Unreal Editor packaging process entirely if you just want to add item icons for example.


Example Usage
-------------

Project Structure
`mymod/resources/images/myimage.png`
![](assets/importimages_image.png)

`mymod/raw/test.json`
![](assets/importimages_raw.png)

Where `mymod` is the name of your mod and `myimage` is the name of your image file. Note that when you're importing images, you must place your images within an `images` folder in the `resources` folder, otherwise they will be ignored.

You can then reference your image within any [`TSoftObjectPtr`](../../types/softobjectptr.md) field by entering the following string instead of the usual asset path: `$resource/modname/filename`.

- `$resource/` tells PalSchema that it should look for an imported resource.

- `modname` is the name of the mod that imported a resource, in our case it would be `mymod`.

- `filename` is the name of the file inside the resources folder, so since we have a `myimage.png` file, you want it without the extension so it would become `myimage`.

`test.json`

```json
{
"DT_PalCharacterIconDataTable": {
"ChickenPal": {
"Icon": "$resource/mymod/myimage"
}
}
}
```

Here's the final result:
![](assets/importimages_result.png)

You can utilize this feature for various things like the survival guide, building icons, pal icons, item icons and much more!
Loading