:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::
Do you want to advertise at Project Perfect Mod. Find out how to do it HERE.

The time now is Tue Nov 20, 2018 9:39 pm
All times are UTC + 0
 Forum index » Featured Projects » Dawn of the Tiberium Age » Maps
DTA Map Assistant
Moderators: Dawn of the Tiberium Age Staff
Post new topic   Reply to topic Page 1 of 1 [23 Posts] View previous topic :: View next topic
Author Message
Verlusti
Vehicle Driver


Joined: 03 Nov 2017

PostPosted: Sun Oct 21, 2018 12:14 pm    Post subject:  DTA Map Assistant
Subject description: Tool to support mapping
Reply with quote

Hi there,

i wrote a tool to support mapping.

currently it enables the user to add Author information as well as setting some other options without ini editing.

it allows to add forced options to custom maps.

it is a early version, use on your own risk and always make backups.

you can find the sources there:

https://bitbucket.org/Verlusti/dta-map-assist/src/master/

regards

PS:

next feature that will be added makes it possible to configure enemies in coop missions including colors.


DTA Map Assistant 21.10.2018 14_13_02.png
 Description:
Screenshot
 Filesize:  29.24 KB
 Viewed:  813 Time(s)

DTA Map Assistant 21.10.2018 14_13_02.png



dta-map-assist-0.1.zip
 Description:

Download
 Filename:  dta-map-assist-0.1.zip
 Filesize:  7.17 MB
 Downloaded:  5 Time(s)


Back to top
View user's profile Send private message
^Rampastein
Rampastring


Joined: 11 Oct 2008
Location: Gensokyo

PostPosted: Sun Oct 21, 2018 3:31 pm    Post subject: Reply with quote

Interesting. Nice to see someone putting the client's possibilities for custom maps into use Smile
_________________

Back to top
View user's profile Send private message ModDB Profile ID Facebook Profile URL
Verlusti
Vehicle Driver


Joined: 03 Nov 2017

PostPosted: Sun Oct 21, 2018 5:34 pm    Post subject: Colors Reply with quote

I want to make menu for adding coop enemies. how does the game evaluate the hsv color values? if i read them they look really different.

i read the rules.ini putting all values into a int/QColor map,using QColor::fromHsvF().

the h,s,v value from rules.ini i divide by 255 to get 0.0-1.0 float values.

Code:
            qreal h = list.value(0).toDouble() / 255;
            qreal s = list.value(1).toDouble() / 255;
            qreal v = list.value(2).toDouble() / 255;
            qc = QColor::fromHsvF(h,s,v);


some colors look like in the launcher, but some not really, like teal.

did i forget anything?

regards.


DTA Map Assistant 21.10.2018 19_24_14.png
 Description:
 Filesize:  33.36 KB
 Viewed:  781 Time(s)

DTA Map Assistant 21.10.2018 19_24_14.png



Back to top
View user's profile Send private message
E1 Elite
Commander


Joined: 28 May 2013

PostPosted: Sun Oct 21, 2018 5:56 pm    Post subject: Reply with quote

Try like in this tool. Even those values are not accurate for what is rendered on the game screen.

Edit: Look at also the DTA colors defined in game folder - Resources\GameOptions.ini.

Back to top
View user's profile Send private message
Verlusti
Vehicle Driver


Joined: 03 Nov 2017

PostPosted: Sun Oct 21, 2018 6:54 pm    Post subject: Reply with quote

it's in the GameOptions.ini.

my color conversion is right. just used on the wrong values.

thank you

Back to top
View user's profile Send private message
^Rampastein
Rampastring


Joined: 11 Oct 2008
Location: Gensokyo

PostPosted: Sun Oct 21, 2018 7:44 pm    Post subject: Reply with quote

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

Back to top
View user's profile Send private message ModDB Profile ID Facebook Profile URL
Verlusti
Vehicle Driver


Joined: 03 Nov 2017

PostPosted: Sun Oct 21, 2018 8:31 pm    Post subject: Reply with quote

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


DTA Map Assistant 21.10.2018 22_21_51.png
 Description:
 Filesize:  35.34 KB
 Viewed:  744 Time(s)

DTA Map Assistant 21.10.2018 22_21_51.png



Back to top
View user's profile Send private message
Bittah Commander
Defense Minister


Joined: 21 May 2003
Location: The Netherlands

PostPosted: Mon Oct 22, 2018 12:33 am    Post subject: Reply with quote

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

_________________

Back to top
View user's profile Send private message Send e-mail ModDB Profile ID YouTube User URL Facebook Profile URL
Verlusti
Vehicle Driver


Joined: 03 Nov 2017

PostPosted: Mon Oct 22, 2018 6:42 pm    Post subject: Reply with quote

where are all those colors defined. need to dynamically grab them from an ini in my tool.

regards

Back to top
View user's profile Send private message
^Rampastein
Rampastring


Joined: 11 Oct 2008
Location: Gensokyo

PostPosted: Mon Oct 22, 2018 6:48 pm    Post subject: Reply with quote

They're the colors in Rules.ini.
_________________

Back to top
View user's profile Send private message ModDB Profile ID Facebook Profile URL
Verlusti
Vehicle Driver


