CHERRY'S PROFILE
Search
Filter
+++ DynRPG - The RM2k3 Plugin SDK +++
Hm, it may be only me, because I save very often (if possible - and if not, I use my RMSaveAnywhere tool). That's because I am playing RM games because I want to find out about the story or play with its technical features or explore areas, but I don't want to be able to lose anything (money, life, time, ...). I know that this is not how most games were meant to be played, and that most people would consider that "lame", "cheating" or "no fun", though^^
+++ DynRPG - The RM2k3 Plugin SDK +++
This is something I don't understand... There are a few games where I saw something like this, and I was always annoyed that it's wasting my time for nothing. I really appreciate that the RM2k3 can instantly save (and load) games, so I wonder why one would want to artificially reduce this convenience? The only point where I could imagine a progress bar is before the custom save/load menu shows up, because it takes a moment.
+++ DynRPG - The RM2k3 Plugin SDK +++
+++ DynRPG - The RM2k3 Plugin SDK +++
@PepsiOtaku:
...so don't forget to remove this:
author=Cherry
(instead of the one you used in your last message)
...so don't forget to remove this:
*reinterpret_cast<unsigned int *>(0x4A2621) = 0x4CDC1C;
*reinterpret_cast<unsigned char *>(0x4A2629) = 0xC;
+++ DynRPG - The RM2k3 Plugin SDK +++
Yes, sorry, I made a mistake there. A more complicated patch is needed:
(instead of the one you used in your last message)
static unsigned char patchSave1[] = {0x50, 0x8B, 0x35, 0x1C, 0xDC, 0x4C};
static unsigned char patchSave2[] = {0x58, 0x8B, 0x36, 0xC6, 0x46, 0x0C, 0x01};
memcpy(reinterpret_cast<void *>(0x4A25E9), patchSave1, sizeof(patchSave1));
memcpy(reinterpret_cast<void *>(0x4A25F7), patchSave2, sizeof(patchSave2));
(instead of the one you used in your last message)
+++ DynRPG - The RM2k3 Plugin SDK +++
Well, you don't need the whole fieldScene thing here, because it's already part of the path.
Also:
...why do you use a stringstream at all? Better:
Save menu: We can apply another patch there:
Party menu:
(It's the same patch as for the end menu, just the address in the memcpy line changed and you can put another switch ID).
Also:
std::map<std::string, std::string> configuration = RPG::loadConfiguration(pluginName);
std::stringstream keyName;
keyName << "QuitSwitch";
quitSwitchValue = atoi(configuration[keyName.str()].c_str()); // atoi is the easiest way here to get an integer
std::map<std::string, std::string> configuration = RPG::loadConfiguration(pluginName);
quitSwitchValue = atoi(configuration["QuitSwitch"].c_str());
Save menu: We can apply another patch there:
*reinterpret_cast<unsigned int *>(0x4A2621) = 0x4CDC1C;
*reinterpret_cast<unsigned char *>(0x4A2629) = 0xC;
Party menu:
static int patch2[] = {
0x4CDC1CA1, 0xC6008B00, 0x90010C40, 0x4CDC7CA1, 0xBA008B00,
1234, // Switch ID
0x04C701B1, 0x4A274024, 0xB33C6800, 0x90C30048
};
memcpy(reinterpret_cast<void *>(0x4A23BC), patch2, sizeof(patch2));
+++ DynRPG - The RM2k3 Plugin SDK +++
@All: The code I gave PepsiOtaku (to turn a switch on when "End game" was selected) was:
====
I modified the code so it directly does the "fieldScene->initalized = true" from inside the patch:
This should give the desired result.
static int patch[] = {
0x4CDC7CA1, 0xBA008B00,
1234, // Switch ID
0x04C701B1, 0x4A274024, 0xB33C6800, 0x90C30048
};
memcpy(reinterpret_cast<void *>(0x4A2328), patch, sizeof(patch));====
I modified the code so it directly does the "fieldScene->initalized = true" from inside the patch:
static int patch[] = {
0x4CDC1CA1, 0xC6008B00, 0x90010C40, 0x4CDC7CA1, 0xBA008B00,
1234, // Switch ID
0x04C701B1, 0x4A274024, 0xB33C6800, 0x90C30048
};
memcpy(reinterpret_cast<void *>(0x4A2328), patch, sizeof(patch));This should give the desired result.
+++ DynRPG - The RM2k3 Plugin SDK +++
+++ DynRPG - The RM2k3 Plugin SDK +++
Well, you were not supposed to put FieldScene into namespace "RPG", and "int fieldScene" is wrong because it's already declared as a "static FieldScene *&" (not an "int"). "using namespace RPG" is also not recommended, because the "RPG" namespace should seperate DynRPG functions from your own (and thus, the incomplete "FieldScene" class shouldn't be put into the "RPG" namespace because later it might be implemented in DynRPG too, and then it would be in conflict).
Just put both codes together into your CPP file, or use a FieldScene.h but without "namespace RPG". And remove the second declaration as "int".
Just put both codes together into your CPP file, or use a FieldScene.h but without "namespace RPG". And remove the second declaration as "int".
+++ DynRPG - The RM2k3 Plugin SDK +++
Oh, THAT'S what you want (I thought you want to replace the black menu background with an image)...
Sorry.
Still, what you are doing might be not the optimal way. There is a better way, but currently it needs a hack because the FieldScene class isn't implemented in the SDK yet.
This gives you the fieldScene object (not with all members yet, but we only need "initialized" here).
Then you use:
...where 1234 is the switch which is used for the "end" menu item. fieldScene->initialized = true will in this case prevent the map from doing a "fade in" effect. So what's going to happen is: The menu fades out, but the map doesn't fade in. You can then show the menu from a common event and call "<> Show Screen: Fade In" afterwards.
In case this doesn't work, you would have to remove the "scene == RPG::SCENE_MENU &&" part, but then please turn off the switch (1234 in this example) as soon as possible.
(No pictures involved now.)
Sorry.
Still, what you are doing might be not the optimal way. There is a better way, but currently it needs a hack because the FieldScene class isn't implemented in the SDK yet.
class FieldScene {
public:
void **vTable;
int _unknown_4;
bool initialized;
bool teleport;
int mapId;
int x;
int y;
// There are more members but I haven't analyzed them yet
}
static FieldScene *&fieldScene = (**reinterpret_cast<FieldScene ***>(0x4CDC1C));This gives you the fieldScene object (not with all members yet, but we only need "initialized" here).
Then you use:
void onFrame(RPG::Scene scene) {
if(scene == RPG::SCENE_MENU && RPG::switches[1234] == true) {
fieldScene->initialized = true;
}
}
...where 1234 is the switch which is used for the "end" menu item. fieldScene->initialized = true will in this case prevent the map from doing a "fade in" effect. So what's going to happen is: The menu fades out, but the map doesn't fade in. You can then show the menu from a common event and call "<> Show Screen: Fade In" afterwards.
In case this doesn't work, you would have to remove the "scene == RPG::SCENE_MENU &&" part, but then please turn off the switch (1234 in this example) as soon as possible.
(No pictures involved now.)














