Advertisement
Guest User

better Idfix Usage

a guest
Aug 27th, 2016
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 8.57 KB | None | 0 0
  1. put somewhere in the file(doesn't matter)
  2.  
  3. :setcorrectIDs
  4. call:setfighterIDs %1
  5. if "%2"=="body" (
  6.     set val=%3
  7.     set val=!val:~1!
  8.     IF /I !val!==01 set val=1
  9.     IF /I !val!==02 set val=2
  10.     IF /I !val!==03 set val=3
  11.     IF /I !val!==04 set val=4
  12.     IF /I !val!==05 set val=5
  13.     IF /I !val!==06 set val=6
  14.     IF /I !val!==07 set val=7
  15.     IF /I !val!==08 set val=8
  16.     IF /I !val!==09 set val=9
  17.     set /a "val=val*4"
  18.     IF /I !val! LSS 255 (
  19.         set /a "mod=val/64"
  20.     IF /I !mod! EQU 1 (
  21.         set /a "val=val-63"
  22.     ) ELSE IF /I !mod! EQU 2 (
  23.         set /a "val=val-126"
  24.     ) ELSE IF /I !mod! EQU 3 (
  25.         set /a "val=val-189"
  26.     )
  27.     ) ELSE IF /I !val! GTR 255 (
  28.         set /a "mod=val/255"
  29.         set /a "val=val-(255*mod)"
  30.     IF /I !mod! EQU 1 (
  31.         set /a "val=val-mod"
  32.         set /a "vanillaoffsetID=64*mod"
  33.         set /a "mod=val/64"
  34.         IF /I !mod! EQU 1 (
  35.         set /a "val=val-63"
  36.         ) ELSE IF /I !mod! EQU 2 (
  37.         set /a "val=val-126"
  38.         ) ELSE IF /I !mod! EQU 3 (
  39.         set /a "val=val-189"
  40.         )
  41.     )
  42.     )
  43.     set /a "vanillaslotID=val"
  44. ) ELSE (
  45.     IF "!firstExtraModel!"=="true" (
  46.     set firstExtraModel=false
  47.     ) ELSE (
  48.     IF !customoffsetID! NEQ 192 (
  49.         set /a "customoffsetID=customoffsetID+64"
  50.     ) ELSE (
  51.             set /a "customoffsetID=0"
  52.         IF !customslotID! NEQ 255 (
  53.         set /a "customslotID=customslotID+1"
  54.         ) ELSE (
  55.         set /a "customslotID=0"
  56.         IF !customfighterID! NEQ 255 (
  57.             set /a "customfighterID=customfighterID+1"
  58.         ) ELSE (
  59.             set /a "customfighterID=0"
  60.             set /a "custombaseID=custombaseID+1"
  61.             )
  62.         )
  63.     )
  64.     )
  65. )
  66. goto:eof
  67.  
  68. :setfighterIDs
  69. IF /i [%1]==[bayonetta] set /a vanillafigherID=72
  70. IF /i [%1]==[captain] set /a vanillafigherID=0
  71. IF /i [%1]==[cloud] set /a vanillafigherID=71
  72. IF /i [%1]==[dedede] set /a vanillafigherID=1
  73. IF /i [%1]==[diddy] set /a vanillafigherID=2
  74. IF /i [%1]==[donkey] set /a vanillafigherID=3
  75. IF /i [%1]==[duckhunt] set /a vanillafigherID=4
  76. IF /i [%1]==[falco] set /a vanillafigherID=5
  77. IF /i [%1]==[fox] set /a vanillafigherID=6
  78. IF /i [%1]==[gamewatch] set /a vanillafigherID=7
  79. IF /i [%1]==[ganon] set /a vanillafigherID=8
  80. IF /i [%1]==[gekkouga] set /a vanillafigherID=48
  81. IF /i [%1]==[ike] set /a vanillafigherID=9
  82. IF /i [%1]==[kamui] set /a vanillafigherID=71
  83. IF /i [%1]==[kirby] set /a vanillafigherID=57
  84. IF /i [%1]==[koopa] set /a vanillafigherID=11
  85. IF /i [%1]==[koopajr] set /a vanillafigherID=10
  86. IF /i [%1]==[link] set /a vanillafigherID=12
  87. IF /i [%1]==[littlemac] set /a vanillafigherID=13
  88. IF /i [%1]==[lizardon] set /a vanillafigherID=14
  89. IF /i [%1]==[lucario] set /a vanillafigherID=15
  90. IF /i [%1]==[lucas] set /a vanillafigherID=69
  91. IF /i [%1]==[lucina] set /a vanillafigherID=47
  92. IF /i [%1]==[luigi] set /a vanillafigherID=16
  93. IF /i [%1]==[mario] set /a vanillafigherID=17
  94. IF /i [%1]==[mariod] set /a vanillafigherID=46
  95. IF /i [%1]==[marth] set /a vanillafigherID=18
  96. IF /i [%1]==[metaknight] set /a vanillafigherID=19
  97. IF /i [%1]==[mewtwo] set /a vanillafigherID=67
  98. IF /i [%1]==[murabito] set /a vanillafigherID=61
  99. IF /i [%1]==[ness] set /a vanillafigherID=23
  100. IF /i [%1]==[pacman] set /a vanillafigherID=24
  101. IF /i [%1]==[palutena] set /a vanillafigherID=25
  102. IF /i [%1]==[peach] set /a vanillafigherID=26
  103. IF /i [%1]==[pikachu] set /a vanillafigherID=27
  104. IF /i [%1]==[pikmin] set /a vanillafigherID=28
  105. IF /i [%1]==[pit] set /a vanillafigherID=29
  106. IF /i [%1]==[pitb] set /a vanillafigherID=49
  107. IF /i [%1]==[purin] set /a vanillafigherID=30
  108. IF /i [%1]==[reflet] set /a vanillafigherID=31
  109. IF /i [%1]==[robot] set /a vanillafigherID=32
  110. IF /i [%1]==[rockman] set /a vanillafigherID=33
  111. IF /i [%1]==[rosetta] set /a vanillafigherID=34
  112. IF /i [%1]==[roy] set /a vanillafigherID=70
  113. IF /i [%1]==[ryu] set /a vanillafigherID=68
  114. IF /i [%1]==[samus] set /a vanillafigherID=36
  115. IF /i [%1]==[sheik] set /a vanillafigherID=37
  116. IF /i [%1]==[shulk] set /a vanillafigherID=39
  117. IF /i [%1]==[sonic] set /a vanillafigherID=38
  118. IF /i [%1]==[szerosuit] set /a vanillafigherID=40
  119. IF /i [%1]==[toonlink] set /a vanillafigherID=41
  120. IF /i [%1]==[wario] set /a vanillafigherID=42
  121. IF /i [%1]==[wiifit] set /a vanillafigherID=43
  122. IF /i [%1]==[yoshi] set /a vanillafigherID=44
  123. IF /i [%1]==[zelda] set /a vanillafigherID=45
  124. goto:eof
  125.  
  126. replace current methods
  127.  
  128. :fixer
  129. for /f %%f in ('dir /b "workspace\content\patch\data\fighter\%1\model\%3"') do (
  130.     call:setcorrectIDs
  131.     if "%3"=="body" (
  132.         TexIDfix.py "workspace\content\patch\data\fighter\%1\model\%3\%%f\%2.nud" "workspace\content\patch\data\fighter\%1\model\%3\%%f\model.nut" !vanillabaseID! !vanillafighterID! !vanillaslotID! !vanillaoffsetID! >nul 2>&1
  133.     ) ELSE (
  134.         TexIDfix.py "workspace\content\patch\data\fighter\%1\model\%3\%%f\%2.nud" "workspace\content\patch\data\fighter\%1\model\%3\%%f\model.nut" !custombaseID! !customfighterID! !customslotID! !customoffsetID! >nul 2>&1
  135.     )
  136.     IF errorlevel 1 (
  137.         if EXIST "workspace\content\patch\data\fighter\%1\model\%3\%%f\%2.nud" (
  138.             if EXIST "workspace\content\patch\data\fighter\%1\model\%3\%%f\model.nut" (
  139.                 call:errorcode "Warning: the %model%.nud and model.nut in %1\model\%3\%%f was unable to be IDfixed. It may be compressed, or there is some other issue."
  140.                 IF EXIST zlibCheck.py (
  141.                     set decompedOne=0
  142.                     call:infocode "Info: attempting to decompress the compressed files in %1\model\%3\%%f."
  143.                     zlibCheck.py "workspace\content\patch\data\fighter\%1\model\%3\%%f\%2.nud" >nul 2>&1
  144.                     IF errorlevel 1 (
  145.                         zlibDecompress.py "workspace\content\patch\data\fighter\%1\model\%3\%%f\%2.nud" >nul 2>&1
  146.                         call:infocode "Info: decompressed %model%.nud in %1\model\%3\%%f."
  147.                         set decompedOne=1
  148.                     )
  149.                     zlibCheck.py "workspace\content\patch\data\fighter\%1\model\%3\%%f\model.nut" >nul 2>&1
  150.                     IF errorlevel 1 (
  151.                         zlibDecompress.py "workspace\content\patch\data\fighter\%1\model\%3\%%f\model.nut" >nul 2>&1
  152.                         call:infocode "Info: decompressed model.nut in %1\model\%3\%%f."
  153.                         set decompedOne=1
  154.                     )
  155.                     IF "!decompedOne!"=="1" (
  156.                         call:infocode "Info: attempting to IDfix once more."
  157.                             if "%3"=="body" (
  158.                                 TexIDfix.py "workspace\content\patch\data\fighter\%1\model\%3\%%f\%2.nud" "workspace\content\patch\data\fighter\%1\model\%3\%%f\model.nut" !vanillabaseID! !vanillafighterID! !vanillaslotID! !vanillaoffsetID! >nul 2>&1
  159.                             ) ELSE (
  160.                                 TexIDfix.py "workspace\content\patch\data\fighter\%1\model\%3\%%f\%2.nud" "workspace\content\patch\data\fighter\%1\model\%3\%%f\model.nut" !custombaseID! !customfighterID! !customslotID! !customoffsetID! >nul 2>&1
  161.                             )
  162.                         IF errorlevel 1 (
  163.                             call:errorcode "Warning: the %model%.nud or model.nut in %1\model\%3\%%f was still unable to be IDfixed. one of those two files may be missing."
  164.                             set /a E=%E% + 1
  165.                         ) ELSE (
  166.                             call:infocode "Info: Success`^! the %model%.nud and model.nut in %1\model\%3\%%f are now IDFixed."
  167.                         )
  168.                     )
  169.                 )
  170.             ) else (
  171.                 call:errorcode "Warning: the %model%.nud and model.nut in %1\model\%3\%%f was unable to be IDfixed. the model.nut does not exist."
  172.                 set /a E=%E% + 1
  173.             )
  174.         ) ELSE IF EXIST "workspace\content\patch\data\fighter\%1\model\%3\%%f\model.nut" (
  175.             call:errorcode "Warning: the %model%.nud and model.nut in %1\model\%3\%%f was unable to be IDfixed. the %model%.nud does not exist."
  176.             set /a E=%E% + 1
  177.         ) ELSE (
  178.             call:errorcode "Warning: the %model%.nud and model.nut in %1\model\%3\%%f was unable to be IDfixed. the %model%.nud and the model.nut do not exist."
  179.             set /a E=%E% + 1
  180.         )
  181.     )
  182. )
  183.  
  184. goto:eof
  185.  
  186. put these before the initial :title call
  187.  
  188. set firstExtraModel=true
  189. set vanillabaseID=64
  190. set vanillafigherID=0
  191. set vanillaslotID=0
  192. set vanillaoffsetID=0
  193. set custombaseID=65
  194. set customfighterID=0
  195. set customslotID=0
  196. set customoffsetID=0
  197.  
  198. put these at the begining of :title
  199.  
  200. set firstExtraModel=true
  201. set vanillabaseID=64
  202. set vanillafigherID=0
  203. set vanillaslotID=0
  204. set vanillaoffsetID=0
  205. set custombaseID=65
  206. set customfighterID=0
  207. set customslotID=0
  208. set customoffsetID=0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement