PO Mod Creation Guide (WIP)

Discussion in 'Database Modifications' started by Aerith, Jul 9, 2012.

  1. Aerith

    Aerith Banned

    Joined:
    Jan 6, 2011
    Messages:
    354
    Likes Received:
    1
    This is a guide for creating mods for PO Servers. These mods will only work with v2.0.02 or later.

    Making the mod directory
    In the same folder as the server, make a folder called Mods. Then inside that folder, make a folder for the name of your mod eg. Slime

    In that folder create a blank file called mod.ini

    Next you can copy the parts of the database you want to modify.

    Your folder should have the folowing files:
    Creating new moves
    This short tutorial will explain how to create new moves.

    First, in your db folder, find the folder Moves.

    Then, find moves.txt. Add the following lines for new moves (repeat this as many times as you need):
    Code (text):
    1. <mvid> <movename>
    For example:
    Code (text):
    1. 560 Lucid Light
    - This sets Lucid Light as move number 560. Move numbers should always go up by 1, so if you wanted to add another move, you could add:
    Code (text):
    1. 561 Wild Wind
    etc.

    Now you need to set global properties.
    The following format is:
    Code (text):
    1. <mvid> <property>
    Global Properties
    king_rock: The determines whather the move is affected by King's Rock (1 yes, 0 no)
    move_description: string giving the description of the move.
    move_effect: string giving the effect of the move.

    Creating a new pokemon

    When creating a pokemon, you need to edit a few files:
    ->db/pokes/pokemons.txt:
    Code (text):
    1. 650:0 NewPoke
    You also need to create height.txt, weight.txt, stats.txt, gender.txt and put the appropriate data there. You may create icons.zip with the icon graphics for the pokemon too.

    Then you need to go in the 5G/ folder, add the same lines you added to pokemons.txt to a new file called "released.txt". You also need to do that in the 5G/Subgen 1/ folder. (This is if you're using the last gen/subgen to put your changes into)

    You also need to create the files type1.txt, type2.txt, ability1/2/3.txt in the folder 5G. Last but not least, you need to give your new pokemon at least one level up move (unless it's a forme), so create a file named "level_moves.txt".

    If you want to add moveset: this is a dirty approach, but you can edit the main PO db (not the mod) to reflect the changes in your mod, then you can use the MoveMachine to add moves to your pokemon. Then you can get the appropriate lines from the move files in the main db (move machine would have edited them) and put them into your mod, and restore your main db to a clean state.

    If your mod has evolutions and you put that in the correct file, MoveMachine should add moves from underevos to their evos in the "pre_evo_moves.txt" (if the evos already don't have them). If you want to do breeding moves and breeding combinations, PO also has some utilities to calculate breeding combinations, but I will add how to do so on request.

    Examples
    - http://www.mediafire.com/download/a8dj644cv0z8yye/MM's_Ultimate_Custom_Mod.zip <- huge amount of formes, sprites
    - http://www.mediafire.com/download/trh5zh52a1092ex/DiamondMeta.zip <- some new pokemon added
     
    Last edited by a moderator: Jul 14, 2013
  2. Arceus

    Arceus Member

    Joined:
    May 20, 2010
    Messages:
    238
    Likes Received:
    0
    I might as well contribute to this by adding how to add another forme of a Pokemon.

    1. Create a folder with the name of your mod and put a mod.ini file in it.
    2. Create the a folder called db.
    3. Open up the new folder called db and make another folder called pokes.
    4. Create the following files: gender.txt, height.txt, icons.zip, level_balance.txt, gender.txt, stats.txt, and weight.txt.
    5. Create a folder in the pokes folder called 5G.
    6. Create the following files: ability1.txt, ability2.txt, ability3.txt, released.txt, sprites.zip, type1.txt, and type2.txt.

    The name of the Pokemon is controlled by pokemons.txt or whichever language you are using (you can access other languages in trans/xx/db/pokes/pokemons.txt, if you don't put anything there for your pokemon it will revert to the english file for that pokemon). To get it to be an alternate forme, put the Pokedex number of the Pokemon you are adding a forme for followed by a colon and then a 1. Leave one space then put the name of the Pokemon with the forme.

    Example:
    Code (text):
    1. 249:1 Lugia-Shadow
    To get sprites for it go to your sprites zip file. You will need to copy the folder and name structure to get the proper sprites. If you are unsure, just look at the /db/pokes/5G/sprites.zip file for the structure.

    For the icon to be displayed, open icons.zip. Add the image file to it. It should be named the Pokedex number followed by a hyphen then its forme number.

    If you only add these files, it will inherit any moves that its regular forme has. If you wish to remove moves, you must make the move files and put a place holder that has no moves.


    Hope this helps some.
     
    Last edited by a moderator: Jul 12, 2012
  3. TrainerTysen

    TrainerTysen New Member

    Joined:
    Sep 27, 2010
    Messages:
    24
    Likes Received:
    0
    In regards to creating new pokemon moves, how do you know what to put for the special effect and flags values?
     
  4. Arceus

    Arceus Member

    Joined:
    May 20, 2010
    Messages:
    238
    Likes Received:
    0
    For special_effects.txt you need to find a move that has the same effect as the move you are adding and use that value. Example: You want a move that forces the opponent to switch. You would look at the file in the database for where Whirlwind is and take note of the value. In this case you would put 560 107#movename on the line. Flags I have no idea how the value is gotten. I think it involves special conditions a move can be used in,but I'm not positive. coyotte any help?
     
  5. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
  6. TrainerTysen

    TrainerTysen New Member

    Joined:
    Sep 27, 2010
    Messages:
    24
    Likes Received:
    0
    Thanks for the guide update I really appreciate it! :)
     
  7. shadoninja

    shadoninja New Member

    Joined:
    Nov 8, 2010
    Messages:
    4
    Likes Received:
    0
    Are there any programs being developed that will create and edit all these files? I know there was something someone did that was for linux, but I'm not sure how to use that.

    I'm not interested in creating new pokemanz. I want to add formes to all the dual-typed pokemon.
     
  8. sam2

    sam2 New Member

    Joined:
    Jul 26, 2012
    Messages:
    8
    Likes Received:
    0
    do you put the . in dp.
     
  9. Isa

    Isa Well-Known Tauros

    Joined:
    Dec 11, 2011
    Messages:
    936
    Likes Received:
    1,006
    PO Trainer Name:
    Isa
    So uh.

    Have the higher-ups tried editing existing moves?
     
  10. Arceus

    Arceus Member

    Joined:
    May 20, 2010
    Messages:
    238
    Likes Received:
    0
    Move editing works fine if you edit things the correct way.
     
  11. Isa

    Isa Well-Known Tauros

    Joined:
    Dec 11, 2011
    Messages:
    936
    Likes Received:
    1,006
    PO Trainer Name:
    Isa
    For me removing moves from a Pokémon won't work as the client will just re-add the missing move, neither does altering effects. If I want SmokeScreen to be a damaging attack that may confuse, it still lowers the accuracy of the foe.

    I talked to nixeagle about this. He made me remove all mentions of Venusaur in my database, so I did. He still popped up with his regular stats and movepool, even the sprite (which I had deleted).

    This is all Gen 1 stuff, if that matters.
     
  12. Arceus

    Arceus Member

    Joined:
    May 20, 2010
    Messages:
    238
    Likes Received:
    0
    To completely remove a move from a Pokemon, make sure you remove it from the subgens folders also. I know it is possible to remove entire learnsets because I've done it with one of my mods.

    You might also check out this.
     
  13. Isa

    Isa Well-Known Tauros

    Joined:
    Dec 11, 2011
    Messages:
    936
    Likes Received:
    1,006
    PO Trainer Name:
    Isa
    I've done that. In fact I created a completely new subgen, replaced the moveset txt's of all subgens of the relevant generation with my own copy, still there.

    Have you tried it in Gen 1?
     
  14. Arceus

    Arceus Member

    Joined:
    May 20, 2010
    Messages:
    238
    Likes Received:
    0
    I've never done it with Gen 1, but I've made a Shadow Lugia Mod that makes it so Shadow Lugia can only use its four Shadow Moves in everything 3rd generation and higher.
     
  15. Isa

    Isa Well-Known Tauros

    Joined:
    Dec 11, 2011
    Messages:
    936
    Likes Received:
    1,006
    PO Trainer Name:
    Isa
    That's adding something new, not editing something existing - unless you mean that you replaced Lugia entirely instead of adding a new form.
     
  16. Arceus

    Arceus Member

    Joined:
    May 20, 2010
    Messages:
    238
    Likes Received:
    0
    When you make a new Pokemon a forme of an existing Pokemon, it inherits every move that it is a forme of.
     
  17. Isa

    Isa Well-Known Tauros

    Joined:
    Dec 11, 2011
    Messages:
    936
    Likes Received:
    1,006
    PO Trainer Name:
    Isa
    Still adding something previously non-existing.

    Hey, do me a favor and try removing all moves from any given Pokémon in Gen 1 - say Caterpie for the ease of it - and tell me your results. If you succeed, I'm content.
     
  18. Arceus

    Arceus Member

    Joined:
    May 20, 2010
    Messages:
    238
    Likes Received:
    0
    I got it to not show Caterpie in the Pokemon list by taking away all its moves in Gen 1. All I did was change the level_moves.txt file to 10:0 0 in 1G and in all the Subgen folders of 1G. If you change the 0 to a 1, then it gives Caterpie Pound.
     
  19. Isa

    Isa Well-Known Tauros

    Joined:
    Dec 11, 2011
    Messages:
    936
    Likes Received:
    1,006
    PO Trainer Name:
    Isa
    That's interesting, that has not yet worked for me - but I didn't put a 0 in, I just left the fields empty. I will try again tomorrow. Thanks for the help!

    edit: Thanks a lot, Arceus! You've helped me out significantly. I didn't think of putting a 0 in, but when I did, it all worked. I am very grateful and appreciate your helping efforts a lot!
     
    Last edited: Aug 15, 2012
  20. Arceus

    Arceus Member

    Joined:
    May 20, 2010
    Messages:
    238
    Likes Received:
    0
    If you still can't get it to work tomorrow, I'll send you a zip file with the changes.
     
  21. Isa

    Isa Well-Known Tauros

    Joined:
    Dec 11, 2011
    Messages:
    936
    Likes Received:
    1,006
    PO Trainer Name:
    Isa
    Don't worry, I edited my above post before I saw your reply. It all worked out. Thanks a lot for your help!
     
  22. Isa

    Isa Well-Known Tauros

    Joined:
    Dec 11, 2011
    Messages:
    936
    Likes Received:
    1,006
    PO Trainer Name:
    Isa
    Hey, it's me again. I am having troubles to get moves to ignore their old effect after editing them. I've edited Double Team into becoming a move that confuses the opponent, but when I use it, it does that but also uses the old effect of increasing evasion, but on the new target. I feel that I've messed up somewhere and would be glad for any help.
     
  23. Arceus

    Arceus Member

    Joined:
    May 20, 2010
    Messages:
    238
    Likes Received:
    0
    First make a file called stataffected.txt if you haven't done so. Put 104 0 in it. Next create a file called statboost.txt and put 104 0 in it. After doing that, it should work as you intend it to.
     
  24. Isa

    Isa Well-Known Tauros

    Joined:
    Dec 11, 2011
    Messages:
    936
    Likes Received:
    1,006
    PO Trainer Name:
    Isa
    ...oh my god. It was there all along.

    *HEADDESK*

    Yeah, that was what caused the problem. I feel incredibly stupid.

    Thanks for the help once again, Arceus.
     
  25. Isa

    Isa Well-Known Tauros

    Joined:
    Dec 11, 2011
    Messages:
    936
    Likes Received:
    1,006
    PO Trainer Name:
    Isa
    So it's me again...

    I experience problems trying to get Ghost moves to be super effective versus Psychic in Gen 1. I've altered my typestable_gen1.txt to the following, which should do the trick, but curiously enough all it does is making my Ghost attacks hit neutrally versus Psychics.

    Ghost is row 7 (starting with 0), Psychic is column 13.

    Code (text):
    1. 0 2 2 2 2 2 1 2 0 1 2 2 2 2 2 2 2 2 2
    2. 1 4 2 1 1 2 4 1 0 4 2 2 2 2 1 4 2 4 2
    3. 2 2 4 2 2 2 1 4 2 1 2 2 4 1 2 2 2 2 2
    4. 3 2 2 2 1 1 1 4 1 0 2 2 4 2 2 2 2 2 2
    5. 4 2 2 0 4 2 4 1 2 4 4 2 1 4 2 2 2 2 2
    6. 5 2 1 4 2 1 2 4 2 1 4 2 2 2 2 4 2 2 2
    7. 6 2 1 1 4 2 2 2 2 1 1 2 4 2 4 2 2 4 2
    8. 7 0 2 2 2 2 2 2 4 1 2 2 2 2 4 2 2 1 2
    9. 8 2 2 2 2 2 4 2 2 1 1 1 2 1 2 4 2 2 2
    10. 9 2 2 2 2 2 1 4 2 4 1 1 4 2 2 4 1 2 2
    11. 10 2 2 2 2 4 4 2 2 2 4 1 1 2 2 2 1 2 2
    12. 11 2 2 1 1 4 4 1 2 1 1 4 1 2 2 2 1 2 2
    13. 12 2 2 4 2 0 2 2 2 2 2 4 1 1 2 2 1 2 2
    14. 13 2 4 2 4 2 2 2 2 1 2 2 2 2 1 2 2 0 2
    15. 14 2 2 4 2 4 2 2 2 1 2 1 4 2 2 1 4 2 2
    16. 15 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 4 2 2
    17. 16 2 1 2 2 2 2 2 4 1 2 2 2 2 4 2 2 1 2
    18. 17 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
     
  26. Arceus

    Arceus Member

    Joined:
    May 20, 2010
    Messages:
    238
    Likes Received:
    0
    Change the 2 to a four. 0 = no effect, 1 = half, 2 = neutral, 4 = double. I think you miscounted spaces.
     
  27. Isa

    Isa Well-Known Tauros

    Joined:
    Dec 11, 2011
    Messages:
    936
    Likes Received:
    1,006
    PO Trainer Name:
    Isa
    Oops - column 14. My bad. Made a typo, but the file is correct.

    Here it is again, with side tabs for easier reading:

    Code (text):
    1. 0 2 2 2 2 2 1 2 0 1 2 2 2 2 2 2 2 2 2 NORMAL
    2. 1 4 2 1 1 2 4 1 0 4 2 2 2 2 1 4 2 4 2 FIGHTING
    3. 2 2 4 2 2 2 1 4 2 1 2 2 4 1 2 2 2 2 2 FLYING
    4. 3 2 2 2 1 1 1 4 1 0 2 2 4 2 2 2 2 2 2 POISON
    5. 4 2 2 0 4 2 4 1 2 4 4 2 1 4 2 2 2 2 2 GROUND
    6. 5 2 1 4 2 1 2 4 2 1 4 2 2 2 2 4 2 2 2 ROCK
    7. 6 2 1 1 4 2 2 2 2 1 1 2 4 2 4 2 2 4 2 BUG
    8. 7 0 2 2 2 2 2 2 4 1 2 2 2 2 4 2 2 1 2 GHOST
    9. 8 2 2 2 2 2 4 2 2 1 1 1 2 1 2 4 2 2 2 STEEL
    10. 9 2 2 2 2 2 1 4 2 4 1 1 4 2 2 4 1 2 2 FIRE
    11. 10 2 2 2 2 4 4 2 2 2 4 1 1 2 2 2 1 2 2 WATER
    12. 11 2 2 1 1 4 4 1 2 1 1 4 1 2 2 2 1 2 2 GRASS
    13. 12 2 2 4 2 0 2 2 2 2 2 4 1 1 2 2 1 2 2 ELECTRIC
    14. 13 2 4 2 4 2 2 2 2 1 2 2 2 2 1 2 2 0 2 PSYCHIC
    15. 14 2 2 4 2 4 2 2 2 1 2 1 4 2 2 1 4 2 2 ICE
    16. 15 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 4 2 2 DRAGON
    17. 16 2 1 2 2 2 2 2 4 1 2 2 2 2 4 2 2 1 2 DARK
    18. 17 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ???
    19.    N F F P G R B G S F W G E P I D D ?
    20.    O I L O R O U H T I A R L S C R A ?
    21.    R G Y I O C G O E R T A E Y E A R ?
    22.    M H I S U K   S E E E S C C   G K ?
    23.    A T N O N     T L   R S T H   O
    24.    L I G N D               R I   N
    25.      N                     I C
    26.      G                     C
     
  28. Isa

    Isa Well-Known Tauros

    Joined:
    Dec 11, 2011
    Messages:
    936
    Likes Received:
    1,006
    PO Trainer Name:
    Isa
    Bump due to impatience. =p Could someone with steady access to a server check and see if I am the only one with this problem?
     
  29. KennedyXOXO

    KennedyXOXO Spriter

    Joined:
    May 16, 2012
    Messages:
    59
    Likes Received:
    0
    how does the move machine work? does it autosave to their real movesets?
     
  30. Arceus

    Arceus Member

    Joined:
    May 20, 2010
    Messages:
    238
    Likes Received:
    0
    Yes it does.
     
  31. Crystal Moogle

    Crystal Moogle Ayaya~ Administrator Administrator

    Joined:
    Jul 19, 2010
    Messages:
    3,205
    Likes Received:
    531
    PO Trainer Name:
    Hanako
    [​IMG]
    Seems to work for me :x

    With
    Code (text):
    1.  
    2. 0 2 2 2 2 2 1 2 0 1 2 2 2 2 2 2 2 2 2
    3. 1 4 2 1 1 2 4 1 0 4 2 2 2 2 1 4 2 4 2
    4. 2 2 4 2 2 2 1 4 2 1 2 2 4 1 2 2 2 2 2
    5. 3 2 2 2 1 1 1 4 1 0 2 2 4 2 2 2 2 2 2
    6. 4 2 2 0 4 2 4 1 2 4 4 2 1 4 2 2 2 2 2
    7. 5 2 1 4 2 1 2 4 2 1 4 2 2 2 2 4 2 2 2
    8. 6 2 1 1 4 2 2 2 2 1 1 2 4 2 4 2 2 4 2
    9. 7 0 2 2 2 2 2 2 4 1 2 2 2 2 4 2 2 1 2
    10. 8 2 2 2 2 2 4 2 2 1 1 1 2 1 2 4 2 2 2
    11. 9 2 2 2 2 2 1 4 2 4 1 1 4 2 2 4 1 2 2
    12. 10 2 2 2 2 4 4 2 2 2 4 1 1 2 2 2 1 2 2
    13. 11 2 2 1 1 4 4 1 2 1 1 4 1 2 2 2 1 2 2
    14. 12 2 2 4 2 0 2 2 2 2 2 4 1 1 2 2 1 2 2
    15. 13 2 4 2 4 2 2 2 2 1 2 2 2 2 1 2 2 0 2
    16. 14 2 2 4 2 4 2 2 2 1 2 1 4 2 2 1 4 2 2
    17. 15 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 4 2 2
    18. 16 2 1 2 2 2 2 2 4 1 2 2 2 2 4 2 2 1 2
    19. 17 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
    20.  
    Maybe I'm missing something :x
     
  32. Isa

    Isa Well-Known Tauros

    Joined:
    Dec 11, 2011
    Messages:
    936
    Likes Received:
    1,006
    PO Trainer Name:
    Isa
    That's the exact table I use. I have no idea why it won't work for me. :/
     
  33. Lamperi

    Lamperi I see what you did there

    Joined:
    Apr 25, 2010
    Messages:
    2,647
    Likes Received:
    11
    Maybe the server.exe distributed with 2.0.05 or whatever stil doesn't have the fix for 1st gen mods :x
     
  34. Isa

    Isa Well-Known Tauros

    Joined:
    Dec 11, 2011
    Messages:
    936
    Likes Received:
    1,006
    PO Trainer Name:
    Isa
    Wait, what? Could you expand upon that please? Are there known bugs with gen 1 mods that you have only fixed recently or not at all?
     
  35. SerOlmyApSennon

    SerOlmyApSennon New Member

    Joined:
    May 8, 2012
    Messages:
    9
    Likes Received:
    0
    So, I noticed under the folders db->pokes, the poke_ability1_5g and the like are still there, while in db->pokes->5G there are ability1, ability2, ability3 files. Are we to ignore the "old" files found in db->pokes and only edit the db->pokes->#G folder files? I just want to know if all the files I'd need to work with are under their respective #G folder or found in the pokes folder under db.
     
  36. Arceus

    Arceus Member

    Joined:
    May 20, 2010
    Messages:
    238
    Likes Received:
    0
    It doesn't use the files that say poke_ability1_5G. It only uses ability1.txt, ability2.txt, and ability3.txt.
     
  37. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    Install PO in a fresh folder, you'll see a lot of useless files are not there anymore.
     
  38. Shiyo

    Shiyo New Member

    Joined:
    May 4, 2010
    Messages:
    24
    Likes Received:
    0
    What is it necessary to do in order that the item Eviolite arises effect in a fakemon preevolución? Is it necessary to modify script, tier or something?
     
  39. HOIMACHINGA

    HOIMACHINGA New Member

    Joined:
    Dec 11, 2012
    Messages:
    1
    Likes Received:
    0
    i cant save the moves i add?
     
  40. KrisTami

    KrisTami How much is that Mew in the water?

    Joined:
    Dec 13, 2012
    Messages:
    24
    Likes Received:
    2
    PO Trainer Name:
    KrisTami
    I made a shadow Lugia on the folder titled "World of Power", but when I use the server on it, it goes like this:

    Code (text):
    1. Connection to the database established! Starting loading pokemon database...
    2.  Pokemon database loaded
    3.  Move, abilities & items special effects loaded
    4.  Members loaded
    5.  Battle Thread started
    6.  Starting to listen to port 5080
    7.  Channel Radio Tower was created
    8.  Running Daily Run for tier All
    9.  0 alts removed from the ladder.
    10.  0 secs
    11.  
    12.  Script Check: OK

    The server actually removed the Lugia from my team, and that's why the battles never detect Lugia on!