Jump to content


Photo
* * * * * 7 votes

Using the VX Ace engine in your XP games - the kiss tutorial!

xp tutorial vx ace rgss1 rgss rgss3 engine exe dll

  • Please log in to reply
63 replies to this topic

#1 Terv

Terv

    Advanced Member

  • Members
  • 36 posts
  • Primarily UsesN/A

Posted 17 February 2013 - 06:34 PM

head.png

How to use the VX Ace engine in your XP games
in no more than 10 minutes - keep it simple, stupid!


de-icon.png Auf theutsch bitte

1. Introduction

In the following I am going to explain you how to use the engine of VX Ace (RGSS301.dll + Game.exe) in combination with your XP games which I fully entrust to everybody, for several reasons:
  • Lag no more: 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 tearing (graphics being cut). The image is lacking in calm, particularly in window mode. However after you have seen how beautifully soft and silky smooth your game looks with the new engine you're not going to want to miss it anymore.
  • Improved font rendering: The VX and VX Ace engine implemented an improved font rendering which makes your character more refined and a pleasure to read.
  • 60-120fps: While XP's standard frame rate is at a punny 40fps you can set the frame rate in Ace's engine up to 120fps with a single script call.
  • Up to 1024x768 in fullscreen: in combination with a suitable script you can easily more than double your resolution from 640x480 to 1024x768 - in fullscreen too.
2. Required Files and Licences

Even though you can get all the files either from the Ace RTP (dll) or any 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.

For convenience reasons all for this tutorial required files and scripts are contained in my pack.png XP Ace Upgrade Kit.


3. Step-by-step instructions
  • 3.1 Remove RTP dependency
Copy all used ressources from the XP RTP into your game folder. The RTP is usually located at C:\Program Files (x86)\Common Files\Enterbrain\RGSS\Standard or C:\Program Files\Common Files\Enterbrain\RGSS\Standard.
  • 3.2 Insert the Engine
Copy Game folder files\Game.exe and RGSS301.dll from the kit into your game folder.
Copy the folder Fonts into your game folder. Game.exe always checks whether these font files are present there if they're not already installed on the system. It's irrelevant whether they are used in your game at all.
RMXP version 1.02 or 1.04: Open your Game.ini and see what is written behind Library=. Rename the file RGSS301.dll accordingly (in most cases to RGSS102E.dll).
RMXP version 1.05: Refer to the solution of this report.
  • 3.3 Paste Scripts
Paste Scripts\RPG Module.txt above all other scripts in your project.
Paste Window Padding Fix.txt above Main.
Replace Main with Main.txt.
Optional: If you're using print in your game, paste Print.txt above Main.

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.

At the moment there are 6 alternatives (=rewrites) in Ruby and 1 in C++ (WhiteFlute):
Pros | Cons
  • WhiteFlute [Recommended]: Extremely stable, rather efficient | May require small edits to Tilesets and scripts
  • me™ [Recommended]: Fluid rendering and highly stable, also at higher resolutions | Incompatible with smooth scrolling scripts
  • ForeverZer0 [Recommended]: Great performance, especially at higher resolutions | Occasional display bugs
  • The King [Recommended]: Very liquid rendering, many additional features | High RAM consumption, possibly long map loading times
  • poccil: Decent for small and mid-size maps | Micro stutters on large maps
  • SephirothSpawn: Absolutely fluid and stable rendering | Requires SDK Part I+II and parts of MACL Complete, Bugs
  • RTH: Okay for small maps | Heavy stutters on large maps
Paste the script of your choice below the standard scripts and above your own scripts. If you're using Sephiroth's rewrite please note that SDK and MACL have to be above the tilemap script.
  • 3.4 Adopt Windowskin
Either edit your windowskin so that the elements match those on an Ace windowskin or use Scripts\Windowskin Converter\Windowskin Converter.txt.
  • 3.5 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.


4. Bag of tricks
  • In order to use a resolution beyond 640x480 use Game folder files\(optional)\RGSS300.dll and a script supporting custom resolutions (e.g. me™'s or ForeverZer0's rewrite). Furthermore change Graphics.resize_screen(640, 480) in Main accordingly.
  • To slow down in-game graphics to XP speed again use the script call Graphics.frame_rate = 40. This also decreases CPU load en passant. You can set the wanted fps to anything between 10 and 120.
  • All differences between RGSS v3 and v1 can be listed in the page.png VX and page.png Ace help file by searching for (RGSS2) respectively (RGSS3).
5. Credits

