Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: wmw-modding/wheres-my-editor
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0.0
Choose a base ref
...
head repository: wmw-modding/wheres-my-editor
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
49 changes: 49 additions & 0 deletions .github/workflows/pyinstaller-build-mac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Package Application - Mac OS

on:
workflow_dispatch:
push:

jobs:
mac-build:
name: build Mac OS

runs-on: macos-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12

- name: Git checkout
uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: git
run: |
# setup the username and email. I tend to use 'GitHub Actions Bot' with no email by default
git --version
git config user.name "GitHub Actions Bot"
git config user.email "<>"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/requirements-nightly.txt
- name: pyinstaller build
run: |
python build.py
- name: Move files
run: |
mv ./dist ./wme-MacOS
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: "wme-mac-2.4.0 - ${{github.run_number}}"
path: wme-MacOS
50 changes: 50 additions & 0 deletions .github/workflows/pyinstaller-build-ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Package Application - Ubuntu


on:
workflow_dispatch:
push:

jobs:
linux-build:
name: build Linux

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12

- name: Git checkout
uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: git
run: |
# setup the username and email. I tend to use 'GitHub Actions Bot' with no email by default
git --version
git config user.name "GitHub Actions Bot"
git config user.email "<>"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/requirements-nightly.txt
- name: pyinstaller build
run: |
python build.py
- name: Move files
run: |
mv ./dist ./wme-Ubuntu
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: "wme-ubuntu-2.4.0 - ${{github.run_number}}"
path: wme-Ubuntu
49 changes: 49 additions & 0 deletions .github/workflows/pyinstaller-build-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Package Application - Windows

on:
workflow_dispatch:
push:

jobs:
win-build:
name: build Windows

runs-on: windows-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12

- name: Git checkout
uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: git
run: |
# setup the username and email. I tend to use 'GitHub Actions Bot' with no email by default
git --version
git config user.name "GitHub Actions Bot"
git config user.email "<>"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/requirements-nightly.txt
- name: pyinstaller build
run: |
python build.py
- name: Move files
shell: pwsh
run: ;
mv ./dist ./wme-Windows

- uses: actions/upload-artifact@v4
with:
name: "wme-windows-2.4.0 - ${{github.run_number}}"
path: ./wme-Windows
64 changes: 64 additions & 0 deletions .github/workflows/release-assets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Package Application

on:
workflow_dispatch:
release:
types: [published]


permissions:
contents: write

jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: ubuntu-latest
platform: Ubuntu
- os: macos-latest
platform: MacOS
- os: windows-latest
platform: Windows
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12

- name: Install dependencies
run: |
python -m pip install --upgrade pip &&
pip install -r requirements/requirements-dist.txt
- name: pyinstaller build
run: |
python build.py
- name: Move files
run: |
mv ./dist ./wme-${{ matrix.platform }}
- name: Zip files (Windows)
if: ${{ matrix.platform == 'Windows' }}
shell: pwsh
run: |
7z a ./wme-${{ matrix.platform }}.zip ./wme-${{ matrix.platform }}
- name: Zip files (not Windows)
if: ${{ matrix.platform != 'Windows' }}
run: |
zip -r ./wme-${{ matrix.platform }}.zip ./wme-${{ matrix.platform }}
- name: Upload Release Asset
uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: "./wme-${{ matrix.platform }}.zip"
update_latest_release: true
release_id: ${{ github.event.release.id }}
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -114,6 +114,7 @@ celerybeat.pid
# Environments
.env
.venv
.build/
env/
venv/
ENV/
@@ -164,3 +165,9 @@ src/signapk.jar

android/
.vscode/
# My folder for extracted games
src/game
git_dist/

# my local wmwpy installation
requirements-local.txt
132 changes: 119 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,137 @@
# Where's My Editor
A level editor for Where's My Water (android)

