Print order
Posted: Tue Jul 24, 2012 7:53 am
I thought I remembered an old thread somewhere on this board raising the issue of how the order of appearance for short_descs or initial_descs in the same room is determined. I couldn't find that thread, so I'll bring up the discussion again.
I finally got a total scene description -- the room description plus the short_desc/initial_desc descriptions -- to fit together correctly for one of the messier rooms in "Tree and Star." I've also relied on short_descs to convey important information about the location in "World Builder" and in the game I was making before that. Doing so is helpful for several reasons from a design perspective, not the least because short_descs will always be displayed, even if the player prefers to use brief mode.
The order in which short_descs appear is usually important to me. I see that the youngest child on the object tree usually gets its short_desc printed first, and then children of container\platform objects may be listed. I think any grandchildren that have short_desc or initial_desc properties still get displayed only after all the children.
There's a lot of this that I don't understand. I think NPCs might be handled differently from other objects. Component objects definitely complicate things. In the scene description I was working on, I wanted a component object to print a short_description, so I took away its default hidden attribute. The component object was then always displayed first, directly beneath the room description, no matter what else I did. I didn't want the component object to appear first, so I used its short_desc property to mention the object that I really wanted to appear first. This is messy, but I'm sure it makes no difference to the player what code object prints the text that mentions any given characteristic of a location.
If you have an object that absolutely has to be printed first, no matter what, one good cheat is to make it scenery (or give it the hidden attribute) and then simply write its "short description" as a separate paragraph at the end of the room's long_desc. More complicated scene descriptions require more complexity than this, however.
I finally got a total scene description -- the room description plus the short_desc/initial_desc descriptions -- to fit together correctly for one of the messier rooms in "Tree and Star." I've also relied on short_descs to convey important information about the location in "World Builder" and in the game I was making before that. Doing so is helpful for several reasons from a design perspective, not the least because short_descs will always be displayed, even if the player prefers to use brief mode.
The order in which short_descs appear is usually important to me. I see that the youngest child on the object tree usually gets its short_desc printed first, and then children of container\platform objects may be listed. I think any grandchildren that have short_desc or initial_desc properties still get displayed only after all the children.
There's a lot of this that I don't understand. I think NPCs might be handled differently from other objects. Component objects definitely complicate things. In the scene description I was working on, I wanted a component object to print a short_description, so I took away its default hidden attribute. The component object was then always displayed first, directly beneath the room description, no matter what else I did. I didn't want the component object to appear first, so I used its short_desc property to mention the object that I really wanted to appear first. This is messy, but I'm sure it makes no difference to the player what code object prints the text that mentions any given characteristic of a location.
If you have an object that absolutely has to be printed first, no matter what, one good cheat is to make it scenery (or give it the hidden attribute) and then simply write its "short description" as a separate paragraph at the end of the room's long_desc. More complicated scene descriptions require more complexity than this, however.