Add to/Augment existing Extension ( GLULX TEXT EFFECTS )


I’m curious about maybe augmenting or adding to the already existing extension to make it more suited to my needs.

For example, GLULX Text Effects by Emily Short and Version 5 rewritten by Dannii Willis.

Is it possible at all to add to extension code?

The goal in this case would be to unlock more possible custom sets. As it is, there’s only two.

Is that possible? And if it’s possible, is it cool if I do this? I mean, it’s not my code. It’s up for use but I assume it’s as-is.

There’s no difference between code in an extension and code in your game. So if you want to replace a rule or amend a table, it’s the same procedure as usual.

But in this case the two custom style limit is fundamental to Glk, so adding to the table won’t change anything. (I don’t know how interpreters would react to using undefined styles actually, but I doubt it would be consistent or useful to rely on this.)

I mean adding a style?

turnA glulx text style is a kind of value. The glulx text styles are all-styles, normal-style, italic-style, fixed-letter-spacing-style, header-style, bold-style, alert-style, note-style, blockquote-style, input-style, special-style-1 and special-style-2.intoA glulx text style is a kind of value. The glulx text styles are all-styles, normal-style, italic-style, fixed-letter-spacing-style, header-style, bold-style, alert-style, note-style, blockquote-style, input-style, special-style-1, special-style-2 and special-style-3, special-style-4 and special-style-5.

And say it’s as easy as that… is it cool to change someone else’s hard work?

You can add styles, but the interpreter won’t necessarily recognize them–only the eleven standard styles are defined in Glk. According to the spec it shouldn’t give an error if you try to go past that, but should treat any attempt to use those styles as “style_Normal” (the plain text style).

EDIT: To answer your other question, though, extensions are offered with the intent that people will use them in their games. If you need to override some part of the extension in your game code, by all means go ahead.

And is there a way to add an extra eleven?

Sh*t, the Doctor got 13 extra lives. All I’m asking for is 11 extra custom styles.

It’s a fundamental limitation of the Glk style system. Unless the specification is amended to add more custom styles, and all interpreters are updated to handle them, you only have the two.

Any way around this? At all?
On the Z-Machine i could just change things on the fly. is that possible?
Like, just [red letters] something.

Not really. It’s just how the style system is. There has been talk of changing it for a while but for the moment it’s what you have.

There are several ways around it. However, none of them are available to you in Inform. If you switch to TADS, you’ll have full access to HTML-style text coding. Again, you’ll have to rely on the ability of interpreter programs to follow your instructions, but TADS 3 games can run in a Web browser, so you’ll have a fairly clear field. If you’re really ambitious, you could try learning Undum with the Vorple extensions. It’s a lovely game interface, again totally customizable via HTML, CSS, or your own Javascript code. Authoring in Undum means learning to write Javascript, which is frankly not a very good language for IF authoring – but these ARE viable alternatives. There may be others.

I mention all this not to try to dissuade you from using I7 but because I can see that you have an urgent desire for more control over the visual appearance of your game. Inform is just not the best authoring system for those who have that type of priority.

buh :frowning:

and i have no idea how to write to a preference file and get the info back like name, last name, age, gender, and counters info.
i can barely read/write from the damn documentation’s examples. I have no idea how they work.
this whole thing is scary and unnerving.

i appreciate the assistance, though.

While I made that post, Jim Aikin wrote a post.

Okay now I’m starting to understand why people are so full of praise of the GLULX 's range of control when it seems so limited to me.

It’s much less scary and unnerving now. :slight_smile:

The most efficient course of action would be to reassess my priorities to fit my current situation.

I thought I could but didn’t know how.
Now I know I can’t. On to other things.

Thanks, Jim!

You can repurpose the other styles. Header, alert, note and blockquote are hardly used by Inform at all.

I was thinking of doing that but, like, Header is for the title? I didn’t see it when I modified it. I didn’t notice the alert stuff either when I modified that.

Maybe I did it wrong. It’s just putting new settings in the continued table and it will use those instead of what it has default, right? Or do I have to restate each aspect (including color and weight) ?

It combines new rows with the old rows. You only need to specify what you want to change.

When would a GLULX game require header, alert, note and/or blockquote ?

Header is the title in the banner text, right?
Alert is the game over screen ***You done ####ed up good now.***, right?
Note… I don’t know what note is.
Blockquote is that thing where it’s reversed and floating, right? Except here it’s just the format and not the actual floatiness.

If I get 4 extra custom styles to work with my problem is solved.

I don’t use the banner text (except special mention in the menu)
I have custom game over mentions
don’t know what note is
i’m not blockquoting anything, i’m going for a book-look


You should be using the banner text; it’s required by Inform’s license. :wink:

But yes, that’s what Header is used for. You should be able to alter the banner to turn it into Subheader if you need to. Alert is for the game over screen, and I think score changes too? [Your score has gone up by 5 points.] I use note for that in my story but I can’t remember if that’s the default. And blockquote is for, well, block quotes, as you said.

I personally like to use the Alert style as a “bold-italic”, so that those two styles can be combined. But you may not need that, so you’d have six colors to work with.

A caution, though: some interpreters don’t let stories override the appearance of the built-in styles. So Header will come out big and important-looking, but not necessarily blue or italic (or whatever you specify it to be).

Nah. Not in the sense that it’s messing up the game’s flaugh. The information it displays is required and that’s given… …in the menu, under Story Information. :slight_smile: It’s right there with all the extensions I’m using. None of that “modesty” crap. If they made something I’m using I’m naming names (and pointing fingers). Oh and the IFID is there too. That’s why I wanted to print the IFID in this thread (clicky).

Is there a list of interpreters that do(n’t) support all the things? I’m using GLULXE for testing, and the “fast” and “basic” version of git.exe (the one that’s that weird window that won’t maximize or fullscreen and forces the same fixed letter width font and looks mega retro and you have to drag the files onto the executable to work or else it just makes you wait and any key ends the program - that one).