Editing
Modding
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Tutorial: new upgrades == [[Upgrades]] are the items offered at the end of every level. They are the best starting point for modding: little to no coding knowledge required. === Sprites === Each upgrade is one sprite with two frames: * '''Frame 0''': the selection icon shown on the end-of-level choice screen. 24Γ24 pixels. * '''Frame 1''': the inventory icon shown in the corner once taken. 12Γ12 pixels. <div class="dw-shot" style="width:142px">https://pix-equivalent-burst-tested.trycloudflare.com/extensions/DownwellTheme/resources/modding/img03.png</div> <div class="dw-shot" style="width:59px">https://pix-equivalent-burst-tested.trycloudflare.com/extensions/DownwellTheme/resources/modding/img04.png</div> Upgrade sprites use '''at most three colors''': red <code>#FF0000</code>, white <code>#FFFFFF</code> and black <code>#000000</code>. The game's palette shaders automatically remap them to the player's chosen [[Palettes|palette]]. === Naming scheme === Name the files as frames of one sprite, e.g. for a "Knuckle Sandwich" upgrade: sUgSandwich_0.png (large icon) sUgSandwich_1.png (small icon) UndertaleModTool imports numbered files as frames of the same sprite. Put them alone in a folder. === Importing === # Open <code>data.win</code> in UndertaleModTool. <div class="dw-shot" style="width:388px">https://pix-equivalent-burst-tested.trycloudflare.com/extensions/DownwellTheme/resources/modding/img05.png</div> # Run '''Scripts β Resource Repackers β ImportGraphics.csx''' and select your folder. <div class="dw-shot" style="width:424px">https://pix-equivalent-burst-tested.trycloudflare.com/extensions/DownwellTheme/resources/modding/img06.png</div> <div class="dw-shot" style="width:284px">https://pix-equivalent-burst-tested.trycloudflare.com/extensions/DownwellTheme/resources/modding/img07.png</div> # Check that a new <code>UndertaleEmbeddedTexture</code> exists (a texture-loading warning at this stage can be ignored, or save and reload). <div class="dw-shot" style="width:255px">https://pix-equivalent-burst-tested.trycloudflare.com/extensions/DownwellTheme/resources/modding/img08.png</div> <div class="dw-shot" style="width:290px">https://pix-equivalent-burst-tested.trycloudflare.com/extensions/DownwellTheme/resources/modding/img09.png</div> # Find your sprite in the ''Sprites'' section and check its properties; most importantly, the '''origin must be 12Γ12''' so the icons align in the menu and inventory. <div class="dw-shot" style="width:491px">https://pix-equivalent-burst-tested.trycloudflare.com/extensions/DownwellTheme/resources/modding/img10.png</div> <div class="dw-shot" style="width:624px">https://pix-equivalent-burst-tested.trycloudflare.com/extensions/DownwellTheme/resources/modding/img11.png</div> <div class="dw-shot" style="width:624px">https://pix-equivalent-burst-tested.trycloudflare.com/extensions/DownwellTheme/resources/modding/img12.png</div> <div class="dw-shot" style="width:624px">https://pix-equivalent-burst-tested.trycloudflare.com/extensions/DownwellTheme/resources/modding/img13.png</div> === language.ini === All of the game's text lives in <code>language.ini</code> next to <code>data.win</code>. Add your upgrade's name to the <code>ugName</code> section; the last vanilla entry is <code>ugName22</code>. Entries for the other languages are optional, but without them those languages show a blank name and description. <div class="dw-shot" style="width:567px">https://pix-equivalent-burst-tested.trycloudflare.com/extensions/DownwellTheme/resources/modding/img14.png</div> <div class="dw-shot" style="width:194px">https://pix-equivalent-burst-tested.trycloudflare.com/extensions/DownwellTheme/resources/modding/img15.png</div> <div class="dw-shot" style="width:443px">https://pix-equivalent-burst-tested.trycloudflare.com/extensions/DownwellTheme/resources/modding/img16.png</div> === The upgrade table === Search for ''upgrades'' in UndertaleModTool and open <code>gml_Script_scrUpgrades</code> under ''Code''. <div class="dw-shot" style="width:193px">https://pix-equivalent-burst-tested.trycloudflare.com/extensions/DownwellTheme/resources/modding/img17.png</div> <div class="dw-shot" style="width:227px">https://pix-equivalent-burst-tested.trycloudflare.com/extensions/DownwellTheme/resources/modding/img18.png</div> <div class="dw-shot" style="width:456px">https://pix-equivalent-burst-tested.trycloudflare.com/extensions/DownwellTheme/resources/modding/img19.png</div> {| class="wikitable" ! Field !! Meaning |- | <code>ug[i][0]</code> || Name (shown on the choice screen) |- | <code>ug[i][1]</code> || Copies currently owned. The game resets it; leave at 0 |- | <code>ug[i][2]</code> || Sprite '''index'''. The first sprite a mod imports lands at index 741; add 1 per additional sprite |- | <code>ug[i][3]</code> || Description; <code>#</code> is a line break |- | <code>ug[i][4]</code> || Maximum copies obtainable. The pickers only offer an upgrade while <code>ug[i][1] < ug[i][4]</code>; vanilla entries with 0 here (Dumbbell, Super Charge, Sudden Fortune) are cut content that can never appear. Leave at 1 |- | <code>ug[i][5]</code> || Price in gems. '''Only read for the shop consumables''' (indexes 100β105); dead data for regular upgrades. Leave at 200 |- | <code>ug[i][6]</code> || Japanese name |- | <code>ug[i][7]</code> || Japanese description |} Copy an existing block to the end of the list, keep the <code>i += 1</code> above it, and fill in your values. <div class="dw-shot" style="width:320px">https://pix-equivalent-burst-tested.trycloudflare.com/extensions/DownwellTheme/resources/modding/img20.png</div> <div class="dw-shot" style="width:404px">https://pix-equivalent-burst-tested.trycloudflare.com/extensions/DownwellTheme/resources/modding/img21.png</div> === Functionality === Search for ''pug'' (Player UpGrade) and open <code>gml_Script_scrIncrementPug</code>. <div class="dw-shot" style="width:157px">https://pix-equivalent-burst-tested.trycloudflare.com/extensions/DownwellTheme/resources/modding/img22.png</div> <div class="dw-shot" style="width:244px">https://pix-equivalent-burst-tested.trycloudflare.com/extensions/DownwellTheme/resources/modding/img23.png</div> <div class="dw-shot" style="width:374px">https://pix-equivalent-burst-tested.trycloudflare.com/extensions/DownwellTheme/resources/modding/img24.png</div> <div class="dw-shot" style="width:342px">https://pix-equivalent-burst-tested.trycloudflare.com/extensions/DownwellTheme/resources/modding/img25.png</div>
Summary:
Please note that all contributions to Downwiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Downwiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information
Community
r/Downwell
Downwell Discord