PDA

View Full Version : B/W Trainer Editor



KazoWAR
Feb 1st, 2011, 04:12 AM
trdata = a/0/9/2
trpoke = a/0/9/3

How to use: http://www.youtube.com/watch?v=XVVjaRgmB9Y

v1.1a
Tweaked the lists for trainer names and trainer class.

http://dl.dropbox.com/u/3706406/Files/BWTE.png

Guested
Feb 1st, 2011, 04:33 AM
Looks pretty cool, Kazo.
Glad to see there is progress being made into BW hacking.

I look forward to playing around with this.

Kaphotics
Feb 1st, 2011, 05:35 AM
aweeeeeesoooooommmeee

MDS
Feb 1st, 2011, 08:45 AM
Im a noob and im doing something wrong, I used Dslazy to unpack the rom, you say that we need to open the files 2 & 3 from a/0/9 but with BWTE you can only select a folder, not a specific file... Can someone explain me like a 5 years old kid please? What programs should I use?

Oh, and thank you for your work Kazo!

KazoWAR
Feb 1st, 2011, 10:12 AM
Rename both files and add a .narc extension and open them in an narc unpacking program. then you will get 2 folders that have 616 little files inside them select those folders in the trainer editor. after editing repack the folders in to narc files.

MDS
Feb 1st, 2011, 10:43 AM
Ohhh, now all is more clear now, thank you very much :D

MDS
Feb 1st, 2011, 11:22 AM
What is this unknown number? Could it be the IV/EVs? Or it`s better not mess with it?

http://i52.tinypic.com/2rnvc7k.jpg

KazoWAR
Feb 1st, 2011, 11:36 AM
What is this unknown number? Could it be the IV/EVs? Or it`s better not mess with it?

http://i52.tinypic.com/2rnvc7k.jpg

I think it it like a PID. I know it is what determines gender, maybe even natures, abilities, and alternate forms. Not really sure, I have not really researched it.

Roihu
Feb 4th, 2011, 09:17 PM
The Trainer's Unknown is the AI. js

KibaLG8
Feb 6th, 2011, 02:14 PM
I think it it like a PID. I know it is what determines gender, maybe even natures, abilities, and alternate forms. Not really sure, I have not really researched it.

I thought it would be Happiness, since it goes up to 255.

aninymouse
Feb 6th, 2011, 03:41 PM
I thought it would be Happiness, since it goes up to 255.

Any 2-digit hex number goes up to 255: FF

BTW, thanks for the tool, Kazo! Maybe I'll start messing around with BW before too long, but I still feel like there's work to be done in Gen 4.

lowgster
Feb 7th, 2011, 12:04 AM
I need help, what progams do i use to extract narc files?

KibaLG8
Feb 7th, 2011, 09:28 PM
^ I suggest using kiwi.ds, thats what I used to extract the narc files and then insert the a/0/9/2 file into kiwi.ds and extract all of it, do the same for the a/0/9/3.

I need help, what programs do I use to reinsert the edited narc files? I have crystalTile 2 but its mostly in Japanese, so I don't know what to do on it.:( Any suggestions.

lowgster
Feb 7th, 2011, 10:32 PM
alright i got it and did it for a/0/9/2 but when i tried to insert a/0/9/3 it wouldn't show, so what do i do?

aninymouse
Feb 8th, 2011, 02:36 AM
^ I suggest using kiwi.ds, thats what I used to extract the narc files and then insert the a/0/9/2 file into kiwi.ds and extract all of it, do the same for the a/0/9/3.

I need help, what programs do I use to reinsert the edited narc files? I have crystalTile 2 but its mostly in Japanese, so I don't know what to do on it.:( Any suggestions.

search this forum. i have made about 5 gazillion posts on this already. if you can't figure out crystaltile2 there are other programs that work just as good for that.

Neo
Mar 6th, 2011, 08:31 AM
Nice job Kazo

KazoWAR
Mar 15th, 2011, 01:11 AM
Updated, check first post.

aninymouse
Mar 15th, 2011, 04:02 PM
Thank ya, bud :)

Drayano
Mar 15th, 2011, 07:39 PM
The new version's good, thank you.

I was wondering though; would it be possible to have it so trainers are listed either with name first THEN number (ie Cynthia - 567 rather than 567: Cynthia) or without numbers at all? It's a lot easier to enter a name in and go straight to that trainer rather than search through the numbers to find the trainer you want, but it's currently impossible to do so.

KazoWAR
Mar 15th, 2011, 09:41 PM
you are right, i should change it. At first it was just the names but some names are repeated so it caused problems.

aninymouse
Mar 15th, 2011, 11:00 PM
I like the numbers. They serve as a nice point of reference once you get into totally replacing out the trainers.

Drayano
Mar 16th, 2011, 11:22 AM
This will make it a lot easier. Thank you very much!

xShadowBlitzx
Mar 16th, 2011, 11:27 AM
First of all, thank you for this amazing tool. Would it be possible for you to add the feature to change a trainers Ability and Gender so we can make it easier for set-ups such as Attract and Pokémon using rest with the early bird ability?

