Stormworks: Build and Rescue – New monitor sizes in Pony’s Lua IDE

Stormworks: Build and Rescue - New monitor sizes - steamlists.com
Stormworks: Build and Rescue - New monitor sizes - steamlists.com
Unfortunately CrazyFluffyPony won’t be adding new features to the Lua IDE. This means that the new screens just announced won’t be compatible with it. This guide will show you how to edit files from the IDE to have it support these new screen sizes.

 

Downloading The IDE

Firstly, you will need to download the IDE for offline use. Go to the lua.flaffipony.rocks – https://lua.flaffipony.rocks/ and click the three bars at the top left. Then click Download for offline use. This should start a download of a zip file called editor-master.zip. Once the file is downloaded, unzip it to wherever you want.

Modifying The Files

Now that you have the IDE downloaded, you need to edit some files.

Firstly make sure that you have some sort of text editor that allows you to view what line you are on, such as notepad++ or sublime text.

Then, open up the editor-master folder that was unzipped, and open index.html in a text editor. If you just double click it, it will most likely open in a browser, but you want to right click the file and open it with your text editor. Once you have index.html opened, go to line 208 or ctrl+f and type monitor-size. Once you have found something that looks like this:

<select id="monitor-size" name="monitor-size">
    <option value="1x1">1x1</option>
    <option value="2x2">2x2</option>
    <option value="3x3">3x3</option>
    <option value="5x3">5x3</option>
    <option value="9x5">9x5</option>
</select>

Replace the entire section with:

<select id="monitor-size" name="monitor-size">
    <option value="1x1">1x1</option>
    <option value="1x2">1x2</option>
    <option value="1x3">1x3</option>
    <option value="2x2">2x2</option>
    <option value="2x3">2x3</option>
    <option value="3x3">3x3</option>
    <option value="5x3">5x3</option>
    <option value="9x5">9x5</option>
</select>

Now save the file and close it.

1/2 files done.
Now in the editor-master folder, there will be a scripts folder, and inside it a file called all.js. Open this file in the text editor once again and go to line 16975. This script is very long, if you can’t find the specific object listed below, you can ctrl+f and enter SIZES until you find it. The object should look like this:

const SIZES = {
    "1x1": {width: 32, height: 32},
    "2x2": {width: 64, height: 64},
    "3x3": {width: 96, height: 96},
    "5x3": {width: 160, height: 96},
    "9x5": {width: 288, height: 160}
}

You need to replace all of that with this:

const SIZES = {
    "1x1": {width: 32, height: 32},
    "1x2": {width: 64, height: 32},
    "1x3": {width: 96, height: 32},
    "2x2": {width: 64, height: 64},
    "2x3": {width: 96, height: 64},
    "3x3": {width: 96, height: 96},
    "5x3": {width: 160, height: 96},
    "9x5": {width: 288, height: 160}
}

Again save this file and now you should be able to open index.html with your favourite web browser and see that you can select the new screen sizes.

If it does not work properly or not show up with the new sizes, you can try opening the src folder, then scripts, then canvas.js and repeating the same in the previous step. If you still have issues, leave a comment and I’ll see what I can do. Enjoy 🙂

By gorillaa

I hope you enjoy the Guide we share about Stormworks: Build and Rescue – New monitor sizes in Pony’s Lua IDE; if you think we forget to add or we should add more information, please let us know via commenting below! See you soon!


Be the first to comment

Leave a Reply

Your email address will not be published.


*