Page 1 of 1

Crucial module feature that would prevent a ToME 2.3 module

Posted: Sat Jan 08, 2011 3:28 am
by Marcotte
The T-Engine version 4 is remarkably versatile in its current form, but there is a feature that is currently missing that would prevent someone from recreating the ToME 2.3 game as a TE4 module. This greatly concern me as I also would require that very same feature in BOB. This feature cannot be replicated by module code, and would need to be implemented directly in the engine. However, it would be trivial to add support for that feature by changing only a single line of code from the engine.

Indeed, changing line 104 of Module.lua to:

Code: Select all

local mod = {math = math}
would be all that is required to restore the possibility of module-maker to use that extremely crucial feature.


PS: Can anyone guess which feature I am talking about?

Re: Crucial module feature that would prevent a ToME 2.3 mod

Posted: Sat Jan 08, 2011 7:59 am
by darkgod
Hummm .... I give up .... what do you need the math functions inside init.lua for ?? :)

Re: Crucial module feature that would prevent a ToME 2.3 mod

Posted: Sat Jan 08, 2011 12:59 pm
by Marcotte
darkgod wrote:Hummm .... I give up .... what do you need the math functions inside init.lua for ?? :)
Simple, in init.lua, you need to set a bunch of properties for the module, the name, the engine version, and the long_name... But what was the long_name of ToME 2.3? Was it "Tales of Middle-Earth" or was it "Troubles of Middle-Earth"?

In short, I want to have BOB gets a random long_name every time the engine boots up, and the only way to do that require a random function (or time) function, which is found in the math table (the rng table would work too, but that would have been too obvious).

Re: Crucial module feature that would prevent a ToME 2.3 mod

Posted: Sat Jan 08, 2011 2:07 pm
by darkgod
Ahahahah :)

That is such a silly, useful and pointless feature that i just have to add it ;)