A small open-source code for any WMW games. This was many pythons can helping you when you were edit XML levels
A simple Python script to shift all AbsoluteLocation values in a given XML file.
python AbsoluteLocationChanger.py "{input_xml}" -o "{output_xml}" -value "{x y}"input_xml: path to XML leveloutput_xml: name of the XML you want to savex y: number you want to plus or minus (0 to do nothing)
A modified script of AbsoluteLocationChanger.py. This script is still shift all AbsoluteLocation values in a given XML file, but it's only change AbsoluteLocation of HS file of Filename.
python AbsoluteLocationChanger2.py "{input_xml}" -o "{output_xml}" -value "{x y}" -hs "{hs_name}, {hs_name_2},..."input_xml: path to XML leveloutput_xml: name of the XML you want to savex y: number you want to plus or minus (0 to do nothing)hs_name, hs_name_2,...: name of the HS file in Filename you want to change only (it'll find the path onvalueafterFilename, you should write correct path ofvalueafterFilename)
PathPointsExtractor is a Python script that extracts simplified path points from black pixel lines (typically 1-pixel wide) in grayscale images − useful for path-based gameplay, navigation systems, or visual logic tools.
- Extracts a path from black pixels in an image (e.g., hand-drawn in MS Paint)
- Simplifies the path using angular thresholds and minimum distance
- Outputs points in a compact comma-separated format for use in game engines or visual editors
python PathPointsExtractor.py input_image.png -o output.txtinput_image.png: A grayscale image with a black path on a white backgroundoutput.txt: The file to save the extracted path points (comma-separated x y pairs)
- The script saves the result as a single line:
x1 y1, x2 y2, x3 y3,... - This code you can paste on XML:
<Property name="PathPoints" value="x1 y1, x2 y2, x3 y3,..."/>- Ensure the path is 1-pixel wide, made with pure black (RGB 0,0,0) on a white background.
- The path should not loop back to the start; closed loops may be ignored.
- Endpoints like
0.0 0.0may appear if the drawing touches image corners − feel free to remove them manually. - Works best on straight or clearly defined paths. Jagged or overlapping lines might produce noisy results.
Make sure to install the required Python libraries:
pip install numpy Pillow scipy scikit-image networkxNow you can use PathPointsExtractor.py to help you create different metal pipe shapes