Wrote a bunch of stuff for Nexus as stress relief.
[Accents]:
. Developed a while back, I wrote this to capture the variation in people's emotions throughout the day. It is hard to imagine always talking in the same purring voice at all times.
.
What does it do?. Using emotes, this thing randomizes your speech pattern but not in a equal distribution for all your options.
. In this sample, I have entered the same command repeatedly:
''Speech impediments are troublesome.. The type of speech pattern that has the highest expectation (most frequent) is
In quiet tones. In fact,
Narrowing his eyes has a less than 1 in 50 chance of appearing (but is in this sample).
. Note that after I dragonform, I gain an additional speech pattern:
The air hums with electric tension. Not shown is the speech pattern I have associated with city Hashan: In mellifluent timbre (did not fire)
. Also not shown here is the chance of firing 'With a quizzical look, ' when asking a question, with a high firing chance (the highest).
. Other un-coded potentials are such as speech patterns with outdoors, indoors, underground, injury, affliction count. Think '
The crickets threaten to overpower $me's voice as' when talking on
road room, obviously at a low firing frequency.
[Fonts]:
. Allows cdn use of Google/other fonts:
. Yes that font is horrible.
. As simple as calling
`f fontstyle.
[Gradients]:
. Taken from Sylphas from Lusternia, including a loop back option.
[Player DB, pdb]:
. A player DB for Nexus users, usage:
honors player for creation
.hl to turn on highlighting
.uhl to turn off highlighting
.hl player color to specify a color for a specific player
.hl player to return to city defaults
. pdb also creates .vars and .affs as objects to interact with.
. Unfortunately, given restrictions on cross-origin requests, loading a local file is out of the question. Saving a local file is possible and readily done on my personal client.
. Therefore, the pdb uses window.localStorage that is local to the browser - this means that transitioning between computers means different states.
. pdb also flattens the object structure when saving, so it will store many things beyond city, class, history of professions, and race, unfortunately.
. Sorry Mindshell, you were conveniently there.
. Too lazy to add in API access, but maybe in the future.
[CSS Transitions]:
. Designed for Mudlet initially a couple of years ago, and re-written for Nexus.
. One of the things that happen during extended hours of play for me is eye fatigue. Part of that feels like it could be the static colours on a dark background that I stare at. Also, when not doing too much, the world can feel fairly static.
. One design thought was to create a dynamic sense of change even if the adventurer did not move.
. This lead to designing dynamic colors. In the following (very grainy) gif, you see a transition of css colors as the Achaean day progresses from day to night to day again (artificially sped up).
. In Mudlet, the colors are statically typed so you cannot affect already printed colors, just the new ones; Nexus and Javascript allow you to affect already printed lines so the color change affects the entire buffer. My preference is the Mudlet experience as you see a true transition over the course of the Achaean day in clantells, surroundings, etc. Unfortunately, to replicate that in Nexus has a larger number of gaps and may cause unexpected errors; not impossible though. I have gone with the simpler option.
. A few of the transitions over the course of the Achaean day on testing.
. Quite rough but a bit of native code overwriting required:
// A bit of vodoo
if (typeof linechunkUpgraded === 'undefined' || linechunkUpgraded === null) {
// save only ONE copy of old linechunk_color (IRE's version), otherwise, just overwrite every time
linechunk_color_old = linechunk_color
linechunkUpgraded = true }
linechunk_color = function(fg, bg) {
var chunk = linechunk_color_old(fg, bg)
// post-hoc formatting
// console.log(chunk)
chunk.formatted = function(chunks) {
if (this._fg === 'reset') {
var res = chunks.suffix
chunks.suffix = ''
return res
}
var classr = ''
var style = ''
var usecase = 'style'
// figure out if style is within our table, if it is, we use CLASS rather than STYLE
// only managing foreground at this stage...
if (this._fg != null) {
// some post-hoc modification to expand the capture pool
if (this._fg == '#ff00ff') { this._fg = 'magenta' }
if (this._fg == '#800080') { this._fg = 'magenta' }
if (this._fg == '#808000') { this._fg = 'brown' }
if (this._fg == '#00b300') { this._fg = 'green' }
if (this._fg == '#008080') { this._fg = 'turquoise' }
// if (this._fg == 'magenta') { console.log(ref); console.log(ref[this._fg]) } // debugging
if (!ref[this._fg]) {
style += 'color: ' + this._fg + '; '
} else {
classr += this._fg
}
}
if (this._bg != null) {
style += 'background-color: ' + this._bg + ' '
}
chunks.suffix += '</span>'
return '<span class="' + classr + '" style="' + style + '">'
}
return chunk
}
[Talismans]:
. Quintessential
[Miscellaneous]:
. Cumulative gold required, and some CFS manipulation.
Tried fixing the no-display on favicon, but didn't work out well.
All ported interspersed over 3 days. Hope it is a bit of fun to poke around.
JQOL
"All we have to decide is what to do with the time that is given to us."
Comments
But the individual functions - like the talisman organiser, or wares multiplier - are all built into the package, which will also do other things you might not want, like change your text display colours.
Right click and SAVE AS
Should be able to import as a .nxs package into Nexus' drag-drop box.
You will want to find 'tls.separator' and set that to your in-game separator.
Also wrote some code commentary if you want to try and figure out some stuff and modify it by yourself (try changing the colors!)
If you click the 'Reflex Packages' tab and its 'Click here or drop a file with a reflex package to load it', that should work.
If not, hit me up IG. It is 4 triggers/2 aliases and a bit of function writing, shouldn't be hard to replicate manually.
It seems (maybe?) somehow Nexus only partially import the package.
The 'Reflexes' Tab of the setting looks nowhere like yours.
Example,
My Accent Alias only have 3 lines of code (see attached picture). The same goes for the other aliases etc.
The onLoad only have 13 lines in mine.
I separated out Accents as a separate .nxs file: clicky. Right click, save as. Install. Type 'acc' to initiate it.
Removed original from my Nexus and reimported to new Chrome instance after downloading from Github. Works without problems.
Added in new conditions including exclamations, low health, low mana, high affliction count, environment type, flying status.
Wish Achaea would natively highlight quotations with that nice cyan.
Current list:
Will probably split out the rest as time permits.
Thanks @Tysandr