mgr_inz_rafal Posted August 27, 2016 I'm trying to create GZDB plugin. Based on the stair sector builder example I created some basic plugin containing the new builder mode, but I can't see this new mode appearing neither in "GZDB" nor "DB2". I am sure that editor is loading the plugin since: 1. I cannot delete the .dll once GZDB is running 2. If I make a simple typo in the code, GZDB will throw an terrible exception upon startup I can't figure out what to do more by just staring at the sourcecode. I did my best to simply copy the "plugin framework" from working example, modify the "Actions.cfg" and so on. For sure I must be missing some obvious piece of code... How would you proceed to find out what is wrong? 0 Quote Share this post Link to post
boris Posted August 27, 2016 Did you change the EditMode attribute of your new mode to be different from the code you used as a base? Did you check if your mode shows up in Game Configurations -> Modes? Uploading the code might help, too. 0 Quote Share this post Link to post
mgr_inz_rafal Posted August 27, 2016 Yes, I modified the EditMode property. The mode is visible in the "Game Configrations" view: And here is the sourcecode (obj included): http://www.chabowski.eu/misc/DooM/ArchMaker.zip PS. Sorry, this particular code is based on "CopyPasteSectorProperties". I approached the issue several times and must have mistaken the source base in the first post. 0 Quote Share this post Link to post
boris Posted August 27, 2016 Can't open the project because my VS version is too old. Did you set the build action of ArchIcon.png to "Embedded Resource"? You can enter your mode by assigning a hotkey. 0 Quote Share this post Link to post
mgr_inz_rafal Posted August 28, 2016 Image is attached as embedded resource. And yes, I succesfully entered my new mode by assigning a HotKey, even though it is not present on the list. Thank you for that hint. Guess I will focus on the plugin development itselft and care about the missing icon later. 0 Quote Share this post Link to post
boris Posted August 28, 2016 mgr_inz_rafal said:Image is attached as embedded resource. http://www.chabowski.eu/misc/DooM/embedded_resource.png I think the image should not be referenced in Resources.resx, but the actual file has to have the "Embedded Resource" set. Just like the Actions.cfg. I created a new project and added your files, but not creating a Resources.resx, and the mode shows up in the GUI as expected. AFAIK you only need to add the images to the Resources.resx if you want to display them as additional buttons in the toolbar. 0 Quote Share this post Link to post
mgr_inz_rafal Posted August 28, 2016 OK, understood. Icon shows up properly now. Thanks! 0 Quote Share this post Link to post
mgr_inz_rafal Posted September 3, 2016 OK, the ArchMaker plugin works. It is far from finished though. Code is ugly, not optimized and throws exceptions. I would rather extend the functionality of StairSectorBuilder instead of further developing my own creation ;) boris, thanks for your support! Here are three screenshots of arches created by plugin: 0 Quote Share this post Link to post
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.