Baoulettes

Rocksmith 2014 Guitars Maker (ui) V1.0.0.0 BETA

Nov 21st, 2013
396
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 62.78 KB | None | 0 0
  1. #singleinstance force
  2. softname = Rocksmith 2014 Guitar Maker
  3. buildversion = 1.0.0.0b
  4. If RS2014DIR = ERROR
  5. {
  6. RS2014DIR = Undefinied.
  7. } else {
  8. IniRead, RS2014DIR, CustomGuitarList.ini, Rocksmith2014Directory, Rocksmith2014dir
  9. }
  10.  
  11. IniRead, ccg, CustomGuitarList.ini, NumberInstance, NumberSet
  12. IniRead, ccg2, CustomGuitarList.ini, NumberInstance, NumberGuitar
  13. IniRead, RS2014DIR, CustomGuitarList.ini, Rocksmith2014Directory, Rocksmith2014dir
  14. If ccg = ERROR
  15. {
  16. IniWrite, 0, CustomGuitarList.ini, NumberInstance, NumberSet
  17. IniRead, ccg, CustomGuitarList.ini, NumberInstance, NumberSet
  18. } else {
  19. IniRead, ccg, CustomGuitarList.ini, NumberInstance, NumberSet
  20. }
  21. If ccg2 = ERROR
  22. {
  23. IniWrite, 90000, CustomGuitarList.ini, NumberInstance, NumberGuitar
  24. IniRead, ccg2, CustomGuitarList.ini, NumberInstance, NumberGuitar
  25. } else {
  26. IniRead, ccg2, CustomGuitarList.ini, NumberInstance, NumberGuitar
  27. }
  28. IDString = a0b1c2d3e4f5a6b7c8d9e0f
  29. Random, RDM1, 0x00F000000, 0x00fffffff
  30. ID1 = %IDString%%RDM1%
  31. StringUpper, ID1MAJ, ID1
  32. guitarname = English Default name
  33. guitarname1 = French name
  34. guitarname2 = Spanish name
  35. guitarname3 = Italian name
  36. guitarname4 = German name
  37. guitarname5 = Japanese name
  38. DDSInlayfiles = %A_ScriptDir%\ressources\images\inlay_preview.png
  39. DDSI512files = %A_ScriptDir%\ressources\images\icon.png
  40. RandomName(MinLength=4, MaxLength=0)
  41. {
  42.  
  43. ;This is a table of probabilities of given letter combinations.
  44. ;Each list is the probability of any letter coming after the letter that is the variable name.
  45. ;The 27th value is the probability that the word ends with the current letter.
  46.  
  47. A=0.005129|0.020532|0.038276|0.031753|0.005903|0.009913|0.027038|0.014457|0.023527|0.003511|0.021702|0.086397|0.045315|0.192551|0.002685|0.014491|0.001136|0.142056|0.059445|0.043698|0.041322|0.018312|0.010774|0.001824|0.020584|0.010240|0.107428
  48. B=0.184518|0.021072|0.000500|0.002564|0.243982|0.000125|0.000188|0.002564|0.076033|0.001313|0.001563|0.055274|0.000875|0.002376|0.132933|0.000063|0.000000|0.133683|0.009192|0.000313|0.090977|0.000188|0.000125|0.000000|0.022447|0.000313|0.016820
  49. C=0.131713|0.001253|0.042204|0.003536|0.053348|0.001566|0.008727|0.275689|0.051557|0.000090|0.154493|0.028375|0.003849|0.004117|0.123255|0.001343|0.002954|0.036744|0.002506|0.003043|0.028419|0.000806|0.001343|0.000000|0.004699|0.017678|0.016694
  50. D=0.103809|0.005881|0.001079|0.024765|0.256609|0.003345|0.017266|0.006367|0.102029|0.000701|0.002968|0.027085|0.008849|0.007985|0.107424|0.000432|0.000432|0.046833|0.019208|0.017427|0.044783|0.001619|0.007068|0.000000|0.020557|0.005288|0.160192
  51. E=0.031341|0.012931|0.019802|0.020976|0.022773|0.007726|0.014163|0.010930|0.034414|0.002392|0.012409|0.104894|0.023455|0.108561|0.004291|0.007973|0.000464|0.239084|0.062957|0.042633|0.006958|0.011727|0.010582|0.001363|0.039371|0.008379|0.137452
  52. F=0.111275|0.000369|0.000985|0.000246|0.170236|0.139463|0.000985|0.000985|0.112752|0.000492|0.003570|0.058961|0.004677|0.004677|0.114476|0.000246|0.000123|0.100197|0.011324|0.021295|0.041113|0.000369|0.000246|0.000000|0.003570|0.000862|0.096504
  53. G=0.140257|0.004596|0.000919|0.003493|0.199694|0.002145|0.030944|0.064951|0.064767|0.000551|0.000919|0.053922|0.006311|0.020282|0.084191|0.000551|0.000368|0.083027|0.019179|0.012316|0.063725|0.000797|0.004718|0.000245|0.003309|0.000123|0.133701
  54. H=0.214954|0.004703|0.001599|0.001035|0.189466|0.002116|0.000564|0.002069|0.102610|0.000658|0.003621|0.037903|0.020973|0.022384|0.124759|0.000329|0.000000|0.032683|0.006207|0.021067|0.054221|0.000517|0.009358|0.000000|0.009828|0.000141|0.136233
  55. I=0.044717|0.012847|0.076362|0.026840|0.088736|0.009884|0.035604|0.003560|0.000896|0.001320|0.015511|0.082586|0.027886|0.216811|0.031571|0.012474|0.001270|0.031247|0.081889|0.054502|0.004158|0.011802|0.001494|0.002938|0.001245|0.009262|0.112588
  56. J=0.333844|0.000510|0.012251|0.006126|0.211843|0.000000|0.001021|0.003063|0.059214|0.001021|0.010720|0.002552|0.003063|0.009188|0.197550|0.000000|0.000000|0.000000|0.002552|0.007657|0.110260|0.000000|0.001021|0.000000|0.000510|0.001531|0.024502
  57. K=0.105301|0.002453|0.000239|0.000658|0.194089|0.001615|0.000120|0.013522|0.166507|0.000838|0.003889|0.046787|0.009633|0.017470|0.101412|0.000299|0.000060|0.036078|0.023932|0.001137|0.039069|0.000897|0.004786|0.000239|0.025009|0.000179|0.203781
  58. L=0.142144|0.012700|0.007785|0.033484|0.190748|0.007136|0.004641|0.004666|0.115222|0.000499|0.010554|0.157140|0.017815|0.003019|0.079568|0.004042|0.000549|0.002146|0.023429|0.022031|0.025599|0.007884|0.002770|0.000075|0.015320|0.004292|0.104743
  59. M=0.313971|0.039109|0.071357|0.001102|0.144316|0.001552|0.001502|0.001252|0.093991|0.000300|0.003756|0.007561|0.032849|0.001753|0.110366|0.030796|0.000451|0.004507|0.016475|0.000701|0.039509|0.000150|0.001052|0.000000|0.007161|0.000801|0.073660
  60. N=0.061413|0.016703|0.021091|0.069684|0.122481|0.004871|0.078736|0.008455|0.062562|0.000942|0.020976|0.004802|0.002481|0.042114|0.058036|0.001011|0.000712|0.003538|0.053877|0.050017|0.007168|0.001746|0.003331|0.000000|0.007099|0.011970|0.284182
  61. O=0.008524|0.017299|0.028237|0.027181|0.024717|0.015061|0.013377|0.013477|0.008725|0.002338|0.011843|0.083101|0.033291|0.169068|0.030248|0.016394|0.000654|0.114958|0.060421|0.038018|0.047975|0.020140|0.041337|0.002791|0.010611|0.008725|0.151492
  62. P=0.176699|0.000875|0.001459|0.000972|0.201984|0.015365|0.000292|0.038802|0.113099|0.000097|0.010503|0.051055|0.002334|0.003209|0.103958|0.076145|0.000000|0.074492|0.021103|0.010114|0.033064|0.000194|0.000875|0.000000|0.007002|0.000097|0.056209
  63. Q=0.006831|0.001366|0.000000|0.001366|0.000000|0.000000|0.000000|0.000000|0.005464|0.000000|0.000000|0.000000|0.000000|0.000000|0.000000|0.000000|0.000000|0.001366|0.000000|0.000000|0.968579|0.001366|0.000000|0.000000|0.000000|0.000000|0.013661
  64. R=0.107889|0.012734|0.012774|0.039466|0.114066|0.005515|0.027955|0.005334|0.100509|0.000762|0.014499|0.017507|0.018449|0.029038|0.095937|0.004171|0.001043|0.037882|0.037180|0.049252|0.031785|0.005475|0.003068|0.000160|0.020154|0.005715|0.201681
  65. S=0.063337|0.009701|0.073814|0.002910|0.097763|0.001774|0.001525|0.060925|0.050808|0.000554|0.061286|0.020318|0.015134|0.008482|0.067384|0.021426|0.002328|0.001663|0.053885|0.132300|0.016797|0.001247|0.011808|0.000000|0.003964|0.007429|0.211437
  66. T=0.091587|0.001630|0.012519|0.000347|0.159384|0.001595|0.001769|0.072652|0.074005|0.001283|0.006208|0.018484|0.009294|0.007352|0.110522|0.000555|0.000069|0.065543|0.026564|0.109169|0.024691|0.000763|0.005098|0.000000|0.013525|0.036447|0.148946
  67. U=0.021849|0.032911|0.052449|0.040176|0.074243|0.017281|0.047056|0.012163|0.041827|0.002862|0.015190|0.084205|0.058118|0.084810|0.006219|0.021354|0.001101|0.136984|0.111833|0.065658|0.000881|0.005449|0.002367|0.008806|0.007320|0.013979|0.032911
  68. V=0.281558|0.000162|0.000647|0.001293|0.327461|0.000162|0.000323|0.000162|0.251657|0.000485|0.001616|0.010991|0.000162|0.003071|0.078390|0.000000|0.000000|0.012769|0.007435|0.000323|0.004687|0.000162|0.000323|0.000000|0.007112|0.000485|0.008566
  69. W=0.204323|0.006032|0.003770|0.009801|0.191380|0.000880|0.001131|0.037824|0.200804|0.000000|0.005278|0.018472|0.003644|0.016210|0.092109|0.000377|0.000126|0.013948|0.074265|0.004398|0.007665|0.000628|0.000628|0.000000|0.015582|0.000628|0.090098
  70. X=0.063694|0.022293|0.004777|0.001592|0.081210|0.012739|0.000000|0.011146|0.065287|0.000000|0.001592|0.039809|0.014331|0.014331|0.044586|0.001592|0.000000|0.004777|0.033439|0.078025|0.007962|0.000000|0.014331|0.003185|0.004777|0.001592|0.472930
  71. Y=0.061443|0.012165|0.011753|0.016289|0.072062|0.003505|0.004845|0.004845|0.003505|0.000206|0.016907|0.026495|0.018763|0.042268|0.032680|0.003711|0.000206|0.014330|0.026186|0.011856|0.008763|0.001443|0.004021|0.000206|0.000412|0.002887|0.598247
  72. Z=0.165246|0.006787|0.005366|0.004261|0.174085|0.000947|0.004261|0.003946|0.121370|0.000000|0.014205|0.018466|0.017045|0.009154|0.066761|0.000789|0.001578|0.001578|0.004104|0.000631|0.035827|0.000631|0.008996|0.000000|0.034722|0.058396|0.240846
  73. Start=0.037129|0.091544|0.068008|0.055260|0.020789|0.036464|0.052670|0.058435|0.006802|0.012894|0.051228|0.053638|0.085992|0.020597|0.016318|0.052275|0.002725|0.047647|0.109494|0.038852|0.004460|0.023480|0.036127|0.000180|0.006261|0.010732
  74.  
  75.  
  76. ;This allows numerical values to easily be converted to letters.
  77. Alphabet = ABCDEFGHIJKLMNOPQRSTUVWXYZ
  78.  
  79. Loop
  80. {
  81. ;Checks for the previous letter to determine which set of probabilities to use.
  82. If (!Word)
  83. Previous = Start
  84. Else
  85. Previous := SubStr(Word, 0, 1)
  86.  
  87.  
  88. ;Randomly chooses the next letter, based on the probabilities listed above.
  89. Random, rand, 0.0, 1.0
  90. Sum = 0
  91. Next =
  92. Loop, parse, %Previous%, |
  93. {
  94. Sum += A_LoopField
  95. If (rand<Sum)
  96. {
  97. Next := SubStr(Alphabet, A_Index, 1)
  98. Break
  99. }
  100. }
  101.  
  102.  
  103. ;Finishes the word if the word randomly ends or reaches the maximum length.
  104. If ((!Next AND StrLen(Word)>=MinLength) OR (MaxLength AND StrLen(Word)=MaxLength))
  105. Break
  106.  
  107. Word .= Next
  108. }
  109.  
  110. StringLower, Word, Word, T
  111. Return, Word
  112. }
  113. RandomName = % RandomName(6,6)
  114. StringLower, RandomName, RandomName
  115. guitarnamesix = %RandomName%
  116.  
  117. Gui, Add, Picture, x102 y9 w610 h120 , %A_ScriptDir%\ressources\images\rocksmith_2014_logo_graded.png
  118. Gui, Add, Text, x712 y109 w90 h20 , Version : %buildversion%
  119.  
  120. Gui, Add, Button,gRS2014D vRS2014DB x272 y119 w100 h30, RS2014 Directory
  121. Gui, Add, Text,vrs2014dirtext x22 y129 w240 h30, %RS2014DIR%
  122.  
  123. Gui, Add, Text,vidmaster x22 y163 w240 h30 , %ID1MAJ%
  124. Gui, Add, Text,vguitarid x272 y163 w100 h30 , %ccg2%
  125.  
  126. Gui, Add, Text, x22 y239 w150 h30 , English name :
  127. Gui, Add, Edit, vnewenglishname x182 y239 w190 h30 , %guitarname%
  128. Gui, Add, Text, x22 y279 w150 h30 , French name :
  129. Gui, Add, Edit, vnewfrenchname x182 y279 w190 h30 , %guitarname1%
  130. Gui, Add, Text, x22 y319 w150 h30 , Spanish name :
  131. Gui, Add, Edit, vnewspanishname x182 y319 w190 h30 , %guitarname2%
  132. Gui, Add, Text, x22 y359 w150 h30 , Italian name :
  133. Gui, Add, Edit, vnewitalianname x182 y359 w190 h30 , %guitarname3%
  134. Gui, Add, Text, x22 y399 w150 h30 , German name :
  135. Gui, Add, Edit, vnewgermanname x182 y399 w190 h30 , %guitarname4%
  136. Gui, Add, Text, x22 y439 w150 h30 , Japanese name :
  137. Gui, Add, Edit, vnewjapanesename x182 y439 w190 h30 , %guitarname5%
  138.  
  139. Gui, Add, Picture,gnewiconfiles vnewicon x382 y119 w150 h150 , %DDSI512files%
  140. Gui, Add, Text,vdefaultname x572 y149 w200 h30 , %guitarname%
  141.  
  142. Gui, Add, Text,vdefault6name Limit6 x572 y189 w200 h30 , %RandomName%
  143.  
  144. Gui, Add, Picture,gnewinlayfiles vnewinlay x382 y289 w420 h150 , %DDSInlayfiles%
  145. Gui, Add, Button,ggetemplate vgetemplateB x702 y449 w100 h30 , Get the template
  146. Gui, Add, CheckBox,vcoloredinlay x572 y229 w200 h30, Colored Inlay
  147. Gui, Add, Text, x382 y449 w310 h30 , %ccg% custom guitars have been created already.
  148.  
  149. Gui, Add, Progress,vprogressbar x12 y489 w680 h30 , %progress%
  150. Gui, Add, Button,gparse vparseB x702 y489 w100 h30 , Create it !
  151. Gui, Show, h535 w816, %softname%
  152. Gui, Add, Button,gabout vaboutB x712 y79 w90 h30 , About
  153. SetTimer, Refreshmahname, 10
  154. return
  155.  
  156. about:
  157. Gui, 2:Add, Picture, x2 y-1 w450 h120 +Center, E:\Softwares\AutoHotkey\SourceGuitarCreator\Makers\RS2014GuitarMakerUI\ressources\images\rocksmith_2014_logo.png
  158. Gui, 2:Add, Text, x122 y109 w200 h30 +Center, Version : %buildversion%
  159. Gui, 2:Add, Text,gbaoulettes x122 y129 w200 h30 +Center, Made by : Baoulettes
  160. Gui, 2:Add, Text, x122 y169 w200 h30 +Center, - Credits -
  161. Gui, 2:Add, Text, x2 y209 w200 h30 +Center, - Psarc packer/unpacker -
  162. Gui, 2:Add, Button,ggooglegroups x42 y239 w120 h40 +Center, Open Tool Google Groups
  163. Gui, 2:Add, Text, x2 y319 w200 h30 +Center, - ImageMagick -
  164. Gui, 2:Add, Button,gimagemagick x42 y349 w120 h40 +Center, Open imageMagick
  165. Gui, 2:Add, Text, x252 y209 w200 h30 +Center, - 7zip packer/unpacker -
  166. Gui, 2:Add, Button,g7zip x292 y239 w120 h40 +Center, Open 7zip website
  167. Gui, 2:Add, Text, x252 y319 w200 h30 +Center, AutoHotkey libs
  168. Gui, 2:Add, Button,gautohotkey x292 y349 w120 h40 +Center, Open Autohotkey website
  169. Gui, 2:Show,h403 w455, %softname% - About
  170. return
  171.  
  172. getemplate:
  173. run, http://s21.postimg.org/7ce6pru3b/Cadrillage_2.png
  174. return
  175.  
  176. googlegroups:
  177. run, https://groups.google.com/forum/#!forum/rocksmith-custom-song-project
  178. return
  179.  
  180. imagemagick:
  181. run, http://www.imagemagick.org
  182. return
  183.  
  184. 7zip:
  185. run, http://www.7-zip.org/
  186. return
  187.  
  188. autohotkey:
  189. run, http://www.autohotkey.com
  190. return
  191.  
  192. baoulettes:
  193. run, http://forums.smithyanvil.com/profile.php?id=319
  194. return
  195.  
  196. Refreshmahname:
  197. GuiControlGet, newenglishname
  198. GuiControl,, defaultname, %newenglishname%
  199. return
  200.  
  201. RS2014D:
  202. FileSelectFolder, RS2014DIR,, 3, Select Rocksmith 2014 Installation folder.
  203. IniWrite, %RS2014DIR%, CustomGuitarList.ini, Rocksmith2014Directory, Rocksmith2014dir
  204. GuiControl,, rs2014dirtext, %RS2014DIR%
  205. return
  206.  
  207. newiconfiles:
  208. FileSelectFile, DDSI512files, 3, , Open a Icon 512x512 Image, Rocksmith 2014 Icon 512x512 Image files (*.tga; *.png; *.dds)
  209. GuiControl,, newicon, %DDSI512files%
  210. return
  211.  
  212. newinlayfiles:
  213. FileSelectFile, DDSInlayfiles, 3, , Open a Inlay Image, Rocksmith 2014 Inlay Image files (*.tga; *.png; *.dds)
  214. GuiControl,, newinlay, %DDSInlayfiles%
  215. return
  216.  
  217. parse:
  218. GuiControl, disable, RS2014DB
  219. GuiControl, disable, newinlay
  220. GuiControl, disable, newicon
  221. GuiControl, disable, coloredinlay
  222. GuiControl, disable, getemplateB
  223. GuiControl, disable, newenglishname
  224. GuiControl, disable, newfrenchname
  225. GuiControl, disable, newspanishname
  226. GuiControl, disable, newitalianname
  227. GuiControl, disable, newgermanname
  228. GuiControl, disable, newjapanesename
  229. GuiControl, disable, aboutB
  230. GuiControl, disable, parseB
  231. GuiControlGet, coloredinlay
  232. GuiControlGet, newfrenchname
  233. GuiControlGet, newspanishname
  234. GuiControlGet, newitalianname
  235. GuiControlGet, newgermanname
  236. GuiControlGet, newjapanesename
  237. guitarname = %newenglishname%
  238. guitarname1 = %newfrenchname%
  239. guitarname2 = %newspanishname%
  240. guitarname3 = %newitalianname%
  241. guitarname4 = %newgermanname%
  242. guitarname5 = %newjapanesename%
  243.  
  244. if coloredinlay = 1
  245. {
  246. nif1 = 47616D656272796F2046696C6520466F726D61742C2056657273696F6E2033302E312E302E330A0300011E010000000049000000000000000B00110000004E694461746153747265616D0131013138110000004E694461746153747265616D0130013138110000004E69537472696E67457874726144617461060000004E694D657368120000004E694D6174657269616C50726F7065727479150000004E69566572746578436F6C6F7250726F70657274790F0000004E69416C70686150726F70657274790F0000004E69536F7572636554657874757265130000004E69546578747572696E6750726F7065727479110000004E695A42756666657250726F7065727479060000004E694E6F64650000010002000300000001000200030000000100020003000000010002000300000001000200030000000100020003000000010002000300000001000200030000000100020003000000010002000300000001000200030000000100020003000000010002000300000001000200030000000100020003000000010004000500060007000800090002000300050009000A00710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC0000007100000029000000440000000E0000000F00000024000000280000000E00000008000000BC0000000E0000000E0000009A00000018000000100000000A0000005363656E6520526F6F7407000000696E6C61795F330E0000005573657250726F704275666665720B0000000D0A7A4D6F646531300D0A10000000
  247. nif2 = 0B0000004D6174657269616C20233205000000494E44455808000000504F534954494F4E08000000544558434F4F524407000000696E6C61795F3407000000696E6C61795F3507000000696E6C61795F3607000000696E6C61795F3707000000696E6C61795F3807000000696E6C61795F3908000000696E6C61795F313008000000696E6C61795F313108000000696E6C61795F313208000000696E6C61795F313308000000696E6C61795F313408000000696E6C61795F313508000000696E6C61795F313608000000696E6C61795F313708000000696E6C61795F31380000000050000000000000000100000000000000040000000200000037040300360402008EDBA1C2D26F80C049382037B18A633FEA6B6F3F01A3A8C2D26F80C06CF22637E7077B3FEA6B6F3F02A3A8C2D36F80406CF22637EB077B3F3A04FB3E8FDBA1C2D36F804049382037B98A633F3A04FB3E010C000000000000000100000000000000060000000100000015020100020003000000000001000200010200000003000000170000000100000002000000FFFFFFFF10009C2727B7B8C850C2A68B5ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000483FA5C2000080345A952337DC6A8B400200000001000000000100000001000000060000000000000000000000000100000002000000070000000000000008000000000000000000000050000000000000000100000000000000040000000200000037040300360402002DF799C2D26F80C0AF6318374532483FEA6B6F3F1E14A1C2D26F80C065721F37A7D7603FEA6B6F3F1F14A1C2D36F804065721F37AFD7603F3A04FB3E2EF799C2D36F8040AF6318374932483F3A04FB3E010C000000000000000100000000000000060000000100000015020100020003000000000001000200010200000003000000160000000100000006000000FFFFFFFF100021431FB7B8C850C29D8C5ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000A6859DC2000080340AEB1B376F7A8C400200000005000000000100000001000000060000000000000004000000000100000002000000070000000000000008000000000000000000000050000000000000000100000000000000040000000200000037040300360402001E1A92C2D26F80C0609710372BF32C3FEA6B6F3FBD2F99C2D26F80C0DC9D17373B7F453FEA6B6F3FBE2F99C2D36F8040DD9D17373B7F453F3A04FB3E1E1A92C2D36F80406097103727F32C3F3A04FB3E010C00000000000000010000000000000006000000010000001502010002000300000000000100020001020000000300000015000000010000000A000000FFFFFFFF1000E64517B7B8C850C29A8D5ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000EEA495C2000080349E1A1437C0628C40020000000900000000010000000100000006000000000000000800000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200C6D489C2D26F80C0E4630837C34A103FEA6B6F3FAE5291C2D26F80C09DD10F3729402A3FEA6B6F3FAE5291C2D36F80409ED10F3725402A3F3A04FB3EC6D489C2D36F8040E6630837BF4A103F3A04FB3E010C00000000000000010000000000000006000000010000001502010002000300000000000100020001020000000300000014000000010000000E000000FFFFFFFF1000F5290FB7B8C850C29C8E5ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000BA938DC200008034C11A0C3794BB8D40020000000D00000000010000000100000006000000000000000C00000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200B88581C2D26F80C0CD2700376301E73EEA6B6F3F560D89C2D26F80C0319E0737B9970D3FEA6B6F3F560D89C2D36F8040339E0737B7970D3F3A04FB3EB88581C2D36F8040CE2700376001E73E3A04FB3E010C000000000000000100000000000000060000000100000015020100020003000000000001000200010200000003000000130000000100000012000000FFFFFFFF1000ECE906B7B8C850C2A58F5ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000874985C20000803400E303377FDC8D40020000001100000000010000000100000006000000000000001000000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200BE0372C2D26F80C04E70EF3668FFAB3EEA6B6F3F48BE80C2D26F80C05EC4FE364F9BE13EEA6B6F3F48BE80C2D36F804060C4FE364F9BE13E3A04FB3EC00372C2D36F80405170EF3661FFAB3E3A04FB3E010C000000000000000100000000000000060000000100000015020100020003000000000001000200010200000003000000120000000100000016000000FFFFFFFF1000302CFCB6B8C850C2B2905ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF000000000001000027C079C200008034571AF736D6918E40020000001500000000010000000100000006000000000000001400000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200FC9160C2D26F80C08529DE3681D8693E903B6F3FE07470C2D26F80C036E5ED367D6BA73E8E3B6F3FE27470C2D36F804039E5ED36816BA73E82A3FA3EFE9160C2D36F80408929DE368FD8693E82A3FA3E010C00000000000000010000000000000006000000010000001502010002000300000000000100020001020000000300000011000000010000001A000000FFFFFFFF10008441EBB6B8C850C2C6915ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF00000000000100006F8368C2000080345F07E636054C8F400200000019000000000100000001000000060000000000000018000000000100000002000000070000000000000008000000000000000000000050000000000000000100000000000000040000000200000037040300360402008F854EC2D26F80C0D54ACC362E36EE3D903B6F3F1E035FC2D26F80C08D9EDC36C6F05F3E903B6F3F20035FC2D36F8040919EDC36CDF05F3E82A3FA3E92854EC2D36F8040D94ACC365A36EE3D82A3FA3E010C00000000000000010000000000000006000000010000001502010002000300000000000100020001020000000300000010000000010000001E000000FFFFFFFF10004604D9B6B8C850C2E2925ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF000000000001000058C456C200008034B374D43689629040020000001D00000000010000000100000006000000000000001C00000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200BE1E3CC2D26F80C0A514BA366CC2073B903B6F3FB1F64CC2D26F80C001C0CA36C666DA3D903B6F3FB4F64CC2D36F804005C0CA36E366DA3D82A3FA3EC21E3CC2D36F8040A914BA36E4C7073B82A3FA3E010C0000000000000001000000000000000600000001000000150201000200030000000000010002000102000000030000000F0000000100000022000000FFFFFFFF10006E79C6B6B8C850C205945ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000B98A44C200008034556AC2361C099140020000002100000000010000000100000006000000000000002000000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200873A29C2D26F80C02E64A7369CE45E3FA2AFEC3EE08F3AC2D26F80C0FA89B83640387D3FA2AFEC3EE48F3AC2D36F8040FE89B83647387D3F40C08D3C8B3A29C2D36F80403264A736A1E45E3F40C08D3C010C0000000000000001000000000000000600000001000000150201000200030000000000010002000102000000030000000E0000000100000026000000FFFFFFFF100043AAB3B6B8C850C230955ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF000000000001000036E531C20000803416F7AF36C6F4914002000000250000000001000000010000000600000000000000240000000001000000020000000700000000000000080000000000000000000000500000000000000001000000000000000400000002000000370403003604020041CC15C2D26F80C0F72C94368DE53C3FA2AFEC3EA9AB27C2D26F80C0A9D9A536BE2A5C3FA2AFEC3EADAB27C2D36F8040ADD9A536C62A5C3F40C08D3C44CC15C2D36F8040FA2C943693E53C3F40C08D3C010C0000000000000001000000000000000600000001000000150201000200030000000000010002000102000000030000000D000000010000002A000000FFFFFFFF1000A987A0B6B8C850C262965ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000F7BB1EC20000803452039D363BFE92400200000029000000000100000001000000060000000000000028000000000100000002000000070000000000000008000000000000000000000050000000000000000100000000000000040000000200000037040300360402005E8201C2D26F80C0B01D80364366193FA2AFEC3E633D14C2D26F80C08FA29236B02B3A3FA2AFEC3E663D14C2D36F804092A29236B62B3A3F40C08D3C618201C2D36F8040B41D80364566193F40C08D3C010C0000000000000001000000000000000600000001000000150201000200030000000000010002000102000000030000000C000000010000002E000000FFFFFFFF1000CCF38BB6B8C850C2A0975ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000E2DF0AC2000080342160893634B19440020000002D00000000010000000100000006000000000000002C00000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200EF68DAC1D26F80C0141C5836E4BFEB3EA2AFEC3E00E7FFC1D26F80C0EE267D3664AC163FA2AFEC3E06E7FFC1D36F8040F5267D366BAC163F40C08D3CF368DAC1D36F80401A1C5836EBBFEB3E40C08D3C010C0000000000000001000000000000000600000001000000150201000200030000000000010002000102000000030000000B0000000100000032000000FFFFFFFF10003E3270B6B8C850C2E5985ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000FA27EDC10000803484A16A364DB9944002000000310000000001000000010000000600000000000000300000000001000000020000000700000000000000080000000000000000000000500000000000000001000000000000000400000002000000370403003604020077C6AFC1D26F80C04DFE2D36C627A13EA2AFEC3E334BD7C1D26F80C0FC075536294CE63EA2AFEC3E374BD7C1D36F8040010855362F4CE63E40C08D3C7AC6AFC1D36F804052FE2D36C627A13E40C08D3C010C0000000000000001000000000000000600000001000000150201000200030000000000010002000102000000030000000A0000000100000036000000FFFFFFFF10001CD645B6B8C850C2329A5ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000D788C3C10000803427834136B2CE9640020000003500000000010000000100000006000000000000003400000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200E4E083C1D26F80C0D1A50236AEB4283EA2AFEC3EBBA8ACC1D26F80C06EEA2A3609B49B3EA2AFEC3EBEA8ACC1D36F804073EA2A360FB49B3E40C08D3CE8E083C1D36F8040D2A50236C6B4283E80C08D3C010C00000000000000010000000000000006000000010000001502010000000100020002000300000001020000000300000009000000010000003A000000FFFFFFFF10006A6F1AB6B8C850C28C9B5ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000D14498C10000803422C8163642259840020000003900000000010000000100000006000000000000003800000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200E61B2DC1D26F80C0F2D1AB353AB6213CA2AFEC3E28C380C1D26F80C08424FF3540CD1D3EA2AFEC3E2CC380C1D36F80408624FF354CCD1D3E80C08D3CE81B2DC1D36F8040ECD1AB353AB6213C80C08D3C010C000000000000000100000000000000060000000100000015020100020003000000000001000200010500000000000000FFFFFFFF0000000000000000000000000000000000000000000000000000000000000000000000000000803F0000803F0000803F000020410000803FFFFFFFFF00000000FFFFFFFF0000FFFFFFFF00000000FFFFFFFFED1000FFFFFFFF00000000FFFFFFFF0104000000FFFFFFFF060000000100000003000000010000FFFFFFFF00000000FFFFFFFF04000900000001410000000032010000000000000000000000000000FFFFFFFF00000000FFFFFFFF0D000200000003000000010000000100000044000000FFFFFFFF1000705DD8B5B8C850C2F19C5ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F050000003E0000003F000000400000004200000043000000FFFFFFFF00000000FFFFFFFF00000000000100001F5157C100008034397BD535D3B19940020000003D00000000010000000100000006000000000000003C0000000001000000020000000700000000000000080000000000000000000000FFFFFFFF00000000FFFFFFFF0800FFFFFFFF00000000FFFFFFFF0F000000000000000000FFFFFFFF10010000000000000000000000000000803F0000000000000000000000000000803F0000000000000000000000000000803F0000803F020000004600000047000000FFFFFFFF10000000450000003B00000037000000330000002F0000002B00000027000000230000001F0000001B00000017000000130000000F0000000B0000000700000003000000000000000100000048000000
  248. }
  249. else
  250. {
  251. nif1 = 47616D656272796F2046696C6520466F726D61742C2056657273696F6E2033302E312E302E330A0300011E010000000049000000000000000B00110000004E694461746153747265616D0131013138110000004E694461746153747265616D0130013138110000004E69537472696E67457874726144617461060000004E694D657368120000004E694D6174657269616C50726F7065727479150000004E69566572746578436F6C6F7250726F70657274790F0000004E69416C70686150726F70657274790F0000004E69536F7572636554657874757265130000004E69546578747572696E6750726F7065727479110000004E695A42756666657250726F7065727479060000004E694E6F64650000010002000300000001000200030000000100020003000000010002000300000001000200030000000100020003000000010002000300000001000200030000000100020003000000010002000300000001000200030000000100020003000000010002000300000001000200030000000100020003000000010004000500060007000800090002000300050009000A0008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC00000071000000290000000F00000024000000280000000E00000008000000BC0000000E0000000E0000009A00000018000000100000000A0000005363656E6520526F6F7407000000696E6C61795F300E0000005573657250726F704275666665720B0000000D0A7A4D6F646531300D0A10000000
  252. nif2 = 0B0000004D6174657269616C20233205000000494E44455808000000504F534954494F4E08000000544558434F4F524407000000696E6C61795F3007000000696E6C61795F3007000000696E6C61795F3007000000696E6C61795F3007000000696E6C61795F3007000000696E6C61795F300800000000696E6C61795F300800000000696E6C61795F300800000000696E6C61795F300800000000696E6C61795F300800000000696E6C61795F300800000000696E6C61795F300800000000696E6C61795F300800000000696E6C61795F300800000000696E6C61795F300000000050000000000000000100000000000000040000000200000037040300360402008EDBA1C2D26F80C049382037B18A633FEA6B6F3F01A3A8C2D26F80C06CF22637E7077B3FEA6B6F3F02A3A8C2D36F80406CF22637EB077B3F3A04FB3E8FDBA1C2D36F804049382037B98A633F3A04FB3E010C000000000000000100000000000000060000000100000015020100020003000000000001000200010200000003000000170000000100000002000000FFFFFFFF10009C2727B7B8C850C2A68B5ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000483FA5C2000080345A952337DC6A8B400200000001000000000100000001000000060000000000000000000000000100000002000000070000000000000008000000000000000000000050000000000000000100000000000000040000000200000037040300360402002DF799C2D26F80C0AF6318374532483FEA6B6F3F1E14A1C2D26F80C065721F37A7D7603FEA6B6F3F1F14A1C2D36F804065721F37AFD7603F3A04FB3E2EF799C2D36F8040AF6318374932483F3A04FB3E010C000000000000000100000000000000060000000100000015020100020003000000000001000200010200000003000000160000000100000006000000FFFFFFFF100021431FB7B8C850C29D8C5ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000A6859DC2000080340AEB1B376F7A8C400200000005000000000100000001000000060000000000000004000000000100000002000000070000000000000008000000000000000000000050000000000000000100000000000000040000000200000037040300360402001E1A92C2D26F80C0609710372BF32C3FEA6B6F3FBD2F99C2D26F80C0DC9D17373B7F453FEA6B6F3FBE2F99C2D36F8040DD9D17373B7F453F3A04FB3E1E1A92C2D36F80406097103727F32C3F3A04FB3E010C00000000000000010000000000000006000000010000001502010002000300000000000100020001020000000300000015000000010000000A000000FFFFFFFF1000E64517B7B8C850C29A8D5ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000EEA495C2000080349E1A1437C0628C40020000000900000000010000000100000006000000000000000800000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200C6D489C2D26F80C0E4630837C34A103FEA6B6F3FAE5291C2D26F80C09DD10F3729402A3FEA6B6F3FAE5291C2D36F80409ED10F3725402A3F3A04FB3EC6D489C2D36F8040E6630837BF4A103F3A04FB3E010C00000000000000010000000000000006000000010000001502010002000300000000000100020001020000000300000014000000010000000E000000FFFFFFFF1000F5290FB7B8C850C29C8E5ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000BA938DC200008034C11A0C3794BB8D40020000000D00000000010000000100000006000000000000000C00000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200B88581C2D26F80C0CD2700376301E73EEA6B6F3F560D89C2D26F80C0319E0737B9970D3FEA6B6F3F560D89C2D36F8040339E0737B7970D3F3A04FB3EB88581C2D36F8040CE2700376001E73E3A04FB3E010C000000000000000100000000000000060000000100000015020100020003000000000001000200010200000003000000130000000100000012000000FFFFFFFF1000ECE906B7B8C850C2A58F5ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000874985C20000803400E303377FDC8D40020000001100000000010000000100000006000000000000001000000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200BE0372C2D26F80C04E70EF3668FFAB3EEA6B6F3F48BE80C2D26F80C05EC4FE364F9BE13EEA6B6F3F48BE80C2D36F804060C4FE364F9BE13E3A04FB3EC00372C2D36F80405170EF3661FFAB3E3A04FB3E010C000000000000000100000000000000060000000100000015020100020003000000000001000200010200000003000000120000000100000016000000FFFFFFFF1000302CFCB6B8C850C2B2905ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF000000000001000027C079C200008034571AF736D6918E40020000001500000000010000000100000006000000000000001400000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200FC9160C2D26F80C08529DE3681D8693E903B6F3FE07470C2D26F80C036E5ED367D6BA73E8E3B6F3FE27470C2D36F804039E5ED36816BA73E82A3FA3EFE9160C2D36F80408929DE368FD8693E82A3FA3E010C00000000000000010000000000000006000000010000001502010002000300000000000100020001020000000300000011000000010000001A000000FFFFFFFF10008441EBB6B8C850C2C6915ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF00000000000100006F8368C2000080345F07E636054C8F400200000019000000000100000001000000060000000000000018000000000100000002000000070000000000000008000000000000000000000050000000000000000100000000000000040000000200000037040300360402008F854EC2D26F80C0D54ACC362E36EE3D903B6F3F1E035FC2D26F80C08D9EDC36C6F05F3E903B6F3F20035FC2D36F8040919EDC36CDF05F3E82A3FA3E92854EC2D36F8040D94ACC365A36EE3D82A3FA3E010C00000000000000010000000000000006000000010000001502010002000300000000000100020001020000000300000010000000010000001E000000FFFFFFFF10004604D9B6B8C850C2E2925ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF000000000001000058C456C200008034B374D43689629040020000001D00000000010000000100000006000000000000001C00000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200BE1E3CC2D26F80C0A514BA366CC2073B903B6F3FB1F64CC2D26F80C001C0CA36C666DA3D903B6F3FB4F64CC2D36F804005C0CA36E366DA3D82A3FA3EC21E3CC2D36F8040A914BA36E4C7073B82A3FA3E010C0000000000000001000000000000000600000001000000150201000200030000000000010002000102000000030000000F0000000100000022000000FFFFFFFF10006E79C6B6B8C850C205945ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000B98A44C200008034556AC2361C099140020000002100000000010000000100000006000000000000002000000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200873A29C2D26F80C02E64A7369CE45E3FA2AFEC3EE08F3AC2D26F80C0FA89B83640387D3FA2AFEC3EE48F3AC2D36F8040FE89B83647387D3F40C08D3C8B3A29C2D36F80403264A736A1E45E3F40C08D3C010C0000000000000001000000000000000600000001000000150201000200030000000000010002000102000000030000000E0000000100000026000000FFFFFFFF100043AAB3B6B8C850C230955ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF000000000001000036E531C20000803416F7AF36C6F4914002000000250000000001000000010000000600000000000000240000000001000000020000000700000000000000080000000000000000000000500000000000000001000000000000000400000002000000370403003604020041CC15C2D26F80C0F72C94368DE53C3FA2AFEC3EA9AB27C2D26F80C0A9D9A536BE2A5C3FA2AFEC3EADAB27C2D36F8040ADD9A536C62A5C3F40C08D3C44CC15C2D36F8040FA2C943693E53C3F40C08D3C010C0000000000000001000000000000000600000001000000150201000200030000000000010002000102000000030000000D000000010000002A000000FFFFFFFF1000A987A0B6B8C850C262965ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000F7BB1EC20000803452039D363BFE92400200000029000000000100000001000000060000000000000028000000000100000002000000070000000000000008000000000000000000000050000000000000000100000000000000040000000200000037040300360402005E8201C2D26F80C0B01D80364366193FA2AFEC3E633D14C2D26F80C08FA29236B02B3A3FA2AFEC3E663D14C2D36F804092A29236B62B3A3F40C08D3C618201C2D36F8040B41D80364566193F40C08D3C010C0000000000000001000000000000000600000001000000150201000200030000000000010002000102000000030000000C000000010000002E000000FFFFFFFF1000CCF38BB6B8C850C2A0975ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000E2DF0AC2000080342160893634B19440020000002D00000000010000000100000006000000000000002C00000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200EF68DAC1D26F80C0141C5836E4BFEB3EA2AFEC3E00E7FFC1D26F80C0EE267D3664AC163FA2AFEC3E06E7FFC1D36F8040F5267D366BAC163F40C08D3CF368DAC1D36F80401A1C5836EBBFEB3E40C08D3C010C0000000000000001000000000000000600000001000000150201000200030000000000010002000102000000030000000B0000000100000032000000FFFFFFFF10003E3270B6B8C850C2E5985ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000FA27EDC10000803484A16A364DB9944002000000310000000001000000010000000600000000000000300000000001000000020000000700000000000000080000000000000000000000500000000000000001000000000000000400000002000000370403003604020077C6AFC1D26F80C04DFE2D36C627A13EA2AFEC3E334BD7C1D26F80C0FC075536294CE63EA2AFEC3E374BD7C1D36F8040010855362F4CE63E40C08D3C7AC6AFC1D36F804052FE2D36C627A13E40C08D3C010C0000000000000001000000000000000600000001000000150201000200030000000000010002000102000000030000000A0000000100000036000000FFFFFFFF10001CD645B6B8C850C2329A5ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000D788C3C10000803427834136B2CE9640020000003500000000010000000100000006000000000000003400000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200E4E083C1D26F80C0D1A50236AEB4283EA2AFEC3EBBA8ACC1D26F80C06EEA2A3609B49B3EA2AFEC3EBEA8ACC1D36F804073EA2A360FB49B3E40C08D3CE8E083C1D36F8040D2A50236C6B4283E80C08D3C010C00000000000000010000000000000006000000010000001502010000000100020002000300000001020000000300000009000000010000003A000000FFFFFFFF10006A6F1AB6B8C850C28C9B5ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000D14498C10000803422C8163642259840020000003900000000010000000100000006000000000000003800000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200E61B2DC1D26F80C0F2D1AB353AB6213CA2AFEC3E28C380C1D26F80C08424FF3540CD1D3EA2AFEC3E2CC380C1D36F80408624FF354CCD1D3E80C08D3CE81B2DC1D36F8040ECD1AB353AB6213C80C08D3C010C000000000000000100000000000000060000000100000015020100020003000000000001000200010500000000000000FFFFFFFF0000000000000000000000000000000000000000000000000000000000000000000000000000803F0000803F0000803F000020410000803FFFFFFFFF00000000FFFFFFFF0000FFFFFFFF00000000FFFFFFFFED1000FFFFFFFF00000000FFFFFFFF0104000000FFFFFFFF060000000100000003000000010000FFFFFFFF00000000FFFFFFFF04000900000001410000000032010000000000000000000000000000FFFFFFFF00000000FFFFFFFF0D000200000003000000010000000100000044000000FFFFFFFF1000705DD8B5B8C850C2F19C5ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F050000003E0000003F000000400000004200000043000000FFFFFFFF00000000FFFFFFFF00000000000100001F5157C100008034397BD535D3B19940020000003D00000000010000000100000006000000000000003C0000000001000000020000000700000000000000080000000000000000000000FFFFFFFF00000000FFFFFFFF0800FFFFFFFF00000000FFFFFFFF0F000000000000000000FFFFFFFF10010000000000000000000000000000803F0000000000000000000000000000803F0000000000000000000000000000803F0000803F020000004600000047000000FFFFFFFF10000000450000003B00000037000000330000002F0000002B00000027000000230000001F0000001B00000017000000130000000F0000000B0000000700000003000000000000000100000048000000
  253. }
  254.  
  255. FileCreateDir, %A_ScriptDir%\tmp
  256. FileCreateDir, %A_ScriptDir%\tmp\images
  257. progress = 5
  258. GuiControl,, progressbar, %progress%
  259. FileCopy, %DDSI512files%, %A_ScriptDir%\tmp\images\inlay_%guitarnamesix%_512.*
  260. FileCopy, %DDSI512files%, %A_ScriptDir%\tmp\images\inlay_%guitarnamesix%_256.*
  261. FileCopy, %DDSI512files%, %A_ScriptDir%\tmp\images\inlay_%guitarnamesix%_128.*
  262. FileCopy, %DDSI512files%, %A_ScriptDir%\tmp\images\inlay_%guitarnamesix%_64.*
  263. FileCopy, %DDSInlayfiles%, %A_ScriptDir%\tmp\images\inlay_%guitarnamesix%.*
  264. progress = 10
  265. GuiControl,, progressbar, %progress%
  266. Runwait, %A_ScriptDir%\ressources\imgtool\convert.exe %A_ScriptDir%\tmp\images\inlay_%guitarnamesix%.* -resize 1024x512! %A_ScriptDir%\tmp\images\inlay_%guitarnamesix%.dds,,Hide
  267. Runwait, %A_ScriptDir%\ressources\imgtool\convert.exe %A_ScriptDir%\tmp\images\inlay_%guitarnamesix%_512.* -resize 512x512! %A_ScriptDir%\tmp\images\inlay_%guitarnamesix%_512.dds,,Hide
  268. Runwait, %A_ScriptDir%\ressources\imgtool\convert.exe %A_ScriptDir%\tmp\images\inlay_%guitarnamesix%_256.* -resize 256x256! %A_ScriptDir%\tmp\images\inlay_%guitarnamesix%_256.dds,,Hide
  269. Runwait, %A_ScriptDir%\ressources\imgtool\convert.exe %A_ScriptDir%\tmp\images\inlay_%guitarnamesix%_128.* -resize 128x128! %A_ScriptDir%\tmp\images\inlay_%guitarnamesix%_128.dds,,Hide
  270. Runwait, %A_ScriptDir%\ressources\imgtool\convert.exe %A_ScriptDir%\tmp\images\inlay_%guitarnamesix%_64.* -resize 64x64! %A_ScriptDir%\tmp\images\inlay_%guitarnamesix%_64.dds,,Hide
  271. progress = 20
  272. GuiControl,, progressbar, %progress%
  273. FileCopy, %RS2014DIR%\cache.psarc, %A_ScriptDir%\backup\cache.psarc
  274. FileCopy, %RS2014DIR%\guitars.psarc, %A_ScriptDir%\backup\guitars.psarc
  275. FileCopy, %RS2014DIR%\static.psarc, %A_ScriptDir%\backup\static.psarc
  276. progress = 25
  277. GuiControl,, progressbar, %progress%
  278. RunWait, %A_ScriptDir%\ressources\packer\packer.exe --unpack --input=%A_ScriptDir%\backup --output=%A_ScriptDir%\tmp,,Hide
  279. progress = 35
  280. GuiControl,, progressbar, %progress%
  281. RunWait, %A_ScriptDir%\ressources\packer\7za.exe x tmp\cache_Pc\cache4.7z -otmp\cache_Pc\cache4,,Hide
  282. FileAppend, %ccg2%`,%guitarname%`,%guitarname%`,%guitarname%`,%guitarname%`,%guitarname%`,%guitarname%`,%guitarname%`n, %A_ScriptDir%\tmp\cache_Pc\cache4\localization\maingame.csv
  283. RunWait, %A_ScriptDir%\ressources\packer\7za.exe a tmp\cache_Pc\cache4.7z .\tmp\cache_Pc\cache4\*,,Hide
  284. RunWait, %A_ScriptDir%\ressources\packer\7za.exe x tmp\cache_Pc\cache7.7z -otmp\cache_Pc\cache7,,Hide
  285. FileRead, guitarshsan, %A_ScriptDir%\tmp\cache_Pc\cache7\manifests\guitars\guitars.hsan
  286. StringReplace, guitarshsannew, guitarshsan, "F4F8F798ACCB7071F546CB7BD98E18C5" : {, "%ID1MAJ%" : {`n "Attributes" : {`n "DLC" : true`,`n "LocName" : "$[%ccg2%]%guitarname%"`,`n "ManifestUrn" : "urn:database:json-db:guitar_%guitarnamesix%"`,`n "Name" : "%guitarname%"`,`n "PersistentID" : "%ID1MAJ%"`,`n "PreviewArt" : "urn:image:dds:reward_inlay_%guitarnamesix%"`n }`n }`, `n "F4F8F798ACCB7071F546CB7BD98E18C5" : {
  287. FileDelete, %A_ScriptDir%\tmp\cache_Pc\cache7\manifests\guitars\guitars.hsan
  288. FileAppend, %guitarshsannew%, %A_ScriptDir%\tmp\cache_Pc\cache7\manifests\guitars\guitars.hsan
  289. RunWait, %A_ScriptDir%\ressources\packer\7za.exe a tmp\cache_Pc\cache7.7z .\tmp\cache_Pc\cache7\*,,Hide
  290. FileAppend, `n, %A_ScriptDir%\tmp\cache_Pc\appid.appid
  291. progress = 50
  292. GuiControl,, progressbar, %progress%
  293. newfilesjson = {`n "Entries": {`n "%ID1MAJ%": {`n "Attributes": {`n "DecorativeInlays": "urn:application:gamebryo-scenegraph:%guitarnamesix%"`,`n "DLC": true`,`n "LocName": "$[%ccg2%]%guitarname%"`,`n "ManifestUrn": "urn:database:json-db:guitar_%guitarnamesix%"`,`n "Name": "%guitarname%",`n "PreviewArt": "urn:image:dds:reward_inlay_%guitarnamesix%"`,`n "PersistentID": "%ID1MAJ%"`n }`n }`n }`,`n "ModelName": "RSEnumerable_Guitar"`,`n "IterationVersion": 2`,`n "InsertRoot": "Static.Guitars.Entries"`n}`n
  294. FileAppend, %newfilesjson%, %A_ScriptDir%\tmp\guitars_Pc\manifests\guitars\guitar_%guitarnamesix%.json
  295. FileRead, guitarshsan2, %A_ScriptDir%\tmp\guitars_Pc\manifests\guitars\guitars.hsan
  296. StringReplace, guitarshsannew2, guitarshsan2, "F4F8F798ACCB7071F546CB7BD98E18C5" : {, "%ID1MAJ%" : {`n "Attributes" : {`n "DLC" : true`,`n "LocName" : "$[%ccg2%]%guitarname%"`,`n "ManifestUrn" : "urn:database:json-db:guitar_%guitarnamesix%"`,`n "Name" : "%guitarname%"`,`n "PersistentID" : "%ID1MAJ%"`,`n "PreviewArt" : "urn:image:dds:reward_inlay_%guitarnamesix%"`n }`n }`, `n "F4F8F798ACCB7071F546CB7BD98E18C5" : {
  297. FileDelete, %A_ScriptDir%\tmp\guitars_Pc\manifests\guitars\guitars.hsan
  298. FileAppend, %guitarshsannew2%, %A_ScriptDir%\tmp\guitars_Pc\manifests\guitars\guitars.hsan
  299. newfilesxblock = <?xml version="1.0" encoding="utf-8"?>`n<game>`n <entitySet>`n <entity id="%ID1%" modelName="RSEnumerable_Guitar" name="%guitarnamesix%" 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_%guitarnamesix%" />`n </property>`n <property name="PreviewArt">`n <set value="urn:image:dds:reward_inlay_%guitarnamesix%" />`n </property>`n <property name="DecorativeInlays">`n <set value="urn:application:gamebryo-scenegraph:%guitarnamesix%" />`n </property>`n </properties>`n </entity>`n </entitySet>`n</game>`n
  300. FileAppend, %newfilesxblock%, %A_ScriptDir%\tmp\guitars_Pc\gamexblocks\nguitars\guitar_%guitarnamesix%.xblock
  301. FileCopy, %A_ScriptDir%\tmp\images\inlay_%guitarnamesix%.dds, %A_ScriptDir%\tmp\guitars_Pc\assets\gameplay\inlay\inlay_%guitarnamesix%.dds
  302. TestString = inlay_%guitarnamesix%.dds
  303. Output := StringToHex(TestString)
  304. Ootput = %Output%
  305. newhexname = %Output%
  306. StringReplace newhexname, newhexname, %A_Space%, , All
  307. filenifname = %guitarnamesix%.nif
  308. StringToHex(String)
  309. {
  310. local Old_A_FormatInteger, CharHex, HexString
  311.  
  312. ;Return '0' if the string was blank
  313. If !String
  314. Return 0
  315.  
  316. ;Save the current Integer format
  317. Old_A_FormatInteger := A_FormatInteger
  318.  
  319. ;Set the format of integers to their Hex value
  320. SetFormat, INTEGER, H
  321.  
  322. ;Parse the String
  323. Loop, Parse, String
  324. {
  325. ;Get the ASCII value of the Character (will be converted to the Hex value by the SetFormat Line above)
  326. CharHex := Asc(A_LoopField)
  327.  
  328. ;Comment out the following line to leave the '0x' intact
  329. StringTrimLeft, CharHex, CharHex, 2
  330.  
  331. ;Build the return string
  332. HexString .= CharHex . " "
  333. }
  334. ;Set the integer format to what is was prior to the call
  335. SetFormat, INTEGER, %Old_A_FormatInteger%
  336.  
  337. ;Return the string to the caller
  338. Return HexString
  339. }
  340. /*
  341. BinReadWrite.ahk
  342.  
  343. Routines to read and write binary data from/to files.
  344. Based on original functions written by Laszlo
  345. http://www.autohotkey.com/forum/viewtopic.php?t=4604
  346.  
  347. TODO: Perhaps set a lastError variable to explicit the errors.
  348.  
  349. // by Philippe Lhoste <PhiLho(a)GMX.net> http://Phi.Lho.free.fr
  350. // File/Project history:
  351. 1.03.000 -- 2006/02/15 (PL) -- Moved Bin2Hex & Hex2Bin to DllCallStruct, apply code rules.
  352. 1.02.000 -- 2006/01/24 (PL) -- Slight change of the API: all functions return -1 if error.
  353. Integrated Laszlo suggestions on improving Bin2Hex and Hex2Bin.
  354. 1.01.000 -- 2006/01/23 (PL) -- Declaration of the local variables, to get access to global
  355. WinAPI constants, and for consistency.
  356. 1.00.000 -- 2006/01/19 (PL) -- Rewrote the functions to separate opening and closing,
  357. allowing efficient multiple operations.
  358. */
  359.  
  360. ; WinAPI constants
  361. INVALID_HANDLE_VALUE = -1
  362. INVALID_FILE_SIZE = 0xFFFFFFFF
  363. FILE_BEGIN = 0
  364. FILE_CURRENT = 1
  365. FILE_END = 2
  366.  
  367. /*
  368. // Open the file for reading.
  369. // Return the file handle to provide in further read operations and in the final close operation,
  370. // or INVALID_HANDLE_VALUE if an error was found.
  371. */
  372. OpenFileForRead(_filename)
  373. {
  374. local handle
  375.  
  376. handle := DllCall("CreateFile"
  377. , "Str", _filename ; lpFileName
  378. , "UInt", 0x80000000 ; dwDesiredAccess (GENERIC_READ)
  379. , "UInt", 3 ; dwShareMode (FILE_SHARE_READ|FILE_SHARE_WRITE)
  380. , "UInt", 0 ; lpSecurityAttributes
  381. , "UInt", 3 ; dwCreationDisposition (OPEN_EXISTING)
  382. , "UInt", 0 ; dwFlagsAndAttributes
  383. , "UInt", 0) ; hTemplateFile
  384. If (handle = INVALID_HANDLE_VALUE or handle = 0)
  385. {
  386. ErrorLevel = -1
  387. }
  388. IfNotEqual ErrorLevel, 0, Return INVALID_HANDLE_VALUE ; Couldn't open the file
  389. Return handle
  390. }
  391.  
  392. /*
  393. // Open the file for writing.
  394. // Return the file handle to provide in further write operations and in the final close operation,
  395. // or INVALID_HANDLE_VALUE if an error was found.
  396. */
  397. OpenFileForWrite(_filename)
  398. {
  399. local handle
  400.  
  401. handle := DllCall("CreateFile"
  402. , "Str", _filename ; lpFileName
  403. , "UInt", 0x40000000 ; dwDesiredAccess (GENERIC_WRITE)
  404. , "UInt", 3 ; dwShareMode (FILE_SHARE_READ|FILE_SHARE_WRITE)
  405. , "UInt", 0 ; lpSecurityAttributes
  406. , "UInt", 4 ; dwCreationDisposition (OPEN_ALWAYS: create if not exists)
  407. , "UInt", 0 ; dwFlagsAndAttributes
  408. , "UInt", 0) ; hTemplateFile
  409. If (handle = INVALID_HANDLE_VALUE or handle = 0)
  410. {
  411. ErrorLevel = -1
  412. }
  413. IfNotEqual ErrorLevel, 0, Return INVALID_HANDLE_VALUE ; Couldn't open the file
  414. Return handle
  415. }
  416.  
  417. /*
  418. // Close the file.
  419. */
  420. CloseFile(_handle)
  421. {
  422. local result
  423.  
  424. result := DllCall("CloseHandle"
  425. , "UInt", _handle)
  426. If (result = 0)
  427. {
  428. ErrorLevel = -1
  429. }
  430. }
  431.  
  432. /*
  433. // Get the size of the opened file, in bytes.
  434. // Limited to 4GB, so it is more limited that AHK's FileGetSize.
  435. // It is here for consistency, and because it accepts a file handle instead of a path.
  436. //
  437. // Return the size in bytes, -1 if there was an error.
  438. */
  439. GetFileSize(_handle)
  440. {
  441. local fileSize
  442.  
  443. fileSize := DllCall("GetFileSize"
  444. , "UInt", _handle
  445. , "UInt", 0)
  446. If (fileSize = INVALID_FILE_SIZE)
  447. {
  448. ErrorLevel = -1
  449. }
  450. IfNotEqual ErrorLevel, 0, Return -1
  451. Return fileSize
  452. }
  453.  
  454. /*
  455. // Move the file pointer in the file to the given offset relative to moveMethod.
  456. //
  457. // moveMethod can be FILE_BEGIN, FILE_CURRENT or FILE_END.
  458. // If moveMethod is -1, nothing is done (default, for operations at current position).
  459. // To get the current position, call this function with just FILE_CURRENT (null offset).
  460. // offset can be positive (toward end of the file) or negative (toward start of the file).
  461. //
  462. // Return -1 if there was an error, the new file pointer position if OK.
  463. // Note: Currently it doesn't work for files larger than 2GB...
  464. */
  465. MoveInFile(_handle, _moveMethod=-1, _offset=0)
  466. {
  467. local result
  468.  
  469. result = %INVALID_FILE_SIZE%
  470. if (_moveMethod != -1)
  471. {
  472. result := DllCall("SetFilePointer"
  473. , "UInt", _handle ; hFile
  474. , "Int", _offset ; lDistanceToMove
  475. , "UInt", 0 ; lpDistanceToMoveHigh
  476. , "UInt", _moveMethod) ; dwMoveMethod
  477. if (result = -1) ; INVALID_SET_FILE_POINTER
  478. {
  479. ErrorLevel = -1
  480. }
  481. IfNotEqual ErrorLevel, 0, Return -1 ; Couldn't make the move
  482. }
  483. Return result
  484. }
  485.  
  486. /*
  487. // Write in a file opened for writing.
  488. //
  489. // Move to position given by moveMethod and offset
  490. // (by default stand at current position) and
  491. // write byteNb bytes from data (all data if byteNb = 0;
  492. // data contains binary bytes that can be a string or
  493. // raw bytes generated from hexa data with the Hex2Bin routine).
  494. //
  495. // moveMethod, defaulting to -1 (no move, write at current position),
  496. // can also be FILE_BEGIN, FILE_CURRENT or FILE_END.
  497. // offset can be positive (toward end of file) or negative (toward beginning of file).
  498. //
  499. // Return the number of bytes written (-1 if there was an error).
  500. */
  501. WriteInFile(_handle, ByRef @data, _byteNb=0, _moveMethod=-1, _offset=0)
  502. {
  503. local dataSize, result, written
  504.  
  505. _offset := MoveInFile(_handle, _moveMethod, _offset)
  506. IfNotEqual ErrorLevel, 0, Return -1 ; Couldn't make the move
  507.  
  508. dataSize := VarSetCapacity(@data) ; Get the capacity (>= used length!)
  509. If (_byteNb < 1 or _byteNb > dataSize)
  510. {
  511. byteNb := dataSize
  512. }
  513. result := DllCall("WriteFile"
  514. , "UInt", _handle ; hFile
  515. , "Str", @data ; lpBuffer
  516. , "UInt", _byteNb ; nNumberOfBytesToWrite
  517. , "UInt *", written ; lpNumberOfBytesWritten
  518. , "UInt", 0) ; lpOverlapped
  519. if (result = 0 or written < _byteNb)
  520. {
  521. ErrorLevel = -2
  522. }
  523. IfNotEqual ErrorLevel, 0, Return -1 ; Couldn't write in the file
  524. Return written
  525. }
  526.  
  527. /*
  528. // Read from a file opened for reading.
  529. //
  530. // Move to position given by moveMethod and offset
  531. // (by default stand at current position) and
  532. // read byteNb bytes in data (the whole file if byteNb = 0;
  533. // data contains binary bytes that can be a string or
  534. // raw bytes that can be converted to hex digits with the Bin2Hex routine).
  535. //
  536. // moveMethod, defaulting to -1 (no move, read at current position),
  537. // can also be FILE_BEGIN, FILE_CURRENT or FILE_END.
  538. // offset can be positive (toward end of file) or negative (toward beginning of file).
  539. //
  540. // Return the number of bytes read (-1 if there was an error), which can be less
  541. // than requested if end-of-file is meet.
  542. */
  543. ReadFromFile(_handle, ByRef @data, _byteNb=0, _moveMethod=-1, _offset=0)
  544. {
  545. local fileSize, granted, result, read
  546.  
  547. _offset := MoveInFile(_handle, _moveMethod, _offset)
  548. IfNotEqual ErrorLevel, 0, Return -1 ; Couldn't make the move
  549.  
  550. if (_byteNb = 0)
  551. {
  552. ; Read whole file (or less if file pointer isn't at start)
  553. fileSize := GetFileSize(_handle)
  554. IfNotEqual ErrorLevel, 0, Return -1 ; Couldn't get the file size
  555. _byteNb := fileSize
  556. }
  557. granted := VarSetCapacity(@data, _byteNb, 0)
  558. if (granted < _byteNb)
  559. {
  560. ; Cannot allocate enough memory
  561. ErrorLevel = Mem=%granted%
  562. Return -1
  563. }
  564.  
  565. result := DllCall("ReadFile"
  566. , "UInt", _handle ; hFile
  567. , "Str", @data ; lpBuffer
  568. , "UInt", _byteNb ; nNumberOfBytesToRead
  569. , "UInt *", read ; lpNumberOfBytesRead
  570. , "UInt", 0) ; lpOverlapped
  571. if (result = 0)
  572. {
  573. ErrorLevel = -2
  574. }
  575. ;~ MsgBox fileSize: %fileSize% - offset: %_offset% - byteNb: %_byteNb% - granted: %granted% - read: %read%
  576. IfNotEqual ErrorLevel, 0, Return -1 ; Couldn't read the file
  577.  
  578. ; Note that we can have read less data than requested,
  579. ; eg. if end of file has been meet
  580. Return read
  581. }
  582. /*
  583. // Convert raw bytes stored in a variable to a string of hexa digit pairs.
  584. // Convert either byteNb bytes or, if null, the whole content of the variable.
  585. //
  586. // Return the number of converted bytes, or -1 if error (memory allocation)
  587. */
  588. Bin2Hex(ByRef @hex, ByRef @bin, _byteNb=0)
  589. {
  590. local intFormat, dataSize, dataAddress, granted, x
  591.  
  592. ; Save original integer format
  593. intFormat = %A_FormatInteger%
  594. ; For converting bytes to hex
  595. SetFormat Integer, Hex
  596.  
  597. ; Get size of data
  598. dataSize := VarSetCapacity(@bin)
  599. If (_byteNb < 1 or _byteNb > dataSize)
  600. {
  601. _byteNb := dataSize
  602. }
  603. dataAddress := &@bin
  604. ; Make enough room (faster)
  605. granted := VarSetCapacity(@hex, _byteNb * 2)
  606. if (granted < _byteNb * 2)
  607. {
  608. ; Cannot allocate enough memory
  609. ErrorLevel = Mem=%granted%
  610. Return -1
  611. }
  612. Loop %_byteNb%
  613. {
  614. ; Get byte in hexa
  615. x := *dataAddress + 0x100
  616. StringRight x, x, 2 ; 2 hex digits
  617. StringUpper x, x
  618. @hex = %@hex%%x%
  619. dataAddress++ ; Next byte
  620. }
  621. ; Restore original integer format
  622. SetFormat Integer, %intFormat%
  623.  
  624. Return _byteNb
  625. }
  626.  
  627. /*
  628. // Convert a string of hexa digit pairs to raw bytes stored in a variable.
  629. // Convert either byteNb bytes or, if null, the whole content of the variable.
  630. //
  631. // Return the number of converted bytes, or -1 if error (memory allocation)
  632. */
  633. Hex2Bin(ByRef @bin, _hex, _byteNb=0)
  634. {
  635. local dataSize, granted, dataAddress, x
  636.  
  637. ; Get size of data
  638. x := StrLen(_hex)
  639. dataSize := Ceil(x / 2)
  640. if (x = 0 or dataSize * 2 != x)
  641. {
  642. ; Invalid string, empty or odd number of digits
  643. ErrorLevel = Param
  644. Return -1
  645. }
  646. If (_byteNb < 1 or _byteNb > dataSize)
  647. {
  648. _byteNb := dataSize
  649. }
  650. ; Make enough room
  651. granted := VarSetCapacity(@bin, _byteNb, 0)
  652. if (granted < _byteNb)
  653. {
  654. ; Cannot allocate enough memory
  655. ErrorLevel = Mem=%granted%
  656. Return -1
  657. }
  658. dataAddress := &@bin
  659.  
  660. Loop Parse, _hex
  661. {
  662. if (A_Index & 1) ; Odd
  663. {
  664. x = %A_LoopField% ; Odd digit
  665. }
  666. else
  667. {
  668. ; Concatenate previous x and even digit, converted to hex
  669. x := "0x" . x . A_LoopField
  670. ; Store integer in memory
  671. DllCall("RtlFillMemory"
  672. , "UInt", dataAddress
  673. , "UInt", 1
  674. , "UChar", x)
  675. dataAddress++
  676. }
  677. }
  678.  
  679. Return _byteNb
  680. }
  681. HexString=
  682. ( Join
  683. %nif1%%newhexname%%nif2%
  684. )
  685. Tfh := OpenFileForWrite(filenifname)
  686. l := Hex2Bin(data, HexString)
  687. WriteInFile(Tfh, data, l)
  688. CloseFile(Tfh)
  689. FileCopy,%A_ScriptDir%\%filenifname%, %A_ScriptDir%\tmp\guitars_Pc\assets\gameplay\inlay\%filenifname%
  690. FileDelete,%A_ScriptDir%\%filenifname%
  691. FileAppend, `n, %A_ScriptDir%\tmp\guitars_Pc\appid.appid
  692. progress = 80
  693. GuiControl,, progressbar, %progress%
  694. FileAppend, %ccg2%`,%guitarname%`,%guitarname%`,%guitarname%`,%guitarname%`,%guitarname%`,%guitarname%`,%guitarname%`n, %A_ScriptDir%\tmp\static_Pc\localization\maingame.csv
  695. FileCopy, %A_ScriptDir%\tmp\images\inlay_%guitarnamesix%_512.dds, %A_ScriptDir%\tmp\static_Pc\gfxassets\rewards\guitar_inlays\reward_inlay_%guitarnamesix%_512.dds
  696. FileCopy, %A_ScriptDir%\tmp\images\inlay_%guitarnamesix%_256.dds, %A_ScriptDir%\tmp\static_Pc\gfxassets\rewards\guitar_inlays\reward_inlay_%guitarnamesix%_256.dds
  697. FileCopy, %A_ScriptDir%\tmp\images\inlay_%guitarnamesix%_128.dds, %A_ScriptDir%\tmp\static_Pc\gfxassets\rewards\guitar_inlays\reward_inlay_%guitarnamesix%_128.dds
  698. FileCopy, %A_ScriptDir%\tmp\images\inlay_%guitarnamesix%_64.dds, %A_ScriptDir%\tmp\static_Pc\gfxassets\rewards\guitar_inlays\reward_inlay_%guitarnamesix%_64.dds
  699. progress = 90
  700. GuiControl,, progressbar, %progress%
  701. FileRemoveDir, %A_ScriptDir%\tmp\cache_Pc\cache7, 1
  702. FileRemoveDir, %A_ScriptDir%\tmp\cache_Pc\cache4, 1
  703. RunWait, %A_ScriptDir%\ressources\packer\packer.exe --pack --input=%A_ScriptDir%\tmp\cache_Pc --output=%A_ScriptDir%\output\cache.psarc,,Hide
  704. RunWait, %A_ScriptDir%\ressources\packer\packer.exe --pack --input=%A_ScriptDir%\tmp\guitars_Pc --output=%A_ScriptDir%\output\guitars.psarc,,Hide
  705. RunWait, %A_ScriptDir%\ressources\packer\packer.exe --pack --input=%A_ScriptDir%\tmp\static_Pc --output=%A_ScriptDir%\output\static.psarc,,Hide
  706. FileRemoveDir, %A_ScriptDir%\tmp, 1
  707. progress = 95
  708. GuiControl,, progressbar, %progress%
  709. FileDelete, %RS2014DIR%\cache.psarc
  710. FileDelete, %RS2014DIR%\guitars.psarc
  711. FileDelete, %RS2014DIR%\static.psarc
  712. FileCopy, %A_ScriptDir%\output\cache.psarc, %RS2014DIR%\cache.psarc
  713. FileCopy, %A_ScriptDir%\output\guitars.psarc, %RS2014DIR%\guitars.psarc
  714. FileCopy, %A_ScriptDir%\output\static.psarc, %RS2014DIR%\static.psarc
  715. progress = 98
  716. GuiControl,, progressbar, %progress%
  717. IniWrite, %RS2014DIR%, CustomGuitarList.ini, Rocksmith2014Directory, Rocksmith2014dir
  718. IniWrite, %ccg2% - %guitarname%, CustomGuitarList.ini, GuitarList, %ID1%
  719. IniWrite, %ID1%, CustomGuitarList.ini, CustomGuitarMasterID, MasterID%ccg%
  720. IniWrite, %ccg2%, CustomGuitarList.ini, CustomGuitarLinkToID, %ID1%
  721. IniWrite, %guitarname%, CustomGuitarList.ini, CustomGuitarNameList, Guitar%ccg%
  722. ccg++
  723. ccg2++
  724. IniWrite, %ccg%, CustomGuitarList.ini, NumberInstance, NumberSet
  725. IniWrite, %ccg2%, CustomGuitarList.ini, NumberInstance, NumberGuitar
  726. progress = 100
  727. GuiControl,, progressbar, %progress%
  728. msgbox, Package created.`n Test ingame before creating any other.`nAs the soft make newpackage from one of Rocksmith2014 directory if it make froma conrupted files it can't work.`n Enjoy :)
  729. GuiControl,, progressbar, %progress%
  730. GuiControl, enable, RS2014DB
  731. GuiControl, enable, newinlay
  732. GuiControl, enable, newicon
  733. GuiControl, enable, coloredinlay
  734. GuiControl, enable, newenglishname
  735. GuiControl, enable, newfrenchname
  736. GuiControl, enable, newspanishname
  737. GuiControl, enable, newitalianname
  738. GuiControl, enable, newgermanname
  739. GuiControl, enable, newjapanesename
  740. GuiControl, enable, getemplateB
  741. GuiControl, enable, aboutB
  742. GuiControl, enable, parseB
  743. progress = 0
  744. GuiControl,, progressbar, %progress%
  745. IDString = a0b1c2d3e4f5a6b7c8d9e0f
  746. Random, RDM1, 0x00F000000, 0x00fffffff
  747. ID1 = %IDString%%RDM1%
  748. StringUpper, ID1MAJ, ID1
  749. GuiControl,, idmaster, %ID1MAJ%
  750. GuiControl,, guitarid, %ccg2%
  751. return
  752.  
  753. saveguitar:
  754. GuiControlGet, coloredinlay
  755. GuiControlGet, newenglishname
  756. GuiControlGet, newfrenchname
  757. GuiControlGet, newspanishname
  758. GuiControlGet, newitalianname
  759. GuiControlGet, newgermanname
  760. GuiControlGet, newjapanesename
  761. FileCreateDir, %A_ScriptDir%\tmp
  762. FileCreateDir, %A_ScriptDir%\tmp\images
  763. Runwait, %A_ScriptDir%\ressources\imgtool\convert.exe %DDSInlayfiles% -resize 1024x512! %A_ScriptDir%\tmp\images\inlay.png,,Hide
  764. Runwait, %A_ScriptDir%\ressources\imgtool\convert.exe %DDSI512files% -resize 512x512! %A_ScriptDir%\tmp\images\icon.png,,Hide
  765. inlay = %A_ScriptDir%\tmp\images\inlay.png
  766. icon = %A_ScriptDir%\tmp\images\icon.png
  767. FileSelectFolder, CGMDIR,, 3, Select folder for custom guitars.
  768. FileCreateDir, %CGMDIR%\images
  769. FileCopy, %DDSI512files%, %CGMDIR%\images\icon.png
  770. FileCopy, %DDSInlayfiles%, %CGMDIR%\images\inlay.png
  771. IniWrite, %newenglishname%, %CGMDIR%\%ccg2%.cgm, Setup, guitarname
  772. IniWrite, %newfrenchname%, %CGMDIR%\%ccg2%.cgm, Setup, guitarname1
  773. IniWrite, %newspanishname%, %CGMDIR%\%ccg2%.cgm, Setup, guitarname2
  774. IniWrite, %newitalianname%, %CGMDIR%\%ccg2%.cgm, Setup, guitarname3
  775. IniWrite, %newgermanname%, %CGMDIR%\%ccg2%.cgm, Setup, guitarname4
  776. IniWrite, %newjapanesename%, %CGMDIR%\%ccg2%.cgm, Setup, guitarname5
  777. IniWrite, %coloredinlay%, %CGMDIR%\%ccg2%.cgm, Setup, coloredinlay
  778. IniWrite, \images\inlay.png, %CGMDIR%\%ccg2%.cgm, Setup, inlay
  779. IniWrite, \images\icon.png, %CGMDIR%\%ccg2%.cgm, Setup, icon
  780. return
  781.  
  782. GuiClose:
  783. FileRemoveDir, %A_ScriptDir%\tmp, 1
  784. ExitApp
Advertisement
Add Comment
Please, Sign In to add comment