I6 - changing the player (selfobj) to add new properties

I am trying to add 2 new properties to the Player (selfobj). I have tried following the examples given in this old post without success.

I am using Inform v6.31 with Library 6/11

I copied the selfobj definition from parserm.h and then added the new properties - strength & wisdom and renamed the copied selfobj to My_selfobj as per Andrew Plotkin’s second response in the post.

Object My_selfobj "(self object)" with short_name [; return L__M(##Miscellany, 18); ], description [; return L__M(##Miscellany, 19); ], before NULL, after NULL, life NULL, each_turn NULL, time_out NULL, describe NULL, add_to_scope 0, capacity 100, parse_name 0, orders 0, number 0, strength 100, wisdom 35, before_implicit NULL, has concealed animate proper transparent;

Then in the Initialise routine, I invoked player=My_selfobj; as the first statement before setting the start location.
Have also tried moving it to after the start location is declared but results are no better.

[Initialise; player=My_selfobj; Location = L_Path; ...

It all compiles OK, but when I do SHOWOBJ me, I get the following…

It seems that the properties are being set to objects 100 & 35 whereas they should just be 100 & 35 as set in My_selfobj definition.
Am I doing this right? Or am I missing something?

To Inform, this is the same thing. After all, it doesn’t know which you mean. Imagine a property called “father” which is set to object 35.

You’re doing it right.

The Z-machine is not strongly typed internally (neither is Glulx), so the integer value 100 could represent either a number or an object. The SHOWOBJ command doesn’t know, so it displays both. If you deal with the value as a number, it will act like a number.

(In case you’re curious, the VM can distinguish an object from a string from a function. It has that much type discrimination.)

Thanks Zarf,
I was suspecting that would be the case. I haven’t started to use these in the game yet. I was just setting them up when this occurred. I am translating an old BASIC game from a book. I did the bulk of it back in 2006, but left out this bit as I couldn’t figure out how to implement it.