RMXP Project Converter

Started by Ryex, May 12, 2012, 08:07:46 pm

Previous topic - Next topic

Ryex

May 12, 2012, 08:07:46 pm Last Edit: May 13, 2012, 10:01:31 pm by Ryex
RMXP Project Converter




This is a applet I built for in house testing but if people wish they can use it to do some early beta testing with the ARC engine and their own projects.



To Use:

to Run your own project under ARC follow these steps:

1) Get the current development build: http://forum.chaos-project.com/index.php/topic,9058.0.html

2) download the Project converter here: RMXP Project Converter

3) ensure that your RMXP project does not load mp3 or MIDI files and that all resources used are in the project directories "Graphics" and "Audio" folders

4) Run the converter and point it to your existing project file and a new location to save the ARC version of your project, check the box to copy Graphic and Audio content

4) Click "Run Converter" and let it do it's job. if there are any errors in the converter log please report them here.

5) from the current development build copy all the .dll and .exe files as well as the "Microsoft.VC90.CRT" folder into your project folder.

6) you are now ready to run the "Game.exe"

you can open the arc.cfg file in a notepad or other text editor to change the displayed named of the game as well as other settings like resolution ect.


if you have further problems post here and I'll try to help you out.
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Lobstrosity

I followed all of the steps. But whenever I open Game.exe, a window for the game opens, then closes again after a second.  :???:
Don't come any closer. I'm armed... with SCIENCE!

Ryex

you should probably make sure that your game isn't trying to play mp3's or MIDI files. MIDI support hasn't been implemented just yet. that's the only think I can think of that would crash the game like that.
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

G_G

May 12, 2012, 10:26:58 pm #3 Last Edit: May 12, 2012, 10:34:07 pm by game_guy
I tried it and it's failed numerous times.

Converted project and copied over the current ARC engine. Game window opens and closes.
Took fresh development build and replaced scripts only. Game window opens and closes.
Took fresh development build and replaced data only. Game window opens and closes.

I dunno what else to try.

EDIT: Though it might be because its trying to load graphics from the "Graphics" folder but are located in the RTP. I'll explore a bit more.

EDIT 2: After copying over all RTP graphics, it still does the same thing. Crashes when Data and Scripts are both replaced. Crashes when one or the other are only replaced. My only guess would be that the converter isn't converting the data right, which wouldn't make sense as to why it crashes when only the scripts get replaced.

EDIT 3: Alright, I managed to get it to run after only replacing the data, I must have been deleting something I wasn't supposed to be. But I still can't get it to run after replacing the scripts.

Blizzard

May 13, 2012, 02:25:07 am #4 Last Edit: May 13, 2012, 04:46:30 am by Blizzard
I tried it as well and I'm having the same problem.

1. I converted a project.
2. I added Data/System.rb and Data/RMXP.rb
3. I added the RTP graphics.
4. I added all binaries (Microsoft.VC90.CRT, *.dll, Game.exe) and arc.cfg

It still crashes without any specific error message.

Quote from: log[atres] initializing atresttf
[atres] Error: Could not read face 0 in Graphics/Fonts/arial_1.ttf1
[atres] registering font resource Arial
[atres] Error: Could not read face 0 in Graphics/Fonts/ariblk.ttf1
[atres] registering font resource Arial Black
[xal] initializing XAL
[xal] initializing DirectSound
[xal] audio system created: DirectSound
[xal] starting thread management
[zer0] initializing Zer0 Division Engine
[xal] loading file Audio/SE/001-System01.ogg
[zer0] destroying Zer0 Division Engine
[xal] destroying XAL
[xal] destroying DirectSound
[xal] stopping thread management
[atres] destroying atresttf


EDIT: Here we go. Ryex, you have to edit the project converter to handle some changes in the scripts. The first thing is that the data files now have the .arc extension and save files have the .dat extension. The second thing is that load_data still loads Marshal files while .arc files are loaded through "ARC::Data.load". Now, my suggestion is that we strictly convert only unaltered RMXP default scripts. Other scripts may still use .rxdata and Marshal files and they should be adjusted to work with ARC properly. Here's a list of codes that should be changed:

