Jump to content

Klofkac

Fedaykin
  • Content Count

    164
  • Joined

  • Last visited

  • Days Won

    1

Klofkac last won the day on November 17

Klofkac had the most liked content!

Community Reputation

99 Good

About Klofkac

  • Rank
    Desert Warrior

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thanks for info, that sounds reasonable. Having auto-creation of Unit spawn event will encourage people to use it. Well, not necessary to give up this feature at all. It will be there, but it will just "look ugly". I'm thinking I can make it a "hidden" feature - a setting in .ini file must be changed to enable it. You mean select multiple conditions at same time and mark all events which use any of them? There's no multiselect for events or conditions, so only select one condition at time. By the way, I'm thinking about small rework of how the editor handles tilesets. Right now all supported tilesets need to be specified in config\tilesets.ini file. I want to get rid of that, so that the program will automatically load all existing files under tilesets folder. This way you just place a new tileset under tilesets folder and won't need to modify tilesets.ini. Each tileset will require 3 files - ini file, bmp file and bin file. In tileset's ini file will be specified the name of counterpart tileatr bin file and image file.
  2. I came up with this new feature "mark events having this condition". I hope that will do what you wanted. Aah, that's too much overcomplicated feature. I feel definitely much more effort needed to put into implementation than the benefit. No. Well, when I was implementing the Events and Conditions editor, I certainly wanted to add some automation for the most commonly and repeatedly used chains of events/conditions. I was thinking about what events could be the most useful for map authors. Harvester Replacement was the most evident and useful case. Then Side Annihilated message seemed useful too - in almost all of the original missions it's really used, so I supposed map authors would use that too. If you do not want to check for Units Destroyed, you can simply delete the Units Destroyed condition after it gets created. Then the third choice was not that clear for me, and I was deciding between several possibilities. One thing I was thinking about was Mission fail when you loose all buildings and units. Or Mission win when you destroy all enemies. In the end I came up with Unit spawn. Paradoxically it's the simplest and probably least useful event/condition chain, and I'm not sure whether it's really used in custom maps. But in almost all original maps it was used, so I probably thought it would be used in custom maps a lot too. Those three event creation features are hard-coded, and implementing customizable event/condition chain templates would be probably too much difficult to implement, so I would not go for it. But still, if you think Unit spawn is just too simple ot not very useful, you can give idea for a better replacement. That would probably not be a big deal, I tried to implement this, but there are some small technical implementation issues to think about. First, there is checkbox "Structures", which selects whether you want to select terrain only, or both terrain and structures. I could make it a special three-state checkbox, where the third state means "select only structures but not terrain". That could be a bit confusing to people, especially those who are new to editor would not know what the states mean. Second, I must somehow store the selected block in memory in a way that tile value is "missing" or "unimportant", so that when I place this block on map, tiles remain unchanged and only structures are placed. I can set tile value to 0, that will mean the top-left-most tile in tileset (which is a sand tile). This tile is probably never used in original or custom maps, so that would probably not be a problem, but that tile could not be used anymore as you would not be able to place it. Also, once you select a block in structure-only mode, all the tiles will visually look like the 0th sand tile in the block you pain. Third, thechnically in the map format, spice is treated as structure (has special value - 1 is thin spice, 2 is thick spice) so even in structure-only mode you will still select spice.
  3. Hey! Another tiny update is here! Download: D2kEditorv13pre2.zip Changelog: Fixed: Editing marker (i.e. building marker, current block) not showing when Mission settings or Events/Conditions window is open and is on background or minimized Added: "MissionsPath" setting in .ini file. It can be changed in case game loads maps/mission files from different location Fixed: The UI components now should not be messed up on systems where scaling is set to different value than 100% Music can be selected from a dropdown list in the Mission settings window as well (like in Play music event). Fixed the last unit in unit selection list not shown. Thank you all for your comments and helping me making this editor better. Well, I have an idea how that can be worked around. You can create one additional Flag condition, which will be there just for temporarily disabling your events. If you want to disable an event, just add this condition into its condition list. As the condition is always evaluated false, the event will never happen. Hmm, I actually made a Red Alert tileset for Dune 2000 myself in the past: https://forum.dune2k.com/topic/27109-release-new-dune-2000-tilesets/?do=findComment&comment=391645 Not sure how popular/spread it got, and it looks like the attachment does not work anymore. I can reupload if you want. I don't think I ever downloaded or used the resource editor. About TILEDATA.BIN editor, I posted it in this thread: https://forum.dune2k.com/topic/27065-release-tiledata-editor/?tab=comments#comment-390973 but looks like attachment is broken there as well. Here's reupload: TileDataEditor.zip
  4. Hello all! It's been almost 3 years since I released the last version of the Map and Mission editor without any update. Once I made a topic (https://forum.dune2k.com/topic/27429-reviewing-map-and-mission-editor/) where I asked you for some ideas what to add to the editor. I was planning to do some updates based on your suggestions, but then unfortunately got disinderedted in development and never implemented the ideas... until now. Finally I kicked myself to finish off some missing and useful features to the editor, which I think should really be there, and the editor will feel more complete with them. It's just a small update (not having so many additions like previous releases) and it's not an official release, but just a preview. I wanted to make sure all the new features work correctly and there's not any serious bug. So I'd like to ask you to test it and give me some feedback and ideas. But I want to say that I'm not going to implement anything big, just probably some minor additions like I made in this version and bug fixes. Download (EDIT: new version from 2018-12-02): https://forum.dune2k.com/applications/core/interface/file/attachment.php?id=3885 Changelog: Fixed: Size preset buttons in Tileset window were off by one position Added: Find object feature Changed: Some options (i.e. Show grid) are now toggle buttons below minimap instead of Settings menu items Removed: Draw concrete option (now is always on) Added: Play Sound event: now provides dropdown list of sound names (loaded from samples.uib) Added: Play Music event: now provides dropdown list of music names (list of existing .AUD files in Data\Music folder) Fixed: Set Attack Building Rate event: value is named "Arrack rate" instead of "Unknown" Fixed: Casualties condition: "Flags?" value renamed to "Proportion" and changed to floating-point number type Added: When temporary TESTMAP.MAP file is saved, the map name in ini file is renamed to "TESTMAP" in order to avoid duplicate entry in mission launcher Added: Open recent files feature Fixed: Editing marker (i.e. building marker, current block) not showing when Mission settings or Events/Conditions window is open and is on background or minimized Added: "MissionsPath" setting in .ini file. It can be changed in case game loads maps/mission files from different location Fixed: The UI components now should not be messed up on systems where scaling is set to different value than 100% Here are come comments to the ideas you gave me previously: Cannot reproduce, need more information Not feasible to easily implement. Would require very significant changes in code, or some hacks. Also writing text to map (i.e. event markers) would not work. Theoretically possible, but I think drawing a shape od placed building is enough and not feeling for spending time implementing this. I'm rendering the structures how exactly they are rendered in game, and in game they are not differentiated. The structures graphics file (shipped with the editor) was made by taking screenshots from game. So if anyone from you would want to help, you could somehow modify the graphics file, like adding colored tint to walls or marking somehow modified outpost. I'm not a graphician. Theoretically possible, but probably I would need to fiddle with CIRCLES.BIN file to load what the revealed areas should be. I don't even know if format of this file was ever reverse-engineered. So not feeling for adding this feature. Uh, yes, that's a problem. For some reason (don't remember if it was originally me or Mission launcher creator) we chose "_" as line break in ini files. So this character cannot be used itself in ini file. It could be worked-around by replacing "_" to some other character before saving into ini, but we would need to choose a character to sacrifice. Also changes in Mission launcher would need to be done. So enjoy the new preview release and once again, thank you all for your support! PS: Looking forward to see what you will come up with the Play Sound feature
  5. Klofkac

    Reviewing Map and Mission editor

    Those "concrete" tiles in tileset were never indended to be placed directly to the maps by the game programmers. Those are just "technical" tiles which are rendered in game when you place a real concrete. Same with the "spice" tiles on bottom of tileset. What you basically can do is to set "Buildings can be placed" attribute to those tiles using the Tileset attributes editor. However, that will just allow you to build on them, but remember that those tiles won't behave as real concrete, so buildings will get damaged over time on them like if you place buildings without concrete. You would be able to buid a real concrete on those tiles, which would look ridiculous. Also this "fake" concrete would be indestructible. Currently it is not possible to pre-place "real" concrete using the map editor, because there is simply no in-game support for this. Similar problem here: There is unfortunately no in-game support for this. I cannot add a feature which is not technically possible. I once asked FunkyFr3sh, who is patching the game, to add such feature, but he probably never did this, since he probably hit some technical obstacles, I don't know. He could comment this. I'd really like this feature to be implemented.
  6. Klofkac

    [Release] Dune 2000 Random Map Generator

    Always when I download a new version of your map generator, for first I try it on the default settings (just run run.bat) and after that I try to modify the settings. Yes. The parts where you use your "new" method of distribution (placing spawns with autoSpaceSpawns on, and placing the spice blooms) take excessively long time. Actually, as I previously complained that the program got stuck in infinite loop, that was probably not true, your algorithm was just taking time. In comparison, all other phases of the map generation took just fractions of a second, with one or few exceptions which took a few seconds. I personally think that 1 minute and 30 seconds is way too long time. As I said, you might have a faster PC or something, but for me it was taking much more. With the two first versions of the program you released, generating a 128*128 map took something between 5 and 10 seconds, which is reasonable time. So generating a map should really take no more than 10 seconds (maybe 15), so this should be your objective. You should take care about effectivity of your algorithms, so whenever you implement something new and generating a map takes significantly more, you need to rethink or remake it. Good work, so I'm curious how well this method will go. If you get some first results, don't hesitate to post screenshots here. I just have a few ideas. I looked at the files you generated and I personally think you really do not need to write values of 0 here (as 0 is really frequent value and should be default), which will lead to much smaller and better readable files. The second idea is that you could group all "clean sand" and "clean rock" tiles together and threat all of them as a single tile index. The idea is, there are like 10 different indexes of "clean sand" tiles and 15 "clean rock" tiles, which all look very similar and can be completely randomized. So I think this could optimize your algorithm. And now some more notes. I see you removed the pictures with examples of a map generated with default settings from your first post. I don't think it was a good idea, because it's actually good practice to provide a quick demonstration of what your program can do, before anybody decides to download it. I recommend you to use some version control tool to track your development and changes in source code. The most used one is Git and you create a Git repository for free on github.com . I don't know whether you used anything like this in your life but this has actually many advantages. First, all states ("versions") of your code are tracked and archived, so you can look and compare what was changed between the previous and current version. Second, anybody is able to download your source code from github, so you do not need to always zip and upload it manually. And third, github allows collaboration of more people, so anyone else can make changes in your code and push (upload) them to your repository. Mine github repository for the map and mission editor is here: https://github.com/jkoncick/D2kEditor
  7. Klofkac

    [Release] Dune 2000 Random Map Generator

    Ok, so now I tried it out. Again, I ran into the same problem as before, the program just runs forever and never finishes and needs to be killed. I realized that it freezes even during the very first phase (place spawn points) because it did not output "Player spawns added" message. So I turned off the setting "autoSpaceSpawns" and then it got past the phase "Dunes added" and froze on addSpice phase again, same as with the previous version. So I decided to look into the source code to see what's wrong here. Well, the problem is, that this new method doesn't work. Apparently you use the exactly same method for placing spice blooms, that's why same problem is here. The problematic part is the double for-loop (one with "i" and one with "ii" variable), which just takes HUGE amount of time. What I understand, your new method works this way: When it's attempting to place a spice bloom, it tries to place it as far as possible from any existing spice blooms. So it picks randomly some coordinates and checks the largest possible surrounding area around it, whether there is any existing spice bloom in it or not. For the same area diameter, It tries several different coordinates (ii-loop), and if no success, it decreases the diameter by 1 (i-loop) and tries the same again. The worst is, that this method utilizes 4-level loop (2 levels for checking the surrounding area and 2 levels as I mentioned), leading to O(N^4) time complexity (where N is size of the map)!!!!!!! Which is really not usable in practice. Maybe your computer is faster than mine or you tried with smaller coordinates than 128*128, but for me, it would take forever to generate map using this method. So you definitely need to rework the method to be more optimal, or just use the "old" method for the time being.
  8. Klofkac

    [Release] Dune 2000 Random Map Generator

    Great! Nice to see another update so fast. I'll try it out once I get some time for it. But in the meantime, I'd like to mention two other random generation methods I was thinking of, and still I am quite curious how well would they work if I really implemented them. 1. I got inspiration for the first method from an existing project somebody is working on. The project is called "Markeen" and it is random level generator for Commander Keen, a classic and legendary 2D platformer game from early 90s. In short, this is the key idea of the random generation algorithm: You can find more information under this link. Scroll to the bottom, as the oldest posts starts at bottom and newer appear upwards. It's really interesting to read and there are good examples (screenshots) of the levels it produced. As you can see, the levels it generates are quite cluttered mess which are not playable at all and need lot of human modifications to become playable. However, it's actually improving during the time, and I'm really curious how well this method will work for Dune2000 maps, after creating probability profiles from all stock maps. 2. The second method is purely my own idea. It'd be easier to explain with visual examples, but I just try briefly describing it anyway. The map generator first generates all rock-sand and sand-sand cliffs and rock borders. After this, it fills enclosed rock areas with rock, and then generates dues and spice patches and adds some special tiles in similar way as your generator does. It starts up randomly placing several "seeds" in an empty map. A seed is any single rock-sand cliff, sand-sand cliff or rock border block. Imagine it places just one seed, which is a top-down cliff. Then it has two "connection points", one on the right side and one on the left side. The map generator randomly picks any appropriate block which can be connected to the either side of the block, then it places it, and the process repeats until no connection point is available. It is exactly same principle as how Domino game works. It can create really interesting and crazy shapes, but the biggest problem is to secure that it connects two distant connection points together, forming an enclosed area or cycle.
  9. Klofkac

    [Release] Dune 2000 Random Map Generator

    So I tried out your last version (v170317) and it does not work for me, because whenever I start the map generator, it runs forever and never finishes (like it gets stuck in an infinite loop). I tried to enable the exportAll option to see what's going on, and the last phase it exports is 23 addDunes, so it looks it gets stuck on phase 24 addSpice. So I tried to change the spice settings, first lower them, then set all numberOfBlooms, numberOfEmptyBlooms and numberOfSpiceSquares to 0, but without success. Could you please look where it might get stuck? Also I got some idea. You could log the phases into console, so that user can see what the program is actually doing (and possibly also how long each step lasts) and where it gets stuck (if it happens), without need to enable exportAll option.
  10. Klofkac

    [Release] Dune 2000 Random Map Generator

    Thank you for your reply and explanations. I got several more questions to ask: Right now it really often happens that two rock areas merge together into one big area. However, sometimes it may be undesired behavior, so are you thinking about implementing some sort of mechanism which would actively prevent two distinct rock areas from connecting together? For example enforcing minimum distance of rock tiles belonging to different areas. If set to 0, this check would be disabled and areas would be allowed to connect. As I understand, the spice always generates around a spice bloom which is placed first. But in original game there are patches of spice (sometimes really big) which do not have any spice bloom inside them and would not regenerate once exhausted. Are you going to add this as well? Generally, do you have some task list or "backlog" of what all are you going to implement? Would be interesting to share one and then strike through a task when it gets implemented.
  11. Klofkac

    [Release] Dune 2000 Random Map Generator

    Okay, so finally got some time to respond to this thread. First of all: Well Done! Your random map generator really works, and it actually produces pretty reasonable results, which could be considered serious and playable, human-made maps. Pretty outstanding achievement you made. Personally, I'm not going to utilize this program to produce my maps (simply because I do not create my own maps anyway), but I am pretty much interested in the technical solution/algorithm of the random map generation. I was even thinking about making a random generator myself and considering various algorithms to use, but never actually started. I'm lacking some kind of description/explanation of the method/algorithm you used to generate the maps. But on the other hand, I was playing around a bit with the settings, and most importantly, I let export the individual results of all the steps, which gave me some insight to what's going on. Basically it starts up with placing square-shaped areas of rock (which will later become places for building up a player's base) and then it adds more rock tiles around them to form various shapes. Then it will form the access paths and cliff borders around the rock areas, and place proper cliff tiles (which is probably the most difficult part of the map generation at all). After that it will generate spice areas, dunes areas and small rock islands, using very similar methods. So far, I think I don't fully understand what exactly some settings do - for example numberAtATimeDivisor, squareTop/BottomRight/Left. My question is - did you make everything from scratch (I mean the idea of the method of random generation) or you followed or got inspired by some articles about some random generation methods? If so, could you provide some referrences to those? Here is some list of notices and ideas I'd like to say: By default you generate 48 spice blooms. But earlier I discovered that the game supports no more than 30 blooms in a map - if there are more, then those blooms above 30 will never spawn. So it has no sense to generate more than 30. Also the default number of worm spawns seems quite high for me. The program occasionally ended up in an infinite loop and needed to be killed forcefully. That happened mostly when I set very high numbers of numberOfSpawnsToAdd and numberToAdd, it seemed like it was trying to find a new free space to place a next rock tile, but there was no more room. It would be quite nice to break up the ini settings into multiple groups. I see that there are settings releted to rock area generation, and then very similar set of settings for generation of spice and dunes. Dividing these into separate categories would make ini file more readable. You could also match up the order of the settings with order of genreration of respective entities. It would be nice to add some randomization of the settings themselves. Now the final look of the map highly depends on the settings, which is still some sort of user input which needs to be supplied. If the settings were randomized too, the generator could make purely random maps with really great degree of variation and with minimal user input. My idea is that the users would be able to decide which settings they want to specify by themselves and which settings to let be random. The best way would be to specify the settings as ranges (minimum and maximum), the program would pick a random value within this range, and if the user wants a precise value he would set both min and max the same. I looked into the source code and the biggest problem I found is that everything (tile numbers) is just hardcoded into the code. When I was developing the map editor, I externalized almost everything into configuration files and made separate files with presets for each tilesets (ini files in Tilesets folder). You could actually utilize these tileset configuration files in your program - I already defined all tileset-specific blocks (sand specials, rock specials etc.) so it could save your work on defining all of these again. I was thinking about adding a new option to my Map editor, which would fire your random generator and then open up the resulting map just when the map is created. Edit: It would be good to add option to disable appending of the unix timestamp to the output file name. Sometimes I just wish to overwrite the output map instead of keeping history of all my attempts.
  12. Klofkac

    Reviewing Map and Mission editor

    Thank you, it's good to start with. Let's see if FedaYkin or somebody can come up with some special interesting types of AI.
  13. Klofkac

    Reviewing Map and Mission editor

    Hi Cm_blast and thank you for this idea! I think I pretty understand what you mean. Right now, when you create a new map, the editor uses the game's default AI, which is exactly same as the unmodified AI segments in original missions for the sides which are not present in a mission. This AI is also same as AI generated by the special modified Dune2000.exe (which FunkyFr3sh published here some time ago) when you do not explicitly specify any value. The .misai file with this AI is shipped with the editor and is located in config/default_ai.misai file. That means, you can simply replace this file with your own, and then whenever you create a new mission, the editor uses your modified AI segment. That's the actual philosophy of the config folder - you can customize many things in the editor, for example translate the names of buildings and units, without need to recompile the program. I still want to use this game's default AI as a default AI for newly created missions, BUT here I have an idea for improvement: Some "AI templates" can be shipped along with the editor. These templates will be modified and improved AI segments which can be directly imported into a new mission, without need to always modify the values from scratch. They will be easy to use for newcomers, because they simply choose one template they like and half work is just done. There can be more different templates, for example standard AI, practice AI, very tough AI, just anything you can think of. There will be a small text file describing each of them. If you want, you could create these templates for me, because I'm not willing to play around with them myself.
  14. Klofkac

    Reviewing Map and Mission editor

    Good notice, Cm_blast! So I will try to give it some meaningful description, something like "Ticks between attacks". I hope I will get into working on D2kEditor again soon, so far we collected a bunch of interesting ideas for improvements and probably some more will yet come up. Just for information: In the meantime, I was working again on my Hocus Pocus editor and created a tool for editing sprites, which is really significant new feature. For more information you can look here.
  15. Klofkac

    Reviewing Map and Mission editor

    Hi and thank you for this information. I didn't know that. It now makes sense why I was not able to add MP sardaukar.
×