Jump to content

Big Structures Editor 2.0 update: Easy adding and import of new buildings, units and stuff!


Recommended Posts

Hi, so finally it's here, the promised big update of Structures Editor, which will hopefully change the history of Dune 2000 modding and make both experienced as well as newbie modder's life much easier!

Download here: D2kEditorv2.0pre5.7z

Important new features:
- You can now genuinely add new buildings, units, weapons, explosions and arts without replacing existing! This has never been possible (with TibEd) until now.
- You can easily change order of buildings and units - this will break up building/unit references in events, as well as AI properties, which you need to fix manually. You can reorder all other things with PgDn/PgUp too.
- D2kEditor can manipulate with images in DATA.R16 (add empty images, remove images, reorder images), for example it automatically adds/removes/reorders building and unit icons when you add/remove/reorder buildings and units.
- You can export buildings, units, weapons, explosions, armour types and warheads into files and import them back. This way you can easily share modded resources (buildings, units etc.) without need to send whole .BIN files.
- You can export and import arts. Art is series of R16 images (for example 32 unit frames). This way you can easily share modded sprites instead of importing them one by one with resource editor. However, you still need resource editor for modifying actual images.
- You can export and import sound effects stored in SOUND.RS file from/to WAV files.
- Cascade import of buildings and units: When you prepare exported files of a building or unit and all referenced objects (weapons, warheads, ...), arts and sounds into single folder in correct format and naming, editor will automatically perform import of everything needed in a single operation = import of a new building or unit with a single click!
- Function of several unknown bytes was revealed. These are: Screen shake, Sell priority (for building) and Voice priority, Projectile shoot offset (for unit).

obrazek.thumb.png.1abec8ff7e5cd7c4f28cb116795e51f8.png

obrazek.thumb.png.7c5b5b87735a8a28b00873edca9cdb77.png

Demonstration examples for easy and fast new resources (buildings, units) import:

Flame Tank.7zAutogun Turret.7zAutogun Tank.7z

The new version of Structures Editor dramatically simplifies the way of adding new modded resources (new buildings, units etc.) into your own mods. This will make modding easily accessible to many people who are not much experienced with editing stuff and using resource editor.

Instead of distributing whole .BIN files or sprites one by one, you share a zip packages with export of all needed objects, arts and sounds, like I posted above. The import will be done in this way:
- Extract all files into some local folder
- Open Structures editor, go to respective tab, and in case you want to add a new building/unit without replacing existing, click "Add new" button. New blank building/unit will be added. Keep the blank building/unit selected and click "Import" button. In case you want to replace any existing building/unit, select that one and click "Import" button.
- Select a file for import. For building it's .d2kbld file and for unit it's .d2kunt file.
- During import process, you will receive many information messages about what is happening (importing of dependencies). In case any dependency is missing, editor will warn you and you will need to take special care. For example adding new text entries into TEXT.UIB is not supported.
- Once done, new building/unit is ready to use!
- Try it out with the provided three resources on unmodified vanilla game files.

Some notes:
- The process of importing dependencies will always add a new item (weapon, warhead, ...) in case item with that name does not exist yet in your Templates.bin. In case item with same name already exists, it will replace that item with imported file.
- When designing new buildings/items, always try to make new (unique) weapons, explosions, warheads etc. so that importing will not overwrite any original data.
- Importing referenced arts will always add a new art. In case exactly same art already exists, it will skip importing. If you intentionally want to replace existing art, you need to import that art manually.
- Import of armour type will import a "column" in the damage percentage table and import of warhead will import a "row" in the table. Armour/Warhead export files store referenced warhead/armour names, so in case you have different armours/warheads or have them in different order, the import should be safe. You should always make armours/warheads with unique names.

Looking forward to your comments and questions!

Edited by Klofkac
  • Like 2
  • Upvote 1
Link to post
Share on other sites

I don't know if you are aware, if you click on any unit or building and keep pressing "tab", the buttons at the bottom will highlight in a weird order, jumping around.

Also, I suffer once again for hacing a scale on my computer as part of the structure editor goes outside the screen, but at this point I just gave up.

Link to post
Share on other sites
  • 1 month later...

Only Problem is if you make a new Unit Type, you never load it's name with it.
Please find one so it will load and I will also try renaming all blanks to see if anything changes using Unit Name Table Editor.

Edited by tsirCitnA
Link to post
Share on other sites
5 hours ago, tsirCitnA said:

Only Glitch is if you make a new Unit Type, you never load it's name with it.
Please find one so it will load and I will also try renaming all blanks to see if anything changes using Unit Name Table Editor.

Not a glitch! There are only so many entries in a uib to use, so it's up to you to assign one to a mission and change it manually. Copy a text.uib, change its name, and assign the mission to use it in settings (hotkey F10).

