Jump to content
The Dark Mod Forums
Sign in to follow this  
Snehk

Writing plug-ins for Dark Radiant

Recommended Posts

Greetings! I'm interested in writing several plug-ins for Dark Radiant, namely:

 

WYSIWYG GUI editor with IDE like gui scripter (for those who'd rather write their gui files in code).

 

Material editor with dynamic preview.

 

Terrain editor with random generation algorithm (eg. perlin noise), sculpting for hand-crafted terrain, lwo export and ability to convert into brushes or patches.

 

Vertex painting tool for dynamic, in-editor texture blending.

 

And possibly more in the future. I'd like to ask if diving into editor's code and checking the in-engine editors and other open source solutions is a good way to begin.

  • Like 4

'What do I care for your suffering?'

Share this post


Link to post
Share on other sites

Re. vertex painting, you do know the TDM engine supports vertex colours only on models, not brushes or patches, right? (I'm assuming TDM/id Tech 4 is the target here, though I'm aware DR supports others.) Or were you inspired by the note here?

 

 

Changing the map format has been deemed too risky. could possibly be addressed via a Dark Radiant plugin that automates model export when vertex colors are applied. Currently scripts exist to approximate this functionality.

Edited by VanishedOne

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Share this post


Link to post
Share on other sites

I do know about this limitation. I thought about a plug-in that could allow for vertex painting on models from within Dark Radiant.


'What do I care for your suffering?'

Share this post


Link to post
Share on other sites

Greetings! I'm interested in writing several plug-ins for Dark Radiant, namely:

 

WYSIWYG GUI editor with IDE like gui scripter (for those who'd rather write their gui files in code).

 

Material editor with dynamic preview.

 

Terrain editor with random generation algorithm (eg. perlin noise), sculpting for hand-crafted terrain, lwo export and ability to convert into brushes or patches.

 

Vertex painting tool for dynamic, in-editor texture blending.

 

And possibly more in the future. I'd like to ask if diving into editor's code and checking the in-engine editors and other open source solutions is a good way to begin.

 

You have a very ambitious list there! Good luck! TDM would benefit immensely with improved tools.

 

Btw idtech 4 already has a gui editor (and a material editor for that matter) made by Raven Software, you could look at the source. Is a little buggy and only supports basic gui functionality, you can't animate inside it for example, only put images in and transform them. TDM engine seems to miss it tho, so if you want to study those you need Doom 3 version of the engine.

  • Like 1

Share this post


Link to post
Share on other sites

 

You have a very ambitious list there! Good luck! TDM would benefit immensely with improved tools.

 

Btw idtech 4 already has a gui editor (and a material editor for that matter) made by Raven Software, you could look at the source. Is a little buggy and only supports basic gui functionality, you can't animate inside it for example, only put images in and transform them. TDM engine seems to miss it tho, so if you want to study those you need Doom 3 version of the engine.

The doom 3 versions wouldn't be compatible with Dark Radiant. Might get some ideas from them but aside from that, it's going to be a start from scratch affair.

  • Like 1

Share this post


Link to post
Share on other sites

I thought about checking Raven Software's gui editor's code just to check a few things. I don't like its layout and general clunkiness though, starting it from scratch seems to be a better option for me rather than improving the old mess. I also want to make it fully customizable, give it a full gui script support and IDE like writing functionality with dynamic preview - it'd take an enormous amount of work, but would be just as huge an improvement.

Edited by Snehk

'What do I care for your suffering?'

Share this post


Link to post
Share on other sites

The doom 3 versions wouldn't be compatible with Dark Radiant. Might get some ideas from them but aside from that, it's going to be a start from scratch affair.

 

No doubt about it, but like I said there's no harm to look at the source and see how they connected the pieces, that way you don't need to start from total darkness.

 

I thought about checking Raven Software's gui editor's code just to check a few things. I don't like its layout and general clunkiness though, starting it from scratch seems to be a better option for me rather than improving the old mess. I also want to make it fully customizable, give it a full gui script support and IDE like writing functionality with dynamic preview - it'd take an enormous amount of work, but would be just as huge an improvement.

 

Writing a GUI editor (or others) will indeed be laborious. Have you written a editor before?

Share this post


Link to post
Share on other sites

Yes, though not as complex as what I'm planning to do here. Most of my editors were specialised software meant for single purposes.


'What do I care for your suffering?'

Share this post


Link to post
Share on other sites

DarkRadiant doesn't really have a plugin API. There is Python scripting, but I doubt you will be able to write complex new functionality like vertex painting using Python (although I could be wrong; perhaps I underestimate the flexibility of the Python support).

 

So yes, you will almost certainly need to dive into the code and implement these features in C++, then send a Git pull request if and when you have something usable.

  • Like 1

Share this post


Link to post
Share on other sites

Thanks! I prefer C++ over Python, so I'll rather code new things directly into DR (taking your coding standard regulations into account). When I'll get something working and usable, I'll report on the forums and then send a pull request.

  • Like 1

'What do I care for your suffering?'

Share this post


Link to post
Share on other sites

I should add that while we don't have any kind of binary plugin API, in the sense of writing 3rd party plugins which are distributed separately, we do have a modular design which allows optional components to be separated into separate DLLs, much like Linux kernel modules. This allows particular features to be selected at compile-time, and even split into separate optional packages; this is already used for the Dark Mod specific plugins like Objectives and Stim/Response editors.

 

I would strongly recommend that you implement any of these new features as separate optional modules, much like the Dark Mod plugins, so that people who don't need them can choose either to not compile them or to not install the separate optional package.

  • Like 1

Share this post


Link to post
Share on other sites

Awesome! I'm going to make them as separate modules then.

Edited by Snehk

'What do I care for your suffering?'

Share this post


Link to post
Share on other sites

I thought more about sculpting terrain, like in TES Construction Kit, Terragen classic or sculpting software.

 

As usual whenever I'm about to start a project I get ill, get invited to a dev team, get contracted to code something from ground up and several musicians and my band need a bassist ASAP.


'What do I care for your suffering?'

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...