hmmmmm as far as I can tell, it must either store the name (using ObjSetName) as all uppercase, or retrieve it (using ObjGetName) as uppercase.
of course it could be that it simply can't tell the difference, and whether you use Z or z it will find the same square on the font tile. *shrugs*
as for an easier workaround..... hmmmm one or two ideas spring to mind (such as writing your own equivalent of the ObjSetName/ObjGetName code and using that instead), but nothing obviously easy I'm afraid.
in function DialogInventory in menus.gs, replace this line:
text += ObjGetName(idx);
with this line:
text += FindObjName(idx);
then write a new function, as so:
func FindObjName(idx)
{
if(ObjGet(idx,O_ID)==1000) return "A Bucket";
if(ObjGet(idx,O_ID)==1001) return "A Large Sponge";
if(ObjGet(idx,O_ID)==1002) return "A Heavy Filing Cabinet";
// etc etc...
return "";
}
with the above code, you'd have no further use for the ObjSetName() function (I think...)
I can't help feeling however, that this solution is too simple, and that I may have missed something...
I've ended up doing something similar, as the only alternative would seem to be waiting for a fix in the engine, which will not be swift in coming. I just wanted to make sure I wasn't missing something somewhere. Cheers!
Yes, both the objects and the rooms have upper case names. This happens internally in the "set" functions. Don't know why I did so. If you people want, I can change it to store the names the way they are given.
An alternative hack would be to store the names with a special symbol before the upper chars, like "*THE *STONE", and when retrieved for display the name would be converted into "The Stone" with a scripted function. But I don't recommend such hacks.
Just let me know, and I'll update the engine if you wish.
It sounds like a simple update to make, so it would be cool- although probably in a way that preserves the old behaviour to avoid too many annoying conversion issues when updating old games to a newer engine.
If the set functions set the names verbatim, perhaps add a G_ variable to indicate whether item and room names should be fully capitalised when returned by the get functions. That way, the new template can set the variable early on, but older games will leave it unset and preserve the old behaviour.
For the editor, I guess it doesn't really matter if the capitalisation is a little off when converting.
This discussion is read-only.Browse the replies or return to the forum category.Back to forum