Advertisement
Baoulettes

Guitar Maker Rocksmith 2014

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