No longer active

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.
Post Reply
Message
Author
User avatar
sil3nt600
Newbie
Posts: 10
Joined: Sun Apr 28, 2013 9:02 am
Contact:

No longer active

#1 Post by sil3nt600 »

No longer active
Last edited by sil3nt600 on Sat Dec 24, 2016 9:17 am, edited 2 times in total.

User avatar
Kato
Miko-Class Veteran
Posts: 649
Joined: Tue Jan 15, 2013 4:45 am
Projects: Memories of Summer Winds
Organization: Blue Sphere Group
Location: Perth, Western Australia
Contact:

Re: Hiding content in released game

#2 Post by Kato »

You can archive information to stop people copying your files (though if they really want in, they'll get in regardless what you do).

Copied from RenPy.org
Ren'Py supports combining files into a simple archive format. While not very secure, this protects files from casual copying.

By default, all files classified into the "archive" file list will be placed in an archive.rpa archive, which is included in the all file list.

By calling build.archive, it's possible to declare a new archives and the file lists they will be included in. (It's rare to use anything but the all file list, however.) To use an archive, classify files into a list with its name.

For example, the following code will archive images in images.rpa, and game scripts into scripts.rpa:

Code: Select all

# Declare two archives.
build.archive("scripts", "all")
build.archive("images", "all")

# Put script files into the scripts archive.
renpy.classify("game/**.rpy", "scripts")
renpy.classify("game/**.rpyc", "scripts")

# Put images into the images archive.
renpy.classify("game/**.jpg", "images")
renpy.classify("game/**.png", "images")
If an archive file is empty, it will not be built.

Please think twice about archiving your game. Keeping files open will help others run your game on future platforms - platforms that may not exist until after you're gone.
Hope this helps!
Image Image
Kato, Producer & Programmer for Blue Sphere Group. Current Projects: Memories of Summer Winds

pwisaguacate
Veteran
Posts: 356
Joined: Mon Mar 11, 2013 11:03 pm
Contact:

Re: Hiding content in released game

#3 Post by pwisaguacate »

[deleted] Kato beat me there. Also, users would be able to grab screenshots (or record audio etc.) off the game itself anyways.

Don't forget to include some sort of note that your works are not to be modified/distributed in any form.

User avatar
sil3nt600
Newbie
Posts: 10
Joined: Sun Apr 28, 2013 9:02 am
Contact:

No longer active

#4 Post by sil3nt600 »

No longer active
Last edited by sil3nt600 on Sat Dec 24, 2016 9:17 am, edited 1 time in total.

pwisaguacate
Veteran
Posts: 356
Joined: Mon Mar 11, 2013 11:03 pm
Contact:

Re: Hiding content in released game

#5 Post by pwisaguacate »

pwisaguacate wrote:Clarification

You If you haven't yet, click on "Build Distributions" and hit yes when it asks you if you would like to add build information to the end of options.rpy. Then add whatever lines needed at the bottom of options.rpy:

Code: Select all

    ## Classify files as None to exclude them from the built distributions.

    build.classify('**.rpy', None)
    build.classify('**~', None)
    build.classify('**.bak', None)
    build.classify('**/.**', None)
    build.classify('**/#**', None)
    build.classify('**/thumbs.db', None)
    
    ## To archive files, classify them as 'archive'.
    
    build.classify('game/**.png', 'archive')
    build.classify('game/**.jpg', 'archive')
    build.classify('game/**.ogg', 'archive')
The exact above code will exclude .rpy files from the built distributions, and archive.rpa will be built with all .png .jpg .ogg files in your game folder stored in it.
* http://lemmasoft.renai.us/forums/viewto ... 64#p266495

So yes, it's located at the bottom of options.rpy.

User avatar
sil3nt600
Newbie
Posts: 10
Joined: Sun Apr 28, 2013 9:02 am
Contact:

No longer active

#6 Post by sil3nt600 »

No longer active
Last edited by sil3nt600 on Sat Dec 24, 2016 9:17 am, edited 1 time in total.

pwisaguacate
Veteran
Posts: 356
Joined: Mon Mar 11, 2013 11:03 pm
Contact:

Re: Couple of questions

#7 Post by pwisaguacate »

TakahiUshio wrote:But I want the Yes option to to apply to other labels as well.
It's not very clear what you're asking, but it looks like a routing thing. Use variables, for example:

Code: Select all

menu:
    "Accept invitation.":
    jump accept

    "Decline invitation.":
    jump decline

label accept:
    $ accept = True
    ...

label decline:
    $ accept = False
    ...

label chapter2
    ...
    if accept:
        Do something.
    else:
        Do something else.
    ...
This will allow you to stay on the main storyline with variables set to certain values depending on the player choices.

Post Reply

Who is online

Users browsing this forum: No registered users