Oxnite
Mar 18th, 2011, 07:44 AM
Thank you very much for this tool, KazoWAR.

Siam
Mar 20th, 2011, 11:04 PM
Thanks for the tool

however I wish to ask on the aspect of recurring trainers like Bianca and Cheren. How do I tell if they are the Cheren or Bianca at certain point in the game?

Oxnite
Mar 21st, 2011, 10:35 AM
Thanks for the tool

however I wish to ask on the aspect of recurring trainers like Bianca and Cheren. How do I tell if they are the Cheren or Bianca at certain point in the game?

You might want to use another reference, for example this site for Cheren (http://www.serebii.net/blackwhite/cheren.shtml) and / or Bianca (http://www.serebii.net/blackwhite/bianca.shtml). You then only have to check their teams at that certain point in the game.

geoalpha
Mar 21st, 2011, 11:48 AM
Love the editor ^.^
I was needing an extensive list, so I decided to make one to help myself and anyone who needs such a list. Here is a spreadsheet with all the trainers with their names and locations matched up to their id's.

EDIT: Oh yeah, I couldn't pinpoint the exact id for the grunts in the Dreamyard, so if anyone wants to clear that up, please do. I don't think there are any other problems with the list, but if there is, tell me :P

EDIT2: Fixed the Dreamyard grunt. Again, tell me if anything's wrong in the list.

blazer
Mar 21st, 2011, 06:24 PM
I can't even open up the program to edit any trainers, and where it says to open up the data you can only choose folders not the rom itself.

geoalpha
Mar 22nd, 2011, 06:00 AM
I can't even open up the program to edit any trainers, and where it says to open up the data you can only choose folders not the rom itself.

That's not how the editor works. You need to extract 2 narc files from the rom (a/0/9/2 and a/0/9/3). Then you must extract the files within those narc files into 2 folders i.e. one folder for the 2 narc and one folder for the 3 narc. The 2 narc is the trdata and the 3 narc is the trpoke. At this point, you can start editing. Once you've finished, do the steps in reverse; compress the folders into their respective narc files, and reinsert the narcs into the rom.

Also, there is clearly a link in the very first post to a video that can guide you through this.

Andibad
Mar 22nd, 2011, 08:44 AM
Thank you kazorWar, i was late :) but i used this program since version 1, and is friendly, just 4 miin i was can change trainer like elitefour also chynthia :D, yeah without you video, but i was found this source code and i complied my self, is really good but something missid but is not to important.

anyway is just change trainer pokemon, money and ect only, yeah someone asked is can change mode battle like iris + someone, i think is too complex than this :D

and my last word : THANK YOU VERY MUCH, but you can added sprite of every trainer? gender value? EV, IV?

Abacus
Mar 23rd, 2011, 07:50 PM
Awesome job, Kazo!

So, I was tinkering around with the "unknown" value on the individual pokemon tab and found out some fairly simple things relating to gender/abilities. While the vast majority of trainers have all of their pokemons' unknown value set to 0, many of the harder trainers have it at either 16 or 32. I didn't get a chance to actually test this out by modding a random trainer's pokemon then checking with Synchronize, but I did cross-reference the values of every single Rival, Villain, Gym Leader and E4 member's pokemon with their pages on Serebii. With only two exceptions, all pokemon with an unknown value of 16 use their first ability, and those with 32 use their second one.

As for the exceptions, Elesa's Emolga/Emolga/Zebstrika were male/female/male and had values of 1/2/1. This one I actually tested out - pokemon will be male with an unknown value of 1 and female with a value of 2. The other exception was Shauntal's Jellicent, with an unknown value of 34. It's a female with Cursed Body (Jellicent's second ability). This most likely has something to do with Jellicent's differing male/female forms.

One final thing I noticed was that Grimsley's two Scrafty both have Moxie and the same unknown value, though one's a dude and the other's a chick.

Drayano
Mar 23rd, 2011, 08:15 PM
With only two exceptions, all pokemon with an unknown value of 16 use their first ability, and those with 32 use their second one.

I was literally just about to say this myself after doing a bit of testing for the last half an hour~! I can confirm that's true. In addition, 87 (a random value I tried) seems to make the Pokemon female with ability one, but no trainers use that by default.

For the record, I have no clue about the Scrafty case.

ryoko_ueda
Mar 24th, 2011, 03:16 PM
Is there a way to know what each trainer class is when you change it without guessing, because PKMN Trainer 001, PKMN Trainer 065, ect doesn't really help me figure it out.

geoalpha
Mar 24th, 2011, 04:51 PM
I was literally just about to say this myself after doing a bit of testing for the last half an hour~! I can confirm that's true. In addition, 87 (a random value I tried) seems to make the Pokemon female with ability one, but no trainers use that by default.
To top it off, 48 is the magic number for Dream World abilities. ^.^

winzev
Mar 25th, 2011, 06:10 AM
To top it off, 48 is the magic number for Dream World abilities. ^.^

