Index: /trunk/nv/core/types.hh
===================================================================
--- /trunk/nv/core/types.hh	(revision 518)
+++ /trunk/nv/core/types.hh	(revision 519)
@@ -150,5 +150,5 @@
 			type_entry* i_type = new type_entry;
 			i_type->type_db = this;
-			i_type->hash = thash64( shash64( name ).value() );
+			i_type->hash = thash64::create< TYPE >();
 			i_type->name = m_names.insert( name );
 			i_type->size = sizeof( TYPE );
@@ -168,5 +168,17 @@
 		}
 
+		const type_entry* get_type( shash64 name ) const
+		{
+			auto it = m_index_by_name.find( name );
+			return it != m_index_by_name.end() ? it->second : nullptr;
+		}
+
 		type_entry* get_type( thash64 hash )
+		{
+			auto it = m_index_by_type.find( hash );
+			return it != m_index_by_type.end() ? it->second : nullptr;
+		}
+
+		const type_entry* get_type( thash64 hash ) const
 		{
 			auto it = m_index_by_type.find( hash );
Index: /trunk/nv/engine/particle_engine.hh
===================================================================
--- /trunk/nv/engine/particle_engine.hh	(revision 518)
+++ /trunk/nv/engine/particle_engine.hh	(revision 519)
@@ -203,4 +203,6 @@
 		static string_view get_debug_name( particle_emitter_func f );
 		static string_view get_debug_name( particle_affector_func f );
+		static const vector< particle_emitter_func >* get_debug_emitter_list() { return m_debug_emitter_list; }
+		static const vector< particle_affector_func >* get_debug_affector_list() { return m_debug_affector_list; }
 		static const type_entry* get_debug_type( particle_affector_init_func f );
 		static void register_types( type_database* db );
@@ -225,4 +227,6 @@
 		static hash_store< shash64, particle_affector_funcs >        m_affectors;
 
+		static vector< particle_emitter_func >*  m_debug_emitter_list;
+		static vector< particle_affector_func >* m_debug_affector_list;
 		static hash_map< particle_emitter_func,  const_string >* m_debug_emitter_names;
 		static hash_map< particle_affector_func, const_string >* m_debug_affector_names;
Index: /trunk/src/engine/default_resource_manager.cc
===================================================================
--- /trunk/src/engine/default_resource_manager.cc	(revision 518)
+++ /trunk/src/engine/default_resource_manager.cc	(revision 519)
@@ -27,6 +27,4 @@
 {
 	m_lua = lua;
-
-	particle_engine::register_types( const_cast< type_database* >( lua->get_type_data()->get_type_database() ) );
 
 	int below_already_registered;
Index: /trunk/src/engine/particle_engine.cc
===================================================================
--- /trunk/src/engine/particle_engine.cc	(revision 518)
+++ /trunk/src/engine/particle_engine.cc	(revision 519)
@@ -15,4 +15,8 @@
 nv::hash_store< nv::shash64, nv::particle_emitter_func >   nv::particle_engine::m_emitters;
 nv::hash_store< nv::shash64, nv::particle_affector_funcs > nv::particle_engine::m_affectors;
+
+nv::vector< nv::particle_emitter_func >*  nv::particle_engine::m_debug_emitter_list;
+nv::vector< nv::particle_affector_func >* nv::particle_engine::m_debug_affector_list;
+
 
 nv::hash_map< nv::particle_emitter_func,  nv::const_string >* nv::particle_engine::m_debug_emitter_names  = nullptr;
@@ -158,4 +162,6 @@
 };
 
+NV_RTTI_DECLARE( nvpe_linear_force_data )
+
 static bool nv_particle_affector_linear_force_init( lua::table_guard* table, particle_affector_data* data )
 {
@@ -189,4 +195,6 @@
 	float    distance;
 };
+
+NV_RTTI_DECLARE( nvpe_deflector_plane_data )
 
 static bool nv_particle_affector_deflector_plane_init( lua::table_guard* table, particle_affector_data* data )
@@ -226,4 +234,6 @@
 };
 
+NV_RTTI_DECLARE( nvpe_color_fader_data )
+
 static bool nv_particle_affector_color_fader_init( lua::table_guard* table, particle_affector_data* data )
 {
@@ -247,4 +257,6 @@
 	nv::vec2 adjustment;
 };
+
+NV_RTTI_DECLARE( nvpe_scaler_data )
 
 static bool nv_particle_affector_scaler_init( lua::table_guard* table, particle_affector_data* data )
@@ -274,4 +286,6 @@
 		m_debug_affector_names = new nv::hash_map< nv::particle_affector_func, nv::const_string >;
 		m_debug_affector_types = new nv::hash_map< nv::particle_affector_func, nv::type_entry* >;
+		m_debug_emitter_list   = new nv::vector< nv::particle_emitter_func >;
+		m_debug_affector_list  = new nv::vector< nv::particle_affector_func >;
 	}
 
@@ -695,4 +709,7 @@
 	if ( m_debug_emitter_names )
 		( *m_debug_emitter_names )[func] = name;
+	if ( m_debug_emitter_list )
+		( *m_debug_emitter_list ).push_back( func );
+
 	m_emitters[ name ] = func;
 }
@@ -716,4 +733,6 @@
 	if ( m_debug_affector_names )
 		( *m_debug_affector_names )[process] = name;
+	if ( m_debug_affector_list )
+		( *m_debug_affector_list ).push_back( process );
 
 	m_affectors[ name ].init    = init;
@@ -777,5 +796,5 @@
 void nv::particle_engine::register_types( type_database* db )
 {
-	db->create_type<nv::particle_orientation>()
+	db->create_type<particle_orientation>()
 		.value( "PS_POINT",                sint32( particle_orientation::POINT ),                "Point" )
 		.value( "PS_ORIENTED",             sint32( particle_orientation::ORIENTED ),             "Oriented" )
@@ -785,5 +804,5 @@
 		;
 
-	db->create_type<nv::particle_origin>()
+	db->create_type<particle_origin>()
 		.value( "PS_CENTER",        sint32( particle_origin::CENTER ),        "Center" )
 		.value( "PS_TOP_LEFT",      sint32( particle_origin::TOP_LEFT ),      "Top left" )
@@ -800,4 +819,8 @@
 	{
 		int you_could_get_rid_of_the_init_function_using_these; int error;
+		int universal_vm_based_affector;
+		// compile_affector( ... ) in lua, returns array of bytecode
+		// function is a normal bytecode runner!
+
 
 		(*m_debug_affector_types)[ nv_particle_affector_linear_force ]