NOTE: If you came here to read a .waltex image, then go to [wmwpy](https://github.com/wmw-modding/wmwpy/blob/main/src/wmwpy/Utils/Waltex.py), because I will be removing Waltex.py from wme.
# Where's My Editor?
<p align="center">
<img alt="Where's My Editor? logo" src="src/assets/images/WME_logo.png" width="50%" >
<br>
Logo created by rubice!
</p>
Where's My Editor? is a level editor for the mobile game, Where's My Water? and all it's spinoffs.

# Setup
NOTE: If you came here to read a .waltex image, then go to [wmwpy](https://github.com/wmw-modding/wmwpy/blob/main/src/wmwpy/utils/waltex.py). `waltex.py` has moved there.

run
# Get started
To get started
1. Get the latest release from the [releases tab](https://github.com/wmw-modding/wheres-my-editor/releases/latest). Extract the zip folder into it's own folder (to keep it's files organized).
2. Next, you need to get the game files. You can get them in many ways, but generally, you want to have the game extracted into a folder, and all the assets in the `assets` (or `Content`) folder.
3. Open the Where's My Editor app (wme.exe)
4. Select the game folder.
5. Now you got it up and running.

If you run into any issues, please send a bug report (shortcut in **Help > Send bug report**, or the issues page in this repository).

# How to use

After you load a level, you can move around, and edit objects.

## Moving objects

You can move objects by clicking on it, and dragging it anywhere. You can also use the arrow keys for finer placement. You can also hold some modifier keys to change the amount moved

- **Shift** + **Arrow key** = 4
- **Arrow key** = 1
- **Control** (or **Command**) + **Arrow key** = 0.5
- **Alt** + **Arrow key** = 0.1

# Development
If you're going to be editing wme, you should also edit wmwpy, as wmwpy handles all the reading and writing of the wmw files.

## Setup

1. Create a folder that both wme and wmwpy can be in.

```
/
/wheres-my-editor
/wmwpy
```

2. Clone wme into `wheres-my-editor`

```sh
git clone https://github.com/wmw-modding/wheres-my-editor.git
```

4. Clone wmwpy into `wmwpy`

```sh
git clone https://github.com/wmw-modding/wmwpy.git
```

5. Create wme virtual environment

A virtual environment is a very good thing to use, because it allows you to keep an instance of all the installed modules without overriding your main installation.

```sh
cd wheres-my-editor
python -m venv .venv
./.venv/Scripts/activate
```

6. Install dependencies

```sh
pip install -r requirements.txt
```
or

7. Add local clone of wmwpy

```sh
pip install -e ../wmwpy
```

The `-e` argument is used to tell pip that you want wmwpy to be editable, aka, if you edit wmwpy from your clone, it will be updated in wme.

8. Run wme

Now you can run wme

```sh
cd src
python main.py
```

## Build exe
### Install dependencies
To build an exe for wme, you need to install the dependencies.

```sh
pip install -r requirements-build.txt
```

This will override your editable installation of wmwpy (in the venv, it will not replace your edits), so you'll have to reinstall wmwpy again.

```sh
pip install -e ../wmwpy
```
py -m pip install -r requirements.txt

(Tip: you can also install `requirements/requirements-build.txt` to only install the build requirements)

You can also edit `requirements.txt` to add `-e "../wmwpy"`, and then you won't have to bother with reinstalling wmwpy, but if you're going to be publishing your edits, you might want to replace it with the link to your wmwpy clone repo instead of a path to your local clone.

If you're going to be making a release, please note that the github action will install wmwpy from pypi, so you may have to edit `requirements/requirements-dist.txt` if you want to use your personal edit of wmwpy.

### Build exe

```sh
python build.py
```

Start by extracting your where's my water apk file into a directory. When you run the program for the first timze, it'll ask you to select the game directory. This can also be configurable in the `settings.json` file that is generated by the program.
The output is in `dis/wme.exe` (it won't be an exe if you're not on windows).

# Todo

- [x] Export `xml` file
- [ ] Export `png` file
- [x] Export `png` file
- [x] Add and remove objects
- [ ] Room object
- [ ] Image editor
- [ ] Room object.
- This has kind of been implemented, because wmw1 uses the image for the room placement, but the later games use an object (which can be loaded).
- [ ] Complete settings menu
- [ ] Level explorer
- [ ] Fix some objects not loading
- [x] Fix some objects not loading
- [ ] Image editor

# Credits
- Thanks to [rubice!](https://youtube.com/@rubice2022) for creating the logo. I am not skilled enough to make something that looks that good.
- Thanks to [campbellsonic](https://github.com/campbellsonic) for the script to load `waltex` images. I could not have done it without them.

# Special thanks
- Thanks to AwesomeDragon970#8068 for helping debug the program on MacOS. They are very awesome!
Loading