really ?? so the 48 is the Dream World Ability huh ?? Then how about 64 ?? Anyone tried ??

Btw can we make some trainer rebattleable everyday just like Cheren ??

geoalpha
Mar 25th, 2011, 04:42 PM
really ?? so the 48 is the Dream World Ability huh ?? Then how about 64 ?? Anyone tried ??
I tried 64 once, and didn't notice any significant change. I was testing them by catching the trainer's pokemon (ar ftw), and all the values said so far work, sans 64.

RobbieNewton
Mar 27th, 2011, 11:24 AM
Edit: Got it working now, I forgot to delete the original NARC files, tahts what it was. Great program man. So far, used it to replace Marshal with Blue's team (assuming Charizard, but swapping Charizard with Ho-Oh) from Fire Led/Leaf Green. Can't wait to really experiment :D And I can do the gym leaders too, since with AR, we can rematch people.

whatever
Mar 28th, 2011, 01:41 PM
Are you sure this 250 value sets the difficulty? (2nd pic)

http://dl.dropbox.com/u/3706406/Files/BWTE.png

RobbieNewton
Mar 28th, 2011, 02:37 PM
Seems like I can't actually rematch Leaders, ah well. Gonna put Pseudo-Leaders in Black City in that case, already replaced youngster Robbie (>_>)'s team with Misty's team. Also, anyone worked out what the Unknown value for Shiny will be? I have Lance in the E4 >_>

Kaphotics
Mar 28th, 2011, 05:31 PM
Looking at these unknowns, it screams bit flags. How so?



5th and 6th bits - Ability
16 - Ability 1 -- 010000
32 - Ability 2 -- 100000
48 - Ability 3 -- 110000 (Dream World)

Both being 0 would result in an unset (random???) ability. Untested!


1st and 2nd bits - Gender
1 - Male - 01
2 - Female - 10

Both being 0/1 would result in an unset (random???) gender.

87 (11) is female. Is 00 male?

Combining these...


34 - 100010 -- Ability 2 and Female
Cursed body female Jellicent as reported by Abacus

87 - 1010111 -- Ability 1, Female. It has a 7th bit, no clue what that does!

1,2,5,6 bits explained. I haven't fiddled with this thing at all (just observing from afar) -- So I ask you all this:
Would IVs and EVs be set by these different bits? Max or Zero, or Max, 20, 0 or random??

;)

geoalpha
Mar 28th, 2011, 05:48 PM
1,2,5,6 bits explained. I haven't fiddled with this thing at all (just observing from afar) -- So I ask you all this:
Would IVs and EVs be set by these different bits? Max or Zero, or Max, 20, 0 or random??


Not sure about EV's, but IV's are definitely set by the "Difficulty" value IIRC.

Also, I'm pretty sure that if the ability bit is set to 00, it will always be ability 1. I can't say the same for the gender though.

Kaphotics
Mar 28th, 2011, 05:56 PM
Not sure about EV's, but IV's are definitely set by the "Difficulty" value IIRC.

250 is really close to 255 (FF, screaming bitflags again!), if someone can catch the trainer's mons and report the IVs (if they stick).

250 = 11111010

For a slow Cofagrigus, it'd have a max everything except speed.

Uppermost bits might be the IV max/min toggle, HP/A/D/SA/SD/Sp. Sp being untoggled, zero! No clue what those lowest 2 are for (smarts?) Just theorizing.

Seeing a Chandelure with the same 250, it might not be in that exact order after all.

geoalpha
Mar 28th, 2011, 06:05 PM
250 is really close to 255 (FF, screaming bitflags again!), if someone can catch the trainer's mons and report the IVs (if they stick).

250 = 11111010

Uppermost bits might be the IV max/min toggle, HP/A/D/SA/SD/Sp. Sp being untoggled, zero! No clue what those lowest 2 are for (smarts?) Just theorizing.

Just tested. Set a Whirlipede to 250 difficulty and has 30 in all IV's.

Kaphotics
Mar 28th, 2011, 06:14 PM
Just tested. Set a Whirlipede to 250 difficulty and has 30 in all IV's.

Yeah, it definitely controls IVs. Looks like it can't define each one individually. (You'd need 5 bits per IV lol, which is 30 and we have 8!)


255 = 31/31/31/31/31/31 -- 11111111
250 = 30/30/30/30/30/30 -- 11111010
0 = 0/ 0/ 0/ 0/ 0/ 0 -- 00000000 -- Assuming this is the case.

5 bits for IVs (76543)
31 -- 11111
30 -- 11110
0 -- 00000

Just trying to do some pattern recognition!

geoalpha
Mar 28th, 2011, 06:17 PM
Yeah, it definitely controls IVs. Looks like it can't define each one individually. (You'd need 5 bits per IV lol, which is 30 and we have 8!)


255 = 31/31/31/31/31/31 -- 11111111
250 = 30/30/30/30/30/30 -- 11111010
0 = 0/ 0/ 0/ 0/ 0/ 0 -- 00000000 -- Assuming this is the case.

