Yes, you can make everything privately-named as a default if you want

[6M62]

Continuing the discussion from X Women VS 'You can't use multiple objects with that verb':

The original question I posed in that thread was solved in that thread by the marked solution.

However, it led me sideways to a bigger issue in that I realised I wanted to make all things in my large game privately-named by default (instead of publicly-named, the Inform 7 default), especially going forward.

Why? Because the names I use are mostly of value to me as an author. I don’t want those internal names automatically being turned into things the player can type. And I don’t want to have to remember to type ‘blah blah is privately-named’ another 1200 or so times, leaving a minor hole in the implementation every time I forget. I already create ‘Understand ‘yada’ as ‘blah’’ lines for each thing I make, so for me, that’s not extra work.

There was a lot of input in the other topic about this, and for me, a lot of confusion about whether it would work or just break everything. So I tried it out on my large project (600+ things) and can verify that it worked and did not break everything.

You just put in the line 'A thing is usually privately-named.'

The consequences are what we would expect:

  • If you want something to be publicly-named from now on, that’s the exception, and you must explicitly declare it when creating the thing
  • You need to write an 'Understand 'yada' as 'blah' line for every thing/kind in the game
  • MEN and WOMEN are no longer automatic plurals the player can type. Where you want disambiguation amongst men and women, you must remember to throw in Understand 'men' as John-type lines on each relevant individual. This goes for single things of other kinds, as well. Now, if the player can see three women and types ‘x women’, the game will offer disambiguation. That gets rid of one of the sources of ‘YOU CAN’T USE THAT VERB WITH MULTIPLE OBJECTS’ that I wanted to squish.
  • The plural names of kinds (which are usually automatically generated by Inform while you’re not thinking about them) are no longer automatically recognised. This tends to be a headache-remover; as people like @Draconis have shown us, these plurals often have to be manually altered to nonsense words to prevent them generating ‘YOU CAN’T USE THAT VERB WITH MULTIPLE OBJECTS’ responses when they’re around similarly-named things.

That’s about it.

Here’s a little bit more, about combing my project to convert to the brave new world (including a privately-named-thing detector from @drpeterbatesuk):

Summary

I had to review my project carefully to make sure everything still behaved correctly under the new default; mostly by revising how early publicly-named things were created and named. I also went through every extension I used to make sure they didn’t create things that are expected to be exposed to the player through public-naming (turns out none did.)

To help me find these, @drpeterbatesuk gave me some code that identifies whether a thing was created publicly or privately-named at boot time. I needed this because I discovered that just asking your own game ‘if X is privately-named’ isn’t necessarily accurate!.. for odd reasons also speculated on below:

Thanks again to everyone who helped me sort through this from the other thread.

-Wade

8 Likes

Why do you care? Serious question.

Leaving aside the plurals-of-kinds issue, which I know can be annoying.

Has there ever been a situation where leaving an internal name exposed caused a problem for you?

I can say for sure that, as long as I use hyphenated source names (with a hyphen in the first nine characters), no player ever stumbles across one in my games. It is not a thing that happens.

1 Like

Because I care. Serious answer. :slight_smile:

I can’t remember if there has been a situation from players. I feel like there has been when I’m testing it myself, discovering something by accident.

I’m doing it the way I like to do it and want to do it. I wouldn’t feel satisfied or certain if I left the internal names exposed. I can make an analogy that’s probably not going to help you: it’d be like, uh, me doing all the work mastering a record and then not bothering to dither correctly at the last stages. I’d be leaving all the quantisation errors in place, and almost nobody can hear it, but somebody will, and I’ll know it’s there. And up with that I will not put.

-Wade

3 Likes

Well, that’s fair.

1 Like

I had noticed a while ago that objects’ privately-named attribute flips back and forth in play and Zarf explained it was recycled as a local utility flag. I’ve been assuming we couldn’t tell whether something had been originally defined as privately-named.

…so this is cool to have.

2 Likes

It apparently used to be said that if one had a near-intractable problem to solve in physics one could either spend months attempting to tackle it with mathematics, or just ask Albert Einstein.

I think @zarf is probably the equivalent of Einstein when it comes to problems in Inform. :wink:

2 Likes

Hardly. Several people have answered that particular question at different times.

If I’m good at anything, it’s peeking at the Standard Rules or a generated auto.inf test case to figure out what’s really going on. If you ask me an Inform question face-to-face, without letting me dig around in the code, I probably can’t answer it. :)

4 Likes

“Never memorize what you can look up in books” is a quote often attributed to Einstein, though what he actually said was somewhat different. He was asked, but did not know the speed of sound as included in the Edison Test. When this was pointed out, he said, “[I do not] carry such information in my mind since it is readily available in books. He also said, “…The value of a college education is not the learning of many facts but the training of the mind to think.” -Source

Seems like Einstein felt the same way about reference materials.