Search found 12 matches

by K_strum
Sun Jan 07, 2024 4:29 am
Forum: Ren'Py Questions and Announcements
Topic: The text in the dictionary is not translated (Solved)
Replies: 2
Views: 55757

Re: The text in the dictionary is not translated

How do you display your text? It should be something like: text items_db['sigarett']['name'] or similar. If you are using text interpolation, you need to mark interpolated data as needing translation: $ item_name = items_db['sigarett']['name'] text "Name: [item_name!t]" # Notice the !t he...
by K_strum
Sat Jan 06, 2024 12:05 pm
Forum: Ren'Py Questions and Announcements
Topic: The text in the dictionary is not translated (Solved)
Replies: 2
Views: 55757

The text in the dictionary is not translated (Solved)

Hello. I have the following problem. The text from the dictionary is not translated. I have the following code: define items_db = { 'sigarett': { 'name': _("Цигарка"), 'mind': _('Зменшує стрес на 30%'), 'mind2': _('Можливо трохи зменшить стрес.'), 'desk': _("Пом'ята й стара. Здається,...
by K_strum
Tue Oct 17, 2023 6:09 am
Forum: Ren'Py Questions and Announcements
Topic: Using items from inventory(Solved)
Replies: 13
Views: 7146

Re: Using items from inventory(Solved)

I managed to fix the errors, and now your code works. But there are a few clarifications. I had to put "name" in quotes to make the code work correctly. $ item_name = items_db[item_id]['name'] Otherwise, it threw a "name 'name' not defined" error. Is this how it should work? Yes...
by K_strum
Mon Oct 16, 2023 4:54 pm
Forum: Ren'Py Questions and Announcements
Topic: Using items from inventory(Solved)
Replies: 13
Views: 7146

Re: Using items from inventory(Solved)

As I mentioned, you would have to adapt the rest of your code to pass just the item_id (a string like "sigarett_small") to the methods and screens instead of the whole item (which you are doing right now). If you don't know what I am talking about, just make sure to understand what I do d...
by K_strum
Sun Oct 15, 2023 8:29 am
Forum: Ren'Py Questions and Announcements
Topic: Using items from inventory(Solved)
Replies: 13
Views: 7146

Re: Using items from inventory(Solved)

As I mentioned, you would have to adapt the rest of your code to pass just the item_id (a string like "sigarett_small") to the methods and screens instead of the whole item (which you are doing right now). If you don't know what I am talking about, just make sure to understand what I do d...
by K_strum
Sun Oct 15, 2023 6:40 am
Forum: Ren'Py Questions and Announcements
Topic: Using items from inventory(Solved)
Replies: 13
Views: 7146

Re: Using items from inventory

For example, when I receive two cigarettes, they appear in my inventory as two separate items. Is it possible to make it so that the quantity of one item simply increases, rather than adding a new one every time. Alright, but I have a few suggestions for your dictionary based inventory system, to m...
by K_strum
Sat Oct 14, 2023 4:19 pm
Forum: Ren'Py Questions and Announcements
Topic: Using items from inventory(Solved)
Replies: 13
Views: 7146

Re: Using items from inventory

Perhaps you can also tell me how to make the items in the inventory stack? This is the last thing I have left and I can't find a solution again. What do you mean by that exactly? For example, when I receive two cigarettes, they appear in my inventory as two separate items. Is it possible to make it...
by K_strum
Sat Oct 14, 2023 11:41 am
Forum: Ren'Py Questions and Announcements
Topic: Using items from inventory(Solved)
Replies: 13
Views: 7146

Re: Using items from inventory

m_from_space wrote: Sat Oct 14, 2023 9:22 am
Perhaps you can also tell me how to make the items in the inventory stack? This is the last thing I have left and I can't find a solution again.
by K_strum
Sat Oct 14, 2023 10:02 am
Forum: Ren'Py Questions and Announcements
Topic: Using items from inventory(Solved)
Replies: 13
Views: 7146

Re: Using items from inventory

Hello. I have created an inventory for a game, but when it comes to using items, I'm stumped. This is what the inventory looks like: Hey there, I will break down some stuff here, do whatever you want with my advice. screen button: textbutton "inventory" xalign 0.2 action Show("invent...
by K_strum
Sat Oct 14, 2023 7:41 am
Forum: Ren'Py Questions and Announcements
Topic: Using items from inventory(Solved)
Replies: 13
Views: 7146

Using items from inventory(Solved)

Hello. I have created an inventory for a game, but when it comes to using items, I'm stumped. This is what the inventory looks like: define inventory = [] label take_item(newitem): $ inventory.append(newitem) "Received: [newitem[name]]." return init python: def equip_item(item): global sig...
by K_strum
Thu Oct 12, 2023 8:30 am
Forum: Ren'Py Questions and Announcements
Topic: Screen show hides the regular show(Solved)
Replies: 3
Views: 759

Re: Screen show hides the regular show

Screens are drawn on the "screens" layer, which is always in front of the "master" layer. So either put your screen on the "master" and show them first like in your example: screen radio(): layer "master" Or you can create your own layer by changing the confi...
by K_strum
Thu Oct 12, 2023 7:02 am
Forum: Ren'Py Questions and Announcements
Topic: Screen show hides the regular show(Solved)
Replies: 3
Views: 759

Screen show hides the regular show(Solved)

Hello, and I apologize for my English right away. So, I have this code: screen radio(): imagebutton: focus_mask True idle "parents room/radio.png" action Jump("radiofm") screen door(): imagebutton: focus_mask True idle "parents room/door.png" action Jump("radiofm&q...