5 bits for IVs (76543)
31 -- 11111
30 -- 11110
0 -- 00000

Just trying to do some pattern recognition!

Also, setting it to 255 makes all IV's 31. (Just tested)

On the middle values, you might have it misplaced. I did difficulty value 151, which gave me 18 IV's. So, 151 is 1001011. 18 is 10010. It would appear that the IV number is only the first five.

OH YEAH!!! Also changed the unknown value to 62, which is 111110. It correctly gave me the dream world ability, and also changed the gender to female (originally male). AND it changed the nature to Docile when it was originally Timid.

Kaphotics
Mar 28th, 2011, 06:34 PM
Also, setting it to 255 makes all IV's 31. (Just tested)

On the middle values, you might have it misplaced. I did difficulty value 151, which gave me 18 IV's. So, 151 is 1001011. 18 is 10010. It would appear that the IV number is only the first five.

151's implication contradicts 250's result.

250 would then yield the same as 255, so it's a wee bit more complex than I initially thought :)


255 = 31/31/31/31/31/31 -- 11111111 or 11111111
250 = 30/30/30/30/30/30 -- 11111010
151 = 18/18/18/18/18/18 -- 10010111
0 = 0/ 0/ 0/ 0/ 0/ 0 -- 00000000 -- Assuming this is the case.

5 bits for IVs
31 -- 11111
30 -- 11110
18 -- 10010
0 -- 00000

The first bit could be a pad? If 0 use 76543, if 1 use 87654. Idk lol it's the only explanation I currently have.

==

So bits 3 and 4 help define nature... but there's only 4 possible combos with just them! Must be more to it, gonna try to make this work... 7 and 8 probably help as well.

0 = Hardy
1 = Lonely
2 = Brave
3 = Adamant
4 = Naughty
5 = Bold
6 = Docile -- 00110
7 = Relaxed
8 = Impish
9 = Lax
10 = Timid -- 01010
11 = Hasty
12 = Serious
13 = Jolly
14 = Naive
15 = Modest
16 = Mild
17 = Quiet
18 = Bashful
19 = Rash
20 = Calm
21 = Gentle
22 = Sassy
23 = Careful
24 = Quirky

What I'm thinking:
62*25 = 1550 = [0011000001110]
0011000001110 >> (8 bits) = 00110 = 6 (Docile).

This is a calc used in this gen's RNG for a wild Pokemon's nature. It returns a 0-24 value (nature!)

Might be the calc?

geoalpha
Mar 28th, 2011, 08:22 PM
So bits 3 and 4 help define nature... but there's only 4 possible combos with just them! Must be more to it, gonna try to make this work... 7 and 8 probably help as well.

0 = Hardy
1 = Lonely
2 = Brave
3 = Adamant
4 = Naughty
5 = Bold
6 = Docile -- 00110
7 = Relaxed
8 = Impish
9 = Lax
10 = Timid -- 01010
11 = Hasty
12 = Serious
13 = Jolly
14 = Naive
15 = Modest
16 = Mild
17 = Quiet
18 = Bashful
19 = Rash
20 = Calm
21 = Gentle
22 = Sassy
23 = Careful
24 = Quirky

What I'm thinking:
62*25 = 1550 = [0011000001110]
0011000001110 >> (8 bits) = 00110 = 6 (Docile).

This is a calc used in this gen's RNG for a wild Pokemon's nature. It returns a 0-24 value (nature!)

Might be the calc?

Yes, you're totally right. But the real question is, how do we control that? Or rather, how do we manipulate it to get what we want?

Kaphotics
Mar 28th, 2011, 08:43 PM
Alter the Bits
8 7 x x 4 3 x x

The x's determine something else, so you can't really tamper with them. The way the calc works is that the values are somewhat linearly scaling.

0-10 -- 0
11-20 -- 1
21-30 -- 2
31-40 -- 3
41-51 -- 4
52-61 -- 5
62-71 -- 6
72-81 -- 7
82-92 -- 8
93-102 -- 9
103-112 -- 10
113-122 -- 11
123-133 -- 12
134-143 -- 13
144-153 -- 14
154-163 -- 15
164-174 -- 16
175-184 -- 17
185-194 -- 18
195-204 -- 19
205-214 -- 20
216-225 -- 21
226-235 -- 22
236-245 -- 23
246-255 -- 24

2^4 is 16, but you also have the doublet (11) female (and male 00?) gender, so there should be enough variance to get every combo possible for each nature.

geoalpha
Mar 28th, 2011, 09:15 PM
If only the editor could do all that work for me lol. But I'm very happy with the work Kazo has done so far.

RobbieNewton
Mar 29th, 2011, 06:14 AM
Anyone worked out how to set a shiny? I could be wrong, but I assume there must be some option, considering there was a Shiny Espeon in the Battle Tower in FR/LG. Anyways, this is pretty good, thanks for the spreadsheet, allowed me to find the Black City people much easier. Now to increase Black City. I heard it can have 45 people max. So if I do that, and get all 45, then I can have 8x4= 32 Leaders, and 13 Elite Four Members. Course, I can shift that up, if I remove/merge some leaders (like Roxanne with Brock, Misty with Wake). Lots of potential. Again, thanks for the progarm mate.

