Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002119Core InformPropertiespublic2020-02-23 20:062020-02-23 23:10
Reporterajmako 
Assigned To 
PrioritynormalSeveritymildReproducibilityalways
StatusnewResolutionopen 
Platformx64OSWindowsOS Version8.1
Product Version6M62 
Target VersionFixed in Version 
Summary0002119: New properties do not show in index or showme command
DescriptionI'm having a couple issues with properties on objects and the SHOWME debug command and index.

The first issue has to do with giving things properties using "initially" without first defining the property.

In the sample code the room and the torch are given new properties using initially. In both cases the game compiles and the property is avaiable. However, it does not show in either the index or in the SHOWME command output.

The cheese block and jacket work exactly as expected. Their new properties appear in the index and with the SHOWME command.

The chest kind is the second issue. Here the game compiles properly, unless you attempt to reference the new property, which is not available for the object. The property does not appear as a property of the chest kind in the index, and doesn't appear in the index or SHOWME output for the toychest.

Logically, I wouldn't expect a new property of a kind to work unless it is specifically defined (the jacket), but the fact that the game compiles with just the setting of an initial value (the chest) but doesn't actually assign the property to instances of the kind (the toychest) can be discouraging.
Minimal Source Text To Reproduce
The Closet is a room. The darkness level of the Closet is initially "ambiently". The description 
of the closet is "[We] are in a tiny room, [darkness level of the Closet] lit."

The Torch is a device. The player carries the Torch. The power level of the Torch is initially 9. The 
description of the Torch is "It's one of those cool flashlights with a power indicator flashing 
'[the power level of the Torch]'."

The Cheese Block is a thing in the Closet. The Cheese Block has a number called age level. The age level 
of the Cheese Block is 24. The description of the Cheese Block is "There's a half-chewed label that 
says 'Aged [the age level of the Cheese Block] years'."

A chest is a kind of container. The logo of a chest is initially "Superman".

The Toychest is a chest in the closet. [The description is "It's a brightly painted toy chest with 
a logo ('[logo of the Toychest]') on it."] [The logo of the Toychest is "Wonder Woman".]


A jacket is a kind of wearable thing. A jacket has a number called size. The size of a jacket is usually 
12.

The Parka is a jacket in the closet. The description is "The label says it is size [size of the 
Parka]."

After jumping:
	now the darkness level of the Closet is "darkly";
	now the power level of the Torch is 8;
	now the age level of the Cheese Block is 25;
	[now the logo of the Toychest is "Batman";]
	now the size of the Parka is 11.

Test me with "showme closet / showme torch / showme cheese / showme toychest / showme parka / jump 
/ showme closet / showme torch / showme cheese / showme toychest / showme parka".
Additional InformationThe commented statements fail to compile with an error that suggests the property was not created.
TagsNo tags attached.
Effect(cosmetic) Index is created incorrectly
Attached Files

- Relationships

-  Notes
(0004900)
zarf (developer)
2020-02-23 21:31

This is a confusion about what you are defining. The "X is initially Y" declaration always defines a global variable, never a property. When you write

The power level of the Torch is initially 9.

...you are defining a global variable called "power level of the torch". It's not connected to the torch object; in fact, there doesn't have to be a torch object. Similarly, you define a global variable called "logo of a chest".
(0004901)
ajmako (reporter)
2020-02-23 23:10

So what you're saying is:

1. It worked were it worked not because the object has the property, but because I didn't just say [the power level] expecting inform to assume the most recently named object.

2. It didn't work where it didn't work because it couldn't.

Got it.

- Issue History
Date Modified Username Field Change
2020-02-23 20:06 ajmako New Issue
2020-02-23 21:31 zarf Note Added: 0004900
2020-02-23 23:10 ajmako Note Added: 0004901


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker