Stat Screen problem

The problem I’m getting is: that when i’m trying to set so that my romance options will display the romantic precentage and the name only.
however, when i set the code so it works, i get a double intendant when switching form a ??? to ExampleNameTori in the test script i have on the side of the actual game script (so that i don’t have to go through everything and can just test things straight of the bat.)
i wind up with a weird “” ExampleNameTori : Tori% “”

My code looks like this in the stats screen file:

*if romance1 = "???"
*stat_chart
 percent romance1 ???

*if romance1 = "Tori"
*stat_chart
 percent romance1 Tori

on the startup test file have it setup like this

*create romance1 "???"

Label Hide_Test

*choice

*hide_reuse #Tori
 *set romance1 "Tori"
 *goto Hide_Test

so yeah, how to i get it to show only the name once? instead of double?

also while at it, it gives me the error when i am in the follow up test script trying to give the characters points with this code

*choice

*hide_reuse #Tori
 *set romance1 +10
 *goto Hide_Test

then i get the error code " line 8: not a number: Tori"

like what?, i specified that the romance string is going to be set to “Tori”, then when using the followup choice to give “Tori” points.

and apparently you can’t give them points in the same choice group like this

*choice

*hide_reuse #Tori
 *set romance1 "Tori"
 *set romance1 +5
 *goto Hide_Test

suggestions to my conundrums?

If romance1 is a string (“Tori”) then you cannot add numbers to it (*set romance1 +10)

You can only do math with numeral variables, so you may wish to do something like:

*create tori_romance 0

in your startup file so you can add and subtract from it.

This likely will fix your statchart woes as well, if you make sure to keep your string variables and your numerical variables distinct.

2 Likes

Ah ok, so i need to definee “Tori” in the *if section in the stat chart while leaving “romance” as it is.

but will this then still make “Tori” pop up when i try to change it from “???” to “Tori” in the stat chart?

I’m not quite sure what you mean by that part. In short, define a variable for the name and a different variable for the number, and be sure to use the appropriate one when you want to display.

what i meant is this

*create romance1 0

*Label Hide_Test

*choice

*hide_reuse #Tori
 *set romance1 +1
 *goto Hide_Test

*hide_reuse #Done
 *finish

and then in the stat screen i changed it to


*if romance1 =0
*stat_chart
*percent romance1 1 ???

*if romance1 >=1
*stat_chart
 *percent romance1 Tori

but then i get error code
“choicescript_stats line 25: invalid indent, expected at least one row”

EDIT saw my mistake with the *percet but then i got another problem

the thing i’m trying to do here is havingt “Tori” as a precentage where they can get points for interecting with them but hide it so they don’t even know “Tori” was a romance option untill they get a point with tori so that if they don’t get a point with tori they don’t see them as a viable option to romance untill they do.

thusly making it so that you can actualy miss characters since all the romance options are hidden

Which of the Lines is 25?
And which variable is the boolean, that switches ? to Tori?

It was the

  1. if romance1 >=1
  2. *stat_chart
  3. *percent romance1 Tori

The “*” berore “percent” messed up that, but the problem changed now to that i cant seem to hide the stat att all when having it as Gower syggested wich i could with my previous setup

You could always do it kind of like this

*if ((met_Tori = false) and (romance1 = 0))
	*stat_chart
		percent romance1 ???
*if ((met_Tori = true) and (romance1 >= 1))
	*stat_chart
		percent romance1 Tori

That way it is hidden until that stat is met or you could still have met_Tori = true until romance 1 is above 0 and make sure that the code is indented under the *if statements like above

Alright i’am going to give that a try when i get back from feeding my neighbours cats.

But what im basically getting from this if i understand correctly is that i have to make a secondary “*create” for each of the romance options to be able to hide them?

And i need to change both numerical and string to be able to show them?

The Problem seems to me that you want to do 2 Things with romance. You could try to created a boolean variable to Switch the show/hide state of the romance. A boolean variable is true or false, so perfect for if Checks.

I dont know the word “boolean” but im guessing from how you are using it in the sentance that it is the String variable.

what @Kaelyn said is correct I forgot to add that part where you should set a different variable for numerical check. So for example