KazoWAR
Mar 29th, 2011, 01:43 PM
Wow that is some interesting stuff, I will be sure to try to add it to the program so you can easily set gender, nature IVs, etc.

RobbieNewton
Mar 29th, 2011, 02:01 PM
I sound annoying, sorry. I suppose there is no way to edit the trainers names is there? I try, but I then get an unexpected error upon saving.

Drayano
Mar 29th, 2011, 02:23 PM
I'll mention that CPU trainers NEVER have EVs on their Pokémon - Battle Subway aside - so I doubt there's any function to control it.

Leaving the unknown as 0 also does seem to make it a random ability, although as far as I can tell it sets the ability based on a combination of the trainer themselves and the species of Pokémon, since I've had both ability one and two of the same Pokémon with a 0 unknown on different trainers. 16/32 always set it to Ability 1/2 though, I'm positive of that now.

This is interesting though!

Kaphotics
Mar 29th, 2011, 04:15 PM
More likely than not there is no way to set a shiny, for regular trainer Pokes at least.

I don't know how the PID would be generated for the trainer's pokemon, but if the game generates it there's always the 1/8192 chance that it would appear shiny with the IDs it has (it'd have to have IDs to begin with).

Catching another shiny Pokemon from a trainer would mean that you'd have to keep its IDs (nope, it'd revert to unshiny), or it'd be using your IDs all along.


tl;dr, no shiny trainer pokes with these bitflags.

KazoWAR
Mar 29th, 2011, 04:44 PM
After some poking around in RAM I found the party data for AI trainers, it seems the game is generating entire 220 byte pkm files, they have entire PIDs as well. not sure how it is acutely generating them.


Here is an unmodified Shauntal's Jellicent ripped form a RAM dump, so Difficulty/IVs is 250, and Unknown/PID is 34.

Kaphotics
Mar 29th, 2011, 09:07 PM
After some poking around in RAM I found the party data for AI trainers, it seems the game is generating entire 220 byte pkm files, they have entire PIDs as well. not sure how it is acutely generating them.


Here is an unmodified Shauntal's Jellicent ripped form a RAM dump, so Difficulty/IVs is 250, and Unknown/PID is 34.

PID: 00FADF7D
TID: 57216 which is DF80. Has to be a mishmash of a bunch of values.
SID: 250 (Difficulty Value) = 00FA
Trainer # Is 563.

SID_TID = 00FADF80.

00FADF80-00FADF7D = is 3. Huh? Is Jellicent the 3rd Pokemon for that trainer? 3 is 34*25>>8 lol.

Nature is 0x17 (23 Careful), huh. That nature calc I posted can't be right then!

Experience is the lowest it can be for that level.
Happiness is max.
Met locations are unset.
No OT, no Nickname flag. Straight up Jellicent.

==

From what that looks like, if someone made Jellicent's Difficulty 0-7, it'd be shiny o.O
That is unless the TID changes lololol

Abacus
Mar 31st, 2011, 08:14 AM
I've noticed that if you try to make a lone NPC fight a double battle against you, they'll lose all of their dialogue and/or simply not fight you - could this be related to the trainer's "Unknown" value?

Jayc
Apr 1st, 2011, 08:40 AM
Could someone explain to me how to extract the files to use with the editor? I'd watch the video but Youtube's being a bitch right now.

Andibad
Apr 3rd, 2011, 12:41 PM
maybe this video can help you : http://www.youtube.com/watch?v=9kDM-l6Pl0k, sorry about that XD is just show kazorWAR tools is working for me :D

geoalpha
Apr 6th, 2011, 09:06 PM
I've noticed that if you try to make a lone NPC fight a double battle against you, they'll lose all of their dialogue and/or simply not fight you - could this be related to the trainer's "Unknown" value?

Not completely true; I'm working on a hack and I've been documenting all the changes and discoveries I'm making. What you described only happens when a trainer class is not compatable with a battle type, e.g. Lass with Double Battle. Some trainers work completely fine with Double Battles. The 1st gym leader (trio), for instance, can work properly with Double Battles.

KibaLG8
Apr 17th, 2011, 01:55 AM
I had a slight problem with BWTE v1.1a, I was using the US version of White(I had no problems using the Japanese version) and for some odd reason after editing Cilan's team, repack the new narc files back into their appropriate spots and after listening to his pre-battle speech, I get an "Error Occured. Please turn off the power". Like I said this never happened to me with the Japanese version.=/

Shin Atomoz
Apr 18th, 2011, 06:48 AM
In order to change the forms, wouldn't you have the specific pokemon form's hex number into the code?

For instance, if you wanted to put Rotom's form into the team, can't you pinpoint the part of the code in rom where you can change the pokemon freely? In this case, Rotom's Fire/Electric form hex number would 291. Since all regular pokemon are listed first then all the alternate forms are listed next in the games code right after Genesect.

If you can understand how the trainer information is ordered in the rom, can't you just the put pokemon you want in the desired position?

ED:

When I put that code for Rotom's Electric/Fire form in place of Jimmy's bidoof in the first position, the editor doesn't recognize the number 657 (Rotom fire form in hex after Genesect) which I'm going to guess that this tool doesn't have the different forms programmed in? Kazo, can you verify this?

Shin Atomoz
Apr 18th, 2011, 07:24 AM
You can manual editing for alternate form.......... just YY+2^i


What the heck does that mean?

Andibad
Apr 21st, 2011, 07:23 PM
Kazo, i need you help for tweaking my hack game, is my video :


http://www.youtube.com/watch?v=-lPx0hXfjHw

for difficult NPC is was fixed (in video is original and no fixed), but now how to change gender of pokemon, is must used another class EF of trainer? or another value?

Why in my video is NPC is so stupid because i forgot change unknown value for double battle value set XD.

For name Mugshot i know but i lazy to rename all XD

why i used rotom, sorry i just testing for alternate form but is fail....... anyway i will experiment for rotom and deoxies alternate form........

Abacus
Apr 21st, 2011, 11:13 PM
I must have missed this, when did people discover the Unknown Values for Double/Triple/Rotation battle AI?

Siam
Apr 23rd, 2011, 02:40 AM
Hey I want to ask as anyone missed out a Trainer which is Bianca when she is at Route 2?

Andibad
May 12th, 2011, 01:21 AM
In order to change the forms, wouldn't you have the specific pokemon form's hex number into the code?

For instance, if you wanted to put Rotom's form into the team, can't you pinpoint the part of the code in rom where you can change the pokemon freely? In this case, Rotom's Fire/Electric form hex number would 291. Since all regular pokemon are listed first then all the alternate forms are listed next in the games code right after Genesect.

If you can understand how the trainer information is ordered in the rom, can't you just the put pokemon you want in the desired position?

ED:

When I put that code for Rotom's Electric/Fire form in place of Jimmy's bidoof in the first position, the editor doesn't recognize the number 657 (Rotom fire form in hex after Genesect) which I'm going to guess that this tool doesn't have the different forms programmed in? Kazo, can you verify this?

You wrong for that :P

Yeah is you answer:: is just kazo tools was skipping or missing a some byte because is always 00, but rarely i was found on shikijika (with seasonal on some trainer maybe some byte is controling these form~)

Yeah Kazo! you can added a alternative form!!!!!

http://img854.imageshack.us/img854/1861/pokemonblacku2011121217.png http://img171.imageshack.us/img171/7121/pokemonblacku2011121432.png

Yeah my experiment is success, kazo you can update you software to support alternative form? XD

I just digging kazo tools is work, so i know kazotools will modified some byte, maybe kazo skipping some byte is very important for alternative form~
i just modified it from HEX editor.. is really fun :DDDDDDDDDDDDDDDD


note :
00 --> is deafult form
01 --> is second form
02 --> is 3rd form if pokemon not have 3rd form it will back to deafult form (>2 =will back on deafult form)
03 --> is 4th form for shikijika, rotom and deoxies.... (>3 =will back on deafult form)
04 --> is 5 th form for shikijika, rotom ... (>4 =will back on deafult form)
05 --> is 6 th form of rotom ...
>06 (6 - 255=deafult form) --> will back to default for all pokemon

is same on wild pokemon
YY (deafult form) +0 (2^2 x0) --> deafult form
YY (deafult form) +8 (2^2 x2) --> form-2
YY (deafult form) +16 (2^2 x 4) --> form-3 (if pokemon no have any form after 2nd form it will become deafult form until >255/FF~)
YY (deafult form)+24 (2^2 x 6) --> form-4 (if pokemon no have any form after 3rd form it will become deafult form until >255/FF~)
YY (deafult form)+32 (2^2 x 8)--> form-5 (if pokemon no have any form after 4th form it will become deafult form until >255/FF~)
YY (deafult form)+40 (2^2 x 10)--> form-6 (if pokemon no have any form after 5th form it will become deafult form until >255/FF~)
YY (deafult form)+48 (2^2 x 12)--> form-7 (if pokemon no have any form after 6th form it will become deafult form until >255/FF~) ...

before Pokemon bytes is a level? i not understand for this o.oa
okay i will explain :


(pokemon trainer data)
0x00 --> Ability, Gender ...
0x01 --> IV/EV/Nature ...
0x02 --> Lv value
0x03 --> Happines (?) (if i change it, lv will become lv 100)
0x04 --> pokemon ID value
0x06 --> alternative form value
0x07 --> ???
0x08 --> item value
0x0A --> move 1
0x0C --> move 2
0x0E --> move 3
0x10 --> move 4
0x12 --> move 5
0x14 --> move 6
will repeat until have 6 slot pokemon ...

Well is data from kaphotics, maybe i will used it, yeah great method to identified byte per byte :)


Looking at these unknowns, it screams bit flags. How so?



