Aquaterion Posted April 10, 2016 Share Posted April 10, 2016 There are certain things that most people put in their code, that if you don't put it, it still works, so I'm not sure why you would. For example: doing Prefab("common/inventory/ITEM", fn, assets, prefabs) instead of Prefab("ITEM", fn, assets, prefabs) adding a list of prefabs your prefab uses at the top and calling it at the end in the same line above ^^^^. Adding .XML and .TEX files of a prefab in the prefab's file, I once forgot to put them and it still worked fine. So what I'm wondering is what not following these methods can cause, as the first 2 I don't do and everything seems to work fine. Link to comment https://forums.kleientertainment.com/forums/topic/66232-what-can-this-cause/ Share on other sites More sharing options...
Muche Posted April 10, 2016 Share Posted April 10, 2016 Prefab class is doing some cleaning on the name, which makes those two names equivalent: self.name = string.sub(name, string.find(name, "[^/]*$")) I think If you included those assets in the modmain they would have got loaded and won't cause an error. Link to comment https://forums.kleientertainment.com/forums/topic/66232-what-can-this-cause/#findComment-747899 Share on other sites More sharing options...
Aquaterion Posted April 10, 2016 Author Share Posted April 10, 2016 so what about this? local prefabs = { "ash", } return Prefab("name", fn, assets, PREFABS) I've done mine without doing a prefabs list and still works fine Link to comment https://forums.kleientertainment.com/forums/topic/66232-what-can-this-cause/#findComment-747924 Share on other sites More sharing options...
Mobbstar Posted April 10, 2016 Share Posted April 10, 2016 (edited) 1 hour ago, Aquaterion said: I've done mine without doing a prefabs list and still works fine The prefabs list is used for child entities (as far as I am aware). e.g. torchfire As such, it is not needed in most cases. Edited April 10, 2016 by Mobbstar Link to comment https://forums.kleientertainment.com/forums/topic/66232-what-can-this-cause/#findComment-747936 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now