View Player Choices [Helped by PyTom]

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
Clestae
Regular
Posts: 44
Joined: Sat Nov 23, 2013 2:53 pm
Contact:

View Player Choices [Helped by PyTom]

#1 Post by Clestae »

I'm 99% sure this is impossible, but since I'm a bit desperate, I thought I would ask anyway.

Basically, I'm using Ren'py for an experiment that involves answering a questionnaire in the beginning. This test is measuring self-esteem, but each question corresponds to one of three categories: Social, Appearance, and Performance (three different types of self-esteem).

I want to know the total score, but also the score of each area. So I coded each question as so:

Code: Select all

label pretest17:
    menu:
        "17. I feel concerned about the impression I am making."
        "A: Not at all.":
            $ PreScore += 5
            $ Social += 5
            jump pretest18
        "B: A little bit.":
            $ PreScore += 4
            $ Social += 4
            jump pretest18
        "C: Somewhat.":
            $ PreScore += 3
            $ Social += 3
            jump pretest18
        "D: Very much so.":
            $ PreScore += 2
            $ Social += 2
            jump pretest18
        "E: Extremely.":
            $ PreScore += 1
            $ Social += 1
            jump pretest18
And at the end, there's a section only I can access with a password that tells me the total score along with the scores of each of the three dimensions. Simple, right?

Unfortunately, I did not beta test it thoroughly and encountered a very bad problem. Two of the questions, I accidentally did something like this:

Code: Select all

"19. I feel like I'm not doing well."
        "A: Not at all.":
            $ PreScore += 5
            $ Performance += 5
            jump pretest20
        "B: A little bit.":
            $ PreScore += 4
            $ Performance += 5
            jump pretest20
I accidentally wrote the wrong number for the "performance" score. Another question, affecting the "social" score, did the same thing. While I can tell something is wrong because the total of the three scores does not equal the overall score, I have no clue which question was incorrect, since I did it twice.

So my question is: is there ANY possible way I would be able to find some kind of "feedback" text, or even "crack" a game (I'm sorry, I know PyTom would not want this program to be crackable, but desperate), to see in each save file what a player chose?
I'm pretty sure this is not possible as I did not put in flags to show this to me, and the error was completely my fault, but thought I would ask.

Thank you and I apologize if my explanation is confusing.
Last edited by Clestae on Fri Apr 03, 2015 1:34 pm, edited 1 time in total.
Image

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: View Player Choices

#2 Post by xela »

Search for JSON callback if you want to add stuff to save data, screens or renpy.watch to view stuff in real time. Whatever suits you the best.
Like what we're doing? Support us at:
Image

Clestae
Regular
Posts: 44
Joined: Sat Nov 23, 2013 2:53 pm
Contact:

Re: View Player Choices

#3 Post by Clestae »

I'm still looking into this, but I have to ask: is this something I can do after I've already had someone play the game and all I have left are their save files? This just seems to be something I can only do before the game is published. Or--

--wait, stupid question alert--

If I add this JSON to my game, repackage the game, load it onto the computer where the original game was...am I able to keep my old save files and then use this JSON thing to look through the decision points!?

I'm so sorry, I'm horrible at coding, so I may need more help :(
Image

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: View Player Choices

#4 Post by xela »

If you know what you're doing, you can do both. You know that there is a console right? Shift + O in the dev mode, just load the game in a dev mode (options.rpy file) or any rpy file loaded at init face after the original, load your file/game, open the console and type the name of the variable into it. It will return you it's value.
Like what we're doing? Support us at:
Image

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: View Player Choices

#5 Post by trooper6 »

Wouldn't it be easier to fix the game and then have the people retake the test? Or get new test subjects?
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: View Player Choices

#6 Post by xela »

Ir prolly would but that's not the question :)
Like what we're doing? Support us at:
Image

Clestae
Regular
Posts: 44
Joined: Sat Nov 23, 2013 2:53 pm
Contact:

Re: View Player Choices

#7 Post by Clestae »

trooper6 wrote:Wouldn't it be easier to fix the game and then have the people retake the test? Or get new test subjects?
With graduation looming in less than two weeks and the difficulty I had finding enough people to do this in the first place, unfortunately I do not have that option (and with how the experiment actually works, I also am not able to have my subjects retake it) :( thus my "desperation". I'm rather ashamed of such a simple error, as I should have caught it before going live with such an important, time-sensitive project, but alas... >.<
xela wrote:If you know what you're doing, you can do both. You know that there is a console right? Shift + O in the dev mode, just load the game in a dev mode (options.rpy file) or any rpy file loaded at init face after the original, load your file/game, open the console and type the name of the variable into it. It will return you it's value.
Oh! I know of that, I just had never tried it. I'll try it out and see although...I foresee a problem. My point values are accumulation, so wouldn't it just return to me the value I already have? Unless it is able to tell me what point values were accumulated where...? (I am probably not using the right words).

Thank you Xela for helping me!
Image

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: View Player Choices

#8 Post by xela »

Unless there is a log and values are recorded, you will not be able to get the step by step progression out of your savefile. I still do not know what you're actually asking...
Like what we're doing? Support us at:
Image

Clestae
Regular
Posts: 44
Joined: Sat Nov 23, 2013 2:53 pm
Contact:

Re: View Player Choices

#9 Post by Clestae »

I apologize, I was not clear.
My code adds up the scores as a result of accumulations. The problem is I accidentally typed in the wrong value for an accumulation for two questions, so my numbers are off, and I wanted to know if there was a way to basically know which choice in a given menu a user picked.

Unfortunately, all the dev mode can tell me is what I already know: what the accumulation ended up being at the end. So there is no way (that I can conceivably see) how to figure out that on question 15, a user chose "Somewhat" as their answer. I did not code in some kind of log output or anything like that ahead of time.
Even more unfortunate, I had figured out a possible roundabout way to still make this work, but since you cannot rollback from a saved file, that idea doesn't work either (I was going to rollback to the questions on a save file, and keep checking the score to see how much had "decreased" as I went back to the past, so to speak--I don't even know if this would've worked even if I could've done rollback).

I'm sorry, I am not very good at explaining myself. So thank you for helping, but I'm pretty sure that due to my lack of foresight, there's not much I can do.
Image

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: View Player Choices

#10 Post by PyTom »

You can rollback from a save file, actually, at least for a little bit. It depends on how long things are.

Can you send me the game and a save file or two? I can try to poke around to see if the data wound up there somehow. (It depends a lot on how long the game was.)
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]