Advertisement
Baoulettes

Guitar Maker v0.0.0.2 Rocksmith 2014

Nov 19th, 2013
411
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.09 KB | None | 0 0
  1. IniRead, ccg, CustomGuitarList.ini, NumberInstance, NumberSet
  2. IniRead, ccg2, CustomGuitarList.ini, NumberInstance, NumberGuitar
  3. If ccg = ERROR
  4. {
  5. IniWrite, 0, CustomGuitarList.ini, NumberInstance, NumberSet
  6. IniRead, ccg, CustomGuitarList.ini, NumberInstance, NumberSet
  7. } else {
  8. IniRead, ccg, CustomGuitarList.ini, NumberInstance, NumberSet
  9. }
  10. If ccg2 = ERROR
  11. {
  12. IniWrite, 900000, CustomGuitarList.ini, NumberInstance, NumberGuitar
  13. IniRead, ccg2, CustomGuitarList.ini, NumberInstance, NumberGuitar
  14. } else {
  15. IniRead, ccg2, CustomGuitarList.ini, NumberInstance, NumberGuitar
  16. }
  17. If RS2014DIR = ERROR
  18. {
  19. FileSelectFolder, RS2014DIR,, 3, Select Rocksmith 2014 Installation folder.
  20. Thread, NoTimers, false
  21. } else {
  22. IniRead, RS2014DIR, CustomGuitarList.ini, Rocksmith2014Directory, Rocksmith2014dir
  23. }
  24. IDString = a0b1c2d3e4f5a6b7c8d9e0f
  25.  
  26. Random, RDM1, 0x00F000000, 0x00fffffff
  27. ID1 = %IDString%%RDM1%
  28. InputBox, guitarname, Guitar Name, Enter Guitar name., 320, 240
  29. FileSelectFile, DDSInlayfiles, 3, , Open a Inlay Image, Rocksmith 2014 Inlay Image files (*.tga; *.png; *.dds)
  30. FileSelectFile, DDSI512files, 3, , Open a Icon 512x512 Image, Rocksmith 2014 Icon 512x512 Image files (*.tga; *.png; *.dds)
  31. FileCopy, %DDSI512files%, %A_ScriptDir%\tmp\images\inlay_%ccg2%_512.*
  32. FileCopy, %DDSI512files%, %A_ScriptDir%\tmp\images\inlay_%ccg2%_256.*
  33. FileCopy, %DDSI512files%, %A_ScriptDir%\tmp\images\inlay_%ccg2%_128.*
  34. FileCopy, %DDSI512files%, %A_ScriptDir%\tmp\images\inlay_%ccg2%_64.*
  35. FileCopy, %DDSInlayfiles%, %A_ScriptDir%\tmp\images\inlay_%ccg2%.*
  36. Runwait, %A_ScriptDir%\ressources\imgtool\convert.exe %A_ScriptDir%\tmp\images\inlay_%ccg2%.* -resize 1024x512! %A_ScriptDir%\tmp\images\inlay_%ccg2%.png
  37. Runwait, %A_ScriptDir%\ressources\imgtool\convert.exe %A_ScriptDir%\tmp\images\inlay_%ccg2%_512.* -resize 512x512! %A_ScriptDir%\tmp\images\inlay_%ccg2%_512.png
  38. Runwait, %A_ScriptDir%\ressources\imgtool\convert.exe %A_ScriptDir%\tmp\images\inlay_%ccg2%_256.* -resize 256x256! %A_ScriptDir%\tmp\images\inlay_%ccg2%_256.png
  39. Runwait, %A_ScriptDir%\ressources\imgtool\convert.exe %A_ScriptDir%\tmp\images\inlay_%ccg2%_128.* -resize 128x128! %A_ScriptDir%\tmp\images\inlay_%ccg2%_128.png
  40. Runwait, %A_ScriptDir%\ressources\imgtool\convert.exe %A_ScriptDir%\tmp\images\inlay_%ccg2%_64.* -resize 64x64! %A_ScriptDir%\tmp\images\inlay_%ccg2%_64.png
  41. RunWait, %A_ScriptDir%\ressources\imgtool2\icpcl.exe -dest "%A_ScriptDir%\tmp\images\" -convertto dds format:DXT5 -source "%A_ScriptDir%\tmp\images\*.*"
  42. FileCopy, %RS2014DIR%\cache.psarc, %A_ScriptDir%\backup\cache.psarc
  43. FileCopy, %RS2014DIR%\guitars.psarc, %A_ScriptDir%\backup\guitars.psarc
  44. FileCopy, %RS2014DIR%\static.psarc, %A_ScriptDir%\backup\static.psarc
  45. RunWait, %A_ScriptDir%\ressources\packer.exe --unpack --input=%A_ScriptDir%\backup --output=%A_ScriptDir%\tmp
  46. RunWait, %A_ScriptDir%\ressources\7za.exe x tmp\cache_Pc\cache4.7z -otmp\cache_Pc\cache4
  47. FileAppend, %ccg2%`,%guitarname%`,%guitarname%`,%guitarname%`,%guitarname%`,%guitarname%`,%guitarname%`,%guitarname%`n, %A_ScriptDir%\tmp\cache_Pc\cache4\localization\maingame.csv
  48. RunWait, %A_ScriptDir%\ressources\7za.exe a tmp\cache_Pc\cache4.7z .\tmp\cache_Pc\cache4\*
  49. RunWait, %A_ScriptDir%\ressources\7za.exe x tmp\cache_Pc\cache7.7z -otmp\cache_Pc\cache7
  50. FileRead, guitarshsan, %A_ScriptDir%\tmp\cache_Pc\cache7\manifests\guitars\guitars.hsan
  51. StringReplace, guitarshsannew, guitarshsan, "F4F8F798ACCB7071F546CB7BD98E18C5" : {, "%ID1%" : {`n "Attributes" : {`n "DLC" : true`,`n "LocName" : "$[%ccg2%]%guitarname%"`,`n "ManifestUrn" : "urn:database:json-db:guitar_%ccg2%"`,`n "Name" : "%ccg2%"`,`n "PersistentID" : "%ID1%"`,`n "PreviewArt" : "urn:image:dds:reward_inlay_%ccg2%"`n }`n }`, `n "F4F8F798ACCB7071F546CB7BD98E18C5" : {
  52. FileDelete, %A_ScriptDir%\tmp\cache_Pc\cache7\manifests\guitars\guitars.hsan
  53. FileAppend, %guitarshsannew%, %A_ScriptDir%\tmp\cache_Pc\cache7\manifests\guitars\guitars.hsan
  54. RunWait, %A_ScriptDir%\ressources\7za.exe a tmp\cache_Pc\cache7.7z .\tmp\cache_Pc\cache7\*
  55. FileAppend, `n, %A_ScriptDir%\tmp\cache_Pc\appid.appid
  56. newfilesjson = {`n "Entries": {`n "%ID1%": {`n "Attributes": {`n "DecorativeInlays": "urn:application:gamebryo-scenegraph:%ccg2%"`,`n "DLC": true`,`n "LocName": "$[%ccg2%]%guitarname%"`,`n "ManifestUrn": "urn:database:json-db:%ccg2%"`,`n "Name": "%guitarname%",`n "PreviewArt": "urn:image:dds:reward_inlay_%ccg2%"`,`n "PersistentID": "%ID1%"`n }`n }`n }`,`n "ModelName": "RSEnumerable_Guitar"`,`n "IterationVersion": 2`,`n "InsertRoot": "Static.Guitars.Entries"`n}`n
  57. FileAppend, %newfilesjson%, %A_ScriptDir%\tmp\guitars_Pc\manifests\guitars\guitar_%guitarname%.json
  58. FileRead, guitarshsan2, %A_ScriptDir%\tmp\guitars_Pc\manifests\guitars\guitars.hsan
  59. StringReplace, guitarshsannew2, guitarshsan2, "F4F8F798ACCB7071F546CB7BD98E18C5" : {, "%ID1%" : {`n "Attributes" : {`n "DLC" : true`,`n "LocName" : "$[%ccg2%]%guitarname%"`,`n "ManifestUrn" : "urn:database:json-db:guitar_%ccg2%"`,`n "Name" : "%ccg2%"`,`n "PersistentID" : "%ID1%"`,`n "PreviewArt" : "urn:image:dds:reward_inlay_%ccg2%"`n }`n }`, `n "F4F8F798ACCB7071F546CB7BD98E18C5" : {
  60. FileDelete, %A_ScriptDir%\tmp\guitars_Pc\manifests\guitars\guitars.hsan
  61. FileAppend, %guitarshsannew2%, %A_ScriptDir%\tmp\guitars_Pc\manifests\guitars\guitars.hsan
  62. newfilesxblock = <?xml version="1.0" encoding="utf-8"?>`n<game>`n <entitySet>`n <entity id="%ID1%" modelName="RSEnumerable_Guitar" name="%guitarname%" iterations="0">`n <properties>`n <property name="Header">`n <set value="urn:database:hsan-db:guitars" />`n </property>`n <property name="Manifest">`n <set value="urn:database:json-db:guitar_%ccg2%" />`n </property>`n <property name="PreviewArt">`n <set value="urn:image:dds:reward_inlay_%ccg2%" />`n </property>`n <property name="DecorativeInlays">`n <set value="urn:application:gamebryo-scenegraph:%ccg2%" />`n </property>`n </properties>`n </entity>`n </entitySet>`n</game>`n
  63. FileAppend, %newfilesxblock%, %A_ScriptDir%\tmp\guitars_Pc\gamexblocks\nguitars\guitar_%guitarname%.xblock
  64. FileCopy, %A_ScriptDir%\tmp\images\inlay_%ccg2%.dds, %A_ScriptDir%\tmp\guitars_Pc\assets\gameplay\inlay\inlay_%ccg2%.dds
  65. FileCopy, %A_ScriptDir%\tmp\images\dragon.nif, %A_ScriptDir%\tmp\guitars_Pc\assets\gameplay\inlay\%ccg2%.nif
  66. TestString = inlay_%ccg2%.dds
  67. Output := StringToHex(TestString)
  68. Ootput = %Output%
  69. newhexname = %Output%
  70. StringReplace newhexname, newhexname, %A_Space%, , All
  71. StringToHex(String)
  72. {
  73. local Old_A_FormatInteger, CharHex, HexString
  74.  
  75. ;Return '0' if the string was blank
  76. If !String
  77. Return 0
  78.  
  79. ;Save the current Integer format
  80. Old_A_FormatInteger := A_FormatInteger
  81.  
  82. ;Set the format of integers to their Hex value
  83. SetFormat, INTEGER, H
  84.  
  85. ;Parse the String
  86. Loop, Parse, String
  87. {
  88. ;Get the ASCII value of the Character (will be converted to the Hex value by the SetFormat Line above)
  89. CharHex := Asc(A_LoopField)
  90.  
  91. ;Comment out the following line to leave the '0x' intact
  92. StringTrimLeft, CharHex, CharHex, 2
  93.  
  94. ;Build the return string
  95. HexString .= CharHex . " "
  96. }
  97. ;Set the integer format to what is was prior to the call
  98. SetFormat, INTEGER, %Old_A_FormatInteger%
  99.  
  100. ;Return the string to the caller
  101. Return HexString
  102. }
  103. ; WinAPI constants
  104. INVALID_HANDLE_VALUE = -1
  105. INVALID_FILE_SIZE = 0xFFFFFFFF
  106. FILE_BEGIN = 0
  107. FILE_CURRENT = 1
  108. FILE_END = 2
  109. OpenFileForRead(_filename)
  110. {
  111. local handle
  112.  
  113. handle := DllCall("CreateFile"
  114. , "Str", _filename ; lpFileName
  115. , "UInt", 0x80000000 ; dwDesiredAccess (GENERIC_READ)
  116. , "UInt", 3 ; dwShareMode (FILE_SHARE_READ|FILE_SHARE_WRITE)
  117. , "UInt", 0 ; lpSecurityAttributes
  118. , "UInt", 3 ; dwCreationDisposition (OPEN_EXISTING)
  119. , "UInt", 0 ; dwFlagsAndAttributes
  120. , "UInt", 0) ; hTemplateFile
  121. If (handle = INVALID_HANDLE_VALUE or handle = 0)
  122. {
  123. ErrorLevel = -1
  124. }
  125. IfNotEqual ErrorLevel, 0, Return INVALID_HANDLE_VALUE ; Couldn't open the file
  126. Return handle
  127. }
  128. OpenFileForWrite(_filename)
  129. {
  130. local handle
  131.  
  132. handle := DllCall("CreateFile"
  133. , "Str", _filename ; lpFileName
  134. , "UInt", 0x40000000 ; dwDesiredAccess (GENERIC_WRITE)
  135. , "UInt", 3 ; dwShareMode (FILE_SHARE_READ|FILE_SHARE_WRITE)
  136. , "UInt", 0 ; lpSecurityAttributes
  137. , "UInt", 4 ; dwCreationDisposition (OPEN_ALWAYS: create if not exists)
  138. , "UInt", 0 ; dwFlagsAndAttributes
  139. , "UInt", 0) ; hTemplateFile
  140. If (handle = INVALID_HANDLE_VALUE or handle = 0)
  141. {
  142. ErrorLevel = -1
  143. }
  144. IfNotEqual ErrorLevel, 0, Return INVALID_HANDLE_VALUE ; Couldn't open the file
  145. Return handle
  146. }
  147. CloseFile(_handle)
  148. {
  149. local result
  150.  
  151. result := DllCall("CloseHandle"
  152. , "UInt", _handle)
  153. If (result = 0)
  154. {
  155. ErrorLevel = -1
  156. }
  157. }
  158. GetFileSize(_handle)
  159. {
  160. local fileSize
  161.  
  162. fileSize := DllCall("GetFileSize"
  163. , "UInt", _handle
  164. , "UInt", 0)
  165. If (fileSize = INVALID_FILE_SIZE)
  166. {
  167. ErrorLevel = -1
  168. }
  169. IfNotEqual ErrorLevel, 0, Return -1
  170. Return fileSize
  171. }
  172. MoveInFile(_handle, _moveMethod=-1, _offset=0)
  173. {
  174. local result
  175.  
  176. result = %INVALID_FILE_SIZE%
  177. if (_moveMethod != -1)
  178. {
  179. result := DllCall("SetFilePointer"
  180. , "UInt", _handle ; hFile
  181. , "Int", _offset ; lDistanceToMove
  182. , "UInt", 0 ; lpDistanceToMoveHigh
  183. , "UInt", _moveMethod) ; dwMoveMethod
  184. if (result = -1) ; INVALID_SET_FILE_POINTER
  185. {
  186. ErrorLevel = -1
  187. }
  188. IfNotEqual ErrorLevel, 0, Return -1 ; Couldn't make the move
  189. }
  190. Return result
  191. }
  192. WriteInFile(_handle, ByRef @data, _byteNb=0, _moveMethod=-1, _offset=0)
  193. {
  194. local dataSize, result, written
  195.  
  196. _offset := MoveInFile(_handle, _moveMethod, _offset)
  197. IfNotEqual ErrorLevel, 0, Return -1 ; Couldn't make the move
  198.  
  199. dataSize := VarSetCapacity(@data) ; Get the capacity (>= used length!)
  200. If (_byteNb < 1 or _byteNb > dataSize)
  201. {
  202. byteNb := dataSize
  203. }
  204. result := DllCall("WriteFile"
  205. , "UInt", _handle ; hFile
  206. , "Str", @data ; lpBuffer
  207. , "UInt", _byteNb ; nNumberOfBytesToWrite
  208. , "UInt *", written ; lpNumberOfBytesWritten
  209. , "UInt", 0) ; lpOverlapped
  210. if (result = 0 or written < _byteNb)
  211. {
  212. ErrorLevel = -2
  213. }
  214. IfNotEqual ErrorLevel, 0, Return -1 ; Couldn't write in the file
  215. Return written
  216. }
  217. ReadFromFile(_handle, ByRef @data, _byteNb=0, _moveMethod=-1, _offset=0)
  218. {
  219. local fileSize, granted, result, read
  220.  
  221. _offset := MoveInFile(_handle, _moveMethod, _offset)
  222. IfNotEqual ErrorLevel, 0, Return -1 ; Couldn't make the move
  223.  
  224. if (_byteNb = 0)
  225. {
  226. ; Read whole file (or less if file pointer isn't at start)
  227. fileSize := GetFileSize(_handle)
  228. IfNotEqual ErrorLevel, 0, Return -1 ; Couldn't get the file size
  229. _byteNb := fileSize
  230. }
  231. granted := VarSetCapacity(@data, _byteNb, 0)
  232. if (granted < _byteNb)
  233. {
  234. ; Cannot allocate enough memory
  235. ErrorLevel = Mem=%granted%
  236. Return -1
  237. }
  238.  
  239. result := DllCall("ReadFile"
  240. , "UInt", _handle ; hFile
  241. , "Str", @data ; lpBuffer
  242. , "UInt", _byteNb ; nNumberOfBytesToRead
  243. , "UInt *", read ; lpNumberOfBytesRead
  244. , "UInt", 0) ; lpOverlapped
  245. if (result = 0)
  246. {
  247. ErrorLevel = -2
  248. }
  249. ;~ MsgBox fileSize: %fileSize% - offset: %_offset% - byteNb: %_byteNb% - granted: %granted% - read: %read%
  250. IfNotEqual ErrorLevel, 0, Return -1 ; Couldn't read the file
  251.  
  252. ; Note that we can have read less data than requested,
  253. ; eg. if end of file has been meet
  254. Return read
  255. }
  256. Bin2Hex(ByRef @hex, ByRef @bin, _byteNb=0)
  257. {
  258. local intFormat, dataSize, dataAddress, granted, x
  259.  
  260. ; Save original integer format
  261. intFormat = %A_FormatInteger%
  262. ; For converting bytes to hex
  263. SetFormat Integer, Hex
  264.  
  265. ; Get size of data
  266. dataSize := VarSetCapacity(@bin)
  267. If (_byteNb < 1 or _byteNb > dataSize)
  268. {
  269. _byteNb := dataSize
  270. }
  271. dataAddress := &@bin
  272. ; Make enough room (faster)
  273. granted := VarSetCapacity(@hex, _byteNb * 2)
  274. if (granted < _byteNb * 2)
  275. {
  276. ; Cannot allocate enough memory
  277. ErrorLevel = Mem=%granted%
  278. Return -1
  279. }
  280. Loop %_byteNb%
  281. {
  282. ; Get byte in hexa
  283. x := *dataAddress + 0x100
  284. StringRight x, x, 2 ; 2 hex digits
  285. StringUpper x, x
  286. @hex = %@hex%%x%
  287. dataAddress++ ; Next byte
  288. }
  289. ; Restore original integer format
  290. SetFormat Integer, %intFormat%
  291.  
  292. Return _byteNb
  293. }
  294. Hex2Bin(ByRef @bin, _hex, _byteNb=0)
  295. {
  296. local dataSize, granted, dataAddress, x
  297.  
  298. ; Get size of data
  299. x := StrLen(_hex)
  300. dataSize := Ceil(x / 2)
  301. if (x = 0 or dataSize * 2 != x)
  302. {
  303. ; Invalid string, empty or odd number of digits
  304. ErrorLevel = Param
  305. Return -1
  306. }
  307. If (_byteNb < 1 or _byteNb > dataSize)
  308. {
  309. _byteNb := dataSize
  310. }
  311. ; Make enough room
  312. granted := VarSetCapacity(@bin, _byteNb, 0)
  313. if (granted < _byteNb)
  314. {
  315. ; Cannot allocate enough memory
  316. ErrorLevel = Mem=%granted%
  317. Return -1
  318. }
  319. dataAddress := &@bin
  320.  
  321. Loop Parse, _hex
  322. {
  323. if (A_Index & 1) ; Odd
  324. {
  325. x = %A_LoopField% ; Odd digit
  326. }
  327. else
  328. {
  329. ; Concatenate previous x and even digit, converted to hex
  330. x := "0x" . x . A_LoopField
  331. ; Store integer in memory
  332. DllCall("RtlFillMemory"
  333. , "UInt", dataAddress
  334. , "UInt", 1
  335. , "UChar", x)
  336. dataAddress++
  337. }
  338. }
  339.  
  340. Return _byteNb
  341. }
  342. HexString=
  343. ( Join
  344. 47616D656272796F2046696C6520466F726D61742C2056657273696F6E2033302E312E302E330A0300011E010000000049000000000000000B00110000004E694461746153747265616D0131013138110000004E694461746153747265616D0130013138110000004E69537472696E67457874726144617461060000004E694D657368120000004E694D6174657269616C50726F7065727479150000004E69566572746578436F6C6F7250726F70657274790F0000004E69416C70686150726F70657274790F0000004E69536F7572636554657874757265130000004E69546578747572696E6750726F7065727479110000004E695A42756666657250726F7065727479060000004E694E6F64650000010002000300000001000200030000000100020003000000010002000300000001000200030000000100020003000000010002000300000001000200030000000100020003000000010002000300000001000200030000000100020003000000010002000300000001000200030000000100020003000000010004000500060007000800090002000300050009000A00710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC0000007100000029000000440000000E0000000F00000024000000280000000E00000008000000BC0000000E0000000E0000009A00000018000000100000000A0000005363656E6520526F6F7407000000696E6C61795F330E0000005573657250726F704275666665720B0000000D0A7A4D6F646531300D0A10000000%newhexname%0B0000004D6174657269616C20233205000000494E44455808000000504F534954494F4E08000000544558434F4F524407000000696E6C61795F3407000000696E6C61795F3507000000696E6C61795F3607000000696E6C61795F3707000000696E6C61795F3807000000696E6C61795F3908000000696E6C61795F313008000000696E6C61795F313108000000696E6C61795F313208000000696E6C61795F313308000000696E6C61795F313408000000696E6C61795F313508000000696E6C61795F313608000000696E6C61795F313708000000696E6C61795F31380000000050000000000000000100000000000000040000000200000037040300360402008EDBA1C2D26F80C049382037B18A633FEA6B6F3F01A3A8C2D26F80C06CF22637E7077B3FEA6B6F3F02A3A8C2D36F80406CF22637EB077B3F3A04FB3E8FDBA1C2D36F804049382037B98A633F3A04FB3E010C000000000000000100000000000000060000000100000015020100020003000000000001000200010200000003000000170000000100000002000000FFFFFFFF10009C2727B7B8C850C2A68B5ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000483FA5C2000080345A952337DC6A8B400200000001000000000100000001000000060000000000000000000000000100000002000000070000000000000008000000000000000000000050000000000000000100000000000000040000000200000037040300360402002DF799C2D26F80C0AF6318374532483FEA6B6F3F1E14A1C2D26F80C065721F37A7D7603FEA6B6F3F1F14A1C2D36F804065721F37AFD7603F3A04FB3E2EF799C2D36F8040AF6318374932483F3A04FB3E010C000000000000000100000000000000060000000100000015020100020003000000000001000200010200000003000000160000000100000006000000FFFFFFFF100021431FB7B8C850C29D8C5ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000A6859DC2000080340AEB1B376F7A8C400200000005000000000100000001000000060000000000000004000000000100000002000000070000000000000008000000000000000000000050000000000000000100000000000000040000000200000037040300360402001E1A92C2D26F80C0609710372BF32C3FEA6B6F3FBD2F99C2D26F80C0DC9D17373B7F453FEA6B6F3FBE2F99C2D36F8040DD9D17373B7F453F3A04FB3E1E1A92C2D36F80406097103727F32C3F3A04FB3E010C00000000000000010000000000000006000000010000001502010002000300000000000100020001020000000300000015000000010000000A000000FFFFFFFF1000E64517B7B8C850C29A8D5ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000EEA495C2000080349E1A1437C0628C40020000000900000000010000000100000006000000000000000800000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200C6D489C2D26F80C0E4630837C34A103FEA6B6F3FAE5291C2D26F80C09DD10F3729402A3FEA6B6F3FAE5291C2D36F80409ED10F3725402A3F3A04FB3EC6D489C2D36F8040E6630837BF4A103F3A04FB3E010C00000000000000010000000000000006000000010000001502010002000300000000000100020001020000000300000014000000010000000E000000FFFFFFFF1000F5290FB7B8C850C29C8E5ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000BA938DC200008034C11A0C3794BB8D40020000000D00000000010000000100000006000000000000000C00000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200B88581C2D26F80C0CD2700376301E73EEA6B6F3F560D89C2D26F80C0319E0737B9970D3FEA6B6F3F560D89C2D36F8040339E0737B7970D3F3A04FB3EB88581C2D36F8040CE2700376001E73E3A04FB3E010C000000000000000100000000000000060000000100000015020100020003000000000001000200010200000003000000130000000100000012000000FFFFFFFF1000ECE906B7B8C850C2A58F5ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000874985C20000803400E303377FDC8D40020000001100000000010000000100000006000000000000001000000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200BE0372C2D26F80C04E70EF3668FFAB3EEA6B6F3F48BE80C2D26F80C05EC4FE364F9BE13EEA6B6F3F48BE80C2D36F804060C4FE364F9BE13E3A04FB3EC00372C2D36F80405170EF3661FFAB3E3A04FB3E010C000000000000000100000000000000060000000100000015020100020003000000000001000200010200000003000000120000000100000016000000FFFFFFFF1000302CFCB6B8C850C2B2905ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF000000000001000027C079C200008034571AF736D6918E40020000001500000000010000000100000006000000000000001400000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200FC9160C2D26F80C08529DE3681D8693E903B6F3FE07470C2D26F80C036E5ED367D6BA73E8E3B6F3FE27470C2D36F804039E5ED36816BA73E82A3FA3EFE9160C2D36F80408929DE368FD8693E82A3FA3E010C00000000000000010000000000000006000000010000001502010002000300000000000100020001020000000300000011000000010000001A000000FFFFFFFF10008441EBB6B8C850C2C6915ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF00000000000100006F8368C2000080345F07E636054C8F400200000019000000000100000001000000060000000000000018000000000100000002000000070000000000000008000000000000000000000050000000000000000100000000000000040000000200000037040300360402008F854EC2D26F80C0D54ACC362E36EE3D903B6F3F1E035FC2D26F80C08D9EDC36C6F05F3E903B6F3F20035FC2D36F8040919EDC36CDF05F3E82A3FA3E92854EC2D36F8040D94ACC365A36EE3D82A3FA3E010C00000000000000010000000000000006000000010000001502010002000300000000000100020001020000000300000010000000010000001E000000FFFFFFFF10004604D9B6B8C850C2E2925ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF000000000001000058C456C200008034B374D43689629040020000001D00000000010000000100000006000000000000001C00000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200BE1E3CC2D26F80C0A514BA366CC2073B903B6F3FB1F64CC2D26F80C001C0CA36C666DA3D903B6F3FB4F64CC2D36F804005C0CA36E366DA3D82A3FA3EC21E3CC2D36F8040A914BA36E4C7073B82A3FA3E010C0000000000000001000000000000000600000001000000150201000200030000000000010002000102000000030000000F0000000100000022000000FFFFFFFF10006E79C6B6B8C850C205945ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000B98A44C200008034556AC2361C099140020000002100000000010000000100000006000000000000002000000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200873A29C2D26F80C02E64A7369CE45E3FA2AFEC3EE08F3AC2D26F80C0FA89B83640387D3FA2AFEC3EE48F3AC2D36F8040FE89B83647387D3F40C08D3C8B3A29C2D36F80403264A736A1E45E3F40C08D3C010C0000000000000001000000000000000600000001000000150201000200030000000000010002000102000000030000000E0000000100000026000000FFFFFFFF100043AAB3B6B8C850C230955ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF000000000001000036E531C20000803416F7AF36C6F4914002000000250000000001000000010000000600000000000000240000000001000000020000000700000000000000080000000000000000000000500000000000000001000000000000000400000002000000370403003604020041CC15C2D26F80C0F72C94368DE53C3FA2AFEC3EA9AB27C2D26F80C0A9D9A536BE2A5C3FA2AFEC3EADAB27C2D36F8040ADD9A536C62A5C3F40C08D3C44CC15C2D36F8040FA2C943693E53C3F40C08D3C010C0000000000000001000000000000000600000001000000150201000200030000000000010002000102000000030000000D000000010000002A000000FFFFFFFF1000A987A0B6B8C850C262965ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000F7BB1EC20000803452039D363BFE92400200000029000000000100000001000000060000000000000028000000000100000002000000070000000000000008000000000000000000000050000000000000000100000000000000040000000200000037040300360402005E8201C2D26F80C0B01D80364366193FA2AFEC3E633D14C2D26F80C08FA29236B02B3A3FA2AFEC3E663D14C2D36F804092A29236B62B3A3F40C08D3C618201C2D36F8040B41D80364566193F40C08D3C010C0000000000000001000000000000000600000001000000150201000200030000000000010002000102000000030000000C000000010000002E000000FFFFFFFF1000CCF38BB6B8C850C2A0975ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000E2DF0AC2000080342160893634B19440020000002D00000000010000000100000006000000000000002C00000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200EF68DAC1D26F80C0141C5836E4BFEB3EA2AFEC3E00E7FFC1D26F80C0EE267D3664AC163FA2AFEC3E06E7FFC1D36F8040F5267D366BAC163F40C08D3CF368DAC1D36F80401A1C5836EBBFEB3E40C08D3C010C0000000000000001000000000000000600000001000000150201000200030000000000010002000102000000030000000B0000000100000032000000FFFFFFFF10003E3270B6B8C850C2E5985ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000FA27EDC10000803484A16A364DB9944002000000310000000001000000010000000600000000000000300000000001000000020000000700000000000000080000000000000000000000500000000000000001000000000000000400000002000000370403003604020077C6AFC1D26F80C04DFE2D36C627A13EA2AFEC3E334BD7C1D26F80C0FC075536294CE63EA2AFEC3E374BD7C1D36F8040010855362F4CE63E40C08D3C7AC6AFC1D36F804052FE2D36C627A13E40C08D3C010C0000000000000001000000000000000600000001000000150201000200030000000000010002000102000000030000000A0000000100000036000000FFFFFFFF10001CD645B6B8C850C2329A5ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000D788C3C10000803427834136B2CE9640020000003500000000010000000100000006000000000000003400000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200E4E083C1D26F80C0D1A50236AEB4283EA2AFEC3EBBA8ACC1D26F80C06EEA2A3609B49B3EA2AFEC3EBEA8ACC1D36F804073EA2A360FB49B3E40C08D3CE8E083C1D36F8040D2A50236C6B4283E80C08D3C010C00000000000000010000000000000006000000010000001502010000000100020002000300000001020000000300000009000000010000003A000000FFFFFFFF10006A6F1AB6B8C850C28C9B5ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000D14498C10000803422C8163642259840020000003900000000010000000100000006000000000000003800000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200E61B2DC1D26F80C0F2D1AB353AB6213CA2AFEC3E28C380C1D26F80C08424FF3540CD1D3EA2AFEC3E2CC380C1D36F80408624FF354CCD1D3E80C08D3CE81B2DC1D36F8040ECD1AB353AB6213C80C08D3C010C000000000000000100000000000000060000000100000015020100020003000000000001000200010500000000000000FFFFFFFF0000000000000000000000000000000000000000000000000000000000000000000000000000803F0000803F0000803F000020410000803FFFFFFFFF00000000FFFFFFFF0000FFFFFFFF00000000FFFFFFFFED1000FFFFFFFF00000000FFFFFFFF0104000000FFFFFFFF060000000100000003000000010000FFFFFFFF00000000FFFFFFFF04000900000001410000000032010000000000000000000000000000FFFFFFFF00000000FFFFFFFF0D000200000003000000010000000100000044000000FFFFFFFF1000705DD8B5B8C850C2F19C5ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F050000003E0000003F000000400000004200000043000000FFFFFFFF00000000FFFFFFFF00000000000100001F5157C100008034397BD535D3B19940020000003D00000000010000000100000006000000000000003C0000000001000000020000000700000000000000080000000000000000000000FFFFFFFF00000000FFFFFFFF0800FFFFFFFF00000000FFFFFFFF0F000000000000000000FFFFFFFF10010000000000000000000000000000803F0000000000000000000000000000803F0000000000000000000000000000803F0000803F020000004600000047000000FFFFFFFF10000000450000003B00000037000000330000002F0000002B00000027000000230000001F0000001B00000017000000130000000F0000000B0000000700000003000000000000000100000048000000
  345. )
  346. Tfh := OpenFileForWrite("%A_ScriptDir%\tmp\guitars_Pc\assets\gameplay\inlay\%ccg2%.nif")
  347. l := Hex2Bin(data, HexString)
  348. WriteInFile(Tfh, data, l)
  349. CloseFile(Tfh)
  350. FileAppend, `n, %A_ScriptDir%\tmp\guitars_Pc\appid.appid
  351. FileAppend, %ccg2%`,%guitarname%`,%guitarname%`,%guitarname%`,%guitarname%`,%guitarname%`,%guitarname%`,%guitarname%`n, %A_ScriptDir%\tmp\static_Pc\localization\maingame.csv
  352. FileCopy, %A_ScriptDir%\tmp\images\inlay_%ccg2%_512.dds, %A_ScriptDir%\tmp\static_Pc\gfxassets\rewards\guitar_inlays\reward_inlay_%ccg2%_512.dds
  353. FileCopy, %A_ScriptDir%\tmp\images\inlay_%ccg2%_256.dds, %A_ScriptDir%\tmp\static_Pc\gfxassets\rewards\guitar_inlays\reward_inlay_%ccg2%_256.dds
  354. FileCopy, %A_ScriptDir%\tmp\images\inlay_%ccg2%_128.dds, %A_ScriptDir%\tmp\static_Pc\gfxassets\rewards\guitar_inlays\reward_inlay_%ccg2%_128.dds
  355. FileCopy, %A_ScriptDir%\tmp\images\inlay_%ccg2%_64.dds, %A_ScriptDir%\tmp\static_Pc\gfxassets\rewards\guitar_inlays\reward_inlay_%ccg2%_64.dds
  356. FileRemoveDir, %A_ScriptDir%\tmp\cache_Pc\cache7, 1
  357. FileRemoveDir, %A_ScriptDir%\tmp\cache_Pc\cache4, 1
  358. RunWait, %A_ScriptDir%\ressources\packer.exe --pack --input=%A_ScriptDir%\tmp\cache_Pc --output=%A_ScriptDir%\output\cache.psarc
  359. RunWait, %A_ScriptDir%\ressources\packer.exe --pack --input=%A_ScriptDir%\tmp\guitars_Pc --output=%A_ScriptDir%\output\guitars.psarc
  360. RunWait, %A_ScriptDir%\ressources\packer.exe --pack --input=%A_ScriptDir%\tmp\static_Pc --output=%A_ScriptDir%\output\static.psarc
  361. IniWrite, %RS2014DIR%, CustomGuitarList.ini, Rocksmith2014Directory, Rocksmith2014dir
  362. IniWrite, %ccg2% - %guitarname%, CustomGuitarList.ini, GuitarList, %ID1%
  363. IniWrite, %ID1%, CustomGuitarList.ini, CustomGuitarMasterID, MasterID%ccg%
  364. IniWrite, %ccg2%, CustomGuitarList.ini, CustomGuitarLinkToID, %ID1%
  365. IniWrite, %guitarname%, CustomGuitarList.ini, CustomGuitarNameList, Guitar%ccg%
  366. ccg++
  367. ccg2++
  368. IniWrite, %ccg%, CustomGuitarList.ini, NumberInstance, NumberSet
  369. IniWrite, %ccg2%, CustomGuitarList.ini, NumberInstance, NumberGuitar
  370. FileDelete, %A_ScriptDir%\tmp\images\*.*
  371. FileRemoveDir, %A_ScriptDir%\tmp\cache_Pc, 1
  372. FileRemoveDir, %A_ScriptDir%\tmp\guitars_Pc, 1
  373. FileRemoveDir, %A_ScriptDir%\tmp\static_Pc, 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement