Hello /g/, /jp/sie here.
I need help with something regarding programming:
I am looking to hack a game engine to make a translation for a VN. specifically, what i am looking to do is to make a repacker using the source code of the unpacker, which is here:
https://github.com/vn-tools/arc_unpacker/tree/master/src/dec/purple_software
The problem is that i have close to zero knowledge about programming.
Now, I'm not asking for someone to do this for me, rather, i just need some questions answered:
>I know that i need to learn C++, but how much do i need to learn to even attempt this?
>Do i need to learn any additional language?
>Some programmer i consulted with said this code was a mess. But by how much is it?
bump because i actually want to learn programming.
>implying anyone here is actually a programmer
Unfortunately, no one in /g/ knows how to program. We’re just fat nerds who like to rice our phones and spend our days tinkering with arch linux
Firstly you'll have to install archlinux as your OS
that's a pretty serious goal for someone who's just starting! check out this thread https://pirates-forum.org/Thread-1000-How-to-repack-PC-games
>>59352132
Print out the dialog on paper and put it front of the screen the record it using your phone
>>59352132
Don't give up
>>59352132
If you can figure out the file format for your VN, you don't need to learn C++. If you know the format and how it should be packed, it may be better to use Python.
So you want to unpack content, modify them and then repack them so that the game can work with them. Is this right?
You posted a repository which contains decoders for the file formats used in visual novels. There is an encoder tree in that repository but sadly its contents don't match the decoders; there seems to be no encoder for purple_software archives.
You'd have to write an encoder for the archive format. That means your task is to take a whole bunch of images and bundle them up in a single file, according to some complicated rules. Forget about C++ for a moment. Not only do you have to accomplish the complicated task of understanding the file format's structure, but you also have to deal with the numerous pitfalls of I/O programming.
Look at the absurdity that is this file:
https://github.com/vn-tools/arc_unpacker/blob/master/src/dec/purple_software/cpz5_archive_decoder.cc
Now think about how you'd reverse this process. It's hard. Your best bet is to look around for an existing cpz5 encoder.
>this code was a mess
At first I thought it was just the general "programmers find it hard to read people's code" problem, but in this case he's right. Code that deals with binary file formats are extremely complicated. A huge number of security holes are born due to bugs in the complex binary file format decoding layer.
As someone who's parsed PDFs, audio files, etc. Don't underestimate the task.
>>59353611
I've searched around, there are no other encoders.
It was never my intention to underestimate the process of doing this. I am willing to tackle whole books of C++ and various months of learning not only because of this, but for simply being able to code myself which is something that has always been in the back of my mind since forever, but never actually willed myself to learn until today.
>>59353611
To add to that, if you want to truly understand a specific programs data format, you should also learn reverse engineering including Assembly language.
>>59354570
Alright. Your best bet is to research the nature of binary file formats in general, and then specific structures such as archives.
From a quick reading of the decoder, directories seem to be present in the cpz5 format. Your encoder will have to generate directory entries for the files that will be inside the archive. The decoder will use that information to find where in the archive each individual file is, so you have to get it right or risk corruption of data. You must understand what they are used for and how to generate them in the specific way the cpz5 format wants them.
I learned C++ as my first language using these tutorials:
http://www.cplusplus.com/doc/tutorial/
C++ is not necessary for this job. You can just as easily use high level languages such as Python. Indeed, last time I wanted to extract some CG from VNs, I adapted some Python2 code to Python3 and made it work.