Dargor - XP->VX tutorial
ForeverZer0, LiTTleDRAgo, me™, PK8, poccil, RTH, SephirothSpawn, The King, WHITE-FLUTE - scripts in the kit
Terv - everything else


6. Appendix: Error messages, known incompatibilities & solutions

It's quite likely that the first thing you will see from your tuned XP game is a mysterious error caused by a script that used to never make any trouble. In most cases it's just a small thing and can be easily fixed in minutes. However if you know as much about Ruby as the man in the moon, or encounter a more persistent error, there's a dedicated bugtracker now! Presenting you


logo.png
www.Aluxes❤Eric.tk


I hope you liked my petty tutorial. Feel free to ask if you got questions or correct me when something is phrased cloudy :)
 

88x31.png
How to use the VX Ace engine in your XP games by Terv is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.


Edited by Terv, 30 December 2013 - 01:04 AM.

  • Sailerius, ShinGamix, Acezon and 2 others like this

logo.png


#2 Jens of Zanicuud

Jens of Zanicuud

    "A rose, a rose... my sanity for a rose!"

  • Members
  • 8 posts
  • LocationSomewhere Out in Space
  • Primarily UsesRMXP
  • First LanguageItalian

Posted 18 February 2013 - 04:32 PM

I was actually trying to use VX engine on RMXP and I succeeded in making everything compatible but the Tilemap, so this comes like an unexpected thunderbolt...

It looks like you actually succeeded in doing what I was to do ;)

 

Very nice tutorial and idea, this is surely amazing.

Using RMXP's Maps Editor combined with RGSS3 could really help creating amazing things.

 

Jens


"Genius? Madness? Just two sides of the same medal!"

- Anonymous

 

 

Games I'm working on:
>gallery_109304_556_16823.png
official website: TryAdIne eFfeCt
 
Games I worked on (mainly as a scripter):
>gallery_109304_556_15260.png
(Warning: it's a 3rr3's project and it's in Italian!)

#3 Terv

Terv

    Advanced Member

  • Members
  • 36 posts
  • Primarily UsesN/A

Posted 18 February 2013 - 06:46 PM

XP/RGSS3 bugtracker is up and running, feel free to post there if you have problems, or already solved them and want to tell us how you did it :D


Edited by Terv, 19 February 2013 - 11:14 AM.

logo.png


#4 Jens of Zanicuud

Jens of Zanicuud

    "A rose, a rose... my sanity for a rose!"

  • Members
  • 8 posts
  • LocationSomewhere Out in Space
  • Primarily UsesRMXP
  • First LanguageItalian

Posted 19 February 2013 - 03:17 AM

Just a question... in practice, you haven't replaces RGSS scripts with RGSS3, but you ported VACE player on RMXP?

 

In case this isn't true, how have you managed to configure RMXP database to be compatible with RGSS3?

 

For VX to XP conversion, I had to manually add functions like the dual weapon option and to translate each instance of the database into a new form which could be read by the new script set. VXACE comes with a lot of new features which can't be translated in a simple and useable manner...

 

That's different from what I thought before, but it's still a great idea ;)

Mine was different: I worked on a RMXP project in order to use RMVX scripts on it... and I almost succeeded in doing that.

 

I'll keep on following this topic, it looks interesting.

 

Jens


"Genius? Madness? Just two sides of the same medal!"

- Anonymous

 

 

Games I'm working on:
>gallery_109304_556_16823.png
official website: TryAdIne eFfeCt
 
Games I worked on (mainly as a scripter):
>gallery_109304_556_15260.png
(Warning: it's a 3rr3's project and it's in Italian!)

#5 Terv

Terv

    Advanced Member

  • Members
  • 36 posts
  • Primarily UsesN/A

Posted 19 February 2013 - 10:22 AM

Just a question... in practice, you haven't replaces RGSS scripts with RGSS3, but you ported VACE player on RMXP?
In case this isn't true, how have you managed to configure RMXP database to be compatible with RGSS3?


This is not about using RGSS3 with XP maps (it would also break RGSS1 script compatibility), it's about implementing the new ruby version as well as other improvements (rendering etc.). Database files are read by the RGSS1 standard scripts which remain untouched. That's why this tutorial can be done in a couple minutes and that's why you cannot use RGSS3 scripts (but still use all your old RGSS1 ones).

Trying to combine the Ace engine, RGSS3 scripts/databases and XP maps will probably result in a horrible workflow as you'd need to use two makers simultaneously. And still being able to benefit from all the great XP scripts is a huge advantage. There's no point in willingly doing without them.
 


Edited by Terv, 20 February 2013 - 03:03 PM.

logo.png


#6 Allerka

Allerka

    Advanced Member

  • Member+
  • 183 posts
  • Primarily UsesRMXP
  • First LanguageEnglish

Posted 06 March 2013 - 02:46 PM

I want your babies. No, seriously. This is awesome and amazing and I love you for it.

 

Already run into a couple bugs, though, which I've posted to the tracker. Hopefully they can be ironed out quickly. I'm quite excited by this!



#7 Terv

Terv

    Advanced Member

  • Members
  • 36 posts
  • Primarily UsesN/A

Posted 06 March 2013 - 05:28 PM

I have posted answers for both your reports, check them out :)


