Posted November 16, 2020 by James "Kanto" Burton
So you want to know how to add your own kooky character(s) to Expandyssey: The Elastic Modulus? There are a few easy steps to add a wide variety of characters to the game. And with the V1.2.2 update, this process is not made slightly easier!
Step 1: Draw some sprites
So far the game takes in 6 different files to allow your character to run around. These are: idle right facing, idle left facing, moving right, moving left, belly with varying sizes, and a tail (optional). When making these files, make sure that:
The orange pixel is where the belly sprite's centered on the character sprite (top left of pixel), and the blue pixel is where the sprite's overall center is for the game. If you would like a character template, you can download the Gene Whicon DLC and observe how that character is put together. By default, character frames are typically 32x32.
Step 2: Make a Mod Pack
Now that you have the character drawn up, it's time to add them to the game. Start up the game and go to the Workshop. There, you can get the file path to the sandbox environment. The copy button will only work on Windows computers, and it will copy the address to your clipboard so you can paste it into your file directory.
If you haven't added the Thine First DLC, create a folder named "Content". In that folder make another folder and name it however you want. Typically name it the same as the "mod" your adding. In your "mod" folder create one last folder and give it the name of your character your adding. This folder is where you copy and paste your character images. Go back to your "mod" folder and create a .txt file named "Start.txt". The file structure should look something like this:
>ExpandysseyTEM
--options.ini
->Content
-->"mod"
----Start.txt
--->"character"
-----image files of said "character"
Step 3: Code the Mod Pack
Now that you have all the files you need, open the "Start.txt" file in a basic .txt file editor like Notepad or Notepad++. You should first write and describe in general what your mod pack does, you can use the "//" comment lines or "/* */" comment block. However, if you use the comment block, the character "*/" MUST be on a new line.
Your next line should declare for what version this mod is intended for. It's not necessarily required, but it's used as a safety measure and to let the program know how to handle the mod if it's outdated. The line you should write is "version = 1.2.1" or something similar.
Next is where we start importing your character. Write this line, filling in the parameters with quotes when indicated:
v = newCharacter("Name","Title","Fill Types",Belly Size (Max, optional),Height (in inches, optional),Weight (in lbs, optional));
Now assigning newCharacter() to "v" is important, as this integer dictates the index/id of your character. You must complete all your editing with that character before adding a new one with the newCharacter() function again!
Now you can import the images from the character folder in this format using the sprite_add() function. Before you had to directly access the global sprite double array g.draw, but now you can just use v.draw.<variable> to access it by name:
v.draw.<variable> = sprite_add("<foldername>/file.extension",number of frames,remove background?,smooth?,x origin,y origin);
Lastly, to make it so the player can access your new character, let's add them to the roster. Use this line to add them into the game and to be usable:
g.roster[e,0] = v;
This just adds your current character to the end of the global double array g.roster.
Since 1.2.1, we can edit the character's stats before we are done with them. However instead of accessing the double array, we can access the character's stats by using this:
v.<variable> = <value>;
A list will be provided later in the document for the variables you can access with this.
A new feature which allows for alternates in the roster makes it so you can make alternates of your character. To do so, first before we declare a new character, we need to assign it to a variable as such:
num <variable> = get_roster_number(v);
Now if you wish to add an alternate to your character or group them into one slot, declare it as such:
g.roster[var(<variable>),e] = v;
Step 4: Enjoy!
Now boot up the game and have fun with your 20+ belly sized kangaroo with super jump and cheetah speed, or whatever character you come up with! Happy gaming/modding!
Closing thoughts
Though there might not be a lot to play with right now, and some (if not most) practices will need to be revised after a future update, I still recommend having a separate file that has your character in parts, as a future update will require the character to be more sliced up for a paper doll like system.
FAQ:
Question: What if I don't have photoshop to make a transparent background?
Answer: You don't necessarily need a fancy art program like that, a simple program like MSPaint is fine. Just make the color that you want removed from the background be different from your character. However make sure that the bottom right pixel is the color you want removed.
Features planned for character creation:
Reference to Fill Types:
Those that have a strike through them are currently unimplemented but are (hopefully) planned for in later updates. Not all fillings are listed.
00 = Air
01 = Helium
02 = Food
03 = Fire04 = Object "Vore"05 = Magic06 =Candy07 = Vore08 = Water09 = Cotton11 = Electricity
10 = Data12 = Slime
Reference to the v.<variable>:
Reference to the v.draw.<variable>:
Thank you for your time and support. Have a nice, safe, and fun day!