# Two Protagonists, Three Stats Screen

#1

I am probably going to have to scrap half of my script realizing later that this is ridiculously difficult if not impossible, but I might as well ask, right?

So, here’s the idea:

I have 2 protagonists. No, the players are not allowed to switch PoVs freely, but following the plot the PoV will switch from time to time. Each protagonist has their own unique stats, but DO share some identical stats. At rare but critical times the 2 protagonists will act together, thus using the 3rd combined stats screen.

For example, it’s something like:
Protagonist 1: Stat A, B, C, D
Protagonist 2: Stat D, E, F, G
Combined: Stat A, B, C, D, E, F, G

Is it doable without the need to hack into Choicescript?

Two character stat screen
#2

You should just need to make three variables

Protagonist2 = false (Shows Protagonist1 screen)
Protagonist1 = true (To allow the showing of the screen)

These will be set reversed when they change. Protagonist2 = true when Protagonist1 = false, this will switch the stat screen if you set it up to be if( Protagonist1 = true) stat_screen ABCD
You’d do the same for if (Protagonist2 = true)

then the final variable will be for setting both Protagonist1 and Protagonist2 to false, and setting it (I’ll call it Protag3 for simplicity) to true.

It’ll look like

[code]*if (protagonist1 = true)
*stat_chart
percent A
percent B
percent C
percent D
*if (protagonist2 = true)
*stat_chart
percent D
percent E
percent F
percent G

*if (protagonist3 = true)
*stat_chart
percent A
percent B
percent C
percent D
percent E
percent F
percent G[/code]

Just make sure that when you set it, only one is true at a time and it should work fine

#3

Question: would it change anything if the shared stats between Protag1 & 2 are opposed pairs?

#4

Yes, there’s probably a way to set it up to make that possible but it’s not exactly basic. If you’d want to do that I suggest any time protagonist 1 gains statA, protagonist 2 loses an equal amount of the opposed stat

#5

Alright. Thank you very much for the swift reply, Gavorn!

#6

Do you mean that Prot 1’s stat will be the opposite of Prot 2’s stat? Like 1’s Power will go down every time 2’'s increases, and so on?

I think that should be fairly simple. Say it’s “power,” with the opposed pair being Prot 1 Power and Prot 2 Power. Just make sure that you stay consistent with what the shared stat means e.g. a %+ increase in “power” always represents an increase in Prot 1 Power and a decrease in Prot 2’s power, whoever’s currently in POV.

Or maybe for some reason you wanted the stat screen to change when the POV changes… e.g., you wanted the labels to be “My Power” and “My Enemy’s Power,” with “my” changing every time you POV-flipped between Prot 1 and Prot 2.

Because opposed pairs are always between 1 and 99, when you’re changing POVs between protagonists, just include

*set power (100-power)

If you do it this way, you’d need to make sure that a %+ increase in “power” always represents an increase in the power of whoever’s currently in POV.

I think that should work? [Edit: though in the second case, I’m not sure how you’d handle it when you’re in both-protagonists mode]

#7

The easiest way to do this would be to double all of the variables

power1 power2 etc

Then in the display both screen you could just separate the two protagonists by a line of text with their names.

It probably would require more maintenance to keep running but it’s the easiest setup I can imagine.

#8

Ah, the bit on the opposed pairs very useful. Thank you!

As for the both protagonists mode, I imagine in my head something like, i.e. Protag A and B shares an identical (not opposed pair) stat. When in 2 Protag mode, the stats are combined / 2 to get the final total.

As for the opposed pairs, I imagine in my head that they would be split into 2: For example, Agility versus Stealth, Protag A has 70% Agility end and Protag B has 30% Stealth end. In the combined stat screen, they will be split in 2 to form individual stats of their own (So the opposed pair disappears and become 1 Agility stat and 1 Stealth stat), plus 20% base. The stats are not allowed to go over 100% no matter how high they are, of course.

@Gavorn Maybe that can be done, but I imagine my 3rd stat screen to be Protag A & B and all their stats arranged nicely together. Your reply earlier is what I want it to be.

#9

making something like this if done to a standard of 10/10 excellence, could in theory give your some great recognition from choice of games, but it would have to be smashing on the whole idea and the story

if you make a story where it switches from two characters in the set and has three stat screens for combined effort of the two characters"protagonists" then their should be some kind of pair up in combat or any other situation they are in to where what ever you gave one of the protagonist that would be able to be used with the second protagonist setup.

#10

Here comes a new question!

The code will pop up an error like this:
choicescript_stats line xx: increasing indent not allowed, expected 0 was 1

#11

Can you post the code in question it would help to solve the problem.

#12

Oh, it’s referring to Gavorn’s post above:

*if (protagonist1 = true)
*stat_chart
percent A
percent B
percent C
percent D
*if (protagonist2 = true)
*stat_chart
percent D
percent E
percent F
percent G
*if (protagonist3 = true)
*stat_chart
percent A
percent B
percent C
percent D
percent E
percent F
percent G

#13

Hmm you will need to put it in
< pre >
Place code here
< /pre > without the space on the > so we can see the format as well.

#14
```*if (protagonist1 = true)
*stat_chart
percent A
percent B
percent C
percent D
*if (protagonist2 = true)
*stat_chart
percent D
percent E
percent F
percent G
*if (protagonist3 = true)
*stat_chart
percent A
percent B
percent C
percent D
percent E
percent F
percent G
```

#15

I am far from the best code but you do not need to put =true in the code so it would be
*if (protagonist3)

I do not see anything else in this section of code that moght be causing the problem.

Edit you should never use capital letters for your var it can cause problems.

You could go

```*if (protagonist3)
*stat_chart
percent a A```

#16

I know it should not have a problem, which is why I’m confused why mine, which follows the same format has it. I use tab for indents btw, tabs don’t quite work in < pre > so.

```*label chart
*if(yourview)
*stat_chart
text firstname
text lastname
text nickname
percent yourperception
percent persuasion
percent agility
percent endurance
text yourwound_text
text mcompass_text
opposed_pair passionate
cold
if(dgview)
*stat_chart
text dgfirstname
text dglastname
text dgnickname
percent dgperception
percent intimidation
percent firearm
percent hth
percent endurance
text dgwound_text
text dgmcompass_text
opposed_pair dgpassionate
cold
```

#17

Sorry I just not seeing a problem. On my phone so unable to test but I might sujest using
https://dl.dropboxusercontent.com/u/7840892/CJW/choicescript/tools/IDE/main.html
as it has helped me solve a lot of problems in the past. Hope this helps

#18

Wait, above that code I have this. Maybe it affects it?

```*if yourwound = 0
*set yourwound_text "Eh."
*goto chart

*elseif yourwound = 1
*set yourwound_text "Aiita."
*goto chart

*elseif yourwound = 2
*set yourwound_text "Kuso!"
*goto chart

*elseif yourwound = 3
*set yourwound_text "Yameteh!"
*goto chart

*elseif yourwound = 4
*set yourwound_text "Soshite boku wa shinu."
*goto chart
```

#19

Hopefully someone with a computer can help on my phone only able to look at code. I do not see a reason. But if you have the file where I could download I can copy it over to my laptop and test.

#20

Never mind I found the problem… there was a missing * in front of my ‘if’… that was embarrassing…