logo.png


#8 Allerka

Allerka

    Advanced Member

  • Member+
  • 183 posts
  • Primarily UsesRMXP
  • First LanguageEnglish

Posted 06 March 2013 - 05:42 PM

Awesome! Looks like the game.ini issue is fixed, but the SDK is still plaguing me. Methinks I need to work on dumping that whole thing. It's been handy for some parts, but others have been nothing but headaches.



#9 Sailerius

Sailerius

    Engineer

  • Members
  • 345 posts
  • Primarily UsesRMXP
  • First LanguageEnglish

Posted 15 March 2013 - 03:29 PM

This is fantastic. Very well-presented. So, just to clarify, our custom RGSS1 scripts still work fine?


Edited by Sailerius, 15 March 2013 - 03:29 PM.


#10 Terv

Terv

    Advanced Member

  • Members
  • 36 posts
  • Primarily UsesN/A

Posted 16 March 2013 - 03:45 AM

Yep, most of your RGSS1 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. For every more obstinate error there's the bugtracker.


logo.png


#11 Allerka

Allerka

    Advanced Member

  • Member+
  • 183 posts
  • Primarily UsesRMXP
  • First LanguageEnglish

Posted 17 March 2013 - 03:14 PM

So, I've noticed you CAN set your resolution higher, however altering the numbers in the relevant scripts (I'm using the one by me™) doesn't seem to have any actual effect on the game. Am I missing something?



#12 Terv

Terv

    Advanced Member

  • Members
  • 36 posts
  • Primarily UsesN/A

Posted 17 March 2013 - 05:08 PM

What resolution are you trying to use? Is the window itself getting resized, but the map not extended?

Did you replace your dll with the one from Game folder files/(Optional)? Did you also change both the resolution in the tilemap rewrite and Main?


Edited by Terv, 17 March 2013 - 05:11 PM.

logo.png


#13 Allerka

Allerka

    Advanced Member

  • Member+
  • 183 posts
  • Primarily UsesRMXP
  • First LanguageEnglish

Posted 17 March 2013 - 06:03 PM

I tried bumping it up to 1024 x 768. The window and map are the same size as if I have it set for 640 x 480. I replaced the DLL with RGSS300.dll. I changed the resolution in both the tilemap rewrite on both lines and Main.



#14 TMS

TMS

    Advanced Member

  • Member+
  • 173 posts
  • LocationOhio
  • Primarily UsesN/A
  • First LanguageEnglish

Posted 17 March 2013 - 11:42 PM

I know nothing about programming, but I wanted to know if I could make use of this. Is it basically just a way to get games made with XP to run better, or is there more? Like, can I use types of events that were introduced in VX but were absent from XP (assuming there are any)?



#15 Terv

Terv

    Advanced Member

  • Members
  • 36 posts
  • Primarily UsesN/A

Posted 18 March 2013 - 03:02 AM

@Allerka: Now that's really wierd, could you please check if it doesn't work for you in the project template neither? Maybe it's related to your other custom scripts or PC setup, but that's unlikely.

 

I know nothing about programming, but I wanted to know if I could make use of this. Is it basically just a way to get games made with XP to run better, or is there more?

You probably won't need any specific scripting knowledge yourself.

The biggest advantage of this is the poweful and improved new engine which makes games look and run better. Besides that there are some nice Ace features available, e.g. fullscreen video playback without having to install anything beforehand.

However it doesn't bring you features that are included either in Ace's editor (database, autotile features, whatever) or in the base RGSS3 scripts you can edit. It's just a quick way to brush up your game.

 

Best give it a try for your own one, it's easy and can be done in minutes.


Edited by Terv, 18 March 2013 - 03:07 AM.

logo.png


#16 ShinGamix

ShinGamix

    DS Style 4Ever!

  • Members
  • 2,041 posts
  • LocationAlien Ship
  • Primarily UsesRMVX Ace
  • First LanguageApril Fools

Posted 18 March 2013 - 09:57 AM

