Advertisement
Baoulettes

Rocksmith 2014 Guitars Maker (ui) V2.0.0.0b3 Database

Dec 16th, 2013
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 84.65 KB | None | 0 0
  1. #singleinstance force
  2. softname = Rocksmith 2014 Guitar Maker
  3. buildversion = 2.0.0.0b
  4. FileCreateDir, %A_ScriptDir%\ressources\images
  5. FileCreateDir, %A_ScriptDir%\ressources\packer
  6. TabColors_Tab1=
  7. TabColors_Tab2=
  8. TabColors_Tab3=
  9. Fileinstall, C:\Users\Joffrey\Desktop\Rocksmith 2014 Guitar Creator\ressources\images\icon.png, %A_ScriptDir%\ressources\images\icon.png
  10. Fileinstall, C:\Users\Joffrey\Desktop\Rocksmith 2014 Guitar Creator\ressources\images\inlay_preview.png, %A_ScriptDir%\ressources\images\inlay_preview.png
  11. Fileinstall, C:\Users\Joffrey\Desktop\Rocksmith 2014 Guitar Creator\ressources\images\rocksmith_2014_logo.png, %A_ScriptDir%\ressources\images\rocksmith_2014_logo.png
  12. Fileinstall, C:\Users\Joffrey\Desktop\Rocksmith 2014 Guitar Creator\ressources\images\rocksmith_2014_logo_graded.png, %A_ScriptDir%\ressources\images\rocksmith_2014_logo_graded.png
  13. Fileinstall, C:\Users\Joffrey\Desktop\Rocksmith 2014 Guitar Creator\ressources\images\avatar.gif, %A_ScriptDir%\ressources\images\avatar.gif
  14. Fileinstall, C:\Users\Joffrey\Desktop\Rocksmith 2014 Guitar Creator\ressources\images\facebook_icon.png, %A_ScriptDir%\ressources\images\facebook_icon.png
  15. Fileinstall, C:\Users\Joffrey\Desktop\Rocksmith 2014 Guitar Creator\ressources\packer\7za.exe, %A_ScriptDir%\ressources\packer\7za.exe
  16. Fileinstall, C:\Users\Joffrey\Desktop\Rocksmith 2014 Guitar Creator\ressources\packer\NDesk.Options.dll, %A_ScriptDir%\ressources\packer\NDesk.Options.dll
  17. Fileinstall, C:\Users\Joffrey\Desktop\Rocksmith 2014 Guitar Creator\ressources\packer\nvdxt.exe, %A_ScriptDir%\ressources\packer\nvdxt.exe
  18. Fileinstall, C:\Users\Joffrey\Desktop\Rocksmith 2014 Guitar Creator\ressources\packer\packer.exe, %A_ScriptDir%\ressources\packer\packer.exe
  19. Fileinstall, C:\Users\Joffrey\Desktop\Rocksmith 2014 Guitar Creator\ressources\packer\packer.pdb, %A_ScriptDir%\ressources\packer\packer.pdb
  20. Fileinstall, C:\Users\Joffrey\Desktop\Rocksmith 2014 Guitar Creator\ressources\packer\RocksmithToolkitLib.dll, %A_ScriptDir%\ressources\packer\RocksmithToolkitLib.dll
  21. Fileinstall, C:\Users\Joffrey\Desktop\Rocksmith 2014 Guitar Creator\ressources\packer\RocksmithToolkitLib.pdb, %A_ScriptDir%\ressources\packer\RocksmithToolkitLib.pdb
  22. Fileinstall, C:\Users\Joffrey\Desktop\Rocksmith 2014 Guitar Creator\ressources\packer\X360.dll, %A_ScriptDir%\ressources\packer\X360.dll
  23. Fileinstall, C:\Users\Joffrey\Desktop\Rocksmith 2014 Guitar Creator\ressources\packer\X360.xml, %A_ScriptDir%\ressources\packer\X360.xml
  24. Fileinstall, C:\Users\Joffrey\Desktop\Rocksmith 2014 Guitar Creator\ressources\packer\ZLIB.dll, %A_ScriptDir%\ressources\packer\ZLIB.dll
  25. Fileinstall, C:\Users\Joffrey\Desktop\Rocksmith 2014 Guitar Creator\ressources\packer\zlib.net.dll, %A_ScriptDir%\ressources\packer\zlib.net.dll
  26. Fileinstall, C:\Users\Joffrey\Desktop\Rocksmith 2014 Guitar Creator\ressources\packer\topng.exe, %A_ScriptDir%\ressources\packer\topng.exe
  27. Gui, Add, Tab, w100 x3 y+2 h25 w800 AltSubmit gTab vTab
  28. , Creator|DataBase|About
  29. Gosub, Tab
  30. Gui, Show, h560 w816, %softname% - v%buildversion%
  31. IniRead, RS2014DIR, CustomGuitarList.ini, Rocksmith2014Directory, Rocksmith2014dir
  32. If RS2014DIR = ERROR
  33. {
  34. IniWrite, Undefinied, CustomGuitarList.ini, Rocksmith2014Directory, Rocksmith2014dir
  35. IniRead, RS2014DIR, CustomGuitarList.ini, Rocksmith2014Directory, Rocksmith2014dir
  36. GuiControl,, rs2014dirtext, Undefinied.
  37.  
  38. } else {
  39. IniRead, RS2014DIR, CustomGuitarList.ini, Rocksmith2014Directory, Rocksmith2014dir
  40.  
  41. }
  42. If RS2014DIR =
  43. {
  44. IniWrite, Undefinied, CustomGuitarList.ini, Rocksmith2014Directory, Rocksmith2014dir
  45. IniRead, RS2014DIR, CustomGuitarList.ini, Rocksmith2014Directory, Rocksmith2014dir
  46. GuiControl,, rs2014dirtext, Undefinied.
  47. } else {
  48. IniRead, RS2014DIR, CustomGuitarList.ini, Rocksmith2014Directory, Rocksmith2014dir
  49.  
  50. }
  51. IniRead, ccg, CustomGuitarList.ini, NumberInstance, NumberSet
  52. IniRead, ccg2, CustomGuitarList.ini, NumberInstance, NumberGuitar
  53.  
  54. If ccg = ERROR
  55. {
  56. IniWrite, 0, CustomGuitarList.ini, NumberInstance, NumberSet
  57. IniRead, ccg, CustomGuitarList.ini, NumberInstance, NumberSet
  58. } else {
  59. IniRead, ccg, CustomGuitarList.ini, NumberInstance, NumberSet
  60. }
  61. If ccg2 = ERROR
  62. {
  63. IniWrite, 20000, CustomGuitarList.ini, NumberInstance, NumberGuitar
  64. IniRead, ccg2, CustomGuitarList.ini, NumberInstance, NumberGuitar
  65. } else {
  66. IniRead, ccg2, CustomGuitarList.ini, NumberInstance, NumberGuitar
  67. }
  68. IDString = a0b1c2d3e4f5a6b7c8d9e0f
  69. Random, RDM1, 0x00F000000, 0x00fffffff
  70. ID1 = %IDString%%RDM1%
  71. StringUpper, ID1MAJ, ID1
  72. guitarname = English Default name
  73. guitarname1 = French name
  74. guitarname2 = Spanish name
  75. guitarname3 = Italian name
  76. guitarname4 = German name
  77. guitarname5 = Japanese name
  78. DDSInlayfiles = %A_ScriptDir%\ressources\images\inlay_preview.png
  79. DDSI512files = %A_ScriptDir%\ressources\images\icon.png
  80. RandomName(MinLength=4, MaxLength=0)
  81. {
  82.  
  83. ;This is a table of probabilities of given letter combinations.
  84. ;Each list is the probability of any letter coming after the letter that is the variable name.
  85. ;The 27th value is the probability that the word ends with the current letter.
  86.  
  87. 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
  88. 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
  89. 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
  90. 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
  91. 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
  92. 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
  93. 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
  94. 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
  95. 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
  96. 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
  97. 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
  98. 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
  99. 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
  100. 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
  101. 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
  102. 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
  103. 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
  104. 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
  105. 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
  106. 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
  107. 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
  108. 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
  109. 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
  110. 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
  111. 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
  112. 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
  113. 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
  114.  
  115.  
  116. ;This allows numerical values to easily be converted to letters.
  117. Alphabet = ABCDEFGHIJKLMNOPQRSTUVWXYZ
  118.  
  119. Loop
  120. {
  121. ;Checks for the previous letter to determine which set of probabilities to use.
  122. If (!Word)
  123. Previous = Start
  124. Else
  125. Previous := SubStr(Word, 0, 1)
  126.  
  127.  
  128. ;Randomly chooses the next letter, based on the probabilities listed above.
  129. Random, rand, 0.0, 1.0
  130. Sum = 0
  131. Next =
  132. Loop, parse, %Previous%, |
  133. {
  134. Sum += A_LoopField
  135. If (rand<Sum)
  136. {
  137. Next := SubStr(Alphabet, A_Index, 1)
  138. Break
  139. }
  140. }
  141.  
  142.  
  143. ;Finishes the word if the word randomly ends or reaches the maximum length.
  144. If ((!Next AND StrLen(Word)>=MinLength) OR (MaxLength AND StrLen(Word)=MaxLength))
  145. Break
  146.  
  147. Word .= Next
  148. }
  149.  
  150. StringLower, Word, Word, T
  151. Return, Word
  152. }
  153. RandomName = % RandomName(6,6)
  154. StringLower, RandomName, RandomName
  155. guitarnamesix = %RandomName%
  156. creatorname = InputYourNameHere
  157. Gui, Tab, 1
  158. Gui, Add, Picture, x102 y34 w610 h120 , %A_ScriptDir%\ressources\images\rocksmith_2014_logo_graded.png
  159. Gui, Add, Text, x712 y134 w90 h20 , Version : %buildversion%
  160. Gui, Add, Button,gRS2014D vRS2014DB x272 y144 w100 h30, RS2014 Directory
  161. Gui, Add, Text,vrs2014dirtext x22 y154 w240 h30, %RS2014DIR%
  162. Gui, Add, Text,vidmaster x22 y190 w240 h30 , %ID1MAJ%
  163. Gui, Add, Text,vguitarid x272 y190 w100 h30 , %ccg2%
  164. Gui, Add, Button,gloadguitar vlg x162 y214 w100 h30 , Load
  165. Gui, Add, Button,gsaveguitar vsg x272 y214 w100 h30 , Save
  166. Gui, Add, Text, x22 y222 w140 h30 , Custom Guitars templates :
  167. Gui, Add, Text, Color123456 x22 y264 w150 h30, English name :
  168. Gui, Add, Edit, vnewenglishname x182 y264 w190 h30 , %guitarname%
  169. Gui, Add, Text, x22 y304 w150 h30 , French name :
  170. Gui, Add, Edit, vnewfrenchname x182 y304 w190 h30 , %guitarname1%
  171. Gui, Add, Text, x22 y344 w150 h30 , Spanish name :
  172. Gui, Add, Edit, vnewspanishname x182 y344 w190 h30 , %guitarname2%
  173. Gui, Add, Text, x22 y384 w150 h30 , Italian name :
  174. Gui, Add, Edit, vnewitalianname x182 y384 w190 h30 , %guitarname3%
  175. Gui, Add, Text, x22 y424 w150 h30 , German name :
  176. Gui, Add, Edit, vnewgermanname x182 y424 w190 h30 , %guitarname4%
  177. Gui, Add, Text, x22 y464 w150 h30 , Japanese name :
  178. Gui, Add, Edit, vnewjapanesename x182 y464 w190 h30 , %guitarname5%
  179. Gui, Add, Picture,gnewiconfiles vnewicon x382 y144 w150 h150 , %DDSI512files%
  180. Gui, Add, Text,vdefaultname x572 y154 w200 h30 , %guitarname%
  181. Gui, Add, Text,vdefault6name Limit6 x572 y184 w200 h30 , %RandomName%
  182. Gui, Add, Text, x572 y210 w150 h30 , Creator Name :
  183. Gui, Add, Edit, vcreatorname x572 y230 w190 h30 , %creatorname%
  184. Gui, Add, CheckBox,vcoloredinlay x572 y274 w200 h30, Colored Inlay
  185. Gui, Add, Picture,gnewinlayfiles vnewinlay x382 y314 w420 h150 , %DDSInlayfiles%
  186. Gui, Add, Button,ggetemplate vgetemplateB x702 y474 w100 h30 , Get the template
  187. Gui, Add, Text, x382 y474 w310 h30 , %ccg% custom guitars have been created already.
  188. progresstext = Ready to go !
  189. Gui, Add, Text,vprogresstxt x20 y500 w680 h15 , %progresstext%
  190. Gui, Add, Progress,vprogressbar x12 y518 w680 h30 , %progress%
  191. Gui, Add, Button,gparse vparseB x702 y514 w100 h30 , Create it !
  192. SetTimer, Refreshmahname, 10
  193. Gui, Tab, 2
  194. Gui, Add, Picture, x2 y39 w820 h170 , %A_ScriptDir%\ressources\images\rocksmith_2014_logo_graded.png
  195. Gui Add, ActiveX, x0 y209 w815 h380 vWB, Shell.Explorer
  196. WB.Navigate("http://rs2014mods.fhero.net/index.php")
  197. Gui, Tab, 3
  198. Gui, Add, Picture, x2 y39 w820 h170 , %A_ScriptDir%\ressources\images\rocksmith_2014_logo_graded.png
  199. Gui, Add, Picture, gbaousmithy x142 y279 w100 h100 , %A_ScriptDir%\ressources\images\avatar.gif
  200. Gui, Add, Text, x120 y209 w570 h70 +Center, Software revision : %buildversion%`nCreated by : Baoulettes`nThis software is free! if you paid for it claim refund now.`nAll Lib used here (listed soon) remain to there respective owners!
  201. Gui, Font, S45 C2a2a2a
  202. Gui, Add, Text,gbaousmithy2 x252 y299 w400 h60, %A_Space%%A_Space%Baoulettes
  203. Gui, Font, S08 C000000
  204. Gui, Add, Picture, gfacebookbaou x592 y279 w100 h100 , %A_ScriptDir%\ressources\images\facebook_icon.png
  205. Gui, Add, Progress,vprogressbar2 x12 y518 w680 h30 , %progress%
  206. return
  207. Tab:
  208. GuiControlGet, Tab
  209. Gui, Color, % TabColors_Tab%Tab%
  210. return
  211.  
  212. getemplate:
  213. MsgBox, 4, , This will open your browser.`nWant to continue?,
  214. IfMsgBox, Yes
  215. run, http://s21.postimg.org/7ce6pru3b/Cadrillage_2.png
  216. return
  217.  
  218. baousmithy:
  219. MsgBox, 4, , This will open your browser.`nWant to continue?,
  220. IfMsgBox, Yes
  221. run, http://forums.smithyanvil.com/profile.php?id=319
  222. return
  223.  
  224. baousmithy2:
  225. MsgBox, 4, , This will open your browser.`nWant to continue?,
  226. IfMsgBox, Yes
  227. run, http://forums.smithyanvil.com/profile.php?id=319
  228. return
  229.  
  230. facebookbaou:
  231. MsgBox, 4, , This will open your browser.`nWant to continue?,
  232. IfMsgBox, Yes
  233. run, https://www.facebook.com/pages/Baoulettes/258752740926874
  234. return
  235.  
  236.  
  237. Refreshmahname:
  238. GuiControlGet, newenglishname
  239. GuiControl,, defaultname, %newenglishname%
  240. return
  241.  
  242. RS2014D:
  243. GuiControl, disable, RS2014DB
  244. GuiControl, disable, newinlay
  245. GuiControl, disable, newicon
  246. GuiControl, disable, coloredinlay
  247. GuiControl, disable, getemplateB
  248. GuiControl, disable, newenglishname
  249. GuiControl, disable, newfrenchname
  250. GuiControl, disable, newspanishname
  251. GuiControl, disable, newitalianname
  252. GuiControl, disable, newgermanname
  253. GuiControl, disable, newjapanesename
  254. GuiControl, disable, creatorname
  255. GuiControl, disable, parseB
  256. GuiControl, disable, lg
  257. GuiControl, disable, sg
  258. FileSelectFolder, RS2014DIR,, 3, Select Rocksmith 2014 Installation folder.
  259. IniWrite, %RS2014DIR%, CustomGuitarList.ini, Rocksmith2014Directory, Rocksmith2014dir
  260. If RS2014DIR = ERROR
  261. {
  262. RS2014DIR = Undefinied.
  263. GuiControl,, rs2014dirtext, %RS2014DIR%
  264. GuiControl, enable, RS2014DB
  265. GuiControl, enable, newinlay
  266. GuiControl, enable, newicon
  267. GuiControl, enable, coloredinlay
  268. GuiControl, enable, newenglishname
  269. GuiControl, enable, newfrenchname
  270. GuiControl, enable, newspanishname
  271. GuiControl, enable, newitalianname
  272. GuiControl, enable, newgermanname
  273. GuiControl, enable, newjapanesename
  274. GuiControl, enable, getemplateB
  275. GuiControl, enable, creatorname
  276. GuiControl, enable, parseB
  277. GuiControl, enable, lg
  278. GuiControl, enable, sg
  279. } else {
  280. GuiControl,, rs2014dirtext, %RS2014DIR%
  281. GuiControl, enable, RS2014DB
  282. GuiControl, enable, newinlay
  283. GuiControl, enable, newicon
  284. GuiControl, enable, coloredinlay
  285. GuiControl, enable, newenglishname
  286. GuiControl, enable, newfrenchname
  287. GuiControl, enable, newspanishname
  288. GuiControl, enable, newitalianname
  289. GuiControl, enable, newgermanname
  290. GuiControl, enable, newjapanesename
  291. GuiControl, enable, getemplateB
  292. GuiControl, enable, creatorname
  293. GuiControl, enable, parseB
  294. GuiControl, enable, lg
  295. GuiControl, enable, sg
  296. }
  297. If RS2014DIR =
  298. {
  299. RS2014DIR = Undefinied.
  300. GuiControl,, rs2014dirtext, %RS2014DIR%
  301. GuiControl, enable, RS2014DB
  302. GuiControl, enable, newinlay
  303. GuiControl, enable, newicon
  304. GuiControl, enable, coloredinlay
  305. GuiControl, enable, newenglishname
  306. GuiControl, enable, newfrenchname
  307. GuiControl, enable, newspanishname
  308. GuiControl, enable, newitalianname
  309. GuiControl, enable, newgermanname
  310. GuiControl, enable, newjapanesename
  311. GuiControl, enable, getemplateB
  312. GuiControl, enable, creatorname
  313. GuiControl, enable, parseB
  314. GuiControl, enable, lg
  315. GuiControl, enable, sg
  316. } else {
  317. GuiControl,, rs2014dirtext, %RS2014DIR%
  318. GuiControl, enable, RS2014DB
  319. GuiControl, enable, newinlay
  320. GuiControl, enable, newicon
  321. GuiControl, enable, coloredinlay
  322. GuiControl, enable, newenglishname
  323. GuiControl, enable, newfrenchname
  324. GuiControl, enable, newspanishname
  325. GuiControl, enable, newitalianname
  326. GuiControl, enable, newgermanname
  327. GuiControl, enable, newjapanesename
  328. GuiControl, enable, getemplateB
  329. GuiControl, enable, creatorname
  330. GuiControl, enable, parseB
  331. GuiControl, enable, lg
  332. GuiControl, enable, sg
  333. }
  334. return
  335.  
  336. newiconfiles:
  337. GuiControl, disable, RS2014DB
  338. GuiControl, disable, newinlay
  339. GuiControl, disable, newicon
  340. GuiControl, disable, coloredinlay
  341. GuiControl, disable, getemplateB
  342. GuiControl, disable, newenglishname
  343. GuiControl, disable, newfrenchname
  344. GuiControl, disable, newspanishname
  345. GuiControl, disable, newitalianname
  346. GuiControl, disable, newgermanname
  347. GuiControl, disable, newjapanesename
  348. GuiControl, disable, parseB
  349. GuiControl, disable, creatorname
  350. GuiControl, disable, lg
  351. GuiControl, disable, sg
  352. FileSelectFile, DDSI512files, 3, , Open a Icon 512x512 Image, Rocksmith 2014 Icon 512x512 Image files (*.tga; *.png)
  353. If DDSI512files =
  354. {
  355. DDSI512files = %A_ScriptDir%\ressources\images\icon.png
  356. GuiControl,, newicon, %DDSI512files%
  357. GuiControl, enable, RS2014DB
  358. GuiControl, enable, newinlay
  359. GuiControl, enable, newicon
  360. GuiControl, enable, coloredinlay
  361. GuiControl, enable, newenglishname
  362. GuiControl, enable, newfrenchname
  363. GuiControl, enable, newspanishname
  364. GuiControl, enable, newitalianname
  365. GuiControl, enable, newgermanname
  366. GuiControl, enable, newjapanesename
  367. GuiControl, enable, getemplateB
  368. GuiControl, enable, parseB
  369. GuiControl, enable, creatorname
  370. GuiControl, enable, lg
  371. GuiControl, enable, sg
  372. } else {
  373. GuiControl,, newicon, %DDSI512files%
  374. GuiControl, enable, RS2014DB
  375. GuiControl, enable, newinlay
  376. GuiControl, enable, newicon
  377. GuiControl, enable, coloredinlay
  378. GuiControl, enable, newenglishname
  379. GuiControl, enable, newfrenchname
  380. GuiControl, enable, newspanishname
  381. GuiControl, enable, newitalianname
  382. GuiControl, enable, newgermanname
  383. GuiControl, enable, newjapanesename
  384. GuiControl, enable, getemplateB
  385. GuiControl, enable, parseB
  386. GuiControl, enable, creatorname
  387. GuiControl, enable, lg
  388. GuiControl, enable, sg
  389. }
  390. If DDSI512files = ERROR
  391. {
  392. DDSI512files = %A_ScriptDir%\ressources\images\icon.png
  393. GuiControl,, newicon, %DDSI512files%
  394. GuiControl, enable, RS2014DB
  395. GuiControl, enable, newinlay
  396. GuiControl, enable, newicon
  397. GuiControl, enable, coloredinlay
  398. GuiControl, enable, newenglishname
  399. GuiControl, enable, newfrenchname
  400. GuiControl, enable, newspanishname
  401. GuiControl, enable, newitalianname
  402. GuiControl, enable, newgermanname
  403. GuiControl, enable, newjapanesename
  404. GuiControl, enable, getemplateB
  405. GuiControl, enable, parseB
  406. GuiControl, enable, lg
  407. GuiControl, enable, creatorname
  408. GuiControl, enable, sg
  409. } else {
  410. GuiControl,, newicon, %DDSI512files%
  411. GuiControl, enable, RS2014DB
  412. GuiControl, enable, newinlay
  413. GuiControl, enable, newicon
  414. GuiControl, enable, coloredinlay
  415. GuiControl, enable, newenglishname
  416. GuiControl, enable, newfrenchname
  417. GuiControl, enable, newspanishname
  418. GuiControl, enable, newitalianname
  419. GuiControl, enable, newgermanname
  420. GuiControl, enable, newjapanesename
  421. GuiControl, enable, getemplateB
  422. GuiControl, enable, parseB
  423. GuiControl, enable, creatorname
  424. GuiControl, enable, lg
  425. GuiControl, enable, sg
  426. }
  427. return
  428.  
  429. newinlayfiles:
  430. GuiControl, disable, RS2014DB
  431. GuiControl, disable, newinlay
  432. GuiControl, disable, newicon
  433. GuiControl, disable, coloredinlay
  434. GuiControl, disable, getemplateB
  435. GuiControl, disable, newenglishname
  436. GuiControl, disable, newfrenchname
  437. GuiControl, disable, newspanishname
  438. GuiControl, disable, newitalianname
  439. GuiControl, disable, newgermanname
  440. GuiControl, disable, newjapanesename
  441. GuiControl, disable, parseB
  442. GuiControl, disable, lg
  443. GuiControl, disable, sg
  444. GuiControl, disable, creatorname
  445. FileSelectFile, DDSInlayfiles, 3, , Open a Inlay Image, Rocksmith 2014 Inlay Image files (*.tga; *.png)
  446. If DDSInlayfiles =
  447. {
  448. DDSInlayfiles = %A_ScriptDir%\ressources\images\inlay_preview.png
  449. GuiControl,, newinlay, %DDSInlayfiles%
  450. GuiControl, enable, RS2014DB
  451. GuiControl, enable, newinlay
  452. GuiControl, enable, newicon
  453. GuiControl, enable, coloredinlay
  454. GuiControl, enable, newenglishname
  455. GuiControl, enable, newfrenchname
  456. GuiControl, enable, newspanishname
  457. GuiControl, enable, newitalianname
  458. GuiControl, enable, newgermanname
  459. GuiControl, enable, newjapanesename
  460. GuiControl, enable, getemplateB
  461. GuiControl, enable, creatorname
  462. GuiControl, enable, parseB
  463. GuiControl, enable, lg
  464. GuiControl, enable, sg
  465. } else {
  466. GuiControl,, newinlay, %DDSInlayfiles%
  467. GuiControl, enable, RS2014DB
  468. GuiControl, enable, newinlay
  469. GuiControl, enable, newicon
  470. GuiControl, enable, coloredinlay
  471. GuiControl, enable, newenglishname
  472. GuiControl, enable, newfrenchname
  473. GuiControl, enable, newspanishname
  474. GuiControl, enable, newitalianname
  475. GuiControl, enable, newgermanname
  476. GuiControl, enable, newjapanesename
  477. GuiControl, enable, getemplateB
  478. GuiControl, enable, parseB
  479. GuiControl, enable, lg
  480. GuiControl, enable, sg
  481. GuiControl, enable, creatorname
  482. }
  483. If DDSInlayfiles = ERROR
  484. {
  485. DDSInlayfiles = %A_ScriptDir%\ressources\images\inlay_preview.png
  486. GuiControl,, newinlay, %DDSInlayfiles%
  487. GuiControl, enable, RS2014DB
  488. GuiControl, enable, newinlay
  489. GuiControl, enable, newicon
  490. GuiControl, enable, coloredinlay
  491. GuiControl, enable, newenglishname
  492. GuiControl, enable, newfrenchname
  493. GuiControl, enable, newspanishname
  494. GuiControl, enable, newitalianname
  495. GuiControl, enable, newgermanname
  496. GuiControl, enable, newjapanesename
  497. GuiControl, enable, getemplateB
  498. GuiControl, enable, parseB
  499. GuiControl, enable, lg
  500. GuiControl, enable, sg
  501. GuiControl, enable, creatorname
  502. } else {
  503. GuiControl,, newinlay, %DDSInlayfiles%
  504. GuiControl, enable, RS2014DB
  505. GuiControl, enable, newinlay
  506. GuiControl, enable, newicon
  507. GuiControl, enable, coloredinlay
  508. GuiControl, enable, newenglishname
  509. GuiControl, enable, newfrenchname
  510. GuiControl, enable, newspanishname
  511. GuiControl, enable, newitalianname
  512. GuiControl, enable, newgermanname
  513. GuiControl, enable, newjapanesename
  514. GuiControl, enable, getemplateB
  515. GuiControl, enable, parseB
  516. GuiControl, enable, lg
  517. GuiControl, enable, sg
  518. GuiControl, enable, creatorname
  519. }
  520. return
  521.  
  522. loadguitar:
  523. GuiControl, disable, RS2014DB
  524. GuiControl, disable, newinlay
  525. GuiControl, disable, newicon
  526. GuiControl, disable, coloredinlay
  527. GuiControl, disable, getemplateB
  528. GuiControl, disable, newenglishname
  529. GuiControl, disable, newfrenchname
  530. GuiControl, disable, newspanishname
  531. GuiControl, disable, newitalianname
  532. GuiControl, disable, newgermanname
  533. GuiControl, disable, newjapanesename
  534. GuiControl, disable, parseB
  535. GuiControl, disable, lg
  536. GuiControl, disable, creatorname
  537. GuiControl, disable, sg
  538. FileSelectFile, loadcgm, 3, , Open a Rocksmith 2014 Guitars Maker Template, Rocksmith 2014 CGM (*.cgm)
  539. if loadcgm =
  540. {
  541. msgbox, You need to select a .cgm only.
  542. GuiControl, enable, RS2014DB
  543. GuiControl, enable, newinlay
  544. GuiControl, enable, newicon
  545. GuiControl, enable, coloredinlay
  546. GuiControl, enable, newenglishname
  547. GuiControl, enable, newfrenchname
  548. GuiControl, enable, newspanishname
  549. GuiControl, enable, newitalianname
  550. GuiControl, enable, newgermanname
  551. GuiControl, enable, newjapanesename
  552. GuiControl, enable, getemplateB
  553. GuiControl, enable, aboutB
  554. GuiControl, enable, parseB
  555. GuiControl, enable, lg
  556. GuiControl, enable, sg
  557. GuiControl, enable, creatorname
  558. }
  559. else
  560. {
  561. progress = 10
  562. progresstext = Loading .
  563. GuiControl,, progressbar, %progress%
  564. GuiControl,, progressbar2, %progress%
  565. GuiControl,, progresstxt, %progresstext%
  566. FileRemoveDir, %A_ScriptDir%\tmp\cgm, 1
  567. FileCreateDir, %A_ScriptDir%\tmp
  568. FileCreateDir, %A_ScriptDir%\tmp\cgm
  569. FileCopy, %loadcgm%, %A_ScriptDir%\tmp\cgm\1.7z
  570. RunWait, %A_ScriptDir%\ressources\packer\7za.exe x "%A_ScriptDir%\tmp\cgm\1.7z" -o"%A_ScriptDir%\tmp\cgm\*",
  571. IniRead, leng, %A_ScriptDir%\tmp\cgm\1\setup.smb, Setup, guitarname
  572. IniRead, lfr, %A_ScriptDir%\tmp\cgm\1\setup.smb, Setup, guitarname1
  573. IniRead, lspa, %A_ScriptDir%\tmp\cgm\1\setup.smb, Setup, guitarname2
  574. IniRead, lit, %A_ScriptDir%\tmp\cgm\1\setup.smb, Setup, guitarname3
  575. IniRead, lge, %A_ScriptDir%\tmp\cgm\1\setup.smb, Setup, guitarname4
  576. IniRead, ljpn, %A_ScriptDir%\tmp\cgm\1\setup.smb, Setup, guitarname5
  577. IniRead, lcreator, %A_ScriptDir%\tmp\cgm\1\setup.smb, Setup, creatorname
  578. IniRead, lcolored, %A_ScriptDir%\tmp\cgm\1\setup.smb, Setup, coloredinlay
  579. If lcreator = ERROR
  580. {
  581. IniRead, leng, %A_ScriptDir%\tmp\cgm\1\setup.cgm, Setup, guitarname
  582. IniRead, lfr, %A_ScriptDir%\tmp\cgm\1\setup.cgm, Setup, guitarname1
  583. IniRead, lspa, %A_ScriptDir%\tmp\cgm\1\setup.cgm, Setup, guitarname2
  584. IniRead, lit, %A_ScriptDir%\tmp\cgm\1\setup.cgm, Setup, guitarname3
  585. IniRead, lge, %A_ScriptDir%\tmp\cgm\1\setup.cgm, Setup, guitarname4
  586. IniRead, ljpn, %A_ScriptDir%\tmp\cgm\1\setup.cgm, Setup, guitarname5
  587. IniRead, lcreator, %A_ScriptDir%\tmp\cgm\1\setup.cgm, Setup, creatorname
  588. IniRead, lcolored, %A_ScriptDir%\tmp\cgm\1\setup.cgm, Setup, coloredinlay
  589. }
  590. progress = 50
  591. progresstext = Loading ..
  592. GuiControl,, progressbar, %progress%
  593. GuiControl,, progressbar2, %progress%
  594. GuiControl,, progresstxt, %progresstext%
  595. RunWait, %A_ScriptDir%\ressources\packer\topng.exe -out png "%A_ScriptDir%\tmp\cgm\1\inlay.dds",,Hide
  596. progress = 80
  597. progresstext = Loading ...
  598. GuiControl,, progressbar, %progress%
  599. GuiControl,, progressbar2, %progress%
  600. GuiControl,, progresstxt, %progresstext%
  601. RunWait, %A_ScriptDir%\ressources\packer\topng.exe -out png "%A_ScriptDir%\tmp\cgm\1\icon.dds",,Hide
  602. loadinlay = %A_ScriptDir%\tmp\cgm\1\inlay.png
  603. loadicon = %A_ScriptDir%\tmp\cgm\1\icon.png
  604. DDSI512files = %loadicon%
  605. DDSInlayfiles = %loadinlay%
  606. if lcolored = 1
  607. {
  608. coloredinlay = 1
  609. }
  610. else
  611. {
  612. coloredinlay = 0
  613. }
  614. GuiControl,, newenglishname, %leng%
  615. GuiControl,, newfrenchname, %lfr%
  616. GuiControl,, newspanishname, %lspa%
  617. GuiControl,, newitalianname, %lit%
  618. GuiControl,, newgermanname, %lge%
  619. GuiControl,, newjapanesename, %ljpn%
  620. GuiControl,, coloredinlay, %coloredinlay%
  621. GuiControl,, newinlay, %DDSInlayfiles%
  622. GuiControl,, newicon, %DDSI512files%
  623. If lcreator = ERROR
  624. {
  625. GuiControl,, creatorname, UnknowCreator
  626. msgbox, The guitar %leng% has been loaded !
  627. }
  628. If lcreator = UnknowCreator
  629. {
  630. GuiControl,, creatorname, UnknowCreator
  631. msgbox, The guitar %leng% has been loaded !
  632. }
  633. else
  634. {
  635. GuiControl,, creatorname, %lcreator%
  636. msgbox, The guitar %leng% made by %lcreator% has been loaded !
  637. }
  638. progress = 0
  639. progresstext = Ready to go !
  640. GuiControl,, progressbar, %progress%
  641. GuiControl,, progressbar2, %progress%
  642. GuiControl,, progresstxt, %progresstext%
  643. GuiControl, enable, RS2014DB
  644. GuiControl, enable, newinlay
  645. GuiControl, enable, newicon
  646. GuiControl, enable, coloredinlay
  647. GuiControl, enable, newenglishname
  648. GuiControl, enable, newfrenchname
  649. GuiControl, enable, newspanishname
  650. GuiControl, enable, newitalianname
  651. GuiControl, enable, newgermanname
  652. GuiControl, enable, newjapanesename
  653. GuiControl, enable, getemplateB
  654. GuiControl, enable, parseB
  655. GuiControl, enable, lg
  656. GuiControl, enable, sg
  657. GuiControl, enable, creatorname
  658. }
  659. return
  660.  
  661. saveguitar:
  662. GuiControl, disable, RS2014DB
  663. GuiControl, disable, newinlay
  664. GuiControl, disable, newicon
  665. GuiControl, disable, coloredinlay
  666. GuiControl, disable, getemplateB
  667. GuiControl, disable, newenglishname
  668. GuiControl, disable, newfrenchname
  669. GuiControl, disable, newspanishname
  670. GuiControl, disable, newitalianname
  671. GuiControl, disable, newgermanname
  672. GuiControl, disable, newjapanesename
  673. GuiControl, disable, aboutB
  674. GuiControl, disable, parseB
  675. GuiControl, disable, lg
  676. GuiControl, disable, sg
  677. GuiControl, disable, creatorname
  678. FileSelectFolder, CGMDIR,, 3, Select folder to save the custom guitars.
  679. if CGMDIR =
  680. {
  681. msgbox, You need to select a folder to save your templace (ex: Desktop.)
  682. GuiControl, enable, RS2014DB
  683. GuiControl, enable, newinlay
  684. GuiControl, enable, newicon
  685. GuiControl, enable, coloredinlay
  686. GuiControl, enable, newenglishname
  687. GuiControl, enable, newfrenchname
  688. GuiControl, enable, newspanishname
  689. GuiControl, enable, newitalianname
  690. GuiControl, enable, newgermanname
  691. GuiControl, enable, newjapanesename
  692. GuiControl, enable, getemplateB
  693. GuiControl, enable, aboutB
  694. GuiControl, enable, parseB
  695. GuiControl, enable, lg
  696. GuiControl, enable, sg
  697. GuiControl, enable, creatorname
  698. }
  699. else
  700. {
  701. GuiControlGet, newinlay
  702. GuiControlGet, newicon
  703. GuiControlGet, creatorname
  704. GuiControlGet, coloredinlay
  705. GuiControlGet, newenglishname
  706. GuiControlGet, newfrenchname
  707. GuiControlGet, newspanishname
  708. GuiControlGet, newitalianname
  709. GuiControlGet, newgermanname
  710. GuiControlGet, newjapanesename
  711. FileCreateDir, %A_ScriptDir%\tmp
  712. FileRemoveDir, %A_ScriptDir%\tmp\cgmsave, 1
  713. FileCreateDir, %A_ScriptDir%\tmp\cgmsave
  714. progress = 10
  715. progresstext = Saving .
  716. GuiControl,, progressbar, %progress%
  717. GuiControl,, progressbar2, %progress%
  718. GuiControl,, progresstxt, %progresstext%
  719. Runwait, %A_ScriptDir%\ressources\packer\nvdxt.exe -file "%DDSInlayfiles%" -prescale 1024 512 -32 dxt5 -dxt5 -overwrite -alpha -output "%A_ScriptDir%\tmp\cgmsave\inlay.dds",,Hide
  720. progress = 50
  721. progresstext = Saving . .
  722. GuiControl,, progressbar, %progress%
  723. GuiControl,, progressbar2, %progress%
  724. GuiControl,, progresstxt, %progresstext%
  725. Runwait, %A_ScriptDir%\ressources\packer\nvdxt.exe -file "%DDSI512files%" -prescale 512 512 -32 dxt5 -dxt5 -overwrite -output "%A_ScriptDir%\tmp\cgmsave\icon.dds",,Hide
  726. progress = 70
  727. progresstext = Saving ..
  728. GuiControl,, progressbar, %progress%
  729. GuiControl,, progressbar2, %progress%
  730. GuiControl,, progresstxt, %progresstext%
  731. IniWrite, %newenglishname%, %A_ScriptDir%\tmp\cgmsave\setup.smb, Setup, guitarname
  732. IniWrite, %newfrenchname%, %A_ScriptDir%\tmp\cgmsave\setup.smb, Setup, guitarname1
  733. IniWrite, %newspanishname%, %A_ScriptDir%\tmp\cgmsave\setup.smb, Setup, guitarname2
  734. IniWrite, %newitalianname%, %A_ScriptDir%\tmp\cgmsave\setup.smb, Setup, guitarname3
  735. IniWrite, %newgermanname%, %A_ScriptDir%\tmp\cgmsave\setup.smb, Setup, guitarname4
  736. IniWrite, %newjapanesename%, %A_ScriptDir%\tmp\cgmsave\setup.smb, Setup, guitarname5
  737. IniWrite, %coloredinlay%, %A_ScriptDir%\tmp\cgmsave\setup.smb, Setup, coloredinlay
  738. IniWrite, %creatorname%, %A_ScriptDir%\tmp\cgmsave\setup.smb, Setup, creatorname
  739. progress = 90
  740. progresstext = Saving .. .
  741. GuiControl,, progressbar, %progress%
  742. GuiControl,, progressbar2, %progress%
  743. GuiControl,, progresstxt, %progresstext%
  744. StringReplace, newenglishname2, newenglishname, %A_SPACE%, _, All
  745. StringReplace, creatorname2, creatorname, %A_SPACE%, _, All
  746. progress = 100
  747. progresstext = Saving ...
  748. GuiControl,, progressbar, %progress%
  749. GuiControl,, progressbar2, %progress%
  750. GuiControl,, progresstxt, %progresstext%
  751. RunWait, %A_ScriptDir%\ressources\packer\7za.exe a %CGMDIR%\%newenglishname2%_%creatorname2%_v%buildversion%.cgm "%A_ScriptDir%\tmp\cgmsave\"*,,Hide
  752. msgbox, Your custom guitar %newenglishname2%_%creatorname2%_v%buildversion%.cgm as been saved here :`n%CGMDIR%`nEnjoy :)
  753. progress = 0
  754. progresstext = Ready to go !
  755. GuiControl,, progressbar, %progress%
  756. GuiControl,, progressbar2, %progress%
  757. GuiControl,, progresstxt, %progresstext%
  758. GuiControl, enable, RS2014DB
  759. GuiControl, enable, newinlay
  760. GuiControl, enable, newicon
  761. GuiControl, enable, coloredinlay
  762. GuiControl, enable, newenglishname
  763. GuiControl, enable, newfrenchname
  764. GuiControl, enable, newspanishname
  765. GuiControl, enable, newitalianname
  766. GuiControl, enable, newgermanname
  767. GuiControl, enable, newjapanesename
  768. GuiControl, enable, getemplateB
  769. GuiControl, enable, parseB
  770. GuiControl, enable, lg
  771. GuiControl, enable, sg
  772. GuiControl, enable, creatorname
  773. }
  774. return
  775.  
  776. parse:
  777. GuiControl, disable, RS2014DB
  778. GuiControl, disable, newinlay
  779. GuiControl, disable, newicon
  780. GuiControl, disable, coloredinlay
  781. GuiControl, disable, getemplateB
  782. GuiControl, disable, newenglishname
  783. GuiControl, disable, newfrenchname
  784. GuiControl, disable, newspanishname
  785. GuiControl, disable, newitalianname
  786. GuiControl, disable, newgermanname
  787. GuiControl, disable, newjapanesename
  788. GuiControl, disable, aboutB
  789. GuiControl, disable, parseB
  790. GuiControl, disable, lg
  791. GuiControl, disable, sg
  792. GuiControl, disable, creatorname
  793. GuiControlGet, coloredinlay
  794. GuiControlGet, newfrenchname
  795. GuiControlGet, newspanishname
  796. GuiControlGet, newitalianname
  797. GuiControlGet, newgermanname
  798. GuiControlGet, newjapanesename
  799. GuiControlGet, newinlay
  800. GuiControlGet, newicon
  801. guitarname = %newenglishname%
  802. guitarname1 = %newfrenchname%
  803. guitarname2 = %newspanishname%
  804. guitarname3 = %newitalianname%
  805. guitarname4 = %newgermanname%
  806. guitarname5 = %newjapanesename%
  807. if coloredinlay = 0
  808. {
  809. nif1 = 47616D656272796F2046696C6520466F726D61742C2056657273696F6E2033302E312E302E330A0300011E010000000049000000000000000B00110000004E694461746153747265616D0131013138110000004E694461746153747265616D0130013138110000004E69537472696E67457874726144617461060000004E694D657368120000004E694D6174657269616C50726F7065727479150000004E69566572746578436F6C6F7250726F70657274790F0000004E69416C70686150726F70657274790F0000004E69536F7572636554657874757265130000004E69546578747572696E6750726F7065727479110000004E695A42756666657250726F7065727479060000004E694E6F64650000010002000300000001000200030000000100020003000000010002000300000001000200030000000100020003000000010002000300000001000200030000000100020003000000010002000300000001000200030000000100020003000000010002000300000001000200030000000100020003000000010004000500060007000800090002000300050009000A00710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC0000007100000029000000440000000E0000000F00000024000000280000000E00000008000000BC0000000E0000000E0000009A00000018000000100000000A0000005363656E6520526F6F7407000000696E6C61795F330E0000005573657250726F704275666665720B0000000D0A7A4D6F646531300D0A10000000
  810. nif2 = 0B0000004D6174657269616C20233205000000494E44455808000000504F534954494F4E08000000544558434F4F524407000000696E6C61795F3407000000696E6C61795F3507000000696E6C61795F3607000000696E6C61795F3707000000696E6C61795F3807000000696E6C61795F3908000000696E6C61795F313008000000696E6C61795F313108000000696E6C61795F313208000000696E6C61795F313308000000696E6C61795F313408000000696E6C61795F313508000000696E6C61795F313608000000696E6C61795F313708000000696E6C61795F31380000000050000000000000000100000000000000040000000200000037040300360402008EDBA1C2D26F80C049382037B18A633FEA6B6F3F01A3A8C2D26F80C06CF22637E7077B3FEA6B6F3F02A3A8C2D36F80406CF22637EB077B3F3A04FB3E8FDBA1C2D36F804049382037B98A633F3A04FB3E010C000000000000000100000000000000060000000100000015020100020003000000000001000200010200000003000000170000000100000002000000FFFFFFFF10009C2727B7B8C850C2A68B5ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000483FA5C2000080345A952337DC6A8B400200000001000000000100000001000000060000000000000000000000000100000002000000070000000000000008000000000000000000000050000000000000000100000000000000040000000200000037040300360402002DF799C2D26F80C0AF6318374532483FEA6B6F3F1E14A1C2D26F80C065721F37A7D7603FEA6B6F3F1F14A1C2D36F804065721F37AFD7603F3A04FB3E2EF799C2D36F8040AF6318374932483F3A04FB3E010C000000000000000100000000000000060000000100000015020100020003000000000001000200010200000003000000160000000100000006000000FFFFFFFF100021431FB7B8C850C29D8C5ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000A6859DC2000080340AEB1B376F7A8C400200000005000000000100000001000000060000000000000004000000000100000002000000070000000000000008000000000000000000000050000000000000000100000000000000040000000200000037040300360402001E1A92C2D26F80C0609710372BF32C3FEA6B6F3FBD2F99C2D26F80C0DC9D17373B7F453FEA6B6F3FBE2F99C2D36F8040DD9D17373B7F453F3A04FB3E1E1A92C2D36F80406097103727F32C3F3A04FB3E010C00000000000000010000000000000006000000010000001502010002000300000000000100020001020000000300000015000000010000000A000000FFFFFFFF1000E64517B7B8C850C29A8D5ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000EEA495C2000080349E1A1437C0628C40020000000900000000010000000100000006000000000000000800000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200C6D489C2D26F80C0E4630837C34A103FEA6B6F3FAE5291C2D26F80C09DD10F3729402A3FEA6B6F3FAE5291C2D36F80409ED10F3725402A3F3A04FB3EC6D489C2D36F8040E6630837BF4A103F3A04FB3E010C00000000000000010000000000000006000000010000001502010002000300000000000100020001020000000300000014000000010000000E000000FFFFFFFF1000F5290FB7B8C850C29C8E5ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000BA938DC200008034C11A0C3794BB8D40020000000D00000000010000000100000006000000000000000C00000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200B88581C2D26F80C0CD2700376301E73EEA6B6F3F560D89C2D26F80C0319E0737B9970D3FEA6B6F3F560D89C2D36F8040339E0737B7970D3F3A04FB3EB88581C2D36F8040CE2700376001E73E3A04FB3E010C000000000000000100000000000000060000000100000015020100020003000000000001000200010200000003000000130000000100000012000000FFFFFFFF1000ECE906B7B8C850C2A58F5ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000874985C20000803400E303377FDC8D40020000001100000000010000000100000006000000000000001000000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200BE0372C2D26F80C04E70EF3668FFAB3EEA6B6F3F48BE80C2D26F80C05EC4FE364F9BE13EEA6B6F3F48BE80C2D36F804060C4FE364F9BE13E3A04FB3EC00372C2D36F80405170EF3661FFAB3E3A04FB3E010C000000000000000100000000000000060000000100000015020100020003000000000001000200010200000003000000120000000100000016000000FFFFFFFF1000302CFCB6B8C850C2B2905ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF000000000001000027C079C200008034571AF736D6918E40020000001500000000010000000100000006000000000000001400000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200FC9160C2D26F80C08529DE3681D8693E903B6F3FE07470C2D26F80C036E5ED367D6BA73E8E3B6F3FE27470C2D36F804039E5ED36816BA73E82A3FA3EFE9160C2D36F80408929DE368FD8693E82A3FA3E010C00000000000000010000000000000006000000010000001502010002000300000000000100020001020000000300000011000000010000001A000000FFFFFFFF10008441EBB6B8C850C2C6915ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF00000000000100006F8368C2000080345F07E636054C8F400200000019000000000100000001000000060000000000000018000000000100000002000000070000000000000008000000000000000000000050000000000000000100000000000000040000000200000037040300360402008F854EC2D26F80C0D54ACC362E36EE3D903B6F3F1E035FC2D26F80C08D9EDC36C6F05F3E903B6F3F20035FC2D36F8040919EDC36CDF05F3E82A3FA3E92854EC2D36F8040D94ACC365A36EE3D82A3FA3E010C00000000000000010000000000000006000000010000001502010002000300000000000100020001020000000300000010000000010000001E000000FFFFFFFF10004604D9B6B8C850C2E2925ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF000000000001000058C456C200008034B374D43689629040020000001D00000000010000000100000006000000000000001C00000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200BE1E3CC2D26F80C0A514BA366CC2073B903B6F3FB1F64CC2D26F80C001C0CA36C666DA3D903B6F3FB4F64CC2D36F804005C0CA36E366DA3D82A3FA3EC21E3CC2D36F8040A914BA36E4C7073B82A3FA3E010C0000000000000001000000000000000600000001000000150201000200030000000000010002000102000000030000000F0000000100000022000000FFFFFFFF10006E79C6B6B8C850C205945ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000B98A44C200008034556AC2361C099140020000002100000000010000000100000006000000000000002000000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200873A29C2D26F80C02E64A7369CE45E3FA2AFEC3EE08F3AC2D26F80C0FA89B83640387D3FA2AFEC3EE48F3AC2D36F8040FE89B83647387D3F40C08D3C8B3A29C2D36F80403264A736A1E45E3F40C08D3C010C0000000000000001000000000000000600000001000000150201000200030000000000010002000102000000030000000E0000000100000026000000FFFFFFFF100043AAB3B6B8C850C230955ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF000000000001000036E531C20000803416F7AF36C6F4914002000000250000000001000000010000000600000000000000240000000001000000020000000700000000000000080000000000000000000000500000000000000001000000000000000400000002000000370403003604020041CC15C2D26F80C0F72C94368DE53C3FA2AFEC3EA9AB27C2D26F80C0A9D9A536BE2A5C3FA2AFEC3EADAB27C2D36F8040ADD9A536C62A5C3F40C08D3C44CC15C2D36F8040FA2C943693E53C3F40C08D3C010C0000000000000001000000000000000600000001000000150201000200030000000000010002000102000000030000000D000000010000002A000000FFFFFFFF1000A987A0B6B8C850C262965ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000F7BB1EC20000803452039D363BFE92400200000029000000000100000001000000060000000000000028000000000100000002000000070000000000000008000000000000000000000050000000000000000100000000000000040000000200000037040300360402005E8201C2D26F80C0B01D80364366193FA2AFEC3E633D14C2D26F80C08FA29236B02B3A3FA2AFEC3E663D14C2D36F804092A29236B62B3A3F40C08D3C618201C2D36F8040B41D80364566193F40C08D3C010C0000000000000001000000000000000600000001000000150201000200030000000000010002000102000000030000000C000000010000002E000000FFFFFFFF1000CCF38BB6B8C850C2A0975ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000E2DF0AC2000080342160893634B19440020000002D00000000010000000100000006000000000000002C00000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200EF68DAC1D26F80C0141C5836E4BFEB3EA2AFEC3E00E7FFC1D26F80C0EE267D3664AC163FA2AFEC3E06E7FFC1D36F8040F5267D366BAC163F40C08D3CF368DAC1D36F80401A1C5836EBBFEB3E40C08D3C010C0000000000000001000000000000000600000001000000150201000200030000000000010002000102000000030000000B0000000100000032000000FFFFFFFF10003E3270B6B8C850C2E5985ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000FA27EDC10000803484A16A364DB9944002000000310000000001000000010000000600000000000000300000000001000000020000000700000000000000080000000000000000000000500000000000000001000000000000000400000002000000370403003604020077C6AFC1D26F80C04DFE2D36C627A13EA2AFEC3E334BD7C1D26F80C0FC075536294CE63EA2AFEC3E374BD7C1D36F8040010855362F4CE63E40C08D3C7AC6AFC1D36F804052FE2D36C627A13E40C08D3C010C0000000000000001000000000000000600000001000000150201000200030000000000010002000102000000030000000A0000000100000036000000FFFFFFFF10001CD645B6B8C850C2329A5ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000D788C3C10000803427834136B2CE9640020000003500000000010000000100000006000000000000003400000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200E4E083C1D26F80C0D1A50236AEB4283EA2AFEC3EBBA8ACC1D26F80C06EEA2A3609B49B3EA2AFEC3EBEA8ACC1D36F804073EA2A360FB49B3E40C08D3CE8E083C1D36F8040D2A50236C6B4283E80C08D3C010C00000000000000010000000000000006000000010000001502010000000100020002000300000001020000000300000009000000010000003A000000FFFFFFFF10006A6F1AB6B8C850C28C9B5ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000D14498C10000803422C8163642259840020000003900000000010000000100000006000000000000003800000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200E61B2DC1D26F80C0F2D1AB353AB6213CA2AFEC3E28C380C1D26F80C08424FF3540CD1D3EA2AFEC3E2CC380C1D36F80408624FF354CCD1D3E80C08D3CE81B2DC1D36F8040ECD1AB353AB6213C80C08D3C010C000000000000000100000000000000060000000100000015020100020003000000000001000200010500000000000000FFFFFFFF0000000000000000000000000000000000000000000000000000000000000000000000000000803F0000803F0000803F000020410000803FFFFFFFFF00000000FFFFFFFF0000FFFFFFFF00000000FFFFFFFFED1000FFFFFFFF00000000FFFFFFFF0104000000FFFFFFFF060000000100000003000000010000FFFFFFFF00000000FFFFFFFF04000900000001410000000032010000000000000000000000000000FFFFFFFF00000000FFFFFFFF0D000200000003000000010000000100000044000000FFFFFFFF1000705DD8B5B8C850C2F19C5ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F050000003E0000003F000000400000004200000043000000FFFFFFFF00000000FFFFFFFF00000000000100001F5157C100008034397BD535D3B19940020000003D00000000010000000100000006000000000000003C0000000001000000020000000700000000000000080000000000000000000000FFFFFFFF00000000FFFFFFFF0800FFFFFFFF00000000FFFFFFFF0F000000000000000000FFFFFFFF10010000000000000000000000000000803F0000000000000000000000000000803F0000000000000000000000000000803F0000803F020000004600000047000000FFFFFFFF10000000450000003B00000037000000330000002F0000002B00000027000000230000001F0000001B00000017000000130000000F0000000B0000000700000003000000000000000100000048000000
  811. }
  812. else
  813. {
  814. nif1 = 47616D656272796F2046696C6520466F726D61742C2056657273696F6E2033302E312E302E330A0300011E010000000049000000000000000B00110000004E694461746153747265616D0131013138110000004E694461746153747265616D0130013138110000004E69537472696E67457874726144617461060000004E694D657368120000004E694D6174657269616C50726F7065727479150000004E69566572746578436F6C6F7250726F70657274790F0000004E69416C70686150726F70657274790F0000004E69536F7572636554657874757265130000004E69546578747572696E6750726F7065727479110000004E695A42756666657250726F7065727479060000004E694E6F64650000010002000300000001000200030000000100020003000000010002000300000001000200030000000100020003000000010002000300000001000200030000000100020003000000010002000300000001000200030000000100020003000000010002000300000001000200030000000100020003000000010004000500060007000800090002000300050009000A0008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC000000710000002900000008000000BC00000071000000290000000F00000024000000280000000E00000008000000BC0000000E0000000E0000009A00000018000000100000000A0000005363656E6520526F6F7407000000696E6C61795F300E0000005573657250726F704275666665720B0000000D0A7A4D6F646531300D0A10000000
  815. nif2 = 0B0000004D6174657269616C20233205000000494E44455808000000504F534954494F4E08000000544558434F4F524407000000696E6C61795F3007000000696E6C61795F3007000000696E6C61795F3007000000696E6C61795F3007000000696E6C61795F3007000000696E6C61795F300800000000696E6C61795F300800000000696E6C61795F300800000000696E6C61795F300800000000696E6C61795F300800000000696E6C61795F300800000000696E6C61795F300800000000696E6C61795F300800000000696E6C61795F300800000000696E6C61795F300000000050000000000000000100000000000000040000000200000037040300360402008EDBA1C2D26F80C049382037B18A633FEA6B6F3F01A3A8C2D26F80C06CF22637E7077B3FEA6B6F3F02A3A8C2D36F80406CF22637EB077B3F3A04FB3E8FDBA1C2D36F804049382037B98A633F3A04FB3E010C000000000000000100000000000000060000000100000015020100020003000000000001000200010200000003000000170000000100000002000000FFFFFFFF10009C2727B7B8C850C2A68B5ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000483FA5C2000080345A952337DC6A8B400200000001000000000100000001000000060000000000000000000000000100000002000000070000000000000008000000000000000000000050000000000000000100000000000000040000000200000037040300360402002DF799C2D26F80C0AF6318374532483FEA6B6F3F1E14A1C2D26F80C065721F37A7D7603FEA6B6F3F1F14A1C2D36F804065721F37AFD7603F3A04FB3E2EF799C2D36F8040AF6318374932483F3A04FB3E010C000000000000000100000000000000060000000100000015020100020003000000000001000200010200000003000000160000000100000006000000FFFFFFFF100021431FB7B8C850C29D8C5ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000A6859DC2000080340AEB1B376F7A8C400200000005000000000100000001000000060000000000000004000000000100000002000000070000000000000008000000000000000000000050000000000000000100000000000000040000000200000037040300360402001E1A92C2D26F80C0609710372BF32C3FEA6B6F3FBD2F99C2D26F80C0DC9D17373B7F453FEA6B6F3FBE2F99C2D36F8040DD9D17373B7F453F3A04FB3E1E1A92C2D36F80406097103727F32C3F3A04FB3E010C00000000000000010000000000000006000000010000001502010002000300000000000100020001020000000300000015000000010000000A000000FFFFFFFF1000E64517B7B8C850C29A8D5ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000EEA495C2000080349E1A1437C0628C40020000000900000000010000000100000006000000000000000800000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200C6D489C2D26F80C0E4630837C34A103FEA6B6F3FAE5291C2D26F80C09DD10F3729402A3FEA6B6F3FAE5291C2D36F80409ED10F3725402A3F3A04FB3EC6D489C2D36F8040E6630837BF4A103F3A04FB3E010C00000000000000010000000000000006000000010000001502010002000300000000000100020001020000000300000014000000010000000E000000FFFFFFFF1000F5290FB7B8C850C29C8E5ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000BA938DC200008034C11A0C3794BB8D40020000000D00000000010000000100000006000000000000000C00000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200B88581C2D26F80C0CD2700376301E73EEA6B6F3F560D89C2D26F80C0319E0737B9970D3FEA6B6F3F560D89C2D36F8040339E0737B7970D3F3A04FB3EB88581C2D36F8040CE2700376001E73E3A04FB3E010C000000000000000100000000000000060000000100000015020100020003000000000001000200010200000003000000130000000100000012000000FFFFFFFF1000ECE906B7B8C850C2A58F5ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000874985C20000803400E303377FDC8D40020000001100000000010000000100000006000000000000001000000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200BE0372C2D26F80C04E70EF3668FFAB3EEA6B6F3F48BE80C2D26F80C05EC4FE364F9BE13EEA6B6F3F48BE80C2D36F804060C4FE364F9BE13E3A04FB3EC00372C2D36F80405170EF3661FFAB3E3A04FB3E010C000000000000000100000000000000060000000100000015020100020003000000000001000200010200000003000000120000000100000016000000FFFFFFFF1000302CFCB6B8C850C2B2905ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF000000000001000027C079C200008034571AF736D6918E40020000001500000000010000000100000006000000000000001400000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200FC9160C2D26F80C08529DE3681D8693E903B6F3FE07470C2D26F80C036E5ED367D6BA73E8E3B6F3FE27470C2D36F804039E5ED36816BA73E82A3FA3EFE9160C2D36F80408929DE368FD8693E82A3FA3E010C00000000000000010000000000000006000000010000001502010002000300000000000100020001020000000300000011000000010000001A000000FFFFFFFF10008441EBB6B8C850C2C6915ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF00000000000100006F8368C2000080345F07E636054C8F400200000019000000000100000001000000060000000000000018000000000100000002000000070000000000000008000000000000000000000050000000000000000100000000000000040000000200000037040300360402008F854EC2D26F80C0D54ACC362E36EE3D903B6F3F1E035FC2D26F80C08D9EDC36C6F05F3E903B6F3F20035FC2D36F8040919EDC36CDF05F3E82A3FA3E92854EC2D36F8040D94ACC365A36EE3D82A3FA3E010C00000000000000010000000000000006000000010000001502010002000300000000000100020001020000000300000010000000010000001E000000FFFFFFFF10004604D9B6B8C850C2E2925ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF000000000001000058C456C200008034B374D43689629040020000001D00000000010000000100000006000000000000001C00000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200BE1E3CC2D26F80C0A514BA366CC2073B903B6F3FB1F64CC2D26F80C001C0CA36C666DA3D903B6F3FB4F64CC2D36F804005C0CA36E366DA3D82A3FA3EC21E3CC2D36F8040A914BA36E4C7073B82A3FA3E010C0000000000000001000000000000000600000001000000150201000200030000000000010002000102000000030000000F0000000100000022000000FFFFFFFF10006E79C6B6B8C850C205945ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000B98A44C200008034556AC2361C099140020000002100000000010000000100000006000000000000002000000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200873A29C2D26F80C02E64A7369CE45E3FA2AFEC3EE08F3AC2D26F80C0FA89B83640387D3FA2AFEC3EE48F3AC2D36F8040FE89B83647387D3F40C08D3C8B3A29C2D36F80403264A736A1E45E3F40C08D3C010C0000000000000001000000000000000600000001000000150201000200030000000000010002000102000000030000000E0000000100000026000000FFFFFFFF100043AAB3B6B8C850C230955ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF000000000001000036E531C20000803416F7AF36C6F4914002000000250000000001000000010000000600000000000000240000000001000000020000000700000000000000080000000000000000000000500000000000000001000000000000000400000002000000370403003604020041CC15C2D26F80C0F72C94368DE53C3FA2AFEC3EA9AB27C2D26F80C0A9D9A536BE2A5C3FA2AFEC3EADAB27C2D36F8040ADD9A536C62A5C3F40C08D3C44CC15C2D36F8040FA2C943693E53C3F40C08D3C010C0000000000000001000000000000000600000001000000150201000200030000000000010002000102000000030000000D000000010000002A000000FFFFFFFF1000A987A0B6B8C850C262965ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000F7BB1EC20000803452039D363BFE92400200000029000000000100000001000000060000000000000028000000000100000002000000070000000000000008000000000000000000000050000000000000000100000000000000040000000200000037040300360402005E8201C2D26F80C0B01D80364366193FA2AFEC3E633D14C2D26F80C08FA29236B02B3A3FA2AFEC3E663D14C2D36F804092A29236B62B3A3F40C08D3C618201C2D36F8040B41D80364566193F40C08D3C010C0000000000000001000000000000000600000001000000150201000200030000000000010002000102000000030000000C000000010000002E000000FFFFFFFF1000CCF38BB6B8C850C2A0975ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000E2DF0AC2000080342160893634B19440020000002D00000000010000000100000006000000000000002C00000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200EF68DAC1D26F80C0141C5836E4BFEB3EA2AFEC3E00E7FFC1D26F80C0EE267D3664AC163FA2AFEC3E06E7FFC1D36F8040F5267D366BAC163F40C08D3CF368DAC1D36F80401A1C5836EBBFEB3E40C08D3C010C0000000000000001000000000000000600000001000000150201000200030000000000010002000102000000030000000B0000000100000032000000FFFFFFFF10003E3270B6B8C850C2E5985ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000FA27EDC10000803484A16A364DB9944002000000310000000001000000010000000600000000000000300000000001000000020000000700000000000000080000000000000000000000500000000000000001000000000000000400000002000000370403003604020077C6AFC1D26F80C04DFE2D36C627A13EA2AFEC3E334BD7C1D26F80C0FC075536294CE63EA2AFEC3E374BD7C1D36F8040010855362F4CE63E40C08D3C7AC6AFC1D36F804052FE2D36C627A13E40C08D3C010C0000000000000001000000000000000600000001000000150201000200030000000000010002000102000000030000000A0000000100000036000000FFFFFFFF10001CD645B6B8C850C2329A5ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000D788C3C10000803427834136B2CE9640020000003500000000010000000100000006000000000000003400000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200E4E083C1D26F80C0D1A50236AEB4283EA2AFEC3EBBA8ACC1D26F80C06EEA2A3609B49B3EA2AFEC3EBEA8ACC1D36F804073EA2A360FB49B3E40C08D3CE8E083C1D36F8040D2A50236C6B4283E80C08D3C010C00000000000000010000000000000006000000010000001502010000000100020002000300000001020000000300000009000000010000003A000000FFFFFFFF10006A6F1AB6B8C850C28C9B5ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F0500000042000000400000003F0000003E00000043000000FFFFFFFF00000000FFFFFFFF0000000000010000D14498C10000803422C8163642259840020000003900000000010000000100000006000000000000003800000000010000000200000007000000000000000800000000000000000000005000000000000000010000000000000004000000020000003704030036040200E61B2DC1D26F80C0F2D1AB353AB6213CA2AFEC3E28C380C1D26F80C08424FF3540CD1D3EA2AFEC3E2CC380C1D36F80408624FF354CCD1D3E80C08D3CE81B2DC1D36F8040ECD1AB353AB6213C80C08D3C010C000000000000000100000000000000060000000100000015020100020003000000000001000200010500000000000000FFFFFFFF0000000000000000000000000000000000000000000000000000000000000000000000000000803F0000803F0000803F000020410000803FFFFFFFFF00000000FFFFFFFF0000FFFFFFFF00000000FFFFFFFFED1000FFFFFFFF00000000FFFFFFFF0104000000FFFFFFFF060000000100000003000000010000FFFFFFFF00000000FFFFFFFF04000900000001410000000032010000000000000000000000000000FFFFFFFF00000000FFFFFFFF0D000200000003000000010000000100000044000000FFFFFFFF1000705DD8B5B8C850C2F19C5ABC000080B4000080B3000080BF000080BF0000000000004034000080330000803F000000B40000803F050000003E0000003F000000400000004200000043000000FFFFFFFF00000000FFFFFFFF00000000000100001F5157C100008034397BD535D3B19940020000003D00000000010000000100000006000000000000003C0000000001000000020000000700000000000000080000000000000000000000FFFFFFFF00000000FFFFFFFF0800FFFFFFFF00000000FFFFFFFF0F000000000000000000FFFFFFFF10010000000000000000000000000000803F0000000000000000000000000000803F0000000000000000000000000000803F0000803F020000004600000047000000FFFFFFFF10000000450000003B00000037000000330000002F0000002B00000027000000230000001F0000001B00000017000000130000000F0000000B0000000700000003000000000000000100000048000000
  816. }
  817. FileCreateDir, %A_ScriptDir%\tmp
  818. FileCreateDir, %A_ScriptDir%\backup
  819. FileCreateDir, %A_ScriptDir%\output
  820. FileCreateDir, %A_ScriptDir%\tmp\images
  821. progress = 5
  822. progresstext = Generating needed images files.
  823. GuiControl,, progresstxt, %progresstext%
  824. GuiControl,, progressbar, %progress%
  825. GuiControl,, progressbar2, %progress%
  826. FileCopy, %DDSI512files%, %A_ScriptDir%\tmp\images\inlay_%guitarnamesix%_512.png
  827. FileCopy, %DDSI512files%, %A_ScriptDir%\tmp\images\inlay_%guitarnamesix%_256.png
  828. FileCopy, %DDSI512files%, %A_ScriptDir%\tmp\images\inlay_%guitarnamesix%_128.png
  829. FileCopy, %DDSI512files%, %A_ScriptDir%\tmp\images\inlay_%guitarnamesix%_64.png
  830. FileCopy, %DDSInlayfiles%, %A_ScriptDir%\tmp\images\inlay_%guitarnamesix%.png
  831. progress = 10
  832. progresstext = Converting image to proper size & format
  833. GuiControl,, progresstxt, %progresstext%
  834. GuiControl,, progressbar, %progress%
  835. GuiControl,, progressbar2, %progress%
  836. Runwait, %A_ScriptDir%\ressources\packer\nvdxt.exe -file "%A_ScriptDir%\tmp\images\inlay_%guitarnamesix%.*" -prescale 1024 512 -dxt5 -quality_highest -nomipmap -alpha -output "%A_ScriptDir%\tmp\images\inlay_%guitarnamesix%.dds",,Hide
  837. Runwait, %A_ScriptDir%\ressources\packer\nvdxt.exe -file "%A_ScriptDir%\tmp\images\inlay_%guitarnamesix%_512.*" -prescale 512 512 -dxt5 -quality_highest -nomipmap -alpha -output "%A_ScriptDir%\tmp\images\inlay_%guitarnamesix%_512.dds",,Hide
  838. Runwait, %A_ScriptDir%\ressources\packer\nvdxt.exe -file "%A_ScriptDir%\tmp\images\inlay_%guitarnamesix%_256.*" -prescale 256 256 -dxt5 -quality_highest -nomipmap -alpha -output "%A_ScriptDir%\tmp\images\inlay_%guitarnamesix%_256.dds",,Hide
  839. Runwait, %A_ScriptDir%\ressources\packer\nvdxt.exe -file "%A_ScriptDir%\tmp\images\inlay_%guitarnamesix%_128.*" -prescale 128 128 -dxt5 -quality_highest -nomipmap -alpha -output "%A_ScriptDir%\tmp\images\inlay_%guitarnamesix%_128.dds",,Hide
  840. Runwait, %A_ScriptDir%\ressources\packer\nvdxt.exe -file "%A_ScriptDir%\tmp\images\inlay_%guitarnamesix%_64.*" -prescale 64 64 -dxt5 -quality_highest -nomipmap -alpha -output "%A_ScriptDir%\tmp\images\inlay_%guitarnamesix%_64.dds",,Hide
  841.  
  842. progress = 20
  843. progresstext = Copying PSARC to Backup folder
  844. GuiControl,, progresstxt, %progresstext%
  845. GuiControl,, progressbar, %progress%
  846. GuiControl,, progressbar2, %progress%
  847. FileCopy, %A_ScriptDir%\backup\cache.psarc, %A_ScriptDir%\backup\cache.psarc.bak%ccg%
  848. FileCopy, %A_ScriptDir%\backup\guitars.psarc, %A_ScriptDir%\backup\guitars.psarc.bak%ccg%
  849. FileCopy, %A_ScriptDir%\backup\static.psarc, %A_ScriptDir%\backup\static.psarc.bak%ccg%
  850. FileCopy, %RS2014DIR%\cache.psarc, %A_ScriptDir%\backup\cache.psarc
  851. FileCopy, %RS2014DIR%\guitars.psarc, %A_ScriptDir%\backup\guitars.psarc
  852. FileCopy, %RS2014DIR%\static.psarc, %A_ScriptDir%\backup\static.psarc
  853. progress = 25
  854. progresstext = Unpacking Psarc to TMP folder & cleaning appid files.
  855. GuiControl,, progresstxt, %progresstext%
  856. GuiControl,, progressbar, %progress%
  857. GuiControl,, progressbar2, %progress%
  858. RunWait, %A_ScriptDir%\ressources\packer\packer.exe --unpack --input="%A_ScriptDir%\backup" --output="%A_ScriptDir%\tmp",,Hide
  859. FileDelete, %A_ScriptDir%\tmp\cache_Pc\appid.appid
  860. FileDelete, %A_ScriptDir%\tmp\guitars_Pc\appid.appid
  861. FileDelete, %A_ScriptDir%\tmp\static_Pc\appid.appid
  862. progress = 35
  863. progresstext = Modding Cache psarc sources to new ones.
  864. GuiControl,, progresstxt, %progresstext%
  865. GuiControl,, progressbar, %progress%
  866. GuiControl,, progressbar2, %progress%
  867. RunWait, %A_ScriptDir%\ressources\packer\7za.exe x "tmp\cache_Pc\cache4.7z" -o"tmp\cache_Pc\cache4",,Hide
  868. FileAppend, %ccg2%`,%guitarname%`,%guitarname%`,%guitarname%`,%guitarname%`,%guitarname%`,%guitarname%`,%guitarname%`n, %A_ScriptDir%\tmp\cache_Pc\cache4\localization\maingame.csv
  869. RunWait, %A_ScriptDir%\ressources\packer\7za.exe a "tmp\cache_Pc\cache4.7z" ."\tmp\cache_Pc\cache4\"*,,Hide
  870. RunWait, %A_ScriptDir%\ressources\packer\7za.exe x "tmp\cache_Pc\cache7.7z" -o"tmp\cache_Pc\cache7",,Hide
  871. FileRead, guitarshsan, %A_ScriptDir%\tmp\cache_Pc\cache7\manifests\guitars\guitars.hsan
  872. 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" : {
  873. FileDelete, %A_ScriptDir%\tmp\cache_Pc\cache7\manifests\guitars\guitars.hsan
  874. FileAppend, %guitarshsannew%, %A_ScriptDir%\tmp\cache_Pc\cache7\manifests\guitars\guitars.hsan
  875. RunWait, %A_ScriptDir%\ressources\packer\7za.exe a "tmp\cache_Pc\cache7.7z" ."\tmp\cache_Pc\cache7\"*,,Hide
  876. progress = 50
  877. progresstext = Modding Guitars psarc sources to new ones
  878. GuiControl,, progresstxt, %progresstext%
  879. GuiControl,, progressbar, %progress%
  880. GuiControl,, progressbar2, %progress%
  881. 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
  882. FileAppend, %newfilesjson%, %A_ScriptDir%\tmp\guitars_Pc\manifests\guitars\guitar_%guitarnamesix%.json
  883. FileRead, guitarshsan2, %A_ScriptDir%\tmp\guitars_Pc\manifests\guitars\guitars.hsan
  884. 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" : {
  885. FileDelete, %A_ScriptDir%\tmp\guitars_Pc\manifests\guitars\guitars.hsan
  886. FileAppend, %guitarshsannew2%, %A_ScriptDir%\tmp\guitars_Pc\manifests\guitars\guitars.hsan
  887. 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
  888. FileAppend, %newfilesxblock%, %A_ScriptDir%\tmp\guitars_Pc\gamexblocks\nguitars\guitar_%guitarnamesix%.xblock
  889. FileCopy, %A_ScriptDir%\tmp\images\inlay_%guitarnamesix%.dds, %A_ScriptDir%\tmp\guitars_Pc\assets\gameplay\inlay\inlay_%guitarnamesix%.dds
  890. TestString = inlay_%guitarnamesix%.dds
  891. Output := StringToHex(TestString)
  892. Ootput = %Output%
  893. newhexname = %Output%
  894. StringReplace newhexname, newhexname, %A_Space%, , All
  895. filenifname = %guitarnamesix%.nif
  896. StringToHex(String)
  897. {
  898. local Old_A_FormatInteger, CharHex, HexString
  899.  
  900. ;Return '0' if the string was blank
  901. If !String
  902. Return 0
  903.  
  904. ;Save the current Integer format
  905. Old_A_FormatInteger := A_FormatInteger
  906.  
  907. ;Set the format of integers to their Hex value
  908. SetFormat, INTEGER, H
  909.  
  910. ;Parse the String
  911. Loop, Parse, String
  912. {
  913. ;Get the ASCII value of the Character (will be converted to the Hex value by the SetFormat Line above)
  914. CharHex := Asc(A_LoopField)
  915.  
  916. ;Comment out the following line to leave the '0x' intact
  917. StringTrimLeft, CharHex, CharHex, 2
  918.  
  919. ;Build the return string
  920. HexString .= CharHex . " "
  921. }
  922. ;Set the integer format to what is was prior to the call
  923. SetFormat, INTEGER, %Old_A_FormatInteger%
  924.  
  925. ;Return the string to the caller
  926. Return HexString
  927. }
  928. /*
  929. BinReadWrite.ahk
  930.  
  931. Routines to read and write binary data from/to files.
  932. Based on original functions written by Laszlo
  933. http://www.autohotkey.com/forum/viewtopic.php?t=4604
  934.  
  935. TODO: Perhaps set a lastError variable to explicit the errors.
  936.  
  937. // by Philippe Lhoste <PhiLho(a)GMX.net> http://Phi.Lho.free.fr
  938. // File/Project history:
  939. 1.03.000 -- 2006/02/15 (PL) -- Moved Bin2Hex & Hex2Bin to DllCallStruct, apply code rules.
  940. 1.02.000 -- 2006/01/24 (PL) -- Slight change of the API: all functions return -1 if error.
  941. Integrated Laszlo suggestions on improving Bin2Hex and Hex2Bin.
  942. 1.01.000 -- 2006/01/23 (PL) -- Declaration of the local variables, to get access to global
  943. WinAPI constants, and for consistency.
  944. 1.00.000 -- 2006/01/19 (PL) -- Rewrote the functions to separate opening and closing,
  945. allowing efficient multiple operations.
  946. */
  947.  
  948. ; WinAPI constants
  949. INVALID_HANDLE_VALUE = -1
  950. INVALID_FILE_SIZE = 0xFFFFFFFF
  951. FILE_BEGIN = 0
  952. FILE_CURRENT = 1
  953. FILE_END = 2
  954.  
  955. /*
  956. // Open the file for reading.
  957. // Return the file handle to provide in further read operations and in the final close operation,
  958. // or INVALID_HANDLE_VALUE if an error was found.
  959. */
  960. OpenFileForRead(_filename)
  961. {
  962. local handle
  963.  
  964. handle := DllCall("CreateFile"
  965. , "Str", _filename ; lpFileName
  966. , "UInt", 0x80000000 ; dwDesiredAccess (GENERIC_READ)
  967. , "UInt", 3 ; dwShareMode (FILE_SHARE_READ|FILE_SHARE_WRITE)
  968. , "UInt", 0 ; lpSecurityAttributes
  969. , "UInt", 3 ; dwCreationDisposition (OPEN_EXISTING)
  970. , "UInt", 0 ; dwFlagsAndAttributes
  971. , "UInt", 0) ; hTemplateFile
  972. If (handle = INVALID_HANDLE_VALUE or handle = 0)
  973. {
  974. ErrorLevel = -1
  975. }
  976. IfNotEqual ErrorLevel, 0, Return INVALID_HANDLE_VALUE ; Couldn't open the file
  977. Return handle
  978. }
  979.  
  980. /*
  981. // Open the file for writing.
  982. // Return the file handle to provide in further write operations and in the final close operation,
  983. // or INVALID_HANDLE_VALUE if an error was found.
  984. */
  985. OpenFileForWrite(_filename)
  986. {
  987. local handle
  988.  
  989. handle := DllCall("CreateFile"
  990. , "Str", _filename ; lpFileName
  991. , "UInt", 0x40000000 ; dwDesiredAccess (GENERIC_WRITE)
  992. , "UInt", 3 ; dwShareMode (FILE_SHARE_READ|FILE_SHARE_WRITE)
  993. , "UInt", 0 ; lpSecurityAttributes
  994. , "UInt", 4 ; dwCreationDisposition (OPEN_ALWAYS: create if not exists)
  995. , "UInt", 0 ; dwFlagsAndAttributes
  996. , "UInt", 0) ; hTemplateFile
  997. If (handle = INVALID_HANDLE_VALUE or handle = 0)
  998. {
  999. ErrorLevel = -1
  1000. }
  1001. IfNotEqual ErrorLevel, 0, Return INVALID_HANDLE_VALUE ; Couldn't open the file
  1002. Return handle
  1003. }
  1004.  
  1005. /*
  1006. // Close the file.
  1007. */
  1008. CloseFile(_handle)
  1009. {
  1010. local result
  1011.  
  1012. result := DllCall("CloseHandle"
  1013. , "UInt", _handle)
  1014. If (result = 0)
  1015. {
  1016. ErrorLevel = -1
  1017. }
  1018. }
  1019.  
  1020. /*
  1021. // Get the size of the opened file, in bytes.
  1022. // Limited to 4GB, so it is more limited that AHK's FileGetSize.
  1023. // It is here for consistency, and because it accepts a file handle instead of a path.
  1024. //
  1025. // Return the size in bytes, -1 if there was an error.
  1026. */
  1027. GetFileSize(_handle)
  1028. {
  1029. local fileSize
  1030.  
  1031. fileSize := DllCall("GetFileSize"
  1032. , "UInt", _handle
  1033. , "UInt", 0)
  1034. If (fileSize = INVALID_FILE_SIZE)
  1035. {
  1036. ErrorLevel = -1
  1037. }
  1038. IfNotEqual ErrorLevel, 0, Return -1
  1039. Return fileSize
  1040. }
  1041.  
  1042. /*
  1043. // Move the file pointer in the file to the given offset relative to moveMethod.
  1044. //
  1045. // moveMethod can be FILE_BEGIN, FILE_CURRENT or FILE_END.
  1046. // If moveMethod is -1, nothing is done (default, for operations at current position).
  1047. // To get the current position, call this function with just FILE_CURRENT (null offset).
  1048. // offset can be positive (toward end of the file) or negative (toward start of the file).
  1049. //
  1050. // Return -1 if there was an error, the new file pointer position if OK.
  1051. // Note: Currently it doesn't work for files larger than 2GB...
  1052. */
  1053. MoveInFile(_handle, _moveMethod=-1, _offset=0)
  1054. {
  1055. local result
  1056.  
  1057. result = %INVALID_FILE_SIZE%
  1058. if (_moveMethod != -1)
  1059. {
  1060. result := DllCall("SetFilePointer"
  1061. , "UInt", _handle ; hFile
  1062. , "Int", _offset ; lDistanceToMove
  1063. , "UInt", 0 ; lpDistanceToMoveHigh
  1064. , "UInt", _moveMethod) ; dwMoveMethod
  1065. if (result = -1) ; INVALID_SET_FILE_POINTER
  1066. {
  1067. ErrorLevel = -1
  1068. }
  1069. IfNotEqual ErrorLevel, 0, Return -1 ; Couldn't make the move
  1070. }
  1071. Return result
  1072. }
  1073.  
  1074. /*
  1075. // Write in a file opened for writing.
  1076. //
  1077. // Move to position given by moveMethod and offset
  1078. // (by default stand at current position) and
  1079. // write byteNb bytes from data (all data if byteNb = 0;
  1080. // data contains binary bytes that can be a string or
  1081. // raw bytes generated from hexa data with the Hex2Bin routine).
  1082. //
  1083. // moveMethod, defaulting to -1 (no move, write at current position),
  1084. // can also be FILE_BEGIN, FILE_CURRENT or FILE_END.
  1085. // offset can be positive (toward end of file) or negative (toward beginning of file).
  1086. //
  1087. // Return the number of bytes written (-1 if there was an error).
  1088. */
  1089. WriteInFile(_handle, ByRef @data, _byteNb=0, _moveMethod=-1, _offset=0)
  1090. {
  1091. local dataSize, result, written
  1092.  
  1093. _offset := MoveInFile(_handle, _moveMethod, _offset)
  1094. IfNotEqual ErrorLevel, 0, Return -1 ; Couldn't make the move
  1095.  
  1096. dataSize := VarSetCapacity(@data) ; Get the capacity (>= used length!)
  1097. If (_byteNb < 1 or _byteNb > dataSize)
  1098. {
  1099. byteNb := dataSize
  1100. }
  1101. result := DllCall("WriteFile"
  1102. , "UInt", _handle ; hFile
  1103. , "Str", @data ; lpBuffer
  1104. , "UInt", _byteNb ; nNumberOfBytesToWrite
  1105. , "UInt *", written ; lpNumberOfBytesWritten
  1106. , "UInt", 0) ; lpOverlapped
  1107. if (result = 0 or written < _byteNb)
  1108. {
  1109. ErrorLevel = -2
  1110. }
  1111. IfNotEqual ErrorLevel, 0, Return -1 ; Couldn't write in the file
  1112. Return written
  1113. }
  1114.  
  1115. /*
  1116. // Read from a file opened for reading.
  1117. //
  1118. // Move to position given by moveMethod and offset
  1119. // (by default stand at current position) and
  1120. // read byteNb bytes in data (the whole file if byteNb = 0;
  1121. // data contains binary bytes that can be a string or
  1122. // raw bytes that can be converted to hex digits with the Bin2Hex routine).
  1123. //
  1124. // moveMethod, defaulting to -1 (no move, read at current position),
  1125. // can also be FILE_BEGIN, FILE_CURRENT or FILE_END.
  1126. // offset can be positive (toward end of file) or negative (toward beginning of file).
  1127. //
  1128. // Return the number of bytes read (-1 if there was an error), which can be less
  1129. // than requested if end-of-file is meet.
  1130. */
  1131. ReadFromFile(_handle, ByRef @data, _byteNb=0, _moveMethod=-1, _offset=0)
  1132. {
  1133. local fileSize, granted, result, read
  1134.  
  1135. _offset := MoveInFile(_handle, _moveMethod, _offset)
  1136. IfNotEqual ErrorLevel, 0, Return -1 ; Couldn't make the move
  1137.  
  1138. if (_byteNb = 0)
  1139. {
  1140. ; Read whole file (or less if file pointer isn't at start)
  1141. fileSize := GetFileSize(_handle)
  1142. IfNotEqual ErrorLevel, 0, Return -1 ; Couldn't get the file size
  1143. _byteNb := fileSize
  1144. }
  1145. granted := VarSetCapacity(@data, _byteNb, 0)
  1146. if (granted < _byteNb)
  1147. {
  1148. ; Cannot allocate enough memory
  1149. ErrorLevel = Mem=%granted%
  1150. Return -1
  1151. }
  1152.  
  1153. result := DllCall("ReadFile"
  1154. , "UInt", _handle ; hFile
  1155. , "Str", @data ; lpBuffer
  1156. , "UInt", _byteNb ; nNumberOfBytesToRead
  1157. , "UInt *", read ; lpNumberOfBytesRead
  1158. , "UInt", 0) ; lpOverlapped
  1159. if (result = 0)
  1160. {
  1161. ErrorLevel = -2
  1162. }
  1163. ;~ MsgBox fileSize: %fileSize% - offset: %_offset% - byteNb: %_byteNb% - granted: %granted% - read: %read%
  1164. IfNotEqual ErrorLevel, 0, Return -1 ; Couldn't read the file
  1165.  
  1166. ; Note that we can have read less data than requested,
  1167. ; eg. if end of file has been meet
  1168. Return read
  1169. }
  1170. /*
  1171. // Convert raw bytes stored in a variable to a string of hexa digit pairs.
  1172. // Convert either byteNb bytes or, if null, the whole content of the variable.
  1173. //
  1174. // Return the number of converted bytes, or -1 if error (memory allocation)
  1175. */
  1176. Bin2Hex(ByRef @hex, ByRef @bin, _byteNb=0)
  1177. {
  1178. local intFormat, dataSize, dataAddress, granted, x
  1179.  
  1180. ; Save original integer format
  1181. intFormat = %A_FormatInteger%
  1182. ; For converting bytes to hex
  1183. SetFormat Integer, Hex
  1184.  
  1185. ; Get size of data
  1186. dataSize := VarSetCapacity(@bin)
  1187. If (_byteNb < 1 or _byteNb > dataSize)
  1188. {
  1189. _byteNb := dataSize
  1190. }
  1191. dataAddress := &@bin
  1192. ; Make enough room (faster)
  1193. granted := VarSetCapacity(@hex, _byteNb * 2)
  1194. if (granted < _byteNb * 2)
  1195. {
  1196. ; Cannot allocate enough memory
  1197. ErrorLevel = Mem=%granted%
  1198. Return -1
  1199. }
  1200. Loop %_byteNb%
  1201. {
  1202. ; Get byte in hexa
  1203. x := *dataAddress + 0x100
  1204. StringRight x, x, 2 ; 2 hex digits
  1205. StringUpper x, x
  1206. @hex = %@hex%%x%
  1207. dataAddress++ ; Next byte
  1208. }
  1209. ; Restore original integer format
  1210. SetFormat Integer, %intFormat%
  1211.  
  1212. Return _byteNb
  1213. }
  1214.  
  1215. /*
  1216. // Convert a string of hexa digit pairs to raw bytes stored in a variable.
  1217. // Convert either byteNb bytes or, if null, the whole content of the variable.
  1218. //
  1219. // Return the number of converted bytes, or -1 if error (memory allocation)
  1220. */
  1221. Hex2Bin(ByRef @bin, _hex, _byteNb=0)
  1222. {
  1223. local dataSize, granted, dataAddress, x
  1224.  
  1225. ; Get size of data
  1226. x := StrLen(_hex)
  1227. dataSize := Ceil(x / 2)
  1228. if (x = 0 or dataSize * 2 != x)
  1229. {
  1230. ; Invalid string, empty or odd number of digits
  1231. ErrorLevel = Param
  1232. Return -1
  1233. }
  1234. If (_byteNb < 1 or _byteNb > dataSize)
  1235. {
  1236. _byteNb := dataSize
  1237. }
  1238. ; Make enough room
  1239. granted := VarSetCapacity(@bin, _byteNb, 0)
  1240. if (granted < _byteNb)
  1241. {
  1242. ; Cannot allocate enough memory
  1243. ErrorLevel = Mem=%granted%
  1244. Return -1
  1245. }
  1246. dataAddress := &@bin
  1247.  
  1248. Loop Parse, _hex
  1249. {
  1250. if (A_Index & 1) ; Odd
  1251. {
  1252. x = %A_LoopField% ; Odd digit
  1253. }
  1254. else
  1255. {
  1256. ; Concatenate previous x and even digit, converted to hex
  1257. x := "0x" . x . A_LoopField
  1258. ; Store integer in memory
  1259. DllCall("RtlFillMemory"
  1260. , "UInt", dataAddress
  1261. , "UInt", 1
  1262. , "UChar", x)
  1263. dataAddress++
  1264. }
  1265. }
  1266.  
  1267. Return _byteNb
  1268. }
  1269. HexString=
  1270. ( Join
  1271. %nif1%%newhexname%%nif2%
  1272. )
  1273. Tfh := OpenFileForWrite(filenifname)
  1274. l := Hex2Bin(data, HexString)
  1275. WriteInFile(Tfh, data, l)
  1276. CloseFile(Tfh)
  1277. FileCopy,%A_ScriptDir%\%filenifname%, %A_ScriptDir%\tmp\guitars_Pc\assets\gameplay\inlay\%filenifname%
  1278. FileDelete,%A_ScriptDir%\%filenifname%
  1279. progress = 80
  1280. progresstext = Modding Static PSARC sources to new ones
  1281. GuiControl,, progresstxt, %progresstext%
  1282. GuiControl,, progressbar, %progress%
  1283. GuiControl,, progressbar2, %progress%
  1284. FileAppend, %ccg2%`,%guitarname%`,%guitarname%`,%guitarname%`,%guitarname%`,%guitarname%`,%guitarname%`,%guitarname%`n, %A_ScriptDir%\tmp\static_Pc\localization\maingame.csv
  1285. FileCopy, %A_ScriptDir%\tmp\images\inlay_%guitarnamesix%_512.dds, %A_ScriptDir%\tmp\static_Pc\gfxassets\rewards\guitar_inlays\reward_inlay_%guitarnamesix%_512.dds
  1286. FileCopy, %A_ScriptDir%\tmp\images\inlay_%guitarnamesix%_256.dds, %A_ScriptDir%\tmp\static_Pc\gfxassets\rewards\guitar_inlays\reward_inlay_%guitarnamesix%_256.dds
  1287. FileCopy, %A_ScriptDir%\tmp\images\inlay_%guitarnamesix%_128.dds, %A_ScriptDir%\tmp\static_Pc\gfxassets\rewards\guitar_inlays\reward_inlay_%guitarnamesix%_128.dds
  1288. FileCopy, %A_ScriptDir%\tmp\images\inlay_%guitarnamesix%_64.dds, %A_ScriptDir%\tmp\static_Pc\gfxassets\rewards\guitar_inlays\reward_inlay_%guitarnamesix%_64.dds
  1289. progress = 90
  1290. progresstext = Packing new psarc to output folder
  1291. GuiControl,, progresstxt, %progresstext%
  1292. GuiControl,, progressbar, %progress%
  1293. GuiControl,, progressbar2, %progress%
  1294. FileRemoveDir, %A_ScriptDir%\tmp\cache_Pc\cache7, 1
  1295. FileRemoveDir, %A_ScriptDir%\tmp\cache_Pc\cache4, 1
  1296. FileCopy, %A_ScriptDir%\output\cache.psarc, %A_ScriptDir%\output\cache.psarc.bak%ccg%
  1297. FileCopy, %A_ScriptDir%\output\guitars.psarc, %A_ScriptDir%\output\guitars.psarc.bak%ccg%
  1298. FileCopy, %A_ScriptDir%\output\static.psarc, %A_ScriptDir%\output\static.psarc.bak%ccg%
  1299.  
  1300. RunWait, %A_ScriptDir%\ressources\packer\packer.exe --pack --input="%A_ScriptDir%\tmp\cache_Pc" --output="%A_ScriptDir%\output\cache.psarc",,Hide
  1301. sleep 600
  1302. RunWait, %A_ScriptDir%\ressources\packer\packer.exe --pack --input="%A_ScriptDir%\tmp\guitars_Pc" --output="%A_ScriptDir%\output\guitars.psarc",,Hide
  1303. sleep 600
  1304. RunWait, %A_ScriptDir%\ressources\packer\packer.exe --pack --input="%A_ScriptDir%\tmp\static_Pc" --output="%A_ScriptDir%\output\static.psarc",,Hide
  1305. FileRemoveDir, %A_ScriptDir%\tmp, 1
  1306. progress = 98
  1307. progresstext = Generating required files.
  1308. GuiControl,, progresstxt, %progresstext%
  1309. GuiControl,, progressbar, %progress%
  1310. GuiControl,, progressbar2, %progress%
  1311. IniWrite, %RS2014DIR%, CustomGuitarList.ini, Rocksmith2014Directory, Rocksmith2014dir
  1312. IniWrite, %ccg2% - %guitarname%, CustomGuitarList.ini, GuitarList, %ID1%
  1313. IniWrite, %ID1%, CustomGuitarList.ini, CustomGuitarMasterID, MasterID%ccg%
  1314. IniWrite, %ccg2%, CustomGuitarList.ini, CustomGuitarLinkToID, %ID1%
  1315. IniWrite, %guitarname%, CustomGuitarList.ini, CustomGuitarNameList, Guitar%ccg%
  1316. ccg++
  1317. ccg2++
  1318. IniWrite, %ccg%, CustomGuitarList.ini, NumberInstance, NumberSet
  1319. IniWrite, %ccg2%, CustomGuitarList.ini, NumberInstance, NumberGuitar
  1320. progress = 100
  1321. progresstext = Work done check %A_ScriptDir%\output folder for your new PSARC
  1322. GuiControl,, progresstxt, %progresstext%
  1323. GuiControl,, progressbar, %progress%
  1324. msgbox, Package created.`nTest ingame before creating any other.`nAs the soft make new package from one of Rocksmith 2014 directory if it make from a conrupted files it can't work.`n Enjoy :)
  1325. GuiControl,, progressbar, %progress%
  1326. GuiControl, enable, RS2014DB
  1327. GuiControl, enable, newinlay
  1328. GuiControl, enable, newicon
  1329. GuiControl, enable, coloredinlay
  1330. GuiControl, enable, newenglishname
  1331. GuiControl, enable, newfrenchname
  1332. GuiControl, enable, newspanishname
  1333. GuiControl, enable, newitalianname
  1334. GuiControl, enable, newgermanname
  1335. GuiControl, enable, newjapanesename
  1336. GuiControl, enable, getemplateB
  1337. GuiControl, enable, aboutB
  1338. GuiControl, enable, parseB
  1339. GuiControl, enable, lg
  1340. GuiControl, enable, sg
  1341. GuiControl, enable, creatorname
  1342. progress = 0
  1343. GuiControl,, progressbar, %progress%
  1344. IDString = a0b1c2d3e4f5a6b7c8d9e0f
  1345. Random, RDM1, 0x00F000000, 0x00fffffff
  1346. ID1 = %IDString%%RDM1%
  1347. StringUpper, ID1MAJ, ID1
  1348. GuiControl,, idmaster, %ID1MAJ%
  1349. GuiControl,, guitarid, %ccg2%
  1350. return
  1351.  
  1352. GuiClose:
  1353. FileRemoveDir, %A_ScriptDir%\tmp, 1
  1354. FileRemoveDir, %A_ScriptDir%\ressources, 1
  1355. ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement