Programming PokemonBattleEngine(PBE) - ABANDONED -

I'm Developing a Pokémon Battle simulator. -WIP-
1519545344663.png


If you're asking the point of this:
  • Showdown is only online and way harder to mod.
  • This is way better than the CAP project for creating new Pokémon.
  • Totally support some metagames (almost any ability, balanced hackmon and some that don't even exist yet).
  • Not only you can create new pokémon but everything you want from abilities, items, moves, types, status effects or even weather effects...
  • You can play against yourself or someone else on the same computer.
  • That's cool... :psywoke:


The PokémonBattleEngine is a system that allows you to create any Pokémon, move, ability, items… and include them in the Pokémon battle system of gen7.

What is a PCP File and how to use it?
A PCP File (Pokémon Code Project) is a type of text file created especially for PBE. It contains all the data for a Pokémon specie, a Pokémon move, a Pokémon ability, a Pokémon item, a Pokémon type or an effect. PBE uses those files as a database and so, you will need to write them (or use default ones :psysly:).


PCP object are created in a single line, for example, here what a Pokémon definition looks like:
Bulbasaur:7:69:Grass:Poison:45:49:49:65:65:45/
Some definition contains logical programming for example an ability:
Mummy:after:condition(Target.Movecontact=true,set(Target.ability,Mummy))/
____________________________________________________________________________________________________________________________________________________________________________

Every instance of PBE needs 6 PCP files for each type of object.
1519546120012.png

Creating a new PCP file is easy, just create a text file and save it as a .PCP

_____________________________________________________________________________________________________________________________________________________________________________

When you create the PKMN.PCP file, you’re are defining the base elements of a Pokémon specie. That includes the specie name, height, weight, types, Base HP, Base ATK, Base DEF, Base SPA, Base SPD and Base SPE. Exactly in this order.
SpecieName:Height:Weight:Type1:Type2:HP:ATK:DEF:SPA:SPD:SPE/

A completed PKMN.PCP could look like this :
1519546211159.png

Every line is a different Pokémon specie that can be used in battle.

When you create the MOVE.PCP file, you’re are defining the base elements of a Pokémon move. That includes the move name, type, “speciality”, Base Power, Base Precision, PP, Critical Rate, Priority, Is Affected By Protect?, Makes Contact?, Is Reflectable ?, Move Category and Move effects. Exactly in this order.
MoveName:MoveType:Speciality:Pow:Prec:PP:Crit:Priority:Protect?:Contact?:Reflect?:Category:Effect/

A completed MOVE.PCP could look like this :
1519546338642.png

Every line is a different Move that can be used in battle.


When you create the ABILITY.PCP file, you’re are defining the base elements of a Pokémon Ability. That includes the Ability name, Momentum and Effects. Exactly in this order.
AbilityName:Momentum:effects/

Momentum = (Before, during, after, Always, Both) keyword to indicate when during a turn the effect should be runned. Before for before attacking. During for after the fastest Pkmn attack. After for after attacking. Always for the 3 of them. Both for Before and after.

A completed ABILITY.PCP could look like this :
1519546587800.png

Every line is a different Ability that can be used in battle.

When you create the ITEM.PCP file, you’re are defining the base elements of a Pokémon Item. That includes the Item name, Momentum, Category and Effects. Exactly in this order.
ItemName:Momentum:Category:effects/

Momentum = (Before, during, after, Always, Both) keyword to indicate when during a turn the effect should be runned. Before for before attacking. During for after the fastest Pkmn attack. After for after attacking. Always for the 3 of them. Both for Before and after.

A completed ITEM.PCP could look like this :
1519546699111.png

Every line is a different Item that can be used in battle.

When you create the TYPE.PCP file, you’re are defining the base elements of a Pokémon Type. That includes the Type Name, Weakness, Resistance, Type Immunities, effect Immunities and Move Category Immunities. Exactly in this order.

TypeName:Weakness1,Weakness2,,,,,,,,:Resistance1,Resistance2,,,,,,,,,,:Immunity1,immunity2,,,,,,,,,:EffectImmunity1,EffectImunnity2,,,,,,,,,:MoveCategoryImmunity1,MoveCategoryImmunity2,,,,,,,,/

A completed TYPE.PCP could look like this :
1519546788026.png

Every line is a different Type that can be used in Other PCP Files.

When you create the EFFECT.PCP file, you’re are defining the base elements of a Pokémon Status Effect, Weather effect, terrain effect or Field effect. That includes the Effect Name, Category, Momentum and Effects. Exactly in this order.

ItemName:Category:Momentum:effects/

Momentum = (Before, during, after, Always, Both) keyword to indicate when during a turn the effect should be runned. Before for before attacking. During for after the fastest Pkmn attack. After for after attacking. Always for the 3 of them. Both for Before and after.

A completed EFFECT.PCP could look like this :
1519546908443.png

*effects continues after...*

Every line is a different Effect that can be used in Other PCP Files.

The PCP effect coding are single line instruction using variables and functions. (Not Case Sensitive)




It comes with 2 runnable exe

one to create complete Pokémon (with EV, IV etc...)
and
one to play on the Battle simulator.


:psyglad: Haaaaa Finaly done !


EDIT: NOW SUPPORTS MULTI-LINE PCP CODING !!!
 
Last edited:
I assume it's the case because of the slash at the end of the line, but you're going to allow multiline coding, right?

Because it can get fairly difficult to read from what I've noticed.
 
I assume it's the case because of the slash at the end of the line, but you're going to allow multiline coding, right?

Because it can get fairly difficult to read from what I've noticed.
The coding is on one line only, but you can place an infinite amount of space between instruction (trimmed).


At the beginning, I was planning to allow multiline, but it creates a lot of bugs in the Pokémon_Creator. (Overflow of the String Tokenizer)

So I chose to use a line counter instead of the string tokenizer...

(I could Probably allow multiline by adding a number of element field) -> What do you think I should do ?

EDIT: I' ll try counting the amount of "/".



EDIT !!!

NOW SUPPORTS MULTI-LINE
 
Last edited:

peach

just know that if you hide it doesn't go away
is a Programmer Alumnusis a Battle Simulator Moderator Alumnus
do you plan on writing an entirely new pokemon sim for this?

lmao good luck, man
 
  • Like
Reactions: Wob

peach

just know that if you hide it doesn't go away
is a Programmer Alumnusis a Battle Simulator Moderator Alumnus
jw, how much of a sim do you have working right now?
 
jw, how much of a sim do you have working right now?
-Basic battle formula: DMG and Stat calculation.
-the pokémon creator.
-Basic Graphics (HP bar, Ability to load a sprite for each Mon, Background, Text Box for displaying game messages and Box to display moves.
-Music Loading.


The big of the job is proggramming the interpreter for PCP Files.

It may take 2 more Years, but I want to do this :fukyu:
 
Looks pretty good, it’s pretty cool that you made your own sim, and the aspect that’s offline is good, but showdown is so popular and well established that shifting sims would be hard.
 
Looks pretty good, it’s pretty cool that you made your own sim, and the aspect that’s offline is good, but showdown is so popular and well established that shifting sims would be hard.
I'm not hoping to replace show down :psyglad:.

I just want to offer people a way to play the game with their own pokémon and special rules.

The idea came when I saw a lot of people asking how to Play with their creation in the CAP forum (Even tho CAP is not really for personnal creation)


I Hope people will like it, but I don't ask them to quit showdown:psysly:.
 

peach

just know that if you hide it doesn't go away
is a Programmer Alumnusis a Battle Simulator Moderator Alumnus
ngl i dont think you quite realise how much work there is in a full pokemon sim like that. i'd personally suggest just writing this around PS's battle engine, since it's not too hard to feed arbitrary mons into it
 
ngl i dont think you quite realise how much work there is in a full pokemon sim like that. i'd personally suggest just writing this around PS's battle engine, since it's not too hard to feed arbitrary mons into it
I appreciate your suggestion, but I already set my mind on this.
I want to do a sim of my own. If it isn't that good, I don't care, I'll do it as a challenge.
 
I'm not hoping to replace show down :psyglad:.

I just want to offer people a way to play the game with their own pokémon and special rules.
I appreciate your suggestion, but I already set my mind on this.
I want to do a sim of my own. If it isn't that good, I don't care, I'll do it as a challenge.
The idea came when I saw a lot of people asking how to Play with their creation in the CAP forum (Even tho CAP is not really for personnal creation)


I Hope people will like it, but I don't ask them to quit showdown:psysly:.
I appreciate your suggestion, but I already set my mind on this.
I want to do a sim of my own. If it isn't that good, I don't care, I'll do it as a challenge.
 

Users Who Are Viewing This Thread (Users: 1, Guests: 0)

Top