Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by nickgravelyn

I'm working on a plugin, but my plugin requires an entity. I'd like to keep the entity in the "plugins/ng" folder where I place my plugins. Anyone know how to tweak Weltmeister to also search through plugins to find entity classes in addition to the game entities?

Figured I'd ask before I deep dive through the code to try and hack the feature in myself. :)

1 decade ago by dominic

It's not documented, but in 1.17 you can specify an array of paths Weltmeister searches through in your lib/weltmeister/config.js:

'entityFiles': [
	'lib/game/entities/*.js',
	'lib/plugins/ng/*.js',
],

1 decade ago by nickgravelyn

Very nice! That's what I was going to implement myself but I'm glad to see it's already supported.

1 decade ago by wachunga

It's very convenient to organize entities into subfolders, but they don't show up in Weltmeister by default, which is pretty counter-intuitive. Shouldn't the default be something like /lib/game/entities/**/*.js?

1 decade ago by galeforcejay

@dominic I tried this, and it didn't work for me. Weltmeister wouldn't load after I edited the 'entityFiles' path to use an array. I too would like to organize my entities into subdirs.
Page 1 of 1
« first « previous next › last »