Jump to content

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


Klofkac

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 3
  • Upvote 2
Link to comment
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 comment
Share on other sites

  • 1 month later...
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 comment
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 comment
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 comment
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 comment
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 comment
Share on other sites

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

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

  • 4 months later...

I just though on something to add into the editor itself for a future launch: Multiplayer options.

Although it is not the norm, it is true that exist a good amount of missions which contain specific set ups. Like missions with the players having certain structures (as I saw some files named as "<name well know skirmish map> but with buildings.map" or something similar).

But also, coop missions.

Right now, as far as I know, there is no way to set up any multiplayer mission (that's it, to play online with other players) besides placing the 8 "player start", requirement to do a multiplayer version.

But, there are several options added into the ini with the "[multiplayer]" section that I think it would be a great help from anybody that it is doing a multiplayer mission, as things like the tech, the initial credits and other values can be forced to load the map withouth having to add extra info to tell players to manually start the mission with X tech and X credits. I don't ever know every option that it can be used, so It would great to have the options appearing on the editor and knowning that all of them are there accesible. Plus that's something you cannot add nor remove on the editor right now, it has to be done manually.

So, I was thinking on having a second check somewhere this area with the "for multiplayer"

image.png.a1cad56e8d6a5c733635c0a5ebd02c28.png <-- For example, 2 small tabs on top of "Rule", one with "general" other "multi".

General being used to either kind of mission, and multi designed for multiplayer maps.

This is a list that I know for sure, but I can check every map searching for something more if needed (or asking multiplayer map creators).

[MultiPlayer]
Worms=0
Crates=No 
UnitCount=0
Credits=10000
StartWithMCV=No
TechLevel=3 
UseDefaultWinLoseEvents=Yes

So lines like this could be placed. Although maybe as a suggestion, since you can use only 1 of them, it shouldn't be needed to inject the .ini with 10 lines or whatever amount it's the total of options. So maybe it can be done that this values appears as "blank", and if given any proper value, they will appear on the .ini, but if I remove the value and leave it empy, then it won't appear later on the .ini when saving.

Things like "credits" or "unit count" can be free, but the "yes" and "no" options maybe a small deploy with those two words just to tell people that it is not about a number.

I know online has the "enable engineers/turrets", but not sure if that's something that can be forced or not; so it would be good for any multiplayer creator just having, at least, the info on the editor and knowning which things you can force into your mission regarless of what the player seting up the lobby chose.

 

Edited by Cm_blast
Link to comment
Share on other sites

  • 2 weeks later...

It is possible to change the sandworm sleeping times from that value into ticks? or, at least, some knowledge on which kind of values are. So instead 50 initial sleep which is aroudn 3 minutes and 10-20 seconds (which I know because I used a timer myself) maybe could be translated into 5000 ticks or whatever exact value is, but in ticks.

Also there is another thing I just found recently.

The moving up and down Condition types is somewhat recent, but it is not working properly.

For example, I ahve this set up with this conditions to trigger a message when those buildings are no more (ignore the fact that will trigger the whole game).

image.thumb.png.61b8659b2cf209c98a1f10a7e5c56f4f.png

Then I add a "timer = 1" because I need enemy Ai spawns and since I usually place the "timer = 1" at the very beggining, at the very first slot (so I got used to know that the first condition type is always that one), I proceed to move it all the way to top.

It move it, but the event type doesn't register the original values assigned, so what happens is that instead using the 6 "buildings don't exist" now it changes.
image.thumb.png.85a1b8413c3d2936059f88c58b54b4f5.png

If a mission is already done for the most part, with Condition and eventsa l ready set up, creating a new condition type and moving it just to recolocate it in a better position will affect most of the events if not all (like the example set up, but imagine having 40 condition types).

So this is something that could be implemented, because as it is now, unless you have the event list empty it is not worthy moving up and down the conditions as can affect too many things.

Edited by Cm_blast
Link to comment
Share on other sites

  • 2 weeks later...

I have a question team. Trying to make each special unit available at the starport for all 3 houses. 

I took away the MCV as I wanted to add the Deviator for the Ordos to be available for them. Unfortunately the game crashed because it also made the deviator available to the other houses as well, in their starports, even when I made sure it is only selected for Ordos. Any ideas? 

Is there a way to make it just available for each house within the starport? Aka Ordos get the deviator from the starport. The A get the Sonic tank and H get Devastator?

Link to comment
Share on other sites

4 minutes ago, Insaneo said:

I have a question team. Trying to make each special unit available at the starport for all 3 houses. 

I took away the MCV as I wanted to add the Deviator for the Ordos to be available for them. Unfortunately the game crashed because it also made the deviator available to the other houses as well, in their starports, even when I made sure it is only selected for Ordos. Any ideas? 

Is there a way to make it just available for each house within the starport? Aka Ordos get the deviator from the starport. The A get the Sonic tank and H get Devastator?

Currently no, the Starport menu is universal for all factions.

Link to comment
Share on other sites

47 minutes ago, Insaneo said:

Rats

Not entirely true. You would need to create a new unit type that would be shared by all three special tanks, and then three different versions of that unit. That way, it'd work like the Combat Tank and vary between Starports.

The downside is that all three special tanks would share the same name when moused over, but mechanically speaking, it would function.

48 minutes ago, Insaneo said:

build que

No. That patch was built for a very old version of the game, and due to advancements, it's no longer applicable to any readily available version of the game. There is some other neat stuff that has come about thanks to Klofkac's tampering though.

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.
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...