Difference between revisions of "User:Iamyoyoman/Sandbox"

From Stoneshard wiki
Jump to navigation Jump to search
Line 31: Line 31:


==Creation of the sprite==
==Creation of the sprite==
[[File:Modding-addsprite.png|thumb|250px]]
[[File:Modding-addsprite.png|right|250px]]
[[File:Modding-appledesign.png|thumb||250px]]
[[File:Modding-appledesign.png|right||250px]]
We are going to need to create two sprites.
We are going to need to create two sprites.
<br>
<br>
Line 44: Line 44:
<br>
<br>
Knowing all that, we need to create a new image that will include both our sprites.
Knowing all that, we need to create a new image that will include both our sprites.
[[File:Modding-spritetable.png|thumb|250px]]
[[File:Modding-spritetable.png|right|250px]]

Revision as of 20:32, 18 March 2023

Modding

Even though Stoneshard does not have integrated modding support it is still possible to mod the game via external tools, such as UndertaleModTool[1], which allows one to dig into GameMaker Studio game files.
It is also possible to share modded games by sharing the difference between the modded game files compared to the vanilla ones, this is usually done with Delta Patcher[2] software to avoid piracy.

What is required?

Other than a working PC. It is advised to:

  • Download and use the Bleeding Edge[3] of UndertaleModTool.
  • Have basic knowledge of coding.
  • Have an understanding of how GameMaker Studio works

OK but how do I actually mod the game?

Once you have downloaded UndertaleModTool, create a copy of your game files from "SteamLibrary\steamapps\common\Stoneshard" to keep the original's integrity.
Open the "data.win" with the tool. There you can find all the game's objects, be it Scripts, Sprites, GameObjects, or else, create new or edit existing ones. Note that UndertaleModTool is very limited, and you might encounter some files that it can't decompile.
Of course, not everything can be edited that way. for example, as GameMaker Studio saves audio files outside its data.win file, to edit those you will need to add extra files to the game folder.

Tips and tricks

How do I find a specific thing?

In the top left of the window, under "Scripts" and "Builtin Scripts", "Search.csx" can be found. It is a very helpful script that allows you to search any text in all of the scripts.

What if I can't decompile a script?

Always remember that you can still see and edit the assembly code of the script. it might be harder to understand and edit but it could also make an impossible task into a possible one.

Is there a way to debug?

As the debugger in UndertaleModTool does not work with Stoneshard. using the "scr_actionsLogUpdate()" script is an excellent way to achieve a similar result. but that won't work for edits to stuff as the main menu does not include the game's actions log.

I am stuck, Where can i get help?

It depends on what problem you are facing. but both the UndertaleModTool community and Stoneshard modding community are very welcoming and you are advised to visit both at their Discord servers.

Step By Step Example Mod

For this example we will create a mod that will replace the golden apple from the second floor of the The Black Boar Inn with a modded golden apple.

Creation of the sprite

Modding-addsprite.png
Modding-appledesign.png

We are going to need to create two sprites.
One for then the new golden apple is on the ground and one for when it is in the player's inventory.
To make the sprites look fitting for the game's art style, in this example, we take the sprites of the apples and recolor them with colors from the sprite of the golden nugget.
To export the images we can go into the sprite pages, by searching their name on the left panel, and exporting with the "export all frames" button.
Before we add the new sprites into the game we must first understand the hierarchy and structure of sprites in GameMaker Studio. In GameMaker Studio each gameobject takes its sprite from a sprite file that, takes its sprite from a "texture page item" file that, takes its sprite from an "embedded textures" file, a file that includes a map of multiple sprites. gameobject > sprite > texture page item > embedded textures.
Knowing all that, we need to create a new image that will include both our sprites.

Modding-spritetable.png