-
Content Count
7 -
Joined
-
Last Visited
Community Reputation
8 GoodAbout Tailgunner
-
Rank
Freshman
-
CRP file Unpacker prototype
Tailgunner replied to tony56a1's topic in Cities: Skylines Modding - Open Discussion
allright i will change it to byte[] for the previews and back to magick for the textures and make it load lazy so it only croaks when somebody accesses textures and the magick lib isn't there. that way you can keep the parser slick and when somebody needs the texture stuff /(s)?he/ can add the magick lib. i'll do installers with and without. btw, tony if you want to continue on, please feel free to merge my changes. I refactored quite a bit and it's quite more friendly for unit tests imho. edit: oh, and because i added one unit test already (along with the test project).- 45 Replies
-
- cities skylines
- crp
-
(and 1 more)
Tagged with:
-
CRP file Unpacker prototype
Tailgunner replied to tony56a1's topic in Cities: Skylines Modding - Open Discussion
Mmh. Allright, I will think about that.- 45 Replies
-
- cities skylines
- crp
-
(and 1 more)
Tagged with:
-
CRP file Unpacker prototype
Tailgunner replied to tony56a1's topic in Cities: Skylines Modding - Open Discussion
those textures are png format anyway. turning the byte array into a usable image is as simple as private static BitmapImage LoadImage( byte[] imageData ) { return LoadImage( new System.IO.MemoryStream( imageData ) ); } private static BitmapImage LoadImage( Stream stream ) { try { var i = new BitmapImage(); i.BeginInit(); i.StreamSource = stream; i.EndInit(); i.Freeze(); return i; } catch { return null; } }- 45 Replies
-
- cities skylines
- crp
-
(and 1 more)
Tagged with:
-
CRP file Unpacker prototype
Tailgunner replied to tony56a1's topic in Cities: Skylines Modding - Open Discussion
Works fine for me. There are no references to the Magick library anymore, so they hardly can throw an error. I'm pretty sure something has been mixed up during install. Try re-installing while making sure the extractor isn't running. Meh, I packed outdated files into the installer. That is now corrected. Also: corrected link above.- 45 Replies
-
- 2
-
-
- cities skylines
- crp
-
(and 1 more)
Tagged with:
-
CRP file Unpacker prototype
Tailgunner replied to tony56a1's topic in Cities: Skylines Modding - Open Discussion
And some more tinkering. I removed the dependency of the ImageMagick Library, it was 10 MB fat! Now uses byte[]. new installer: https://github.com/clausthaler-devel/crp-parser/blob/master/Installer/CRP-Extractor-0.2-Setup.exe?raw=true- 45 Replies
-
- 1
-
-
- cities skylines
- crp
-
(and 1 more)
Tagged with:
-
CRP file Unpacker prototype
Tailgunner replied to tony56a1's topic in Cities: Skylines Modding - Open Discussion
And some more tinkering. While above tinkerings focus the developer sense of smugness, the following changes will appeal to the common user. The code now contains a windows app, as well as a (now working) command line tool to extract crp files. With both you can chose the output directory. Also some minor improvements to the code. Oh and I added a fincy fancy belly whistely installer for the clicky people. screenie:- 45 Replies
-
- 4
-
-
- cities skylines
- crp
-
(and 1 more)
Tagged with:
-
CRP file Unpacker prototype
Tailgunner replied to tony56a1's topic in Cities: Skylines Modding - Open Discussion
I have tinkered around with the code a bit. My fork mainly introduces a AssetInfo object that gets returned by parseFile and bundles the parsed data. So you can say var info = new CrpDeserializer(path).parseFile(); var name = info.metadata["name"]; var preview = info.images[1]; etc. Here's the link: https://github.com/clausthaler-devel/crp-parser/tree/master/CRPParser- 45 Replies
-
- 1
-
-
- cities skylines
- crp
-
(and 1 more)
Tagged with:
