View RSS Feed

The Mad Wizard

Can't keep a good man down.

Rating: 2 votes, 3.50 average.
Early this morning I had an interesting conversation with some fellow OpenRPG users, Cypher and Shadow. Shadow really likes Traipse but Cypher doesn't like it too much because of the lack of Namespace. I explained to him why I felt Namespace was broken and why I did not want to support it.

My reasons are pretty simple. Namespace takes the entirety of the gametree and searches for a node name that could have multiple duplicates. It's just a terrible method that offers the users little. But Cypher really likes it's simplicity and then told me how he envisioned Namespace.

He wanted Namespace to work like a Class does in Python. The top node is the class, and the node being searched for is the object to return. O_O

I thought, with that method Namespace would be a far superior method that what I am using right now. In fact, I think Cypher hit the bullseye when I only hit the board. Yeah, I managed to get the nodes to return the data how users wanted ... but they lost a lot in my method, and yet in Standard the use of Namespace is a horrendous monster I wont talk about.

So after the 1.5 hours we talked I relieved myself to work. I had told Cypher that this next patch would be done in the vicinity of mid-May .... Well holy cow! Patch-2 is now Alpha with the Namespace method. Adding Namespace was so easy for me because I already had some premium recursion methods to really make Namespace fully feature.

There are now two methods to use Namespace. I do apologize for the change, but it is a necessary demon. Here they are:

Namespace (Internal) Syntax: !=Node=!
That is seriously the syntax. To use this method you must have it in a node, thus the Internal sub. This method then grabs the tree_map attribute from the node it is being called from to find the top most node name. A simple gametree recursion pulls up the nodes data in Element Tree format, with which I can run a getiteration('nodehandler') to find all of the nodehandlers in that node and do a quick iteration for the node named.

Namespace (External) Syntax: !&Top Node::Node&!
And nothing more. This works exactly the same way as the Internal model, with the exception of 'Top Node' being a top node you want to look for. This allows you to type it in chat, or cross reference nodes if you want too.

Some changes to how the Parsing work, along with a function I used in my model, even allow the referenced nodes to reference other nodes. It's fricking awesome.

The Alpha is up right now .. after 8 hours of talking to Cypher. The last 4 hours where minor testing and moving the code to Alpha.

I'm stoked. I like the new Namespace a lot. I have but one gripe with that I already have a planned fix for. Because Namespace is only as narrow as you tell it to be, there is a chance a user will add two characters to a container node and break Namespace. But with an implicit call to Namespace, ie:
the amount a person has to type is still really small, and it will still work unless you move the node is moved out of the Container.

Submit "Can't keep a good man down." to Digg Submit "Can't keep a good man down." to Submit "Can't keep a good man down." to StumbleUpon Submit "Can't keep a good man down." to Google


  1. adamx20's Avatar
    Just a comment on my progress. The third syntax is wiped .. removed .. abolished like slavery.

    Instead, Namespace External will be nicknamed Explicit. It works exactly the same way, but it's only as narrow as you make it.

    Namespace Internal *must* exist to differentiate and to give Namespace calls from within a sheet a point of reference to start looking.
  2. adamx20's Avatar
    Final update on this before I look at other bugs. Namespace Internal is now completely context sensitive. Now, no matter where you use a Namespace Internal reference, It will always look in the correct place.

    I do this by first grabbing the map of the node that sends the data. This map is a great tool and I am glad I made it. Once I have the map I create a list of nodes for that map. Then I iterate through the list to look for anymore Namespace Internal references.

    This ensures that I will always have a correct path. I have even tested this with a character inside a character, and the data returned correctly.

    Consider these two maps:
    Container::PCs::Character Sheet 1
    Container::PCs::Character Sheet 2

    After I have check PCs, like I would with the normal iteration, the software then looks at Character Sheet 1 or Character Sheet 2 ... depending on the map of the original node.

    Admittedly it has a little more overhead than I wanted, but it could be refined in later versions. For now, !=Internal=! is good.