*create romance 0
*create romance1 "???"
*create met_Tori false

that 0 would be where you add it then you could do

*set romance + 1
*if romance = 1
  *set romance1 "Tori"

boolean is the true/false statements to put it plainly. If something is true then the text under it will show up, if it is false then it won’t.

A revised version of the code from my earlier post would be as followed

Startup Screen
*create romance 0
*create romance1 ""
*create met_Tori false

Stats Screen
*if ((met_Tori = false) and (romance = 0))
	*stat_chart
		percent romance1 ???
*if ((met_Tori = true) and (romance >= 1))
	*stat_chart
		percent romance1 Tori
Or
*if (romance = 0))
	*stat_chart
		percent romance1 ???
*if ((met_Tori = true) and (romance = 1))
	*stat_chart
		percent romance1 Tori
*if ((met_Char2 = true) and (romance = 2)
	*stat_chart
		percent romance1 Char2

That way you don’t have to create separate romance variables for each individual romance option like romance1 for Tori and romance2 for the second character and so on so forth. Just have romance1 be dependent on the numeric value of romance each number would be set to a designated character.

2 Likes

Might I add that naming it “tori_romance” is probably better than romance1? i can foresee a multitude of issues cropping up.

it isn’t too difficult, once you’ve done one, to hide/reveal each character, though you can certainly do it the way the person above me indicated.

I can just forsee it being frustrating. especially if you accidentally increase the wrong numeric variable, and suddenly the stats screen is showing “romancing bob” instead of tori.

2 Likes

@ashestoashes018 im using a sepperate text file to keep track of important notes such as names and such since im building a very long text adventure.

The idea is that you shouldn’t be able to blaze through it in one day, but to play it for several days at least thats why i left it as romance1 but yeah, im still early in the actual game so it wouldn’t be much of a hazzle to change this

1 Like

If there is a large amount of romance options I would go with @ashestoashes018 suggestion of having them have their own named romance stat instead of the romance1. Personally this is the method I use as well for MC orientation purposes.

If there’s a small number that is easy to track though I think it wouldn’t be hard to keep it like that though, and by small number I would count that from 1-5, just keep in your notes what number each character is assigned.

It’s really whatever you prefer and what is easiest for you to remember, also if it works and can keep up under testing.

1 Like

@StarFoxed yeah i have currently 8 romance character options planned, at most its going to be 9 since i wanted to keep it between 1-9 untill i get used to the scripting process and story alignment.

if i feel this works out i have a very large ambitious idea ahead but its for when i’ve already written and finished at least 3-5 stories

2 Likes

alright had to delete the tabs since i’m using spaces but now i got back to my original problem with the ??? being visible in the stat menu, i want it completely invisible for the players i’m using the ??? for my own pourpuse to define that it is unknown and i want it to change to Tori when the character is known as a prospect of romance for the player.

sorry btw for all of this if it gets annoying ^.^’ i’m new to ChoiceScript .
even if i’ve done my research its not all easy to understand

Edit i tried changing it so that there is nothing to display while met_Tori ius set on false but then i get this message

“choicescript_stats line 24: invalid indent, expected at least one line in ‘if’ true block”

*if ((met_Tori = false) and (romance_A = 0))

*if ((met_Tori = true) and (romance_A >= 1))
*stat_chart
*percent romance1 Tori

because when i had it on this

*if ((met_Tori = false) and (romance_A = 0))
*stat_chart
*percent romance1 ???
*if ((met_Tori = true) and (romance_A >= 1))
*stat_chart
*percent romance1 Tori

it wouldn’t show the stat when changing the values to “true” and “1” it kept them hidden.

It’s probably not the best way, but what I’ve done in my own is something along the lines of:

*if (romance1 != "???")
   stats go here

So that when I set the variable to “???” in the beginning, it doesn’t show up on the stats page until I set romance1 or whatever other variable to something other than the question marks.

@FantaPop i tried what you suggested but it still keeps the stat invisible when i’m promting it to show the stat

edit : Gonna take a break now as this is getting frustrating for me so imma play some games and then get back to it later.