diff --git a/website/docs/guides/rawtables/wildcard.md b/website/docs/guides/rawtables/wildcard.md index 02a058e..ab6320e 100644 --- a/website/docs/guides/rawtables/wildcard.md +++ b/website/docs/guides/rawtables/wildcard.md @@ -2,7 +2,7 @@ sidebar_position: 2 --- -# Wildcard +# Raw Table Wildcards In Raw Tables, you have the ability to use wildcards to apply changes to every row of the table you're targeting. This can be a very useful alternative to just manually duplicating your change to every row. diff --git a/website/docs/guides/spawners/overview.md b/website/docs/guides/spawners/overview.md index 53e5430..8f55279 100644 --- a/website/docs/guides/spawners/overview.md +++ b/website/docs/guides/spawners/overview.md @@ -2,7 +2,7 @@ sidebar_position: 1 --- -# Overview +# Custom Spawners Starting with 0.5.0, you are now able to create new spawns for pals and NPCs which function the exact same as how the game would spawn pals, bosses, npcs, etc. Editing is not currently available and you should use the `blueprints` method of doing it. See the example [BossMammorestSpawnReplacer](https://github.com/Okaetsu/PalSchema/blob/main/assets/examples/BossMammorestSpawnReplacer/blueprints/mammorest_spawn_replacer.jsonc) mod for editing spawns. diff --git a/website/docusaurus.config.ts b/website/docusaurus.config.ts index 6f37059..d481782 100644 --- a/website/docusaurus.config.ts +++ b/website/docusaurus.config.ts @@ -1,9 +1,11 @@ -import {themes as prismThemes} from 'prism-react-renderer'; import type {Config} from '@docusaurus/types'; import type * as Preset from '@docusaurus/preset-classic'; // This runs in Node.js - Don't use client-side code here (browser APIs, JSX...) +import PrismLight from './src/theme/prismLight'; +import PrismDark from './src/theme/prismDark'; + const config: Config = { title: 'PalSchema', tagline: '', @@ -38,6 +40,14 @@ const config: Config = { { docs: { sidebarPath: './sidebars.ts', + showLastUpdateTime: true, + includeCurrentVersion: true, + versions: { + current: { + label: 'Development', + path: 'dev', + } + }, }, blog: { showReadingTime: true, @@ -66,12 +76,23 @@ const config: Config = { src: 'img/palschema.png', }, items: [ + { + type: 'docSidebar', + sidebarId: 'homeSidebar', + position: 'left', + label: 'Home', + }, { type: 'docSidebar', sidebarId: 'documentationSidebar', position: 'left', label: 'Documentation', }, + { + type: 'docsVersionDropdown', + position: 'right', + versions: ['current', '0.5.2'], + }, { href: 'https://github.com/Okaetsu/PalSchema', position: 'right', @@ -79,16 +100,23 @@ const config: Config = { 'aria-label': 'GitHub Repository', 'title': 'GitHub Repository' }, + { + href: 'https://discord.gg/pR2yyCJgaY', + position: 'right', + className: 'header-discord-link', + 'aria-label': 'Discord Server', + 'title': 'Discord Server' + }, ], }, footer: { style: 'dark', links: [ { - title: 'Docs', + title: 'Documentation', items: [ { - label: 'Documentation', + label: 'Getting Started', to: '/docs/gettingstarted', }, ], @@ -106,8 +134,8 @@ const config: Config = { copyright: `Copyright © ${new Date().getFullYear()} PalSchema, Inc. Built with Docusaurus. Not Affiliated with Pocket Pair, Inc.`, }, prism: { - theme: prismThemes.github, - darkTheme: prismThemes.dracula, + theme: PrismLight, + darkTheme: PrismDark, }, } satisfies Preset.ThemeConfig, }; diff --git a/website/sidebars.ts b/website/sidebars.ts index a7ddc53..c4ca43a 100644 --- a/website/sidebars.ts +++ b/website/sidebars.ts @@ -2,32 +2,52 @@ import type {SidebarsConfig} from '@docusaurus/plugin-content-docs'; // This runs in Node.js - Don't use client-side code here (browser APIs, JSX...) -/** - * Creating a sidebar enables you to: - - create an ordered group of docs - - render a sidebar for each doc of that group - - provide next/previous navigation - - The sidebars can be generated from the filesystem, or explicitly defined here. - - Create as many sidebars as you want. - */ const sidebars: SidebarsConfig = { - // By default, Docusaurus generates a sidebar from the docs folder structure - documentationSidebar: [{type: 'autogenerated', dirName: '.'}], - - // But you can create a sidebar manually - /* - tutorialSidebar: [ - 'intro', - 'hello', + homeSidebar: [ + 'features', + 'installation', + 'installing-mods', + 'configuration', + ], + documentationSidebar: [ + 'gettingstarted', + 'resources', { type: 'category', - label: 'Tutorial', - items: ['tutorial-basics/create-a-document'], + label: 'Types', + items: [ + 'types/fstring', + 'types/fname', + 'types/ftext', + 'types/boolproperty', + 'types/enumproperty', + 'types/numericproperty', + 'types/arrayproperty', + 'types/mapproperty', + 'types/structproperty', + 'types/softobjectptr', + 'types/softclassptr', + ], }, - ], - */ + { + type: 'category', + label: 'Guides', + items: [ + 'guides/items/creatingabow', + 'guides/blueprints/intro', + 'guides/blueprints/components', + 'guides/rawtables/intro', + 'guides/rawtables/wildcard', + 'guides/buildings/craftingstation', + 'guides/enums/newenums', + 'guides/translations/intro', + 'guides/pals/addingranchsuitability', + 'guides/resources/importingimages', + 'guides/helpguide/intro', + 'guides/spawners/overview', + ], + }, + ] }; export default sidebars; diff --git a/website/src/css/custom.css b/website/src/css/custom.css index f582a04..ca25180 100644 --- a/website/src/css/custom.css +++ b/website/src/css/custom.css @@ -4,28 +4,35 @@ * work well for content-centric websites. */ +/* Copyright 2022 The Noto Project Authors (https://github.com/notofonts/latin-greek-cyrillic) */ +@font-face { + font-family: "NotoSans Regular"; + src: url("/static/fonts/NotoSans-Regular.ttf"); + font-weight: 400 400; +} + /* You can override the default Infima variables here. */ :root { - --ifm-color-primary: #2e8555; - --ifm-color-primary-dark: #29784c; - --ifm-color-primary-darker: #277148; - --ifm-color-primary-darkest: #205d3b; - --ifm-color-primary-light: #33925d; - --ifm-color-primary-lighter: #359962; - --ifm-color-primary-lightest: #3cad6e; + --ifm-color-primary: #3578E5; + --ifm-color-primary-dark: #1D4ED8; + --ifm-color-primary-darker: #1E40AF; + --ifm-color-primary-darkest: #1E3A8A; + --ifm-color-primary-light: #3B82F6; + --ifm-color-primary-lighter: #60A5FA; + --ifm-color-primary-lightest: #93C5FD; --ifm-code-font-size: 95%; --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1); } /* For readability concerns, you should choose a lighter palette in dark mode. */ [data-theme='dark'] { - --ifm-color-primary: #25c2a0; - --ifm-color-primary-dark: #21af90; - --ifm-color-primary-darker: #1fa588; - --ifm-color-primary-darkest: #1a8870; - --ifm-color-primary-light: #29d5b0; - --ifm-color-primary-lighter: #32d8b4; - --ifm-color-primary-lightest: #4fddbf; + --ifm-color-primary: #4fabd6; + --ifm-color-primary-dark: #3ba2d1; + --ifm-color-primary-darker: #329dce; + --ifm-color-primary-darkest: #258bbd; + --ifm-color-primary-light: #63b4db; + --ifm-color-primary-lighter: #6fbade; + --ifm-color-primary-lightest: #8bc8e6; --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3); } @@ -38,13 +45,11 @@ width: 24px; height: 24px; display: flex; - background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") - no-repeat; + background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") no-repeat; } html[data-theme='dark'] .header-github-link:before { - background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='white' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") - no-repeat; + background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='white' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") no-repeat; } .header-discord-link:hover { @@ -56,11 +61,9 @@ html[data-theme='dark'] .header-github-link:before { width: 24px; height: 24px; display: flex; - background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 126.644 96'%3E%3Cpath d='M81.15,0c-1.2376,2.1973-2.3489,4.4704-3.3591,6.794-9.5975-1.4396-19.3718-1.4396-28.9945,0-.985-2.3236-2.1216-4.5967-3.3591-6.794-9.0166,1.5407-17.8059,4.2431-26.1405,8.0568C2.779,32.5304-1.6914,56.3725.5312,79.8863c9.6732,7.1476,20.5083,12.603,32.0505,16.0884,2.6014-3.4854,4.8998-7.1981,6.8698-11.0623-3.738-1.3891-7.3497-3.1318-10.8098-5.1523.9092-.6567,1.7932-1.3386,2.6519-1.9953,20.281,9.547,43.7696,9.547,64.0758,0,.8587.7072,1.7427,1.3891,2.6519,1.9953-3.4601,2.0457-7.0718,3.7632-10.835,5.1776,1.97,3.8642,4.2683,7.5769,6.8698,11.0623,11.5419-3.4854,22.3769-8.9156,32.0509-16.0631,2.626-27.2771-4.496-50.9172-18.817-71.8548C98.9811,4.2684,90.1918,1.5659,81.1752.0505l-.0252-.0505ZM42.2802,65.4144c-6.2383,0-11.4159-5.6575-11.4159-12.6535s4.9755-12.6788,11.3907-12.6788,11.5169,5.708,11.4159,12.6788c-.101,6.9708-5.026,12.6535-11.3907,12.6535ZM84.3576,65.4144c-6.2637,0-11.3907-5.6575-11.3907-12.6535s4.9755-12.6788,11.3907-12.6788,11.4917,5.708,11.3906,12.6788c-.101,6.9708-5.026,12.6535-11.3906,12.6535Z' fill='%235865f2'/%3E%3C/svg%3E") - no-repeat center center; + background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 126.644 96'%3E%3Cpath d='M81.15,0c-1.2376,2.1973-2.3489,4.4704-3.3591,6.794-9.5975-1.4396-19.3718-1.4396-28.9945,0-.985-2.3236-2.1216-4.5967-3.3591-6.794-9.0166,1.5407-17.8059,4.2431-26.1405,8.0568C2.779,32.5304-1.6914,56.3725.5312,79.8863c9.6732,7.1476,20.5083,12.603,32.0505,16.0884,2.6014-3.4854,4.8998-7.1981,6.8698-11.0623-3.738-1.3891-7.3497-3.1318-10.8098-5.1523.9092-.6567,1.7932-1.3386,2.6519-1.9953,20.281,9.547,43.7696,9.547,64.0758,0,.8587.7072,1.7427,1.3891,2.6519,1.9953-3.4601,2.0457-7.0718,3.7632-10.835,5.1776,1.97,3.8642,4.2683,7.5769,6.8698,11.0623,11.5419-3.4854,22.3769-8.9156,32.0509-16.0631,2.626-27.2771-4.496-50.9172-18.817-71.8548C98.9811,4.2684,90.1918,1.5659,81.1752.0505l-.0252-.0505ZM42.2802,65.4144c-6.2383,0-11.4159-5.6575-11.4159-12.6535s4.9755-12.6788,11.3907-12.6788,11.5169,5.708,11.4159,12.6788c-.101,6.9708-5.026,12.6535-11.3907,12.6535ZM84.3576,65.4144c-6.2637,0-11.3907-5.6575-11.3907-12.6535s4.9755-12.6788,11.3907-12.6788,11.4917,5.708,11.3906,12.6788c-.101,6.9708-5.026,12.6535-11.3906,12.6535Z' fill='%235865f2'/%3E%3C/svg%3E") no-repeat center center; } html[data-theme='dark'] .header-discord-link:before { - background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 126.644 96'%3E%3Cpath d='M81.15,0c-1.2376,2.1973-2.3489,4.4704-3.3591,6.794-9.5975-1.4396-19.3718-1.4396-28.9945,0-.985-2.3236-2.1216-4.5967-3.3591-6.794-9.0166,1.5407-17.8059,4.2431-26.1405,8.0568C2.779,32.5304-1.6914,56.3725.5312,79.8863c9.6732,7.1476,20.5083,12.603,32.0505,16.0884,2.6014-3.4854,4.8998-7.1981,6.8698-11.0623-3.738-1.3891-7.3497-3.1318-10.8098-5.1523.9092-.6567,1.7932-1.3386,2.6519-1.9953,20.281,9.547,43.7696,9.547,64.0758,0,.8587.7072,1.7427,1.3891,2.6519,1.9953-3.4601,2.0457-7.0718,3.7632-10.835,5.1776,1.97,3.8642,4.2683,7.5769,6.8698,11.0623,11.5419-3.4854,22.3769-8.9156,32.0509-16.0631,2.626-27.2771-4.496-50.9172-18.817-71.8548C98.9811,4.2684,90.1918,1.5659,81.1752.0505l-.0252-.0505ZM42.2802,65.4144c-6.2383,0-11.4159-5.6575-11.4159-12.6535s4.9755-12.6788,11.3907-12.6788,11.5169,5.708,11.4159,12.6788c-.101,6.9708-5.026,12.6535-11.3907,12.6535ZM84.3576,65.4144c-6.2637,0-11.3907-5.6575-11.3907-12.6535s4.9755-12.6788,11.3907-12.6788,11.4917,5.708,11.3906,12.6788c-.101,6.9708-5.026,12.6535-11.3906,12.6535Z' fill='white'/%3E%3C/svg%3E") - no-repeat center center; + background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 126.644 96'%3E%3Cpath d='M81.15,0c-1.2376,2.1973-2.3489,4.4704-3.3591,6.794-9.5975-1.4396-19.3718-1.4396-28.9945,0-.985-2.3236-2.1216-4.5967-3.3591-6.794-9.0166,1.5407-17.8059,4.2431-26.1405,8.0568C2.779,32.5304-1.6914,56.3725.5312,79.8863c9.6732,7.1476,20.5083,12.603,32.0505,16.0884,2.6014-3.4854,4.8998-7.1981,6.8698-11.0623-3.738-1.3891-7.3497-3.1318-10.8098-5.1523.9092-.6567,1.7932-1.3386,2.6519-1.9953,20.281,9.547,43.7696,9.547,64.0758,0,.8587.7072,1.7427,1.3891,2.6519,1.9953-3.4601,2.0457-7.0718,3.7632-10.835,5.1776,1.97,3.8642,4.2683,7.5769,6.8698,11.0623,11.5419-3.4854,22.3769-8.9156,32.0509-16.0631,2.626-27.2771-4.496-50.9172-18.817-71.8548C98.9811,4.2684,90.1918,1.5659,81.1752.0505l-.0252-.0505ZM42.2802,65.4144c-6.2383,0-11.4159-5.6575-11.4159-12.6535s4.9755-12.6788,11.3907-12.6788,11.5169,5.708,11.4159,12.6788c-.101,6.9708-5.026,12.6535-11.3907,12.6535ZM84.3576,65.4144c-6.2637,0-11.3907-5.6575-11.3907-12.6535s4.9755-12.6788,11.3907-12.6788,11.4917,5.708,11.3906,12.6788c-.101,6.9708-5.026,12.6535-11.3906,12.6535Z' fill='white'/%3E%3C/svg%3E") no-repeat center center; } \ No newline at end of file diff --git a/website/src/pages/index.module.css b/website/src/pages/index.module.css index 9f71a5d..535ed08 100644 --- a/website/src/pages/index.module.css +++ b/website/src/pages/index.module.css @@ -20,4 +20,11 @@ display: flex; align-items: center; justify-content: center; + gap: 1rem; } + +.headerImage { + width: 100%; + max-width: 480px; + max-height: 120px; +} \ No newline at end of file diff --git a/website/src/pages/index.tsx b/website/src/pages/index.tsx index e401f0a..57c820c 100644 --- a/website/src/pages/index.tsx +++ b/website/src/pages/index.tsx @@ -3,9 +3,8 @@ import clsx from 'clsx'; import Link from '@docusaurus/Link'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import Layout from '@theme/Layout'; -import HomepageFeatures from '@site/src/components/HomepageFeatures'; -import Heading from '@theme/Heading'; +import HeaderImageSVG from '@site/static/img/palschema_card.svg'; import styles from './index.module.css'; function HomepageHeader() { @@ -13,11 +12,14 @@ function HomepageHeader() { return (
- - {siteConfig.title} - -

{siteConfig.tagline}

+ +

{siteConfig.tagline}

