ROM Hack Release: GenTickets

Would you like TitleID to be included in the file name?


  • Total voters
    23

DocKlokMan

Plugin Dev
OP
Member
Joined
Apr 20, 2007
Messages
3,009
Trophies
2
Age
36
XP
4,571
Country
United States
The download process is relatively slow when processing the entire encTitleKeys from that one key site.

Is it possible to add a feature to only download new tickets when running it a second time?
Done. The script now skips TitleIDs that already exist in the 'Tickets\titles.csv' file. This also allows you to add titles to the CSV without worrying about duplicates.

I can't speed up the region filtering as it requires the metadata to be downloaded and parsed to obtain the region. So out of region titles will still be processed and that can take some time.
 

temper999

Well-Known Member
Member
Joined
Sep 22, 2015
Messages
327
Trophies
0
XP
520
Country
Gambia, The
All of the generated titles have a blank space in name at start.
Also it would be great if the titleid would be attached also to the file name.
 

Leeful

GBAtemp Member
Developer
Joined
Sep 4, 2015
Messages
1,903
Trophies
1
XP
7,068
Country
United Kingdom
All of the generated titles have a blank space in name at start.
Also it would be great if the titleid would be attached also to the file name.
To remove the space at the start of the filename edit line 228:

FROM:
outfile = 'Tickets/ ' + ret_title_name_stripped + ' (' + ret_region + ').tik'
TO:
outfile = 'Tickets/' + ret_title_name_stripped + ' (' + ret_region + ').tik'

To include the titleID in the filename, edit the same line to:

outfile = 'Tickets/' + ret_title_name_stripped + ' (' + ret_region + ')(' + titleid + ').tik'

This worked for me.
 

DocKlokMan

Plugin Dev
OP
Member
Joined
Apr 20, 2007
Messages
3,009
Trophies
2
Age
36
XP
4,571
Country
United States
All of the generated titles have a blank space in name at start.
Also it would be great if the titleid would be attached also to the file name.
Fixed, don't know why I did not notice that.

It didn't fix it for me, it still crashes with "OSError: [Errno 22] Invalid argument: 'Tickets/ THE "DENPA" MEN 2 Beyond the Waves (USA).tik'
It works on my test machine, but I think this may have to do with how Windows command prompt handles double-quotes. I've uploaded a new version which simply removes the quotes, could you test just Denpa Men using its TitleID and Encrypted TitleKey first before running the whole BIN file?
 

nl255

Well-Known Member
Member
Joined
Apr 9, 2004
Messages
3,000
Trophies
2
XP
2,798
Country
Fixed, don't know why I did not notice that.


It works on my test machine, but I think this may have to do with how Windows command prompt handles double-quotes. I've uploaded a new version which simply removes the quotes, could you test just Denpa Men using its TitleID and Encrypted TitleKey first before running the whole BIN file?

It failed when using the individual title id and encrypted title key (it just said
Processing Ticket 1 of 1 ; Creation Failed) but it works fine when processing the entire database.
 

DocKlokMan

Plugin Dev
OP
Member
Joined
Apr 20, 2007
Messages
3,009
Trophies
2
Age
36
XP
4,571
Country
United States
It failed when using the individual title id and encrypted title key (it just said
Processing Ticket 1 of 1 ; Creation Failed) but it works fine when processing the entire database.
I am even more confused. Will have to fire up my Windows machine for some more testing. Thanks for the report.

Out of curiosity, any other Windows users having issues?
 

nl255

Well-Known Member
Member
Joined
Apr 9, 2004
Messages
3,000
Trophies
2
XP
2,798
Country
I am even more confused. Will have to fire up my Windows machine for some more testing. Thanks for the report.

Out of curiosity, any other Windows users having issues?

It is possible the key didn't get copied properly or some other user error. I might try again tomorrow.
 

jaykureno

Well-Known Member
Member
Joined
Dec 19, 2014
Messages
219
Trophies
0
Age
33
XP
556
Country
I just get this when trying to run on mac
Traceback (most recent call last):

File "gentickets.py", line 35, in <module>

from Crypto.Cipher import AES

ImportError: No module named 'Crypto'
 
Last edited by jaykureno,

DocKlokMan

Plugin Dev
OP
Member
Joined
Apr 20, 2007
Messages
3,009
Trophies
2
Age
36
XP
4,571
Country
United States
I just get this when trying to run on mac
Traceback (most recent call last):

File "gentickets.py", line 35, in <module>

from Crypto.Cipher import AES

ImportError: No module named 'Crypto'
You need to install PyCrypto as listed in the requirements. If you're on a Mac (like I am) first install Homebrew for Mac OS X if you have not:

Code:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Then install PyCrypto

Code:
pip3 install PyCrypto
 

jaykureno

Well-Known Member
Member
Joined
Dec 19, 2014
Messages
219
Trophies
0
Age
33
XP
556
Country
You need to install PyCrypto as listed in the requirements. If you're on a Mac (like I am) first install Homebrew for Mac OS X if you have not:

Code:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Then install PyCrypto

Code:
pip3 install PyCrypto
ofc I aldready had homebrew installed and I installed paramiko earlier today. I thought that included pycrypto.
 

jaykureno

Well-Known Member
Member
Joined
Dec 19, 2014
Messages
219
Trophies
0
Age
33
XP
556
Country
Okay so now that I have my tickets generated how do I go about installing them to my console through FBIv2?
 

DocKlokMan

Plugin Dev
OP
Member
Joined
Apr 20, 2007
Messages
3,009
Trophies
2
Age
36
XP
4,571
Country
United States
Okay so now that I have my tickets generated how do I go about installing them to my console through FBIv2?
Get FBI v2.0.5 or newer. Copy the tickets folder to your memory card. Open FBI and go to SD > Tickets and you'll see all the tickets. Press A on one and choose the install all option. Then you can exit FBI, open the eShop, search for the title and tap to re-download it.
 

jaykureno

Well-Known Member
Member
Joined
Dec 19, 2014
Messages
219
Trophies
0
Age
33
XP
556
Country
Get FBI v2.0.5 or newer. Copy the tickets folder to your memory card. Open FBI and go to SD > Tickets and you'll see all the tickets. Press A on one and choose the install all option. Then you can exit FBI, open the eShop, search for the title and tap to re-download it.
Well there is no install option on my tickets.
 

linuxares

The inadequate, autocratic beast!
Global Moderator
Joined
Aug 5, 2007
Messages
13,332
Trophies
2
XP
18,217
Country
Sweden
wohsh, wasn't easy to get Python3 to work for me. Not really familiar with these things. A youtube video later and pycrypto downloaded it works. I really hope @cearp adds region select in FunKeyCIA later on.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    SylverReZ @ SylverReZ: Beyblade let it rip haha.