Using custom assets - Zariep-Software/WiPersona GitHub Wiki
Using Custom Assets
Most likely, you want to use custom assets instead of the default ones. There are two ways to do this:
Non-local Version
If you're running WiPersona in a non-local mode (e.g., on the itch.io page), you will need to load your assets each time you use the program for security reasons. WiPersona cannot (and even if it could, wouldn't want to) save information about your files. Nevertheless, the process is quite simple. You just need to use the main menu buttons to load your desired assets.
Local Version
If you're running WiPersona locally, you can follow the same steps as for the non-local version. Additionally, you can automate the asset replacement process:
- Inside the program's folder, navigate to
data/res/
. There, you will find five files (background.webp
,scream.webp
,silence.webp
,speak.webp
,sourcelist.js
). You can editsourcelist.js
and declare custom assets.
// If you're running WiPersona locally, you can declare the resources here.
// Note that the root path of the page is where index.html is located.
// For example, this file would be in res/sourcelist.js.
// WiPersona allows any image type supported by your browser (e.g., WebP, GIF, PNG ).
export const Background = "res/background.webp";
export const AvatarSpeak = "res/speak.webp";
export const AvatarSilence = "res/silence.webp";
export const AvatarScream = "res/scream.webp";
The only requirement is that the files needs to be Image type, WiPersona works correctly with animated images (e.g., WebP, GIF, AVIF ).