Unit entries start around ~862 IIRC, so use any of those rows as an example. Don't add any rows, don't overwrite anything until you're confident editing the uib, and don't go above row 1360. Good luck! :)

Link to post
Share on other sites
On 3/27/2021 at 11:12 AM, Fey said:

Not a glitch! There are only so many entries in a uib to use, so it's up to you to assign one to a mission and change it manually. Copy a text.uib, change its name, and assign the mission to use it in settings (hotkey F10).

Unit entries start around ~862 IIRC, so use any of those rows as an example. Don't add any rows, don't overwrite anything until you're confident editing the uib, and don't go above row 1360. Good luck! :)

Just to note, adding entries to text.uib is totally fine. I added a lot of them at the end, after the rise of the mercenaries entries from the gruntmods text.uib, and they all show up properly and work fine. The naval unit names are there and they show up properly.

Link to post
Share on other sites
2 hours ago, Feda said:

Just to note, adding entries to text.uib is totally fine. I added a lot of them at the end, after the rise of the mercenaries entries from the gruntmods text.uib, and they all show up properly and work fine. The naval unit names are there and they show up properly.

Oh okay, I remember we tried to add text at some point and it screwed SOMETHING up. Maybe I'm thinking of something else lol

Link to post
Share on other sites

Here's some new update from me. I'm slowly progressing, so far I made these changes:

- Added warnings when you are saving over an original unmodified game file, which can help you prevent accidentally modifying your original game files and resources. Applies for MAP files, TILEATR files, and all files which can be edited by Structures.editor (BIN files, DATA.R16, SOUND.RS)
- When you configure a Campaign and Mods folder on a mission you're editing and then do any change in Structures editor or Tileatr editor and Save, the respective BIN, R16 etc. files will be automatically copied and saved into the Mods folder, even if they did not exist there. If the configured Campaign and Mods folder does not exist, it will be automatically created too.
- Added support for editing (exporting and importing) individual images (sprites) from/to DATA.R16, as well as editing image properties like frame size and offset. You can show an image in raw mode (with purple background and black shadow) as well as colored in any of 8 side colors. You can show image's palette. You can import a .BMP image in 8bpp format (256-color paletted) and this way you can inject your own palette, you no longer need to reuse existing image's palette. You can import building/icon image too. This will be an alternative for existing resource editor.
- Added support for editing string entries in SAMPLES.UIB file. When you import an unit which uses new custom sounds, it will automatically add new entries into SAMPLES.UIB and import .WAV files into SOUND.RS.
- Support for editing TEXT.UIBs was not added, this would make the program more complex, still thinking whether to add it or not.

LAST remaining feature before final version 2.0 can come out: Mission launcher would temporarily overwrite game's files with files from Mods folder (like how Feda's mission launcher works).

On 2/24/2021 at 1:15 PM, Cm_blast said:

I don't know if you are aware, if you click on any unit or building and keep pressing "tab", the buttons at the bottom will highlight in a weird order, jumping around.

I actually did not focus on the TAB order of the controls and buttos, the order is basically like in which order I added the controls on the window when I designed it. TAB order was not my priority, as I never had a reason to use that when using structures editor and did not think someone would. I'll think and check whether it would be easy to fix.

On 2/24/2021 at 1:15 PM, Cm_blast said:

Also, I suffer once again for hacing a scale on my computer as part of the structure editor goes outside the screen, but at this point I just gave up.

I'm sorry but I'm not likely to be able to help you with that. I spent some effort to cram all the controls on quite small place so that the Structures Editor would fit on a legacy 1024*768 screen resolution. Adding the ability to resize the screen would add quite big additional complexity to the form design, so I decided to go with fixed form size. You just have screen setting that's not supported and adding support for that would not be feasible for me.

Link to post
Share on other sites
13 minutes ago, Klofkac said:

Here's some new update from me. I'm slowly progressing, so far I made these changes:

- Added warnings when you are saving over an original unmodified game file, which can help you prevent accidentally modifying your original game files and resources. Applies for MAP files, TILEATR files, and all files which can be edited by Structures.editor (BIN files, DATA.R16, SOUND.RS)
- When you configure a Campaign and Mods folder on a mission you're editing and then do any change in Structures editor or Tileatr editor and Save, the respective BIN, R16 etc. files will be automatically copied and saved into the Mods folder, even if they did not exist there. If the configured Campaign and Mods folder does not exist, it will be automatically created too.
- Added support for editing (exporting and importing) individual images (sprites) from/to DATA.R16, as well as editing image properties like frame size and offset. You can show an image in raw mode (with purple background and black shadow) as well as colored in any of 8 side colors. You can show image's palette. You can import a .BMP image in 8bpp format (256-color paletted) and this way you can inject your own palette, you no longer need to reuse existing image's palette. You can import building/icon image too. This will be an alternative for existing resource editor.
- Added support for editing string entries in SAMPLES.UIB file. When you import an unit which uses new custom sounds, it will automatically add new entries into SAMPLES.UIB and import .WAV files into SOUND.RS.
- Support for editing TEXT.UIBs was not added, this would make the program more complex, still thinking whether to add it or not.

