Exact Same-Nouns Achieved.

More testing and efforts, along with one of my new meta-commands- “SendToItemAUTO Num1 Num2”- a meta-command I do not often use, have confirmed so far the ability to have EXACT same nouns in an environment.

This means you can have six BRONZE BLOCKS in a line of six rooms, one in each. Or scattered about all throughout the game world, but placing two or more in the same place…no. Except with literary illusion: three rooms make up “one” room, “You are in the middle of a large chamber. Against the east wall is a bronze block; against the west wall is another bronze block. They are each thirty feet away…”

Normally this presents a problem: if you type in PUT BRASS LANTERN ON BLOCK all is well by default but if you type in PUT BRASS LANTERN ON BRONZE BLOCK you will receive a “what block?” error message except for wherever the first block is. This is because when the player is specific with adjectives AGT scans down the list of nouns in numerical order, and in this case the first bronze block is noun 310. Because this noun is only located in one room that is the only place typing in PUT BRASS LANTERN ON BRONZE BLOCK will work.

Google Gemini suggested a “floating noun” as in the same noun being placed in whichever room you are in but admitted I was right about the obvious problem: if you put a ruby on the “first” block then it will be on the “second” block as well, then the “third” etc. So that won’t work.

AGT has meta-commands for making variables into noun and object values. The proper values are there when just saying BLOCK but for some reason BRONZE BLOCK always yields 310. This means when using BLOCK it scans through all of them but not with BRONZE BLOCK.

“SendToItemAUTO Num1 Num 2” sends an item to another based on whatever you typed in. Type in ON and the item is ON the block; type in BESIDE and the item is beside, etc. Arranging the meta-commands so “PrepIS #” comes first disallows you doing something, in this case putting the lantern UNDER or BEHIND any of the blocks. It only takes two meta-commands to do this for all of the blocks.

That part is akin to TADS in its way. With TADS you can define an object in a way that says “do not allow putting something under this object.” “PrepIS #” somewhat indirectly achieves the same exact thing, and does have considerable flexibility as do most meta-commands. If TADS has this based on each item then both TADS and AGT can do the same thing: not allow you to put anything under any of the bronze blocks except for the fourth for example.

The only problem right now is that “SendToItemAUTO Num1 Num2” uses hard numbers. Therefore I intend to change the numbers to variables. All you have to do is set the second one to the value of the bronze block (object) in question; the first (noun) can be done automatically.

Thus you can have a line of rooms or hallway sections lined with bronze blocks and you can interact with any of them. For AGT this is quite nifty and expands its abilities even more. You can have more than one FIREFRUIT TREE in an area so you can bribe the magnesium fire mook away rather than using all of your Splash magic to extinguish it.

(My fantasy/sci-fi settings usually have a basis in reality. If a magnesium fire is heavily flooded with water it must get its oxygen from the water, so its net energy gain is only roughly half- this, combined with the large amount of water acting as a heat sink, will extinguish it. A “thermite level” salamander is impervious to 99.99% of any water magic so forget using Splash magic at all.)

All of these modifications combined still will not make AGT the equal of TADS 2+ and other text game engines but they do make AGT a viable game engine able to reach the lower professional part of the text game spectrum. Since that is as high as I will ever go (I’m old get off my lawn) it’s good enough. Certainly from what I have seen the first “Unnkulia” game is well within its reach. Also at this point it is unlikely I’ll be able to handle the learning curve TADS requires.

If anyone thinks this hasn’t been done I could try and post a video of it on Youtube. It would be in 240p but it should work. It could show the other aspects of the TEST “game,” including various monster behavior (e.g. how by default you can leave a room and how something pursues you when you carry a particular item), the “to 10” combat system, the “Simon” sub-game, and of course the line of rooms with identical bronze blocks. Oh yes, and the demonstration of “PrepIS #,” the crown jewel of the new meta-commands, which allows AGT to distinguish among prepositions.

That’s interesting! I’m working on a game engine with a similar aesthetic/design philosophy to AGT with various improvements. It’s not done yet. Currently, there can be multiple Items with the same name but when you use a command like Look Bronze Block/Bronze/Block, it’s scoped to the current room so no issues there. However, I do need to add an engine variable for command target at some point though, so I can evaluate/trigger an event based on dynamic object targets versus specific object targets, e.g. evaluating item ID 10 versus item ID $command_target.

Sounds interesting (such efforts always really interest me)- but, uh, I’m old :face_with_spiral_eyes: …could you please explain that last line? “Item ID 10 versus item $command_target,” I’m not sure what that means. Does that mean what something is and some action relating to it?

