Updating Multiple Strings without Copying and Pasting

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
DesertFox
Regular
Posts: 196
Joined: Sun Jul 28, 2013 1:29 pm
Completed: Over The Hills And Far Away
Projects: My Little Dictator
Organization: WarGirl Games
Contact:

Updating Multiple Strings without Copying and Pasting

#1 Post by DesertFox » Sun Feb 08, 2015 6:30 pm

When it comes to incorporate numbers for a map screen, I've got lots of different strings that need updating with every new map screen. They list things such as specific income and expenditure, names etc. and I'm currently using renpy.random.randint for these, that will be affected by player choices and so on.

Is there a way to group all these strings together in some way that they can be posted with one string later on e.g. $ update_all, or similar? Or will I have to copy and paste every single one in a big block to get the random number to update?

User avatar
Zetsubou
Miko-Class Veteran
Posts: 513
Joined: Wed Mar 05, 2014 1:00 am
Completed: See my signature
Github: koroshiya
itch: zetsuboushita
Contact:

Re: Updating Multiple Strings without Copying and Pasting

#2 Post by Zetsubou » Sun Feb 08, 2015 8:17 pm

Could you post the code that you're currently using to achieve this?
I don't fully understand your explanation, so I think it might help to see what you're trying to accomplish exactly.
Finished games
-My games: Sickness, Wander No More, Max Massacre, Humanity Must Perish, Tomboys Need Love Too, Sable's Grimoire, My Heart Grows Fonder, Man And Elf, A Dragon's Treasure
-Commissions: No One But You, Written In The Sky, Diamond Rose, To Libertad, Catch Canvas, Love Ribbon, Happy Campers, Wolf Tails

Working on:
Sable's Grimoire 2

Image

Post Reply

Who is online

Users browsing this forum: Google [Bot]