I was wondering if you can still open the game in the xp editor once you do this to the project?


Read The Topic of Battle Dungeons!!

sg_bar10.png

coollo23.pngcoollo24.png

 

Spoiler

#17 Allerka

Allerka

    Advanced Member

  • Member+
  • 183 posts
  • Primarily UsesRMXP
  • First LanguageEnglish

Posted 18 March 2013 - 10:32 AM

Yep, that all still works fine!

 

 

 

@Terv: Well, I feel dumb. I actually DIDN'T give it the proper DLL. I fixed that, and now the window is resizing itself and everything. However, it's only filling part of the window, ala:

 

Attached File  resolution error.png   226.87KB   33 downloads

 

In the tilemap processor, the relevant lines regarding window size have been edited to read:

 

 WindowRect = Rect.new(0,0,1024, 768)
 BitmapRect = Rect.new(0,0,1024 + 64, 768 + 64) # Recommended
 BitmapWindowOffset = (BitmapRect.height-WindowRect.height)/2/32

 

And then the line in Main reads:

 

Graphics.resize_screen(1024, 768)

 

 



#18 Terv

Terv

    Advanced Member

  • Members
  • 36 posts
  • Primarily UsesN/A

Posted 18 March 2013 - 01:32 PM

I was able to recreate the described behaviour, which is strange as people have been reporting that their higher resolution worked just fine with this script. Also tested it on some VMs (XP, Vista) and it's the same there.

I will look into it and update this post as soon as there's news.

 

If the feature should really be broken (dang, I remember running my game in 1024x768 as a test!) you can always use F0's rewrite, it's even a whit better when it comes to fluid scrolling.


Edited by Terv, 18 March 2013 - 01:51 PM.

logo.png


#19 Fomar0153

Fomar0153

    Ready for summer.

  • Resource Staff
  • 1,095 posts
  • LocationEngland
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

User's Awards

     

Posted 18 March 2013 - 03:48 PM

In Spriteset map make the viewports:

@viewport1 = Viewport.new(0, 0, 800, 600)
    @viewport2 = Viewport.new(0, 0, 800, 600)
    @viewport3 = Viewport.new(0, 0, 800, 600)

Next in Game_Player

 CENTER_X = (400 - 16) * 4   # Center screen x-coordinate * 4
  CENTER_Y = (300 - 16) * 4   # Center screen y-coordinate * 4

And finally in Game_Map

  #--------------------------------------------------------------------------
  # * Scroll Down
  #     distance : scroll distance
  #--------------------------------------------------------------------------
  def scroll_down(distance)
    @display_y = [@display_y + distance, (self.height - 19) * 128].min
  end

  #--------------------------------------------------------------------------
  # * Scroll Right
  #     distance : scroll distance
  #--------------------------------------------------------------------------
  def scroll_right(distance)
    @display_x = [@display_x + distance, (self.width - 25) * 128].min
  end


The 19 and 25 are the max number of tiles on screen at any one time:

800/32=25

600/32=18.75 (round to 19)

 

Edit:

Ooh test battles also don't like me.

Add this to the rpg module:

module RPG

  class System
    class TestBattler
      def initialize
        @actor_id = 1
        @level = 1
        @weapon_id = 0
        @armor1_id = 0
        @armor2_id = 0
        @armor3_id = 0
        @armor4_id = 0
      end
      attr_accessor :actor_id
      attr_accessor :level
      attr_accessor :weapon_id
      attr_accessor :armor1_id
      attr_accessor :armor2_id
      attr_accessor :armor3_id
      attr_accessor :armor4_id
    end
  end
end

Edited by Fomar0153, 18 March 2013 - 04:25 PM.

  • Sumasuun likes this

Posted Image Posted Image Posted Image


#20 Vanitas

Vanitas

    Sora's Worst Nightmare

  • Members
  • 142 posts
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 20 March 2013 - 06:32 AM

Hm, does anyone know why I'm getting a 'the specified procedure could not be found' error? It's got nothing to do with RGSS or anything it seems, it's an actual windows error...I'll run through the instructions again and see what I might've done wrong, but I was pretty sure I followed them correctly! OTL

 

edit: Figured out what I did! Mistook the instruction about renaming the .dll for changing it in the .ini ^^; 

 

and I got a bug of course~ (this'll take a while to get working I suspect). 


Edited by SorceressKyrsty, 20 March 2013 - 06:43 AM.


 

28qw6e0.png
xWKhM.png






Also tagged with one or more of these keywords: xp, tutorial, vx, ace, rgss1, rgss, rgss3, engine, exe, dll

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users