SteveV Posted May 14, 2010 Share Posted May 14, 2010 Hi All, is it possible to script the editor itself? To give you a specific example, I'd like to lay out road nodes programmatically, rather than lay them out one by one and adjust them manually. If the answer is yes you can, look at page x on the manual, then I'm happy with that. I'm trying to find my way around the many resources available. Thanks in advance. Quote All the best, Steve Vink Link to comment Share on other sites More sharing options...
Canardia Posted May 14, 2010 Share Posted May 14, 2010 Yes, it is to some extend. You can automate things which happen in the scene which you are editing in Editor. Niosop came up with the name thingoid ( http://leadwerks.com/werkspace/index.php?/topic/599-hybrid-fpscontroller-lua/page__view__findpost__p__5277 ) for lua scripts which run like nanobots in the scene. The term thingoid was then first liked by Rick, and soon the whole LE community adopted it as a standard. Basically you can automate anything with thingoids in your scene. They can display texts (via the Flip hook), move objects, react to some events, etc... You can also just simply run a seperate lua script in Editor, which does something programmatically, like changing the position of road nodes. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
SteveV Posted May 14, 2010 Author Share Posted May 14, 2010 Thanks for the response. I think I am asking for something a little different. I'd like to be able to run a script once to create a strip of road, and then end. It's not a continuously running script, just a one-off action. Quote All the best, Steve Vink Link to comment Share on other sites More sharing options...
Josh Posted May 15, 2010 Share Posted May 15, 2010 No, not really. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
AggrorJorn Posted May 16, 2010 Share Posted May 16, 2010 I think it is certainly possible to create that, but you do need some good programming experience. And you can not use the align road to terrain buttons anymore. You would have to write your own code that lays out the road for you. Quote Link to comment Share on other sites More sharing options...
SteveV Posted May 17, 2010 Author Share Posted May 17, 2010 You can also just simply run a seperate lua script in Editor, which does something programmatically, like changing the position of road nodes. This is good, I'm not sure of the best way to do this, but I'm guessing I need to create some kind of dummy object (or thingoid?) with scripts attached. As long as there is some kind of hook that triggers (and I guess that's how it all works, I haven't got that far just yet) then I can adjust it's state (via a custom property window?) to perform various actions. Now I'm wondering if I can create new road nodes with a script, or if this part has to be done manually? Do thingoids exist yet, or is it still a concept? Quote All the best, Steve Vink Link to comment Share on other sites More sharing options...
Rick Posted May 17, 2010 Share Posted May 17, 2010 Note that the road system is in lua scripts right now. That's how Josh made them. Quote Link to comment Share on other sites More sharing options...
Delinx32 Posted May 17, 2010 Share Posted May 17, 2010 I had a similar question today, but slightly different. Can you script editor commands? Like add a right-click item in the pop up menu that could open a form defined in a different assembly? A possible use of this would be to add a custom properties window for a different class library, like if you wanted to be able to set properties for your AI system via the LE. Basically...is there any plugin support? Quote Link to comment Share on other sites More sharing options...
SteveV Posted May 17, 2010 Author Share Posted May 17, 2010 Note that the road system is in lua scripts right now. That's how Josh made them That's good to know. I went looking for associated scripts but couldn't find them, I need to look a little harder Maybe if I elaborate on my ideas, it might prompt some more discussion and ideas, I think it will be useful to many people. This is something I've done in DarkBASIC Professional, and would be fantastic if I can achieve it an editor thingoid. I call this concept Rails. It's nothing new, I'm sure lots of engines use them. The main rail is your road, track, river, whatever you need. It's made as a C-spline so it's very flexible. Each node has 2 handles which you drag around to form the path. Now you can start adding secondary rails, that run parallel to the primary one. The first could be used to contain walls, another for street lighting, and so on. As you fine tune your primary rail, each secondary rail repositions to suit the first. Does this make any sense? I'm talking about making a road/track system that is intelligent enough to simplify the design process. If anyone has manually laid down a road they'll know how powerful such a system would be to any terrain editor. I can possibly post some screen shots of the DBP prototype. Quote All the best, Steve Vink Link to comment Share on other sites More sharing options...
ZioRed Posted May 18, 2010 Share Posted May 18, 2010 You are speaking about Simcity However I like your ideas (the possibility to enhance the editor with plugins would be great if the editor could expose a class with all its features). Quote ?? FRANCESCO CROCETTI ?? http://skaredcreations.com Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.