Jump to content
The Dark Mod Forums

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 3

'What do I care for your suffering?'

Link to comment
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

Link to comment
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?'

Link to comment
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
Link to comment
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
Link to comment
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?'

Link to comment
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?

Link to comment
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?'

Link to comment
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
Link to comment
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?'

Link to comment
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
Link to comment
Share on other sites

  • 3 weeks later...

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?'

Link to comment
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.

  • Recent Status Updates

    • Ansome

      Finally got my PC back from the shop after my SSD got corrupted a week ago and damaged my motherboard. Scary stuff, but thank goodness it happened right after two months of FM development instead of wiping all my work before I could release it. New SSD, repaired Motherboard and BIOS, and we're ready to start working on my second FM with some added version control in the cloud just to be safe!
      · 0 replies
    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
×
×
  • Create New...