[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

ForeverZer0

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.
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.

Zexion


ArcaneAlchemy

ForeverZero, you are the man as usual. Good to see you frequenting here again.
Also, I have some questions regarding the FPS handling of VXA/RMXP and your CCTS script. I'll post the details when I get 'em together and see what your thoughts are on it.
"Wait? Do I look like a waiter?" -Kefka

ForeverZer0

Quote from: ArcaneAlchemy on August 03, 2014, 10:59:46 pm
ForeverZero, you are the man as usual. Good to see you frequenting here again.
Also, I have some questions regarding the FPS handling of VXA/RMXP and your CCTS script. I'll post the details when I get 'em together and see what your thoughts are on it.



I am guessing its going to be about the "count_length" method, and what effect will be made running at 60 FPS instead of 40 FPS?
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.

ArcaneAlchemy

You're half right. You see, I'm running the rmxp/vxa at 120 fps. I then tailored the walking speed and frequency to retain the speed of the 40fps look so that I get the best scrolling smoothness without the stupid sprinting speeds of 60+(which defeats the purpose of faster fps in my opinion).
I want to retain the battle speeds, and that is merely a matter of a switch at battle_scene start and end.

My Problem: The issue is that inside Game_Map, or wherever the weather, flashing, and time(in the case of CCTS), I am getting the 120fps speeds for those. I am excluding the animations here because that CAN be fixed by simply tripling the animation sprite order(although I'd like to avoid that if possible).

My question: So, yes I am wondering about the effect of time and how it's handled in relation to FPS changes. And better yet, I am wondering if there is a way to call frames at a 3rd of the rate so that I can retain that 40fps "look" whilst still scrolling the game_map at 120.

Your thoughts?
"Wait? Do I look like a waiter?" -Kefka

ForeverZer0

I am sure its possible to only update one at 40, and the other at 120.

Something like if
if Graphics.frame_count % 3 == 0
  update_this
end
update that


I would have to review the script again to see where, but its possible.

Why run the game at 120 FPS anyway?
A normal computer screen can only refresh 60 FPS, so anything over that is overkill if that was the purpose.
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.

bigace

Quote from: gameus on July 27, 2014, 11:01:06 am
I understand you're trying to get your website a bit more attention, but don't force it onto people. If he wants to request support here because there are more members and it's a bit more active, then so be it.

Quote from: bigace on July 26, 2014, 05:04:36 pm
So... I guess bump once again? :???:


I just tested this in XP Ace. The code is:

website = [
 'http://forum.chaos-project.com/'
]
 Thread.new { system("start #{website[0]}") }


And here's a GIF showing it.

Large GIF: ShowHide


If you're using RPG Maker XP 1.05, it likes to overwrite the RGSS104E.dll in your project folder every time you playtest it through the editor.


Thanks for the reply, but that still doesn't work either the game just closes or it gives me an error telling me that 'system' is an undefined method. I also am using RGSS102E not 104 I don't get that issue.


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.

G_G

Are you using RGSS301 or RGSS300? The RGSS104E is just RGSS301 renamed.

ArcaneAlchemy

Ah. Well it seemed that the map scrolling was even cleaner at 120 but maybe I was just imagining that. But yeah, I don't know why I didn't just think of a conditional statement, that's funny. That should work I'm sure.  :facepalm:
"Wait? Do I look like a waiter?" -Kefka

PhoenixFire

Quote from: Subsonic_Noise on July 01, 2011, 02:42:19 amNext off, how to create a first person shooter using microsoft excel.

Quote from: Zeriab on September 09, 2011, 02:58:58 pm<Remember when computers had turbo buttons?

Terv

Jesus :^_^':
I guess I owe you some for hijacking this project. Haven't read through all the posts on your new site but I'll certainly catch up tomorrow.

Quote from: PhoenixFire on June 02, 2014, 06:20:56 pmThere's your answer... The site's gone, no backup, nadda.
Objection!!


Tell me what to do with dat stuff. Repost to new or restore the old site?

Spaceman McConaughey

August 09, 2014, 04:16:48 pm #171 Last Edit: August 09, 2014, 04:26:41 pm by Sgt. Tuggernuts
Please restore the old site.

It was nicer and more intuitive than the new one.
And never forget: it's your project, so you should be the one that continues hosting the official site now that you're able to again.

Honestly, I'm not a fan of "project hijacking".

Terv

Just PM'd Phoenix, but my original plan was to have a dead simple tracker serving as central index of specific issues while keeping discussions on this site (maybe open up a sub-forum). Imho no need for another badly(?) frequented forum, but now that it's already there... shrug.

Debian installation is running, I should manage to piece it all together this evening.

Terv

Once again, a heads-up for all those tormented by 1.05: RPGXPU by Cremno (fixes Show Text line bug and small Script command window as well).

Regarding the tracker: up n running, posting/editing not working yet Akismet fixed. Gonna check the new site for updates now.

ArcaneAlchemy

"Wait? Do I look like a waiter?" -Kefka

LiTTleDRAgo

welcome home, glad that you're alive, terv :hi:
I wonder where you have gone for the past month?

btw, for updates :

Load RTP Script (now RTP.dll is not needed)
Drago - Custom Resolution (another Tilemap Rewrite)
Windowskin Converter fix (issue: Link)

Print: ShowHide
#==============================================================================
# ** Kernel
#------------------------------------------------------------------------------
#  A module defining the methods that can be referred to by all classes.
#  Object classes are included in this module
#==============================================================================

module Kernel
  if RUBY_VERSION == '1.9.2'
    alias_method :last_p,        :p
    alias_method :last_print,    :print
    alias_method :last_msgbox,   :msgbox
    alias_method :last_msgbox_p, :msgbox_p
    define_method(:p)       {|*args| last_msgbox_p(*args)}
    define_method(:print)   {|*args| last_msgbox(*args)}
    define_method(:msgbox)  {|*args| last_print(*args)}
    define_method(:msgbox_p){|*args| last_p(*args)}
  end
end

Cremno

Quote from: Terv on August 10, 2014, 03:31:14 pm
Once again, a heads-up for all those tormented by 1.05: RPGXPU by Cremno
Please note that it doesn't work with the Steam version. Yes, I didn't end the previous sentence with "yet".

Quote from: LiTTleDRAgo on August 10, 2014, 07:30:13 pmLoad RTP Script (now RTP.dll is not needed)
It's great that you're using the "Unicode" functions (well, only in 2 of 3 cases). Not many people do that! But I have to tell you that I'm thinking about writing my own version of it.

By the way, did you know that the RGSS supports up to 9 RTP?

MetalZelda