Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- put somewhere in the file(doesn't matter)
- :setcorrectIDs
- call:setfighterIDs %1
- if "%2"=="body" (
- set val=%3
- set val=!val:~1!
- IF /I !val!==01 set val=1
- IF /I !val!==02 set val=2
- IF /I !val!==03 set val=3
- IF /I !val!==04 set val=4
- IF /I !val!==05 set val=5
- IF /I !val!==06 set val=6
- IF /I !val!==07 set val=7
- IF /I !val!==08 set val=8
- IF /I !val!==09 set val=9
- set /a "val=val*4"
- IF /I !val! LSS 255 (
- set /a "mod=val/64"
- IF /I !mod! EQU 1 (
- set /a "val=val-63"
- ) ELSE IF /I !mod! EQU 2 (
- set /a "val=val-126"
- ) ELSE IF /I !mod! EQU 3 (
- set /a "val=val-189"
- )
- ) ELSE IF /I !val! GTR 255 (
- set /a "mod=val/255"
- set /a "val=val-(255*mod)"
- IF /I !mod! EQU 1 (
- set /a "val=val-mod"
- set /a "vanillaoffsetID=64*mod"
- set /a "mod=val/64"
- IF /I !mod! EQU 1 (
- set /a "val=val-63"
- ) ELSE IF /I !mod! EQU 2 (
- set /a "val=val-126"
- ) ELSE IF /I !mod! EQU 3 (
- set /a "val=val-189"
- )
- )
- )
- set /a "vanillaslotID=val"
- ) ELSE (
- IF "!firstExtraModel!"=="true" (
- set firstExtraModel=false
- ) ELSE (
- IF !customoffsetID! NEQ 192 (
- set /a "customoffsetID=customoffsetID+64"
- ) ELSE (
- set /a "customoffsetID=0"
- IF !customslotID! NEQ 255 (
- set /a "customslotID=customslotID+1"
- ) ELSE (
- set /a "customslotID=0"
- IF !customfighterID! NEQ 255 (
- set /a "customfighterID=customfighterID+1"
- ) ELSE (
- set /a "customfighterID=0"
- set /a "custombaseID=custombaseID+1"
- )
- )
- )
- )
- )
- goto:eof
- :setfighterIDs
- IF /i [%1]==[bayonetta] set /a vanillafigherID=72
- IF /i [%1]==[captain] set /a vanillafigherID=0
- IF /i [%1]==[cloud] set /a vanillafigherID=71
- IF /i [%1]==[dedede] set /a vanillafigherID=1
- IF /i [%1]==[diddy] set /a vanillafigherID=2
- IF /i [%1]==[donkey] set /a vanillafigherID=3
- IF /i [%1]==[duckhunt] set /a vanillafigherID=4
- IF /i [%1]==[falco] set /a vanillafigherID=5
- IF /i [%1]==[fox] set /a vanillafigherID=6
- IF /i [%1]==[gamewatch] set /a vanillafigherID=7
- IF /i [%1]==[ganon] set /a vanillafigherID=8
- IF /i [%1]==[gekkouga] set /a vanillafigherID=48
- IF /i [%1]==[ike] set /a vanillafigherID=9
- IF /i [%1]==[kamui] set /a vanillafigherID=71
- IF /i [%1]==[kirby] set /a vanillafigherID=57
- IF /i [%1]==[koopa] set /a vanillafigherID=11
- IF /i [%1]==[koopajr] set /a vanillafigherID=10
- IF /i [%1]==[link] set /a vanillafigherID=12
- IF /i [%1]==[littlemac] set /a vanillafigherID=13
- IF /i [%1]==[lizardon] set /a vanillafigherID=14
- IF /i [%1]==[lucario] set /a vanillafigherID=15
- IF /i [%1]==[lucas] set /a vanillafigherID=69
- IF /i [%1]==[lucina] set /a vanillafigherID=47
- IF /i [%1]==[luigi] set /a vanillafigherID=16
- IF /i [%1]==[mario] set /a vanillafigherID=17
- IF /i [%1]==[mariod] set /a vanillafigherID=46
- IF /i [%1]==[marth] set /a vanillafigherID=18
- IF /i [%1]==[metaknight] set /a vanillafigherID=19
- IF /i [%1]==[mewtwo] set /a vanillafigherID=67
- IF /i [%1]==[murabito] set /a vanillafigherID=61
- IF /i [%1]==[ness] set /a vanillafigherID=23
- IF /i [%1]==[pacman] set /a vanillafigherID=24
- IF /i [%1]==[palutena] set /a vanillafigherID=25
- IF /i [%1]==[peach] set /a vanillafigherID=26
- IF /i [%1]==[pikachu] set /a vanillafigherID=27
- IF /i [%1]==[pikmin] set /a vanillafigherID=28
- IF /i [%1]==[pit] set /a vanillafigherID=29
- IF /i [%1]==[pitb] set /a vanillafigherID=49
- IF /i [%1]==[purin] set /a vanillafigherID=30
- IF /i [%1]==[reflet] set /a vanillafigherID=31
- IF /i [%1]==[robot] set /a vanillafigherID=32
- IF /i [%1]==[rockman] set /a vanillafigherID=33
- IF /i [%1]==[rosetta] set /a vanillafigherID=34
- IF /i [%1]==[roy] set /a vanillafigherID=70
- IF /i [%1]==[ryu] set /a vanillafigherID=68
- IF /i [%1]==[samus] set /a vanillafigherID=36
- IF /i [%1]==[sheik] set /a vanillafigherID=37
- IF /i [%1]==[shulk] set /a vanillafigherID=39
- IF /i [%1]==[sonic] set /a vanillafigherID=38
- IF /i [%1]==[szerosuit] set /a vanillafigherID=40
- IF /i [%1]==[toonlink] set /a vanillafigherID=41
- IF /i [%1]==[wario] set /a vanillafigherID=42
- IF /i [%1]==[wiifit] set /a vanillafigherID=43
- IF /i [%1]==[yoshi] set /a vanillafigherID=44
- IF /i [%1]==[zelda] set /a vanillafigherID=45
- goto:eof
- replace current methods
- :fixer
- for /f %%f in ('dir /b "workspace\content\patch\data\fighter\%1\model\%3"') do (
- call:setcorrectIDs
- if "%3"=="body" (
- 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
- ) ELSE (
- 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
- )
- IF errorlevel 1 (
- if EXIST "workspace\content\patch\data\fighter\%1\model\%3\%%f\%2.nud" (
- if EXIST "workspace\content\patch\data\fighter\%1\model\%3\%%f\model.nut" (
- 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."
- IF EXIST zlibCheck.py (
- set decompedOne=0
- call:infocode "Info: attempting to decompress the compressed files in %1\model\%3\%%f."
- zlibCheck.py "workspace\content\patch\data\fighter\%1\model\%3\%%f\%2.nud" >nul 2>&1
- IF errorlevel 1 (
- zlibDecompress.py "workspace\content\patch\data\fighter\%1\model\%3\%%f\%2.nud" >nul 2>&1
- call:infocode "Info: decompressed %model%.nud in %1\model\%3\%%f."
- set decompedOne=1
- )
- zlibCheck.py "workspace\content\patch\data\fighter\%1\model\%3\%%f\model.nut" >nul 2>&1
- IF errorlevel 1 (
- zlibDecompress.py "workspace\content\patch\data\fighter\%1\model\%3\%%f\model.nut" >nul 2>&1
- call:infocode "Info: decompressed model.nut in %1\model\%3\%%f."
- set decompedOne=1
- )
- IF "!decompedOne!"=="1" (
- call:infocode "Info: attempting to IDfix once more."
- if "%3"=="body" (
- 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
- ) ELSE (
- 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
- )
- IF errorlevel 1 (
- 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."
- set /a E=%E% + 1
- ) ELSE (
- call:infocode "Info: Success`^! the %model%.nud and model.nut in %1\model\%3\%%f are now IDFixed."
- )
- )
- )
- ) else (
- 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."
- set /a E=%E% + 1
- )
- ) ELSE IF EXIST "workspace\content\patch\data\fighter\%1\model\%3\%%f\model.nut" (
- 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."
- set /a E=%E% + 1
- ) ELSE (
- 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."
- set /a E=%E% + 1
- )
- )
- )
- goto:eof
- put these before the initial :title call
- set firstExtraModel=true
- set vanillabaseID=64
- set vanillafigherID=0
- set vanillaslotID=0
- set vanillaoffsetID=0
- set custombaseID=65
- set customfighterID=0
- set customslotID=0
- set customoffsetID=0
- put these at the begining of :title
- set firstExtraModel=true
- set vanillabaseID=64
- set vanillafigherID=0
- set vanillaslotID=0
- set vanillaoffsetID=0
- set custombaseID=65
- set customfighterID=0
- set customslotID=0
- set customoffsetID=0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement