In GameOptions.ini the colors are R,G,B, in Rules.ini they're H,S,V with the values capped at 255,255,255 instead of the standard 360,255,255.
If you want to enable all the colors in the game you need the Rules.ini values, although figuring out the indexes of each color in Rules.ini could take some work. For most co-op missions the standard colors should also be enough though. _________________ CnCNet Client | CnCNet TS patches | More Quality-of-Life Improvements for RA Remastered
already found out that rules.ini's are in hsv, and that gameoptions.ini's are in RGB stands in the description.
rules.ini's colors seem to be ordered from 0 to 49, so i iterate them counting an index.
first i parse the rules.ini, getting 0-49 and afterwards i parse the gameoptions.ini, replacing by id. hope thats right.
an enum is passed parsing, so the structs containing color data (name, id, type and value) so the source can later be shown as in the screenshot. MP vs Default is the type name taken from meta object.
i took an enum instead of bool so it is easy to expand the feature for user defined colors contained in the map itself. if thats possible.
now i have to create a custom widget which is used for color selection and then i can make the player settings box containing the enemy houses and the disallowed sides.
guess thats all for coop then
regards
PS: further planned features are fast random trees and trigger presets
Aside from the colors under #7, you should not allow colors with even numbers to be selected because these cause all units and structures that use the color to be visible through shroud and they also ignore the map's lighting (making them appear to glow on dark maps).
^Rampastein wrote:
This is a complete list of colors that can be used in multiplayer, in co-op missions and such. With the new client it's also possible to add any of these as a regular multiplayer color.
If two colors are named the same, they might not actually be the exact same color, but they're similar enough that I've named them the same.
Even-numbered indexes are colors too, but those show up through shroud so I've only included the odd-number indexed colors.
0 = multiplayer color #0 (Gold)
1 = multiplayer color #1 (Red)
2 = multiplayer color #2 (Teal)
3 = multiplayer color #3 (Green)
4 = multiplayer color #4 (Orange)
5 = multiplayer color #5 (Blue)
6 = multiplayer color #6 (Purple)
7 = multiplayer color #7 (Metalic)
9 = light gray
11 = dark gray
13 = black
15 = white
17 = light pink
19 = pink / red
21 = red
23 = blood red
25 = yellow gold
27 = orange
29 = DarkOrange (in Rules.ini)
31 = light pink
33 = light gray (Metalic?)
35 = hot pink
37 = light pink
39 = bright purple
41 = dark purple
43 = light blue
45 = deep blue
47 = dark teal
49 = CABAL blue
51 = light sky blue
53 = cyan
55 = Allied blue
57 = light cyan
59 = cyan
61 = deep cyan
63 = RA2 Einstein green
65 = RA2 Einstein green
67 = RA2 Einstein green
69 = light green
71 = dark lime green
73 = lime green
75 = dark lime green
77 = light gold/yellow
79 = banana yellow
81 = banana yellow
83 = banana yellow
85 = light peach orange
87 = strong peach orange
89 = strong peach orange
91 = orange
93 = light green / yellow
95 = green / yellow
97 = dark green / yellow
99 = green / yellow
i got it now. reading colors from rules.ini, starting with index = 1 and incrementing per step by 2. afterwards reading from gameoptions.ini using given id.
i visually confirmed all colors 0-7 and all odd numbers above 7 till 99 by creating a test map with 7 enemyHouses.
- EnemyHouses can now configured via GUI.
- Max Number of enemy houses depends on max players (8 - max players)
- Max player have to be greater or equal than min player
- Min player have to be less or equal than max player
- Colors for enemy houses now fit
regards
PS: next step will be adding disallowed player colors and disallowed player sides and automagically be taken from enemy houses.
Good work. Once you consider the tool to be fully stable (stable enough to allow people to mindlessly use it without having to create backups) I could include this tool with DTA if you like and add an item for it under FinalSun's "Map Tools" menu. _________________ QUICK_EDIT
Changes
- Supports DisallowedPlayerSides
- Supports DisallowedPlayerColors
- Can import disallowed player sides/colors from Co-Op EnemyHouses.
- On saving an automatic backup of the original file is created with date and time in filename (in a subfolder, to not pollute the maps folder)
- Has command line options.
--version / -v
--help / -h
--open / -o
- Supports loading map file via command line parameter
- Linked this forum post in the about dialog
Regards
PS: Does anyone how to hide EnemyHouses starting points in launcher for coop maps?
It seems that I'm unable to run any of the Map Assistant's versions because it gives me the error message seen in the attached image.
Also, it might be better to replace the attachment of the first post every time there's a new version instead of requiring people to scroll down to find it.
I found out that it's quite annoying how FinalSun always resets a map's MaxPlayer= and GameMode= when it saves the map, so to work around that the next version of the client will also read ClientMaxPlayer= and GameModes=, and only use the values from the FinalSun-shared keys if ClientMaxPlayer= and GameModes= do not exist. _________________ CnCNet Client | CnCNet TS patches | More Quality-of-Life Improvements for RA Remastered
that sounds awesome! i am currently redesigning the way my app uses the map ini. it was just parsed to multi-dimension bytearray, but now it gets fully deserialized into object. (qobject values, so signals and slots are available) and the whole thing is really easy to use from the gui classes. basically it goes like connecting signals/slots lib <-> gui, read a map file and voila, ready to go. gui always in sync with the map (and in theory even client/server model possible). monday i got some spare time, then i need to create a few objects for the player sides, colors and enemy houses.
i got a question. how are overlays stored to the ini? i know it's encoded in base64 and chunk splitted. easy. but how is it stored a) where to place b) what overlay. reason for this is i want to make it possible to auto-create impassable overlays for tree groups etc. would save a lot of work and during mapping map would not look ugly like with all those overlays.
For information about how overlays work I recommend looking at the source of Starkku's MapTool as well as the projects that are linked to in the acknowledgements. _________________ QUICK_EDIT
MapTool by Starkku is open source in C# for map pack manipulation. It uses the code from OpenRA for map pack formats. Currently MapTool does not support coordinates to specific overlay conversion.
You can pick up the X and Y coordinates from map file [Terrain] section for a specific tree, it uses 1000*Y+X formula as its index which is a location. And then use formula 512*Y+X to set the byte at that byte location in OverlayPack raw data with say 180 in hex. OverlayDataPack need not be touched (assuming only 0th frame of IMOV is used) as it would have default 0th frame of the SHP, unless the overlay is getting replaced with another one which had more frames and the frame number was already set to other than 0 in OverlayDataPack. In that case, you should set that byte in OverlayDataPack to 0. But there is some amount of ambiguity like what should you do when a tree is placed on a train track, should you replace the underlying track piece with impassable overlay?
Edit: It also needs the location of adjacent cells, specific to each terraintype like a tree group covers more than one cell, so each of those would need computation like (x-1,y), (x,y), (x+1,y). There will be need to check what overlay already exist on those cells and also on what terrain it is placed on like if it is on water/land etc.. Map edge cases may also need to be considered. QUICK_EDIT
Updated MapTool with ModifyOverlays section to take coordinates and apply the overlays to the map. Check the documentation for details and examples. The command line tool could be used with map filename and a dynamically generated profile with coordinates to apply the impassable overlay to treegroups etc.. QUICK_EDIT
i started using a subclassed standarditemmodel for map data now. it somehow works pretty good, especially combined with a custom item delegate and a proxymodel. e.g. comboboxes can be filled with map model data sub structure and updated dynamically.
for sides and colors the is an "allowed role", changing this data automatically updates the disallowedplayer sides and colors, allowed and disallowed combo boxes contents are updated via the proxy model.
still somehow have to link checkboxes to the model. think it wont be hard in a subclass.
cool thing is that model data can be shown and edited in a treeview.
the pack-data shit fucks up my head. the base64 is piece of cake but the compression sucks. havent got much time atm, still much work to do on my construction site. i did all cabling, and plumbers are ready, but need to do drywalls and ceilings now. think about christmas i got some time as flooring and painting will be done and i got nothing to do with that.
Have updated the MapTool on the link provided earlier. You can get a terrain type coordinate from the map, then compute the coordinates where the impassable overlay has to be placed. Then generate a text profile file and supply it to the maptool commandline tool, it will populate the map with the impassable overlays. You need not get into the base64 or the map pack compressions.
It will check if the coordinates fall within map and also you can specify if the impassable overlay has to be placed only on cells which doesn't already have any overlay etc.. Just check the documentation. Also have provided extended logging feature if you want to understand the raw overlay data formats. QUICK_EDIT
i saw you added parameters for raw data export after decompression. i can use this to check if decompression was successful. i think the task will go rather well with qt's QByteArray and QDataStream. will be interesting to find out how that works.
for positions from map ini i already made a class which has x/y coordinate.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum