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
Ukio
Regular
Posts: 29
Joined: Sat Aug 05, 2006 8:23 pm
Location: Argentina
Contact:

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

#1 Post by Ukio »

Well... I download the last version of Ren'Pay.... I make my game... I fight with the engine... and...
I read an article somewere and read about a program to pack the images of my game... well, that tool don´t come with my download... :shock:
I have the DOS tool in the directory but I don't know how to run this...!!!
Yeah... I know... maybe I'm a little stupid but... I NEEDDDD HELLLPPP!!!!
Please come to my rescue Oh! gods of the coding!!!!!!!
Were I can download the especific tool? :?

PD1: Again... sorry about my english.... :oops:
PD2: Sorry... I'm a cartoonist without coding skills...
Last edited by Ukio on Thu Aug 10, 2006 8:44 pm, edited 1 time in total.
Image
FEAR MY SKIRT, PREPARE FOR MY LEGS!

Sakuya
Newbie
Posts: 19
Joined: Mon Jul 31, 2006 5:58 pm
Location: United States
Contact:

#2 Post by Sakuya »

I think the DOS file is probably the same as the BAT file. And you probably do it the same way as said in the tutorial? Or am I wrong? I haven't gone that far yet.

While on the subject, does the tool obfuscate music and script files too?

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:

#3 Post by PyTom »

To archive images, go into the tools/ directory and run game_archive_images.bat. This will archive all of the png, gif, and jpg images in the game directory. You also need to add the lines:

Code: Select all

init:
     $ config.archives = [ 'images' ]
to your game. You can then move the png, gif, and jpg files out of the game directory, run your game, and the game will still work.

To obfuscate script files, just ship the .rpyc files instead of the .rpy files. The .rpyc files are an obfuscated form of the .rpy files. .rpyc files are automatically generated when .rpy files change, but if the .rpy files are not present, Ren'Py will operate fine from just the .rpyc files.

You can add music to the archive by editing game_archive_images.bat, and changing it so that *.mp3, *.ogg, or whatever extensions you use are added to the archive. Once that's done, you can run the batch file, and everything will be archived.

Oh, and make backups. When moving stuff around like this, you could inadvertently delete something. Making backups is a good way to prevent this. Only you can prevent data loss.
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

Sakuya
Newbie
Posts: 19
Joined: Mon Jul 31, 2006 5:58 pm
Location: United States
Contact:

#4 Post by Sakuya »

Where will the obfuscated file be stored? Is it still in the game folder?

If I typed the code so that it will store both JPG, PNG, MP3, OGG, etc. Will it still work that way? Or must images and music be seperate?

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:

#5 Post by PyTom »

The archive file must be in the game folder. You can put any file you want in an archive file, except for script (.rpyc) files. (Those can be put in, but it is a little more difficult, so it is probably not worth it.)
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:

DOS and BATs

#6 Post by Ukio »

