Adding New Pokemon

Can someone jsut answer a few questions for me about adding new pokemon/changing existing pokemon? First of all, how do you open the databases for editing? I've tried every program ic an think of that would logically open it (wordpad, notepad, Visual Studio, NetBeans, etc.). Do you have to alter it as the program is running? I'm not looking to re-write battle mechanics by anymeans, just variations/new pokemon using pre-existing moves/abilities
 
Opening dppspecies.db or dppmovesets.db isn't the way to go for modifying movesets or existing pokemon, and there aren't any really convenient means to do that anyway. However, ShoddyBattle has a feature called mod list for editing the movesets and abilities of existing pokemon.

The server.properties file that's used to modify the properties of the server has the following field:

#Patch file to apply against the metagame
server.patch =
By default the program uses no patch, and the metagame is thus the normal one. However, you can define a patch file by adding it's filename after the '=' - mark and by placing the file to the same folder with the server.properties -file. Then you can modify existing pokemon by adding lines to the file you defined as the patch like this:

Slugma: a-Flame Body, a+Blaze, HP: 80, atk: 80, def:100, satk: 80, sdef: 80, spd: 5, Surf, -Flamethrower;

The pokemon's name is at the beginning (Slugma:). Then you add whatever modifications you want. For example the previous line removes it's ability Flame Body (a-Flame Body), gives it the ability Blaze (a+Blaze), changes it's base stats to the ones defined up there, gives it the new move Surf, and removes it's already known move Flamethrower from it's movepool. Do note the ";" in the end and the ","s in between commands, as they're required. Also, remember case sensitivity.

Adding new pokemon can also be done through the mod list by adding a line like the following to the mod list:

Add Pokemon: Missigno, 80, 80, 80, 80, 80, 80, Water, Flying, None;

Therefore the pokemon's name is Missigno, base stats are all 80 (the order is Hp, Attack, Defense, Speed, Special attack and Special defense), type is Water/Flying (for monotyped pokemon put None to the second spot), and the pokemon is genderless (the gender options are Both - both genders available, Male - male only, Female - female only and None - genderless). And next you just give it the movepool and abilities with a line similar to my Slugma example. For example:

Missigno: a+Levitate, Water gun, Sky attack;

That gives it the ability levitate and a movepool of Water Gun and Sky Attack.

However, do note that unless something that I don't know about has been added to the ShoddyBattle sources that allows a server to serve sprites, without programming a sprite updater and running it or adding the sprites to your computer manually (just run a search on your computer for "ffinneon" and you should probably find them) the sprite displayed on new pokemon in battles will be the standard Missigno sprite.

Seeing as it's been some time since the last time I've used modifications like this, if anyone notices a mistake or something important left out in my post, please correct it.
 
Alright thanks alot. That should let me do most of what I need :) Do you know if there's a way to reference an already existing sprite for a pokemon? I want to include some variations of pokemon (different ability and move pools) but keep the originals too
 
Well, just add a new pokemon, like PT8 Sceptile explained, and input all the stats etc of the old pokemon (with changes) and give it a different name, but probably one that's similar to the old one (like the forms generally have the pokemon's name, a hyphen and a letter eg Rotom-H).
So if you wanna change slugma, you do liek what PT8 Said:
Slugma: a-Flame Body, a+Blaze, HP: 80, atk: 80, def:100, satk: 80, sdef: 80, spd: 5, Surf, -Flamethrower;

But if you want to make changes while keeping the original you could do this:

Add Pokemon: Slugma-S, 80, 80, 100, 80, 80, 5, Fire, None, None;

I don't know how to have the sprite for it though.
 
Thanks for ht epost dude but I got that :) what i meant was, the new version of pokemon, i want to set their sprite to be the same as the old versions. Im wondering if this would be difficult because the sprites are all already there
 
Thanks for ht epost dude but I got that :) what i meant was, the new version of pokemon, i want to set their sprite to be the same as the old versions. Im wondering if this would be difficult because the sprites are all already there

Sprites are serached through Pokemon names. For example, when the computer wants to find the front shiny sprite for "Slugma", it goes to the Shoddybattle sprite storage folder for front shiny sprites and searches for "fslugma" if the pokemon is female and "mslugma" if the pokemon is male. If it's genderless, like voltorb, it uses "mvoltorb".

Therefore, if you create a new pokemon named "Slugma", it would use the same sprites as the pre-existing Slugma since it has the exact same name. I haven't ever seen creating a pokemon with an identic name to an existing one being created, but it probably should work like any other new pokemon and not cause any trouble with the program, and would thus be the simplest solution.

However, if you want the name to be distinct, like "Slugma-S", your only choice is to copy all the slugma sprites in the sprite storage folders and rename the copies "fslugma-s" and "mslugma-s". And every person who would want to see the sprites for the new Slugma form would have to do the same, either manually or through a program designed to do so.
 
Theres one thing - when i add new pokemon, get an error. Heres my patch file (callied patch.txt)
Slugma: a-Flame Body, a+Blaze, HP: 80, atk: 80, def:100, satk: 80, sdef: 80, spd: 5, Surf, -Flamethrower;
Add Pokemon: Missigno, 80, 80, 80, 80, 80, 80, Water, Flying, None;
Missigno: a+Levitate, Water gun, Sky attack;

I get the below error
Applying patch file to database... Warning: problematic abilities for Missigno. Saving mod data for download by client... Caching move sets... Unimplemented move: Natural Gift Unimplemented move: Recycle Unimplemented move: Sky attack Unimplemented move: Water gun
 
I'm pretty sure you can't add Pokemon by Patch file. It thinks that
Add Pokemon: blah blah blah;
is a Pokemon, its not. You gotta add it thru dppspecies.

I dunno about your move problem, tho.
 
forgot that previous problem have it fixed. I have one more question if you guys can answer it... does anyone know hot force a pokemons HP like Shedinjas? I went into advanced mechanic and did this

public int calculateStat(Pokemon p, int i) throws StatException {
if ((i < 0) || (i > 5)) throw new StatException();
int common =
(int)((int)(((2.0 * p.getBase(i))
+ p.getIv(i)
+ (p.getEv(i) / 4.0)))
* (p.getLevel() / 100.0));
if (i == Pokemon.S_HP) {
if (p.getSpeciesName().equals("Shedinja")) {
// Shedinja always has 1 hp.
return 16;
}
if (p.getSpeciesName().equals("Shed"))
{
//Shedinja-OU has 16 HP
return 16;
}
else{
return common + 10 + p.getLevel();
}
}
return (int)((common + 5) * p.getNature().getEffect(i));
}

But this only applied to Battles i suppose. Does anyone know how to actually set it on a pokemon you add via the mod.patch?
 
forgot that previous problem have it fixed. I have one more question if you guys can answer it... does anyone know hot force a pokemons HP like Shedinjas? I went into advanced mechanic and did this

...code...

But this only applied to Battles i suppose. Does anyone know how to actually set it on a pokemon you add via the mod.patch?

You're right in that setting Shedinja-like stats is only possible in the mechanics. The change works entirely well, but since the client's team builder does stat calculations with a default ShoddyBattle copy and not the one you modified, the stat shows incorrectly in the team builder. It does work in battles correctly, however. When a battle starts your Shedinja's HP will become 16 instead of the value the team builder gives (or in other words, 1), according to the editions to the code you wrote.

And for pokemon you created, just put the name inside the paranthesis. In this case, a custom pokemon named "Shed" (as in added via "Add Pokemon: Shed, ...") will always have 16 HP. Again, this doesn't show up in the team builder but works entirely correctly in battles.

Also, a minor optimisation issue you don't probably care about, but if you're going to give "Shedinja" and "Shed" the same HP, you could replace:

if (p.getSpeciesName().equals("Shedinja")) {
// Shedinja always has 1 hp.
return 16;
}
if (p.getSpeciesName().equals("Shed"))
{
//Shedinja-OU has 16 HP
return 16;
}

with

if (p.getSpeciesName().equals("Shedinja") || p.getSpeciesName().equals("Shed")) {
// Shedinja and Shed always have 16 hp.
return 16;
}
the || practically means "or", and makes the additions take so much less space. Also, the // lines are comments that are meant to make the code easier to read, and editing them doesn't change the program's logic whatsoever.
 
