diff --git a/website/docs/guides/helpguide/_category_.json b/website/docs/guides/helpguide/_category_.json new file mode 100644 index 0000000..336cc31 --- /dev/null +++ b/website/docs/guides/helpguide/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "Survival Guide", + "position": 10, + "link": { + "type": "generated-index" + } + } + \ No newline at end of file diff --git a/website/docs/guides/helpguide/assets/survivalguide.png b/website/docs/guides/helpguide/assets/survivalguide.png new file mode 100644 index 0000000..f67c760 Binary files /dev/null and b/website/docs/guides/helpguide/assets/survivalguide.png differ diff --git a/website/docs/guides/helpguide/intro.md b/website/docs/guides/helpguide/intro.md new file mode 100644 index 0000000..94bf5ee --- /dev/null +++ b/website/docs/guides/helpguide/intro.md @@ -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 +} +``` \ No newline at end of file diff --git a/website/docs/guides/resources/_category_.json b/website/docs/guides/resources/_category_.json new file mode 100644 index 0000000..c0dccbd --- /dev/null +++ b/website/docs/guides/resources/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "Resources", + "position": 9, + "link": { + "type": "generated-index" + } + } + \ No newline at end of file diff --git a/website/docs/guides/resources/assets/importimages_image.png b/website/docs/guides/resources/assets/importimages_image.png new file mode 100644 index 0000000..1ce19bd Binary files /dev/null and b/website/docs/guides/resources/assets/importimages_image.png differ diff --git a/website/docs/guides/resources/assets/importimages_raw.png b/website/docs/guides/resources/assets/importimages_raw.png new file mode 100644 index 0000000..3c0fd96 Binary files /dev/null and b/website/docs/guides/resources/assets/importimages_raw.png differ diff --git a/website/docs/guides/resources/assets/importimages_result.png b/website/docs/guides/resources/assets/importimages_result.png new file mode 100644 index 0000000..8d38dbf Binary files /dev/null and b/website/docs/guides/resources/assets/importimages_result.png differ diff --git a/website/docs/guides/resources/importingimages.md b/website/docs/guides/resources/importingimages.md new file mode 100644 index 0000000..0e254f5 --- /dev/null +++ b/website/docs/guides/resources/importingimages.md @@ -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! \ No newline at end of file