"Save#{@file_index + 1}.rxdata"
"Save#{i+1}.rxdata"
"Save#{file_index + 1}.rxdata"
load_data(sprintf("Data/Map%03d.rxdata"
load_data("Data/Actors.rxdata")
load_data("Data/Classes.rxdata")
load_data("Data/Skills.rxdata")
load_data("Data/Items.rxdata")
load_data("Data/Weapons.rxdata")
load_data("Data/Armors.rxdata")
load_data("Data/Enemies.rxdata")
load_data("Data/Troops.rxdata")
load_data("Data/States.rxdata")
load_data("Data/Animations.rxdata")
load_data("Data/Tilesets.rxdata")
load_data("Data/CommonEvents.rxdata")
load_data("Data/System.rxdata")
load_data("Data/BT_Actors.rxdata")
load_data("Data/BT_Classes.rxdata")
load_data("Data/BT_Skills.rxdata")
load_data("Data/BT_Items.rxdata")
load_data("Data/BT_Weapons.rxdata")
load_data("Data/BT_Armors.rxdata")
load_data("Data/BT_Enemies.rxdata")
load_data("Data/BT_Troops.rxdata")
load_data("Data/BT_States.rxdata")
load_data("Data/BT_Animations.rxdata")
load_data("Data/BT_Tilesets.rxdata")
load_data("Data/BT_CommonEvents.rxdata")
load_data("Data/BT_System.rxdata")


"Save#{@file_index + 1}.dat"
"Save#{i+1}.dat"
"Save#{file_index + 1}.dat"
ARC::Data::load(sprintf("Data/Map%03d.arc"
ARC::Data::load("Data/Actors.arc")
ARC::Data::load("Data/Classes.arc")
ARC::Data::load("Data/Skills.arc")
ARC::Data::load("Data/Items.arc")
ARC::Data::load("Data/Weapons.arc")
ARC::Data::load("Data/Armors.arc")
ARC::Data::load("Data/Enemies.arc")
ARC::Data::load("Data/Troops.arc")
ARC::Data::load("Data/States.arc")
ARC::Data::load("Data/Animations.arc")
ARC::Data::load("Data/Tilesets.arc")
ARC::Data::load("Data/CommonEvents.arc")
ARC::Data::load("Data/System.arc")
ARC::Data::load("Data/BT_Actors.arc")
ARC::Data::load("Data/BT_Classes.arc")
ARC::Data::load("Data/BT_Skills.arc")
ARC::Data::load("Data/BT_Items.arc")
ARC::Data::load("Data/BT_Weapons.arc")
ARC::Data::load("Data/BT_Armors.arc")
ARC::Data::load("Data/BT_Enemies.arc")
ARC::Data::load("Data/BT_Troops.arc")
ARC::Data::load("Data/BT_States.arc")
ARC::Data::load("Data/BT_Animations.arc")
ARC::Data::load("Data/BT_Tilesets.arc")
ARC::Data::load("Data/BT_CommonEvents.arc")
ARC::Data::load("Data/BT_System.arc")


These replacements will fix the default scripts and any scripts that are using the same piece of code to load the default data.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Ryex

*facepalm* of course. Simple fix I suppose. I suppose I can also make it add the .rb files to the data directory too
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Blizzard

Yeah, I'm sure that many people would appreciate that. You can update it later to include the binaries as well and generate a arc.cfg file from Game.ini.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Ryex

Ok, I've updated the converter, it should now fix scripts and adds the RMXP.rb System.rb and arc.cfg file on it's own so all you have to copy is the exe and dll files.

Updated the instructions in the first post.
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

G_G

Success!

>Converted Project
>Copied binraries and libraries
>Copied RTP graphics
>Exploded in pants as it ran

Ryex

May 14, 2012, 12:02:17 am #9 Last Edit: May 14, 2012, 12:07:30 am by Ryex
wonderful news.

interesting note. the code base for this simplistic converter is comparable in size and complexity to my AnTBS RMXP battle system. why I bothered to compare the two I'll never know.
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Blizzard

May 14, 2012, 02:29:22 am #10 Last Edit: May 14, 2012, 03:37:05 pm by Blizzard
Probably because of the .arc format writer/reader written in Ruby.

EDIT: You should add this one, too.

load_data("Data/MapInfos.rxdata")


ARC::Data::load("Data/MapInfos.arc")


While we should avoid converting non-default scripts, I think this is a pretty safe like to convert and it should help several scripts to work without problems.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Memor-X

just making sure, Chrome, after it downloaded the converter says it appears malicious, that's incorrect right.....like how Virus Scans seems to says the mod loader for Terraria is a trojan

Blizzard

Yes, that's incorrect. It's probably just complaining because it was written in Ruby and then compiled together into an .exe.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

khkramer

Ok so I converted my game (Pokémon Nox Online) and I'm running into a few errors I can't seem to fix on my own.
One error I'm getting is with the RMX-OS input module:

Undefined method '&' for "\u0000":String 

Blizzard

Update RMX-OS. The bug has been fixed in v1.2x.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

khkramer

Do I have to update everything or just the input module, cause I have made some modifications to some parts?

Blizzard

You will have to update everything. v1.2 and v1.21 have some additional edits that are important for overall stability. You should add edits always in new script slots, never edit the actual original script because it (obviously) causes major problems when you want to update.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Ryex

Converter has been updated, UTF* charters in script names will no longer crash the conversion
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

khkramer

Blizzard, I hate to keep bothering you but:

I updated RMX-OS to 1.21 but the error keeps ocurring.
I should note that my edits are in separate scripts and have the following modifications:

Selection screens etc. are now using Window_CommandPokemon instead of Window_Command.
Window_Selectable to SpriteWindow_Selectable
Window_Item to SpriteWindow_Selectable
Window_Help to Window_UnformattedTextPokemon
Window_Button to Window_CommandPokemon

Blizzard

Ok, at first I am totally confused why you are posting this in the thread about the converter of RMXP projects to ARC projects.
Secondly, that error was reported not long ago and I have fixed it as I recall.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.