Keeping Track of Player Choices


#1

I was wondering if there’s a way to keep track of player choices for beta-testing purposes to see which choices were the most common.

I was thinking maybe if you had two variables. One which kept temporary track of what choice was made and a second to hold all the information. Then used concatenation in order to add the first to the second so there was a big long list of every choice made in the game.

I want to say something like


*label Choice A

*Choice 
	#One
		*set choices "a1"
	#Two
		*set choices "a2"
	#Three 
		*set choices "a3"

*set choicesmade "choices"


*label Choice B

*Choice 
	#One
		*set choices "b1"
	#Two
		*set choices "b2"
	#Three 
		*set choices "b3"

*set choicesmade "choicesmade+choices"


And so on. Of course with the right code for concatenation since I’ve forgotten how you do that with variables.

Is there any easier way around? Is this something that could be done with hacking some code in an unsupported manner?


#2

As it happens I’m working on this very thing at the moment! I’ll share when I’ve got something worked out :slight_smile:


#3

Okay so a quick-and-dirty hack to do this is to crack open ui.js and, after line 486, insert the following on a new line:

console.log(option.name);

Then you should be able to play the game in Chrome/Firefox, open the developer console at any point and see all the choices you’ve made up to that point in the game. Of course it might be mixed in with error messages and whatnot, but that’s the simplest solution. If you want to print the list at the end of the game or something, that’d take a bit more hacking.

[Insert disclaimer about hacking CS being unsupported by CoG, possibility of unexpected results, etc]


#4

Ah, that’s sounding like a lot more elegant a solution.