carlsonsantana / convert_rpggame_to_android Goto Github PK
View Code? Open in Web Editor NEWConvert a RPG Maker 2000 or RPG Maker 2003 in a Android game using EasyRPG.
Convert a RPG Maker 2000 or RPG Maker 2003 in a Android game using EasyRPG.
There will be soon a better standalone mode for EasyRPG Player.
The changes are minimal:
Instead of assets/game
the game folder must be a zip archive with Deflate compression called assets/game.zip
. I wanted to support both but the APK API does not report directory when listing directory content, so is unusable for us.
The ZIP can have one of two structures:
/RPG_RT.ldb
, /Map0001.lmu
, etc.TestGame/RPG_RT.ldb
, TestGame/Map0001.lmu
The second case will only work when there is nothing else except the folder in the ZIP root.
Hi, conversion script not work with new release of EasyRPG based on gradle. You should kindly fix it?
Based on the documentation here https://developer.android.com/studio/build/application-id.html it would be enough to replace the applicationId
in build.gradle
with the new APK name and keep the one in the XML untouched.
Gradle does some magic and ensures that after compiling (to ensure ".R"-stuff works) the XML package name is replaced.
So in the end most of the sed
and mv
stuff is unnecessary and makes it hard to update to recent Player versions.
Here is the simplified script. When I run the script and compile a APK it is still correctly reported as "com.your.game" and works on Android.
#!/bin/bash
set -e
# Standalone game variables
GAME_FOLDER=$(pwd)/your_game
GAME_APK_NAME=com.your.game
GAME_NAME='Your game'
[email protected]
GAME_SITE='http://example.com/'
GAME_VERSION_CODE=100
GAME_VERSION_NAME=1.0.0
GAME_METADATA=$(pwd)/metadata
GAME_ICON_PATH=$GAME_METADATA/en-US/images/icon.png
GAME_ICON_PROMOGRAPHIC=$GAME_METADATA/en-US/images/promoGraphic.png
EASYRPG_PLAYER_FOLDER=$(pwd)/Player
##############################
ANDROID_FOLDER=$EASYRPG_PLAYER_FOLDER/builds/android
cd $EASYRPG_PLAYER_FOLDER
# Ignore game folder on commit
sed -i ':a;N;$!ba;s|\n\n# Game folder||g' .gitignore
sed -i ':a;N;$!ba;s|\n/builds/android/app/src/main/assets/||g' .gitignore
echo "" >> .gitignore
echo "# Game folder" >> .gitignore
echo "/builds/android/app/src/main/assets/" >> .gitignore
cd builds/android/app/src/main
# Copy game
rm -fr assets/game
cp -r $GAME_FOLDER assets/game
# Change APK name
sed -i "s|org\.easyrpg\.player|$GAME_APK_NAME|g" $ANDROID_FOLDER/app/build.gradle
# Change game name
sed -i "s|EasyRPG Player|$GAME_NAME|g" res/values/strings.xml
# Change game email
sed -i "s|easyrpg@easyrpg\.org|$GAME_BUG_REPORT_EMAIL|g" java/org/easyrpg/player/player/EasyRpgPlayerActivity.java
# Change game site
sed -i "s|https://easyrpg\.org/|$GAME_SITE|g" res/layout/browser_nav_header.xml
# Change version code
sed -i 's/android\:versionCode="[0-9]\+"/android:versionCode="'$GAME_VERSION_CODE'"/g' AndroidManifest.xml
# Change version name
sed -i 's/android\:versionName="[0-9A-Za-z\-\.]\+"/android:versionName="'$GAME_VERSION_NAME'"/g' AndroidManifest.xml
# Convert icon to HDPI: 72x72
convert $GAME_ICON_PATH -resize 72x72 res/drawable-hdpi/ic_launcher.png
# Convert icon to MDPI: 48x48
convert $GAME_ICON_PATH -resize 48x48 res/drawable-mdpi/ic_launcher.png
# Convert icon to XHDPI: 96x96
convert $GAME_ICON_PATH -resize 96x96 res/drawable-xhdpi/ic_launcher.png
# Convert icon to XXHPDI: 144x144
convert $GAME_ICON_PATH -resize 144x144 res/drawable-xxhdpi/ic_launcher.png
# Convert icon to XXXHDPI: 192x192
convert $GAME_ICON_PATH -resize 192x192 res/drawable-xxxhdpi/ic_launcher.png
# Convert icon to promoGraphic.png: 180x120
convert $GAME_ICON_PATH -resize 120x120 $GAME_ICON_PROMOGRAPHIC
convert $GAME_ICON_PROMOGRAPHIC -resize 180x120 -size 180x120 xc:none +swap -gravity center -composite $GAME_ICON_PROMOGRAPHIC
# Change metadata
rm -r $ANDROID_FOLDER/metadata
cp -r $GAME_METADATA $ANDROID_FOLDER/metadata
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.