# Two Protagonists, Three Stats Screen

**URL:** <https://forum.choiceofgames.com/t/two-protagonists-three-stats-screen/18174>\
**Category:** ChoiceScript Help\
**Created:** [June 10, 2016, 7:57am UTC](https://forum.choiceofgames.com/t/two-protagonists-three-stats-screen/18174 "2016-06-10T07:57:58Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Crax](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/crax/32/17031_2.png) [@Crax](https://forum.choiceofgames.com/u/Crax)\
**Post date:** [June 10, 2016, 7:57am UTC](https://forum.choiceofgames.com/t/two-protagonists-three-stats-screen/18174/1 "2016-06-10T07:57:58Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Gavorn](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/gavorn/32/13732_2.png) [@Gavorn](https://forum.choiceofgames.com/u/Gavorn)\
**Post date:** [June 10, 2016, 8:04am UTC](https://forum.choiceofgames.com/t/two-protagonists-three-stats-screen/18174/2 "2016-06-10T08:04:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Crax](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/crax/32/17031_2.png) [@Crax](https://forum.choiceofgames.com/u/Crax)\
**Post date:** [June 10, 2016, 8:11am UTC](https://forum.choiceofgames.com/t/two-protagonists-three-stats-screen/18174/3 "2016-06-10T08:11:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Gavorn](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/gavorn/32/13732_2.png) [@Gavorn](https://forum.choiceofgames.com/u/Gavorn)\
**Post date:** [June 10, 2016, 8:14am UTC](https://forum.choiceofgames.com/t/two-protagonists-three-stats-screen/18174/4 "2016-06-10T08:14:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Crax](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/crax/32/17031_2.png) [@Crax](https://forum.choiceofgames.com/u/Crax)\
**Post date:** [June 10, 2016, 8:23am UTC](https://forum.choiceofgames.com/t/two-protagonists-three-stats-screen/18174/5 "2016-06-10T08:23:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Havenstone](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/havenstone/32/198451_2.png) [@Havenstone](https://forum.choiceofgames.com/u/Havenstone)\
**Post date:** [June 10, 2016, 8:25am UTC](https://forum.choiceofgames.com/t/two-protagonists-three-stats-screen/18174/6 "2016-06-10T08:25:12Z")

</div>

> [@Crax](#):
>
> Question: would it change anything if the shared stats between Protag1 & 2 are opposed pairs?

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]

---

<div class="post-metadata">

**Author:** ![Gavorn](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/gavorn/32/13732_2.png) [@Gavorn](https://forum.choiceofgames.com/u/Gavorn)\
**Post date:** [June 10, 2016, 8:34am UTC](https://forum.choiceofgames.com/t/two-protagonists-three-stats-screen/18174/7 "2016-06-10T08:34:15Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Crax](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/crax/32/17031_2.png) [@Crax](https://forum.choiceofgames.com/u/Crax)\
**Post date:** [June 10, 2016, 8:42am UTC](https://forum.choiceofgames.com/t/two-protagonists-three-stats-screen/18174/8 "2016-06-10T08:42:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![The\_Chosen\_Plump](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/the_chosen_plump/32/43305_2.png) [@The\_Chosen\_Plump](https://forum.choiceofgames.com/u/The_Chosen_Plump)\
**Post date:** [June 10, 2016, 4:51pm UTC](https://forum.choiceofgames.com/t/two-protagonists-three-stats-screen/18174/9 "2016-06-10T16:51:14Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Crax](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/crax/32/17031_2.png) [@Crax](https://forum.choiceofgames.com/u/Crax)\
**Post date:** [August 10, 2016, 7:56am UTC](https://forum.choiceofgames.com/t/two-protagonists-three-stats-screen/18174/10 "2016-08-10T07:56:13Z")

</div>

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

Please help, thanks!

---

<div class="post-metadata">

**Author:** ![Lordirish](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/lordirish/32/238051_2.png) [@Lordirish](https://forum.choiceofgames.com/u/Lordirish)\
**Post date:** [August 10, 2016, 7:59am UTC](https://forum.choiceofgames.com/t/two-protagonists-three-stats-screen/18174/11 "2016-08-10T07:59:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Crax](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/crax/32/17031_2.png) [@Crax](https://forum.choiceofgames.com/u/Crax)\
**Post date:** [August 10, 2016, 8:03am UTC](https://forum.choiceofgames.com/t/two-protagonists-three-stats-screen/18174/12 "2016-08-10T08:03:22Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Lordirish](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/lordirish/32/238051_2.png) [@Lordirish](https://forum.choiceofgames.com/u/Lordirish)\
**Post date:** [August 10, 2016, 8:08am UTC](https://forum.choiceofgames.com/t/two-protagonists-three-stats-screen/18174/13 "2016-08-10T08:08:46Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Crax](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/crax/32/17031_2.png) [@Crax](https://forum.choiceofgames.com/u/Crax)\
**Post date:** [August 10, 2016, 8:12am UTC](https://forum.choiceofgames.com/t/two-protagonists-three-stats-screen/18174/14 "2016-08-10T08:12:53Z")

</div>

```
*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
```

---

<div class="post-metadata">

**Author:** ![Lordirish](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/lordirish/32/238051_2.png) [@Lordirish](https://forum.choiceofgames.com/u/Lordirish)\
**Post date:** [August 10, 2016, 8:17am UTC](https://forum.choiceofgames.com/t/two-protagonists-three-stats-screen/18174/15 "2016-08-10T08:17:06Z")

</div>

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
```

---

<div class="post-metadata">

**Author:** ![Crax](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/crax/32/17031_2.png) [@Crax](https://forum.choiceofgames.com/u/Crax)\
**Post date:** [August 10, 2016, 8:29am UTC](https://forum.choiceofgames.com/t/two-protagonists-three-stats-screen/18174/16 "2016-08-10T08:29:17Z")

</div>

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
```

---

<div class="post-metadata">

**Author:** ![Lordirish](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/lordirish/32/238051_2.png) [@Lordirish](https://forum.choiceofgames.com/u/Lordirish)\
**Post date:** [August 10, 2016, 8:33am UTC](https://forum.choiceofgames.com/t/two-protagonists-three-stats-screen/18174/17 "2016-08-10T08:33:20Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![Crax](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/crax/32/17031_2.png) [@Crax](https://forum.choiceofgames.com/u/Crax)\
**Post date:** [August 10, 2016, 8:40am UTC](https://forum.choiceofgames.com/t/two-protagonists-three-stats-screen/18174/18 "2016-08-10T08:40:33Z")

</div>

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
```

---

<div class="post-metadata">

**Author:** ![Lordirish](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/lordirish/32/238051_2.png) [@Lordirish](https://forum.choiceofgames.com/u/Lordirish)\
**Post date:** [August 10, 2016, 8:56am UTC](https://forum.choiceofgames.com/t/two-protagonists-three-stats-screen/18174/19 "2016-08-10T08:56:16Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Crax](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/crax/32/17031_2.png) [@Crax](https://forum.choiceofgames.com/u/Crax)\
**Post date:** [August 10, 2016, 8:56am UTC](https://forum.choiceofgames.com/t/two-protagonists-three-stats-screen/18174/20 "2016-08-10T08:56:57Z")

</div>

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

[Next page](https://forum.choiceofgames.com/t/two-protagonists-three-stats-screen/18174.md?page=2)