+ + Installation + diff --git a/website/src/theme/prismDark.ts b/website/src/theme/prismDark.ts new file mode 100644 index 0000000..5fdaf25 --- /dev/null +++ b/website/src/theme/prismDark.ts @@ -0,0 +1,74 @@ +import {themes, type PrismTheme} from 'prism-react-renderer'; + +const baseTheme = themes.vsDark; + +export default { + plain: { + color: '#D4D4D4', + backgroundColor: '#212121', + }, + styles: [ + ...baseTheme.styles, + { + types: ['title'], + style: { + color: '#569CD6', + fontWeight: 'bold', + }, + }, + { + types: ['property', 'parameter'], + style: { + color: '#9CDCFE', + }, + }, + { + types: ['script'], + style: { + color: '#D4D4D4', + }, + }, + { + types: ['boolean', 'arrow', 'atrule', 'tag'], + style: { + color: '#569CD6', + }, + }, + { + types: ['number', 'color', 'unit'], + style: { + color: '#B5CEA8', + }, + }, + { + types: ['font-matter'], + style: { + color: '#CE9178', + }, + }, + { + types: ['keyword', 'rule'], + style: { + color: '#C586C0', + }, + }, + { + types: ['regex'], + style: { + color: '#D16969', + }, + }, + { + types: ['maybe-class-name'], + style: { + color: '#4EC9B0', + }, + }, + { + types: ['constant'], + style: { + color: '#4FC1FF', + }, + }, + ], +} satisfies PrismTheme; \ No newline at end of file diff --git a/website/src/theme/prismLight.ts b/website/src/theme/prismLight.ts new file mode 100644 index 0000000..180aae0 --- /dev/null +++ b/website/src/theme/prismLight.ts @@ -0,0 +1,101 @@ +import {themes, type PrismTheme} from 'prism-react-renderer'; + +const baseTheme = themes.github; + +export default { + ...baseTheme, + styles: [ + ...baseTheme.styles, + { + types: ['title'], + style: { + color: '#0550AE', + fontWeight: 'bold', + }, + }, + { + types: ['parameter'], + style: { + color: '#953800', + }, + }, + { + types: ['boolean', 'rule', 'color', 'constant', 'property'], + style: { + color: '#005CC5', + }, + }, + { + types: ['number'], + style: { + color: '#E36209', + }, + }, + { + types: ['atrule', 'tag'], + style: { + color: '#22863A', + }, + }, + { + types: ['script'], + style: { + color: '#24292E', + }, + }, + { + types: ['operator', 'unit', 'rule'], + style: { + color: '#D73A49', + }, + }, + { + types: ['font-matter', 'string', 'attr-value'], + style: { + color: '#C6105F', + }, + }, + { + types: ['class-name'], + style: { + color: '#116329', + }, + }, + { + types: ['attr-name'], + style: { + color: '#0550AE', + }, + }, + { + types: ['keyword'], + style: { + color: '#CF222E', + }, + }, + { + types: ['function'], + style: { + color: '#8250DF', + }, + }, + { + types: ['selector'], + style: { + color: '#6F42C1', + }, + }, + { + types: ['variable'], + style: { + color: '#E36209', + }, + }, + { + types: ['comment'], + style: { + color: '#6B6B6B', + }, + }, + ], +} satisfies PrismTheme; \ No newline at end of file diff --git a/website/static/fonts/NotoSans-Regular.ttf b/website/static/fonts/NotoSans-Regular.ttf new file mode 100644 index 0000000..4bac02f Binary files /dev/null and b/website/static/fonts/NotoSans-Regular.ttf differ diff --git a/website/static/img/logo.svg b/website/static/img/logo.svg deleted file mode 100644 index 9db6d0d..0000000 --- a/website/static/img/logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/website/static/img/palschema_card.svg b/website/static/img/palschema_card.svg new file mode 100644 index 0000000..fe8df45 --- /dev/null +++ b/website/static/img/palschema_card.svg @@ -0,0 +1,512 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/website/static/img/undraw_docusaurus_mountain.svg b/website/static/img/undraw_docusaurus_mountain.svg deleted file mode 100644 index af961c4..0000000 --- a/website/static/img/undraw_docusaurus_mountain.svg +++ /dev/null @@ -1,171 +0,0 @@ - - Easy to Use - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/website/static/img/undraw_docusaurus_react.svg b/website/static/img/undraw_docusaurus_react.svg deleted file mode 100644 index 94b5cf0..0000000 --- a/website/static/img/undraw_docusaurus_react.svg +++ /dev/null @@ -1,170 +0,0 @@ - - Powered by React - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/website/static/img/undraw_docusaurus_tree.svg b/website/static/img/undraw_docusaurus_tree.svg deleted file mode 100644 index d9161d3..0000000 --- a/website/static/img/undraw_docusaurus_tree.svg +++ /dev/null @@ -1,40 +0,0 @@ - - Focus on What Matters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/website/versioned_docs/version-0.5.2/assets/GraphicsAPI.png b/website/versioned_docs/version-0.5.2/assets/GraphicsAPI.png new file mode 100644 index 0000000..010f8a9 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/assets/GraphicsAPI.png differ diff --git a/website/versioned_docs/version-0.5.2/assets/bUseUObjectArrayCache.png b/website/versioned_docs/version-0.5.2/assets/bUseUObjectArrayCache.png new file mode 100644 index 0000000..48f927b Binary files /dev/null and b/website/versioned_docs/version-0.5.2/assets/bUseUObjectArrayCache.png differ diff --git a/website/versioned_docs/version-0.5.2/assets/congratulations.png b/website/versioned_docs/version-0.5.2/assets/congratulations.png new file mode 100644 index 0000000..303c5ad Binary files /dev/null and b/website/versioned_docs/version-0.5.2/assets/congratulations.png differ diff --git a/website/versioned_docs/version-0.5.2/assets/correct_ue4ss_install.png b/website/versioned_docs/version-0.5.2/assets/correct_ue4ss_install.png new file mode 100644 index 0000000..31c5a1f Binary files /dev/null and b/website/versioned_docs/version-0.5.2/assets/correct_ue4ss_install.png differ diff --git a/website/versioned_docs/version-0.5.2/assets/my_item.png b/website/versioned_docs/version-0.5.2/assets/my_item.png new file mode 100644 index 0000000..caccc45 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/assets/my_item.png differ diff --git a/website/versioned_docs/version-0.5.2/assets/palschema_location.png b/website/versioned_docs/version-0.5.2/assets/palschema_location.png new file mode 100644 index 0000000..495142d Binary files /dev/null and b/website/versioned_docs/version-0.5.2/assets/palschema_location.png differ diff --git a/website/versioned_docs/version-0.5.2/assets/palschema_location2.png b/website/versioned_docs/version-0.5.2/assets/palschema_location2.png new file mode 100644 index 0000000..01728cc Binary files /dev/null and b/website/versioned_docs/version-0.5.2/assets/palschema_location2.png differ diff --git a/website/versioned_docs/version-0.5.2/assets/schema_mods_folder.png b/website/versioned_docs/version-0.5.2/assets/schema_mods_folder.png new file mode 100644 index 0000000..4f1438c Binary files /dev/null and b/website/versioned_docs/version-0.5.2/assets/schema_mods_folder.png differ diff --git a/website/versioned_docs/version-0.5.2/assets/schema_suggestions.png b/website/versioned_docs/version-0.5.2/assets/schema_suggestions.png new file mode 100644 index 0000000..741e4d6 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/assets/schema_suggestions.png differ diff --git a/website/versioned_docs/version-0.5.2/assets/steam_browse_local_files.png b/website/versioned_docs/version-0.5.2/assets/steam_browse_local_files.png new file mode 100644 index 0000000..0eeafa7 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/assets/steam_browse_local_files.png differ diff --git a/website/versioned_docs/version-0.5.2/assets/steam_correct_ue4ss_install.png b/website/versioned_docs/version-0.5.2/assets/steam_correct_ue4ss_install.png new file mode 100644 index 0000000..fcea24a Binary files /dev/null and b/website/versioned_docs/version-0.5.2/assets/steam_correct_ue4ss_install.png differ diff --git a/website/versioned_docs/version-0.5.2/assets/steam_palworld_settings.png b/website/versioned_docs/version-0.5.2/assets/steam_palworld_settings.png new file mode 100644 index 0000000..ba2d2ae Binary files /dev/null and b/website/versioned_docs/version-0.5.2/assets/steam_palworld_settings.png differ diff --git a/website/versioned_docs/version-0.5.2/assets/steam_wrong_ue4ss_install.png b/website/versioned_docs/version-0.5.2/assets/steam_wrong_ue4ss_install.png new file mode 100644 index 0000000..be13e57 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/assets/steam_wrong_ue4ss_install.png differ diff --git a/website/versioned_docs/version-0.5.2/assets/visual_blueprint_class_soft.png b/website/versioned_docs/version-0.5.2/assets/visual_blueprint_class_soft.png new file mode 100644 index 0000000..924c389 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/assets/visual_blueprint_class_soft.png differ diff --git a/website/versioned_docs/version-0.5.2/assets/vscode_context.png b/website/versioned_docs/version-0.5.2/assets/vscode_context.png new file mode 100644 index 0000000..b3779fd Binary files /dev/null and b/website/versioned_docs/version-0.5.2/assets/vscode_context.png differ diff --git a/website/versioned_docs/version-0.5.2/assets/vscode_install.png b/website/versioned_docs/version-0.5.2/assets/vscode_install.png new file mode 100644 index 0000000..31bbfde Binary files /dev/null and b/website/versioned_docs/version-0.5.2/assets/vscode_install.png differ diff --git a/website/versioned_docs/version-0.5.2/assets/vscode_project_structure.png b/website/versioned_docs/version-0.5.2/assets/vscode_project_structure.png new file mode 100644 index 0000000..28dbf14 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/assets/vscode_project_structure.png differ diff --git a/website/versioned_docs/version-0.5.2/assets/wrong_ue4ss_install.png b/website/versioned_docs/version-0.5.2/assets/wrong_ue4ss_install.png new file mode 100644 index 0000000..69a2e80 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/assets/wrong_ue4ss_install.png differ diff --git a/website/versioned_docs/version-0.5.2/configuration.md b/website/versioned_docs/version-0.5.2/configuration.md new file mode 100644 index 0000000..d846774 --- /dev/null +++ b/website/versioned_docs/version-0.5.2/configuration.md @@ -0,0 +1,23 @@ +--- +sidebar_position: 3 +--- + +# Configuration + +When you run Palworld, it'll generate a `config.json` in a config folder where Pal Schema resides. This config file can be used to customize how Pal Schema functions and more settings will be added as development progresses further. + +I will present an example of a default config.json after it has been generated and explain what each value does. + +```json +{ + "languageOverride": "", + "enableAutoReload": false, + "enableDebugLogging": false +} +``` + +`languageOverride` can be used to load custom translation mods for languages that the game doesn't normally support, this could in theory be anything, but it's preferred to follow the [ISO-639](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) two-letter codes. If it's a made up language like pirate speak for example then you can just do `pirate`. Setting `languageOverride` to `""` will default to using whatever language Steam is set to. + +`enableAutoReload` is used to enable or disable automatic reloading of schema mods in-game when you save the mod file you're editing. This is mainly meant for Pal Schema mod developers. Defaults to `false`. + +`enableDebugLogging` is used to enable or disable more detailed logs for debugging purposes. Defaults to `false`. \ No newline at end of file diff --git a/website/versioned_docs/version-0.5.2/features.md b/website/versioned_docs/version-0.5.2/features.md new file mode 100644 index 0000000..c32d857 --- /dev/null +++ b/website/versioned_docs/version-0.5.2/features.md @@ -0,0 +1,19 @@ +--- +sidebar_position: 1 +--- + +# Features + +PalSchema is a mod that allows runtime modification of assets in Palworld with json files without introducing conflicts with other mods that modify the same game files. As the name suggests, heavy use of json schema is utilized, so mod creators can have autocompletion and error checking to make creation of table mods easier. + +--- + +- **Runtime Modification of Assets** - Main purpose of PalSchema is to be able to modify the game's assets via `.json` or `.jsonc` files. This includes `DT (Data Table)`, and `BP (Blueprint)` assets. Note that when it comes to Data Tables, you'll also be able to add new rows. + +- **Stability throughout Updates** - As we know, Palworld is in Early Access and this means frequent updates which results in traditional `.pak` mods breaking often. Lua mods are a great stable alternative, but they require coding knowledge and have some limitations currently on what they can and can't do. PalSchema aims to bring stability to the table while also making it super easy to create and modify existing mods. + +- **Custom Localization** - Ever wondered when a game plans on adding support for your language? If it doesn't exist, you'll be able to create it with PalSchema very easily. + +- **Auto-reload** - When enabled via the config, PalSchema detects any new changes made to your json files, reloads and applies those changes all while the game is still running which means you'll never have to exit the game to test for new changes, however there are some exceptions to this. + +- **Pak Reader Redirection** - Allows you to package any PalSchema related `.pak` files with your mod by creating a `paks` folder within your PalSchema mod. PalSchema will then read any `.pak` files you have within that `paks` folder, rather than having to do complicated setups via the default `Paks` location. \ No newline at end of file diff --git a/website/versioned_docs/version-0.5.2/gettingstarted.md b/website/versioned_docs/version-0.5.2/gettingstarted.md new file mode 100644 index 0000000..7ced26e --- /dev/null +++ b/website/versioned_docs/version-0.5.2/gettingstarted.md @@ -0,0 +1,150 @@ +--- +sidebar_position: 5 +--- + +# Getting Started + +## Essentials + +* [Visual Studio Code](https://code.visualstudio.com/) - I heavily recommend getting this as it will make your life a lot easier when creating mods for PalSchema and I will explain in a bit why that is. Also don't mistake Visual Studio Code for Visual Studio which is an IDE rather than just a rich text editor. Visual Studio Code is very lightweight and is essentially just a better Notepad. + +NOTE: Make sure to check `Add "Open with Code"` for both checkboxes as seen in the image below. + +![Visual Studio Code necessary checkboxes](assets/vscode_install.png) + +* [UE4SS Palworld](https://github.com/Okaetsu/RE-UE4SS/releases/tag/experimental-palworld) - You'll want to get the linked version rather than the latest one because Palworld did some engine modifications which now requires a `MemberVariableLayout.ini` with UE4SS. If you don't get the linked version you will experience crashes with certain mods and PalSchema is one of them. See issue [here](https://github.com/UE4SS-RE/RE-UE4SS/issues/802). UE4SS is required as PalSchema relies on it. + +* [FModel](https://fmodel.app/) - Very useful for exploring Palworld files in general, you'll want this for referencing different data tables and assets in the game. Setup guide for FModel can be found [here](https://pwmodding.wiki/docs/developers/useful-tools/fmodel). + +* [PalSchema](https://github.com/Okaetsu/PalSchema/releases) - You'll obviously need PalSchema itself. Make sure you get the PalSchema_x.x.x_Dev-beta version where x.x.x is the latest version available. + +Installation guide for PalSchema can be found in [here](./installation.mdx). + +## Setting Up + +Now that you've got everything installed, head over to the Mods folder where you installed PalSchema and right click on the PalSchema folder. + +You should see an `Open with Code` option as seen in the image below. + +![Visual representation for Open with Code option when right clicking PalSchema folder](assets/vscode_context.png) + +VSCode (Visual Studio Code) will now be open in a new window and you should see the following on the top-left side if everything was installed and setup correctly: + +![What the folder structure should look like when Visual Studio Code is open](assets/vscode_project_structure.png) + +## Explanation of Different Folders + +You'll notice there's a dlls, examples, mods and schemas folder. + +* dlls - This is where the main file for PalSchema resides and is the one handling loading of PalSchema mods, leave it be. + +* examples - I've included an example mod inside this folder that you can just drag into the mods folder and experiment with. + +* mods - This is where you'll want to put your mod files. + +* schemas - This is where VSCode will come in handy as it can read from the schema files inside to make sure our .json files are properly structured. Do not touch the files inside this folder. + +If we take a look inside the examples folder, we'll see the following folders inside ExampleMod: + +* appearance - This is where character creation related mods go like hair styles, eyes, head types, colors, etc... + +* items - This is where item related mods go. + +* pals - Pal related mods go here. + +* raw - This is for table mods that aren't categorized so you can modify any tables here, will explain at the end of the list. + +* skins - Pal skins and any other future skin types like buildings, weapons, etc. + +* translations - This is where translations for anything in the game goes and you can specify which language the translation is for by naming the folder after any of the localizations listed in the L10N folder of Palworld or you can also do custom localization. Palworld natively supports de, en, es, fr, it, ko, pt-BR, ru, zh-Hans, zh-Hant and you can easily add support for other unsupported languages with custom localization mods. + +Any mod that isn't a raw data table mod has some convenience logic behind them to make it so that you can edit multiple data tables without having to reference those other tables. You also get some neat autocompletion, detailed descriptions of each field and error checking. + +## Creating a Mod + +Now that we have all of that covered, let's get started. We'll start by creating an entirely new item based on an existing item in the game. + +1. You'll want to right-click on the mods folder in VSCode, select `New Folder...` and name it `MyFirstMod`. You can also create the folders and files outside VSCode if it's easier. + +2. Inside MyFirstMod create an `items` folder. + +3. Now create a `my_item.json` file inside `items` folder. You can call it anything as long as it ends with .json + +![Picture of an opened my_item.json file](assets/my_item.png) + +4. Next, we'll define our item inside `my_item.json`. write the following or copy-paste: + +```json +{ + "MOD_Raspberry": { + "Name": "Raspberry", + "Description": "It's very tasty.", + "Type": "Consumable", + "IconTexture": "/Game/Others/InventoryItemIcon/Texture/T_itemicon_Food_Berries.T_itemicon_Food_Berries", + "TypeA": "Food", + "TypeB": "FoodDishVegetable", + "Rank": 1, + "Rarity": 1, + "Price": 9999, + "MaxStackCount": 9999, + "Weight": 0.2, + "VisualBlueprintClassSoft": "/Game/Pal/Blueprint/Item/VisualModel/BP_Item_BerryRed.BP_Item_BerryRed_C", + "RestoreSatiety": 125, + "RestoreHP": 25, + "CorruptionFactor": 1.0, + "Recipe": { + "Product_Count": 1, + "WorkAmount": 10.0, + "Material1_Count": 1, + "Material1_Id": "Stone" + } + } +} +``` + +I'll explain the above structure: + +- `MOD_Raspberry` will be the internal code for our item that the game will use to identify which item we're referring to. You can make this anything, but you might be wondering why the MOD_ prefix? This is not required, but is good practice to avoid potential conflicts with future game updates as we can never know if they add an official item with the code `Raspberry` into the game. Do note that if this is set to an existing item id, it will modify that item instead rather than adding a new one. This can be particularly useful if you want to adjust the weight of existing items for example or anything else. + +- Name is a field provided by PalSchema and provides a global translation for all languages. For specifying a localized name for a specific language, look into creating a translations language mod. + +- Description is a field provided by PalSchema and provides a global translation for all languages. For specifying a localized description for a specific language, look into creating a translations language mod. + +- Type is self explanatory and determines the logic for this item. Valid values are Weapon, Armor, Consumable and Generic with Generic having no special logic. Generic items are typically things like Materials (Stone, Wood, etc). + +- TypeA and TypeB are used for determining what station the item can be crafted at. + +- Rank is the tier of the station that's required to craft it. 1 being all of them. + +- Rarity defines the icon background color and text color for the item. + - 0 = Common + - 1 = Uncommon + - 2 = Rare + - 3 = Epic + - 4 = Legendary + +- Price requires some manual calculation as it doesn't reflect the final value. You can get the final price by dividing the price by 10, so in our case 9999 / 10 = 999 gold in-game. + +- MaxStackCount is self explanatory. Just don't go over 9999 due to duplication issue present in the Vanilla game. + +- RestoreSatiety controls the amount of hunger replenished. + +- RestoreHP is most likely health recovery gained from eating the item? + +- CorruptionFactor controls how quickly the food spoils. 1.0 is default, lower values make the item spoil slower while higher values make it spoil faster. Fun fact: You can use this for any item, not just consumables. + +- Recipe is something that doesn't normally exist within the table row and is something provided by PalSchema for convenience. This field automatically adds to the item recipe table. Product_Count is how many items are produced, WorkAmount is how long it should take to craft, Material_Count and Material_Id are the required materials and their count. Can go from 1 to 4. We've set the Raspberry to be craftable at any cooking station for 1 Stone. + +Any fields not covered, you can just hover over it and you'll get a detailed description of what it is for. VisualBlueprintClassSoft as an example: + +![VisualBlueprintClassSoft Tooltip](assets/visual_blueprint_class_soft.png) + +Here's an example of suggestions as well: + +![Schema Suggestions](assets/schema_suggestions.png) + +5. Done, That's everything! If you're used to having to package the mod into a .pak file, that step is completely removed with PalSchema as it loads the .json file directly when you launch the game. Let's test the mod in-game! + +![alt text](assets/congratulations.png) + +Success! We've created our first new item in Palworld! Now keep in mind that if you have any modded items in your world and you remove the mod, your world will not be playable anymore. diff --git a/website/versioned_docs/version-0.5.2/guides/_category_.json b/website/versioned_docs/version-0.5.2/guides/_category_.json new file mode 100644 index 0000000..5e081e8 --- /dev/null +++ b/website/versioned_docs/version-0.5.2/guides/_category_.json @@ -0,0 +1,7 @@ +{ + "label": "Guides", + "position": 7, + "link": { + "type": "generated-index" + } +} diff --git a/website/versioned_docs/version-0.5.2/guides/blueprints/_category_.json b/website/versioned_docs/version-0.5.2/guides/blueprints/_category_.json new file mode 100644 index 0000000..b4c2f69 --- /dev/null +++ b/website/versioned_docs/version-0.5.2/guides/blueprints/_category_.json @@ -0,0 +1,7 @@ +{ + "label": "Blueprints", + "position": 2, + "link": { + "type": "generated-index" + } +} diff --git a/website/versioned_docs/version-0.5.2/guides/blueprints/assets/direhowl_jumpvelocity.gif b/website/versioned_docs/version-0.5.2/guides/blueprints/assets/direhowl_jumpvelocity.gif new file mode 100644 index 0000000..a621a2e Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/blueprints/assets/direhowl_jumpvelocity.gif differ diff --git a/website/versioned_docs/version-0.5.2/guides/blueprints/assets/fmodel_correct_component.png b/website/versioned_docs/version-0.5.2/guides/blueprints/assets/fmodel_correct_component.png new file mode 100644 index 0000000..e7f068c Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/blueprints/assets/fmodel_correct_component.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/blueprints/assets/fmodel_default_search.png b/website/versioned_docs/version-0.5.2/guides/blueprints/assets/fmodel_default_search.png new file mode 100644 index 0000000..9d165e8 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/blueprints/assets/fmodel_default_search.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/blueprints/assets/fmodel_garm.png b/website/versioned_docs/version-0.5.2/guides/blueprints/assets/fmodel_garm.png new file mode 100644 index 0000000..02ab244 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/blueprints/assets/fmodel_garm.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/blueprints/assets/fmodel_garm_default.png b/website/versioned_docs/version-0.5.2/guides/blueprints/assets/fmodel_garm_default.png new file mode 100644 index 0000000..a742b1c Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/blueprints/assets/fmodel_garm_default.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/blueprints/assets/garm_json.png b/website/versioned_docs/version-0.5.2/guides/blueprints/assets/garm_json.png new file mode 100644 index 0000000..3cfda43 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/blueprints/assets/garm_json.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/blueprints/assets/tutorial1_finalresult.gif b/website/versioned_docs/version-0.5.2/guides/blueprints/assets/tutorial1_finalresult.gif new file mode 100644 index 0000000..db18e22 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/blueprints/assets/tutorial1_finalresult.gif differ diff --git a/website/versioned_docs/version-0.5.2/guides/blueprints/assets/tutorial1_folderstructure.png b/website/versioned_docs/version-0.5.2/guides/blueprints/assets/tutorial1_folderstructure.png new file mode 100644 index 0000000..7067b0b Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/blueprints/assets/tutorial1_folderstructure.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/blueprints/components.md b/website/versioned_docs/version-0.5.2/guides/blueprints/components.md new file mode 100644 index 0000000..e15a733 --- /dev/null +++ b/website/versioned_docs/version-0.5.2/guides/blueprints/components.md @@ -0,0 +1,61 @@ +--- +sidebar_position: 2 +--- + +# Blueprint Components + +There's a little more to editing a blueprint's components so I'll walk you through it. Please check the [Intro to Blueprint Editing](./intro) if you're new to modifying blueprints with PalSchema. + +## Finding the Component + +In this example we'll be editing Direhowl. + +Let's look at `Pal/Content/Pal/Blueprint/Character/Monster/PalActorBP/Garm/BP_Garm.uasset` in [FModel](https://pwmodding.wiki/docs/developers/useful-tools/fmodel). Open the asset, hit Ctrl+F and look for `PalCharacterMovementComponent`. + +![](assets/fmodel_garm.png) + +You'll see the names `PalCharacterMovementComponent` and `CharMoveComp`. You don't want to use either of these, instead I will show you where to find the correct component name that you need to be using. + +Take a note of the asset's name that we're editing which is `BP_Garm`. As you may remember from the blueprint intro, we added a `_C` at the end to indicate the class so it becomes `BP_Garm_C`. + +Now, we'll want to add `Default__` in front of `BP_Garm_C` so it becomes `Default__BP_Garm_C`. Do you see a theme here? If not, here's an example with `BP_PinkCat` (Cattiva): + +`BP_PinkCat` -> `BP_PinkCat_C` -> `Default__BP_PinkCat_C`. Very simple. + +Next, hit Ctrl+F and search for `"Name": "Default__BP_Garm_C"`. + +![](assets/fmodel_default_search.png) + +You should now see a list of default properties for the default object of `BP_Garm` and among those properties are our Direhowl's components. + +![](assets/fmodel_garm_default.png) + +Scroll down a bit and you should see our `PalCharacterMovementComponent` in this properties list. + +![](assets/fmodel_correct_component.png) + +`CharacterMovement` is the correct name that we need to be using to edit the component. + +## Editing our Component + +Now that we have found our component, let's get to editing. + +Setup your mod folder within PalSchema's mods folder. It should look something like `GarmMod/blueprints/garm.json`. + +![](assets/garm_json.png) + +Open `garm.json` and copy the following into it. We'll be editing `JumpZVelocity` to 3200.0 which is what controls how high a pal can jump. + +```json +{ + "BP_Garm_C": { + "CharacterMovement": { + "JumpZVelocity": 3200.0 + } + } +} +``` + +Now if we load into a world and jump while riding a Direhowl, we should jump much higher! + +![](assets/direhowl_jumpvelocity.gif) \ No newline at end of file diff --git a/website/versioned_docs/version-0.5.2/guides/blueprints/intro.md b/website/versioned_docs/version-0.5.2/guides/blueprints/intro.md new file mode 100644 index 0000000..12eca2e --- /dev/null +++ b/website/versioned_docs/version-0.5.2/guides/blueprints/intro.md @@ -0,0 +1,41 @@ +--- +sidebar_position: 1 +--- + +# Intro to Blueprint Editing + +## Requirements + +- You've done everything in [Getting Started](../../gettingstarted.md) to get accustomed to Pal Schema. + +- Pal Schema 0.2.0+ as this feature was added in 0.2.0. + +## Infinite Sprint Stamina + +Start by creating the following folder structure in your mods folder: `MyFirstBPMod\blueprints` and create a `sprint_stamina.json` file in the `blueprints` folder. + +The folder **must** be called `blueprints` for Pal Schema to pick it up. `MyFirstBPMod` and `sprint_stamina` you can just call anything really. + +![](assets/tutorial1_folderstructure.png) + +Open `sprint_stamina.json` and Copy Paste the following in it: + +```json +{ + "BP_PalGameSetting_C": { + "SprintSP": 0.0 + } +} +``` + +`BP_PalGameSetting` is the name of the asset we want to edit and inside it is `SprintSP` which is a member variable of `BP_PalGameSetting` that controls the stamina consumption rate when sprinting. In this case we're setting it to 0.0 which means we'll be able to run forever without running out of stamina. + +Notice how the asset name has `_C` at the end. Appending a `_C` to the end of the asset name is important because otherwise Pal Schema will ignore the entry. + +`SprintSP` is one of the many variables available in `BP_PalGameSetting` and you can use the [LiveView](https://docs.ue4ss.com/dev/feature-overview/live-view.html) feature in UE4SS to inspect what variables each asset has. [FModel](https://fmodel.app/) works too, but it doesn't show everything since it only shows variables that have been changed from their defaults. + +Let's test it in-game now. + +![](assets/tutorial1_finalresult.gif) + +If everything was done correctly, you shouldn't see the stamina bar at all when running. Congratulations! \ No newline at end of file diff --git a/website/versioned_docs/version-0.5.2/guides/buildings/_category_.json b/website/versioned_docs/version-0.5.2/guides/buildings/_category_.json new file mode 100644 index 0000000..f6e4fe9 --- /dev/null +++ b/website/versioned_docs/version-0.5.2/guides/buildings/_category_.json @@ -0,0 +1,7 @@ +{ + "label": "Buildings", + "position": 4, + "link": { + "type": "generated-index" + } +} diff --git a/website/versioned_docs/version-0.5.2/guides/buildings/assets/craftingstation/buildwheel.png b/website/versioned_docs/version-0.5.2/guides/buildings/assets/craftingstation/buildwheel.png new file mode 100644 index 0000000..9a10575 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/buildings/assets/craftingstation/buildwheel.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/buildings/assets/craftingstation/buildworkablebounds_collision.png b/website/versioned_docs/version-0.5.2/guides/buildings/assets/craftingstation/buildworkablebounds_collision.png new file mode 100644 index 0000000..6e8950b Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/buildings/assets/craftingstation/buildworkablebounds_collision.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/buildings/assets/craftingstation/checkoverlapcollision_collision.png b/website/versioned_docs/version-0.5.2/guides/buildings/assets/craftingstation/checkoverlapcollision_collision.png new file mode 100644 index 0000000..9dbdc5e Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/buildings/assets/craftingstation/checkoverlapcollision_collision.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/buildings/assets/craftingstation/clipboard.png b/website/versioned_docs/version-0.5.2/guides/buildings/assets/craftingstation/clipboard.png new file mode 100644 index 0000000..232961b Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/buildings/assets/craftingstation/clipboard.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/buildings/assets/craftingstation/component_setup.png b/website/versioned_docs/version-0.5.2/guides/buildings/assets/craftingstation/component_setup.png new file mode 100644 index 0000000..113c4d0 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/buildings/assets/craftingstation/component_setup.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/buildings/assets/craftingstation/craftingstation_ingame.png b/website/versioned_docs/version-0.5.2/guides/buildings/assets/craftingstation/craftingstation_ingame.png new file mode 100644 index 0000000..4a1202e Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/buildings/assets/craftingstation/craftingstation_ingame.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/buildings/assets/craftingstation/craftingstation_recipes.png b/website/versioned_docs/version-0.5.2/guides/buildings/assets/craftingstation/craftingstation_recipes.png new file mode 100644 index 0000000..a4c412b Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/buildings/assets/craftingstation/craftingstation_recipes.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/buildings/assets/craftingstation/mesh.png b/website/versioned_docs/version-0.5.2/guides/buildings/assets/craftingstation/mesh.png new file mode 100644 index 0000000..322ceab Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/buildings/assets/craftingstation/mesh.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/buildings/assets/craftingstation/palbuildobject.png b/website/versioned_docs/version-0.5.2/guides/buildings/assets/craftingstation/palbuildobject.png new file mode 100644 index 0000000..7eb8bd8 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/buildings/assets/craftingstation/palbuildobject.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/buildings/assets/craftingstation/ps_folders.png b/website/versioned_docs/version-0.5.2/guides/buildings/assets/craftingstation/ps_folders.png new file mode 100644 index 0000000..1684f9f Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/buildings/assets/craftingstation/ps_folders.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/buildings/assets/craftingstation/staticmesh_collision.png b/website/versioned_docs/version-0.5.2/guides/buildings/assets/craftingstation/staticmesh_collision.png new file mode 100644 index 0000000..5e08cc6 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/buildings/assets/craftingstation/staticmesh_collision.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/buildings/assets/craftingstation/targettypes.png b/website/versioned_docs/version-0.5.2/guides/buildings/assets/craftingstation/targettypes.png new file mode 100644 index 0000000..33c097a Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/buildings/assets/craftingstation/targettypes.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/buildings/assets/craftingstation/technology.png b/website/versioned_docs/version-0.5.2/guides/buildings/assets/craftingstation/technology.png new file mode 100644 index 0000000..9ef00a2 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/buildings/assets/craftingstation/technology.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/buildings/craftingstation.md b/website/versioned_docs/version-0.5.2/guides/buildings/craftingstation.md new file mode 100644 index 0000000..383421b --- /dev/null +++ b/website/versioned_docs/version-0.5.2/guides/buildings/craftingstation.md @@ -0,0 +1,265 @@ +--- +sidebar_position: 1 +--- + +# Creating a Crafting Station + +## Requirements + +- You've done everything in [Getting Started](../../gettingstarted.md) and [Palworld Modding Kit](https://pwmodding.wiki/docs/palworld-modding-kit/install-part-1). + +- You've done eveything in [Creating a New Bow](../items/creatingabow.md) to understand dummy assets and how to package your mod. + +## Palworld Modding Kit + +Go ahead and launch Palworld Modding Kit and we can get started. + +### Creating the Blueprint + +1. In the Content folder, create the following folder structure: `PSTutorial/MyNewCraftingStation` + +2. Right-click on the empty space inside the `MyNewCraftingStation` folder and select `Blueprint Class`. + +3. In the "Pick Parent Class" menu, you'll want to search for `PalBuildObject` and select that as the parent class. Name the blueprint `BP_NewCraftingStation`. + +![image](assets/craftingstation/palbuildobject.png) + +4. Open `BP_NewCraftingStation` and add a few components to this Actor to make sure it doesn't crash when you load it in-game. Add the following Components: + + - `Static Mesh`, name it `StaticMesh` + + - `BP_WorkVisualFX`, name it `BP_WorkVisualFX` + + - `PalWorkFacingComponent`, name it `WorkFacing` + + - `BP_InteractableBox`, name it `BP_InteractableBox` + + - `PalMapObjectItemConverterParameterComponent`, name it `ItemConverterParameter` + + - `Box Collision`, name it `BuildWorkableBounds` + + - `Box Collision`, name it `CheckOverlapCollision` + +Your setup should look like the image below, make sure `StaticMesh` is the parent for `BP_WorkVisualFX`, `WorkFacing`, `BP_InteractableBox`, `BuildWorkableBounds` and `CheckOverlapCollision` + + ![image](assets/craftingstation/component_setup.png) + +5. Select `BP_NewCraftingStation` in the Component Hierarchy and adjust the following values: + + `Overlap Check Collision Ref` set `Component Name` to `CheckOverlapCollision` + + `ConcreteModelClass` should be set to `PalMapObjectConvertItemModel` + + `DestroyFXType` set this to whatever you'd prefer. + +6. Select the `StaticMesh` and change the Static Mesh property to a mesh of your preference or if you don't have a mesh, you can just search for `Cube` instead and use that. If you decide to go the Cube path, then you might notice that there's two of them. You'll want the one which has the path `/Engine/BasicShapes` rather than `/Engine/EngineMeshes`. + + ![image](assets/craftingstation/mesh.png) + + You might notice that I've set `Z` position on the Static Mesh to 48.0. This is to prevent the Mesh from clipping into the ground when you build it and the amount you need to adjust it depends on the Mesh you're using. I've also set the Material to `BasicShapeMaterial`. + +7. Next, adjust the Box Extent on `BP_InteractableBox`, `BuildWorkableBounds` and `CheckOverlapCollision`. This is something you'll have to fine tune yourself, but for this tutorial I've set them to the following XYZ values: + + - `BP_InteractableBox` and `BuildWorkableBounds`: 96.0, 96.0, 96.0 + + - `CheckOverlapCollision`: 52.0, 52.0, 52.0 + +8. Now adjust the Collision Settings for the following Components: + + - **StaticMesh** + + `Collision Presets`: `MapObjectPhysics` + + ![image](assets/craftingstation/staticmesh_collision.png) + + - **BuildWorkableBounds** + + `Generate Overlap Events`: `Unchecked` + + `Can Character Step Up On`: `No` + + `Collision Presets`: `NoCollision` + + ![image](assets/craftingstation/buildworkablebounds_collision.png) + + - **CheckOverlapCollision** + + `Collision Presets`: `BuildingOverlap` + + ![image](assets/craftingstation/checkoverlapcollision_collision.png) + +I know it's a lot of components already, but the next step is the final one we need to do in Modding Kit which is `ItemConverterParameter`. This is where we determine what types of items can be crafted at our Crafting Station and the `TargetMaxRank` of the Crafting Station. + +The `TargetMaxRank` in `ItemConverterParameter` corresponds to the Rank requirement of items. + +9. Adjust `TargetTypesA`, `TargetTypesB` and `TargetMaxRank` under the `PalMapObjectItemConverterParameterComponent` section. + + For the sake of this tutorial, we'll use the same types that the Primitive Workbench has, however you're free to set these to what you want, but keep in mind that including some types might introduce bugs. You can go ahead and copy paste the lines below into their respective properties by right clicking the property name and selecting `Paste`. Make sure to include the ( and ), plus the text inside of it. + + ![image](assets/craftingstation/clipboard.png) + + **TargetTypesA** + + `(Weapon,Armor,Consume,Ammo,Material,SpecialWeapon,Glider)` + + **TargetTypesB** + + `(ArmorBody,ArmorHead,SPWeaponCaptureBall,ConsumeBullet,WeaponMelee,WeaponBow,ConsumeOther,MaterialProccessing,Shield,Glider,Essential_UnlockPlayerFuture,WeaponHandgun,WeaponThrowObject,WeaponCrossbow,Essential_AdditionalInventory)` + + ![image](assets/craftingstation/targettypes.png) + + Set `TargetRankMax` to 5 which is one rank above **Production Assembly Line II** + +10. That's everything in Modding Kit! Now you can package the project and we can move into Pal Schema stuff. + +## Pal Schema + +### Crafting Station + +1. Create the following folder structure: + + `NewCraftingStation/buildings/newcraftingstation.json` + + ![image](assets/craftingstation/ps_folders.png) + + The `NewCraftingStation` and `newcraftingstation.json` can be called anything, however the `buildings` folder must always be named like this when working with buildings. + +2. Open `newcraftingstation.json` and copy-paste the following inside it: + + ```json + { + "TUTORIAL_NewCraftingStation": { + "Name": "Tutorial Workbench", + "Description": "This is the description that shows up in the Build Wheel.", + "BlueprintClassName": "BP_NewCraftingStation", + "BlueprintClassSoft": "/Game/PSTutorial/MyNewCraftingStation/BP_NewCraftingStation.BP_NewCraftingStation_C", + "IconTexture": "/Game/Pal/Texture/BuildObject/PNG/T_icon_buildObject_WorkBench.T_icon_buildObject_WorkBench", + "Hp": 2000, + "Defense": 2, + "MaterialType": "Wood", + "MaterialSubType": "Wood", + "bBelongToBaseCamp": true, + "DeteriorationDamage": 0.2, + "BuildingData": { + "TypeA": "Product", + "TypeB": "Prod_Craft", + "Rank": 5, + "RequiredBuildWorkAmount": 1.0, + "Material1_Id": "Wood", + "Material1_Count": 1 + }, + "Assignments": [ + { + "WorkSuitability": "Handcraft", + "WorkSuitabilityRank": 1, + "bPlayerWorkable": true, + "bBaseCampWorkerWorkable": true, + "WorkType": "CommonTemp", + "WorkActionType": "CommonWork", + "WorkerMaxNum": 0, + "AffectSanityValue": -0.15, + "AffectFullStomachValue": 1.0 + } + ], + "Technology": { + "UnlockBuildObjects": [ + "TUTORIAL_NewCraftingStation" + ], + "IconName": "WorkBench", + "IsBossTechnology": false, + "Name": "Tutorial Workbench", + "Description": "This is the description that shows in the Technology tab.", + "LevelCap": 2, + "Cost": 1 + } + } + } + ``` + + `IconTexture` I'm using the WorkBench icon as I don't have a custom icon, but if you have a custom icon, you can use that instead. + + `MaterialType` and `MaterialSubType` mostly determines damage modifiers. + + `DeteriorationDamage` determines how much damage the building should take each tick when it's not inside Palbox range. + + **BuildingData** + + `TypeA` and `TypeB` most likely determines how the building functions internally, not sure on this one. + + `Rank` is the same thing as `TargetMaxRank` we covered in Step 9 of [Creating the Blueprint](#creating-the-blueprint). + + `RequiredBuildWorkAmount` is the amount of work needed to construct the building fully. + + `Material1_Id` and `Material1_Count` determine the required materials to build the building. You can have up to 4 required materials `Material2_Id`, `Materia2_Count`, etc. + + **Assignments** + + `Assignments` contains an array of assignments for the building. This is typically one per building, but some buildings like farm crops require three. If you look at assignments in `DT_MapObjectAssignData` with FModel, you might notice that they have a certain number after the ID like `_0`. This is important for the assignments to function properly, but Pal Schema handles that for you when working with building mods, so what you see here is enough to make it work. + + **Technology** + + `UnlockBuildObjects` is an array of buildings to unlock with the Technology. + + `IconName` pulls the Icon Texture from `DT_BuildObjectIconDataTable`. + + `IsBossTechnology` determines if it should require Ancient Tech Points to unlock. + + `LevelCap` is the required level for unlocking the Technology. + + `Cost` is the cost in Technology Points. + + Anything else not listed here is either self explanatory or unknown. If you have information regarding the functionality of the unlisted properties, please post in the Palworld Modding discord and I will add them here. + +### Test Item and Recipe +Next, we obviously want some way of testing that the new crafting station works as we would expect so we'll create a new item with a Rank of 5. + +1. Navigate back to the `NewCraftingStation` folder and create an `items` folder and then a `sword.json` file inside the `items` folder. + +2. Open `sword.json` and copy-paste the following inside it: + +```json +{ + "Tutorial_Sword_5": { + "Name": "Legendary Sword", + "Description": " for close-range combat.\r\nThe blade is extremely sharp! Mightier than a pen, for sure.\r\nRequires to craft.", + "SneakAttackRate": 1.0, + "AttackValue": 1000, + "ID": "Tutorial_Sword_5", + "IconTexture": "/Game/Others/InventoryItemIcon/Texture/T_itemicon_Weapon_Sword.T_itemicon_Weapon_Sword", + "Type": "Weapon", + "TypeA": "Weapon", + "TypeB": "WeaponMelee", + "Rarity": 4, + "Rank": 5, + "Price": 10440, + "MaxStackCount": 1, + "SortID": 140, + "bNotConsumed": true, + "actorClass": "/Game/Pal/Blueprint/Weapon/BP_Sword.BP_Sword_C", + "Weight": 10.0, + "Durability": 2500.0, + "Recipe": { + "Product_Count": 1, + "WorkAmount": 500.0, + "Material1_Count": 5, + "Material1_Id": "Stone" + } + } +} +``` + +We'll be creating a Legendary variant of the Sword that can be crafted only at our new **Tutorial Workbench** since we specified `Rank` of 5 in our Sword's data and our Workbench allows crafting items with a Rank of 5 or lower. + +Notice the ``, the game's tooltip system will automatically grab the appropriate localization for our Workbench and it should display "Tutorial Workbench" in the description of our Sword. + +3. That's everything, you can now load your game and you should see results similar to the images below! + +### Final Result + +![image](assets/craftingstation/technology.png) + +![image](assets/craftingstation/buildwheel.png) + +![image](assets/craftingstation/craftingstation_ingame.png) + +![image](assets/craftingstation/craftingstation_recipes.png) \ No newline at end of file diff --git a/website/versioned_docs/version-0.5.2/guides/enums/_category_.json b/website/versioned_docs/version-0.5.2/guides/enums/_category_.json new file mode 100644 index 0000000..fc76266 --- /dev/null +++ b/website/versioned_docs/version-0.5.2/guides/enums/_category_.json @@ -0,0 +1,7 @@ +{ + "label": "Enums", + "position": 5, + "link": { + "type": "generated-index" + } +} diff --git a/website/versioned_docs/version-0.5.2/guides/enums/assets/newenums/liveview_result.png b/website/versioned_docs/version-0.5.2/guides/enums/assets/newenums/liveview_result.png new file mode 100644 index 0000000..425bfb1 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/enums/assets/newenums/liveview_result.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/enums/assets/newenums/tribes_file.png b/website/versioned_docs/version-0.5.2/guides/enums/assets/newenums/tribes_file.png new file mode 100644 index 0000000..8015de4 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/enums/assets/newenums/tribes_file.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/enums/newenums.md b/website/versioned_docs/version-0.5.2/guides/enums/newenums.md new file mode 100644 index 0000000..ceed07a --- /dev/null +++ b/website/versioned_docs/version-0.5.2/guides/enums/newenums.md @@ -0,0 +1,58 @@ +--- +sidebar_position: 1 +--- + +# Adding New Enums + +So in case you've been working with adding custom Pals, you'll immediately notice that the `Tribe` property becomes pretty important. With 0.4 adding Enum support, it's now possible to create new tribes and we'll go through the basics of adding new enums. + +## Setting up your Project + +1. You'll want to create your mod folder, for this tutorial let's just call it `MyCustomEnums`. + +2. Create another folder called `enums` inside `MyCustomEnums`. It's very important to call the sub folder `enums` because this is where PalSchema will look for any custom enums. + +3. Next, let's create a json file inside our `enums` folder. You can call the .json file whatever you want, I decided to call mine `new_tribes.json`. + +![](assets/newenums/tribes_file.png) + +4. Open the `new_tribes.json` file and add the following inside of it: + +```json +{ + "EPalTribeID": [ + "PurpleCat", + "KarateDog" + ] +} +``` + +Let's break the above into parts: +- `EPalTribeID` is the Enum we want to target. +- You must then provide an array of strings which are the new Enum values you want to add, in this case to `EPalTribeID`. +- You must make sure to not include the namespace in the value, so make sure you don't do something like `EPalTribeID::PurpleCat`. Just do `PurpleCat`. + +## Confirming in Live View + +You can confirm the addition of your new values by starting up Palworld with UE4SS' LiveView enabled and searching for `EPalTribeID` in the Live View tab and then clicking on the EPalTribeID that popped up during search. Introduction to Live View can be found on the [UE4SS docs](https://docs.ue4ss.com/dev/feature-overview/live-view.html). + +![Live View search result with new enums showing up inside EPalTribeID](assets/newenums/liveview_result.png) + +## Using your Custom Enums + +To use your newly added enums, you just reference them like you would do it normally. We'll assume we have our custom pal created in the pals folder with the following in it: + +```json +{ + "PurpleCat": { + "Tribe": "EPalTribeID::PurpleCat" + }, + "KarateDog": { + "Tribe": "EPalTribeID::KarateDog" + } +} +``` + +And there you have it! You can do this with any native Enum. You can differentiate by checking if the Enum starts with /Game/, this means that it's a User Defined Enum which is a blueprint asset basically. Native Enums start with /Script/. + +Do note that having the ability to create Enums is very powerful and is not only limited to custom pals. \ No newline at end of file diff --git a/website/versioned_docs/version-0.5.2/guides/helpguide/_category_.json b/website/versioned_docs/version-0.5.2/guides/helpguide/_category_.json new file mode 100644 index 0000000..336cc31 --- /dev/null +++ b/website/versioned_docs/version-0.5.2/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/versioned_docs/version-0.5.2/guides/helpguide/assets/survivalguide.png b/website/versioned_docs/version-0.5.2/guides/helpguide/assets/survivalguide.png new file mode 100644 index 0000000..f67c760 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/helpguide/assets/survivalguide.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/helpguide/intro.md b/website/versioned_docs/version-0.5.2/guides/helpguide/intro.md new file mode 100644 index 0000000..94bf5ee --- /dev/null +++ b/website/versioned_docs/version-0.5.2/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/versioned_docs/version-0.5.2/guides/items/_category_.json b/website/versioned_docs/version-0.5.2/guides/items/_category_.json new file mode 100644 index 0000000..060d7eb --- /dev/null +++ b/website/versioned_docs/version-0.5.2/guides/items/_category_.json @@ -0,0 +1,7 @@ +{ + "label": "Items", + "position": 1, + "link": { + "type": "generated-index" + } +} diff --git a/website/versioned_docs/version-0.5.2/guides/items/assets/arrow_number.png b/website/versioned_docs/version-0.5.2/guides/items/assets/arrow_number.png new file mode 100644 index 0000000..e3c80b0 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/items/assets/arrow_number.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/items/assets/assigned_meteor_arrow.png b/website/versioned_docs/version-0.5.2/guides/items/assets/assigned_meteor_arrow.png new file mode 100644 index 0000000..6414861 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/items/assets/assigned_meteor_arrow.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/items/assets/bp_bowbase.png b/website/versioned_docs/version-0.5.2/guides/items/assets/bp_bowbase.png new file mode 100644 index 0000000..198e8a1 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/items/assets/bp_bowbase.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/items/assets/cast_to_player.png b/website/versioned_docs/version-0.5.2/guides/items/assets/cast_to_player.png new file mode 100644 index 0000000..eb89705 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/items/assets/cast_to_player.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/items/assets/chunk_file.png b/website/versioned_docs/version-0.5.2/guides/items/assets/chunk_file.png new file mode 100644 index 0000000..4a6d4a7 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/items/assets/chunk_file.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/items/assets/copy_reference.png b/website/versioned_docs/version-0.5.2/guides/items/assets/copy_reference.png new file mode 100644 index 0000000..a88a1f7 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/items/assets/copy_reference.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/items/assets/data_asset.png b/website/versioned_docs/version-0.5.2/guides/items/assets/data_asset.png new file mode 100644 index 0000000..2920437 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/items/assets/data_asset.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/items/assets/equals_node.png b/website/versioned_docs/version-0.5.2/guides/items/assets/equals_node.png new file mode 100644 index 0000000..d0b631f Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/items/assets/equals_node.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/items/assets/final_bow.png b/website/versioned_docs/version-0.5.2/guides/items/assets/final_bow.png new file mode 100644 index 0000000..6e9fef0 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/items/assets/final_bow.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/items/assets/function_override.png b/website/versioned_docs/version-0.5.2/guides/items/assets/function_override.png new file mode 100644 index 0000000..63e548a Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/items/assets/function_override.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/items/assets/get_arrow_class.png b/website/versioned_docs/version-0.5.2/guides/items/assets/get_arrow_class.png new file mode 100644 index 0000000..b436ee9 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/items/assets/get_arrow_class.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/items/assets/get_arrow_class_nodes.png b/website/versioned_docs/version-0.5.2/guides/items/assets/get_arrow_class_nodes.png new file mode 100644 index 0000000..4c384db Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/items/assets/get_arrow_class_nodes.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/items/assets/hit_result.png b/website/versioned_docs/version-0.5.2/guides/items/assets/hit_result.png new file mode 100644 index 0000000..d7a708c Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/items/assets/hit_result.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/items/assets/label_settings.png b/website/versioned_docs/version-0.5.2/guides/items/assets/label_settings.png new file mode 100644 index 0000000..e79168f Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/items/assets/label_settings.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/items/assets/mod_folder_structure.png b/website/versioned_docs/version-0.5.2/guides/items/assets/mod_folder_structure.png new file mode 100644 index 0000000..4904f93 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/items/assets/mod_folder_structure.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/items/assets/mods_folder.png b/website/versioned_docs/version-0.5.2/guides/items/assets/mods_folder.png new file mode 100644 index 0000000..e5d47fc Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/items/assets/mods_folder.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/items/assets/new_arrow.png b/website/versioned_docs/version-0.5.2/guides/items/assets/new_arrow.png new file mode 100644 index 0000000..5e3a916 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/items/assets/new_arrow.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/items/assets/open_full_blueprint_editor.png b/website/versioned_docs/version-0.5.2/guides/items/assets/open_full_blueprint_editor.png new file mode 100644 index 0000000..d1509b5 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/items/assets/open_full_blueprint_editor.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/items/assets/packaging.png b/website/versioned_docs/version-0.5.2/guides/items/assets/packaging.png new file mode 100644 index 0000000..ce231e7 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/items/assets/packaging.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/items/assets/primary_asset_label.png b/website/versioned_docs/version-0.5.2/guides/items/assets/primary_asset_label.png new file mode 100644 index 0000000..e7bc4b9 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/items/assets/primary_asset_label.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/items/assets/rename_pak.png b/website/versioned_docs/version-0.5.2/guides/items/assets/rename_pak.png new file mode 100644 index 0000000..89a84b0 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/items/assets/rename_pak.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/items/assets/save_and_compile.png b/website/versioned_docs/version-0.5.2/guides/items/assets/save_and_compile.png new file mode 100644 index 0000000..be9fee0 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/items/assets/save_and_compile.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/items/assets/search_meteor_arrow.png b/website/versioned_docs/version-0.5.2/guides/items/assets/search_meteor_arrow.png new file mode 100644 index 0000000..0554d2a Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/items/assets/search_meteor_arrow.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/items/assets/set_power.png b/website/versioned_docs/version-0.5.2/guides/items/assets/set_power.png new file mode 100644 index 0000000..6142e42 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/items/assets/set_power.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/items/assets/spawn_actor.png b/website/versioned_docs/version-0.5.2/guides/items/assets/spawn_actor.png new file mode 100644 index 0000000..f51da40 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/items/assets/spawn_actor.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/items/assets/weaponmod_folder_structure.png b/website/versioned_docs/version-0.5.2/guides/items/assets/weaponmod_folder_structure.png new file mode 100644 index 0000000..0a9da9a Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/items/assets/weaponmod_folder_structure.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/items/creatingabow.md b/website/versioned_docs/version-0.5.2/guides/items/creatingabow.md new file mode 100644 index 0000000..3f239b6 --- /dev/null +++ b/website/versioned_docs/version-0.5.2/guides/items/creatingabow.md @@ -0,0 +1,234 @@ +--- +sidebar_position: 1 +--- + +# Creating a New Bow + +## Requirements + +- You've done everything in [Getting Started](../../gettingstarted.md) and [Palworld Modding Kit](https://pwmodding.wiki/docs/palworld-modding-kit/install-part-1). + +- Dummy Blueprints which can be found in the [Resources](../../resources) section. + +- Basic understanding of how to use Unreal Engine, there are a ton of tutorials for it and they apply to modding all the same. + +After you're done setting up everything, launch the Palworld Modding Kit and let's get started. + +## Setup + +1. Create the following folder structure: `Pal > Blueprint > MyNewWeaponMod > Blueprint` + + ![Folder structure](assets/weaponmod_folder_structure.png) + +2. In the `MyNewWeaponMod` folder, create a new Data Asset. When you click on Data Asset, it'll show a window asking you to pick a class for the data asset instance. Select `PrimaryAssetLabel` and name the new Data Asset the same as your mod project which is `MyNewWeaponMod` in our case. + + ![Data Asset](assets/data_asset.png) + + ![Primary Asset Label](assets/primary_asset_label.png) + +3. Open the newly created `MyNewWeaponMod` Data Asset and change the following values: + + - Chunk ID: 1 - This controls which file the assets in your `MyNewWeaponMod` project will be packaged into. For example we've set this to 1 so everything will be packaged into pakchunk1-Windows.pak after we package the project. Make sure to change this for every separate project you decide to create because otherwise everything gets packaged into the same file unless it's what you want. + + - Make sure to stay on the lower end with Chunk ID as the higher it is the longer it takes to package the project since the editor has to check each ID between your lowest and highest ID. + + - Cook Rule: Always Cook + + - Label Assets in My Directory: Checked - This makes sure everything inside the `MyNewWeaponMod` folder gets packaged. + + ![Label Settings](assets/label_settings.png) + +4. Save the Data Asset and navigate over to the Blueprint folder that we created inside `MyNewWeaponMod`. + +5. Create a new 'Blueprint Class' and when it asks to pick a parent class, search for BP_BowBase. Make sure you have Dummy Blueprints setup, otherwise you won't see it in the list. + + ![BP_BowBase class](assets/bp_bowbase.png) + +6. We'll call it `BP_BowMeteor` in this guide, but you can call it anything really. As for the BP_ prefix, it's just good practice to follow the standard. BP = Blueprint. + +7. Next, create a `Bullet` folder and inside the folder create another Blueprint and parent it to `BP_Arrow`. We'll call it `BP_ArrowMeteor`. + + ![](assets/new_arrow.png) + +## The Arrow + +1. Open the `BP_ArrowMeteor` blueprint and once the window is open, select `Open Full Blueprint Editor`. You should now have the Event Graph open. + + ![](assets/open_full_blueprint_editor.png) + +2. Next, we want to add a new function override for the `On Hit` function that our blueprint inherits from `Pal Bullet`. + + ![Function Override](assets/function_override.png) + +3. Right-click anywhere in the empty space and you should have a context menu open. Search for the function `Get Owner Actor` which will get the owning actor for the weapon. Hover over the blue pin in `Get Owner Actor`, click and drag from it and then release on an empty spot next to the `Get Owner Actor` node. You'll want to look for the `Equal` function next and we'll connect it to the `Other Actor` pin that's in the `On Hit` function override. + + ![Equals Node](assets/equals_node.png) + +4. Drag from the red pin in the `Equal` node and search for `Branch` and add that to the graph. Create another `Get Owner Actor` function node above `Branch` and then drag from the blue pin to create a `Cast to PalPlayerCharacter`. Connect the `False` execution pin to `Cast to PalPlayerCharacter`. This current setup is so that our own arrow ignores hits on our player character. + + ![Cast to PalPlayerCharacter](assets/cast_to_player.png) + +5. Drag from the right execution pin in `Cast to PalPlayerCharacter` and create a `Spawn Actor from Class` node. Click on the `Class` dropdown menu and search for `BP_Explosion_Launcher_Meteor`. Click the little arrow at the bottom of the `Spawn Actor from Class` node we created so we can see all the properties in it. + + Set `Collision Handling Override` to `Always Spawn, Ignore Collisions` + + You'll want to connect the `As Pal Player Character` pin to the `Instigator` and `Owner` pins. Right-click on the `Spawn Transform` pin and select `Split Struct Pin`. + + We're connecting the owner of the weapon to the `Instigator` and `Owner` pins because otherwise, the weapon won't do any damage and it will not register the attacker properly. + + ![Spawn Actor](assets/spawn_actor.png) + +6. We'll want to go back to our `On Hit` function override node we created earlier and drag from the `Hit` pin and select `Break Hit Result` at the bottom of the Context Menu. You'll get a Hit Result node with a lot of properties so we want to click on the little arrow at the bottom again to expand the node. Drag the `Location` pin and connect it with the `Spawn Transform Location` pin in `SpawnActor BP Explosion Launcher Meteor`. + + ![Hit Result](assets/hit_result.png) + +7. Almost done with `BP_ArrowMeteor`. Next, we'll want to go back to our `SpawnActor BP Explosion Launcher Meteor` node and drag from the `Return Value` pin and search for `Set Power` function. Right-click anywhere on the empty space above `SpawnActor BP Explosion Launcher Meteor` and search for the following nodes in the context menu: `Get Weapon Damage` and `Get Sneak Attack Rate`. + + Connect the `Return Value` pin in `Get Weapon Damage` to the `New Param` pin in `Set Power`. + + Connect the `Return Value` pin in `Get Sneak Attack Rate` to the `Snake Rate` pin in `Set Power`. + + ![Set Power](assets/set_power.png) + + This sets the explosion damage based on our weapon's stats. You can even do your own custom logic to increase or decrease the damage based on certain conditions, but that will not be covered here. Feel free to explore and experiment! + +8. Compile and Save the `BP_ArrowMeteor` blueprint. + + ![](assets/save_and_compile.png) + +## The Bow + +We're almost done with our new weapon, we just need to change few things in the `BP_BowMeteor` blueprint we created earlier in this guide and we can start packaging the project. + +1. Locate the `BP_BowMeteor` blueprint and open its Event Graph. On the left side you'll see BP_BowMeteor and DefaultSceneRoot. Click on BP_BowMeteor and it should open the properties panel on the right side of the window. The only thing we need to change in the properties is the `Arrow Shoot Number`, at least for this guide. Set `Arrow Shoot Number` to 1. This is how many arrows the bow will fire simultaneously. + + ![](assets/arrow_number.png) + + The reason we don't have to worry about the other properties is because we inherit from `BP_BowBase` which means it'll already have defaults assigned to it, meaning we also inherit the model, animations and everything else necessary for the weapon to work properly. You're obviously free to change the Skeletal Mesh and Animations, but that's something that won't be covered in this guide specifically. + +2. Create a function override for `Get Arrow Class`. + +![Get Arrow Class](assets/get_arrow_class.png) + +3. Open the `Get Arrow Class` function and you should see the following nodes in the image. Right-click on the `Parent: Get Arrow Class` orange colored node and select `Delete`. + +![Get Arrow Class Nodes](assets/get_arrow_class_nodes.png) + +4. The `Arrow Class` node in our `Return Node` will now show a `Select Class` dropdown. Click on the dropdown menu and search for our `BP_ArrowMeteor` class and assign it. + + ![](assets/search_meteor_arrow.png) + + ![](assets/assigned_meteor_arrow.png) + +5. Done. Hit Compile and Save on `BP_ArrowMeteor` and let's get packaging. + +## Packaging and Installing the Mod + +We're finally done in the editor and can begin packaging our new mod, so let's do that. + +1. Navigate to `Platforms > Windows` and click Package Project. A new window will appear, but you can just click on `Select Folder` to use the default folder. You can go grab a coffee, tea or some snacks since it might take a few minutes depending on your hardware. + + ![](assets/packaging.png) + +2. After it's done packaging, you can find your `pakchunk(id)-Windows.pak` inside the PalworldModdingKit at `Windows > Pal > Content > Paks` where (id) is the ChunkID you assigned in your `PrimaryAssetLabel` in the Setup section. So if you did ChunkID of 1 then you'll want the `pakchunk1-Windows.pak` file. + + ![](assets/chunk_file.png) + +3. Move the `pakchunk(id)-Windows.pak` to a ~mods folder where your Palworld is installed. If you don't have a ~mods folder then you can just create it. + + ![](assets/mods_folder.png) + +4. This part is important, you must rename the file so the name ends with `_P`, this is so Unreal can recognize the file as a patch pak, otherwise it will not be loaded by the game at all. Let's call it `BowMeteor_P`. + + ![](assets/rename_pak.png) + +5. Done. + +## Pal Schema + +Now, to make sure our new Bow is actually usable in the game, we'll have to create a PalSchema mod for it. If you haven't yet, go through the [Getting Started](../../gettingstarted.md) guide first and then come back to this part as it will explain the basics of PalSchema and how it works. + +1. In the `PalSchema/mods` folder, create the following folder structure: `MyBowMods/items` + + After that, you'll want to create a json file called `meteor_bow.json`. Feel free to name it whatever you'd like of course, as long as it's a json file. + +![](assets/mod_folder_structure.png) + +2. Open the `meteor_bow.json` we created and copy this inside it: + +```json +{ + "MOD_Bow_Meteor": { + "Name": "Meteor Bow", + "Description": "My first weapon!", + "Type": "Weapon", + "IconTexture": "/Game/Others/InventoryItemIcon/Texture/T_itemicon_Weapon_Bow_Fire.T_itemicon_Weapon_Bow_Fire", + "TypeA": "Weapon", + "TypeB": "WeaponBow", + "Rank": 1, + "Rarity": 0, + "Price": 5000, + "MaxStackCount": 1, + "Weight": 5.0, + "MagazineSize": 1, + "AttackValue": 250, + "SneakAttackRate": 1.0, + "Durability": 1000.0, + "actorClass": "/Game/Pal/Blueprint/MyNewWeaponMod/Blueprint/BP_BowMeteor.BP_BowMeteor", + "Recipe": { + "Product_Count": 1, + "WorkAmount": 500.0, + "Material1_Count": 1, + "Material1_Id": "Stone", + "Material2_Count": 1, + "Material2_Id": "Wood" + } + } +} +``` + + I've covered most of these in the [Getting Started](../../gettingstarted.md) guide, but I'll be going over some of the fields that weren't mentioned. + + - `actorClass`: This is the important field for weapons, we want this to point at our weapon actor we created in the earlier steps which is the `BP_BowMeteor`. + + You can obtain the path to the weapon actor by going back into Unreal Editor, right-clicking on the `BP_BowMeteor` asset in the Content Browser and selecting `Copy Reference` which will give you a string like: + + `/Script/Engine.Blueprint'/Game/Pal/Blueprint/MyNewWeaponMod/Blueprint/BP_BowMeteor.BP_BowMeteor'` which you'll have to trim down and modify to `/Game/Pal/Blueprint/MyNewWeaponMod/Blueprint/BP_BowMeteor.BP_BowMeteor`. + + ![](assets/copy_reference.png) + + - `MagazineSize`: Self explanatory, but you can also leave it out entirely and the weapon will have infinite ammo, if that's what you want. + + - `AttackValue`: How much damage the weapon should do. + + - `SneakAttackRate`: Damage multiplier for when you attack enemies that haven't noticed you. + + - `Durability`: Self explanatory. + + Since our TypeA and TypeB are set to `Weapon` and `WeaponBow` and the Rank is set to 1, our weapon will be available for crafting starting from Primitive Workbench, which makes testing a lot easier. + + You're free to change the crafting recipe to whatever you'd like, but I set it as `Stone` and `Wood` since those are materials we can find easily for testing purposes. + +3. After you're done, save the file, load up Palworld and enter a world so we can test it out. + +![](assets/final_bow.png) + +Success! We've made our first custom weapon in Palworld. I'll include a little video preview below of the finished product: + + + +## Final Notes + +You might be wondering, how would I do this on Game Pass since the asset format is different (ucas, utoc, pak)? You can simply just go into `Edit > Project Settings > Packaging` and enable the `Use Io Store` checkbox. Make sure to disable it whenever you're packaging for Steam. + +This is subject to change as we don't know when they'll switch the format to be the same for both Steam and Game Pass. + +Instead of a `.pak` file, you'll have three files which are `.ucas`, `.utoc` and `.pak` and you'll want to copy these over to where your Game Pass version is installed. This is the only difference between Steam and Game Pass. diff --git a/website/versioned_docs/version-0.5.2/guides/pals/_category_.json b/website/versioned_docs/version-0.5.2/guides/pals/_category_.json new file mode 100644 index 0000000..62fa89f --- /dev/null +++ b/website/versioned_docs/version-0.5.2/guides/pals/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "Pals", + "position": 8, + "link": { + "type": "generated-index" + } + } + \ No newline at end of file diff --git a/website/versioned_docs/version-0.5.2/guides/pals/addingranchsuitability.md b/website/versioned_docs/version-0.5.2/guides/pals/addingranchsuitability.md new file mode 100644 index 0000000..6f966bb --- /dev/null +++ b/website/versioned_docs/version-0.5.2/guides/pals/addingranchsuitability.md @@ -0,0 +1,277 @@ +--- +sidebar_position: 1 +--- + +# Adding Ranch Suitability + +So you've been wondering if you could make Tocotoco generate Gunpowder at the Ranch? Well, wonder no longer as we are finally able to do just that! + +A disclaimer regarding the requirements for this guide as you'll be needing the Palworld Modding Kit and some dummy assets which will be provided during this guide. + +## Requirements + +- [Palworld Modding Kit](https://pwmodding.wiki/docs/palworld-modding-kit/install-part-1) +- [Assets](https://drive.google.com/file/d/1eghfagtz3WvyB7i4PXGWSt01qfQLzfOc/view?usp=sharing) - Contains empty animation montages for each Pal and a dummy asset for `BP_Action_SpawnItemBase` which will be used as a base for your preferred Pal's item spawning action blueprint. + +## Palworld Modding Kit + +Let's get started with PMK (Palworld Modding Kit). After you're done installing or if you already had it installed, start PMK. + +### Creating the Assets and Folders + +1. You'll be greeted with the Editor looking somewhat like the picture below. If you have the `Assets` downloaded from the requirements, navigate to the .zip you downloaded and extract the Content folder from within the .zip into the root of where you installed PMK. Note that you should not drag the files directly into the editor as this will potentially lock the editor up and you'll have to use the task manager to close it. Install the asset files from outside the editor. + +![Screenshot of the Modding Kit editor window](assets/tutorial1/Editor.png) + +2. After you're done extracting the files to your project, you should now have a `Pal` folder visible in your editor. Create a new folder in the Content Browser by right-clicking and call this folder `TocotocoRanch`. You can call this folder anything, but just to make it easier to follow the tutorial, we'll call it that. + +![TocotocoRanch folder within Content Browser](assets/tutorial1/Editor_Folder_Structure.png) + +3. Navigate inside `TocotocoRanch` folder and create a new `Blueprint Class` by right-clicking. A window will pop-up, asking you to pick a Parent Class. You'll want to search for `BP_Action_SpawnItemBase`, click on it and then click the blue Select button. We'll name the newly created Blueprint Class to `BP_TocoToco_SpawnItem`, again, you have full freedom for naming as long as it's something you can remember. + +4. We'll want to create one more Asset inside this folder. Right-click, hover over Miscellaneous and select Data Asset. Clicking on Data Asset will open up a menu asking you to Pick Class for Data Asset Instance. Look for `PrimaryAssetLabel` and select that, then name the created PrimaryAssetLabel to `TocotocoRanch`. Here's what we have so far. + +![Picture showcasing PrimaryAssetLabel and BP_TocoToco_SpawnItem](assets/tutorial1/Assets.png) + +5. Open up the `TocotocoRanch` PrimaryAssetLabel we created and change the following values: + +- **Chunk ID**: 1 - This should be whatever Chunk ID you happen to have available, make sure you don't use a Chunk ID you've already assigned because it'll bundle other mods with your current mod, unless that's what you want. Never use a Chunk ID of 0. + +- **Cook Rule**: Always Cook + +- **Label Assets in My Directory**: Checked - This makes sure that whatever assets you have within your `TocotocoRanch` folder, gets recursively added to the packaging list of your mod. + +Once you're done, click the Save icon to save your asset and close the PrimaryAssetLabel window. + +### Assigning a Spawning Action + +We're almost done here, we just need to make sure we create a spawn action for our Tocotoco, which we will be referencing later during the PalSchema section. + +1. Open `BP_TocoToco_SpawnItem` and make sure you have `Show Inherited Variables` checked in the Settings. I'll include a picture below for guidance. + +![Picture showcasing a cogwheel where Inherited Variables are located](assets/tutorial1/Inherited_Variables.png) + +2. We want to change the `ChargeFacialEye`, `ChargeMontage`, `FunFacialEye`, `FunMontage` and `Spawn Socket Name` which is under the Pal Action Spawn Item category to the following values: + +- **ChargeFacialEye**: Pain - This is the facial expression made by the Pal when it's preparing to spawn an item. + +- **ChargeMontage**: AM_ColofulBird_FarSkill_ActionLoop - This is the animation loop that the Pal will be performing as it is preparing to spawn an item. + +- **FunFacialEye**: Smile - This is the facial expression made by the Pal once it finishes spawning an item. + +- **FunMontage**: AM_ColofulBird_Damage - This is the animation performed by the Pal once it finishes spawning an item. + +- **Spawn Socket Name**: tail_02 - This is the name of the bone socket where the item will spawn at. There is no guarantee that every Pal has a `tail_02` bone so you'll want to use something like FModel to inspect the skeleton of the Pal and look up its list of bones e.g. if you wanted to check the bones for Nitewing, you'd look for the `SK_HawkBird_Skeleton` asset, open it and then search for `ReferenceSkeleton` and now you have a list of different bones. + +3. We're done here, now just hit Compile (1), Save (2) and then close the asset Window. + +![](assets/tutorial1/CompileSave.png) + +### Packaging + +We're ready to package our assets for use with our PalSchema mod. + +1. In the top-middle, you should see a button that says Platforms, click on it and navigate to Windows > Package Project. The file explorer should be pointing to the root of your PalworldModdingKit by default. Click Select Folder and now we just wait for the packaging to be done. + +![](assets/tutorial1/Packaging.png) + +2. Once packaging is done, navigate to the root of your PalworldModdingKit outside your Editor and you should see a `Windows` folder. Navigate to Windows > Pal > Content > Paks and you should see a `pakchunk1-Windows.pak` assuming you set your Chunk ID to 1. If you set your Chunk ID to 15 for example, then it'll be named `pakchunk15-Windows.pak`, so on and so forth. Remember this location as we will come back to it at the end of this guide. + +## PalSchema + +Now we just need to add the relevant data table entries for our Tocotoco to be able to work at the Ranch. + +### Folder Structure + +1. In your `PalSchema/mods` folder, create a new folder called `TocotocoRanch` which will be the name of our mod. Then inside it create the following folders: + +- **blueprints** +- **paks** +- **raw** + +You **MUST** name the three folders this way, otherwise PalSchema won't pick these up. The only cases where it doesn't matter is the name of your mod folder and any .json files you create. + +### Raw Tables + +1. Navigate to the `raw` folder and create a new file in there called `lottery.json` and make sure it is a json file. + +2. `DT_ItemLotteryDataTable` is the table where the drops for Ranch pals are stored, so we'll want to add our entries to that table like so: + +```json +{ + "DT_ItemLotteryDataTable": { + "TocotocoRanch_001": { + "FieldName": "CharacterSpawnItem_Tocotoco_1", + "SlotNo": 1, + "WeightInSlot": 1.0, + "StaticItemId": "Gunpowder2", + "MinNum": 1, + "MaxNum": 1, + "NumUnit": 1, + "TreasureBoxGrade": "EPalMapObjectTreasureGradeType::Grade1" + }, + "TocotocoRanch_002": { + "FieldName": "CharacterSpawnItem_Tocotoco_2", + "SlotNo": 1, + "WeightInSlot": 1.0, + "StaticItemId": "Gunpowder2", + "MinNum": 1, + "MaxNum": 2, + "NumUnit": 1, + "TreasureBoxGrade": "EPalMapObjectTreasureGradeType::Grade1" + }, + "TocotocoRanch_003": { + "FieldName": "CharacterSpawnItem_Tocotoco_3", + "SlotNo": 1, + "WeightInSlot": 1.0, + "StaticItemId": "Gunpowder2", + "MinNum": 1, + "MaxNum": 3, + "NumUnit": 1, + "TreasureBoxGrade": "EPalMapObjectTreasureGradeType::Grade1" + }, + "TocotocoRanch_004": { + "FieldName": "CharacterSpawnItem_Tocotoco_4", + "SlotNo": 1, + "WeightInSlot": 1.0, + "StaticItemId": "Gunpowder2", + "MinNum": 1, + "MaxNum": 4, + "NumUnit": 1, + "TreasureBoxGrade": "EPalMapObjectTreasureGradeType::Grade1" + }, + "TocotocoRanch_005": { + "FieldName": "CharacterSpawnItem_Tocotoco_5", + "SlotNo": 1, + "WeightInSlot": 1.0, + "StaticItemId": "Gunpowder2", + "MinNum": 1, + "MaxNum": 5, + "NumUnit": 1, + "TreasureBoxGrade": "EPalMapObjectTreasureGradeType::Grade1" + } + } +} +``` + +You might notice that in the original table, all the row names are numbers. Absolutely do NOT use numbers yourself because you risk causing side effects like overwriting vanilla drops which is not relevant for when you want to add Ranch suitability to a new Pal. `FieldName` is something you should try to remember as we'll be referencing it in a couple files. + +3. Create a new file called `lottery_probability.json` inside the `raw` folder and copy the following inside the .json file: + +```json +{ + "DT_FieldLotteryNameDataTable": { + "CharacterSpawnItem_Tocotoco_1": { + "ItemSlot1_ProbabilityPercent": 100.0 + }, + "CharacterSpawnItem_Tocotoco_2": { + "ItemSlot1_ProbabilityPercent": 100.0 + }, + "CharacterSpawnItem_Tocotoco_3": { + "ItemSlot1_ProbabilityPercent": 100.0 + }, + "CharacterSpawnItem_Tocotoco_4": { + "ItemSlot1_ProbabilityPercent": 100.0 + }, + "CharacterSpawnItem_Tocotoco_5": { + "ItemSlot1_ProbabilityPercent": 100.0 + } + } +} +``` + +We'll be referencing the `FieldName` from our previous .json file. We'll make `ItemSlot1_ProbabilityPercent` 100% in this guide, but you're free to make it 50.0 or whatever you want. We assigned `SlotNo` to be 1 in the `lottery.json` for all fields so that's why we're using `ItemSlot1_ProbabilityPercent` here. + +4. Let's create our final raw table file and call it `monster_parameter.json` with the following in it: + +```json +{ + "DT_PalMonsterParameter": { + "ColorfulBird": { + "WorkSuitability_MonsterFarm": 1 + } + } +} +``` + +We'll need to make sure our Tocotoco has the MonsterFarm suitability which corresponds to Ranch. We'll be setting it to 1, because otherwise our Tocotoco will never go to the Ranch. `ColorfulBird` is the code name for Tocotoco and you can find a list of IDs on [Paldeck site](https://paldeck.cc/pals). Just click the little copy icon in the top-right corner of a Pal card. + +### Blueprint + +Next, we want to navigate to our `blueprints` folder we created earlier and create a `bp_tocotoco.json` file in which we will copy the following: + +```json +{ + "/Game/Pal/Blueprint/Character/Monster/PalActorBP/ColorfulBird/BP_ColorfulBird.BP_ColorfulBird_C": { + "ActionComponent": { + "ActionMap": [ + { + "Key": "EPalActionType::SpawnItem", + "Value": "/Game/TocotocoRanch/BP_TocoToco_SpawnItem.BP_TocoToco_SpawnItem_C" + } + ] + }, + "StaticCharacterParameterComponent": { + "SpawnItem": { + "FieldLotteryNameByRank": [ + { + "Key": 1, + "Value": { + "Key": "CharacterSpawnItem_Tocotoco_1" + } + }, + { + "Key": 2, + "Value": { + "Key": "CharacterSpawnItem_Tocotoco_2" + } + }, + { + "Key": 3, + "Value": { + "Key": "CharacterSpawnItem_Tocotoco_3" + } + }, + { + "Key": 4, + "Value": { + "Key": "CharacterSpawnItem_Tocotoco_4" + } + }, + { + "Key": 5, + "Value": { + "Key": "CharacterSpawnItem_Tocotoco_5" + } + } + ] + } + } + } +} +``` + +I'll explain everything that's going on in this .json file. + +So you might be wondering why we're using the full path for our blueprint instead of just the asset name like `BP_ColorfulBird_C`. We're using `/Game/Pal/Blueprint/Character/Monster/PalActorBP/ColorfulBird/BP_ColorfulBird.BP_ColorfulBird_C` because it makes sure the asset is loaded before we go in-game as there is a bug in PalSchema currently where assigning class values while in-game will crash the game. The class value in question is ActionComponent > ActionMap > Value which is a Class Property. If you're not assigning to a Class Property then there is no need to worry about it and you can just use the asset name as normal. + +Now let's go through each property: + +- **ActionComponent** - This is a component within the `BP_ColorfulBird_C` blueprint. It's responsible for any actions (animations) performed by the Pal like spawning items at the Ranch, using skills, etc. + - **ActionMap** - Part of `ActionComponent` and contains a map of enum/class pairs which controls what asset is responsible for each action. In our case we want it to point to our `BP_TocoToco_SpawnItem_C` that we created in PMK. If you're unsure how to get the path to our asset, you can right-click on `BP_TocoToco_SpawnItem_C` in PMK and select `Copy Reference` which will copy the following string into your clipboard: `/Script/Engine.Blueprint'/Game/TocotocoRanch/BP_TocoToco_SpawnItem.BP_TocoToco_SpawnItem'`. You'll want to trim this down to `/Game/TocotocoRanch/BP_TocoToco_SpawnItem.BP_TocoToco_SpawnItem` and now you have your path, just make sure to add a `_C` to the end, since the property expects a class. + +- **StaticCharacterParameterComponent** - This is another component within `BP_ColorfulBird_C` which has a LOT of functionality in it. + - **SpawnItem** - Struct within `StaticCharacterParameterComponent` which contains the `FieldLotteryNameByRank` property. + - **FieldLotteryNameByRank** - A TMap of integer/FName pairs where the integer corresponds to the Star Level of the Pal, with 1 being Star Level 0 and the FName string is a reference to a `FieldName` entry inside the `DT_ItemLotteryDataTable` table. + +### Paks + +1. Now if you remember in the [packaging](#packaging) section, we packaged our project and it produced `pakchunk-Windows.pak` files. Find the pakchunk file that corresponds to the Chunk ID you assigned to your `TocotocoRanch` mod, which in this guide we assigned a Chunk ID of 1, so we'd look for `pakchunk1-Windows.pak`. Copy or move this file into the `paks` folder within your PalSchema mod folder that you created earlier. + +2. After you've moved or copied the file, rename it to `TocotocoRanch_P.pak` and make sure the name ends with a `_P` regardless of what you decide to call the .pak file as the game won't read the .pak file otherwise. You can read up more on patch paks over [here](https://buckminsterfullerene02.github.io/dev-guide/Basis/PakPatching.html) if you're interested. + +## Finished Project + +If we did everything correctly, Tocotoco should now have the ability to work at the Ranch! + +![GIF showcasing the final results](assets/tutorial1/Final.gif) \ No newline at end of file diff --git a/website/versioned_docs/version-0.5.2/guides/pals/assets/tutorial1/Assets.png b/website/versioned_docs/version-0.5.2/guides/pals/assets/tutorial1/Assets.png new file mode 100644 index 0000000..383e059 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/pals/assets/tutorial1/Assets.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/pals/assets/tutorial1/CompileSave.png b/website/versioned_docs/version-0.5.2/guides/pals/assets/tutorial1/CompileSave.png new file mode 100644 index 0000000..9ee522c Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/pals/assets/tutorial1/CompileSave.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/pals/assets/tutorial1/Editor.png b/website/versioned_docs/version-0.5.2/guides/pals/assets/tutorial1/Editor.png new file mode 100644 index 0000000..d5ec468 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/pals/assets/tutorial1/Editor.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/pals/assets/tutorial1/Editor_Folder_Structure.png b/website/versioned_docs/version-0.5.2/guides/pals/assets/tutorial1/Editor_Folder_Structure.png new file mode 100644 index 0000000..78e9995 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/pals/assets/tutorial1/Editor_Folder_Structure.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/pals/assets/tutorial1/Final.gif b/website/versioned_docs/version-0.5.2/guides/pals/assets/tutorial1/Final.gif new file mode 100644 index 0000000..ed22521 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/pals/assets/tutorial1/Final.gif differ diff --git a/website/versioned_docs/version-0.5.2/guides/pals/assets/tutorial1/Inherited_Variables.png b/website/versioned_docs/version-0.5.2/guides/pals/assets/tutorial1/Inherited_Variables.png new file mode 100644 index 0000000..0a83436 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/pals/assets/tutorial1/Inherited_Variables.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/pals/assets/tutorial1/Packaging.png b/website/versioned_docs/version-0.5.2/guides/pals/assets/tutorial1/Packaging.png new file mode 100644 index 0000000..df125f7 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/pals/assets/tutorial1/Packaging.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/rawtables/_category_.json b/website/versioned_docs/version-0.5.2/guides/rawtables/_category_.json new file mode 100644 index 0000000..53ea66b --- /dev/null +++ b/website/versioned_docs/version-0.5.2/guides/rawtables/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "Raw Tables", + "position": 3, + "link": { + "type": "generated-index" + } + } + \ No newline at end of file diff --git a/website/versioned_docs/version-0.5.2/guides/rawtables/intro.md b/website/versioned_docs/version-0.5.2/guides/rawtables/intro.md new file mode 100644 index 0000000..247bc58 --- /dev/null +++ b/website/versioned_docs/version-0.5.2/guides/rawtables/intro.md @@ -0,0 +1,71 @@ +--- +sidebar_position: 1 +--- + +# Intro to Raw Tables + +Written by [TheGameAce](https://next.nexusmods.com/profile/TheGameAceReal/mods?gameId=6063) + +Most of the files you'll be commonly editing are Datatable files. These files are internally denoted with a "DT" prefix at the start of the file name. Here we'll be going over how to edit those files, excluding Arrays, which will be in a separate guide. This method can also be used to add new entries inside of a DT. + +## File + Folder Setup +This part is extremely simple. With PalSchema's main folder open in Visual Studio Code, you'll want to look at the explorer on the left-hand side where you should see all of PalSchema's folders and subsequent files. Navigate to "mods", right click, and select "New Folder...". Name this folder whatever you like. I prefer to use the name of the mod I'm creating for the sake of coherence and organization. In this tutorial I'll just call it TestMod. + +Once the folder is created, right click it and create a folder called `raw` inside it. For editing any "raw" datatables, this folder ***must*** be named `raw`. + +The last step for setup will be setting up the .json file for editing. For this, simply right click the `raw` folder in explorer, and this time select "New File...". Just like with the mod folder you created, this file can take on any name. **Keep in mind that you need to manually input the .json extension at the end of the file name for it to properly take on .json format.** + +## File Formatting +With setup done, we move on to setting up the newly created .json file with proper formatting, and making our first edits. First, open up the .json file if you haven't already. If everything has been handled properly up to this point, things should look about like this (save for names): + +![image](https://i.gyazo.com/7bc91b1d4d005097c8e4d80f6c7117ec.png) + +Now before we take the next step, pull up FModel so that we can look inside Palworld's container file. If you don't have FModel or haven't set it up yet, refer to the following: [FModel Setup](https://pwmodding.wiki/docs/asset-swapping/StartingOut). + +Once you have FModel up, open up Palworld's main container file. For Gamepass users, this should be called `Pal-WinGDK.utoc`. For Steam users, this should be called `Pal-Windows.pak`. Now that you're in, navigate to the file you want to edit or add to. If you know the file's name, use the search function found under the "Packages" toolbar option at the top of FModel for faster navigation. + +For this example, we'll be modifying Lamball's drops. This can be found in the file `DT_PalDropItem.uasset`. After navigating to the file, double click to open it up and use Ctrl + F to bring up the search function, searching `SheepBall` (Lamball's internal name) to find Lamball's drop table. Now let's go back into Visual Studio Code and get to work! + +***Tip:*** **Resizing Visual Studio Code and FModel to be side-by-side will help immensely, preventing you from having to go back and forth.** + +Back in Visual Studio Code, in the .json file, start by typing a `{` at the beginning of the file. This should automatically create a paired second bracket of the same type (this specific style of brackets are called as "braces"). Hit the "Enter" key to create a new line between the braces with automatic indentation. + +In this new space, type in a single quotation mark. Just like with the braces (and other types of brackets), Visual Studio Code should automatically input the other for you, leaving your text cursor right in between them. It's in here that you'll put the name of the file. Keep in mind it should only be the file name and must not include the .uasset extension. + +After that step is complete, typing another quotation mark will move your cursor past the already filled in one. Here, you'll need to put in a ":" (colon), a space after that, and then another brace and hit "Enter" one more time. + +Things should now be looking like this: + +![image](https://i.gyazo.com/e273e2ff52b0283387ed38b58dbf9859.png) + +## Editing the File +Here comes the part we want FModel open for. In FModel, if you've successfully found Lamball's entry for drops, you should see this: + +![image](https://i.gyazo.com/d5c6edbdcdd28afde0de0accb7bc6b6e.png) + +This is what a standard Datatable entry looks like, in this case specifically for Pal drops. This is also what we want to replicate in Visual Studio Code so that PalSchema knows what to alter. But since PalSchema alters only the lines specified, we don't need that whole thing. + +To start us off back where we left off in Visual Studio Code, we need the ID of the entry being altered first. Type it out just like you see presented in FModel. **This is case-sensitive, so make sure everything matches properly.** + +Here, the entry ID will be `"SheepBall000": {` +Once typed in, hit "Enter" as per usual to create the next line. Your file should now be looking like this: + +![image](https://i.gyazo.com/018d09711741ab9e3329abaea413cf30.png) + +Under here is where we put in the lines we want to alter for any entry. For this example, we'll add an item to Lamball's drops: Horns. If you look in FModel, you can see all of the data for each drop. Since the line `ItemId3` and it's companion lines contain nothing, we'll add it in here. You can, of course, choose any grouping you'd like, including overriding currently existing ones. This will also be the same method you use for any other standard DataTable changes. + +In this specific instance, we need to edit the lines `ItemId3`, `Rate3`, `min3`, and `Max3`. To edit them, simply input them into your .json file under the `SheepBall000` entry in the same way they show up in FModel. + +Once finished, it should look something like this: + +![image](https://i.gyazo.com/047de346df16c3707f283f128c337774.png) + +This tells PalSchema to alter the entry `SheepBall000` within the file `DT_PalDropItem`, and that in the 3rd drop slot it should drop the `Horn` item (this is based on the item ID) at a rate of 30% of the time, dropping a minimum of 1 when they do drop, with a maximum possibility of 2 dropped at a time. + +That's all that's needed! If you were to now save and launch the game, you should find that Lamballs will have horns as an item drop. You can now utilize this process for any DT file and entry as you please! + +*If you want to add new entries to a DT file, simply do the same process with a new/custom ID for the entry, and be sure to fill in all the necessary lines for the entry to be properly accepted.* + +*In some cases, you may want to delete a row from a table. In that case, simply set the value of an existing row to `null`, and the entry will be deleted.* + +**Note: There are some special entries such as Arrays, as mentioned at the start of this guide. Arrays are defined with standard or "square" brackets and may require more specialized modification.** diff --git a/website/versioned_docs/version-0.5.2/guides/rawtables/wildcard.md b/website/versioned_docs/version-0.5.2/guides/rawtables/wildcard.md new file mode 100644 index 0000000..ab6320e --- /dev/null +++ b/website/versioned_docs/version-0.5.2/guides/rawtables/wildcard.md @@ -0,0 +1,25 @@ +--- +sidebar_position: 2 +--- + +# Raw Table Wildcards + +In Raw Tables, you have the ability to use wildcards to apply changes to every row of the table you're targeting. This can be a very useful alternative to just manually duplicating your change to every row. + +Using wildcards is very simple, you just write a `*` instead of the row name, I'll leave an example below: + +```json +{ + "DT_PalMonsterParameter": { + "*": { + "WorkSuitability_EmitFlame": 5 + } + } +} +``` + +Now every Pal should have maxed out Kindling work suitability, though it's a different story if they can utilize it! You can use wildcards for any data table and property. + +*Wildcards can also be used to delete all entries from a table with the syntax `"*": null`.* +*This is useful for replacing an entire table with a new table by writing `"*": null` as the first entry.* +*Use caution with this technique, as clearing the entire table erases any changes made by other mods.* \ No newline at end of file diff --git a/website/versioned_docs/version-0.5.2/guides/resources/_category_.json b/website/versioned_docs/version-0.5.2/guides/resources/_category_.json new file mode 100644 index 0000000..c0dccbd --- /dev/null +++ b/website/versioned_docs/version-0.5.2/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/versioned_docs/version-0.5.2/guides/resources/assets/importimages_image.png b/website/versioned_docs/version-0.5.2/guides/resources/assets/importimages_image.png new file mode 100644 index 0000000..1ce19bd Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/resources/assets/importimages_image.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/resources/assets/importimages_raw.png b/website/versioned_docs/version-0.5.2/guides/resources/assets/importimages_raw.png new file mode 100644 index 0000000..3c0fd96 Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/resources/assets/importimages_raw.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/resources/assets/importimages_result.png b/website/versioned_docs/version-0.5.2/guides/resources/assets/importimages_result.png new file mode 100644 index 0000000..8d38dbf Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/resources/assets/importimages_result.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/resources/importingimages.md b/website/versioned_docs/version-0.5.2/guides/resources/importingimages.md new file mode 100644 index 0000000..0e254f5 --- /dev/null +++ b/website/versioned_docs/version-0.5.2/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 diff --git a/website/versioned_docs/version-0.5.2/guides/spawners/_category_.json b/website/versioned_docs/version-0.5.2/guides/spawners/_category_.json new file mode 100644 index 0000000..c43d852 --- /dev/null +++ b/website/versioned_docs/version-0.5.2/guides/spawners/_category_.json @@ -0,0 +1,7 @@ +{ + "label": "Spawners", + "position": 10, + "link": { + "type": "generated-index" + } +} diff --git a/website/versioned_docs/version-0.5.2/guides/spawners/overview.md b/website/versioned_docs/version-0.5.2/guides/spawners/overview.md new file mode 100644 index 0000000..8f55279 --- /dev/null +++ b/website/versioned_docs/version-0.5.2/guides/spawners/overview.md @@ -0,0 +1,57 @@ +--- +sidebar_position: 1 +--- + +# Custom Spawners + +Starting with 0.5.0, you are now able to create new spawns for pals and NPCs which function the exact same as how the game would spawn pals, bosses, npcs, etc. Editing is not currently available and you should use the `blueprints` method of doing it. See the example [BossMammorestSpawnReplacer](https://github.com/Okaetsu/PalSchema/blob/main/assets/examples/BossMammorestSpawnReplacer/blueprints/mammorest_spawn_replacer.jsonc) mod for editing spawns. + +Features: +- Auto-reload is **supported** for spawner mods, [video](https://www.youtube.com/watch?v=jK6SnkGTL50) of it in action. +- When adding bosses, an icon is automatically added to the map without having to edit `DT_BossSpawnerLoactionData` as long as the `SpawnerType` is set to `FieldBoss`. + +We will be going through the structure of a spawner json and the required folder name for it. + +## Folder Name + +The required name for the folder so it can be seen by PalSchema is `spawns`, meaning you want something like this `MyModName/spawns/spawn.json`. + +## JSON Structure + +**IMPORTANT**: You need to start your spawner JSON as an array with square brackets [ ] rather than curly brackets \{ \}. + +Currently the following fields are available: + +### Generic + +These fields are available to both `MonoNPC` and `Sheet`. + +- `Type`: Can be either `MonoNPC` or `Sheet`. +- `Location`: Location of the spawned character(s). +- `Rotation`: Rotation of the spawned character(s). + +### MonoNPC +These fields are only available when `Type` is set to `MonoNPC`. +- `NPCID`: ID of your NPC, e.g. PalDealer. Only available when `Type` is set to `MonoNPC`. +- `OtomoId`: ID of the character that is summoned when the NPC is attacked. Only available when `Type` is set to `MonoNPC`. +- `Level`: Level of the NPC specified by `NPCID`. + +### Sheet +These fields are only available when `Type` is set to `Sheet`. +- `SpawnerName`: Name of the spawner, make sure to specify this, it can be anything you want. Check [Additional Notes](#additional-notes) regarding implementation details of `SpawnerName`. +- `SpawnerType`: Type specified in the `EPalSpawnerPlacementType` enum as a string, e.g. `FieldBoss` for a boss. +- `SpawnGroupList`: Array of `SpawnGroup` objects. + - `SpawnGroup`: + - `Weight`: If there are multiple SpawnGroups, this controls how likely it is that this specific group will be selected over the others. Should be a whole integer from 1 to 100, decimals are not accepted. + - `OnlyTime`: Controls if the SpawnGroup should only spawn at a certain time of day. Accepted string values are `Day` and `Night`. You may also omit this field entirely if you want the group to spawn regardless of the time of day. + - `PalList`: Array of `PalSpawnerOneTribeInfo` objects. + - `PalSpawnerOneTribeInfo`: + - `PalId`: String Id of the pal to spawn, e.g. PinkCat. + - `Level`: Minimum level of the spawned character. + - `Level_Max`: Maximum level of the spawned character. + - `Num`: Minimum number of characters to spawn at the same time. + - `Num_Max`: Maximum number of characters to spawn at the same time. + +### Additional Notes + +- A small implementation detail regarding the `SpawnerName` field when adding spawns: PalSchema will automatically append the name of your mod to the front, so if the name of your mod's main folder is called `MySpawnerMod` and the `SpawnerName` is `Cattiva001`, the final name will be `MySpawnerMod_Cattiva001`. This is to prevent any name collisions with other mods that add spawns with the same name. \ No newline at end of file diff --git a/website/versioned_docs/version-0.5.2/guides/translations/_category_.json b/website/versioned_docs/version-0.5.2/guides/translations/_category_.json new file mode 100644 index 0000000..2e9ce33 --- /dev/null +++ b/website/versioned_docs/version-0.5.2/guides/translations/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "Translations", + "position": 7, + "link": { + "type": "generated-index" + } + } + \ No newline at end of file diff --git a/website/versioned_docs/version-0.5.2/guides/translations/assets/intro/cattiva.png b/website/versioned_docs/version-0.5.2/guides/translations/assets/intro/cattiva.png new file mode 100644 index 0000000..f7a316b Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/translations/assets/intro/cattiva.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/translations/assets/intro/fmodel.png b/website/versioned_docs/version-0.5.2/guides/translations/assets/intro/fmodel.png new file mode 100644 index 0000000..93d992d Binary files /dev/null and b/website/versioned_docs/version-0.5.2/guides/translations/assets/intro/fmodel.png differ diff --git a/website/versioned_docs/version-0.5.2/guides/translations/intro.md b/website/versioned_docs/version-0.5.2/guides/translations/intro.md new file mode 100644 index 0000000..4780ac8 --- /dev/null +++ b/website/versioned_docs/version-0.5.2/guides/translations/intro.md @@ -0,0 +1,53 @@ +--- +sidebar_position: 1 +--- + +# Intro to Translations + +Hello there! So you're interested in creating new localization entries for the game? You've come to the right place! + +With PalSchema you can also support languages that aren't normally supported by the game. + +## Setup + +1. First, let's create a new mod folder called `MyTranslation`. + +2. Inside `MyTranslation`, you'll want to create another folder called `translations`. This folder **must** be called `translations` so it can be recognized by PalSchema. + +## Language Codes + +Before we get back to our mod, we'll have to first understand what a 'language code' is. Language code is basically abbreviations that represent different languages like `en` for English for example. This is something commonly used in computing context for translation related stuff. + +PalSchema utilizes ISO 639 two-letter codes to determine which language it should be using, just like Unreal Engine does. You can check all the available language codes over here https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes + +For now, let's just use `en`, so English. However you're welcome to try different languages. + +## Creating the Localization Folder(s) + +1. In the [Setup](#setup) section, the last thing we did was creating a `translations` folder, we'll want to create a folder called `en` inside the `translations` folder which means we'll be altering or creating translations for the English localization. + +2. Inside the `en` folder, create a new file called `example_translation.json`. + +3. Open `example_translation.json` and write this inside of it: + +```json +{ + "DT_PalNameText": { + "PAL_NAME_PinkCat": "Not Cattiva" + } +} +``` + +`DT_PalNameText` is where the names of all Pals are stored and you might notice that it has this weird prefix `PAL_NAME_`. This is different for each localization file and is necessary to make sure the game actually reads these entries. We'll be modifying the name of Cattiva in the above example. + +4. Now we can launch the game and check if our changes took effect! + +![Cattiva with a modified name of Not Cattiva in-game](assets/intro/cattiva.png) + +Success! + +## Going Further + +Now that you have the basic understanding of translation mods, you'll be able to create and modify localizations for anything in the game. I recommend using FModel and exploring the localization files which can be found in `Pal/Content/L10N`. + +![Preview of the L10N folder as seen in FModel](assets/intro/fmodel.png) \ No newline at end of file diff --git a/website/versioned_docs/version-0.5.2/installation.mdx b/website/versioned_docs/version-0.5.2/installation.mdx new file mode 100644 index 0000000..3262dd9 --- /dev/null +++ b/website/versioned_docs/version-0.5.2/installation.mdx @@ -0,0 +1,99 @@ +--- +sidebar_position: 2 +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +# Installation + +Written by **[TheGameAce](https://next.nexusmods.com/profile/TheGameAceReal/mods?gameId=6063)** + +This guide will get you through the installation & setup process for PalSchema so you can get to making your own mods or enjoy using other's mods created with this new modding tool! If you have any issues with this process, feel free to reach out at the Palworld Modding Community on Discord for further assistance: **https://discord.gg/r9j9W67xhA** + +## Getting PalSchema + +The first step in this process will be getting the latest version of PalSchema, which can be found on GitHub here: **https://github.com/Okaetsu/PalSchema/releases/latest** + +Under each release, you'll see an "Assets" tab at the bottom that you can click on. It's under this tab that you'll see all downloadable contents. Within here you'll see two PalSchema downloads and two corresponding source code downloads. You'll want one of the former two downloads. Both of these have the same process. + + - **Regular Edition**: The first download option in descending order, this version of PalSchema is perfect for regular players who want to use PalSchema mods. Get this version if you don't have any intention of making your own mods via PalSchema. + - **Dev Edition**: The second download option in descending order, this version of PalSchema works like the regular version with added features designed for mod developers. If you intend to make your own mods with PalSchema, this is the recommended option. + +## UE4SS - Correct Version + Installation + +The next step of this process is making sure you have UE4SS installed properly, and more specifically the right version of it. As of Palworld patch 0.4.1.5, you'll need the Palworld specific version of UE4SS from **[here](https://github.com/Okaetsu/RE-UE4SS/releases/tag/experimental-palworld)** since they changed some engine related stuff. If you skip this step, you will experience crashing when you start Palworld, you've been warned. + +If you already have this version of UE4SS installed, skip to the next **[step](#ue4ss-settings--mod-settings).** If not, here's how to set it up: +Firstly, find your Palworld installation location. This will vary from person to person based on installation choices. + + + + For Gamepass users, open up the Xbox app on your computer and go to the Palworld page. In the top right there should be a button with three dots "...". Select this and hit "manage". The below window should pop up, in which you should select the "Files" tab. + + ![](https://i.gyazo.com/ae58f3b0b400855cb2bebac98d8e37d1.png) + + Here, you can see the installation location for Palworld on your computer. If you select "Browse", this location will be brought up in your file explorer. + + Now that we've gotten to Palworld's installation location, we'll want to navigate through the folders. It should go `Content -> Pal -> Binaries -> WinGDK`. Put the UE4SS zip file you downloaded in here. Select the zip and then right click -> extract all. If you're using the default Windows way of extracting the files, make sure you extract the contents of the zip rather than extracting UE4SS as a folder. I'll include two examples below for correct and incorrect extraction: + + ![](assets/correct_ue4ss_install.png) ![](assets/wrong_ue4ss_install.png) + + Congratulations, you just installed UE4SS for Palworld! + + **Note**: If you already have UE4SS installed, that's ok. This process will be the same, except you'll want to allow the file dwmapi.dll to override your current one, to direct the game to using the newly installed version instead. You'll also want to move the mods from your current Mods folder under WinGDK, to the Mods folder in the ue4ss folder instead. + + + + For Steam users, open up your Steam library, click on Palworld and then click the gear icon on the right side, then go to "Manage" and "Browse local files". + + ![](assets/steam_palworld_settings.png) + + ![](assets/steam_browse_local_files.png) + + If you select "Browse local files", this location will bring you to the root of your Palworld install in file explorer. + + Now that we've gotten to Palworld's installation location, we'll want to navigate through the folders. It should go `Pal -> Binaries -> Win64`. Put the UE4SS zip file you downloaded in here. Select the zip and then right click -> extract all. If you're using the default Windows way of extracting the files, make sure you extract the contents of the zip rather than extracting UE4SS as a folder. I'll include two examples below for correct and incorrect extraction: + + ![](assets/steam_correct_ue4ss_install.png) ![](assets/steam_wrong_ue4ss_install.png) + + Congratulations, you just installed UE4SS for Palworld! + + **Note**: If you already have UE4SS installed, that's ok. This process will be the same, except you'll want to allow the file dwmapi.dll to override your current one, to direct the game to using the newly installed version instead. You'll also want to move the mods from your current Mods folder under Win64, to the Mods folder in the ue4ss folder instead. + + + +## UE4SS Settings & Mod Settings +Before moving forward, you'll want to make sure that your settings for UE4SS and your Mods folder are correct. For UE4SS, check the UE4SS-settings.ini file. +![](https://i.gyazo.com/db0632ec3346f1264587163082247c72.png) + +This can be edited with any text editor, such as Windows notepad or Notepad++. In here, the most common two adjustments that have to be made are setting GraphicsAPI to dx11, and setting bUseUObjectArrayCache to false. + +![](assets/bUseUObjectArrayCache.png) + +![](assets/GraphicsAPI.png) + +Within your Mods folder under UE4SS, you'll see two files at the bottom: mods.json, and mods.txt. +![](https://i.gyazo.com/2e748d9a93866388b947b2762cf03b6f.png) + +Both of these files need to be modified the same way. Using mods.txt as an example: + +![](https://i.gyazo.com/7e5308a40fe5d58a152f25f6f1978c04.png) + +In mods.txt here, a value of 0 equates to a value of "false" in mods.json, while a value of 1 equates to a value of true. CheatManagerEnablerMod, ConsoleCommandsMod, ConsoleEnablerMod, BPModLoaderMod, and BPML_Genericfunctions should all be set to 1 or "true" across both files. + +## Installing PalSchema +Now that UE4SS is ready to go, we're ready for the long and arduous journey to install PalSchema! + +... + +Just kidding, it's a quick and easy process from here. Simply take the PalSchema zip you downloaded, extract it, and place the PalSchema folder that results under the Mods folder within UE4SS. You've now successfully installed PalSchema! + +![](assets/palschema_location.png) ![](assets/palschema_location2.png) + +If your goal is mod development, you can get a quick start in the **[Getting Started](./gettingstarted.md)** section. \ No newline at end of file diff --git a/website/versioned_docs/version-0.5.2/installing-mods.md b/website/versioned_docs/version-0.5.2/installing-mods.md new file mode 100644 index 0000000..0580990 --- /dev/null +++ b/website/versioned_docs/version-0.5.2/installing-mods.md @@ -0,0 +1,54 @@ +--- +sidebar_position: 2 +--- + +# Installing Mods + +Written by **[TheGameAce](https://next.nexusmods.com/profile/TheGameAceReal/mods?gameId=6063)** + +In this guide, we'll cover how to install PalSchema mods. This will apply **universally** to PalSchema mods, though it's recommended to double check if an author has any additional installation instructions. + +## Checklist +Before installing any PalSchema mods, **make sure you've properly done the following:** + + - **[Install the Experimental Fork of UE4SS](./installation.mdx#ue4ss---correct-version--installation)** + - **[Install PalSchema](./installation.mdx#installing-palschema--using-palschema-mods)** + - **Remove Files From Older UE4SS Install**: + - **Mods Folder Under Win64 or WinGDK Folders** - If you still have a **Mods** folder under **Win64 (Steam)** or **WinGDK (Gamepass)**, it **WILL** cause crashes and prevent proper functionality. + - **UE4SS.dll, UE4SS-settings.ini Under Win64 or WinGDK** - If you have a **UE4SS-settings.ini** or **UE4SS.dll** in your **Win64 (Steam)** or **WinGDK (Game Pass)**, delete these as they are most likely from an old UE4SS install and **WILL** interfere with your new install, causing the old UE4SS to load instead, ***which in turn causes Pal Schema and its mods to not function correctly.*** + + Here's a quick screenshot of a **Mods** folder **where it shouldn't be if you've installed everything properly**: + ![MODS FOLDER IN THE WRONG LOCATION](https://i.gyazo.com/86d4b188ca5e43387252263b3d71a76f.png) + >Wrong Mods Folder Location + + The **ONLY** Mods folder in these directories for both **Win64** and **WinGDK** should be under the **UE4SS** folder, as shown below: + ![CORRECT MODS FOLDER LOCATION](https://i.gyazo.com/a8cc1428ba5cee8e51069d6d74c0f1f5.png) + >Correct Mods Folder Location + + ## Installing the Mod + If everything else is done correctly, all you need now is to install your mod(s)! Navigate to **[NexusMods](https://www.nexusmods.com/games/palworld/mods?tag=PalSchema)** or wherever else you might get your PalSchema mods from, and download the mod! + +Once the mod is downloaded, you should have a zip folder, likely with the mod's name on it. +![PS Mod Zip Example](https://i.gyazo.com/e7629ecca06ed012af16e8c0f0f64325.png) + +While you can click on the zip and then right click and extract, I find that to be a bit messy. My recommended method is to double click the zip file to open it up, which should get you a view like this: + +![Zip Inside](https://i.gyazo.com/9bfa40cfa72c138f9ece1bb85b36436c.png) + +Bring up your File Explorer in an additional window now (you can right click the folder icon for file explorer on your computer's hotbar and select another folder for this), and navigate back to your Palworld installation and the **Win64** folder if you're on Steam or **WinGDK** folder if you're on Gamepass. From here, navigate into the UE4SS folder, and the **Mods** folder therein. + +![Mods Folder Inside](https://i.gyazo.com/e593fa1348527ca329505b5c4e5f0487.png) +>Inside of the Mods Folder; proper installation path from the Palworld folder can be seen therein. + +Above you can see an example from my **Mods** folder, as well as the appropriate path to get here. PalSchema is highlighted, and if you've properly installed it, it should look like this. + +Now, open up the PalSchema folder. Amongst the few folders in there, you want to go into the folder labeled **mods**. Pull up the other File Explorer window (which should still be inside of the zip file from the mod you downloaded), and drag and drop the folder contained into interior of the **mods** folder. The following should be the result (minus the extra mod folders I have): +![Mods folder interior; successful installation](https://i.gyazo.com/528c762409c3c5f56e05a75b9c4fb659.png) +>Correct Installation of a PalSchema mod. + +## IMPORTANT NOTE +***Some PalSchema mods will be hybrids, utilizing both a mod folder as seen above, and additional assets packaged like a traditional mod. Please make sure you check all files and any installation instructions that come with any mod.*** + +**Below is an example of a PalSchema-based mod that has additional files necessary for proper functionality. Without all files prescribed by any mod author, you risk crashes or reduced functionality.** +![Nexus Example](https://i.gyazo.com/7225a86cb0e34e79a6c9b87335b86f46.png) +>Remember to check instructions for every mod you download and **READ** over them thoroughly! Incorrect installation **WILL** cause issues! \ No newline at end of file diff --git a/website/versioned_docs/version-0.5.2/resources.md b/website/versioned_docs/version-0.5.2/resources.md new file mode 100644 index 0000000..a93ffd6 --- /dev/null +++ b/website/versioned_docs/version-0.5.2/resources.md @@ -0,0 +1,15 @@ +--- +sidebar_position: 4 +--- + +# Resources + +## Dummy Blueprints + +**Current Version is 0.4.15** + +[Download](https://drive.google.com/file/d/1CaZcHQg0weK5sTXoSgokbeuyO9sMcN_v/view?usp=sharing) + +When creating new game content with the Palworld Modding Kit, I recommend grabbing a copy of dummy blueprints which contains skeletons of almost all of the game's blueprints that can be referenced when creating new items, pals, etc. + +`Pal` folder inside the zip goes into the `Content` folder of your Palworld Modding Kit install. \ No newline at end of file diff --git a/website/versioned_docs/version-0.5.2/types/_category_.json b/website/versioned_docs/version-0.5.2/types/_category_.json new file mode 100644 index 0000000..8084e98 --- /dev/null +++ b/website/versioned_docs/version-0.5.2/types/_category_.json @@ -0,0 +1,7 @@ +{ + "label": "Types", + "position": 6, + "link": { + "type": "generated-index" + } +} diff --git a/website/versioned_docs/version-0.5.2/types/arrayproperty.md b/website/versioned_docs/version-0.5.2/types/arrayproperty.md new file mode 100644 index 0000000..48227d2 --- /dev/null +++ b/website/versioned_docs/version-0.5.2/types/arrayproperty.md @@ -0,0 +1,51 @@ +--- +sidebar_position: 8 +--- + +# TArray + +Array Properties in Pal Schema have two ways of defining them. `Pal/Content/Pal/DataTable/ItemShop/DT_ItemShopCreateData.uasset` will be used as an example. + +## Replacing the Array + +`productDataArray` in `DT_ItemShopCreateData` is an Array Property. Let's say we want to overwrite the inventory of `Village_Shop_1`, we would do something like: + +```json +"Village_Shop_1": { + "productDataArray": [ + { + "StaticItemId": "Pal_crystal_S", + "ProductType": "EPalItemShopProductType::Normal", + "OverridePrice": 0, + "ProductNum": 1, + "Stock": 0 + } + ] +} +``` + +This will empty the existing array and replace it with our own, meaning that the only item in the Small Settlement shop will be Paldium Fragments (Pal_crystal_S). + +## Inserting into the Array + +If you wanted to append to the end of the array instead, you would specify the value as an object with an "Items" property inside, rather than as an array as seen below: + +```json +"Village_Shop_1": { + "productDataArray": { + "Items": [ + { + "StaticItemId": "Pal_crystal_S", + "ProductType": "EPalItemShopProductType::Normal", + "OverridePrice": 0, + "ProductNum": 1, + "Stock": 0 + } + ] + } +} +``` + +Now you've added Paldium Fragments to the Small Settlement shop along with other existing items. + +`Items` field is not specific to this table, it is part of Pal Schema syntax which tells the code that these are the items you want to append to your array. So regardless of what array it is, always include the `Items` field in your array object if you're looking to insert into the array. \ No newline at end of file diff --git a/website/versioned_docs/version-0.5.2/types/boolproperty.md b/website/versioned_docs/version-0.5.2/types/boolproperty.md new file mode 100644 index 0000000..8e2137a --- /dev/null +++ b/website/versioned_docs/version-0.5.2/types/boolproperty.md @@ -0,0 +1,11 @@ +--- +sidebar_position: 4 +--- + +# Bool + +Bool Properties in Pal Schema are defined as booleans. `Pal/Content/Pal/DataTable/Character/DT_PalMonsterParameter.uasset` will be used as an example. + +```json +"IsBoss": false +``` \ No newline at end of file diff --git a/website/versioned_docs/version-0.5.2/types/enumproperty.md b/website/versioned_docs/version-0.5.2/types/enumproperty.md new file mode 100644 index 0000000..8e49a0d --- /dev/null +++ b/website/versioned_docs/version-0.5.2/types/enumproperty.md @@ -0,0 +1,17 @@ +--- +sidebar_position: 5 +--- + +# Enum + +Enum Properties in Pal Schema are defined as strings. `Pal/Content/Pal/DataTable/Character/DT_PalMonsterParameter.uasset` will be used as an example. + +You have two ways to specify an enum value, either specifying the full name: +```json +"Tribe": "EPalTribeID::PinkCat" +``` + +Or you can also do this where you leave the first part out: +```json +"Tribe": "PinkCat" +``` \ No newline at end of file diff --git a/website/versioned_docs/version-0.5.2/types/fname.md b/website/versioned_docs/version-0.5.2/types/fname.md new file mode 100644 index 0000000..f2b26d4 --- /dev/null +++ b/website/versioned_docs/version-0.5.2/types/fname.md @@ -0,0 +1,11 @@ +--- +sidebar_position: 2 +--- + +# FName + +FNames are defined as strings in Pal Schema. `Pal/Content/Pal/DataTable/Character/DT_PalMonsterParameter.uasset` as an example: + +```json +"PassiveSkill1": "Legend" +``` \ No newline at end of file diff --git a/website/versioned_docs/version-0.5.2/types/fstring.md b/website/versioned_docs/version-0.5.2/types/fstring.md new file mode 100644 index 0000000..477eeec --- /dev/null +++ b/website/versioned_docs/version-0.5.2/types/fstring.md @@ -0,0 +1,11 @@ +--- +sidebar_position: 1 +--- + +# FString + +FStrings are defined as strings in Pal Schema. `Pal/Content/Pal/DataTable/Character/DT_PalMonsterParameter.uasset` as an example: + +```json +"ZukanIndexSuffix": "B" +``` \ No newline at end of file diff --git a/website/versioned_docs/version-0.5.2/types/ftext.md b/website/versioned_docs/version-0.5.2/types/ftext.md new file mode 100644 index 0000000..7c111af --- /dev/null +++ b/website/versioned_docs/version-0.5.2/types/ftext.md @@ -0,0 +1,26 @@ +--- +sidebar_position: 3 +--- + +# FText + +FText in Pal Schema will have some differences compared to FModel. `Pal/Content/L10N/en/Pal/DataTable/Text/DT_ItemNameText.uasset` will be used as an example. + +Firstly let's look at how FModel displays an FText entry: +```json +"ITEM_NAME_Accessory_NormalResist_1": { + "TextData": { + "Namespace": "DT_ItemNameText_Common", + "Key": "ITEM_NAME_Accessory_NormalResist_1_TextData", + "SourceString": "Ring of Neutral Resistance", + "LocalizedString": "Ring of Neutral Resistance" + } +} +``` + +It's very verbose. In Pal Schema you would define it like this: +```json +"ITEM_NAME_Accessory_NormalResist_1": "Ring of Neutral Resistance" +``` + +That's all you need to do. \ No newline at end of file diff --git a/website/versioned_docs/version-0.5.2/types/mapproperty.md b/website/versioned_docs/version-0.5.2/types/mapproperty.md new file mode 100644 index 0000000..34972cb --- /dev/null +++ b/website/versioned_docs/version-0.5.2/types/mapproperty.md @@ -0,0 +1,32 @@ +--- +sidebar_position: 8 +--- + +# TMap + +TMap Properties in Pal Schema are defined as arrays of objects with key value pairs. + +## Example + +`Pal/Content/Pal/Blueprint/System/BP_PalGameSetting.uasset` + +`CharacterRankUpRequiredNumMap` in `BP_PalGameSetting` is a TMap Property. Let's say we want to modify the amount of Pals required for Star Level 1 from 4 to 1. + +```json +{ + "BP_PalGameSetting_C": { + "CharacterRankUpRequiredNumMap": [ + { + "Key": 1, + "Value": 1 + } + ] + } +} +``` + +Only the entry with the Key "1" will be modified and the rest of the entries will remain unchanged, if a Key doesn't exist, it will add a new entry to the TMap instead. + +It's pretty much the same format as FModel, but there's one difference. You may notice that the "Key" in FModel looks like a string, but in reality you should define it based on the actual type used which might be a bit difficult to figure out unless you look at the header or source files from the Palworld Modding Kit. You can also opt for trial and error as Pal Schema should output errors which tell you what type was expected for a property. + +Key/Value could be anything in Unreal like a Struct, but most of the types are covered in the docs, so it should be no issue. \ No newline at end of file diff --git a/website/versioned_docs/version-0.5.2/types/numericproperty.md b/website/versioned_docs/version-0.5.2/types/numericproperty.md new file mode 100644 index 0000000..92494a9 --- /dev/null +++ b/website/versioned_docs/version-0.5.2/types/numericproperty.md @@ -0,0 +1,14 @@ +--- +sidebar_position: 6 +--- + +# Numeric Property + +All numeric properties in Pal Schema are treated the same. `Pal/Content/Pal/DataTable/Character/DT_PalMonsterParameter.uasset` as an example: + +```json +"Rarity": 4, +"EnemyMaxHPRate": 1.0 +``` + +`Rarity` is an integer type while `EnemyMaxHPRate` is a float. \ No newline at end of file diff --git a/website/versioned_docs/version-0.5.2/types/softclassptr.md b/website/versioned_docs/version-0.5.2/types/softclassptr.md new file mode 100644 index 0000000..d9d3292 --- /dev/null +++ b/website/versioned_docs/version-0.5.2/types/softclassptr.md @@ -0,0 +1,29 @@ +--- +sidebar_position: 11 +--- + +# TSoftClassPtr + +TSoftClassPtr Properties in Pal Schema are defined as strings that point to an asset path. They're basically the same as [TSoftObjectPtr](./softobjectptr.md), except they must end with a `_C`. + +## Example + +`Pal/Content/Pal/DataTable/Character/DT_PalBPClass.uasset` + +`BPClass` in `DT_PalBPClass` is a TSoftClassPtr property. You can tell from the long path that looks something like this: `/Game/Pal/Blueprint/Character/Monster/PalActorBP/Anubis/BP_Anubis.BP_Anubis_C`. Notice how the path ends in a `_C`? This basically tells Unreal that we want a soft pointer to a Class rather than an Object. + +In FModel the above path would translate to `Pal/Content/Pal/Blueprint/Character/Monster/PalActorBP/Anubis/BP_Anubis.BP_Anubis_C`. + +In Pal Schema you want to convert the beginning `Pal/Content` into `/Game/`. Make sure it has a forward slash in the beginning, otherwise your path will not be read correctly, so don't do something like this: `Game/etc`. Remember to always end your path in `_C` when dealing with TSoftClassPtr properties. + +```json +{ + "DT_PalBPClass": { + "Anubis": { + "BPClass": "/Game/Pal/Blueprint/Character/Monster/PalActorBP/PinkCat/BP_PinkCat.BP_PinkCat_C" + } + } +} +``` + +As you can see, we just use a string right after BPClass, rather than the complex object that can be seen in FModel. \ No newline at end of file diff --git a/website/versioned_docs/version-0.5.2/types/softobjectptr.md b/website/versioned_docs/version-0.5.2/types/softobjectptr.md new file mode 100644 index 0000000..0da87ee --- /dev/null +++ b/website/versioned_docs/version-0.5.2/types/softobjectptr.md @@ -0,0 +1,27 @@ +--- +sidebar_position: 10 +--- + +# TSoftObjectPtr + +TSoftObjectPtr Properties in Pal Schema are defined as strings that point to an asset path. + +## Example + +`Pal/Content/Pal/DataTable/Character/DT_PalCharacterIconDataTable.uasset` + +`Icon` in `DT_PalCharacterIconDataTable` is a TSoftObjectPtr Property. You can tell from the long path that looks something like this: `/Game/Pal/Texture/PalIcon/Normal/T_Anubis_icon_normal.T_Anubis_icon_normal`, in FModel this would translate to `Pal/Content/Pal/Texture/PalIcon/Normal/T_Anubis_icon_normal.T_Anubis_icon_normal`. + +In Pal Schema you want to convert the beginning `Pal/Content` into `/Game/`. Make sure it has a forward slash in the beginning, otherwise your path will not be read correctly, so don't do something like this: `Game/etc` + +```json +{ + "DT_PalCharacterIconDataTable": { + "Anubis": { + "Icon": "/Game/Pal/Texture/PalIcon/Normal/T_PinkCat_icon_normal.T_PinkCat_icon_normal" + } + } +} +``` + +As you can see, we just use a string right after Icon, rather than the complex object that can be seen in FModel. \ No newline at end of file diff --git a/website/versioned_docs/version-0.5.2/types/structproperty.md b/website/versioned_docs/version-0.5.2/types/structproperty.md new file mode 100644 index 0000000..18a25ce --- /dev/null +++ b/website/versioned_docs/version-0.5.2/types/structproperty.md @@ -0,0 +1,25 @@ +--- +sidebar_position: 9 +--- + +# Struct + +Struct Properties are a bit more complex as it will be combining a lot of the previous types. Struct Property is not something commonly seen in Datatables. You're more likely to see them when working with blueprints. `Pal/Content/Pal/DataTable/ItemShop/DT_ItemShopCreateData.uasset` will be used as an example. + +`productDataArray` in `DT_ItemShopCreateData` is an [Array Property](./arrayproperty.md), but the items inside the array are Struct Properties. Below is how you would define a Struct Property in Pal Schema: + +```json +{ + "StaticItemId": "Blueprint_Head003_1", + "ProductType": "EPalItemShopProductType::Normal", + "OverridePrice": 0, + "ProductNum": 1, + "Stock": 0 +} +``` + +- `StaticItemId` is a [FName Property](./fname.md) +- `ProductType` is an [Enum Property](./enumproperty.md) +- `OverridePrice`, `ProductNum` and `Stock` are [Numeric Properties](./numericproperty.md) + +As you can see we defined the struct as a json object. \ No newline at end of file diff --git a/website/versioned_sidebars/version-0.5.2-sidebars.json b/website/versioned_sidebars/version-0.5.2-sidebars.json new file mode 100644 index 0000000..d72659a --- /dev/null +++ b/website/versioned_sidebars/version-0.5.2-sidebars.json @@ -0,0 +1,47 @@ +{ + "homeSidebar": [ + "features", + "installation", + "installing-mods", + "configuration" + ], + "documentationSidebar": [ + "gettingstarted", + "resources", + { + "type": "category", + "label": "Types", + "items": [ + "types/fstring", + "types/fname", + "types/ftext", + "types/boolproperty", + "types/enumproperty", + "types/numericproperty", + "types/arrayproperty", + "types/mapproperty", + "types/structproperty", + "types/softobjectptr", + "types/softclassptr" + ] + }, + { + "type": "category", + "label": "Guides", + "items": [ + "guides/items/creatingabow", + "guides/blueprints/intro", + "guides/blueprints/components", + "guides/rawtables/intro", + "guides/rawtables/wildcard", + "guides/buildings/craftingstation", + "guides/enums/newenums", + "guides/translations/intro", + "guides/pals/addingranchsuitability", + "guides/resources/importingimages", + "guides/helpguide/intro", + "guides/spawners/overview" + ] + } + ] +} diff --git a/website/versions.json b/website/versions.json new file mode 100644 index 0000000..9cfbd17 --- /dev/null +++ b/website/versions.json @@ -0,0 +1,3 @@ +[ + "0.5.2" +]