5th and 6th bits - Ability
16 - Ability 1 -- 010000
32 - Ability 2 -- 100000
48 - Ability 3 -- 110000 (Dream World)

Both being 0 would result in an unset (random???) ability. Untested!
1st and 2nd bits - Gender
1 - Male - 01
2 - Female - 10

Both being 0/1 would result in an unset (random???) gender.

87 (11) is female. Is 00 male?Combining these...


34 - 100010 -- Ability 2 and Female
Cursed body female Jellicent as reported by Abacus

87 - 1010111 -- Ability 1, Female. It has a 7th bit, no clue what that does!1,2,5,6 bits explained. I haven't fiddled with this thing at all (just observing from afar) -- So I ask you all this:
Would IVs and EVs be set by these different bits? Max or Zero, or Max, 20, 0 or random??

;)


151's implication contradicts 250's result.

250 would then yield the same as 255, so it's a wee bit more complex than I initially thought :)


255 = 31/31/31/31/31/31 -- 11111111 or 11111111
250 = 30/30/30/30/30/30 -- 11111010
151 = 18/18/18/18/18/18 -- 10010111
0 = 0/ 0/ 0/ 0/ 0/ 0 -- 00000000 -- Assuming this is the case.

5 bits for IVs
31 -- 11111
30 -- 11110
18 -- 10010
0 -- 00000The first bit could be a pad? If 0 use 76543, if 1 use 87654. Idk lol it's the only explanation I currently have.

==

So bits 3 and 4 help define nature... but there's only 4 possible combos with just them! Must be more to it, gonna try to make this work... 7 and 8 probably help as well.

0 = Hardy
1 = Lonely
2 = Brave
3 = Adamant
4 = Naughty
5 = Bold
6 = Docile -- 00110
7 = Relaxed
8 = Impish
9 = Lax
10 = Timid -- 01010
11 = Hasty
12 = Serious
13 = Jolly
14 = Naive
15 = Modest
16 = Mild
17 = Quiet
18 = Bashful
19 = Rash
20 = Calm
21 = Gentle
22 = Sassy
23 = Careful
24 = Quirky

What I'm thinking:
62*25 = 1550 = [0011000001110]
0011000001110 >> (8 bits) = 00110 = 6 (Docile).

This is a calc used in this gen's RNG for a wild Pokemon's nature. It returns a 0-24 value (nature!)

Might be the calc?


Alter the Bits
8 7 x x 4 3 x x

The x's determine something else, so you can't really tamper with them. The way the calc works is that the values are somewhat linearly scaling.

0-10 -- 0
11-20 -- 1
21-30 -- 2
31-40 -- 3
41-51 -- 4
52-61 -- 5
62-71 -- 6
72-81 -- 7
82-92 -- 8
93-102 -- 9
103-112 -- 10
113-122 -- 11
123-133 -- 12
134-143 -- 13
144-153 -- 14
154-163 -- 15
164-174 -- 16
175-184 -- 17
185-194 -- 18
195-204 -- 19
205-214 -- 20
216-225 -- 21
226-235 -- 22
236-245 -- 23
246-255 -- 24

2^4 is 16, but you also have the doublet (11) female (and male 00?) gender, so there should be enough variance to get every combo possible for each nature.



Kazowar BWTE on pokemon data is will edit :

http://img14.imageshack.us/img14/1336/snag0011o.jpg

you can see blue background with red text (1 byte)? is alternative form byte, alternative form is not continued from pokemon ID byte!, or not + 8 on pokemon trainer data.... all question it will answered it because on pokemon trainer data is have own byte for that ...

video :) yeah XD i was improve a lot byte ...


http://www.youtube.com/watch?v=SMNefC9UoFQ

PokéDani
May 25th, 2011, 03:14 AM
I want to use the application BWME only that there is a problem! When I open the application NitroExplorer2 and extract the narc (a/1/8/0), it works. But when I open the application editor.exe and open the narc who ask, does not work! How do I do ???!!! If anyone has a video to explain, show me!
When i open .narc that says: "Could not open file... Unsupported file format."
http://img708.imageshack.us/img708/189/semttuloesp.png
What's wrong?

twistedfatal
May 25th, 2011, 12:15 PM
I want to use the application BWME only that there is a problem! When I open the application NitroExplorer2 and extract the narc (a/1/8/0), it works. But when I open the application editor.exe and open the narc who ask, does not work! How do I do ???!!! If anyone has a video to explain, show me!
When i open .narc that says: "Could not open file... Unsupported file format."
http://img708.imageshack.us/img708/189/semttuloesp.png
What's wrong?
you do realise that trdata and trpoke are for editing trainers pokemon only you cant use them to edit mugshots anyway what you need to do is

1. Extract the the narc using nitroexplorer.exe (a/1/8/0) or editor

2. open editor.exe and load the 0.narc then select all and extract

3. open editor again if closed and click on tools then lz batch decompress

4.then open bwme and select the folder where the compressed files went

that should be all. but i keep getting index was outside the bounds of the array :S

