Baoulettes

Rocksmith 2014 Guitars Maker (ui) V2.0.0.0b2

Dec 15th, 2013
1,196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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, 3
  194. Gui, Add, Picture, x2 y39 w820 h170 , %A_ScriptDir%\ressources\images\rocksmith_2014_logo_graded.png
  195. Gui, Add, Picture, gbaousmithy x142 y279 w100 h100 , %A_ScriptDir%\ressources\images\avatar.gif
  196. 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!
  197. Gui, Font, S45 C2a2a2a
  198. Gui, Add, Text,gbaousmithy2 x252 y299 w400 h60, %A_Space%%A_Space%Baoulettes
  199. Gui, Font, S08 C000000
  200. Gui, Add, Picture, gfacebookbaou x592 y279 w100 h100 , %A_ScriptDir%\ressources\images\facebook_icon.png
  201. Gui, Add, Progress,vprogressbar2 x12 y518 w680 h30 , %progress%
  202. return
  203. Tab:
  204. GuiControlGet, Tab
  205. Gui, Color, % TabColors_Tab%Tab%
  206. return
  207.  
  208. getemplate:
  209. MsgBox, 4, , This will open your browser.`nWant to continue?,
  210. IfMsgBox, Yes
  211. run, http://s21.postimg.org/7ce6pru3b/Cadrillage_2.png
  212. return
  213.  
  214. baousmithy:
  215. MsgBox, 4, , This will open your browser.`nWant to continue?,
  216. IfMsgBox, Yes
  217. run, http://forums.smithyanvil.com/profile.php?id=319
  218. return
  219.  
  220. baousmithy2:
  221. MsgBox, 4, , This will open your browser.`nWant to continue?,
  222. IfMsgBox, Yes
  223. run, http://forums.smithyanvil.com/profile.php?id=319
  224. return
  225.  
  226. facebookbaou:
  227. MsgBox, 4, , This will open your browser.`nWant to continue?,
  228. IfMsgBox, Yes
  229. run, https://www.facebook.com/pages/Baoulettes/258752740926874
  230. return
  231.  
  232.  
  233. Refreshmahname:
  234. GuiControlGet, newenglishname
  235. GuiControl,, defaultname, %newenglishname%
  236. return
  237.  
  238. RS2014D:
  239. GuiControl, disable, RS2014DB
  240. GuiControl, disable, newinlay
  241. GuiControl, disable, newicon
  242. GuiControl, disable, coloredinlay
  243. GuiControl, disable, getemplateB
  244. GuiControl, disable, newenglishname
  245. GuiControl, disable, newfrenchname
  246. GuiControl, disable, newspanishname
  247. GuiControl, disable, newitalianname
  248. GuiControl, disable, newgermanname
  249. GuiControl, disable, newjapanesename
  250. GuiControl, disable, creatorname
  251. GuiControl, disable, parseB
  252. GuiControl, disable, lg
  253. GuiControl, disable, sg
  254. FileSelectFolder, RS2014DIR,, 3, Select Rocksmith 2014 Installation folder.
  255. IniWrite, %RS2014DIR%, CustomGuitarList.ini, Rocksmith2014Directory, Rocksmith2014dir
  256. If RS2014DIR = ERROR
  257. {
  258.     RS2014DIR = Undefinied.
  259.     GuiControl,, rs2014dirtext, %RS2014DIR%
  260.     GuiControl, enable, RS2014DB
  261. GuiControl, enable, newinlay
  262. GuiControl, enable, newicon
  263. GuiControl, enable, coloredinlay
  264. GuiControl, enable, newenglishname
  265. GuiControl, enable, newfrenchname
  266. GuiControl, enable, newspanishname
  267. GuiControl, enable, newitalianname
  268. GuiControl, enable, newgermanname
  269. GuiControl, enable, newjapanesename
  270. GuiControl, enable, getemplateB
  271. GuiControl, enable, creatorname
  272. GuiControl, enable, parseB
  273. GuiControl, enable, lg
  274. GuiControl, enable, sg
  275. } else {
  276.     GuiControl,, rs2014dirtext, %RS2014DIR%
  277.     GuiControl, enable, RS2014DB
  278. GuiControl, enable, newinlay
  279. GuiControl, enable, newicon
  280. GuiControl, enable, coloredinlay
  281. GuiControl, enable, newenglishname
  282. GuiControl, enable, newfrenchname
  283. GuiControl, enable, newspanishname
  284. GuiControl, enable, newitalianname
  285. GuiControl, enable, newgermanname
  286. GuiControl, enable, newjapanesename
  287. GuiControl, enable, getemplateB
  288. GuiControl, enable, creatorname
  289. GuiControl, enable, parseB
  290. GuiControl, enable, lg
  291. GuiControl, enable, sg
  292. }
  293. If RS2014DIR =
  294. {
  295.     RS2014DIR = Undefinied.
  296.     GuiControl,, rs2014dirtext, %RS2014DIR%
  297.     GuiControl, enable, RS2014DB
  298. GuiControl, enable, newinlay
  299. GuiControl, enable, newicon
  300. GuiControl, enable, coloredinlay
  301. GuiControl, enable, newenglishname
  302. GuiControl, enable, newfrenchname
  303. GuiControl, enable, newspanishname
  304. GuiControl, enable, newitalianname
  305. GuiControl, enable, newgermanname
  306. GuiControl, enable, newjapanesename
  307. GuiControl, enable, getemplateB
  308. GuiControl, enable, creatorname
  309. GuiControl, enable, parseB
  310. GuiControl, enable, lg
  311. GuiControl, enable, sg
  312. } else {
  313.     GuiControl,, rs2014dirtext, %RS2014DIR%
  314.     GuiControl, enable, RS2014DB
  315. GuiControl, enable, newinlay
  316. GuiControl, enable, newicon
  317. GuiControl, enable, coloredinlay
  318. GuiControl, enable, newenglishname
  319. GuiControl, enable, newfrenchname
  320. GuiControl, enable, newspanishname
  321. GuiControl, enable, newitalianname
  322. GuiControl, enable, newgermanname
  323. GuiControl, enable, newjapanesename
  324. GuiControl, enable, getemplateB
  325. GuiControl, enable, creatorname
  326. GuiControl, enable, parseB
  327. GuiControl, enable, lg
  328. GuiControl, enable, sg
  329. }
  330. return
  331.  
  332. newiconfiles:
  333. GuiControl, disable, RS2014DB
  334. GuiControl, disable, newinlay
  335. GuiControl, disable, newicon
  336. GuiControl, disable, coloredinlay
  337. GuiControl, disable, getemplateB
  338. GuiControl, disable, newenglishname
  339. GuiControl, disable, newfrenchname
  340. GuiControl, disable, newspanishname
  341. GuiControl, disable, newitalianname
  342. GuiControl, disable, newgermanname
  343. GuiControl, disable, newjapanesename
  344. GuiControl, disable, parseB
  345. GuiControl, disable, creatorname
  346. GuiControl, disable, lg
  347. GuiControl, disable, sg
  348. FileSelectFile, DDSI512files, 3, , Open a Icon 512x512 Image, Rocksmith 2014 Icon 512x512 Image files (*.tga; *.png)
  349. If DDSI512files =
  350. {
  351.     DDSI512files = %A_ScriptDir%\ressources\images\icon.png
  352.     GuiControl,, newicon, %DDSI512files%
  353.     GuiControl, enable, RS2014DB
  354. GuiControl, enable, newinlay
  355. GuiControl, enable, newicon
  356. GuiControl, enable, coloredinlay
  357. GuiControl, enable, newenglishname
  358. GuiControl, enable, newfrenchname
  359. GuiControl, enable, newspanishname
  360. GuiControl, enable, newitalianname
  361. GuiControl, enable, newgermanname
  362. GuiControl, enable, newjapanesename
  363. GuiControl, enable, getemplateB
  364. GuiControl, enable, parseB
  365. GuiControl, enable, creatorname
  366. GuiControl, enable, lg
  367. GuiControl, enable, sg
  368. } else {
  369.     GuiControl,, newicon, %DDSI512files%
  370.     GuiControl, enable, RS2014DB
  371. GuiControl, enable, newinlay
  372. GuiControl, enable, newicon
  373. GuiControl, enable, coloredinlay
  374. GuiControl, enable, newenglishname
  375. GuiControl, enable, newfrenchname
  376. GuiControl, enable, newspanishname
  377. GuiControl, enable, newitalianname
  378. GuiControl, enable, newgermanname
  379. GuiControl, enable, newjapanesename
  380. GuiControl, enable, getemplateB
  381. GuiControl, enable, parseB
  382. GuiControl, enable, creatorname
  383. GuiControl, enable, lg
  384. GuiControl, enable, sg
  385. }
  386. If DDSI512files = ERROR
  387. {
  388.     DDSI512files = %A_ScriptDir%\ressources\images\icon.png
  389.     GuiControl,, newicon, %DDSI512files%
  390.     GuiControl, enable, RS2014DB
  391. GuiControl, enable, newinlay
  392. GuiControl, enable, newicon
  393. GuiControl, enable, coloredinlay
  394. GuiControl, enable, newenglishname
  395. GuiControl, enable, newfrenchname
  396. GuiControl, enable, newspanishname
  397. GuiControl, enable, newitalianname
  398. GuiControl, enable, newgermanname
  399. GuiControl, enable, newjapanesename
  400. GuiControl, enable, getemplateB
  401. GuiControl, enable, parseB
  402. GuiControl, enable, lg
  403. GuiControl, enable, creatorname
  404. GuiControl, enable, sg
  405. } else {
  406.     GuiControl,, newicon, %DDSI512files%
  407.     GuiControl, enable, RS2014DB
  408. GuiControl, enable, newinlay
  409. GuiControl, enable, newicon
  410. GuiControl, enable, coloredinlay
  411. GuiControl, enable, newenglishname
  412. GuiControl, enable, newfrenchname
  413. GuiControl, enable, newspanishname
  414. GuiControl, enable, newitalianname
  415. GuiControl, enable, newgermanname
  416. GuiControl, enable, newjapanesename
  417. GuiControl, enable, getemplateB
  418. GuiControl, enable, parseB
  419. GuiControl, enable, creatorname
  420. GuiControl, enable, lg
  421. GuiControl, enable, sg
  422. }
  423. return
  424.  
  425. newinlayfiles:
  426. GuiControl, disable, RS2014DB
  427. GuiControl, disable, newinlay
  428. GuiControl, disable, newicon
  429. GuiControl, disable, coloredinlay
  430. GuiControl, disable, getemplateB
  431. GuiControl, disable, newenglishname
  432. GuiControl, disable, newfrenchname
  433. GuiControl, disable, newspanishname
  434. GuiControl, disable, newitalianname
  435. GuiControl, disable, newgermanname
  436. GuiControl, disable, newjapanesename
  437. GuiControl, disable, parseB
  438. GuiControl, disable, lg
  439. GuiControl, disable, sg
  440. GuiControl, disable, creatorname
  441. FileSelectFile, DDSInlayfiles, 3, , Open a Inlay Image, Rocksmith 2014 Inlay Image files (*.tga; *.png)
  442. If DDSInlayfiles =
  443. {
  444.     DDSInlayfiles = %A_ScriptDir%\ressources\images\inlay_preview.png
  445.     GuiControl,, newinlay, %DDSInlayfiles%
  446.     GuiControl, enable, RS2014DB
  447. GuiControl, enable, newinlay
  448. GuiControl, enable, newicon
  449. GuiControl, enable, coloredinlay
  450. GuiControl, enable, newenglishname
  451. GuiControl, enable, newfrenchname
  452. GuiControl, enable, newspanishname
  453. GuiControl, enable, newitalianname
  454. GuiControl, enable, newgermanname
  455. GuiControl, enable, newjapanesename
  456. GuiControl, enable, getemplateB
  457. GuiControl, enable, creatorname
  458. GuiControl, enable, parseB
  459. GuiControl, enable, lg
  460. GuiControl, enable, sg
  461. } else {
  462.     GuiControl,, newinlay, %DDSInlayfiles%
  463.     GuiControl, enable, RS2014DB
  464. GuiControl, enable, newinlay
  465. GuiControl, enable, newicon
  466. GuiControl, enable, coloredinlay
  467. GuiControl, enable, newenglishname
  468. GuiControl, enable, newfrenchname
  469. GuiControl, enable, newspanishname
  470. GuiControl, enable, newitalianname
  471. GuiControl, enable, newgermanname
  472. GuiControl, enable, newjapanesename
  473. GuiControl, enable, getemplateB
  474. GuiControl, enable, parseB
  475. GuiControl, enable, lg
  476. GuiControl, enable, sg
  477. GuiControl, enable, creatorname
  478. }
  479. If DDSInlayfiles = ERROR
  480. {
  481.     DDSInlayfiles = %A_ScriptDir%\ressources\images\inlay_preview.png
  482.     GuiControl,, newinlay, %DDSInlayfiles%
  483.     GuiControl, enable, RS2014DB
  484. GuiControl, enable, newinlay
  485. GuiControl, enable, newicon
  486. GuiControl, enable, coloredinlay
  487. GuiControl, enable, newenglishname
  488. GuiControl, enable, newfrenchname
  489. GuiControl, enable, newspanishname
  490. GuiControl, enable, newitalianname
  491. GuiControl, enable, newgermanname
  492. GuiControl, enable, newjapanesename
  493. GuiControl, enable, getemplateB
  494. GuiControl, enable, parseB
  495. GuiControl, enable, lg
  496. GuiControl, enable, sg
  497. GuiControl, enable, creatorname
  498. } else {
  499.     GuiControl,, newinlay, %DDSInlayfiles%
  500.     GuiControl, enable, RS2014DB
  501. GuiControl, enable, newinlay
  502. GuiControl, enable, newicon
  503. GuiControl, enable, coloredinlay
  504. GuiControl, enable, newenglishname
  505. GuiControl, enable, newfrenchname
  506. GuiControl, enable, newspanishname
  507. GuiControl, enable, newitalianname
  508. GuiControl, enable, newgermanname
  509. GuiControl, enable, newjapanesename
  510. GuiControl, enable, getemplateB
  511. GuiControl, enable, parseB
  512. GuiControl, enable, lg
  513. GuiControl, enable, sg
  514. GuiControl, enable, creatorname
  515. }
  516. return
  517.  
  518. loadguitar:
  519. GuiControl, disable, RS2014DB
  520. GuiControl, disable, newinlay
  521. GuiControl, disable, newicon
  522. GuiControl, disable, coloredinlay
  523. GuiControl, disable, getemplateB
  524. GuiControl, disable, newenglishname
  525. GuiControl, disable, newfrenchname
  526. GuiControl, disable, newspanishname
  527. GuiControl, disable, newitalianname
  528. GuiControl, disable, newgermanname
  529. GuiControl, disable, newjapanesename
  530. GuiControl, disable, parseB
  531. GuiControl, disable, lg
  532. GuiControl, disable, creatorname
  533. GuiControl, disable, sg
  534. FileSelectFile, loadcgm, 3, , Open a Rocksmith 2014 Guitars Maker Template, Rocksmith 2014 CGM (*.cgm)
  535. if loadcgm =
  536. {
  537. msgbox, You need to select a .cgm only.
  538. GuiControl, enable, RS2014DB
  539. GuiControl, enable, newinlay
  540. GuiControl, enable, newicon
  541. GuiControl, enable, coloredinlay
  542. GuiControl, enable, newenglishname
  543. GuiControl, enable, newfrenchname
  544. GuiControl, enable, newspanishname
  545. GuiControl, enable, newitalianname
  546. GuiControl, enable, newgermanname
  547. GuiControl, enable, newjapanesename
  548. GuiControl, enable, getemplateB
  549. GuiControl, enable, aboutB
  550. GuiControl, enable, parseB
  551. GuiControl, enable, lg
  552. GuiControl, enable, sg
  553. GuiControl, enable, creatorname
  554. }
  555. else
  556. {
  557. progress = 10
  558. progresstext = Loading .
  559. GuiControl,, progressbar, %progress%
  560. GuiControl,, progressbar2, %progress%
  561. GuiControl,, progresstxt, %progresstext%
  562. FileRemoveDir, %A_ScriptDir%\tmp\cgm, 1
  563. FileCreateDir, %A_ScriptDir%\tmp
  564. FileCreateDir, %A_ScriptDir%\tmp\cgm
  565. FileCopy, %loadcgm%, %A_ScriptDir%\tmp\cgm\1.7z
  566. RunWait, %A_ScriptDir%\ressources\packer\7za.exe x "%A_ScriptDir%\tmp\cgm\1.7z" -o"%A_ScriptDir%\tmp\cgm\*",
  567. IniRead, leng, %A_ScriptDir%\tmp\cgm\1\setup.smb, Setup, guitarname
  568. IniRead, lfr, %A_ScriptDir%\tmp\cgm\1\setup.smb, Setup, guitarname1
  569. IniRead, lspa, %A_ScriptDir%\tmp\cgm\1\setup.smb, Setup, guitarname2
  570. IniRead, lit, %A_ScriptDir%\tmp\cgm\1\setup.smb, Setup, guitarname3
  571. IniRead, lge, %A_ScriptDir%\tmp\cgm\1\setup.smb, Setup, guitarname4
  572. IniRead, ljpn, %A_ScriptDir%\tmp\cgm\1\setup.smb, Setup, guitarname5
  573. IniRead, lcreator, %A_ScriptDir%\tmp\cgm\1\setup.smb, Setup, creatorname
  574. IniRead, lcolored, %A_ScriptDir%\tmp\cgm\1\setup.smb, Setup, coloredinlay
  575. If lcreator = ERROR
  576. {
  577. IniRead, leng, %A_ScriptDir%\tmp\cgm\1\setup.cgm, Setup, guitarname
  578. IniRead, lfr, %A_ScriptDir%\tmp\cgm\1\setup.cgm, Setup, guitarname1
  579. IniRead, lspa, %A_ScriptDir%\tmp\cgm\1\setup.cgm, Setup, guitarname2
  580. IniRead, lit, %A_ScriptDir%\tmp\cgm\1\setup.cgm, Setup, guitarname3
  581. IniRead, lge, %A_ScriptDir%\tmp\cgm\1\setup.cgm, Setup, guitarname4
  582. IniRead, ljpn, %A_ScriptDir%\tmp\cgm\1\setup.cgm, Setup, guitarname5
  583. IniRead, lcreator, %A_ScriptDir%\tmp\cgm\1\setup.cgm, Setup, creatorname
  584. IniRead, lcolored, %A_ScriptDir%\tmp\cgm\1\setup.cgm, Setup, coloredinlay
  585. }
  586. progress = 50
  587. progresstext = Loading ..
  588. GuiControl,, progressbar, %progress%
  589. GuiControl,, progressbar2, %progress%
  590. GuiControl,, progresstxt, %progresstext%
  591. RunWait, %A_ScriptDir%\ressources\packer\topng.exe -out png "%A_ScriptDir%\tmp\cgm\1\inlay.dds",,Hide
  592. progress = 80
  593. progresstext = Loading ...
  594. GuiControl,, progressbar, %progress%
  595. GuiControl,, progressbar2, %progress%
  596. GuiControl,, progresstxt, %progresstext%
  597. RunWait, %A_ScriptDir%\ressources\packer\topng.exe -out png "%A_ScriptDir%\tmp\cgm\1\icon.dds",,Hide
  598. loadinlay = %A_ScriptDir%\tmp\cgm\1\inlay.png
  599. loadicon = %A_ScriptDir%\tmp\cgm\1\icon.png
  600. DDSI512files = %loadicon%
  601. DDSInlayfiles = %loadinlay%
  602. if lcolored = 1
  603. {
  604. coloredinlay = 1
  605. }
  606. else
  607. {
  608. coloredinlay = 0
  609. }
  610. GuiControl,, newenglishname, %leng%
  611. GuiControl,, newfrenchname, %lfr%
  612. GuiControl,, newspanishname, %lspa%
  613. GuiControl,, newitalianname, %lit%
  614. GuiControl,, newgermanname, %lge%
  615. GuiControl,, newjapanesename, %ljpn%
  616. GuiControl,, coloredinlay, %coloredinlay%
  617. GuiControl,, newinlay, %DDSInlayfiles%
  618. GuiControl,, newicon, %DDSI512files%
  619. If lcreator = ERROR
  620. {
  621. GuiControl,, creatorname, UnknowCreator
  622. msgbox, The guitar %leng% has been loaded !
  623. }
  624. If lcreator = UnknowCreator
  625. {
  626. GuiControl,, creatorname, UnknowCreator
  627. msgbox, The guitar %leng% has been loaded !
  628. }
  629. else
  630. {
  631. GuiControl,, creatorname, %lcreator%
  632. msgbox, The guitar %leng% made by %lcreator% has been loaded !
  633. }
  634. progress = 0
  635. progresstext = Ready to go !
  636. GuiControl,, progressbar, %progress%
  637. GuiControl,, progressbar2, %progress%
  638. GuiControl,, progresstxt, %progresstext%
  639. GuiControl, enable, RS2014DB
  640. GuiControl, enable, newinlay
  641. GuiControl, enable, newicon
  642. GuiControl, enable, coloredinlay
  643. GuiControl, enable, newenglishname
  644. GuiControl, enable, newfrenchname
  645. GuiControl, enable, newspanishname
  646. GuiControl, enable, newitalianname
  647. GuiControl, enable, newgermanname
  648. GuiControl, enable, newjapanesename
  649. GuiControl, enable, getemplateB
  650. GuiControl, enable, parseB
  651. GuiControl, enable, lg
  652. GuiControl, enable, sg
  653. GuiControl, enable, creatorname
  654. }
  655. return
  656.  
  657. saveguitar:
  658. GuiControl, disable, RS2014DB
  659. GuiControl, disable, newinlay
  660. GuiControl, disable, newicon
  661. GuiControl, disable, coloredinlay
  662. GuiControl, disable, getemplateB
  663. GuiControl, disable, newenglishname
  664. GuiControl, disable, newfrenchname
  665. GuiControl, disable, newspanishname
  666. GuiControl, disable, newitalianname
  667. GuiControl, disable, newgermanname
  668. GuiControl, disable, newjapanesename
  669. GuiControl, disable, aboutB
  670. GuiControl, disable, parseB
  671. GuiControl, disable, lg
  672. GuiControl, disable, sg
  673. GuiControl, disable, creatorname
  674. FileSelectFolder, CGMDIR,, 3, Select folder to save the custom guitars.
  675. if CGMDIR =
  676. {
  677. msgbox, You need to select a folder to save your templace (ex: Desktop.)
  678. GuiControl, enable, RS2014DB
  679. GuiControl, enable, newinlay
  680. GuiControl, enable, newicon
  681. GuiControl, enable, coloredinlay
  682. GuiControl, enable, newenglishname
  683. GuiControl, enable, newfrenchname
  684. GuiControl, enable, newspanishname
  685. GuiControl, enable, newitalianname
  686. GuiControl, enable, newgermanname
  687. GuiControl, enable, newjapanesename
  688. GuiControl, enable, getemplateB
  689. GuiControl, enable, aboutB
  690. GuiControl, enable, parseB
  691. GuiControl, enable, lg
  692. GuiControl, enable, sg
  693. GuiControl, enable, creatorname
  694. }
  695. else
  696. {
  697. GuiControlGet, newinlay
  698. GuiControlGet, newicon
  699. GuiControlGet, creatorname
  700. GuiControlGet, coloredinlay
  701. GuiControlGet, newenglishname
  702. GuiControlGet, newfrenchname
  703. GuiControlGet, newspanishname
  704. GuiControlGet, newitalianname
  705. GuiControlGet, newgermanname
  706. GuiControlGet, newjapanesename
  707. FileCreateDir, %A_ScriptDir%\tmp
  708. FileRemoveDir, %A_ScriptDir%\tmp\cgmsave, 1
  709. FileCreateDir, %A_ScriptDir%\tmp\cgmsave
  710. progress = 10
  711. progresstext = Saving .
  712. GuiControl,, progressbar, %progress%
  713. GuiControl,, progressbar2, %progress%
  714. GuiControl,, progresstxt, %progresstext%
  715. 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
  716. progress = 50
  717. progresstext = Saving . .
  718. GuiControl,, progressbar, %progress%
  719. GuiControl,, progressbar2, %progress%
  720. GuiControl,, progresstxt, %progresstext%
  721. Runwait, %A_ScriptDir%\ressources\packer\nvdxt.exe -file "%DDSI512files%" -prescale 512 512 -32 dxt5 -dxt5 -overwrite -output "%A_ScriptDir%\tmp\cgmsave\icon.dds",,Hide
  722. progress = 70
  723. progresstext = Saving ..
  724. GuiControl,, progressbar, %progress%
  725. GuiControl,, progressbar2, %progress%
  726. GuiControl,, progresstxt, %progresstext%
  727. IniWrite, %newenglishname%, %A_ScriptDir%\tmp\cgmsave\setup.smb, Setup, guitarname
  728. IniWrite, %newfrenchname%, %A_ScriptDir%\tmp\cgmsave\setup.smb, Setup, guitarname1
  729. IniWrite, %newspanishname%, %A_ScriptDir%\tmp\cgmsave\setup.smb, Setup, guitarname2
  730. IniWrite, %newitalianname%, %A_ScriptDir%\tmp\cgmsave\setup.smb, Setup, guitarname3
  731. IniWrite, %newgermanname%, %A_ScriptDir%\tmp\cgmsave\setup.smb, Setup, guitarname4
  732. IniWrite, %newjapanesename%, %A_ScriptDir%\tmp\cgmsave\setup.smb, Setup, guitarname5
  733. IniWrite, %coloredinlay%, %A_ScriptDir%\tmp\cgmsave\setup.smb, Setup, coloredinlay
  734. IniWrite, %creatorname%, %A_ScriptDir%\tmp\cgmsave\setup.smb, Setup, creatorname
  735. progress = 90
  736. progresstext = Saving .. .
  737. GuiControl,, progressbar, %progress%
  738. GuiControl,, progressbar2, %progress%
  739. GuiControl,, progresstxt, %progresstext%
  740. StringReplace, newenglishname2, newenglishname, %A_SPACE%, _, All
  741. StringReplace, creatorname2, creatorname, %A_SPACE%, _, All
  742. progress = 100
  743. progresstext = Saving ...
  744. GuiControl,, progressbar, %progress%
  745. GuiControl,, progressbar2, %progress%
  746. GuiControl,, progresstxt, %progresstext%
  747. RunWait, %A_ScriptDir%\ressources\packer\7za.exe a %CGMDIR%\%newenglishname2%_%creatorname2%_v%buildversion%.cgm "%A_ScriptDir%\tmp\cgmsave\""%A_ScriptDir%\tmp\images\inlay_%guitarnamesix%.*" -prescale 1024 512 -dxt5 -quality_highest -nomipmap -alpha -output "%A_ScriptDir%\tmp\images\inlay_%guitarnamesix%.dds",,Hide
  748. 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
  749. 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
  750. 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
  751. 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
  752.  
  753. progress = 20
  754. progresstext = Copying PSARC to Backup folder
  755. GuiControl,, progresstxt, %progresstext%
  756. GuiControl,, progressbar, %progress%
  757. GuiControl,, progressbar2, %progress%
  758. FileCopy, %A_ScriptDir%\backup\cache.psarc, %A_ScriptDir%\backup\cache.psarc.bak%ccg%
  759. FileCopy, %A_ScriptDir%\backup\guitars.psarc, %A_ScriptDir%\backup\guitars.psarc.bak%ccg%
  760. FileCopy, %A_ScriptDir%\backup\static.psarc, %A_ScriptDir%\backup\static.psarc.bak%ccg%
  761. FileCopy, %RS2014DIR%\cache.psarc, %A_ScriptDir%\backup\cache.psarc
  762. FileCopy, %RS2014DIR%\guitars.psarc, %A_ScriptDir%\backup\guitars.psarc
  763. FileCopy, %RS2014DIR%\static.psarc, %A_ScriptDir%\backup\static.psarc
  764. progress = 25
  765. progresstext = Unpacking Psarc to TMP folder & cleaning appid files.
  766. GuiControl,, progresstxt, %progresstext%
  767. GuiControl,, progressbar, %progress%
  768. GuiControl,, progressbar2, %progress%
  769. RunWait, %A_ScriptDir%\ressources\packer\packer.exe --unpack --input="%A_ScriptDir%\backup" --output="%A_ScriptDir%\tmp",,Hide
  770. FileDelete, %A_ScriptDir%\tmp\cache_Pc\appid.appid
  771. FileDelete, %A_ScriptDir%\tmp\guitars_Pc\appid.appid
  772. FileDelete, %A_ScriptDir%\tmp\static_Pc\appid.appid
  773. progress = 35
  774. progresstext = Modding Cache psarc sources to new ones.
  775. GuiControl,, progresstxt, %progresstext%
  776. GuiControl,, progressbar, %progress%
  777. GuiControl,, progressbar2, %progress%
  778. RunWait, %A_ScriptDir%\ressources\packer\7za.exe x "tmp\cache_Pc\cache4.7z" -o"tmp\cache_Pc\cache4",,Hide
  779. FileAppend, %ccg2%`,%guitarname%`,%guitarname%`,%guitarname%`,%guitarname%`,%guitarname%`,%guitarname%`,%guitarname%`n, %A_ScriptDir%\tmp\cache_Pc\cache4\localization\maingame.csv
  780. RunWait, %A_ScriptDir%\ressources\packer\7za.exe a "tmp\cache_Pc\cache4.7z" ."\tmp\cache_Pc\cache4\"*,,Hide
  781. RunWait, %A_ScriptDir%\ressources\packer\7za.exe x "tmp\cache_Pc\cache7.7z" -o"tmp\cache_Pc\cache7",,Hide
  782. FileRead, guitarshsan, %A_ScriptDir%\tmp\cache_Pc\cache7\manifests\guitars\guitars.hsan
  783. 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" : {
  784. FileDelete, %A_ScriptDir%\tmp\cache_Pc\cache7\manifests\guitars\guitars.hsan
  785. FileAppend, %guitarshsannew%, %A_ScriptDir%\tmp\cache_Pc\cache7\manifests\guitars\guitars.hsan
  786. RunWait, %A_ScriptDir%\ressources\packer\7za.exe a "tmp\cache_Pc\cache7.7z" ."\tmp\cache_Pc\cache7\"*,,Hide
  787. progress = 50
  788. progresstext = Modding Guitars psarc sources to new ones
  789. GuiControl,, progresstxt, %progresstext%
  790. GuiControl,, progressbar, %progress%
  791. GuiControl,, progressbar2, %progress%
  792. 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
  793. FileAppend, %newfilesjson%, %A_ScriptDir%\tmp\guitars_Pc\manifests\guitars\guitar_%guitarnamesix%.json
  794. FileRead, guitarshsan2, %A_ScriptDir%\tmp\guitars_Pc\manifests\guitars\guitars.hsan
  795. 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" : {
  796. FileDelete, %A_ScriptDir%\tmp\guitars_Pc\manifests\guitars\guitars.hsan
  797. FileAppend, %guitarshsannew2%, %A_ScriptDir%\tmp\guitars_Pc\manifests\guitars\guitars.hsan
  798. 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
  799. FileAppend, %newfilesxblock%, %A_ScriptDir%\tmp\guitars_Pc\gamexblocks\nguitars\guitar_%guitarnamesix%.xblock
  800. FileCopy, %A_ScriptDir%\tmp\images\inlay_%guitarnamesix%.dds, %A_ScriptDir%\tmp\guitars_Pc\assets\gameplay\inlay\inlay_%guitarnamesix%.dds
  801. TestString = inlay_%guitarnamesix%.dds
  802. Output := StringToHex(TestString)
  803. Ootput = %Output%
  804. newhexname = %Output%
  805. StringReplace newhexname, newhexname, %A_Space%, , All
  806. filenifname = %guitarnamesix%.nif
  807. StringToHex(String)
  808.     {
  809.     local Old_A_FormatInteger, CharHex, HexString
  810.    
  811.     ;Return '0' if the string was blank
  812.     If !String
  813.         Return 0
  814.    
  815.     ;Save the current Integer format
  816.     Old_A_FormatInteger := A_FormatInteger
  817.    
  818.     ;Set the format of integers to their Hex value
  819.     SetFormat, INTEGER, H
  820.    
  821.     ;Parse the String
  822.     Loop, Parse, String
  823.         {
  824.         ;Get the ASCII value of the Character (will be converted to the Hex value by the SetFormat Line above)
  825.         CharHex := Asc(A_LoopField)
  826.    
  827.         ;Comment out the following line to leave the '0x' intact
  828.         StringTrimLeft, CharHex, CharHex, 2
  829.        
  830.         ;Build the return string
  831.         HexString .= CharHex . " "
  832.         }
  833.     ;Set the integer format to what is was prior to the call
  834.     SetFormat, INTEGER, %Old_A_FormatInteger%
  835.    
  836.     ;Return the string to the caller
  837.     Return HexString
  838.     }
  839. /*
  840. BinReadWrite.ahk
  841.  
  842. Routines to read and write binary data from/to files.
  843. Based on original functions written by Laszlo
  844. http://www.autohotkey.com/forum/viewtopic.php?t=4604
  845.  
  846. TODO: Perhaps set a lastError variable to explicit the errors.
  847.  
  848. // by Philippe Lhoste <PhiLho(a)GMX.net> http://Phi.Lho.free.fr
  849. // File/Project history:
  850.  1.03.000 -- 2006/02/15 (PL) -- Moved Bin2Hex & Hex2Bin to DllCallStruct, apply code rules.
  851.  1.02.000 -- 2006/01/24 (PL) -- Slight change of the API: all functions return -1 if error.
  852.               Integrated Laszlo suggestions on improving Bin2Hex and Hex2Bin.
  853.  1.01.000 -- 2006/01/23 (PL) -- Declaration of the local variables, to get access to global
  854.              WinAPI constants, and for consistency.
  855.  1.00.000 -- 2006/01/19 (PL) -- Rewrote the functions to separate opening and closing,
  856.              allowing efficient multiple operations.
  857. */
  858.  
  859. ; WinAPI constants
  860. INVALID_HANDLE_VALUE = -1
  861. INVALID_FILE_SIZE = 0xFFFFFFFF
  862. FILE_BEGIN = 0
  863. FILE_CURRENT = 1
  864. FILE_END = 2
  865.  
  866. /*
  867. // Open the file for reading.
  868. // Return the file handle to provide in further read operations and in the final close operation,
  869. // or INVALID_HANDLE_VALUE if an error was found.
  870. */
  871. OpenFileForRead(_filename)
  872. {
  873.     local handle
  874.  
  875.     handle := DllCall("CreateFile"
  876.             , "Str", _filename      ; lpFileName
  877.             , "UInt", 0x80000000        ; dwDesiredAccess (GENERIC_READ)
  878.             , "UInt", 3     ; dwShareMode (FILE_SHARE_READ|FILE_SHARE_WRITE)
  879.             , "UInt", 0     ; lpSecurityAttributes
  880.             , "UInt", 3     ; dwCreationDisposition (OPEN_EXISTING)
  881.             , "UInt", 0     ; dwFlagsAndAttributes
  882.             , "UInt", 0)    ; hTemplateFile
  883.     If (handle = INVALID_HANDLE_VALUE or handle = 0)
  884.     {
  885.         ErrorLevel = -1
  886.     }
  887.     IfNotEqual ErrorLevel, 0, Return INVALID_HANDLE_VALUE   ; Couldn't open the file
  888.     Return handle
  889. }
  890.  
  891. /*
  892. // Open the file for writing.
  893. // Return the file handle to provide in further write operations and in the final close operation,
  894. // or INVALID_HANDLE_VALUE if an error was found.
  895. */
  896. OpenFileForWrite(_filename)
  897. {
  898.     local handle
  899.  
  900.     handle := DllCall("CreateFile"
  901.             , "Str", _filename      ; lpFileName
  902.             , "UInt", 0x40000000    ; dwDesiredAccess (GENERIC_WRITE)
  903.             , "UInt", 3     ; dwShareMode (FILE_SHARE_READ|FILE_SHARE_WRITE)
  904.             , "UInt", 0     ; lpSecurityAttributes
  905.             , "UInt", 4     ; dwCreationDisposition (OPEN_ALWAYS: create if not exists)
  906.             , "UInt", 0     ; dwFlagsAndAttributes
  907.             , "UInt", 0)    ; hTemplateFile
  908.     If (handle = INVALID_HANDLE_VALUE or handle = 0)
  909.     {
  910.         ErrorLevel = -1
  911.     }
  912.     IfNotEqual ErrorLevel, 0, Return INVALID_HANDLE_VALUE   ; Couldn't open the file
  913.     Return handle
  914. }
  915.  
  916. /*
  917. // Close the file.
  918. */
  919. CloseFile(_handle)
  920. {
  921.     local result
  922.  
  923.     result := DllCall("CloseHandle"
  924.             , "UInt", _handle)
  925.     If (result = 0)
  926.     {
  927.         ErrorLevel = -1
  928.     }
  929. }
  930.  
  931. /*
  932. // Get the size of the opened file, in bytes.
  933. // Limited to 4GB, so it is more limited that AHK's FileGetSize.
  934. // It is here for consistency, and because it accepts a file handle instead of a path.
  935. //
  936. // Return the size in bytes, -1 if there was an error.
  937. */
  938. GetFileSize(_handle)
  939. {
  940.     local fileSize
  941.  
  942.     fileSize := DllCall("GetFileSize"
  943.             , "UInt", _handle
  944.             , "UInt", 0)
  945.     If (fileSize = INVALID_FILE_SIZE)
  946.     {
  947.         ErrorLevel = -1
  948.     }
  949.     IfNotEqual ErrorLevel, 0, Return -1
  950.     Return fileSize
  951. }
  952.  
  953. /*
  954. // Move the file pointer in the file to the given offset relative to moveMethod.
  955. //
  956. // moveMethod can be FILE_BEGIN, FILE_CURRENT or FILE_END.
  957. // If moveMethod is -1, nothing is done (default, for operations at current position).
  958. // To get the current position, call this function with just FILE_CURRENT (null offset).
  959. // offset can be positive (toward end of the file) or negative (toward start of the file).
  960. //
  961. // Return -1 if there was an error, the new file pointer position if OK.
  962. // Note: Currently it doesn't work for files larger than 2GB...
  963. */
  964. MoveInFile(_handle, _moveMethod=-1, _offset=0)
  965. {
  966.     local result
  967.  
  968.     result = %INVALID_FILE_SIZE%
  969.     if (_moveMethod != -1)
  970.     {
  971.         result := DllCall("SetFilePointer"
  972.                 , "UInt", _handle       ; hFile
  973.                 , "Int", _offset        ; lDistanceToMove
  974.                 , "UInt", 0         ; lpDistanceToMoveHigh
  975.                 , "UInt", _moveMethod)  ; dwMoveMethod
  976.         if (result = -1)    ; INVALID_SET_FILE_POINTER
  977.         {
  978.             ErrorLevel = -1
  979.         }
  980.         IfNotEqual ErrorLevel, 0, Return -1 ; Couldn't make the move
  981.     }
  982.     Return result
  983. }
  984.  
  985. /*
  986. // Write in a file opened for writing.
  987. //
  988. // Move to position given by moveMethod and offset
  989. // (by default stand at current position) and
  990. // write byteNb bytes from data (all data if byteNb = 0;
  991. // data contains binary bytes that can be a string or
  992. // raw bytes generated from hexa data with the Hex2Bin routine).
  993. //
  994. // moveMethod, defaulting to -1 (no move, write at current position),
  995. // can also be FILE_BEGIN, FILE_CURRENT or FILE_END.
  996. // offset can be positive (toward end of file) or negative (toward beginning of file).
  997. //
  998. // Return the number of bytes written (-1 if there was an error).
  999. */
  1000. WriteInFile(_handle, ByRef @data, _byteNb=0, _moveMethod=-1, _offset=0)
  1001. {
  1002.     local dataSize, result, written
  1003.  
  1004.     _offset := MoveInFile(_handle, _moveMethod, _offset)
  1005.     IfNotEqual ErrorLevel, 0, Return -1 ; Couldn't make the move
  1006.  
  1007.     dataSize := VarSetCapacity(@data)        ; Get the capacity (>= used length!)
  1008.     If (_byteNb < 1 or _byteNb > dataSize)
  1009.     {
  1010.         byteNb := dataSize
  1011.     }
  1012.     result := DllCall("WriteFile"
  1013.             , "UInt", _handle   ; hFile
  1014.             , "Str", @data      ; lpBuffer
  1015.             , "UInt", _byteNb   ; nNumberOfBytesToWrite
  1016.             , "UInt *", written ; lpNumberOfBytesWritten
  1017.             , "UInt", 0)        ; lpOverlapped
  1018.     if (result = 0 or written < _byteNb)
  1019.     {
  1020.         ErrorLevel = -2
  1021.     }
  1022.     IfNotEqual ErrorLevel, 0, Return -1 ; Couldn't write in the file
  1023.     Return written
  1024. }
  1025.  
  1026. /*
  1027. // Read from a file opened for reading.
  1028. //
  1029. // Move to position given by moveMethod and offset
  1030. // (by default stand at current position) and
  1031. // read byteNb bytes in data (the whole file if byteNb = 0;
  1032. // data contains binary bytes that can be a string or
  1033. // raw bytes that can be converted to hex digits with the Bin2Hex routine).
  1034. //
  1035. // moveMethod, defaulting to -1 (no move, read at current position),
  1036. // can also be FILE_BEGIN, FILE_CURRENT or FILE_END.
  1037. // offset can be positive (toward end of file) or negative (toward beginning of file).
  1038. //
  1039. // Return the number of bytes read (-1 if there was an error), which can be less
  1040. // than requested if end-of-file is meet.
  1041. */
  1042. ReadFromFile(_handle, ByRef @data, _byteNb=0, _moveMethod=-1, _offset=0)
  1043. {
  1044.     local fileSize, granted, result, read
  1045.  
  1046.     _offset := MoveInFile(_handle, _moveMethod, _offset)
  1047.     IfNotEqual ErrorLevel, 0, Return -1 ; Couldn't make the move
  1048.  
  1049.     if (_byteNb = 0)
  1050.     {
  1051.         ; Read whole file (or less if file pointer isn't at start)
  1052.         fileSize := GetFileSize(_handle)
  1053.         IfNotEqual ErrorLevel, 0, Return -1 ; Couldn't get the file size
  1054.         _byteNb := fileSize
  1055.     }
  1056.     granted := VarSetCapacity(@data, _byteNb, 0)
  1057.     if (granted < _byteNb)
  1058.     {
  1059.         ; Cannot allocate enough memory
  1060.         ErrorLevel = Mem=%granted%
  1061.         Return -1
  1062.     }
  1063.  
  1064.     result := DllCall("ReadFile"
  1065.             , "UInt", _handle   ; hFile
  1066.             , "Str", @data      ; lpBuffer
  1067.             , "UInt", _byteNb   ; nNumberOfBytesToRead
  1068.             , "UInt *", read    ; lpNumberOfBytesRead
  1069.             , "UInt", 0)        ; lpOverlapped
  1070.     if (result = 0)
  1071.     {
  1072.         ErrorLevel = -2
  1073.     }
  1074. ;~ MsgBox fileSize: %fileSize% - offset: %_offset% - byteNb: %_byteNb% - granted: %granted% - read: %read%
  1075.     IfNotEqual ErrorLevel, 0, Return -1 ; Couldn't read the file
  1076.  
  1077.     ; Note that we can have read less data than requested,
  1078.     ; eg. if end of file has been meet
  1079.     Return read
  1080. }
  1081. /*
  1082. // Convert raw bytes stored in a variable to a string of hexa digit pairs.
  1083. // Convert either byteNb bytes or, if null, the whole content of the variable.
  1084. //
  1085. // Return the number of converted bytes, or -1 if error (memory allocation)
  1086. */
  1087. Bin2Hex(ByRef @hex, ByRef @bin, _byteNb=0)
  1088. {
  1089.     local intFormat, dataSize, dataAddress, granted, x
  1090.  
  1091.     ; Save original integer format
  1092.     intFormat = %A_FormatInteger%
  1093.     ; For converting bytes to hex
  1094.     SetFormat Integer, Hex
  1095.  
  1096.     ; Get size of data
  1097.     dataSize := VarSetCapacity(@bin)
  1098.     If (_byteNb < 1 or _byteNb > dataSize)
  1099.     {
  1100.         _byteNb := dataSize
  1101.     }
  1102.     dataAddress := &@bin
  1103.     ; Make enough room (faster)
  1104.     granted := VarSetCapacity(@hex, _byteNb * 2)
  1105.     if (granted < _byteNb * 2)
  1106.     {
  1107.         ; Cannot allocate enough memory
  1108.         ErrorLevel = Mem=%granted%
  1109.         Return -1
  1110.     }
  1111.     Loop %_byteNb%
  1112.     {
  1113.         ; Get byte in hexa
  1114.         x := *dataAddress + 0x100
  1115.         StringRight x, x, 2 ; 2 hex digits
  1116.         StringUpper x, x
  1117.         @hex = %@hex%%x%
  1118.         dataAddress++   ; Next byte
  1119.     }
  1120.     ; Restore original integer format
  1121.     SetFormat Integer, %intFormat%
  1122.  
  1123.     Return _byteNb
  1124. }
  1125.  
  1126. /*
  1127. // Convert a string of hexa digit pairs to raw bytes stored in a variable.
  1128. // Convert either byteNb bytes or, if null, the whole content of the variable.
  1129. //
  1130. // Return the number of converted bytes, or -1 if error (memory allocation)
  1131. */
  1132. Hex2Bin(ByRef @bin, _hex, _byteNb=0)
  1133. {
  1134.     local dataSize, granted, dataAddress, x
  1135.  
  1136.     ; Get size of data
  1137.     x := StrLen(_hex)
  1138.     dataSize := Ceil(x / 2)
  1139.     if (x = 0 or dataSize * 2 != x)
  1140.     {
  1141.         ; Invalid string, empty or odd number of digits
  1142.         ErrorLevel = Param
  1143.         Return -1
  1144.     }
  1145.     If (_byteNb < 1 or _byteNb > dataSize)
  1146.     {
  1147.         _byteNb := dataSize
  1148.     }
  1149.     ; Make enough room
  1150.     granted := VarSetCapacity(@bin, _byteNb, 0)
  1151.     if (granted < _byteNb)
  1152.     {
  1153.         ; Cannot allocate enough memory
  1154.         ErrorLevel = Mem=%granted%
  1155.         Return -1
  1156.     }
  1157.     dataAddress := &@bin
  1158.  
  1159.     Loop Parse, _hex
  1160.     {
  1161.         if (A_Index & 1)    ; Odd
  1162.         {
  1163.             x = %A_LoopField%   ; Odd digit
  1164.         }
  1165.         else
  1166.         {
  1167.             ; Concatenate previous x and even digit, converted to hex
  1168.             x := "0x" . x . A_LoopField
  1169.             ; Store integer in memory
  1170.             DllCall("RtlFillMemory"
  1171.                     , "UInt", dataAddress
  1172.                     , "UInt", 1
  1173.                     , "UChar", x)
  1174.             dataAddress++
  1175.         }
  1176.     }
  1177.  
  1178.     Return _byteNb
  1179. }
  1180. HexString=
  1181. ( Join
  1182. %nif1%%newhexname%%nif2%
  1183. )
  1184. Tfh := OpenFileForWrite(filenifname)
  1185. l := Hex2Bin(data, HexString)
  1186. WriteInFile(Tfh, data, l)
  1187. CloseFile(Tfh)
  1188. FileCopy,%A_ScriptDir%\%filenifname%, %A_ScriptDir%\tmp\guitars_Pc\assets\gameplay\inlay\%filenifname%
  1189. FileDelete,%A_ScriptDir%\%filenifname%
  1190. progress = 80
  1191. progresstext = Modding Static PSARC sources to new ones
  1192. GuiControl,, progresstxt, %progresstext%
  1193. GuiControl,, progressbar, %progress%
  1194. GuiControl,, progressbar2, %progress%
  1195. FileAppend, %ccg2%`,%guitarname%`,%guitarname%`,%guitarname%`,%guitarname%`,%guitarname%`,%guitarname%`,%guitarname%`n, %A_ScriptDir%\tmp\static_Pc\localization\maingame.csv
  1196. FileCopy, %A_ScriptDir%\tmp\images\inlay_%guitarnamesix%_512.dds, %A_ScriptDir%\tmp\static_Pc\gfxassets\rewards\guitar_inlays\reward_inlay_%guitarnamesix%_512.dds
  1197. FileCopy, %A_ScriptDir%\tmp\images\inlay_%guitarnamesix%_256.dds, %A_ScriptDir%\tmp\static_Pc\gfxassets\rewards\guitar_inlays\reward_inlay_%guitarnamesix%_256.dds
  1198. FileCopy, %A_ScriptDir%\tmp\images\inlay_%guitarnamesix%_128.dds, %A_ScriptDir%\tmp\static_Pc\gfxassets\rewards\guitar_inlays\reward_inlay_%guitarnamesix%_128.dds
  1199. FileCopy, %A_ScriptDir%\tmp\images\inlay_%guitarnamesix%_64.dds, %A_ScriptDir%\tmp\static_Pc\gfxassets\rewards\guitar_inlays\reward_inlay_%guitarnamesix%_64.dds
  1200. progress = 90
  1201. progresstext = Packing new psarc to output folder
  1202. GuiControl,, progresstxt, %progresstext%
  1203. GuiControl,, progressbar, %progress%
  1204. GuiControl,, progressbar2, %progress%
  1205. FileRemoveDir, %A_ScriptDir%\tmp\cache_Pc\cache7, 1
  1206. FileRemoveDir, %A_ScriptDir%\tmp\cache_Pc\cache4, 1
  1207. FileCopy, %A_ScriptDir%\output\cache.psarc, %A_ScriptDir%\output\cache.psarc.bak%ccg%
  1208. FileCopy, %A_ScriptDir%\output\guitars.psarc, %A_ScriptDir%\output\guitars.psarc.bak%ccg%
  1209. FileCopy, %A_ScriptDir%\output\static.psarc, %A_ScriptDir%\output\static.psarc.bak%ccg%
  1210.  
  1211. RunWait, %A_ScriptDir%\ressources\packer\packer.exe --pack --input="%A_ScriptDir%\tmp\cache_Pc" --output="%A_ScriptDir%\output\cache.psarc",,Hide
  1212. sleep 600
  1213. RunWait, %A_ScriptDir%\ressources\packer\packer.exe --pack --input="%A_ScriptDir%\tmp\guitars_Pc" --output="%A_ScriptDir%\output\guitars.psarc",,Hide
  1214. sleep 600
  1215. RunWait, %A_ScriptDir%\ressources\packer\packer.exe --pack --input="%A_ScriptDir%\tmp\static_Pc" --output="%A_ScriptDir%\output\static.psarc",,Hide
  1216. FileRemoveDir, %A_ScriptDir%\tmp, 1
  1217. progress = 98
  1218. progresstext = Generating required files.
  1219. GuiControl,, progresstxt, %progresstext%
  1220. GuiControl,, progressbar, %progress%
  1221. GuiControl,, progressbar2, %progress%
  1222. IniWrite, %RS2014DIR%, CustomGuitarList.ini, Rocksmith2014Directory, Rocksmith2014dir
  1223. IniWrite, %ccg2% - %guitarname%, CustomGuitarList.ini, GuitarList, %ID1%
  1224. IniWrite, %ID1%, CustomGuitarList.ini, CustomGuitarMasterID, MasterID%ccg%
  1225. IniWrite, %ccg2%, CustomGuitarList.ini, CustomGuitarLinkToID, %ID1%
  1226. IniWrite, %guitarname%, CustomGuitarList.ini, CustomGuitarNameList, Guitar%ccg%
  1227. ccg++
  1228. ccg2++
  1229. IniWrite, %ccg%, CustomGuitarList.ini, NumberInstance, NumberSet
  1230. IniWrite, %ccg2%, CustomGuitarList.ini, NumberInstance, NumberGuitar
  1231. progress = 100
  1232. progresstext = Work done check %A_ScriptDir%\output folder for your new PSARC
  1233. GuiControl,, progresstxt, %progresstext%
  1234. GuiControl,, progressbar, %progress%
  1235. 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 :)
  1236. GuiControl,, progressbar, %progress%
  1237. GuiControl, enable, RS2014DB
  1238. GuiControl, enable, newinlay
  1239. GuiControl, enable, newicon
  1240. GuiControl, enable, coloredinlay
  1241. GuiControl, enable, newenglishname
  1242. GuiControl, enable, newfrenchname
  1243. GuiControl, enable, newspanishname
  1244. GuiControl, enable, newitalianname
  1245. GuiControl, enable, newgermanname
  1246. GuiControl, enable, newjapanesename
  1247. GuiControl, enable, getemplateB
  1248. GuiControl, enable, aboutB
  1249. GuiControl, enable, parseB
  1250. GuiControl, enable, lg
  1251. GuiControl, enable, sg
  1252. GuiControl, enable, creatorname
  1253. progress = 0
  1254. GuiControl,, progressbar, %progress%
  1255. IDString = a0b1c2d3e4f5a6b7c8d9e0f
  1256. Random, RDM1, 0x00F000000, 0x00fffffff
  1257. ID1 = %IDString%%RDM1%
  1258. StringUpper, ID1MAJ, ID1
  1259. GuiControl,, idmaster, %ID1MAJ%
  1260. GuiControl,, guitarid, %ccg2%
  1261. return
  1262.  
  1263. GuiClose:
  1264. FileRemoveDir, %A_ScriptDir%\tmp, 1
  1265. FileRemoveDir, %A_ScriptDir%\ressources, 1
  1266. ExitApp
Advertisement
Add Comment
Please, Sign In to add comment