Joined: 03 Nov 2017

PostPosted: Tue Oct 23, 2018 11:34 am    Post subject: Reply with quote

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.

it seems to fit.

Back to top
View user's profile Send private message
Verlusti
Vehicle Driver


Joined: 03 Nov 2017

PostPosted: Tue Oct 23, 2018 6:13 pm    Post subject: Reply with quote

UPDATE: v0.2 release.

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


DTA Map Assistant 23.10.2018 20_06_41.png
 Description:
 Filesize:  49.03 KB
 Viewed:  607 Time(s)

DTA Map Assistant 23.10.2018 20_06_41.png



dta-map-assist-0.2.zip
 Description:

Download
 Filename:  dta-map-assist-0.2.zip
 Filesize:  7.22 MB
 Downloaded:  2 Time(s)


Back to top
View user's profile Send private message
Bittah Commander
Defense Minister


Joined: 21 May 2003
Location: The Netherlands

PostPosted: Tue Oct 23, 2018 10:28 pm    Post subject: Reply with quote

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

Back to top
View user's profile Send private message Send e-mail ModDB Profile ID YouTube User URL Facebook Profile URL
Verlusti
Vehicle Driver


Joined: 03 Nov 2017

PostPosted: Sat Oct 27, 2018 5:48 pm    Post subject: Reply with quote

UPDATE: Version 0.3

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?


DTA Map Assistant 27.10.2018 19_42_24.png
 Description:
 Filesize:  56.42 KB
 Viewed:  508 Time(s)

DTA Map Assistant 27.10.2018 19_42_24.png



dta-map-assist-0.3.zip
 Description:

Download
 Filename:  dta-map-assist-0.3.zip
 Filesize:  7.22 MB
 Downloaded:  1 Time(s)


Back to top
View user's profile Send private message
^Rampastein
Rampastring


Joined: 11 Oct 2008
Location: Gensokyo

PostPosted: Sun Oct 28, 2018 8:34 pm    Post subject: Reply with quote

Verlusti wrote:
PS: Does anyone how to hide EnemyHouses starting points in launcher for coop maps?


You can try editing [Basic] MaxPlayer=. Although FinalSun probably always changes it back to match the number of starting waypoints on the map, so I might have to add something extra for this in the client.
_________________

Back to top
View user's profile Send private message ModDB Profile ID Facebook Profile URL
Bittah Commander
Defense Minister


Joined: 21 May 2003
Location: The Netherlands

PostPosted: Mon Oct 29, 2018 2:45 pm    Post subject: Reply with quote

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.


dta-map-assist-0.3.png
 Description:
 Filesize:  7.12 KB
 Viewed:  444 Time(s)

dta-map-assist-0.3.png



_________________

Back to top
View user's profile Send private message Send e-mail ModDB Profile ID YouTube User URL Facebook Profile URL
Verlusti
Vehicle Driver


Joined: 03 Nov 2017

PostPosted: Sun Nov 04, 2018 8:20 pm    Post subject: Reply with quote

thanks for your replies, i will fix that when i got some spare time. got a lot of stuff to do on my construction site.

regards

Back to top
View user's profile Send private message
^Rampastein
Rampastring


Joined: 11 Oct 2008
Location: Gensokyo

PostPosted: Wed Nov 07, 2018 9:16 pm    Post subject: Reply with quote

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

Back to top
View user's profile Send private message ModDB Profile ID Facebook Profile URL
Verlusti
Vehicle Driver


Joined: 03 Nov 2017

PostPosted: Fri Nov 09, 2018 9:33 pm    Post subject: Reply with quote

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.

regards

Back to top
View user's profile Send private message
Bittah Commander
Defense Minister


Joined: 21 May 2003
Location: The Netherlands

PostPosted: Sat Nov 10, 2018 7:11 am    Post subject: Reply with quote

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

Back to top
View user's profile Send private message Send e-mail ModDB Profile ID YouTube User URL Facebook Profile URL
E1 Elite
Commander


Joined: 28 May 2013

PostPosted: Sat Nov 10, 2018 8:38 am    Post subject: Reply with quote

In rules.ini, look for [OverlayTypes], reference to overlays uses 0-based index. In DTA, for example IMOV is at 180 index.

Have updated ModEnc for how overlay pack formats are used.

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.

Back to top
View user's profile Send private message
E1 Elite
Commander


Joined: 28 May 2013

PostPosted: Fri Nov 16, 2018 1:09 pm    Post subject: Reply with quote

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

Back to top
View user's profile Send private message
Verlusti
Vehicle Driver


Joined: 03 Nov 2017

PostPosted: Yesterday, at 4:41 pm    Post subject: Reply with quote

awesome i'll look at that. thank you.

still redesigning map assist to fully deserialize maps into objects and creating widgets for easy gui design.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [23 Posts] View previous topic :: View next topic
 Forum index » Featured Projects » Dawn of the Tiberium Age » Maps
Jump to:  
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
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


Powered by phpBB © phpBB Group

Wildcard SSL Certificates
[ Time: 0.1504s ][ Queries: 19 (0.0073s) ][ Debug on ]