Libload modules?

Let’s say someone makes a level for my game and wants to include custom logic. Experimentation shows that loci bricks work, as do scripts, but not modules.
This seems a pretty big problem in this context, and one that could be quite easy for the bge devs to solve.

For now I just use the python path method for the folder in which the game is stored. But that can’t be removed as far as I know.

It would be easiest to write a wrapper function called from the module controller. That would then import the module, and run it.

He can store the module in text blocks. He just needs to ensure not to choose a name of an existing external module.

yes is annoyng, workaroundable, but annoyng

from a script?:spin:

then not run all slow?(as script?)

What monster means is to have a script within the level file that appends the module path to the games python search path. It is with a script that uses the os functions, I can’t think of the exact code at the moment.

Once ‘imported’ the modules can then be run normally, using the module logic brick.

I like that monster, I hadn’t thought of that solution.