
Klofkac
Fedaykin-
Posts
404 -
Joined
-
Last visited
-
Days Won
43
Everything posted by Klofkac
-
Okay, so... Here it goes: I'm now able to load buildings and units graphics from DATA.R16 directly, and easily dynamically recolor images with colors from COLOURS.BIN. Thanks to your Spice2k source code (https://github.com/nguoiyoujie/Spice2k/blob/master/src/Dune2000/Structs/R16/ResourceElement.cs) I was able to understand the DATA.R16 format and how to parse it. How is your investigation of TEMPLATES.BIN formats? I could notice UnitTemplate struct format is ready, but BuildingTemplate not yet. That would help me too. Reading graphics data directly from DATA.R16 directly is indeed advantageous, but also some issues. The most important issue is drawing of stealth units (stealth fremen and raider) - those units seem to use regular unit's graphics and the stealth effect is made by the in-game renderer. Also the side color cannot be seen on a unit in stealth mode. I'm thinking how to render stealth units - maybe whole unit shape with a solid color (the side color). The second issue is, that the Carryall and Frigate are too much spacious and they occupy much more space than size of a tile. I wonder how that would look in editor.
-
I took a look at this, and this is possible. However, it works only if you select one value, then hold shift, and press down or up arrow key to select a range. It does not work with holding shift and clicking. But it is pretty well usable - you make a range selecton, write a value, and same value goes to all properties within range. You probably do not know about "LoadCustomColoursBin" setting in D2kEditor.ini. Change it to 0, and editor will use only the default colors. How much did you examine the templates.bin file and how much you know about the data in it (meaning of the bytes)? You already wrote something in your templates.bin research thread, but knowing the data structure declarations would help there.
-
Ok, yes, as you say, it's actually Sandworm, which happens to use Atreides-style buildings. Currently the value list editor does not support change of multiple entries at once. I will need to have look at whether and how this could be achieved. The main problem is, that editor loads a static image with unit/building graphics (graphics\structures.bmp). The graphics is prefabricated (created by taking screenshots from game) and recoloring it with colors from colours.bin would be not feasible. To make this happen, I would pretty much need to reimplement/mimic the game's drawing code, and load the graphics directly in the game's format (DATA.R16) which would be pretty huge additional feature and coding. Uh, I'm not sure if I understand what you mean here. But It works the way, that in the fields where you specify campaign folder and mods folder, there's a cield called "Colours.bin" file, where you specify name of file (located under CustomCampaignData\CampaignFolder\Colours\your_custom_colours.bin) and editor will load and use it for this individual mission.
-
Ok, I tried myself with various values, and the behavior is interesting, but I could not find the exact behavior mechanics. It also looks like the value is rather a bit field than a numeric value. For example using value 0xF0 behaved same as 0x00, only bits in the lower nibble had an special effect. Maybe you could take a look into code, how the game evaluates the value, if it performs any logical bit operations etc. Probably the other values than 0x00 and 0xFF was an unused feature. But anyway, I wonder if this is even anyhow useful and has any modding potential.
-
Hmm, I was thinking about this. However, allocation index drives not only the player's building/units colors, but also the player house! What I mean, when you use allocation index 0, the structures have not only blue color, but also all buildings and units use Atreides type, both graphical and functional (i.e. Atreides-style Heavy Factory can produce sonic tanks etc). For index 1 you get Harkonnen and for 2 Ordos, but for example when you use index 6 you get Mercenaries (Ordos style, but they have their own special Heavy Factory type). For all allocation indexes 7 and above, you get just Atreides-style buildings (and from what I know, it's kinda buggy, as you cannot deploy a MCV, probably), so if you extend colours to 16 entries, all the additional indexes will be limited (you get only buggy Atreides). Furthermore, you cannot have more than 8 players on a map at once. So will it even be any significant benefit extending number of colour entries? Now you can have custom Colours.bin per individual mission anyway.
-
Thanks for reporting this error! It's caused by a silly oversight in coding. I am checking the structure index, but not checking whether structure is building or unit. Because Quad has same index as refinery, it is also counted as a refinery. It was pretty easy to fix.
-
Thanks for another good research! And by the way, I think it's definitely good practice to create a separate thread for individual file research, as this is much better organized than mixing up many different things in a single thread. I actually had an idea about purpose of this file, but did not bother about examining it deeply, as I felt it had quite low importance in terms of modding. But as discussed, having possibility to have circles with bigger radius and fixing the problem with radar minimap reveal is nice thing. Did you experiment with this? Anything interesting happens?
-
Uh oh, it's definitely crashing due to attempting to load an invalid file. I'm actually pretty surprised you made a Colours.bin file with only 3 entries - is the game itself able to load this at all, or it is crashing?
-
Request for source code for the unofficial Dune2000 patch
Klofkac replied to lovalmidas's topic in Dune 2000
I'm glad to see someone new on the scene who is eager to continue with our Dune 2000 patching journey. It ended up in 2015 and we live with what those amazing guys made for us for a few years, but we're still finding demands for more things to patch to extend our campaign creation possibilities. For example back in the day I suggested to patch in a feature to be able place static bonus crates in a map, a la Red Alert 1, but this probably ran into some technical difficulties and never got implemented. One thing I'm wanting the most is to increase the number of events and conditions there can be in a mission, because the current amount is quite low and limiting. There is some spare apparently unused space in .MIS file to place just a few additional events and/or conditions. The other possibility is to increase the size of .MIS files and add any arbitrary amount of extra events and conditions, but to keep compatibility with original files at same time. I was thinking of doing a direct binary modification of the executable, but that would be a bit tough. Having the full game patching source of the very latest patched executable would be extremely helpful. The patches were later done primarily by @FunkyFr3sh. Did you already attempt to contact him directly? It would be very polite from him if he could provide our community the latest source code, so that we could work further based on his extremely helpful work he did for us. The best is to publish code on github, which elliminates the risk of not being able to reach the person in future and source code being lost forever. I'm having my own code of D2kEditor published on github already and I consider this being a matter of course for any community projects like this. Thank you @FunkyFr3sh in advance, if you decide positively about sharing your modding treasure with us. -
Good to see someone is taking a deep look into this. I personally wanted to do some research of templates.bin file on my own, but I am quite busy with editor development, so did not really get into this much more than taking a quick look into it in a hex editor. I was thinking of loading this file in editor directly and reading some data from it, like the building and unit names, so editor would display them in UI without need to have building and unit names stored in separate editor's configuration files. But the names in templates.bin are not very appropriate, like Sietch is called as Fremen Barracks and other things like that, so I scrapped that idea. I can see you are using some good tool for decompiling the code, which looks really nice and useful. I tried to use OllyDebugger and tried to read the assembly instructions directly, when I was examining the possibility to push the limits of events and conditions number. Ended up figuring out the game does not load .MIS file as a whole into continuous segment of memory, but it reads individual sections of file into randomly arranged segments of memory. Some editing of game exe would be definitely needed to increase limit of events and conditions number, and the hardest part is keeping the compatibility. Adding the amount of building and unit types (without replacing existing) is one thing I wanted to see being possible. There are 100 building and 60 unit entries in templates.bin, so the game designers left really huge reserved space for much more stuff to be potentially added in future. Hopefully we can find a way how to take advantage of it. Thumbs up for your further research.
-
[Release] Red Alert 1 Temperate HD Tileset (Remasters)
Klofkac replied to azimovhaas8's topic in Dune 2000
Holy cow! That looks amazing. I can see it's based on tileset I created myself in past as "BXRATEMP" so the arrangement of tiles is the same, but looks way much better. Actually, I wanted to remake this tileset a bit and add more tiles into it. From recent tileset research, we now know that there are some more tiles which are free to use (because game does not use them internally for any reserved purpose). So I wanted to extend it, and furthermore make use for some individual tiles scattered around the tileset to compose even more block presets, because the editor now supports custom block with any non-rectangle shape, or in other words, block presets with "holes", exactly how Red Alert map editor works. But you already made it. Still wondering whether it's feasible to extend the tileset, and I also wanted to adjust the .ini file for new editor version. -
Well, I changed that after I posted my example. First I made the numbers Player1 - Player8, but because there has been always numbering like 0 - 7 in player combo boxes (and allocation indexes use numbers 0 - 7 as well), I changed my mind and changed it to Player0 - Player7 so that the numbering is unified. So my example is obsolete, just use Player0 - Player7.
-
[UPDATE] The second pre-release version is now available, including important new features! Go to this post for download and more information: https://forum.dune2k.com/topic/28802-map-and-mission-editor-new-major-version-20-pre-release/?do=findComment&comment=400216 Hello all! It's time for a new major version of D2kEditor! Version 1.4 did not get any final official release, but it looks that it had so many and huge changes and new features from last version 1.3, so I decided that it really deserves a new major version number. All the changes and new features are described and discussed in the other thread (https://forum.dune2k.com/topic/28587-updated-1462020-map-and-mission-editor-v14-release-candidate-3-full-of-improvements-and-new-features/), but I'm making this new thread. The current version is yet far from being complete, but I just wanted to give it away for anyone who is interested in it and eager to try it out! Here's download for the first pre-release version: [OUTDATED] Please take pre-release version 2 from here And here is changelog (this includes ONLY the changes made since last release, v1.4 rc3): Changed: Spice Bloom graphics is now transparent Added support for new Mission Launcher: - New fields under additional Mission.ini file settings: "Campaign folder", "Mods folder", "Colours.bin file", "Players.ini file", "Intel ID" - Editor can load custom COLOURS.BIN file for individual mission, specified under "Colours.bin file" field - Editor can load custom player names from .ini file for individual mission, specified under "Players.ini file" field - Editor can load modified buildings&units graphics for individual mission from specified Campaign and Mods folder - Editor can load modified buildings&units configuration for individual mission from specified Campaign and Mods folder - Last two points are useful for mapping with modded game resources (i.e. new/replaced units) - Editor will load following graphics/config files for individual mission from this folder structure: {Dune2000 root folder} |- CustomCampaignData |- {Campaign folder} |- Colours |- {Colours.bin file} |- Players |- {Players.ini file} |- {Mods folder} |- graphics |- structures.bmp |- misc_objects.bmp |- config |- structures.ini |- misc_objects.ini |- buildings.txt |- buildings2.txt |- units.txt |- data |- bin |- TILEDATA.BIN And here is the VERY COMPLETE changelog since version 1.3. A huge list, isn't it? Enjoy! Looking forward to your feedback. D2kEditorv2.0pre1.zip
-
I know about this, and this is due to change in programming of the editor. You know, in .ini file, you have three ways how to specify a block preset: 1) width.height.Xposition.Yposition 2) width.height.tile 3) -width.-height.tile.tile.tile.tile... The first two are for tiles stored continuously within tileset image, the third way is to specify a "custom" block, composed of tiles placed randomly in tileset image. In v1.3, the editor stored continuous and custom blocks in memory separately, and I need ho have a code for handling continuous presets and separate code for handling custom presets. In v1.4, I made lot of new features, and to make things simpler for me, I unified this and made it that also continous presets are stored in memory as "custom" blocks composed of individual tiles. So editor always stores all individual tiles instead of just X and Y position of the top-left tile. That's why the behavior you described stopped working. It's just a trade-off for the new features. I hoped nobody would notice this behavior change.
-
This is actually something I implemented today. The buildings and unit names for AI properties under AI tabs are loaded from building and unit list files. No need to modify the ai properties ini file, which makes things even easier! Thanks for explaining the TILEDATA.BIN file meaning. We made TILEDATA.BIN relearch already in past, and as a result, I was able to modify this file in order to enable placing any building and unit type for any player (i.e. Harkonnen palace for Ordos etc). I made a TILEDATA.BIN editor, and distribute TILEDATA.BIN with the map and mission editor, so when this file is replaced in game's data\bin folder, this feature can be used in game. The editor loads TILEDATA.BIN, so if this file is modified further to add even some extra building or unit types, editor will be able to place those buildings and units (if they are added into config\structures.ini file as well). Thanks! I really hope you and others will find those features useful
-
Here's another update in D2kEditor. Here is a screenshot, can you spot all the new things? As you might know, I was working on implementing support for per-mission editor graphics and configuration files (I mean those .ini files under config folder). This can be extremely helpful for creating missions using modded game resources, as you can use i.e. the modified graphics, unit and building configuration per individual mission. Here is example of changes I made: - Modified graphics/structures.bmp (just swapped colors for a simple demonstration) - Modified graphics/misc_objects.bmp (changed the background tile for spice bloom) - Modified config/structures.ini (added Flame Tank on the list of units) - Modified config/misc_objects.ini (renamed Spice Bloom to Wood Bloom) - Modified config/players.ini (renamed player names - already showed previously) - Modified config/mis_units.txt (this is list of units for Events and Conditions, added Flame Tank on the list) - Modified COLOURS.bin - Modified TILEDATA.bin Here is the example folder structure and how editor loads it: CustomCampaignData |- WarOfTheLandsraad |- Colours |- colours_O9.bin |- Players |- players_O9.ini |- WOL |- config |- structures.ini |- misc_objects.ini |- mis_units.txt |- graphics |- structures.bmp |- misc_objects.bmp |- data |- bin |- TILEDATA.BIN So the file loading logic is in line with mission launcher folder structure. The _mask bmp files are created automatically, if missing.
-
Then side 0 (Atreides) is probably Ally with you. You cannot run over allied side's infantry, too.
-
Well, I think I know exactly what is happening and why. I already explained this behavior in this thread: https://forum.dune2k.com/topic/28481-tile-attributes-research-new-useful-findings/ So the reason why repulsion fields worked in 1st video and not in 2nd video is, that in 2nd video you apparently played as Atreides, and once your vehicle moved over repulsion field, the "infantry" owner became Atreides (= you) and you cannot run over your own infantry. The solution should be quite easy - set attributes "Unknown (side bit 1)", "Unknown (side bit 2)", "Unknown (side bit 3)" to "111", same as "Building/Unit owner side (bit1, 2, 3)" and problem should be gone. Note that the limitation of repulsion fields is that heavy vehicles of "Sandworm" side cannot pass through it, but you probably know this.
-
I'm rethinking this a bit. Instead of placing the players.ini file into Colours folder and naming it the same like the Colours.bin file, it will be better to create a new "Players" folder and place those ini files in it and make them separate and independent from Colours.bin files. I will add a new field called "Players.ini file" on Mission settings window. Then you can use custom player names even if you don't use custom colours.bin file. It will use the color from middle, it should be exactly the one which game displays on minimap.
-
Another update: Apart from loading custom COLOURS.BIN file per each mission, editor can also load customized list of player names per mission! @Feda you would be interested (hope I used correct names, this is just for demonstration): Rather a cosmetic thing in the editor, but I believe it can help a lot when designing events for the mission: Much better, isn't it? All you need to do, is to place .ini file into Colours folder. The file name is same but extension is .ini instead of .bin (for example colours_O9.ini). And the file structure should be same as config/players.ini in the editor folder. [Player1] name=Tleilaxu Right short=TlxR [Player2] name=Tleilaxu Left short=TlxL [Player3] name=Ordos short=Ord [Player4] name=Tleilaxu Mid short=TlxM [Player5] name=Capital Power short=CapP [Player6] name=Capital Small short=CapS [Player7] name=Capital Main short=CapM [Player8] name=None short=None You are right. For higher indexes, editor will display black color.
-
Todays updates: - Added new fields related to @Feda's new mission launcher (Campaign folder, Mods folder, Colours.bin file, Intel ID) - Added player color marker next to Allocation Index field (player colors are loaded directly from COLOURS.BIN file, same colors are drawn on minimap) - Added logic to automatically load COLOURS.BIN file directly from respective campaign data folder and according to "Colours.bin" file field Next plans: load editor configuration (structures.ini, players.ini, ...) and graphics files (structures.bmp) for individual mission from custom campaign data folder, making editing with modded files much easier
-
Yes, it's for changing the player names in editor. It has no impact on game at all, it's there just for convenience for the person who makes a mod for Dune 2000 and reuses specific side for his "own" new side. For example when you make Redzani campaign, you rename one side (i.e. Mercenaries) to Redzani, and in all places in editor, you see "Redzani". It has no impact on game, internally the numbers are still same. I just changed the order in the UI for convenience. Imagine the most common case - when you create a new mission, you start off with all allegiance as "Enemy" (except self-reference). Then in most cases, you make two or more sides allies. Previously you needed to click every button twice, to switch to "Neutral" and then to "Ally". Now you switch to Ally with one click. All I wanted was to save your mouse clicks. I consider Neutral used much less often than Ally.
-
Another update! RC3 is out! Download: D2kEditorv1.4rc3.zip Thank you all for your bug reports and feature suggestions. After taking some break after releasing the previous version, I finally resumed my work on D2kEditor and I was happy to implement another set of improvements and new useful stuff you asked me for. Sorry for a bit of delay and no responses - I was taking into account all your comments and I hope I did not forget about anything. It's quite difficult to keep track of all comments and suggestions that are scattered around many different threads. I suspended my work on the Mission Launcher. The main reason is, that a new mission launcher is currently under development by @Feda and I did not want to make something duplicate, which would work in different way and be incompatible. I still want to get in sync with Feda's mission launcher and make a support for it, and add even more support for loading modded files in the editor. Finally, after all, I decided to imlement @D2k Sardaukar's request about random background map for painting sand and rock (see https://forum.dune2k.com/topic/27824-map-and-mission-editor-finally-a-small-update-after-all-version-13-released/?do=findComment&comment=396039). Finally I got an idea how to reasonably implement this into the program. Thank you very much for these words. Seeing a new and active member in our small community is actually a motivation for me, who knows whether anyone else like you will yet appear. I hope you still get a new breath and continue making good quality missions, like the one you started up with. Having better tools and work getting done easier can be a good motivation for you, too. And here comes the most interesting part: The list of changes and new things in this version: Added: Mark Wall & Concrete owner side feature. Available as 4th toggle button "Own" below minimap (or Ctrl+W). "Show unknown specials" option was moved under Settings menu. Added: Map error check for Refineries per player limit (10 max) Added: Total column to map statistics (now it's easier to get total amount of structures in a map) Fixed: Map statistics grid scrolling with mouse wheel Added: Player names loaded from "config\players.ini" file are used in all places in editor and no longer hardcoded Added: Minimap colors for buildings and units are loaded from game's COLOURS.BIN file. Original COLOURS.BIN file is shipped with editor. Changed: Allegiance buttons on Mission settings window are changing in this order: Enemy -> Ally -> Neutral Added: Defence areas can be selected directly from map. A button will appear when you select a defence area in AI editor. Added: Use random paint map feature. Predefined 128*128 background map of clean sand and rock is used for painting. The advantage is better distribution of random sand/rock tiles and more natural look. Can be turned on in Settings. Fixed: Spacebar was not always working for switching from block preset window to tileset window Fixed: Filling of area surrounded by spice with spice Added: Remap tiles feature Added: A simple mission launcher Added: "D2k Mapping Manual" document As before, I would like to ask you to go through the list one by one, and verify whether everything mentioned got fixed and it's working as expected. Thank you. @Feda I will still need to get in touch with you, regarding addition of new fields related to new mission launcher. I need to understand exactly how it's going to work.
-
Yeah. That's kind of teaser for new D2kEditor features I implemented since the last release. In short, the "Mark wall owner side" feature was extended to "Mark wall and concrete owner side". Eh, you bit of surprised me, I don't even realize I fixed that. What was the actual problem? Regarding the problem with spice spreading outside the area enclosed by spice when filling area, which you reported in other thread, I needed to fix this in the editor itself. Yes. And please note that shortly after I made my post, I reuploaded the ini file, I needed to fix one thing. Please get the latest ini file if you, by chance, took the previous version.
-
So I took a look into this, and ended up improving and fine-tuning the tileset .ini file in similar way I did for Heighliner and Warcraft 2 tilesets, in order to make the best experience mapping with this tileset! Here it is: BLOXRETR.ini (EDIT: Reuploaded because I fixed one oversight in the configuration) Here's list of changes and improvements I did: 1) Updated minimap color rules to almost match real colors used in Dune 2. Here is the result: 2) Rearranged block presets + making auto-smooth edges feature work Presets 3, A, F, C are not used by auto-smooth, you will still need to place them manually to fine-tune the area. You will need to place E, D, S manually too. 3) Added side-owned concretes into Buildings preset group under Z,X,C,V,B,N,M,< presets: 4) Configured editor attributes, fill area rules and some other stuff. Enjoy!