Lemma Soft Forums

Supporting creators of visual novels and story-based games since 2003.


Visit our new games list, blog aggregator, IRC, and wiki.
Activation problem? Email [email protected]
It is currently Thu Jun 20, 2013 8:22 am

All times are UTC - 5 hours [ DST ]


Forum rules


Ask questions about one topic per thread, and use a descriptive subject. "NotImplemented error in script.rpy" is a good subject, "Tom's problems" is not. Remember to include all of traceback.txt or error.txt when reporting a problem, as well as the relevant lines of script. Use the [code] tag to format scripts.



Post new topic Reply to topic  [ 30 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Wed Jul 04, 2012 11:50 pm 
Veteran

Joined: Mon Jun 18, 2012 12:16 pm
Posts: 237
The problem is, when using a "text history" module (http://www.renpy.org/wiki/renpy/doc/cookbook/Text_History), "extend" special character multiplies the line which it extends in text history.

I.e. the following example code:
Code:
    n "\"Sup cutie,"
    extend " wanna ride in my car?\""


will give this:
Quote:
"Sup cutie,"
"Sup cutie, wanna ride in my car?"

result in text history.

Is there a way to work this around?


Last edited by Levrex on Wed Jul 18, 2012 4:58 am, edited 1 time in total.

Top
 Profile Send private message  
 
PostPosted: Thu Jul 05, 2012 12:54 am 
Eileen-Class Veteran
User avatar

Joined: Thu Dec 22, 2011 4:26 am
Posts: 1000
Location: United States
Projects: Eternal Memories, plot bunnies that won't die.
Organization: HellPanda Studios
I'd try this code:
Code:
    "\"Sup cutie, {w}wanna ride in my car?\""

It should have the same effect, but not repeat. (Hopefully. I haven't tested it personally.)

_________________
Know some awesome people? Want to thank them? Do it here!
For up to date info on my VN projects: HellPanda Studios Blog.
Tsundere VN
My new policy: All my games will have a redhead. Period.

Not really checking the forums any more due to time constraints, so if you want to contact me, PM. I'll get a notification and log in. :mrgreen:
Also, I've been hit and run posting, which means I don't see many replies. If you want to respond to something I've said, also feel free to PM me.


Top
 Profile Send private message  
 
PostPosted: Thu Jul 05, 2012 5:15 am 
Veteran

Joined: Mon Jun 18, 2012 12:16 pm
Posts: 237
Well, i thought of that first, but that's ain't no option.
Click-to-continue indicator needs to be shown, otherwise it would seem strange and some unexperienced readers may think that the game is broken.

Of course, i can insert a click-to-continue anim.Filmstrip right into the line, but big novels tend to have many "extends", and that is too much time to waste and a bad optimisation.


Top
 Profile Send private message  
 
PostPosted: Thu Jul 05, 2012 6:22 am 
Veteran

Joined: Tue Jun 05, 2012 2:01 am
Posts: 432
I think the issue is just that ReadbackADVCharacter and ReadbackNVLCharacter defined there need to override do_extend. I'll take a closer look sometime soonish.


Top
 Profile Send private message  
 
PostPosted: Thu Jul 05, 2012 11:48 am 
Veteran

Joined: Mon Jun 18, 2012 12:16 pm
Posts: 237
Looking forward to, thanks!


Top
 Profile Send private message  
 
PostPosted: Tue Jul 10, 2012 6:16 pm 
Regular
User avatar

Joined: Sun Aug 01, 2010 1:21 pm
Posts: 137
Actually, you can use "ctc_pause=" to set the CTC indicator to work with {w} and {p}.
Of course, if you need to show new pictures on the screen in the middle of the line, then you'll still need to use extend, but for the normal things, ctc_pause should do the thing.

(That being said, I stumbled across this thread for the exact same reason.)


Top
 Profile Send private message  
 
PostPosted: Wed Jul 18, 2012 2:32 am 
Veteran

Joined: Tue Jun 05, 2012 2:01 am
Posts: 432
Attaching a revised text history module; I stripped out a whole bunch of unnecessary stuff, and "extend" should work properly. Let me know if it works as expected.


Attachments:
File comment: Revised text history
readback.rpy [5.32 KiB]
Downloaded 26 times
Top
 Profile Send private message  
 
PostPosted: Wed Jul 18, 2012 4:58 am 
Veteran

Joined: Mon Jun 18, 2012 12:16 pm
Posts: 237
Holy heck, man, you are... you are... a man!
I expected that you'll just fix an "extend" bug, but you actually made it scrollable, just like i wanted to!!!
And yes, it works as expected.

Thank you very much.

Just one more thing, if i may ask...
If i want to divide the pages by some spaces (empty lines), should i add the code like this to NVLCharacter?
It's not that much necessary, but preferable.

Code:
def do_nvl clear(self):
            add text "\n\n"
            super(ReadbackNVLCharacter, self).do_nvl clear()
            return


Top
 Profile Send private message  
 
PostPosted: Wed Jul 18, 2012 5:35 am 
Veteran

Joined: Tue Jun 05, 2012 2:01 am
Posts: 432
I didn't think I did anything which should affect the scrolling...

Slightly tweaked version: adds space after "nvl clear", and a bugfix to make it work properly across saves.


Attachments:
File comment: Revised text history, tweaked
readback.rpy [5.73 KiB]
Downloaded 18 times
Top
 Profile Send private message  
 
PostPosted: Wed Jul 18, 2012 9:24 am 
Regular
User avatar

Joined: Sun Aug 01, 2010 1:21 pm
Posts: 137
apricotorange wrote:
I didn't think I did anything which should affect the scrolling...

Slightly tweaked version: adds space after "nvl clear", and a bugfix to make it work properly across saves.


I am sure this is asking for too much, but I'll try anyway.
Would you have a bit of time on your hands to also fix "extend" in the NVL page version you did for me some while ago in viewtopic.php?f=8&t=15728? For now, it works perfectly, but the only problem I have is the extend not working.
I did try combining those 2 codes myself, but I keep getting an error.
Of course, you'd get a credits mention (again).


*crosses fingers and waits*


Top
 Profile Send private message  
 
PostPosted: Wed Jul 18, 2012 9:27 am 
Veteran

Joined: Mon Jun 18, 2012 12:16 pm
Posts: 237
apricotorange wrote:
I didn't think I did anything which should affect the scrolling...

Slightly tweaked version: adds space after "nvl clear", and a bugfix to make it work properly across saves.


Now i'm happy.
Thank you again!


Top
 Profile Send private message  
 
PostPosted: Thu Jul 19, 2012 1:26 am 
Veteran

Joined: Tue Jun 05, 2012 2:01 am
Posts: 432
Attaching combined version which supports both scrolling and "paged" variants, for Samidarenina.


Attachments:
File comment: Combined version
readback.rpy [7.95 KiB]
Downloaded 40 times
Top
 Profile Send private message  
 
PostPosted: Thu Jul 19, 2012 10:58 am 
Regular
User avatar

Joined: Sun Aug 01, 2010 1:21 pm
Posts: 137
Ah, thank you so very much, Apricotorange. This is incredibly helpful to me.


Top
 Profile Send private message  
 
PostPosted: Sat Jul 28, 2012 11:59 am 
Veteran

Joined: Mon Jun 18, 2012 12:16 pm
Posts: 237
After some use, i noticed that blocking "rollback" key (assigning it to NullAction) for yesno_prompt screen won't work with readback.rpy. Because readback module overwrites the function of that key, but it overwrites that function on top of everything, which would be unwanted in my case.

I.e. i make the yesno_prompt show up while in "nvl" screen and it's supposed not to disappear until the user makes a decision, but if i roll back, going to the "text history" screen, i can watch the text history, call game menu, call prompt again, etc.
I tried to look into the code, but did not want to break anything, 'cos almost everything's going so smoothly now.

Though it's not that much of a problem.


Top
 Profile Send private message  
 
PostPosted: Sat Jul 28, 2012 8:45 pm 
Veteran

Joined: Tue Jun 05, 2012 2:01 am
Posts: 432
If you want to manage the rollback and rollforward keys yourself, you can set "config.readback_full" (one of the custom config variables at the beginning of the script) to False, and the script won't touch them. You can then trigger the readback yourself with the action (SetVariable("readback_yvalue", 1.0), ShowMenu("text_history")); maybe put it on a screen which you show at the start of the game, then hide at certain key points.

On a side note, Ren'Py 6.14 will come with some more flexible options for controlling rollback, which might be an alternative to this script depending on your use-case.


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 30 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Protected by Anti-Spam ACP
Powered by phpBB® Forum Software © phpBB Group