Jump to content

Personal.narc Text Generator


Recommended Posts

I've made a tool to convert the Pokedex files from B2W2 into text. For example:

old:

Base HP: 150

Base Attack: 120

Base Defense: 100

Base Speed: 90

Base Sp. Attack: 120

Base Sp. Defense: 100

Type 1: Ghost

Type 2: Dragon

Catch Rate: 3

Stage: 3

EV Spread: 3

Item 1: 0

Item 2: 0

Item 3: 0

Gender: Genderless

Hatch Cycle: 120

Base Happiness: 0

EXP Rate: Slow

Egg Group 1: Undiscovered

Egg Group 2: Undiscovered

Ability 1: 26

Ability 2: 0

Ability 3(DW): 26

Flee Rate: 0

Form ID: 0

Form: 0

Number of Forms: 2

Pokedex Entry Color: Black

Base EXP: 306

Height: 69

Weight: 6500

TMs 1-32: Hone Claws

Dragon Claw

Calm Mind

Roar

Toxic

Hail

Hidden Power

Sunny Day

Hyper Beam

Protect

Rain Dance

Telekinesis

Safeguard

Frustration

Thunderbolt

Thunder

Earthquake

Return

Psychic

Shadow Ball

Double Team

You just need to extract the files from the narc(a/0/1/6) and insert one of the files.

link: https://www.dropbox.com/s/n8s3tgzckzxvshd/Dex_Reader.zip

Edited by LEGOanimal22
updated example, attached new version
Link to comment
Share on other sites

  • 1 month later...

nice tool :) , it would better is on xml, or json format. or html / pdf.

like :

<?xml version="1.0" encoding="UTF-8"?>
<gameformat gen="5">
<pokemon pid="676">
 <pname><!--depend on what you set, ... -->
     <en>Sylveon</en> 
     <jp>ニンフィア</jp>
 </pname>
 <basestat>
    <hp></hp>
    <atk></atk>
    <def></def>
    <sdef></sdef>
     .... etc
 </basestat>
... etc
</pokemon>

</gameformat>
...etc

is also good for parsing xml / json data for batch processing (can cross programming too) ... or just make them structured (like create csv file ...).

Link to comment
Share on other sites

  • 4 months later...

New text format:

<gameformat gen=BW2>

<basestat>

<hp>45</hp>

<atk>49</atk>

<def>49</def>

<spe>45</spe>

<satk>65</satk>

<sdef>65</sdef>

</basestat>

<typeone>Grass</typeone>

<typetwo>Poison</typetwo>

<catchrate>45</catchrate>

<stage>1</stage>

<evspread>

<satk>1</satk>

</evspread>

<item1>0</item1>

<item2>0</item2>

<item3>0</item3>

<genderrate>87.5% Male</genderrate>

<hatch>20</hatch>

<happiness>70</happiness>

<exprate>Medium-Slow</exp>

<egggroup1>Monster</egggroup1>

<egggroup2>Grass</egggroup2>

<ability1>65</ability1>

<ability2>0</ability2>

<abilityDW>34</abilityDW>

<fleerate>0</fleerate>

<formid>0</formid>

<form>0</form>

<numforms>1</numforms>

<dexcolor>Green</dexcolor>

<baseexp>64</baseexp>

<height>7</height>

<weight>69</weight>

<tm32>Toxic

Hail

Venoshock

Hidden Power

Sunny Day

Light Screen

Protect

Safeguard

Frustration

SolarBeam

Return

Double Team

</tm32>

<spectutor>Grass Pledge

</spectutor>

</gameformat>

Link to comment
Share on other sites

New text format:

<gameformat gen=BW2>

<basestat>

<hp>45</hp>

<atk>49</atk>

<def>49</def>

<spe>45</spe>

<satk>65</satk>

<sdef>65</sdef>

</basestat>

<typeone>Grass</typeone>

<typetwo>Poison</typetwo>

<catchrate>45</catchrate>

<stage>1</stage>

<evspread>

<satk>1</satk>

</evspread>

<item1>0</item1>

<item2>0</item2>

<item3>0</item3>

<genderrate>87.5% Male</genderrate>

<hatch>20</hatch>

<happiness>70</happiness>