thank a bunch. I had meant to set regular shedinja aback to 1. One more thing, maybe you can help me out with. Adding new types. I went into the PokemonType.Java. I added the new type (I'm using NEWTYPE just as an example) under the constants

(public static final PokemoneType T_NEWTYPE = new PokemonType(18);) added it to the m_types[] tring field with
...
"Typeless",
"New Type"

I added a new entry indicating it as "true" under the m_special array

I added a 1 to every row under the double array m_multiplier[][] I added a 19th row thats 19 entries long. I set surf's type to T_NEWTYPE just as a test. Netbeans detected T_NEWTYPE just like it did for the rest of the types, and netbeans compiles properly.

The problem however, is that the move list will not load for any pokemon that has a move of type NEWTYPE. I ran through the debugger abit and the arrays seem to be being populated correctly (is there anyway to check the arrays whole contents during runtime under netbeans? I'm used to Visual Studio&quot;. Is there more places you have to set values to enable new types? I just dont want to spend alot of time tracking down every spot if someone already knows them

I have programming experience in C/C++/C# so don't be afraid to get abit technical,
 
thank a bunch. I had meant to set regular shedinja aback to 1. One more thing, maybe you can help me out with. Adding new types. I went into the PokemonType.Java. I added the new type (I'm using NEWTYPE just as an example) under the constants

(public static final PokemoneType T_NEWTYPE = new PokemonType(18);) added it to the m_types[] tring field with
...
"Typeless",
"New Type"

I added a new entry indicating it as "true" under the m_special array

I added a 1 to every row under the double array m_multiplier[][] I added a 19th row thats 19 entries long. I set surf's type to T_NEWTYPE just as a test. Netbeans detected T_NEWTYPE just like it did for the rest of the types, and netbeans compiles properly.

The problem however, is that the move list will not load for any pokemon that has a move of type NEWTYPE. I ran through the debugger abit and the arrays seem to be being populated correctly (is there anyway to check the arrays whole contents during runtime under netbeans? I'm used to Visual Studio&quot;. Is there more places you have to set values to enable new types? I just dont want to spend alot of time tracking down every spot if someone already knows them

I have programming experience in C/C++/C# so don't be afraid to get abit technical,

Okay, the reason for the movelist not loading is most probably this: The client finds the new move with a new type and tries to load the type name string to the "Type" - part of the move data. However, since the client uses the default ShoddyBattle version, in which the last entry of the type list (which is static, and thus isn't bound to the move variable, but the class itself) is "Typeless", instead of "New Type" as in your modified version, it doesn't have the new type in the type list. IndexOutOfBoundsError gets thrown for trying to access a variable from an array out of the array's bounds and the thread stops doing anything (or moves on to the next "catch" -statement).

So, getting the client to display the name of a new type will fail, no matter what, unless you're going to have all server visitors use a modified client with the modified server version of ShoddyBattle as the library it uses instead of the ordinary one. However, it shouldn't affect battle logic at all, so I think I could figure out a workaround. Keep in mind, though, that I've never done anything like this with Shoddy before, so I can't guarantee the results:

My attempt for a solution is to look at Hidden Power: It's a normal type move in the team builder, but in battle it most certainly isn't of the normal type. Therefore, by imitating HiddenPower's code from the class HiddenPowerMove, I got this:

Move code said:
m_moves.add(new MoveListEntry("Haxed Surf",
new PokemonMove(PokemonType.T_TYPELESS, 95, 1.0, 15) {
public boolean isAttack() {
return true;
}
public void beginTurn(BattleTurn[] turns, int index, Pokemon source) {
switchIn(source);
}
public void SwitchIn(Pokemon source) {
setType(PokemonType.T_NEWTYPE);
}
}
));
In battle "Haxed Surf" should turn into a move of the "T_NEWTYPE" -type, but users should see it in the team builder as a "???" or "Typeless" move like Curse. Remember, though, that this is the first time I tried something like that so I'm not sure if it will work. The code should be functional, though, so if NetBeans won't compile, it's likely that I made a typo or something (as long as T_NEWTYPE is in the type array as you placed it there).
 
Thanks for the help :) It didn't work quite like that, so i created a new class, copied Hiddepower, renamed it, allowed an int for move power to be passed into the constructor, deleted the power and type generation and created an array with just T_NEWTYPE. Not elegant I know, but for some reason it wouldn't work your way despite these two things being practically the same. This should be good though because i can pass another int into the constructor that lets me pick the Type if i come up with multiple new types It does work the way i did it though. Thanks alot for your help :) Now I just have to try to create pokemon with the Light Type
 
Thanks for the help :) It didn't work quite like that, so i created a new class, copied Hiddepower, renamed it, allowed an int for move power to be passed into the constructor, deleted the power and type generation and created an array with just T_NEWTYPE. Not elegant I know, but for some reason it wouldn't work your way despite these two things being practically the same. This should be good though because i can pass another int into the constructor that lets me pick the Type if i come up with multiple new types It does work the way i did it though. Thanks alot for your help :) Now I just have to try to create pokemon with the Light Type

PT8Sceptile said:
m_moves.add(new MoveListEntry("Haxed Surf",
new PokemonMove(PokemonType.T_TYPELESS, 95, 1.0, 15) {
public boolean isAttack() {
return true;
}
public void beginTurn(BattleTurn[] turns, int index, Pokemon source) {
switchIn(source);
}
public void switchIn(Pokemon source) {
setType(PokemonType.T_NEWTYPE);
}
}
));

D'oh. I seriously hate typos. Altough this probably has no meaning for you now, since you got a slightly different version working on your own. It even seemingly compiled correctly, since the method call in BeginTurn went to the non-overwritten switchIn -method of PokemonMove.
 
Back
Top