LAST remaining feature before final version 2.0 can come out: Mission launcher would temporarily overwrite game's files with files from Mods folder (like how Feda's mission launcher works).

I actually did not focus on the TAB order of the controls and buttos, the order is basically like in which order I added the controls on the window when I designed it. TAB order was not my priority, as I never had a reason to use that when using structures editor and did not think someone would. I'll think and check whether it would be easy to fix.

I'm sorry but I'm not likely to be able to help you with that. I spent some effort to cram all the controls on quite small place so that the Structures Editor would fit on a legacy 1024*768 screen resolution. Adding the ability to resize the screen would add quite big additional complexity to the form design, so I decided to go with fixed form size. You just have screen setting that's not supported and adding support for that would not be feasible for me.

Thanks for the update, there are a lot of nice quality-of-life improvements in there! And wow, finally the mysterious palettes can be changed/edited.

Are you going to also add the Import/Export button for unit voice lines too, as we discussed on Discord? 

Link to post
Share on other sites
Posted (edited)
1 hour ago, Feda said:

Are you going to also add the Import/Export button for unit voice lines too, as we discussed on Discord?

Not fully sure if that's what you mean, I did not add an export/import option for the unit's Voices section itself. What I talked about is adding support for cascade unit import, when you import a new unit which uses new voices you do not have in samples.uib and sound.rs, they will be automatically added during import.
I think I could add at least copy/paste button on the Voices section so that you can easily copy over the values on the 18 combo boxes, but is that even a common scenario you would do often enough, so it is worth adding? Or you would rather copy-paste a whole unit?

Edited by Klofkac
Link to post
Share on other sites
17 minutes ago, Klofkac said:

Not fully sure if that's what you mean, I did not add an export/import option for the unit's Voices section itself. What I talked about is adding support for cascade unit import, when you import a new unit which uses new voices you do not have in samples.uib and sound.rs, they will be automatically added during import.
I think I could add at least copy/paste button on the Voices section so that you can easily copy over the values on the 18 combo boxes, but is that even a common scenario you would do often enough, so it is worth adding? Or you would rather copy-paste a whole unit?

The idea is that, for example, if I were to add Fey's voice overhaul now, I'd have to add every sound manually in SOUNDS.RS and samples.uib (because I dont want to import his entire unit, since he has different unit stats that I dont want, I only want the voice lines). There's also the fact that each unit has 18 sounds, so changing each one manually takes some time (if you do it for ALL units it will take a lot of time). Which is why I think a voice line separated import/export can help a lot, if it's not too much implementation complexity for it.

Link to post
Share on other sites

Mmmm okay, I think now I finally get the idea. That will probably not be too big deal, I will introduce a new export file format (.d2kvcs) which will be a Voices section subset of unit export, and will support cascade import in pretty same way.

  • Upvote 1
Link to post
Share on other sites
4 hours ago, Klofkac said:

You can show image's palette. You can import a .BMP image in 8bpp format (256-color paletted) and this way you can inject your own palette, you no longer need to reuse existing image's palette. You can import building/icon image too. This will be an alternative for existing resource editor.

If I understood well.

I can pick the craters slots, which are either orange (rock) and yellow (sand), and making actual craters that match the night tileset

image.png.3340ab2a7c41833ae3d95f79f5bc5c58.png So, having craters for this color, rock

image.png.a2f709b7a054b7462ce4f214e47c3b72.png and this one for sand.

Link to post
Share on other sites
Posted (edited)

Here's also some screenshot.

obrazek.thumb.png.195e952adb93cbc5499290a4a0a48812.png

 

13 hours ago, Feda said:

The idea is that, for example, if I were to add Fey's voice overhaul now, I'd have to add every sound manually in SOUNDS.RS and samples.uib (because I dont want to import his entire unit, since he has different unit stats that I dont want, I only want the voice lines). There's also the fact that each unit has 18 sounds, so changing each one manually takes some time (if you do it for ALL units it will take a lot of time). Which is why I think a voice line separated import/export can help a lot, if it's not too much implementation complexity for it.

Implemented.

Edited by Klofkac
  • Upvote 1
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.
Note: Your post will require moderator approval before it will be visible.

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.

×
×
  • Create New...