Firstly, I have never used forums like this before, so please pardon my lack of friendly formatting.
Mainly, I am asking for assistance regarding a couple of coding implementation issues I have been giving myself headaches over for two days now. (I have re-read the ‘Documentation’ completely twice over in that time period…)
I want to apply a weight-class system to objects so as to have certain objects take up a larger proportion of the player inventory than others.
What I have:
Mass is a kind of value.
1Mass specifies a Mass.
A thing can be Negligible, Light, Medium, Heavy, or Massive.
The carrying capacity of the player is 10010.
I want a Negligible object to take up 1 carrying capacity, a Light object to take up 10 carrying capacity, Medium 100, etc. Not clear on how to implement at all I just started Inform7 yesterday.
I don’t want supporters to display their contents until they are specifically looked at by the player using the Look [something] command. (Examine)
Whenever I tried to do this using various online strategies I either could never see the contents even if I used the Look command or I got an error… in one case the ‘solution’ completely ruined the room description formatting so spacing etc was off. I don’t really have any constructive code relating to this so… that’s that.
I would suggest taking a look at the source code for the Bulk Limiter extension which seems to do exactly what you’re wanting. You could decide to use the extension wholesale, or just implement the parts you wish to use.
Thank you for replying, the bulk extension seems promising.
One further question I have is about the supporter code, I wanted to make it a more general case so any generic supporter I make behaves this way. I can’t get the respective name of the supporter to print in the say action…
Rule for printing the name of a supporter while listing contents of the room:
say "[name of supporter]"; {This line doesn't compile, apparently it's not that simple.}
omit contents in listing.
Rule for printing the name of a supporter (called T) while listing contents of the room:
say "[printed name of T]";
omit contents in listing.
If you say “[T]” it goes through the “printing the name of T” activity, which invokes this rule again, hence an infinite loop. But if you say “[printed name of T]” it should just go straight to the printed name property of the object, which is usually what you want.
Thank you! It’s finally working exactly as I wanted. Now there is a greater level of depth in exploring each room… Seriously I’m glad you were all here to help, I will probably be making more posts on this site, as the community seems helpful, patient, and friendly.
Hopefully I will become proficient enough at some point to help others.