Permanent Hitchhikers Guide-like item that gives you enemy/etc attributes?

see title. im making a dungeon crawling RPG in i7 (as per my last post) and i’d like for the player at the very beginning to get a item that they cant take off unless they die. if you use it on an enemy, a party member, or an item it tells you the stats and other attributes (like a decsription of what something looks like) of said thing you use it on. how can i do this? thanks!

1 Like

Which item in the Hitchhiker’s Guide are you referring to? The Guide itself for the attributes thing? Or the thing your aunt gave you which you don’t know what it is for the ‘keeps returning to you’ part.

1 Like

the guide itself.

1 Like

sorry for not beign clear enough.

1 Like

One option is to make it “part of” yourself, which means it can’t be dropped, taken by someone else, etc. This ensures you can’t accidentally overlook some obscure action, but also the error messages tend to be awkward if it’s not actually supposed to be attached to your body, and it won’t be listed in the inventory.

The other option is to block all the actions that would remove it from the inventory. In standard I7, the only actions that can do this are “dropping”, “putting it on”, and “inserting it into”. You just need to be careful that you haven’t created any other actions that remove something from the inventory, or block them if you have.

Instead of dropping the crucial object, say "But you need it!".
Before inserting the crucial object into something: try dropping the noun instead.
Before putting the crucial object on something: try dropping the noun instead.
2 Likes

thank you! now just need to crack the scanning for attributes thing.

1 Like

I’m not sure if it is what you are after but I added a command to let the player see their own status … maybe it could be tweaked to show other NPCs as well?

A person has a number called Strength.
A person has a number called Intelligence.
A person has a number called Agility.
A person has a number called Vitality.
A person has a number called Luck.
A person has a number called Magic.

[Others]
A person has a number called XP.
A person has a real number called Current Health.
A person has a real number called Maximum Health.
A person has a real number called Current Stamina.
A person has a real number called Maximum Stamina.
A person has a real number called Current Mana.
A person has a real number called Maximum Mana.

Understand "Status" as status.
Status is an action applying to nothing.
Carry out status:
	say "Name: [player's full name] ([player's forename])[line break]Experience: [XP of the player][paragraph break][fixed letter spacing]    Strength: [strength of the player][line break]Intelligence: [intelligence of the player][line break]     Agility: [agility of the player][line break]    Vitality: [vitality of the player][line break]        Luck: [luck of the player][line break]       Magic: [magic of the player][paragraph break]      Health: [current health of the player to the nearest whole number]/[maximum health of the player to the nearest whole number][line break]     Stamina: [current stamina of the player to the nearest whole number]/[maximum stamina of the player to the nearest whole number][line break]        Mana: [current mana of the player to the nearest whole number]/[maximum mana of the player to the nearest whole number]".

During character creation you can choose Fighter, Thief or Wizard and if you choose a fighter I set this:

if the class of the player is Fighter:
			now the player is Fighter;
			now the strength of the player is 25;
			now the intelligence of the player is 10;
			now the agility of the player is 15;
			now the vitality of the player is 15;
			now the luck of the player is 10;
			now the magic of the player is 0;
			now the maximum health of the player is ((the vitality of the player * 0.66) + (the strength of the player * 0.33));
			now the current health of the player is ((the vitality of the player * 0.66) + (the strength of the player * 0.33));
			now the maximum stamina of the player is ((the vitality of the player * 0.5) + (the agility of the player * 0.5));
			now the current stamina of the player is ((the vitality of the player * 0.5) + (the agility of the player * 0.5));
[Note: I think these lines are redundant for a Fighter, with no magic, because the default value is 0 unless I change it!]
			now the maximum mana of the player is 0;
			now the current mana of the player is 0;

The player can type status at any time to see the output or in the code I can use try status so something like Instead of examining the Crucial Item, try status.

I’m still new to Inform too so I’m not sure how you’d modify that to let the player use the Crucial Object on another person.

2 Likes

i will definitely try this out. thank you.

1 Like