Getting Those Messages finally Organised
issueid=47 04-03-2008 09:29 AM
Ancient Member
Number of reported issues by Elone: 1
Getting Those Messages finally Organised
Basically, a way to get those messages coloured for legibility - in a way that players can customise

I have made a post about this in General Discussion, whereas this is where it should have went. I have been thinking if I should link to that topic from here, but I guess that I will copy/paste it completely for completeness. Here goes.

This feature is often used in internet terminal stuff. Basically, the program will react upon a received line. Applied to ADOM/JADE, it would work like this: when program receives the "You feel hungry." message, it could react by, A) Colouring it with hue of our choice. B) Automatically get food and eat it. C) Substitute that text, and display a text of our choice. D) Anything else. Now, I dont favour anything automatical, but highlighting text of our choice into a colour of choice, is another thing.

If we want to highlight names with variables, such as "Goblin hits you" AND "Rat hits you" in the same line of code, we would put something like this:

"(%w) hits you." This is how the Regex that I know of, works. The (%w) is a wildcard that will match any word, meaning that command/highlight will be executed upon whoever hits us. Notice the issue if a Giant Rat hits us (name is made of 2 words, so we may use a slightly different wilcard to envelop such a name).

Some of common wildcards are (%w) which matches words, (%d) which matches digits, (%*) which matches anything, and so on.

A CFG file could be used for this. Same like the common ADOM cfg file, this one would also be created/edited by players themselves. A line or two would look like this:

"You get hungry." {#HIGHLIGHT 0....16}
[This line will change the matched line into an ascii colour; however, also allowing hex colours to be chosen would be nice]

"The sun has finally appeared from behind a hill." {#SUBSTITUTE "Good morning!"; #HIGHLIGHT 9}
[This code substitues/replaces the first line with the second one, and optionally highlights it in a colour that we choose.]

"You see (%*) laying on ground." {Ctrl+P}
"You see stairs leading downwards here." {Shift+<}
[First line, when it sees something laying on floor (a red gem, or a hooded cloak) will execute the command stated, for instance, to pick it up (or any number of queued commands that we set); and the other line will go to another dungeon levels as soon as adventurer steps onto the stairs. Examples are not prime, and like I said, I dont like automation, but give it to players, and they'll find out where to use it.]

One sidenote, probably wont have a lot of use in an engine like current JADE one, but since these wildcards recognise/retrieve a string, it could be used to store variables. I will gladly say more about this too, if this post sparks any interest at all.

I will probably get varied response on this, I even wonder if everyone will read up to this point. I'm mostly interested in what Creator has to say, because, afterall, it's him who has the choice of implementing our wishes (or not). Me? I'm being realistic.
Issue Details
Issue Number 47
Issue Type Feature
Project ADOM II (formerly known as JADE)
Category Unknown
Status Suggested
Priority Unknown
Suggested Version Unknown
Implemented Version (none)
Votes for this feature 3
Votes against this feature 0
Assigned Users (none)
Tags (none)




+ Reply