It looks like you're new here. If you want to get involved, click one of these buttons!
<if>...<else>
macro that goes through a location ID of the rooms that is passed to it in the link which I'd display silently, to get the information and then the template would display the various text for the rooms, work out if it's already been searched, exit directions and perform the relevant 'tick' (a system that modifies various 'rechargeable' stats, and then checks for random events on a diceroll). These templates would obviously link to themselves, most of the time. There would be 'key' locations that are a passage in themselves, but mainly because I want them to do special things and contain NPCs.nobr
and display it will only take up one line in whitespace, and that I can also place this macro at the end of a template passage, but keep the variables to be displayed above them? For example a template passage may look like this...
<<print $roomhead>>
<<print $roomtxt>>
<<print $roomlinks>>
<<display "loclookup">> ;;The bit that sets the values to the above variables.
As always, thanks in advance for any help.
Comments
I'm sure there is a maximum size (I don't know what it would be off-hand), however, it's certainly large enough that you're unlikely to encounter it. It's very likely related to the maximum string size for the weakest link in the chain, and I would be surprised if it were less than 1 MiB of runes/Unicode characters, at least.
If by passage macros you meant pseudo-macros, then no such thing exists in SugarCube (it has widget macros instead).
As to the line-breaks. If you tag the passage with
nobr
then you shouldn't get any line-breaks from it, normally, so you'd only get the one from its call, which you can also suppress if desired.For the
<<print>>
vs.<<display>>
ordering in your templates. If the<<display "loclookup">>
call sets the values that you want those<<print>>
macros to output, then it needs to come before their calls, not after.I'm more comfortable using this approach as there's variations in which role you choose to play (medics have a really low hit value, but also have the ability to regenerate health in combat, while scouts have an average level of hit value, but have difficulty with heavy weapons) and I don't want to reach a point where I have a passage where I'm referencing the wrong values and not realising. There's also skill sets that can be purchased (different for each of the four classes as a security guard with the full skill set would end up being a tank and have the ability to one shot an elite droid who are meant to be the hardest enemies to take down) and it's a lot easier to code the shop function for these separately as opposed to throwing it all into one passage.
Ah. That's fine then.
That or just plain "passage" would work. You're not really doing anything special there.