공략/팁 게에 올라온 추출 스크립트 참고해서 기존 추출 결합 스크립트 수정해서 만들어봤음.
결합스크립트는 게임내에서 실제 테스트 안해봐서 “실제 이미지가 사용되는 메모리의 크기로 추정 됨”
이 부분은 정확히 어떠한 값을 의미하는지 체크 못했음. 하지만 아마도 될 것으로 확신함.
오류가 있다면 수정해서 사용바람. 나는 스킨 투명화만 해서 사용해서 저부분을 수정할 일이 없었음.
스킨 카페인가 거기로 퍼 가든가 말든가 맘대로 우려먹고 에이케이 측에서 방장 한테 삭제 요청 있다면 바로 삭제 바람.
참고로 반드시 명심해야 할 사항은 스킨 사용은 엄연히 게임약관 위반임을 상기하고 사용할 것.
-추출스크립트-
//AGFTOTGA 1.0 (거리니닷컴 익명/2021/08/09) Base Script : SPR32TOTGA 2.3 (루란제르/2018/08/29)
IDString "\x23\x00\x00\x00"
log MEMORY_FILE1 0 0 //TGA file
log MEMORY_FILE2 0 0 //Info Text File
log MEMORY_FILE3 0 0 //Unziped Memory
log MEMORY_FILE4 0 0 //Temporary Frame Fileget FNAME basename
get FSIZE asize
get EXTNAME extensiongoto 0x04
get FRAME_MAX_WIDTH long
get FRAME_MAX_HEIGHT long
get FRAME_COUNT long//writing info text
putdstring "HQTEAM_AGF_TGA_INFO" 19 MEMORY_FILE2
put 0x0A0D short MEMORY_FILE2putdstring "STRIPE_NAME|" 12 MEMORY_FILE2
set FNAMELEN strlen FNAME
putdstring FNAME FNAMELEN MEMORY_FILE2
put 0x0A0D short MEMORY_FILE2putdstring "EXTENSION|" 10 MEMORY_FILE2
set EXTLEN strlen EXTNAME
putdstring EXTNAME EXTLEN MEMORY_FILE2
put 0x0A0D short MEMORY_FILE2putdstring "TOTAL_FRAME_NUMBER|" 19 MEMORY_FILE2
set COUNTLEN strlen FRAME_COUNT
putdstring FRAME_COUNT COUNTLEN MEMORY_FILE2
put 0x0A0D short MEMORY_FILE2putdstring "MAXWIDTH|" 9 MEMORY_FILE2
set MAX_WIDTH_LEN strlen FRAME_MAX_WIDTH
putdstring FRAME_MAX_WIDTH MAX_WIDTH_LEN MEMORY_FILE2
put 0x0A0D short MEMORY_FILE2putdstring "MAXHEIGHT|" 10 MEMORY_FILE2
set MAX_HEIGHT_LEN strlen FRAME_MAX_HEIGHT
putdstring FRAME_MAX_HEIGHT MAX_HEIGHT_LEN MEMORY_FILE2
put 0x0A0D short MEMORY_FILE2putdstring "FRAME_BITMAP_LIST:" 18 MEMORY_FILE2
put 0x0A0D short MEMORY_FILE2//end info text
//start extract
goto 0x4C0
for i = 1 <= FRAME_COUNT
get FRAME_OFFSET long
print "OFFSETS : %FRAME_OFFSET%"
putarray 0 i FRAME_OFFSET
next iset UNZIPED_SIZE_ADDR FRAME_COUNT
math UNZIPED_SIZE_ADDR * 8
math UNZIPED_SIZE_ADDR + 0x970
goto UNZIPED_SIZE_ADDR
get UNZIPED_SIZE longfor i = 1 <= FRAME_COUNT
set FRAME_INFO_OFFSET i
math FRAME_INFO_OFFSET * 8
math FRAME_INFO_OFFSET + 0x968
goto FRAME_INFO_OFFSET
get FRAME_POS_X short
get FRAME_POS_Y short
get FRAME_WIDTH short
get FRAME_HEIGHT short
putarray 1 i FRAME_POS_X
putarray 2 i FRAME_POS_Y
putarray 3 i FRAME_WIDTH
putarray 4 i FRAME_HEIGHT
next iset ZIP_SIZE_ADDR FRAME_COUNT
math ZIP_SIZE_ADDR * 8
math ZIP_SIZE_ADDR + 0x99C
goto ZIP_SIZE_ADDR
get ZIP_SIZE longset ZIP_OFFSET ZIP_SIZE_ADDR
math ZIP_OFFSET + 4comtype zlib
clog MEMORY_FILE3 ZIP_OFFSET ZIP_SIZE UNZIPED_SIZEfor i = 1 <= FRAME_COUNT
print "---------------------Frame No. %i% of %FRAME_COUNT%---------------------"getarray FRAME_POS_X 1 i
getarray FRAME_POS_Y 2 i
getarray FRAME_WIDTH 3 i
getarray FRAME_HEIGHT 4 i
put 0x00 byte MEMORY_FILE1 //identsize;
put 0x00 byte MEMORY_FILE1 //colurmaptype;
put 0x02 byte MEMORY_FILE1 // imagetype;
put 0x0000 short MEMORY_FILE1 // colourmapstart;
put 0x0000 short MEMORY_FILE1 // colourmaplength;
put 0x00 byte MEMORY_FILE1 // colourmapbits;
put 0x0000 short MEMORY_FILE1 // xstart;
put 0x0000 short MEMORY_FILE1 // ystart
put FRAME_MAX_WIDTH short MEMORY_FILE1
put FRAME_MAX_HEIGHT short MEMORY_FILE1
put 0x20 byte MEMORY_FILE1 // bits per pixel
put 0x28 byte MEMORY_FILE1 // image descriptor (101000)getarray CURRENTFRAMEOFFSET 0 i
print "Frame Offset %CURRENTFRAMEOFFSET%"If i != FRAME_COUNT
xmath next_i "i+1"
getarray CURRENTFRAMESIZE 0 next_i
getarray CURRENTFRAMESIZE_BEFORE 0 i
math CURRENTFRAMESIZE - CURRENTFRAMESIZE_BEFORE
math CURRENTFRAMESIZE / 4
print "Frame Size %CURRENTFRAMESIZE%"
Else
get CURRENTFRAMESIZE asize
print "FileSize %CURRENTFRAMESIZE%"
getarray CURRENTFRAMESIZE_BEFORE 0 i
math CURRENTFRAMESIZE - CURRENTFRAMESIZE_BEFORE
math CURRENTFRAMESIZE / 4
print "Frame Size %CURRENTFRAMESIZE%"
Endifset GOFURTHER CURRENTFRAMEOFFSET
goto GOFURTHER MEMORY_FILE3
print "Starting transferring pixels..."
for j = 0 < CURRENTFRAMESIZE
set GOFURTHER CURRENTFRAMEOFFSET
xmath GOFURTHER "GOFURTHER + (j * 4)"
goto GOFURTHER MEMORY_FILE3get ALPHA byte MEMORY_FILE3
get RED byte MEMORY_FILE3
get GREEN byte MEMORY_FILE3
get BLUE byte MEMORY_FILE3
if ALPHA == 0x00 && GREEN == 0x00 && BLUE == 0x00
for k = 0 < RED
put 0x00 byte MEMORY_FILE4
put 0xFF byte MEMORY_FILE4
put 0xFF byte MEMORY_FILE4
put 0xFF byte MEMORY_FILE4
next k
else
put ALPHA byte MEMORY_FILE4
put RED byte MEMORY_FILE4
put GREEN byte MEMORY_FILE4
put BLUE byte MEMORY_FILE4
endif
next jxmath CUR_FRAME_WIDTH_MAX "FRAME_WIDTH + FRAME_POS_X"
xmath CUR_FRAME_HEIGHT_MAX "FRAME_HEIGHT + FRAME_POS_Y"for j = 0 < FRAME_MAX_HEIGHT
for k = 0 < FRAME_MAX_WIDTH
if j < FRAME_POS_Y
put 0xFF byte MEMORY_FILE1
put 0xFF byte MEMORY_FILE1
put 0xFF byte MEMORY_FILE1
put 0x00 byte MEMORY_FILE1
elif k < FRAME_POS_X
put 0xFF byte MEMORY_FILE1
put 0xFF byte MEMORY_FILE1
put 0xFF byte MEMORY_FILE1
put 0x00 byte MEMORY_FILE1
elif CUR_FRAME_HEIGHT_MAX <= j
put 0xFF byte MEMORY_FILE1
put 0xFF byte MEMORY_FILE1
put 0xFF byte MEMORY_FILE1
put 0x00 byte MEMORY_FILE1
elif CUR_FRAME_WIDTH_MAX <= k
put 0xFF byte MEMORY_FILE1
put 0xFF byte MEMORY_FILE1
put 0xFF byte MEMORY_FILE1
put 0x00 byte MEMORY_FILE1
else
xmath CUR_POS "FRAME_WIDTH * (j - FRAME_POS_Y) * 4 + (k - FRAME_POS_X) * 4"
goto CUR_POS MEMORY_FILE4
get ALPHA byte MEMORY_FILE4
get RED byte MEMORY_FILE4
get GREEN byte MEMORY_FILE4
get BLUE byte MEMORY_FILE4put BLUE byte MEMORY_FILE1
put GREEN byte MEMORY_FILE1
put RED byte MEMORY_FILE1
put ALPHA byte MEMORY_FILE1
endif
next k
next jstring TGA_FILE_NAME = FNAME
string TGA_FILE_NAME += "_"
string TGA_FILE_NAME += i
string TGA_FILE_NAME += ".tga"
get TGA_SIZE asize MEMORY_FILE1
log TGA_FILE_NAME 0 TGA_SIZE MEMORY_FILE1
log MEMORY_FILE1 0 0
set TGA_NAME_LEN strlen TGA_FILE_NAME
putdstring TGA_FILE_NAME TGA_NAME_LEN MEMORY_FILE2
put 0x0A0D short MEMORY_FILE2print "transferring done."
next iputdstring "END_OF_LIST|" 12 MEMORY_FILE2
put 0x0A0D short MEMORY_FILE2
get INFOSIZE asize MEMORY_FILE2
string INFOFILENAME = FNAME
string INFOFILENAME += ".txt"
log INFOFILENAME 0 INFOSIZE MEMORY_FILE2print "EXPORTING COMPLETED."
-결합스크립트-
//TGATOAGF 1.0 (거리니닷컴 익명/2021/08/09) Base Script : TGATOSPR32 2.5 (루란제르/2018/08/31)
IDString "\x48\x51\x54\x45\x41\x4D\x5F\x41\x47\x46\x5F\x54\x47\x41\x5F\x49\x4E\x46\x4F\x0D\x0A"
log MEMORY_FILE1 0 0 //temporary frame file
log MEMORY_FILE2 0 0 //agf file
log MEMORY_FILE3 0 0 //unzip frame filefindloc CURRENTOFFSET string "STRIPE_NAME|"
getdstring sdummy 12 //skips unnecessary characters
getct AGFNAME string 0x0d // getting the name of sprite group.
get bdummy byte //skips an unnecessary byte, namely 0x0afindloc CURRENTOFFSET string "EXTENSION|"
getdstring sdummy 10
getct AGFEXTENSION string 0x0d #getting the original extention; .agffindloc CURRENTOFFSET string "TOTAL_FRAME_NUMBER|"
getdstring sdummy 20
getct TGACOUNT string 0x0D #getting the number of sprite group.findloc CURRENTOFFSET string "MAXWIDTH|"
getdstring sdummy 10
getct AGFWIDTH string 0x0D #getting the widthfindloc CURRENTOFFSET string "MAXHEIGHT|"
getdstring sdummy 11
getct AGFHEIGHT string 0x0D #getting the heightfindloc CURRENTOFFSET string "FRAME_BITMAP_LIST:"
getdstring sdummy 21print "name: %AGFNAME%, extension: %AGFEXTENSION%, count: %TGACOUNT%, agfwidth: %AGFWIDTH%, agfheight: %AGFHEIGHT%"
// writing header and info into the agf
put 0x23 long MEMORY_FILE2
put AGFWIDTH long MEMORY_FILE2
put AGFHEIGHT long MEMORY_FILE2
put TGACOUNT long MEMORY_FILE2
xmath PACCOUNT "2448 + (TGACOUNT * 8)"
for PAC = 0 < PACCOUNT
put 0x00 byte MEMORY_FILE2
next PAC
set AGF_ACCUMULATEDSIZE 0for i = 0 < TGACOUNT
//tga validity check
getct TGATARGETNAME string 0x0d //get the file name of a frame tga
get sdummy 1
savepos TGANAMEPOS
Open FDSE TGATARGETNAME 1
get TGAMAGIC short 1
if TGAMAGIC <> 0
print "This TGA is somewhat complicated than expected! Process terminated...(0)"
cleanexit
endif
get TGAMODE byte 1
if TGAMODE <> 0x02
print "This TGA is not in Uncompressed RGB MODE! Process terminated...(1)"
cleanexit
endif
get TGAEXTRAINFO long 1
if TGAEXTRAINFO <> 0x00
print "This TGA is somewhat complicated than expected! Process terminated...(2)"
cleanexit
endif
get TGAEXTRAINFO long 1
if TGAEXTRAINFO <> 0x00
print "This TGA is somewhat complicated than expected! Process terminated...(3)"
cleanexit
endif
get TGAEXTRAINFO byte 1
if TGAEXTRAINFO <> 0x00
print "This TGA is somewhat complicated than expected! Process terminated...(4)"
cleanexit
endif
get TGAWIDTH short 1
if TGAWIDTH <> AGFWIDTH
print "%TGAWIDTH% %AGFWIDTH%"
print "Error: The width of TGA doesn't match that of the info file! Process terminated...(5)"
cleanexit
endif
get TGAHEIGHT short 1
if TGAHEIGHT <> AGFHEIGHT
print "%TGAHEIGHT% %AGFHEIGHT%"
print "Error: The height of TGA doesn't match that of the info file! Process terminated...(6)"
cleanexit
endifget TGAPIXELDEPTH byte 1
if TGAPIXELDEPTH <> 0x20
print "This TGA is not written in 32bit! Process terminated...(7)"
cleanexit
endif
get TGADESCRIPTOR byte 1 //this can be bigger or smaller than 0x20
savepos TGA_BEENREADHERE 1
//rearranging the tga pixel to the agf's order
set TGA_GOAHEAD 0
for j = 1 <= TGAHEIGHT
if TGADESCRIPTOR >= 0x20
xmath TGA_GOAHEAD "((TGAWIDTH * 4) * (j - 1)) + TGA_BEENREADHERE"
else
xmath TGA_GOAHEAD "(((TGAWIDTH * TGAHEIGHT) * 4) - ((TGAWIDTH * 4) * j)) + TGA_BEENREADHERE"
endif
goto TGA_GOAHEAD 1
for k = 0 < TGAWIDTH
get BLUE byte 1
get GREEN byte 1
get RED byte 1
get ALPHA byte 1
put ALPHA byte MEMORY_FILE1
put RED byte MEMORY_FILE1
put GREEN byte MEMORY_FILE1
put BLUE byte MEMORY_FILE1
next k
next j//compression procedure
goto 0 MEMORY_FILE1
set AGF_TOTALCOMPRESSEDSIZE 0
set WAITHERE 0
for j = 0 < TGAHEIGHT
set TGA_MATCHEDPIXELCOUNT 0
for k = 0 < TGAWIDTH
goto WAITHERE MEMORY_FILE1
get ALPHA byte MEMORY_FILE1
get RED byte MEMORY_FILE1
get GREEN byte MEMORY_FILE1
get BLUE byte MEMORY_FILE1
savepos WAITHERE MEMORY_FILE1
set Luranzer k
math Luranzer += 1
if Luranzer != TGAWIDTH
get ALPHA2 byte MEMORY_FILE1
get RED2 byte MEMORY_FILE1
get GREEN2 byte MEMORY_FILE1
get BLUE2 byte MEMORY_FILE1
if ALPHA2 == 0x00 && TGA_MATCHEDPIXELCOUNT < 255
if k == 0
math TGA_MATCHEDPIXELCOUNT += 2
else
if TGA_MATCHEDPIXELCOUNT < 1
if ALPHA == 0x00
put 0 byte MEMORY_FILE3
put 1 byte MEMORY_FILE3
put 0 byte MEMORY_FILE3
put 0 byte MEMORY_FILE3
math AGF_TOTALCOMPRESSEDSIZE += 1
math TGA_MATCHEDPIXELCOUNT += 1
else
put ALPHA byte MEMORY_FILE3
put RED byte MEMORY_FILE3
put GREEN byte MEMORY_FILE3
put BLUE byte MEMORY_FILE3
math AGF_TOTALCOMPRESSEDSIZE += 1
math TGA_MATCHEDPIXELCOUNT += 1
endif
else
math TGA_MATCHEDPIXELCOUNT += 1
endif
endif
else
if TGA_MATCHEDPIXELCOUNT > 0
put 0 byte MEMORY_FILE3
put TGA_MATCHEDPIXELCOUNT byte MEMORY_FILE3
put 0 byte MEMORY_FILE3
put 0 byte MEMORY_FILE3
math AGF_TOTALCOMPRESSEDSIZE += 1
set TGA_MATCHEDPIXELCOUNT 0
else
if ALPHA == 0x00
put ALPHA byte MEMORY_FILE3
put 1 byte MEMORY_FILE3
put 0 byte MEMORY_FILE3
put 0 byte MEMORY_FILE3
math AGF_TOTALCOMPRESSEDSIZE += 1
set TGA_MATCHEDPIXELCOUNT 0
else
put ALPHA byte MEMORY_FILE3
put RED byte MEMORY_FILE3
put GREEN byte MEMORY_FILE3
put BLUE byte MEMORY_FILE3
math AGF_TOTALCOMPRESSEDSIZE += 1
set TGA_MATCHEDPIXELCOUNT 0
endif
endif
endif
else
if TGA_MATCHEDPIXELCOUNT > 0
put 0 byte MEMORY_FILE3
put TGA_MATCHEDPIXELCOUNT byte MEMORY_FILE3
put 0 byte MEMORY_FILE3
put 0 byte MEMORY_FILE3
math AGF_TOTALCOMPRESSEDSIZE += 1
else
if ALPHA == 0x00
put ALPHA byte MEMORY_FILE3
put 1 byte MEMORY_FILE3
put 0 byte MEMORY_FILE3
put 0 byte MEMORY_FILE3
math AGF_TOTALCOMPRESSEDSIZE += 1
else
put ALPHA byte MEMORY_FILE3
put RED byte MEMORY_FILE3
put GREEN byte MEMORY_FILE3
put BLUE byte MEMORY_FILE3
math AGF_TOTALCOMPRESSEDSIZE += 1
endif
endif
endif
next k
next j
log MEMORY_FILE1 0 0
xmath AGF_GOAHEAD "1220 + (i * 4)"
goto AGF_GOAHEAD MEMORY_FILE2
get AGF_FRAMEOFFSET asize MEMORY_FILE3
put AGF_FRAMEOFFSET long MEMORY_FILE2xmath AGF_GOAHEAD "2420 + (i * 8)"
goto AGF_GOAHEAD MEMORY_FILE2
put AGFWIDTH short MEMORY_FILE2
put AGFHEIGHT short MEMORY_FILE2
next iget UNZIPSIZE asize MEMORY_FILE3
xmath AGF_GOAHEAD "2416 + TGACOUNT * 8"
goto AGF_GOAHEAD MEMORY_FILE2
put UNZIPSIZE long MEMORY_FILE2xmath UNKWIDTH "AGFWIDTH * TGACOUNT"
put UNKWIDTH long MEMORY_FILE2
put AGFHEIGHT long MEMORY_FILE2
put 0x00000000 long MEMORY_FILE2//실제 이미지가 사용되는 메모리의 크기로 추정 됨
put AGFWIDTH long MEMORY_FILE2
put AGFHEIGHT long MEMORY_FILE2
put UNKWIDTH long MEMORY_FILE2
put AGFHEIGHT long MEMORY_FILE2log MEMORY_FILE1 0 0
comtype zlib_compress
clog MEMORY_FILE1 0 UNZIPSIZE UNZIPSIZE MEMORY_FILE3get POS_END asize MEMORY_FILE2
math POS_END - 4
goto POS_END MEMORY_FILE2
get ZIPSIZE asize MEMORY_FILE1
put ZIPSIZE long MEMORY_FILE2goto 0 MEMORY_FILE1
for i = 0 < ZIPSIZE
get ZIPBYTE byte MEMORY_FILE1
put ZIPBYTE byte MEMORY_FILE2
next istring OUTPUTNAME == AGFNAME
string OUTPUTNAME += "."
string OUTPUTNAME += AGFEXTENSION
get AGFRESULTSIZE asize MEMORY_FILE2
log OUTPUTNAME 0 AGFRESULTSIZE MEMORY_FILE2
-투명도 조절- : 결과 파일에서 이름의 마지막 "_" 을 지우고 사용
//AGF 투명도 설정 1.0 (거린이닷컴 익명/2021/08/09)
IDString "\x23\x00\x00\x00"//투명도 설정 ( 1 ~ 255 낮을수록 투명 높을수록 불투명 )
set INVISIBILITY_RATE 1log MEMORY_FILE1 0 0 //TGA file
log MEMORY_FILE2 0 0 //Invisiblity TGA
log MEMORY_FILE3 0 0 //Unziped Memory
log MEMORY_FILE4 0 0 //Temporary Frame Fileget FNAME basename
get EXTNAME extensiongoto 0x0C
get FRAME_COUNT longset UNZIPED_SIZE_ADDR FRAME_COUNT
math UNZIPED_SIZE_ADDR * 8
math UNZIPED_SIZE_ADDR + 0x970
goto UNZIPED_SIZE_ADDR
get UNZIPED_SIZE longset ZIP_SIZE_ADDR FRAME_COUNT
math ZIP_SIZE_ADDR * 8
math ZIP_SIZE_ADDR + 0x99C
goto ZIP_SIZE_ADDR
get ZIP_SIZE longset ZIP_OFFSET ZIP_SIZE_ADDR
math ZIP_OFFSET + 4comtype zlib
clog MEMORY_FILE3 ZIP_OFFSET ZIP_SIZE UNZIPED_SIZEget ALL_FRAME asize MEMORY_FILE3
math ALL_FRAME / 4goto 0
for i = 0 < ZIP_SIZE_ADDR
get ORIG_BYTE byte
put ORIG_BYTE byte MEMORY_FILE2
next iprint "start invisibility"
for i = 0 < ALL_FRAME
xmath GOFURTHER "i * 4"
goto GOFURTHER MEMORY_FILE3get ALPHA byte MEMORY_FILE3
get RED byte MEMORY_FILE3
get GREEN byte MEMORY_FILE3
get BLUE byte MEMORY_FILE3
if ALPHA == 0x00 && GREEN == 0x00 && BLUE == 0x00
put ALPHA byte MEMORY_FILE4
put RED byte MEMORY_FILE4
put GREEN byte MEMORY_FILE4
put BLUE byte MEMORY_FILE4
else
put INVISIBILITY_RATE byte MEMORY_FILE4
put RED byte MEMORY_FILE4
put GREEN byte MEMORY_FILE4
put BLUE byte MEMORY_FILE4
endif
next ilog MEMORY_FILE3 0 0
comtype zlib_compress
clog MEMORY_FILE3 0 UNZIPED_SIZE UNZIPED_SIZE MEMORY_FILE4get NEW_ZIP_SIZE asize MEMORY_FILE3
put NEW_ZIP_SIZE long MEMORY_FILE2goto 0 MEMORY_FILE3
for i = 0 < NEW_ZIP_SIZE
get ZIP_BYTE byte MEMORY_FILE3
put ZIP_BYTE byte MEMORY_FILE2
next iget INVISIBLE_FILE_SIZE asize MEMORY_FILE2
string INVISIBLE_FILE_NAME = FNAME
string INVISIBLE_FILE_NAME += "_."
string INVISIBLE_FILE_NAME += EXTNAME
log INVISIBLE_FILE_NAME 0 INVISIBLE_FILE_SIZE MEMORY_FILE2print "COMPLETED."
reference : https://gerinee.com/g/gersang/9679?c=tip
윈도우 배치 스크립트로도 안되는 게 없군요
저는 타입스크립트로 작성 하였는데요 반성합니다
사랑합니다