cannon / quickpack Goto Github PK
View Code? Open in Web Editor NEWUtility for quickly packing dependencies in Half-Life 2 BSP maps.
Utility for quickly packing dependencies in Half-Life 2 BSP maps.
This may just be because of the size of the map I'm trying to pack, but python seems to run out of memory while the program is running.
The program creates its temp directory, then appears to be working for a couple minutes, then it crashes with the MemoryError.
Here is the full output of the script:
QuickPack v1.41 by Jackson Cannon - https://github.com/cannon/quickpack
Reading br_testmap.bsp...
Traceback (most recent call last):
File "QuickPack.py", line 472, in
main()
File "QuickPack.py", line 112, in main
read_staticprop_lump(bsp_file)
File "QuickPack.py", line 399, in read_staticprop_lump
prop = readcstr(bsp_file)
File "QuickPack.py", line 190, in readcstr
return ''.join(itertools.takewhile('\0'.ne, toeof))
MemoryError
Thanks.
EDIT: The map file itself is about 24 megabytes and the sum of the materials that need packing are around 200 MB.
C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\csgo>QuickPack.py "C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\maps\zm_natalyas_cottage.bsp"
QuickPack v1.63 by Jackson Cannon - https://github.com/cannon/quickpack
Reading zm_natalyas_cottage.bsp...
Traceback (most recent call last):
File "C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\QuickPack.py", line 612, in <module>
main()
File "C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\QuickPack.py", line 167, in main
read_staticprop_lump(bsp_file)
File "C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\QuickPack.py", line 529, in read_staticprop_lump
prop = readcstr(bsp_file)
File "C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\QuickPack.py", line 276, in readcstr
return (b''.join(itertools.takewhile(b'\0'.__ne__, toeof))).decode("utf-8")
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8c in position 2: invalid start byte
I don't know what needs to be done to fix this, but maybe a simple fix would be to add better error information? If I knew which file was causing the error to be thrown then maybe I could modify or delete it. I'd try to fix this myself and submit a PR, but I've never touched Python before, so I'm out of my element.
the vmt:
VertexLitGeneric { $baseTexture "models/props_urban/porch_light001.vtf" }
the vtf is not packed in bsp, i think the problem is our script can't parse "xx.vtf".
can you fix this?
i apologize for the non-descriptive title. idk how else to title this issue. the packing simply doesn't work at all and spits out this error:
Traceback (most recent call last):
File "QuickPack.py", line 612, in <module>
main()
File "QuickPack.py", line 152, in main
zf = zipfile.ZipFile("maps/quickpacktemp.zip")
File "C:\Program Files (x86)\Python38-32\lib\zipfile.py", line 1250, in __init__
self.fp = io.open(file, filemode)
FileNotFoundError: [Errno 2] No such file or directory: 'maps/quickpacktemp.zip'
Forgive my broken english.
Your tool its really good , but still have some defect.
Like it can't packup:
(*\csgo\maps\mapname.kv)
(*\csgo\resource\overviews\mapname.txt)
(*\csgo\resource\overviews\mapname_radar.dds)
(*\csgo\resource\overviews\mapname_radar_spectate.dds)
(*\csgo\resource\overviews\mapname_lower_radar.dds)
(*\csgo\resource\overviews\mapname_higher_radar.dds)
Hope you can make 'quickpack' more closer in 'perfect'
Have a nice day ๐
Fix: Not packing skybox, detail sprites
Fix: Not packing decals
Add: Only pack used skins in static props
Add: Only pack used skins in entities OPTIONALLY
Hey, I have little experience using the command prompt. Essentially none. Apologies if I say anything stupid. So anyway, I entered:
C:\Users(me)>QuickPack.py "C:\Program Files (x86)\Steam\steamapps\common\Portal 2\portal2\maps\customstuff.bsp"
And it said:
QuickPack v1.4 by Jackson Cannon - https://github.com/cannon/quickpack
Reading customstuff.bsp...
Finding dependencies...
Traceback (most recent call last):
File "C:\Users(me)\QuickPack.py", line 467, in
main()
File "C:\Users(me)\QuickPack.py", line 128, in main
newitems,deletethis = check_file(file)
File "C:\Users(me)\QuickPack.py", line 230, in check_file
content = shlex.split(file.read().lower())
File "C:\Python27\lib\shlex.py", line 279, in split
return list(lex)
File "C:\Python27\lib\shlex.py", line 269, in next
token = self.get_token()
File "C:\Python27\lib\shlex.py", line 96, in get_token
raw = self.read_token()
File "C:\Python27\lib\shlex.py", line 172, in read_token
raise ValueError, "No closing quotation"
ValueError: No closing quotation
And I have no idea what to do with that error. Help?
When you create a game_text entity to put text on the screen, and use '\n' within the message text to split the text into two lines, the script fails. You can view the error message I get here.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.