[XP] RMXPAce -- Using the VX Ace engine in your XP games

Started by KK20, February 17, 2013, 04:38:51 pm

Previous topic - Next topic

KK20

RPG Maker XP Ace
Use the VXA Engine in your XP games!
Originally created by Terv

1. Introduction


In the following I am going to explain to you how to use the engine of VX Ace (RGSS301.dll + Game.exe) in combination with your XP games. A number of benefits include:

  • Faster Language: The new Ruby Version 1.9.2 is about 5 times faster than ancient 1.8.1 and will give your game an enormous performance boost, especially if you're an avid eventer.
  • Hyperliquid rendering: The XP engine is well-known for its stuttering scrolling and the associated screen tearing (graphics being cut). However, after you have seen how beautifully soft and silky smooth your game looks with the new engine, you're never going back.
  • Improved font rendering: The VX and VX Ace engine implemented an improved font rendering which makes your text look more refined and a pleasure to read.
  • Improved Framerate: While XP's standard frame rate is recommended at 40fps, VX Ace defaults to 60fps. Your game has never looked smoother!
  • New VXA Functionalities: If you're a scripter, you now have access to some new methods (check the Help File). Want the game to scale in size with the window (like RM2003)? VXA has your back.


2. Required Files and Licences


Even though you can get all the files freely from the Ace RTP (RGSS301.dll) and any game (Game.exe), you officially need a valid VX Ace Maker licence in order to use them in your own game. A trial licence is in no way inferior to a bought one. You can't tell whether the creator of an XP game using the Ace engine had or has a valid licence or not from looking at it.

You can download the package here. It includes the required scripts, DLL, and Game.exe file.
Version 2.34 *NEW*
Version 2.33
Version 2.32
Version 2.3
Version 2.22
Version 2.1
Version 2.0

PhoenixFire was kind enough to provide a working demo along with a few resources and converted (on-going process!) scripts: Download (note that this is an older project using version 1.5)
Quote from: PhoenixFire on June 22, 2014, 11:56:58 pm
  • I've included RTP resources from the XP RTP, as well as some customized versions of the character battlers, and, som eof the resources in Heretics' Collection of Art and Scripts. You should either switch these out to what you would like, or, give due credit to them
  • If you do end up using this demo as a base for your game, please make sure you give credit where it is due. As of right this second, credit goes to Terv for the conversion kit, and Heretic for some of the resources. If you would like, it would be great to give me credit for assembling it all for you. Also, in time, I will start building some of thee compatible scripts into this demo, and at that point, I would ask to be included in the credits as well. Of course, you are always capable of simply making the kit work for yourself, in which case you owe me no credit whatsoever =p

REGARDING COMMERCIAL USE

XPA Tilemap is protected under Creative Commons - Attribution-NonCommercial-ShareAlike 3.0 Unported. However, This does not mean that you may not use this for commercial purposes. Please contact me, KK20, to establish an agreement. I mainly put this license to keep track of who is using this project and get some recognition for the hundreds of hours I've spent maintaining it.
Don't worry, I'm very fair ;)

3. Step-by-step instructions


  • 3.1 Insert the Engine

Create a new XP project and use this as you're following along. DO NOT USE AN EXISTING PROJECT AND RISK CORRUPTING YOUR GAME.
Copy the game folder files Game.exe and RGSS301.dll from the kit and move them into your game folder.
Copy the folder Fonts into your game folder. Game.exe always checks whether these font files are present if they're not already installed on the system. It's irrelevant whether they are used in your game at all.
Open your Game.ini and notice what is written behind Library=. Rename the RGSS301.dll accordingly to match this (its usually RGSS102E.dll or RGSS104E.dll).
Note to v1.05 (Steam version) users: People reported having issues with the above after saving changes to their game where the DLL file is replaced with original RGSS104.dll file. You will currently need to replace the DLL file every time. Ickh has created a simple executable that will bypass this issue. You can go to this post for more information. :)


  • 3.2 Paste Scripts

The package includes a Script.rxdata file. Replace your project's Script.rxdata in the Data folder.
This file includes all the essential scripts necessary for your game, including missing RPG Modules, an RTP loader, a Tilemap rewrite, a Window class rewrite, and more.

Why a Tilemap rewrite?
The Tilemap class is unalterably compiled in the RGSS DLL and its task is to read map files and build maps as we know them. Since VX and Ace are using a different mapping system--and thus a different Tilemap class--you need a replacement that knows how to deal with your XP maps.

XP Ace Tilemap, written by myself, KK20, is the recommended and supported choice. It was designed specifically for this project unlike other rewrites. It is also the only one receiving updates. You could replace the rewrite with another, provided you are fully aware of what you are doing. Here is a list of others:
Spoiler: ShowHide


Name
WhiteFlute [Recommended]
me(tm) [Recommended]
ForeverZer0 [Recommended]
The King [Recommended]
poccil
SephirothSpawn
RTH
Pros
Extremely stable, rather efficient
Fluid rendering and highly stable, also at higher resolutions
Great performance, especially at higher resolutions
Very liquid rendering, many additional features
Decent for small and mid-size maps
Absolutely fluid and stable rendering
Okay for small maps
Cons
May require small edits to Tilesets and scripts
Incompatible with smooth scrolling scripts
Occasional display bugs
High RAM consumption, possibly long map loading times
Micro stutters on large maps
Requires SDK Part I+II and parts of MACL Complete, Bugs
Heavy stutters on large maps


*If you're using Sephiroth's rewrite please note that SDK and MACL have to be above the tilemap script.



  • 3.3 Optional: Encrypt Project


Download the VX Ace trial and install it. Create a new project, delete all files in your new Ace project folder without closing the maker, then paste all XP game files into the Ace game folder. Now select File -> Compress Game Data... -> (Create Encrypted Archive) OK. An self-extracting archive will then be created, containing a .rgss3a file instead of Data and Graphics folders.
Keep in mind that the rgss3a encryption has been cracked and released 5th of June 2012.

As an alternative, you can package your game as a single executable using Engima Virtual Box, as explained here: Single Executable for RPG Maker.
Note that this is a generally poor solution to use if going commercial. You should look into a custom encryption implementation instead.


4. Credits


KK20 - Taking ownership of the project and providing numerous script support
Blizzard, LiTTleDRAgo - Scripting and bug fixing support
Dargor - XP->VX tutorial at hbgames.org
PhoenixFire - Demo project and converted scripts
Terv - For the original topic

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Blizzard

This is pretty awesome. :D I might actually release an update for CP that will use VXA's engine if it's this simple. Which one of the 3 recommended tilemap rewrites are you using?
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.

Terv

I currently recommend MeTMs rewrite as it's still the most stable and compatible. However I am running ForeverZer0's because it's the only one that can provide fully fluid scrolling on very large maps as well as support for smooth scrolling scripts (the latter one leads to awkward graphical glitches with Me's rewrite).
The King, a skilled German scripter, is improving and adopting his rewrite to RGSS3 right now so this one will be probably the best choice any time soon :)
His instructions aren't translated yet, will do that in the next few hours.

A couple of your scripts will probably not work due to slight changes in Ruby 1.9 or RGSS3. We have started a small fix-database in the German forums which got already ported to a simple international bugtracker where everyone can contribute. I will open registrations as soon as the topics over at hbgames.org and rpgmakerweb.com are done.

bigace



When I start working on my game again in the summer, I'll might be using this especially if it makes XP look amazing.


Use Dropbox to upload your files. Much simpler than other upload sites, you can simply place a folder on your desktop that will sync with your DropBox account.

KK20

^ Why must you resort to murder when it's free D':

I should try this out :D
*insert obligatory "Advance Wars Engine" sentence here*

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Terv

Quoteespecially if it makes XP look amazing.
Hella yeah it does, it gives them that certain something you have always felt when playing VX/Ace games but not when testing your own game :up:
On a side note I have finished translating King's script. It's in the kit 1.5.

LiTTleDRAgo

there are MGC_HMode7.dll in the kit, does it mean it's compatible with H-Mode7?
O_o

MOAL

Uh, I'm likely very stupid. But, I did this and I got this error:
Spoiler: ShowHide
Help please?  :wacko:

Edit: Whoops! I forgot that the RPG Module is supposed to be above Game_Temp. It works fine now. Awesome :haha: But if I put it over everything, I get a superclass mismatch error for all of the scripts, and if I just put it above every non-default script, I just get that error above in the spoiler.

Terv

Quote from: LiTTleDRAgo on February 18, 2013, 09:41:14 am
there are MGC_HMode7.dll in the kit, does it mean it's compatible with H-Mode7?
O_o

Yup, that's a RGSS3 fixed H-Mode7 dll.

Quote from: MOAL on February 18, 2013, 10:20:27 amIt works fine now. Awesome :haha: But if I put it over everything, I get a superclass mismatch error for all of the scripts, and if I just put it above every non-default script, I just get that error above in the spoiler.

The RPG module has to be the first script in the editor. superclass mismatch errors are well-known already, also see here. There are workarounds but I hope some scripter suggests a general way to fix it soon (recompiling Ruby isn't really an option :P)

Blizzard

I'm actually surprised the Enterbrain left that feature in Ruby 1.9.x.
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

Awesome, too bad I can't use it because RMX-OS isn't working with rgss3..

Terv

Quote from: khkramer on February 18, 2013, 12:22:56 pm
Awesome, too bad I can't use it because RMX-OS isn't working with rgss3..


You can use almost all XP scripts in combination with the Ace engine, however some stuff will cause errors and you need the time and knowledge to fix it. Usually 1 script out of 15 will make you hit on problems but more often than not it's just knickknack and often can be patched with basic Ruby knowledge only. For every more obstinate error there's the bugtracker that will go online today and hopefully have copy-paste ready fixes for the most popular scripts soon.

There are few special scripts that just don't work (e.g. Dynamic Footprints), this is mostly due to them being closely intertwined with certain standard hidden XP classes (like Tilemap).

Edit: Aluxes loves Eric is online, check the startpost :haha:

diagostimo

 8-O that is amazing! the speed up is amazing, in comparison you can see how much better ruby 1.9 is from 1.8, I think I may use this when developing in xp from now on :D

edit:
@khkramer i got rmxos to work by merging both main methods:

#==============================================================================
# ** Main
#------------------------------------------------------------------------------
#  Runs the entire system.
#==============================================================================

ERROR_LOG_FILE = 'Error.log' # leave empty for no log

def mod_error(error)
  # load scripts
  scripts = load_data('Data/Scripts.rxdata')
  bt = error.backtrace.clone
  # change backtrace display to show script names
  bt.each_index {|i| bt[i] = bt[i].sub(/\ASection(\d+)/) {scripts[$1.to_i][1]} + "\n"}
  # new error message
  message = error.message + "\n" + bt.join('')
  # write to file if file defined
  if ERROR_LOG_FILE != ''
    File.open(ERROR_LOG_FILE, 'a') {|f| f.write("#{Time.now.to_s}:\n#{message}\n")}
  end
  return message
end

begin
  rgss_main {
  $DEBUG = $TEST = true # Remove this when your project is finished.
  # loading game data
  $data_actors        = load_data('Data/Actors.rxdata')
  $data_classes       = load_data('Data/Classes.rxdata')
  $data_skills        = load_data('Data/Skills.rxdata')
  $data_items         = load_data('Data/Items.rxdata')
  $data_weapons       = load_data('Data/Weapons.rxdata')
  $data_armors        = load_data('Data/Armors.rxdata')
  $data_enemies       = load_data('Data/Enemies.rxdata')
  $data_troops        = load_data('Data/Troops.rxdata')
  $data_states        = load_data('Data/States.rxdata')
  $data_animations    = load_data('Data/Animations.rxdata')
  $data_tilesets      = load_data('Data/Tilesets.rxdata')
  $data_common_events = load_data('Data/CommonEvents.rxdata')
  $data_system        = load_data('Data/System.rxdata')
  Graphics.resize_screen(640, 480) # Resizes the screen.
  # prepare for transition
  Graphics.freeze
  # activate the network
  $network = RMXOS::Network.new
  # active connection scene
  $scene = Scene_Servers.new
  # call main for active scene
  $scene.main while $scene != nil
  # disconnection
  $network.disconnect
  # fade out
  Graphics.transition(20)
  Graphics.update
  }
rescue SyntaxError
  $!.message.sub!($!.message, mod_error($!))
  raise
rescue
  $!.message.sub!($!.message, mod_error($!))
  raise
ensure
  # disconnection
  $network.disconnect
end

the only problem is I cant seem to connect when it is hosted over my router, ie at an ip adress, but if I use 'localhost' I can connect, pretty weird as I am using the same configuration I would connect with normal xp and it works fine with the normal version, maybe someone here knows what could be up with that? ill try and figure it out in the meantime

khkramer

Yeah it was working for me too, but I had the same problem as you.
Can't see the server online even when I use localhost.

diagostimo

Quote from: khkramer on February 19, 2013, 04:24:43 am
Yeah it was working for me too, but I had the same problem as you.
Can't see the server online even when I use localhost.

thats strange, iv have tried looking into it but cant figure out what could be the problem, when you change the script inside rpgmaker xp you will have to make sure you save the data, either by test running  or file and save project, the only problem with that you will have to reset the dll name in the ini as when rpgmakerxp saves data it resets the library path to its default, try that and it should work, but as for hosting it over a set ip im pretty stuck, also you could try the ip 127.0.0.1 as that is the same as localhost

Terv

As for the 'RMXP overwrites Game.ini when saving', just rename RGSS301.dll to RGSS102E.dll/RGSS104E.dll as stated in the tutorial.
Did you try to connect via LAN to your server (192.168.x.x or 10.x.x.x or 172.x.x.x) already or WAN/global IP only?

khkramer


Moshan

 So...you need new compatible scripts to use this engine...right?
Also, I don't know if it's because of me but everytime when I modify any script I must rename RGSS102E.dll in my Game.ini . Is it normal or I've done something wrong?

Terv

Quote from: adytza001 on February 20, 2013, 04:40:37 pmSo...you need new compatible scripts to use this engine...right?


No. Almost all RGSS1 standard scripts remain unchanged and that's why most of your old (XP) custom scripts will work right away. However about 1 out of 15 will throw up errors due to incompatibilities caused by either the change to Ruby 1.9 or RGSS3's hidden classes. These errors are usually rather easy to fix. Often it's just one or two lines.
This backward compatibility is also the reason you still can't use scripts made for RGSS3/Ace.

QuoteAlso, I don't know if it's because of me but everytime when I modify any script I must rename RGSS102E.dll in my Game.ini . Is it normal or I've done something wrong?


See the respective paragraph in the tutorial:

QuoteOpen your Game.ini and see what is written behind Library=. Rename RGSS301.dll accordingly (in most cases RGSS102E.dll).


So if you're using RMXP v1.02a (most English versions), rename RGSS301.dll to RGSS102E.dll. Game.ini is overwritten every time you save your game, that's why you should rename your dll instead.

Moshan