Softcode

+countries

I threw up a new release (1.0.1) of my +countries code for displaying a breakdown of what countries players are connecting from, and converting between country name and domain extension. The only change is some updates to country names... unless you have people connecting from Nepal or Venezuela, there's no need to upgrade an already-installed copy. If you're interested in seeing it in action, it's on M*U*S*H.

http://raevnos.pennmush.org/mushcode or http://download.pennmush.org/MUSHCode.

Documenting softcode (gasp)

When I need something softcoded, especially a function, chances are I'll code it myself. Even if it exists. Even if it exists on the same MUSH. There are several reasons for that, but one's a fairly big one: Softcode is hard to read. Doubly so if you didn't code it. What's worse, since softcode doesn't have a function definition like you would in C or Python or whatnot, you don't have even the self-documentation that comes from variable names, and in fact you may have to dig deep to even see how many arguments a function takes, let alone determine which ones are optional. I've been wanting to do something about that for a while (read: at least 3 years), but this time I actually did come up with a partial solution.

Mercutio's picture

SceneSys: Progress

Keeping a nice list of progress on SceneSys, and what still needs to be done.

Mercutio's picture

SceneSys: Ideas

Recently, Javelin graciously let me have a look at the Storyboard system which used to be on Rio: Manhã de Carnaval, to let me get an idea of a similar system. It does what I planned for the web-side of SceneSys, and then some more. So I wanna note down some ideas that have spawned from this little look at it.

Mercutio's picture

SceneSys: A roleplaying log system for MySQL

Over time, PennMUSH has been seeing more and more connectivity with MySQL and other such server software. Forums, bboards - even rumors of the Anomaly Jobs system stepping onto MySQL.
Ever since I started touching MySQL on my sandbox, ideas have begun to grow. SceneSys is one such idea. In this post, I will lay out this system for you. If you have any questions, leave me a comment! I'd love to answer any questions you may have.

Statistical Analysts

Was thinking of picking up some of my old code to create a mechanical simulation to which Mecha can be built using a statistical system (From parts that already exist in the game) and fought with. Like Steel Battalion in MUSH form.

If there's interest in this project, I'll continue it. I have a server that can be utilized for just this purpose. In the meanwhile..

I'll need a statistical analyst, someone who thinks they can create parts and a system that's balanced and fair. I can code it, but my skills in stats aren't.. perfect, not to the quality I'd like them to be.

Pulling hair out with Exit Locks

Hello, Not sure if this is the right place to ask this, but i'm going quite insane trying to get exit locks to work correctly. I'm trying to get an exit to look at an attrib then allow that person through the exit if the person has th correct ability.

Heres what I have,
I'm set visual

@abilities1 me=Swim
@set me/ABILITIES1=wizard visual
@current_mode me=1
@set me/CURRENT_MODE=wizard visual

On the exit I've got,

@lock/user:basic N=canenter/1
&canenter n=[gte(match(u(%#/abilities[u(%#/current_mode)]),Swim),1)]

Mushcode Indenter

*EDITED TO FIXED A COUPLE OF MINOR ERRORS*

Mushcode is notoriously illegible, causing premature sight-loss in 9 of 10 people who try to read it. The following ufun automagically indents softcode functions. It also uses list() to grab a list of known mushcode functions to provide a bit of syntax hilighting. Regexp parantheses are highlighted separately in red. To use it, call th u(tabfun,get(obj/attributewithcodeyouwanttotab))

A Simple Data Layer, Part 2

This post addresses one of the problems with the varfuns ufuns I posted yesterday.

Vssave
A 'safe' version of Vsave to use when you need to update only a subset of the keys held in an attribute. This is useful when, for example, your data structure holds more than 25 keys. We can currently only declare / read in 25 keys at a time. This ufun allows us to declare just the keys we need to change. Instead of overwriting the entire attribute, Vssave only up writes the keys that it knows about.

&vssave funlib=attrib_set(%0,ulocal(vssave.fn,get(%0),if(%1,%1,|),if(%2,%2,%b)))

A simple data layer

Problem: I enjoy storing data in attributes in the form key1:val1 key2:val2 key3:val3, e.g., name:Nammyung age:32 height:69 weight:180. I've also seen many other people use a similar data structure, because it makes it easy to grab a key with grab(v(data),key:*). But, once grabbed, you need to do processing to separate the key name from the value, and after you have read in the attribute, you need a good way of storing them temporarily while manipulating them. I usually end up with a long list of %q-registers that I have to keep track of.

Syndicate content