just thinking out loud but should each tile then have a table with functions about what they do?

code 1

**Code:**

map {} // map table

code 2

**Code:**

map {tile} // the tile is an element in the map

code 3

**Code:**

function1(x,y) // declare the function

return z

map {

tile {

x=2,

y=20,

function_table{function1(var_x,var_y), function2(var), ...}

}

}

Since the functions are elements of the table, they can store different variables. You can then declare the functions somewhere else to see what they do with the variables.

Then talents should read/write intelligently these functions+variables.

If you (or an actor) enters a tile, then the game iterates over all functions stored in the table of that tile, parses the arguments to the function, and the function returns the effect? The function that does this iteration will have to do it somewhat intelligently (merge certain effects, do them in the right order, etc.).

So you are not asking if the table has function1, you just go over all elements of the table and the tile then tells you that it has function1 with variables var_x and var_y (if you can execute that function directly, then you don't need to run 'if then'?).

I have no idea, since I can't really code

still kinda fun to think about.