<exprate>Medium-Slow</exp>

<egggroup1>Monster</egggroup1>

<egggroup2>Grass</egggroup2>

<ability1>65</ability1>

<ability2>0</ability2>

<abilityDW>34</abilityDW>

<fleerate>0</fleerate>

<formid>0</formid>

<form>0</form>

<numforms>1</numforms>

<dexcolor>Green</dexcolor>

<baseexp>64</baseexp>

<height>7</height>

<weight>69</weight>

<tm32>Toxic

Hail

Venoshock

Hidden Power

Sunny Day

Light Screen

Protect

Safeguard

Frustration

SolarBeam

Return

Double Team

</tm32>

<spectutor>Grass Pledge

</spectutor>

</gameformat>

Just a few suggestions to make it more XML compliant,

1. Change <gameformat gen=BW2> to <gameformat gen="BW2">

2. Separate the items in tm32 with something besides line breaks, whether it be commas, semi-colons, or have each TM be its own node (like <tm32><tm>Toxic</tm><tm>Hail</tm></tm32>), because for the most part, line breaks in XML are ignored, and sometimes removed entirely.

3. Perhaps try camel casing to make some nodes easier to read, so genderrate becomes genderRate, and dexcolor becomes dexColor.

Link to comment
Share on other sites

xml is standard for data exchange between different language and platform, but json is most popular because is slight more smaller.

here result my own export ... : https://dl.dropboxusercontent.com/u/3122097/Archive.7z (Pokemon BW/BW2), is just used simple one, not using List on the List to make them more complex to code. i not using struct classes, i just trying to avoid this one.

[
   {
       "index":1,
       "gamever":"bw2",
       "natdex":999,
       "hp":45,
       "atk":49,
       "def":49,
       "speed":45,
       "spatk":65,
       "spdef":65,
       "type1":11,
       type2":3,
       "catchrate":45,
       "stage":0,
       "evhp":0,
       "evatk":0,
       "evdef":0,
       "evspeed":0,
       "evspatk":1,
       "evspdef":0,
       "popup":0,
       "item1":0,
       "item2":0,
       "item3":0,
       "genderratio":31,
       "hatchrate":20,
       "happiness":70,
       "growrate":3,
       "egg1":1,
       "egg2":7,
       "Ability1":65,
       "Ability2":0,
       "Ability3":34,
       "EscapeRate":0,
       "FormStat":0,
       "FormSprite":0,
       "FormCount":1,
       "Color":3,
       "BaseExp":64,
       "Height":7,
       "Weight":69,
       "TM1":2218362656,
       "TM2":1153544,
       "TM3":2724201504,
       "TM4":4,
       "spetutor":1,
       "tutor1":64,
       "tutor2":0,
       "tutor3":1039,
       "tutor4":8194
   },...
]

Another :

[    
{
       "index":1,
       "gamever":"bw2",
       "natdex":999,
       "stat":
           [
               "hp":45,
               "atk":49,
               "def":49,
               "speed":45,
               "spatk":65,
               "spdef":65
           ]

is need another List<otherclass> on List<mainclass> ...

for library i used to parse json, i using http://json.codeplex.com/ , because is always update and support any platform XP.

it will benefit and save your time if the tool implement this one.

Link to comment
Share on other sites

  • 3 months later...

Here's a VB class if anyone is interested:

Public Class Pokedex_Entry

Public basehp As Byte

Public baseatk As Byte

Public basedef As Byte

Public basespeed As Byte

Public basespatk As Byte

Public basespdef As Byte

Public type1 As Byte

Public type2 As Byte

Public catchrate As Byte

Public stage As Byte

Public evs As UInt16

Public item1 As UInt16

Public item2 As UInt16

Public item3 As UInt16

Public gender As Byte

Public hatchcycle As Byte

Public baseball As Byte

Public exprate As Byte

Public egggroup1 As Byte

Public egggroup2 As Byte

Public ability1 As Byte

Public ability2 As Byte

Public ability3 As Byte

Public flee As Byte

Public formid As UInt16

Public form As UInt16

Public numforms As Byte

Public color As Byte

Public baseexp As UInt16

Public height As UInt16

Public weight As UInt16

End Class

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...