altering the you__tx constant in inform 7 / i6

In the French lib, the player is defined by the you__tx constant which defines the “you” display. I’m also trying to define a “she” or “he” according to the female state of the player (in an alternative mode the authors can choose, so you can use “you”, “I”, “he” “she” etc)

I can’t include this in the code of the library (it’s already in an "include (- i6 code -) statement):

#iftrue player has female; Constant YOU__TX = "Elle"; #ifnot; Constant YOU__TX = "Il"; #endif;

it gives errors during compilation:

any idea?

I would also be quite happy to be able to redefine the constant YOU__TX in the inform7 game code, but it’s not possible either because it was already defined in the library.

I managed to do it this way:

In my game code:

The player is female. Use FEMALEPLAYER.

In my library code:

[code]Use FEMALEPLAYER translates as (- Constant FEMALEPLAYER; -).

Include (-
! Other I6 code related to the French library
Constant YOU__TX = “Elle”;
Constant YOU__TX = “Il”;

But I don’t understand why my #iftrue statement wasn’t accepted.

I don’t know I6 very well, but I assume that #ifdef#endif blocks are considered at compile time, but the player’s gender is set at runtime.

That’s correct – the I6 #IFTRUE statement can only test compile-time constants.

The YOU__TX constant is only used by the standard name printing rule, which is defined in the Printing.i6t template. You can replace that (at the I6 level) and add player-testing logic there.

thank you both!