Log In  

I was looking at the Pico-8 changelog and saw that themes were made easier to change. this got me thinking, how hard would it be to make a custom theme, or even accompanying thememaker.exe program? this seemed really cool to me, so i threw myself headfirst into pico-8's files. here are my findings/questions i have.

Firstly, in "pico8.dat" i found that it not only contains data code which i have no idea what it contains, but it also contains a lot of pico-8 code! after a bit of digging, i found that in this order, this pico-8 code is:

1: the pico-8 boot sfx
2:pico-8 democarts
3: i have no clue

I also found around 5 copies of the same lines of terminal syntax (eg 'ls' 'folder' 'load' etc.), which is interesting. i was mainly looking for the color codes that tell pico-8 what colors certain UI elements are, but i could not find them. they had to be in the mess of .dat stuff.

After awhile, i found that pico8.dat is byte-checked, meaning that pico-8 wont boot if pico8.dat has been altered at all. makes sense, it would significantly impact monetary gain if everyone could just write their own pico-8.

after not knowing what to do next, i decided to open pico-8.exe in vscode. i found a lot of terminal command syntax, and licenses for open-source libraries. perfectly normal. i still could not find byte-checks or color codes for UI.

I decided that my next step/idea was to figure out what kind of .dat file pico8.dat was. i saw that it mentions a "POD" file, so thats what i went off of. i could not find anything. i then booted pico-8 and looked in the log.txt. i then saw something interesting. pico-8 seems to be using "CODO" to load files. this "CODO" returned no relevant results online, so i decided just to watch it do its thing. it seems to simply load pico-8, config.txt, the controller thing and also pico8.dat. the most interesting part is that this "CODO" refers to pico8.dat as a "POD" file, which i also cant find anywhere.

If anyone has any ideas of what a "CODO pod file" is, then let me know. if this is scary to you @zep and you dont want pico8 to be decompiled by some sleep-deprived idiot (myself) then ill gladly stop. if not, then custom themes is my next project of anyone wants to help!

P#133373 2023-08-22 03:39

"pod" is the file type of pico-8 games when built for standalone offline use. They're generated when you export the standalone build for anything other than html.

"codo" is also in the executable for playing pod files when exported for windows, and with word sequences that look to me like a middle-ware layer, so most likely it's the architecture placed on top of SDL2 to make using SDL2's functionality easier.

That said, if all you're trying to do is change the color palette, that's easy and it's in the "pod" files. I just checked on one of my own games, and for exported games changing the palette is easy and doesn't cause problem. I'll let you find the spot yourself, since it seems like you enjoy such things. If you're trying to change which colors within the palette that each UI element gets, then that's probably going to be in compressed data within the .dat file, and using their palette index to represent them. There's probably ways to reach that code and look at it within pico-8, but I'll refrain from saying anything more unless zep gives permission.

P#133377 2023-08-22 10:14

[Please log in to post a comment]