-
Posts
43 -
Joined
-
Last visited
Content Type
Profiles
Pokédex
Portal
Technical Documentation
Pages
Tutorials
Forums
Events
Downloads
Gallery
Blogs
Posts posted by ILOVEPIE
-
-
The Normal PRNG:
class pkmgen4prng(object): def __init__(self,seed): self.seed =(seed * 0x41C64E6D + 0x6073) if self._bitLen(self.seed)>32: self.seed = self.seed>>self._bitLen(self.seed)-32 object.__init__(self) def prngenerate16(self): seed = self.seed self.seed = (self.seed * 0x41C64E6D + 0x6073) if self._bitLen(self.seed)>32: self.seed = self.seed>>self._bitLen(self.seed)-32 return seed>>self._bitLen(seed)-16 def prngenerate32(self): firstrandom16 = self.prngenerate16() secondrandom16 = self.prngenerate16() return ((firstrandom16<<16)|secondrandom16) def _bitLen(self,int_type): length = 0 while (int_type): int_type >>= 1 length += 1 return(length)
The GTS PRNG:
class pkmgen4gtsprng(object): def __init__(self,seed): self.seed =(seed * 0x45 + 0x1111) if self._bitLen(self.seed)>31: self.seed = self.seed>>self._bitLen(self.seed)-31 object.__init__(self) def prngenerate16(self): seed = self.seed self.seed = (self.seed * 0x41C64E6D + 0x6073) if self._bitLen(self.seed)>31: self.seed = self.seed>>self._bitLen(self.seed)-31 return seed>>self._bitLen(seed)-16 def prngenerate32(self): firstrandom16 = self.prngenerate16() secondrandom16 = self.prngenerate16() return ((firstrandom16<<16)|secondrandom16) def _bitLen(self,int_type): length = 0 while (int_type): int_type >>= 1 length += 1 return(length)
Credits:
LexyEvee/Evee (veekun.com) - for helping me fix my code and providing the gts prng constants
-
PEBKAC- problem exists between keyboard and chair
in other words YOUR DOING IT WRONG.
-
fine then write your own driver.
I did not know that this is a no flashcard thread.
-
A proxy that receives data over wifi and transmits it over NIFI
-
It is possible, try a Wifi->NIFI proxy rom for the ds
-
Indigo Plateau:
The tweak location is debatable (the pink line may be wrong) because this is just an educated guess at the location of the vertical load line, hence the pink (I made this tweak map too).
-
I am working on a wondercard injector rom for flashcarts that injects wondercards into your retail game cart... it will probably be working in a year.
-
IN ALL MAPS TWEAKING LOCATIONS ARE MARKED BY WHERE THE BLUE LOAD LINES CROSS
Azalea Town:
The Left tweaking location allows for access to the void, The right one lets you skip slowpoke well team rocket battles entirely.
New Bark Town:
Only reason to do this is to get HM waterfall early by walking to the dragon's den, you can't enter the void here.
Violet City:
[url="http://www.halloforigin.com/w/images/2/29/HGSS_Violet_City_Tweaking_Map.png'>map
All tweaks here are blocked except the one in the water, and you can't ride your bike there, so no need to look for them.
Cherrygrove City:
All tweaks here are blocked except the one in the water, and you can't ride your bike there, so no need to look for them.
Saffron City:
This tweak map I made myself. The unblocked tweak locations are highlighted in red. Both locations give access to the void.
More to come! :biggrin:
-
it seems to me someone should write a nifi library for the pc... if only there was good documentation of nifi... hmm I will look on the ds homebrew forums
-
This program makes pokemon shiny!
BEWARE THIS CHANGES YOUR POKEMON'S IVS
Simply start the program and type in the file that you want to make shiny and presto! instant shiny!
Non IV changing version coming soon.
-
ok... it is now writing to file... exept the filesize is now chainging
:mad:
import random import time import os import struct import binascii import array class bf(object): def __init__(self,value=0): self._d = value def __getitem__(self, index): return (self._d >> index) & 1 def __setitem__(self,index,value): value = (value&1L)<<index mask = (1L)<<index self._d = (self._d & ~mask) | value def __getslice__(self, start, end): mask = 2L**(end - start) -1 return (self._d >> start) & mask def __setslice__(self, start, end, value): mask = 2L**(end - start) -1 value = (value & mask) << start mask = mask << start self._d = (self._d & ~mask) | value return (self._d >> start) & mask def __int__(self): return self._d def _shinygen(pokemonid): """Returns Tuple of Shiny TID and SID for given PID""" shiny=False n=0 while shiny == False: tid=bf(random.getrandbits(16)) sid=bf(random.getrandbits(16)) pid=bf(pokemonid) n +=1 shiny = True for i in range(0,13): if int(pid[15-i]) + int(pid[31-i])+ int(tid[15-i])+ int(sid[15-i])== 3: shiny = False break elif int(pid[15-i])+ int(pid[31-i])+ int(tid[15-i])+ int(sid[15-i])== 1: shiny = False break if shiny: return (tid,sid) else: return False print "Please type in the file address of the pokemon" path = raw_input("-") path = os.path.normpath(path) file = open(path, "rb") pkm = array.array("i",file.read()) file.close() #TID,SID =_shinygen(int(pkm[0x00:0x04].tostring())) TID,SID =_shinygen(int(binascii.hexlify(pkm[0x00:0x04]),16)) print bin(int(TID)) pkm[0x0C:0x0E]=array.array("i",struct.pack("i",int(TID))) pkm[0x0E:0x10]=array.array("i",struct.pack("i",int(SID))) file = open(path,"wb") pkm.tofile(file) file.close() print "Your Pokemon is now Shiny!" time.sleep(20)
-
No bad eggs occur with a national pokedex number higher than 494 so 495 and up
494 is just a plain old egg
493 is the end of the IV national pokedex with arcius
-
I am having troubles converting a binary slice to an integer and then overwriting a binary slice in an array...
-
""" is a special string designation used by pydoc for describing a function
It's not an array it's a bitfield
-
nevermind; it's oddly not working with pokegen for me (but bond's managed to get it work, so i suppose it's fine).
Thats because it was checking all values between position 0 and position 11 not between 0 and position 12
-
one of those small banners the thread ones... with Groudon and kyogre and the text "PYE-GTS The most advanced public GTS Server"
-
this is the code i am having problems with ... it won't work it just keeps giving errors about how you cant use bitwize operations on type slice with a mask of type int
import random import time import os #import struct import array class bf(object): def __init__(self,value=0): self._d = value def __getitem__(self, index): return (self._d >> index) & 1 def __setitem__(self,index,value): value = (value&1L)<<index mask = (1L)<<index self._d = (self._d & ~mask) | value def __getslice__(self, start, end): mask = 2L**(end - start) -1 return (self._d >> start) & mask def __setslice__(self, start, end, value): mask = 2L**(end - start) -1 value = (value & mask) << start mask = mask << start self._d = (self._d & ~mask) | value return (self._d >> start) & mask def __int__(self): return self._d def _shinygen(pokemonid): """Returns Tuple of Shiny TID and SID for given PID""" shiny=False n=0 while shiny == False: tid=bf(random.getrandbits(16)) sid=bf(random.getrandbits(16)) pid=bf(pokemonid) n +=1 shiny = True for i in range(0,13): if int(pid[15-i]) + int(pid[31-i])+ int(tid[15-i])+ int(sid[15-i])== 3: shiny = False break elif int(pid[15-i])+ int(pid[31-i])+ int(tid[15-i])+ int(sid[15-i])== 1: shiny = False break if shiny: return (tid,sid) else: return False print "Please type in the file address of the pokemon" path = raw_input("-") path = os.path.normpath(path) file = open(path, "rb") pkm = array.array("i",file.read()) file.close() TID,SID =_shinygen(pkm[0x00:0x04]) pkm[0x0C:0x0E]=int(TID) pkm[0x0E:0x10]=int(SID) file = open(path,"wb") pkm.tofile(file) file.close() print "Your Pokemon is now Shiny!" time.sleep(20)
-
yes i am aware of that but the way to determine shiny is through binary not hex... you can't just set the TID to the upper half and then have the SID set to the lower half... it will work more often than normal but it still fails if you have a PID like 9132715 which if you split it in half has on bits that overlap 3 times
-
the answer to the random problem is simply:
import random
the answer to the other problem is to convert to an integer before you call the function
-
take the upper half of the PID, make that the SID
take the lower half of the PID, make that the TID
ok what if your pid is 11229867
1010101101011|010
1010101101011|010
1010101101011|010
nope not shiny...
or even
9132715
that will not work either...
there are many times that algorithm will fail
-
I don't know of any better way of generating Shiny TIDs & SIDs considering how shiny calculations are described here: http://www.smogon.com/ingame/rng/pid_iv_creation#how_shiny
anyways the computor will go through over 3000 combinations in less than a second... it doesn't take long... and the program does work i checked it with pokegen...
-
Requires this class:
class bf(object): def __init__(self,value=0): self._d = value def __getitem__(self, index): return (self._d >> index) & 1 def __setitem__(self,index,value): value = (value&1L)<<index mask = (1L)<<index self._d = (self._d & ~mask) | value def __getslice__(self, start, end): mask = 2L**(end - start) -1 return (self._d >> start) & mask def __setslice__(self, start, end, value): mask = 2L**(end - start) -1 value = (value & mask) << start mask = mask << start self._d = (self._d & ~mask) | value return (self._d >> start) & mask def __int__(self): return self._d
Function:
def shinygen(pokemonid): """Returns Tuple of Shiny TID and SID for given PID""" shiny=False n=0 while shiny == False: tid=bf(random.getrandbits(16)) sid=bf(random.getrandbits(16)) pid=bf(pokemonid) n +=1 shiny = True for i in range(0,13): if int(pid[15-i]) + int(pid[31-i])+ int(tid[15-i])+ int(sid[15-i])== 3: shiny = False break elif int(pid[15-i])+ int(pid[31-i])+ int(tid[15-i])+ int(sid[15-i])== 1: shiny = False break if shiny: return (tid,sid) else: return False
Demo Program that generates shiny TID/SIDs:
(on dropbox because py2exe is too big to upload [barely])
-
it's based on IR-GTS/IR-GTS-BW.
It works with both Gen IV and V.
It Auto updates.
and it's not ready yet but if you want to help me with the project here is the link to the repository:
http://code.google.com/p/pye-gts/
:cool:
-
(U)
Action replay code for team rocket outfit:
Male:
62111880 00000000
B2111880 00000000
10025D90 00000102
D2000000 00000000
Female:
62111880 00000000
B2111880 00000000
10025D90 00000103
D2000000 00000000
Bonus-
Be MewTwo(glitchy):
WARNING
DO NOT:
-
Use the Pokemon Center
-
Go to the Pokeathalon dome
-
Surf
-
Fly
-
Rock Climb
-
Do anything that requires a special animation
Anything mentioned above will crash the game.
An alternative to the Pokemon center can be found in prof. elm's lab.
62111880 00000000
B2111880 00000000
10025D90 00000243
D2000000 00000000
-
Use the Pokemon Center
JS-VBA-M: World's First Working Webgl based Javascript GBA emulator! Emulation in a webpage with no plugins!
in Systems, Flashcards, and Emulation
Posted · Edited by ILOVEPIE
added link
JS-VBA-M
A Javascript port of VBA-M
[video=youtube;pjCuM6pnI54]
Link to the emulator!