enigma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Enigma-devel] Lua API


From: Andreas Lochmann
Subject: Re: [Enigma-devel] Lua API
Date: Fri, 09 Nov 2007 13:14:54 +0100
User-agent: IceDove 1.5.0.14pre (X11/20071018)

Hi,

[Checkerboard Floor]

Ronald Lamprecht schrieb:

Every floor takes an attribute "checkerboard". If set to interger value
0 the floor will only be placed on grids with x+y being even, if set
to 1 the floor will be placed only on grids with x+y being uneven.

ti["x"] = ti({"fl_rough_red", checkerboard=0}) +
         {"fl_rough_blue", checkerboard=1}

generates an arbitrary shaped checkboardfloor on areas with tile "x"
on the world map.
Is it possible to add further algorithms in future?
C.f. the algorithms used in libsoko.

I received a similar proposal in a private email. Yes - we will add a general floor attribute that takes a callback function name. Before a floor will be set this function will be called to acklowledge or reject the floor set operation. Details will be published as soon as I have checked all sideeffects.

If we call a user function prior setting one of the alternative floors it would just take the floor position (x,y coordinates) as argument and would have to result in an integer value that could be checked against the "checkerboard" attribute value.

Are there any algorithms that have need of more context info besides the floor position? Any further info would likely be difficult to pass, as the floors do not yet exist.

@Andreas - please check the libsoko algorithms concerning their demands.
Currently, there is no need besides the floor position and
a random function. However, the algorithm only returns
a number in a given range. This allows to choose from a
given set of stones, items, floors simultaneously, and I think
about adding a recursivity to the designs, like in:
 {"fl-abyss", {"st-rock2", "st-rock3", "al:lines"}, "al:random"}

Greets,
Andreas






reply via email to

[Prev in Thread] Current Thread [Next in Thread]