How To Emulate Choice of Robots' Stats Screen

One thing I particularly liked about Choice of Robots was that, as your stats increased from 0 to 1 to 5 to 25 to 35 etc, you would get, in the stats screen, a small descriptive explaining your proficiency. For example:

Grace: 3 (Buggy)
Grace: 35 (Transhuman)
Grace: 42 (Singular)


In my game, 1542: Rise of the Witchhunter, I would very much like to emulate this element of the game. What I want to do, because my game is set in the 16th century, is use Roman Numerals in my stats for skills. For example:

Witchhunting: IV (Competent)
Warmongering: XXVII (Godlike)

I would like to do this, but I’m afraid the ChoiceScript engine will only allow arabic numberals, i.e. 1 2 3 4 5 6 …

And I’m afraid I won’t be able to create stat dependent choices if I don’t use arabic numerals.

I am wondering if it’s possible to maintain arabic numerals hidden from sight, while displaying roman numerals in the stats screen and how to do so.

I’m sure there’s an easier way to do it, but you could always use *if statements for that part instead of a stat chart.

That’s a very interesting problem.
How about this? It should work for most small three digit numbers.

*temp roman ""
*temp number 19

*label top

*if (number > 100)
   *set roman roman&"C"
   *set number - 100
   *goto top
*if (number >= 10)
   *set roman roman&"X"
   *set number - 10
   *goto top
*if (number = 9)
   *set roman roman&"IX"
   *set number - 9
   *goto top
*if (number >= 5)
   *set roman roman&"V"
   *set number - 5
   *goto top
*if (number = 4)
   *set roman roman&"IV"
   *set number - 4
   *goto top
*if (number >= 1)
   *set roman roman&"I"
   *set number - 1
   *goto top
	
${roman}

I think the above code is almost right. I think you’d need clauses like the 9 and 4 checks for 90 and 40 as well. Solid work, though: debugging is easier than writing from scratch. This seems like a great use for *gosub`, yeah?

I doubt the stats will go any higher than L (50) or LX (60)
Might it not be simpler just to make a code that says, for the numbers 1, 2, 3, 4, to 57, 58, 59, 60, 1 = I, 2 = II, 58 = XXXXXVIII, et cetera?

@Pilgrim
Nope (if I understand what you’re saying), choicescript doesn’t support string manipulation so you couldn’t map individual characters directly - without using *script.
Well, I suppose you could if you defined them separately to begin with, i.e:

*temp tens 4
*temp ones 0

Which would be equal to 40.


@benhamill
Correct, there’s a few special cases that this won’t suit, but it’s a start at least - much better than a long series of *if statements.

SO much better. So very much.

1 Like

Oh god I remember doing this problem myself a while back except for text. Three hundred lines for less than fifty characters of text at the very max. Anyways, the only thing I can add that hasn’t been said is to remember your dummy variables. If you’re going to be making text descriptions based on the numbers, you’re not going to want to mess up those numbers by manipulating them directly.

1 Like

for what you want it’d be easier to just do this.

*create witchunting "I (Novice)"
*create warmongering "I (Novice)"

then in choicescript_stats

*stat_chart
    text Witchhunting
    text Warmongering

that should work.

If you aren’t using that many roman numerals - say, only going up to 10 - replacing variable names works.

At one point in my stats screen I have something like
*if number_of_partners != 0
*if number_of_partners=1
Dating: ${Partner_Name}

(etc.) - it works fine to replace text as needed in your display.

So, how about a replacing script along the lines of:
*create warmongering_level 0
*create warmongering_descriptor “(Unskilled)”
*create warmongering_numeral “0”

*if warmongering_level = 1
*set warmongering_numeral “I”
*set warmongering_descriptor “Novice”
*goto witchhunting
*if warmongering_level = 2
*set warmongering_numeral “II”
*set warmongering_descriptor “Apprentice”
*goto witchhunting
……etc.
*label witchhunting

You’d have to fill in a table with numerals and descriptors for each class - not ideal, you could probably use variable replacement to simplify it, e.g. the tutorial example with setting a virtue to “charity” and then being about to have “virtue” provide charity. But then you can just display it as
Warmongering: {warmongering_numeral} {warmongering_descriptor}
(I don’t think you need concatenation if it’s just two variables in a row)

Once you have it set up, you can access it with a subroutine if needed, and can change your text by
*set warmongering_skill +1