Forum rules: Do not post bugs or feature requests here! Report bugs to our Issue Tracker and suggestions to Suggest a Feature.

This site is not for solicitation of services or 'purchasing' development. Please do not post requesting side mods/plugins and so on. Your thread will be removed, and you will receive a warning.
By MotionLotion
#189900 Hello,

Been enjoying the mod for a while, thank you for all the effort!

I was curious about a couple things.
1. Resetting the level-spawn-by-distance in the config will wipeout existing user data (specifically the pokemon you have, is this intended?)

2. After using the built in DB for some time, I'm looking at branching out into MySQL (thankyou for including support for that!) Is there anyway to convert the existing builtin DB into MySQL or will everyone on my server have to start over if I look at making the switch permanent?

Thanks!

User avatar
By MrMasochism
#189933 1. What do you mean by resetting? And by wiping user data you mean they lose everything? That doesn't sound right at all and I never saw it in my testing. More info please
2. The builtin DB doesn't get converted to mysql when you change to db storage for player data as it's in a separate system. I'll get Hiroku to post in here though about that as he's spent a while working with database support
By MotionLotion
#189940 Hey, thanks for the response.

With regard to 1. I could have sworn it was the only thing I was changing when I experienced that behavior (the behavior being prompted to select a new starter and having lost all party pokemon, I didn't check PC pokemon as I didn't have a PC in the world then.)

That being said, please disregard this as I just set spawn by level back to true and had no issues whatsoever. Sorry for the confusion.

2. Thanks for the info about what making that switch to an external DB actually holds. I was hoping to offload as much as possible to my MySQL backend, but I understand that must by a pretty limited use-case (and in reflection, I'll probably never have enough users for this small amount of data being offloaded to matter ). I'm curious if there are tables that map directly when you make the switch? If so I can just dump those out and bring them into MySQL.

Thanks again!
User avatar
By Hiroku
#189950 By the built-in, you're referring to the Pixelmon2.h2? Or the save-data database? Built-in implies the former but your use-case sounds like the latter.

If you mean the Pixelmon2 then I wouldn't understand the point, for any number of reasons. Slow, no benefit, etc.

What I assume you mean is the custom database for player Pokémon data. In that case, converting an existing one that's H2 Embedded over to MySQL wouldn't be too big a deal because the two have similar complexity. The creation of the columns doesn't actually differentiate between H2 and MySQL, so there's no issue of incompatible types; you're in the clear there. A dump should be accepted into the other DBMS without much issue. Though I didn't know the database code worked well enough to use on a larger scale so props to you for getting by with it.
By MotionLotion
#189972
Hiroku wrote:By the built-in, you're referring to the Pixelmon2.h2? Or the save-data database? Built-in implies the former but your use-case sounds like the latter.

If you mean the Pixelmon2 then I wouldn't understand the point, for any number of reasons. Slow, no benefit, etc.

What I assume you mean is the custom database for player Pokémon data. In that case, converting an existing one that's H2 Embedded over to MySQL wouldn't be too big a deal because the two have similar complexity. The creation of the columns doesn't actually differentiate between H2 and MySQL, so there's no issue of incompatible types; you're in the clear there. A dump should be accepted into the other DBMS without much issue. Though I didn't know the database code worked well enough to use on a larger scale so props to you for getting by with it.


Hey, thanks for the response.

I was originally talking about the Pixelmonh2 db as I had misunderstood (misread) what the configuration setting for an external database actually does (mind you, it is very clear in the config, just my mistake there.)

As to why? Well, without knowing anything about the inner-workings of the mod I already have a dedicated MySQL backend on beefier hardware that is the ultimate solution-needing-a-problem, which is where a lot of this stems from I think, ha. A part of it might have just been the fact that I work in an environment where offloading SQL is assumed, though it should be said that that is a series of incredibly different use-cases than what we are talking about here, in which case something like H2 I'm sure is a very good choice.

What I do mean now, yes, is (was) dumping out whatever is holding the existing (default location) playerdata to get that bad boy into MySQL. I don't think I'm likely to pursue it now, though, as there wouldn't be much of a benefit with the tiny amount of data it would be storing and the low number of players this server will ever likely see.

At any rate, thanks again for the timely and informative response!
User avatar
By MrMasochism
#190269 with a low number of players you won't get a performance benefit from mysql. For the pixelmon database, h2 is an in-memory database which for this usecase is significantly quicker than a mysql implementation would be no matter how beefy the hardware
JOIN THE TEAM