Andibad
May 26th, 2011, 04:46 AM
kiwi.ds / editor.exe is just for compressed 0x10 only, for mugshot is using 0x10, for another sprite like trainer is used 0x11.

Yeah if you get error after editing trainer with BWTE, this error not from BWTE, because some trainer is was controlled with a script on a/0/5/7 if you change deafult trainer data to you own, it will error, glitch, not battle, dialog not show up and event will stop to null (is mean freeze), because script read trainer data and not found deafult value, so simply it will give error, freeze or anything. so if you want editing these trainer you must change that script for pass you editing so is will working fine~

litchfield
May 29th, 2011, 01:30 AM
Thanks Kazo for the tools :)
Also thanks Andibad for helping me with some Narc things :)

http://www.youtube.com/watch?v=1_ZdIagEErw

Andibad
May 29th, 2011, 05:29 AM
yeah i happy if you was can change these sprite, and in you video you change class trainer too? :D you can change on PPTXT for class trainer name... :D but i wondering to found narc is controlled class trainer if is possible :/ :v yeah for backsprite, you using brendan, i know is possible to replace but i no really interesting create new sprite or remake sprite. I just experiment with another backsprite like black backsprite with shooter, yeah, i was know script work, but i not can change it easy :(

litchfield
May 29th, 2011, 01:06 PM
yeah i happy if you was can change these sprite, and in you video you change class trainer too? :D you can change on PPTXT for class trainer name... :D but i wondering to found narc is controlled class trainer if is possible :/ :v yeah for backsprite, you using brendan, i know is possible to replace but i no really interesting create new sprite or remake sprite. I just experiment with another backsprite like black backsprite with shooter, yeah, i was know script work, but i not can change it easy :(

I believe the narc to change the trainer class is in a/0/0/2 in the 191th file 0:

Andibad
May 29th, 2011, 05:36 PM
Yes on a/0/0/2 . . .

Chaz03
May 29th, 2011, 06:47 PM
i wish i knew how to do this properly without messing something up :(

Booster
Jul 16th, 2011, 12:22 PM
Wut's that?

MickBooterhood
Aug 1st, 2011, 02:11 PM
Okay, I am waaaay lost. I wanted to do my first Rom Hack and with Pokémon White. But I need a .NARC file of the Rom. I can't transform my .NDS file into a .NARC, because none of my programs work, because they need a .dll file, because it doesn't recognize the Rom, because it needs to be executed with whatever... HELP!

arcee
Aug 1st, 2011, 09:37 PM
Okay, I am waaaay lost. I wanted to do my first Rom Hack and with Pokémon White. But I need a .NARC file of the Rom. I can't transform my .NDS file into a .NARC, because none of my programs work, because they need a .dll file, because it doesn't recognize the Rom, because it needs to be executed with whatever... HELP!

Err. Okay, firstly
A .narc is a nitro archive inside the .nds. The BW .NDS isn't exactly one big .narc, it's made up of around 234 .narcs (and other files). Each containing separate data.
You're going to have to extract the ROM's filesystem, and then find the .narc containing the info you need. Most of the common stuff (eg, sprites, overworld, script data) is out there, but the vast majority of other narcs have only been partially noted and documented.. I have a sort-of complete list somewhere, I think. Not that it matters, since I presume you're not editing that stuff.
Anyway, use DSBuff or something to extract. It's fairly straightforward.
Good luck!

hyogman
Aug 8th, 2011, 10:01 PM
Can anyone please tell me what are the Unknown Values in the Trainer info (the one at the bottom left) that correspond with each type of battle (rotation, double, etc)?
Is it true that some trainer class are not compatible with some types of battle (lass with doubles for example)?

k1d
Aug 14th, 2011, 03:13 PM
Can anyone please tell me what are the Unknown Values in the Trainer info (the one at the bottom left) that correspond with each type of battle (rotation, double, etc)?
Is it true that some trainer class are not compatible with some types of battle (lass with doubles for example)?

From what i know, for the unkown values in trainer info:
Triple:135
Rotation:7
Double:129

Oh and im not sure if its different for each individual trainer or just their trainer class but apparently hikers lose text when made into double battle (Tested with Hiker Lois),and as what i hear from previous posts so do the Lass trainer class.

Kaphotics
Aug 21st, 2011, 06:48 PM
somewhat related...

a/2/1/4 - [1000 files] (bstrpoke)
a/2/1/5 - [315 files] (bstrdata)

a/2/1/6 has the sprites for the subway, hence the large size for the small amount of files.

Drayano
Aug 21st, 2011, 08:48 PM
Oh I was wondering where the Subway data was kept, interesting. Though I can't see myself actually editing it D:

PlasmaDragon787
Jul 19th, 2012, 06:47 AM
KazoWar I like you Program so far and Its works Great, Very Easy to understand. And been reading some things here and i think the Unknown Value in the Trainer is the AI, With 0 being the easiest to 7 Being the Hardest. While in Double and Triple Battles uses 128 to 136 (I still checking on that one). I could be wrong tough.