Editing Trophy files

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
Trophies was introduced in 2.40 firmware; therefore, games compiled with an SDK smaller than 2.40 don't have trophies.
Trophies was introduced in 2.40 firmware, games compiled with an SDK smaller than 2.40 doesnt have trophies


=== Firmware related files ===
=== Firmware related files ===
Line 51: Line 51:


===== PARAM.SFO =====
===== PARAM.SFO =====
'' Full Article: [[PARAM.SFO]]''


===== TROPCONF.SFM =====
===== TROPCONF.SFM =====
Line 60: Line 58:
The only way to update this file is by installing a new "trophy installer" (TROPHY.TRP) using the same ID's, but with a higher version (this happens with some "game expansions" that updates the trophy installation with new trophies related with the new content)
The only way to update this file is by installing a new "trophy installer" (TROPHY.TRP) using the same ID's, but with a higher version (this happens with some "game expansions" that updates the trophy installation with new trophies related with the new content)


* Is language specific (texts are not common for all the languages). See [[Languages]]
* Is language specific (texts are not common for all the languages)
Its the trophy installer (TROPHY.TRP) who decides wich '''TROPCONF.SFM''' will be installed depending of the language settings in the XMB
Its the trophy installer (TROPHY.TRP) who decides wich '''TROPCONF.SFM''' will be installed depending of the language settings in the XMB


Line 149: Line 147:


* Specullation
* Specullation
Based in the name (trophy transmission or transfer) its a file derivated of TROPUSR.DAT, with an added layer of encryption, ready to be sended to PSN to synchronize the data related with this game with your trophies in your online account
Based in the name (trophy transmission or transfer) its a file derivated of TROPUSR.DAT, with an added layer of encryption, ready to be sended to PSN to synchronize the data related with this game with your trohpies in your online account


It contains info related with user, either because its present in the source file (TROPUSR.DAT) or because it contains the file PARAM.SFO "incrusted" in the format
It contains info related with user, either because its present in the source file (TROPUSR.DAT) or because it contains the file PARAM.SFO "incrusted" in the format
== Structure of TROPUSR.DAT and TROPTRNS.DAT ==
Structures: https://github.com/bucanero/apollo-ps3/blob/master/include/trophy.h
Block types: https://github.com/bucanero/apollo-ps3/blob/master/source/trophy.c


== How signatures from XML and TROPTRNS.DAT are signed? ==
== How signatures from XML and TROPTRNS.DAT are signed? ==
Line 224: Line 217:
Stores data related with the unlocked trophies for this specific game, included timestamps when the trophy was unlocked, etc...
Stores data related with the unlocked trophies for this specific game, included timestamps when the trophy was unlocked, etc...


The file is updated every time a trophy is unlocked, and at the same time the [[PARAM.PFD]] is updated to store the new signature
The file is updated everytime a trophy is unlocked, and at the same time his [[PARAM.PFD]] is updated to store the new signature


The file is encrypted, some tricks can be done to tamper with this files to unlock trophies, but consider the methods not perfect (they generates semi-corrupted files that can be considered valid under some circunstancies, but are corrupted in the end)
The file is encrypted, some tricks can be done to tamper with this files to unlock trophies, but consider the methods not perfect (they generates semi-corrupted files that can be considered valid under some circunstancies, but are corrupted in the end)
*Notes
**The trophies unlocked in a PS3 that has never been connected online doesnt contains timestamps, this is easy to identify by looking in the "trophy collection" in [[XMB]] under the individual trophies names if is displayed the date and time when this specific trophy was unlocked. Additionally the user accounts that has never been registered in PSN contains a dummy ACCOUNTID filled with zeroes, this dummy ACCOUNTID is stored in the [[PARAM.SFO#ACCOUNTID | PARAM.SFO]] of the trophies


===== Content information files =====
===== Content information files =====
Line 276: Line 266:


*TROP_'''xx'''.SFM (optionall)
*TROP_'''xx'''.SFM (optionall)
Same than TROP.SFM but containing texts for other [[Languages]]
Same than TROP.SFM but containing texts for other languages. For a list of all languages see: [[Content_Information_Files#Regional_codes_in_file_names_.28languages.29|Content Information Files - Languages]]


*ICON0.PNG, TROP'''xxx'''.PNG, and GR00'''x'''.PNG. See [[Content Information Files]]
*ICON0.PNG, TROP'''xxx'''.PNG, and GR00'''x'''.PNG
ICON0.PNG is the main icon always visible in XMB
ICON0.PNG is the main icon always visible in XMB
GR00'''x'''.PNG (optionall) is a subicon when trophies are grouped
GR00'''x'''.PNG (optionall) is a subicon when trophies are grouped
TROP'''xxx'''.PNG is the icon for every trophy
TROP'''xxx'''.PNG is the icon for every trophy
[[Content_Information_Files#Trophies|Content Information Files - Trophies]]


==PSL1GHT and trophy's==
==PSL1GHT and trophy's==
Line 289: Line 281:
{| class="wikitable"
{| class="wikitable"
|-
|-
! Game type  
! Game type !! Platinum (180 points) !! Gold (90 points) !! Silver (30 points) !! Bronze (15 points) !! Points Max
! [[File:Trophy-platinum.png|20px]]Platinum (180 points)  
! [[File:Trophy-gold.png|20px]]Gold (90 points)  
! [[File:Trophy-silver.png|20px]]Silver (30 points)  
! [[File:Trophy-bronze.png|20px]]Bronze (15 points)  
! Points Max
|-
|-
| Disc Game || {{yes}} || {{yes}} || {{yes}} || {{yes}} || 1230
| Disc Game || {{yes}} || {{yes}} || {{yes}} || {{yes}} || 1230
Line 326: Line 313:
**Level 20 and up = previous level plus 8,000
**Level 20 and up = previous level plus 8,000


== Tools ==
<syntaxhighlight lang="python" enclose="div">
# (c) flatz
import sys, os, urllib2
import hashlib, hmac
from Crypto.Cipher import AES
def aes_encrypt_cbc(key, iv, input):
aes = AES.new(key, AES.MODE_CBC, iv)
output = aes.encrypt(input)
return output
def aes_decrypt_cbc(key, iv, input):
aes = AES.new(key, AES.MODE_CBC, iv)
output = aes.decrypt(input)
return output
def sha1_hmac(key, message):
return hmac.new(key, message, digestmod=hashlib.sha1).digest()
# paste a HMAC key from np_trophy_util.prx here... hint:
#  C3A3A0...
hmac_key =
'C3A3A0..........................................................................................................................'.decode('hex')
# paste an ERK from np_trophy_util.prx here... hint:
#  02499F...
keygen_erk = '02499F..........................'.decode('hex')
keygen_riv = '00000000000000000000000000000000'.decode('hex')
def build_url(np_comm_id, file_name, encrypted=False, env='np'):
np_comm_id_hash = sha1_hmac(hmac_key, np_comm_id).encode('hex').upper()
file_name_hash = sha1_hmac(hmac_key, '{0}/{1}'.format(np_comm_id, file_name)).encode('hex').upper()
file_extension = os.path.splitext(file_name)[1]
if encrypted:
file_extension_parts = file_extension.rpartition('.')
file_extension = file_extension_parts[1] + 'E' + file_extension_parts[2]
return 'http://trophy01.{0}.community.playstation.net/trophy/{0}/{1}_{2}/{3}{4}'.format(env, np_comm_id, np_comm_id_hash, file_name_hash, file_extension)
def fetch_file_data(np_comm_id, file_name, encrypted=False, env='np'):
file_url = build_url(np_comm_id, file_name, encrypted, env)
connection = urllib2.urlopen(file_url)
data = connection.read()
if encrypted:
data_erk = aes_encrypt_cbc(keygen_erk, keygen_riv, np_comm_id.ljust(16, '\x00'))
data_riv = data[:16]
data = aes_decrypt_cbc(data_erk, data_riv, data)[16:]
return data
icon0_png_url = build_url('NPWR03612_00', 'ICON0.PNG')
trop_sfm_url = build_url('NPWR03612_00', 'TROP.SFM', True)
trop000_png_url = build_url('NPWR03612_00', 'TROP000.PNG')
trop_sfm = fetch_file_data('NPWR03612_00', 'TROP.SFM', True)
print 'ICON0.PNG:', icon0_png_url
print 'TROP.SFM:', trop_sfm_url
print 'TROP000.PNG:', trop000_png_url
print trop_sfm
</syntaxhighlight>
== Unlock Trophys ==
* https://github.com/darkautism/PS3TrophyIsGood
* http://www.mediafire.com/download/4650ncmu8ud2wcl/PS3TrophyIsGood.zip
* https://www.youtube.com/watch?v=Z0e14M3v8OM




{{File Formats}}<noinclude>[[Category:Main]]</noinclude>
{{File Formats}}<noinclude>[[Category:Main]]</noinclude>
Please note that all contributions to PS3 Developer wiki are considered to be released under the GNU Free Documentation License 1.2 (see PS3 Developer wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following hCaptcha:

Cancel Editing help (opens in new window)