Ofuscating help!!!!!!!!! (I think...)

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Message
Author
monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

#16 Post by monele »

Hmm... Ok, checked the files and I realize the only problem is that I used Python to launch the original scripts. So here's what my file "archive_audio.bat" is like :

Code: Select all

C:\Python24\python ..\tools\archiver.py audio *.wav *.mp3 *.ogg
Knowing that the .bat is in the /game folder and that I have Python 2.4 installed at C:\Python24.

For images :

Code: Select all

C:\Python24\python ..\tools\archiver.py images *.jpg *.png *.gif
I guess it could work with Python 2.3, and I think there was a way to use Ren'Py itself to launch these but hm... seems I didn't make it work ^^;

Ukio
Regular
Posts: 29
Joined: Sat Aug 05, 2006 8:23 pm
Location: Argentina
Contact:

#17 Post by Ukio »

Well... It's more clear for me than the manual.. jejjeje
I will install Python SDK and I will try one more time :) THANX MY FRIEND!!!

edit:
I think the manual is in need of examples... It's just my opinon but... the simple html page that comes with the download it's very confuse for people without coding skills (like me...) ... Just a comment... 8)
Image
FEAR MY SKIRT, PREPARE FOR MY LEGS!

shaja
Regular
Posts: 73
Joined: Sun Oct 16, 2005 8:34 am
Contact:

#18 Post by shaja »

A full Python install should not be necessary, actually.

The various tool batch files call console.exe in the main directory, which can be used to execute any python code that doesn't call library modules that aren't available in Ren'Py.

You can call it directly by (for example) in a cmd window, from the main renpy directory:

Code: Select all

console --python tools\dump_text.py

User avatar
DaFool
Lemma-Class Veteran
Posts: 4171
Joined: Tue Aug 01, 2006 12:39 pm
Contact:

#19 Post by DaFool »

After playing Adorya's demo, I noticed that the audio.rpa was pretty big, while the Jigoku Shoujo mp3 was outside. I have a feeling those are .wav sound effects.

I tried an experiment and obfuscated the sounds in GCCh1M to also create an audio.rpa. I converted the 'click' sound from .wav to .ogg and made sure to change the referring calls in the script.

The result? The 'click' sound works, but the midi sound effects and music don't work anymore. Otherwise there is no complaint.

I guess that obfuscating sounds is limited to .wav, ogg, and *perhaps* .mp3?, but not midi?

This is the only line I modified:
$ config.archives = [ 'images','audio' ]

The sound files were declared within the process, not at the beginning like the images and in particular the 'click' sound. Perhaps if I declare them in the beginning, they should work?

edit: I added .mp3 to the archives. It and .ogg works from in-process calls. But midi files do not play from archive.

Thing is, I still haven't figured out how to export my midi files into wavs/mp3s/oggs. So I'm really concerned now.

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#20 Post by PyTom »

You can use a tool known as timidity to turn midi into various other formats. IIRC, there is a windows port of it.

(Hm... midi in rpa _should_ work. I'll check out why it's failing at some point.)
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Ukio
Regular
Posts: 29
Joined: Sat Aug 05, 2006 8:23 pm
Location: Argentina
Contact:

#21 Post by Ukio »

shaja wrote:A full Python install should not be necessary, actually.

The various tool batch files call console.exe in the main directory, which can be used to execute any python code that doesn't call library modules that aren't available in Ren'Py.

You can call it directly by (for example) in a cmd window, from the main renpy directory:

Code: Select all

console --python tools\dump_text.py
Well... after some tests... I have a good ending for all this... :P
Your help was very important to me and now I have a solution:

taking your post as an example and comparing with Ren'Py help, I try to make a working bat file. Here's what my final file "archive_images.bat" is like:

Code: Select all

C:\renpy-5.5.2b\console --python tools\archiver.py images *.png *.jpg
And this is for the no-coding-skill-people, like me jejejeje :oops: :
The "C:\renpy-5.5.2b" is were I installed my Ren'Py distribution. "images" is the name of the final obfuscated file (the tool add the extension). And "*.png *.jpg" is the extension of files to search for (the asterisc is for "any name").
This BAT file works when I put it in my game folder. If I have my game folder in other place (example: C:/my documents/mygame) the tool works cool!!! The BAT file always know where to search for the tools.

So, I try obfuscating all kind of files (jpg, png, gif, wav, ogg, xm, etc.) and all work good in my game. So... EUREKA!! :D problem fixed jejejje
And yes... a full Python install is not necessary...
If one need to archive sound, well... just change "archiver.py" for the correct tool.


And in the end of this post... my BIG THANXXXX to all for help me with this...
GOOD SAVE REN'PY!!! (and PyTom, monele, Sakuya, DaFool.... for come here to help with this little/big problem for me... jejej)
THANXXXX!!!!!!! now I can resume the making of my little game...
Image
FEAR MY SKIRT, PREPARE FOR MY LEGS!

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#22 Post by PyTom »

I strongly recommend against archiving ttf files, as that tends not to work exactly right.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Post Reply

Who is online

Users browsing this forum: Alex, Google [Bot]