Tonight I’m going to test the command after replacing the “set” numbers with variables. With a bit of luck when you do something with a noun- PUT BRASS LANTERN ON BRONZE BLOCK, PUT WHITE GEM ON BRONZE BLOCK, etc.- the variable should automatically be right so only one command/room is needed for that. It is curious how BLOCK seems to get it right by looking locally (where you are) but BRONZE BLOCK fails because it checks globally, stopping at the first instance.

So, easy way to explain the difference between evaluating item ID 10 and item ID $command_target.

>EXAMINE BOSSGALAGA

Examine is the command and BossGalaga is the command target. Or, if the player types EXAMINE PLANT, then the plant object is the command target. I’ve tinkered with AGT before but it’s been EONS, but if I recall AGT is limited in that aspect. Now, I could evaluate whether an item/object with id 10 is being interacted with or I could use the dynamic $command_target.

Here’s a little code snippet. You would add something like this to your code where you process player commands.

if item.location == myengine.player_room or item.location == player_inventory_location then

*You may want to add extra IFs for other situations, like checking to make sure the item doesn’t have a hidden flag, for example.

This checks if the item’s current room/location is the same as the current room the player is in or if it’s in the player’s current inventory. If so, then process player commands as normal. Otherwise, tell the player that you don’t see that thing here.

That’s not AGT specific though. That’s agnostic methodology can be applied to many text-based game engines, but as I’m typing all of this, it’s been a long time since I’ve used AGT but my scripting language is very similar to AGT/ADRIFT/ZIL. I think what you’re describing is an AGT limitation, though. When you try to interact with an object that has the same name as an object in another room, it will look for the first matching named object in its database/tables.

Simplest solution is to simply give the objects different names. If it’s an element puzzle, maybe call them Fire Block or Red Block or whatever. I don’t know that AGT allows you to fiddle with the engine all that much, but I think you could create a workaround by creating a rule to move the block object (non-takeable, I assume) when the player enters a room to that same room, where a block should be?

Oh, I see- you mean actually interaction with something and the game identifying the item. Which is the problem here. Yes, it is a problem for AGT if someone is specific- just BLOCK works perfectly but BRONZE BLOCK always stops at the first instance of it on the list (in this case 310).

Since my skill level is not high enough yet to actually risk trying to scan specifics locally without causing trouble elsewhere I had to combine one of my custom meta-commands with a bit of cheating- or programming Judo if you prefer:

COMMAND PUT ANY ON BLOCK
FlagON 25
AtLocation 21  (\* ROOM 2 *)
MakeVarNounNum 17
MakeVarObjectNum 18
VariableEquals 18 310  (* VERY IMPORTANT! \*)
PrintMessage 24
PrintMessage 25
SetVariableTo 18 311
SendToItemAUTO #VAR17# #VAR18#
TurnFlagOff 25
DonewithTurn
END_COMMAND

Okay, there are six bronze blocks. All identical except for location and quick description (“The third bronze block is here.”). Each is in a separate room. Luckily AGT has default meta-commands so a variable can be assigned values based on the noun and object. This is what is happening with variables 17 and 18. The problem is if someone uses BRONZE BLOCK the object value is always 310. So if this is detected the command will place the noun in question on the block in the room- since this is Room 2 the value 311 is plugged into SendItemToAUTO’s second variable (18). This handles placing the item. The AUTO part indicates that whichever preposition the player used is what the command uses. It works. Since this command is no longer hard-numbered but uses variables the value given to 17 by an earlier part of the command is automatically plugged in.

Before these meta-commands is this one:

COMMAND PUT ANY ON BLOCK
ObjectIsNumber 310
OR
ObjectIsNumber 311
OR
ObjectIsNumber 312
OR
ObjectIsNumber 313
OR
ObjectIsNumber 314
OR
ObjectIsNumber 315
TurnFlagON 25
END_COMMAND

COMMAND PUT ANY ON BLOCK
FlagON 25
PrepIS 2  ( *Under   )
OR
PrepIS 3  (* Behind )
PrintMessage 301
TurnFlagOFF 25
DoneWithTurn

END_COMMAND

These prevent someone from putting anything under or behind the blocks. You can add lines to exclude certain items in such commands- so you cannot shove a lantern under a door but you can with a gem. You can exclude certain lines so these do not apply to say blocks 2 and 5. It gives AGT considerably more ability at least.