Sakuya wrote:I think the DOS file is probably the same as the BAT file. And you probably do it the same way as said in the tutorial? Or am I wrong? I haven't gone that far yet.
Yes friend... I do all in the manual but... well... I cannot run the BAT file in the Tools folder.
I get an error... something like "bad folder or file name". And the tool don`t create the files in the game folder... Maybe is a Window problem... (one more... jejje).
Well... I think that this tool is fundamental to make my game... I don't want people stealing my work (it's more common than you think...).

Resuming: I do a double click on the bat file and I get an error message in the DOS prompt. I think i'm doing something wrong... :? well.. I don't know... No one get this error as far as I know...

Well... I think that I have to return to my comics until I have some solutions... but thanx all for the help... I you have more jejje Thanx in advance... :)
Image
FEAR MY SKIRT, PREPARE FOR MY LEGS!

Sakuya
Newbie
Posts: 19
Joined: Mon Jul 31, 2006 5:58 pm
Location: United States
Contact:

#7 Post by Sakuya »

Okay, I just tried it the old DOS way and found the same error you did. But, when I merely double-clicked on the BAT file in the tools, it did everything it was supposed to and outputted a "images.rpa" file in the Game folder. :lol:

The demo game works without all the images in the Game folder. However, because it didn't archive the music, the music does not play.

Problems:
1. I cannot find the so-called "imagse.rpi" that supposedly outputs.

2. The BAT file only archives the images but since I double-clicked on the BAT file, I cannot edit it so that it archives the music too.

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:

#8 Post by PyTom »

Ukio >>> Which version of Windows are you using?

Sakuya >>> The .rpi file isn't created any more, just the .rpa one. If the docs mention .rpi, they are in error (please let me know where so we can fix it).

To edit a batch file, right click on it and pick edit.
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

Sakuya
Newbie
Posts: 19
Joined: Mon Jul 31, 2006 5:58 pm
Location: United States
Contact:

#9 Post by Sakuya »

Ok, thanks. I noticed there's a TTF font file in the demo game's Game folder. Would I have to archive it as well? And I would use that same lind of code again and again for images, music, fonts, etc?

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:

#10 Post by PyTom »

Archiving .ttf fonts can lead to problems. So don't archive that, just leave it out in the game directory.
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:

#11 Post by Ukio »

Well... jejje I'ts me again... :oops:
If you are tired just tell me jejejje :)
PyTom wrote:Ukio >>> Which version of Windows are you using?
Well... sometimes Windows XP but I prefer Window 98 second edition with the last actualizations installed... so this is the OS I use to make my game with Ren'Py... All work cool but this... :oops: ( yeah I know... jejje I'm a old fashioned boy... jejje)

------------

In the manual you say:
Images can be archived using the tools/archiver program that ships as part of Ren'Py. To use this, one can change into the game directory and run a command like:

../tools/archiver images *.png *.jpg

Alternatively on Windows, one can run tools/game_archive_images.bat directly, which will do the same thing.
Can you explain me this more in deept?

For example:
If I have in the game folder this images files (C:\renpy-5.5.2b\game):
image001.png
image002.png
image003.jpg
image004.jpg
How can I obfuscate this? Maybe a practical example of use under Window?

If I make double click on game_archive_images.bat I get this error in the DOS screen:

Code: Select all

C:\renpy-5.5.2b\tools>cd ..\game

C:\renpy-5.5.2b\game>call ..\tools\archiver.bat images *.png *.jpg *.gif
Bad command or file name
C:\renpy-5.5.2b\game>pause
Press any key to continue . . .
And nothing is archived in the game folder... :(
Maybe I need to run game_archive_images.bat with command line or something? Or move the Tools folder to the game folder?!
Image
FEAR MY SKIRT, PREPARE FOR MY LEGS!

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

#12 Post by Ukio »

One more...In this site http://www.renaigames.net/dev_renpy5.html, I found this text in a tutorial:
As mentioned earlier in What's What: Files and Folders, you will have to use a file called archiver.exe (for Windows users) or archiver.py (for Unix/Linux and Mac users) found in the same folder as your run_game.exe file. When run, archiver will take all the images you specified and create a single file called images.rpi and images.rpa. These two will be all you need to put into your image folder upon release. Great, huh?
Well... I don't have an "archiver.exe" file in my download of Ren'Py.. :? Why?
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:

#13 Post by PyTom »

That's a little out of date. Archiver.exe became tools/archiver.bat, as part of a cleanup of Ren'Py a little while ago.
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

monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

#14 Post by monele »

Note : I couldn't use any of the .bat files when I was under Windows 98... so that's why it doesn't work. Basically, these files use commands not found in Win98. I had to make my own... Mh... I guess I could post these here if you need it ô_o

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

#15 Post by Ukio »

monele wrote:Note : I couldn't use any of the .bat files when I was under Windows 98... so that's why it doesn't work. Basically, these files use commands not found in Win98. I had to make my own... Mh... I guess I could post these here if you need it ô_o
YES YES!!! please! Post that!!!! that could be very useful to me!!!!!!!! :P (and other people too...)

PD: well... I think I have a problemmmmm with Windows 98... (one more time... uf!) :cry:
PyTom wrote:That's a little out of date. Archiver.exe became tools/archiver.bat, as part of a cleanup of Ren'Py a little while ago.
OK Sensei... roger that! :) Thanxs for the help...! :) GOD SAVE REN'PAY!!! (and PyTom too.. jjeje)
Image
FEAR MY SKIRT, PREPARE FOR MY LEGS!

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Majestic-12 [Bot]