This is a quick rundown of how I'm going to do the basic core of XirrelaiRPG 2.0.0: World of Tey.
-- Firstly, every different gameplay-thing is its own object. This contains the minutiae and specifics of the thing, such as variables that control the stats, name, type, and so on.
-- These are arranged into groups with similar properties with parent objects that contain the most basic behavior common to each group(e.g. Items can be picked up, creatures die when they're killed...) and a super parent object called "entity" which simply contains everything that's going to have a direct effect on gameplay, i.e. terrain, creatures, items, and effects.
-- Everything's x- and y-coordinates will be divisible by 32 anyway, and the play area will be an 18*18 grid, so the set of x- and y- coordinates will be converted into a single value between 0 and 323. I am going to call this number the "position value".
-- Whenever an entity wants to perform an action that might affect other entities, such as moving, it first calls all possible entities that it might affect and test their position values against the position values being affected. If a hit is detected, the entity affected will send back its name(for use in status messages) its type number(so we can tell what to do with it), its instance number (so we can refer back to it when the effect takes place) and any other information that might determine what happens (such as the faction of a creature). The to-hit roll will take place elsewhere, so we don't need to include stats in this information right away.
-- Finally, all this combines so we can tell what happens when you bump into something or use any other command.