Issues using <USE "TEMPLATE">

I guess I’d comment here lol. But I felt this was a really small question about ZILF. I’m playing around with it on Linux (specifically Pop os) and for some reason <USE "TEMPLATE"> has issues (I believe because it can’t locate the file or whatever?) so I’m unable to use OBJECT-TEMPLATE. Is there a fix or a specific thing I must do on Linux to fix this sort of issue?

Hi,

In my testing, I got it to work by changing the line in template.zil from:

<PACKAGE “TEMPLATE”>

To:

<PACKAGE “template”>

Then add the line in your code:

<USE “template”>

Either this or you rename the file to TEMPLATE.zil, i.e. All caps then add:

<USE “TEMPLATE”>

as before. In non-WIndows environments where case-sensitivity is an issue, both does the trick.

Now you can define templates:

<OBJECT-TEMPLATE
LIGHT-ROOM = ROOM (IN ROOMS) (FLAGS LIGHTBIT)>

Then use it to define objects or rooms (in this example):

<LIGHT-ROOM TEST-ROOM (DESC “TEST ROOM”)>

I hope this helps. Cheers

2 Likes

Yeah, that seemed to work! Thanks!