As you read this (or lose interest and stop halfway through), remember that this is a 'what if.." type thing, not a 'If you don't do this then I'll be a crabby stubborn creep that can't seem to take no for an answer' type thing. What if you could make an element file? Maybe with a .tpt extension? The basic structure that I had in mind was :
Element <name of new element>
weight <weight>
diffusion <diffusion>
etc.
update {
<lua (or maybe C) code to define the update function>
}
menu <number representing menu>
End
you could then load this element by typing into the console elementload("file.tpt")
Also, you could stick a bunch of 'official' custom elements directly into the C code and then compile it, so that new elements could be seamlessly integrated into the game.
If this were to be implemented, it would allow all of the n00bs that can't code but think they can to make their own elements. It would also allow the Devs to concentrate on engine enhancement and optimization. There could also be an element repository, where you could load elements that you don't have. Or, better yet, you could make it such that you can only load custom elements from the beta, and then all of the beta saves would be 'tagged' with the custom elements that are needed. I can understand how this would be a lot more coding than any of the devs would like to do, but it would benefit all of the people who think they can code but they (obviously) can't. (Like me.)
I found it kind of weird that the person(s) described by the word "you" changed throughout the post.
@Colton-Bates(View Post) If you're suggesting it, I assume you want it implemented ( Even though you didn't made a thread to ask for it to be implemented ), so I gave my feedback on it...
This already is sort of possible in the beta. Just set the properties of an element like wind like this: tpt.el.wind.enabled = 1
You can set all of the other properties too, including name and description, and then create an update function using Lua. The only thing you can't do is a graphics function, but you can still set the color. I created VIRS and CURE like this by replacing EQVE and BRAN, but the virus was extremely laggy. Something less complicated would be a little less laggy though.
Also, in my mod, there will be a way to include this code with saves. I will release the new version tomorrow.
@jacob1(View Post) Some tips for optimising performance with the Lua element_func, Don't use tpt.parts, there's still some performance issues, use set_property(string property, object value, number x, number y) and get_property; Although it's still not as fast as the native code, it's good enough.