OpenXcom Forum
OpenXcom Forks => OpenXcom Extended (OXCE) => OXCE Suggestions DONE => Topic started by: Finnik on January 06, 2020, 07:55:35 pm
-
We are making rather complicated terrain with roads moved to different terrain, so we add them with mapscript like that:
- type: addLine
label: 100
terrain: URBAN_ROADS
direction: vertical
We have a lot of interesting ideas for the roads - highways, railroads, etc, but we can't mix different type of roads into one terrain. So we need one terrain for ground roads, one for highway, and if we want to make crossroads with different type of roads - railroad under the highway, we need separate terrain for any possible combination, in order to make sure that addLine command will choose blocks of only one needed type per line. So, it would be very practical for mod developing to have an option to choose groups for addLine.
-
I wholeheartedly support this idea in the name of free road/highway intersections.
-
Seems to be trivial to add.
in BattlescapeGenerator::addLine()
How about you try locally and PR it when tested and working...
-
I think it would be easy to add, but there's the difficulty of how it should handle an addLine with "direction: both" - should the group(s) you defined be applied to the vertical part of the line, the horizontal part of the line, or the crossing part?
-
I think it would be easy to add, but there's the difficulty of how it should handle an addLine with "direction: both" - should the group(s) you defined be applied to the vertical part of the line, the horizontal part of the line, or the crossing part?
You need to send 3 parameters in such case (direction both), 1 for each group.
In other cases (direction vertical or horizontal), you need to send 2 parameters (one for direction group and one for crossing group).
-
https://github.com/MeridianOXC/OpenXcom/pull/33
I hoped I will manage to make its step size moddable (not hardcoded 10) but for now no visible progress on that. sample mod for testing is attached.
btw, I noticed that lines tend to stick to lower boundaries, but it can't see if my code affects that.
-
I remember a very old outdated thread about multi-line map design:
https://openxcom.org/forum/index.php/topic,2934.0.html (https://openxcom.org/forum/index.php/topic,2934.0.html)
Original "Siberia" terrain from ufo2k (cross-line)
(https://openxcom.org/forum/index.php?action=dlattach;topic=2934.0;attach=30981;image)
and "normandy" terrain from ufo2k (parallel ordered line)
(https://openxcom.org/forum/index.php?action=dlattach;topic=2934.0;attach=27866;image)
-
For Normandy, I'd use regular addBlock as it is very limited with rects, but can use 20x20 blocks. As every line is solid defined with rects I see no big difference. But for things with several lines that should be mixed it could be handy
-
https://github.com/MeridianOXC/OpenXcom/pull/33
Merged.