After lots of searching, I can't find what store is?

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
henvu50
Veteran
Posts: 337
Joined: Wed Aug 22, 2018 1:22 am
Contact:

After lots of searching, I can't find what store is?

#1 Post by henvu50 »

What is that store object? I looked up keyword: store on ren'py documentation: https://www.renpy.org/doc/html/store_va ... ight=store

I was expecting an explanation like: "This is what the store object does, here is what you can do with it, here are some examples, see how useful this is? You should use it in your code when you need to do x,y,z."

I recently saw someone use it like this:

Code: Select all

init python:
   store.character_profiles = []
I saw it again! Why is this person using the store in this example?

Code: Select all

$ button = "red_button_pushed"
$ setattr(store, button, True)
If you do link me to information about this store object, can you tell me how you searched for it, and how you found this information?

Before posting here, I always do this first:

Google Search
#turns up nothing explaining what the store object is
site:https://www.renpy.org/ store

#no solid explanation of what it is
site:https://lemmasoft.renai.us/ store

Renpy.org Search
keyword: store
Returns this https://www.renpy.org/doc/html/store_va ... ight=store , which doesn't really explain anything or give examples of how this can be useful. It's like you have to already know what it is before using it.

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2398
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: After lots of searching, I can't find what store is?

#2 Post by Ocelot »

Did you see this piece of documentation?
https://www.renpy.org/doc/html/python.h ... -the-store
And you might need to read all entries there, because it describes Python interaction with stores

Just entered "store" into search bar and clicked on first entry which used "store" as a noun.
< < insert Rick Cook quote here > >

henvu50
Veteran
Posts: 337
Joined: Wed Aug 22, 2018 1:22 am
Contact:

Re: After lots of searching, I can't find what store is?

#3 Post by henvu50 »

Ocelot wrote: Fri Jun 11, 2021 4:28 am Did you see this piece of documentation?
https://www.renpy.org/doc/html/python.h ... -the-store
And you might need to read all entries there, because it describes Python interaction with stores

Just entered "store" into search bar and clicked on first entry which used "store" as a noun.
Thanks.

I'm reading about store now.

So the only reason people use store is to avoid naming conflicts with ren'py's internal names? That's it?

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2398
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: After lots of searching, I can't find what store is?

#4 Post by Ocelot »

* You have to use store name if you are using python hide block.
* You can use different stores for, say, different chapters or DLCs, or separate modules, so you wouldn't have to check all your scripts to be sure that variable name is still avaliable (renpy ban on all names beginning with underscore still holds in other stores)
* You might find different crative uses for stores. I just though of the ability to replacing or deleting all content of the named store, making an easy "reset" button.
< < insert Rick Cook quote here > >

Post Reply

Who is online

Users browsing this forum: Google [Bot]