[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

I remember in like an early iteration I tried experimenting with that, but never got anything to work I think. It'd definitely benefit in alpha blending, as I found here: https://stackoverflow.com/a/1102810

But I think we should test first if this is present in vanilla VXA so that I'm not wasting my time (and yes, it has to be VXA since we're using RGSS3. XP won't help us 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!

Jaiden

Quote from: KK20 on November 08, 2017, 02:02:39 pm
I remember in like an early iteration I tried experimenting with that, but never got anything to work I think. It'd definitely benefit in alpha blending, as I found here: https://stackoverflow.com/a/1102810

But I think we should test first if this is present in vanilla VXA so that I'm not wasting my time (and yes, it has to be VXA since we're using RGSS3. XP won't help us here).

I agree, I don't want to be responsible for time wasting. I'll take a look in VXA and see if I can replicate the problem.

Also, I have a couple different machines/operating systems I can test on. My primary machine is a powerhouse, so I don't think it's a resource issue. It has a dedicated GPU, so I will also test that vs my laptop that only uses on-board.

Jaiden

Looks like it's present in Vanilla VXA. Didn't have to put much effort into it--made a 50x50 and slapped a bunch of tiles down and the stutter is still there. Will check on an alternate machine to make sure.


Jaiden

Update: While the slight stuttering is present in VXA and XPA, the massive lag spikes I was getting in my own game were unrelated. Turns out it was an outdated version of Ryex's dynamic sound? Weird!

I do still get those slight stutters, but I had some folks reporting they don't get them. I need to test on some other machines to see if it's a problem with my computer, at this point.

Lunos

Hi. Quick question: This doesn't work with the Pokémon Essentials Kit, right?
At least I tried it but I'm getting this error as soon as I hit the New Game button, so..

KK20

Most likely not. Error states that you didn't put XPATilemap.dll in your project folder. But I know that PE uses its own tilemap rewrite and is built around it.

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!

KK20

Updated to version 2.3!


  • Traceback when a script error occurs will now output to a text file if the output is unreasonably large (900+ characters)

  • Font outline, which is a new default behavior in RGSS3, now has a configurable setting. It is turned off by default to replicate the RGSS1 feel

  • In RGSS1, whenever the game window closed, Kernel#exit would always be called, allowing scripters to alias it (e.g. online game that needs to save player's stats one last time). RGSS3 no longer does this. A DLL was created to intercept the window closing message and forcefully call Kernel#exit. This is another setting that can be turned on or off (off by default as not many users will find this particularly useful)

  • Added Prevent Deactivation; your games can now run in the background! Another configurable setting that is off by default.

  • Updated XPA_Tilemap to v0.4

  • Updated XPA_Window to v1.2


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!

Jaiden


KK20

Updated to 2.31 to address a potential issue with renamed games using Enigma Virtual Box as reported by BoisterousHero Jaiden.

Scripts that use Win32API calls like GetPrivateProfileString are often passed with the parameter ".\\Game.ini". If the user wishes to rename their Game.exe, their Game.ini must be renamed accordingly or else the game will not run. However, because the script can no longer find "Game.ini" (because it is renamed), the script will fail somewhere in its functionality.

A new method was created for this behavior.
Spoiler: ShowHide

=begin
================================================================================
Get Game INI
Author: KK20
Version: 1.0
--------------------------------------------------------------------------------
[ Description ]
Return the game's .INI filename by getting the executable's filename. Needed
for any scripts that make DLL calls to 'Game.ini'.
   
If the 'Game.exe' file is renamed, then 'Game.ini' must be renamed accordingly;
e.g. If Game.exe is now MyCoolGame.exe, then Game.ini must be MyCoolGame.ini

If scripts are looking for 'Game.ini', they will obviously not work anymore. As
such, any scripts that are doing this should use this method instead.

[ Instructions ]
There is nothing to do here.
Please keep this script in its current location.

It is highly advised to not modify this script unless you know what you are
doing.
================================================================================
=end
module RPG
  @@_ini_file = nil
  # Optional parameter prepend: a string to add to the INI filename; a common
  #                             value would be '.\\'
  def self.ini_file(prepend='')
    return prepend + @@_ini_file unless @@_ini_file.nil?
    len = Dir.pwd.size + 128
    buf = "\0" * len
    Win32API.new('kernel32', 'GetModuleFileName', 'PPL', '').call(nil, buf, len)
    @@_ini_file = buf.delete("\0")[len - 127, buf.size-1].sub(/(.+)\.exe/, '\1.ini')
    prepend + @@_ini_file
  end
end

Example:

  # Print the game title.
  ini = Win32API.new('kernel32', 'GetPrivateProfileString','PPPPLP', 'L')
  title = "\0" * 256
  ini.call('Game', 'Title', '', title, 256, RPG.ini_file('.\\'))
  p title.delete!("\0")


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!

Mewtrino

A wild lurker appears! :ninja:

Quote from: ForeverZer0 on August 02, 2014, 05:51:59 pm
Download (8 kB)

Give that a try. Feel free to distribute/share as you please.

Let me know if you need any adjustments.

Source Code: ShowHide

using System;
using System.Diagnostics;
using System.IO;
using System.Runtime.InteropServices;
using System.Threading;

namespace XpAceEditor
{
static class Program
{
[DllImport("Kernel32", CharSet = CharSet.Unicode, SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool WritePrivateProfileString(string lpAppName,
   string lpKeyName, string lpString, string lpFileName);

[DllImport("User32")]
static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);

[DllImport("Kernel32")]
private static extern IntPtr GetConsoleWindow();

/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
if (!File.Exists("Game.ini") || !File.Exists("Game.rxproj"))
{
Console.WriteLine("Missing files!\nGame.ini and Game.rxproj must be located in same folder.");
Console.ReadLine();
Environment.Exit(0);
}
// Hide the console window
var hWnd = GetConsoleWindow();
ShowWindow(hWnd, 0);
// Get current attributes, and remove read-only if needed
var ini = Path.Combine(Environment.CurrentDirectory, "Game.ini");
var attributes = File.GetAttributes(ini);
if ((attributes & FileAttributes.ReadOnly) == FileAttributes.ReadOnly)
{
attributes &= ~FileAttributes.ReadOnly;
File.SetAttributes(ini, attributes);
}
var proc = new Process();
proc.StartInfo.FileName = "Game.rxproj";
proc.Start();
// Wait 10 seconds for the editor to start up
Thread.Sleep(10000);
// Set the library name and read-only attribute
WritePrivateProfileString("Game", "Library", "RGSS301.dll", ini);
File.SetAttributes(ini, attributes | FileAttributes.ReadOnly);
// Wait for editor to exit and set attributes back to how they were
proc.WaitForExit();
File.SetAttributes(ini, attributes);
}
}
}


EDIT:
I forgot to mention, you must wait 10 seconds after hitting the launcher for it to take effect. I just picked an arbitrary amount of time to make sure the editor got through all its startup stuff.


So I'm more than a little late to the party when it comes to RMXP, but as a relative newcomer to RM in general (didn't hop on the bandwagon until I got RMXP & RMVXA in a Humble Bundle offer), I only recently found out about XPAce and wanted to give it a try. I got it installed just fine in a new project, but since I'm running XP through Steam, my Game.ini keeps getting overwritten. I know it's a long shot, but does anybody still have a link to ForeverZer0's modified launcher (see above)? I'd try compiling it myself, but I'm nearly out of space on my SSD and don't have enough room to install Visual Studio. :(

And just to clarify, can XPAce be used in commercial projects or is it for non-commercial use only? As I understand it, scripts such as XPA Tilemap are labeled for non-commercial use, so does that extend to XPA itself? I looked over the licensing info in the XPA documentation but I may have missed something since I didn't see it stated explicitly. Apologies if it's a stupid question, just wanted to make extra sure. For the record, I do have licenses for both RMVXA and RMXP, along with the latest RMMV.

Thanks to everyone who's kept this project and the many other awesome XP scripts updated over the years. This site is a treasure trove of XP goodness and I'm truly grateful that it's stuck around for all this time. Kudos to you guys!

ForeverZer0

March 29, 2018, 01:58:35 am #330 Last Edit: March 29, 2018, 02:03:30 am by ForeverZer0
Holy hell, I have absolutely no recollection of every created that. I will look in my dropbox and fix link. Never fixed them after Dropbox changed all their crap around.


EDIT:

Oi! I actually found it.

https://drive.google.com/open?id=1xxUCKMm89lZRzGhWSy5EQfiqlfwFh6za
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

KK20

Regarding commercial use, you must reach an agreement with the authors of said scripts. I generally negotiate with a free-copy of the game.

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!

Mewtrino

@ForeverZer0: THANK YOU!! Yeah, I remember Dropbox changed how file sharing works a while back and I had a feeling that had something to do with the broken links. Hope it also helps anyone else out there who was looking for the launcher and was wondering where it went!

@KK20: I understand, thank you for clarifying. I'd definitely check in with the script/plugin writers for licensing terms on a commercial project (if I ever get to that point) before releasing it.

Thank you both again for your help! :D

KK20

Quick update to 2.32

  • Forgot to update XPA Tilemap's DLL from version 0.4, whoops :P (thanks tasuku13 for reporting this)

  • Input module's constants are now integers (as they are in XP) instead of symbols (as they are in VXA). You can still use XP's or VXA's way of handling input, like so



Input.trigger?(Input::C) # XP
Input.trigger?(:C)       # VXA


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!

Kise

Look like you uploaded wrong version, every script is outdated in XPA_2.32 and tilemap dll is smaller.

KK20

Thanks for the QA, I must have been in a drunken stupor last night.
The DLL is fine by the way.

Reverted to 2.31 until I fix it.
EDIT: 2.32 is back up

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!

KK20

Update to 2.33
Includes update to XPA_Window (v1.31) which addresses assigning them to a Viewport, so they should now behave exactly like XP Windows

It's not fully tested yet, so keeping 2.32 up for now.

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

Yeah, 1.31 should definitely be tested some more. I had issues with Z-ordering once I stopped using viewports internally. :/
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.

Sin86

An error with ForeverZero's Advanced Weather when loading game.

Script Zer0 Advanced Weather 1.1 line*' 1700 SyntaxError occurred

unexpected ';'; expecting ')'
starbust_color7 = color.new(189,225,242)


KK20

Can you provide a download link? His dropbox links haven't been updated.

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!