OpenXcom Forum
OpenXcom Forks => OpenXcom Extended (OXCE) => OXCE Support => Topic started by: wcho035 on March 02, 2020, 09:45:12 am
-
Proposition- The generation of Battlescape map size, can be allow to be done in a global variable sort of way for Mapscript instead of Aliendeployment alone. When I mean global Variable sort of way, I mean Mapscript have priority, in deciding the size of the Battlescape map, before Aliendeployment.
Justification-When a UFO crash in a texture, it is their Alien deployment that decide the size of the battlescape map. A small scout can forever crash in a small or certain size map decide upon by its aliendeployment.
If Mapscript can decide upon the Length and width of a battlescape mission map, we can allow random map size for a ufo missionsite or crashsite.
For example, if we have 3 mapscript
One for a Desert Town with
width: 50
length: 50
One for a Desert City with
width: 120
length: 120
One for a Desert volcano with
width: 40
length: 50
Say in the same texture id say 5.
If the ufo crashes in texture id 5, it could use either the town, city or volcano mapscript with varying and unpredictable mapsizes.
The true purpose of my request, is to allow random cities or towns assigned to the texture ID, this allow for town and cities crash sites with varying battlescape map size, instead of solely depending on the Aliendeployment from the ufo.
I am hoping some Terrain Modders who love making terrains and maps to pick up on this idea. Perhaps someone can code it.
-
Use the mapScript command "resize".
mapScripts:
- type: DESERTCITY
commands:
- type: resize
size: [12, 12, 4] # sets size to 120×120×4
-
Wow. The things a mapScript can do... Colour me impressed.
-
Wow nice. So if I am to assume. size: [12, 12, 4] translate as [L, W, H] ? This will override the Length and width in Aliendeployment? Confirm?
-
Yes, but it's [x, y, z] or [width, length, height].
And yes it overrides the deployment to setting it to the specified size, but it has to be done before any blocks are added by the script.
-
Thanks again, Ohartenstien23, if you can also help with my other question about blank terrain. I am most grateful. Thank you.
-
Regreatfully Ohartenstien23, your solution didn't meet the objective of this request. The size only works for per block, not the whole battlescape map. Anyway, I would keep this request open.
-
Regreatfully Ohartenstien23, your solution didn't meet the objective of this request. The size only works for per block, not the whole battlescape map. Anyway, I would keep this request open.
That is false.
The resize mapscript command can only resize the entire map, it cannot resize blocks.
-
Okay, again, I am not good with certain words.
Map = Physical map + Routes. <--- This is what I mean by block, like
- type: addBlock
size: [2,2,5]
execution: 2
terrain: globeTerrain
so the definition of Block in this case here is = whole battlescape mission maps?
So block and addblock, perhaps two different terminology? So I am confused here.
-
"addBlock" command works with blocks (=the small building blocks that together make a map)
"resize" command works with the whole map, not with blocks
-
It is unfortunate that mapblock files have the extension .map. It adds to confusion, because a map is generally understood to be the entire battlescape area, not just one block.
I would personally prefer to avoid using the word "map" in non-casual conversations (like documentation), but the nomenclature is not really there yet. The smaller parts can be called blocks or mapblocks without any problem, but what about the whole thing? A battlescape? I don't know.
-
So not the whole battlescape map, when I mean map like the WHOLE mission map, including UFO, Craft buildings and other maps.. geezz got to work on my definitions here.
-
So not the whole battlescape map, when I mean map like the WHOLE mission map, including UFO, Craft buildings and other maps.. geezz got to work on my definitions here.
yes, the "resize" command affects the whole battlescape map = the whole mission map including UFO, Craft and everything else.
-
I finally understood now. Thank you. Got confused with size and resize.
-
So for example the code should look like
- type: DESERTTOWNSCRIPT
commands:
- type: resize
size: [20, 20, 9]
- type: addUFO
groups: 1
- type: addCraft
groups: 1
- type: addBlock
size: [1,1,4]
verticalLevels:
- type: ground
size: [1,1,0]
groups: 1
- type: middle
size: [1,1,4]
executionChances: 5
terrain: PORT6
- type: addBlock
size: 2
execution: 2
- type: fillArea
-
I can confirm it worked beautifully. This request is now void. Thank you guys.