OpenXcom Forum

Modding => Work In Progress => Topic started by: HelmetHair on September 12, 2016, 04:51:06 am

Title: regions within regions?
Post by: HelmetHair on September 12, 2016, 04:51:06 am
on the geoscape can you define a region with a region?

and if so what are the limitations?
Title: Re: regions within regions?
Post by: Meridian on September 12, 2016, 10:08:33 am
Not exactly sure what you mean.
Why would you need that?

You can define a region within a region... but the game silently assumes (on several places in the code) there is only one region at a given location... so I wouldn't recommend it.
Title: Re: regions within regions?
Post by: Hobbes on September 12, 2016, 03:23:10 pm
on the geoscape can you define a region with a region?

and if so what are the limitations?

No. Each region needs to have its separate entry
Title: Re: regions within regions?
Post by: Meridian on September 12, 2016, 04:01:39 pm
No. Each region needs to have its separate entry

Well, that's not a contradiction... and a reason I asked for more details.
You can define region "Europe" and region "France" in separate entries, and still have them be "drawn" inside of one another.
Title: Re: regions within regions?
Post by: Hobbes on September 12, 2016, 04:14:37 pm
You can define region "Europe" and region "France" in separate entries, and still have them be "drawn" inside of one another.

When the game is assigning XCOM/Alien activity to regions it checks the location of the craft/UFO and the region to which it corresponds. Since on this case there are two regions, the usual procedure of rulesets is that it only loads the last region entry and assigns it the activity score. 
Title: Re: regions within regions?
Post by: Meridian on September 12, 2016, 04:37:43 pm
Yes, I agree, with a little correction that the ruleset is loaded, it's just not used/considered by algorithms that assume non-overlapping regions.
And there are several places like that, as I said in my first reply (e.g. one retaliation per region)...

... just saying you can define them, and it will cause all sorts of small problems.

And that's why I am asking what does HH need it for...
Title: Re: regions within regions?
Post by: Solarius Scorch on September 12, 2016, 07:15:25 pm
... just saying you can define them, and it will cause all sorts of small problems.

What kind of problems do you mean? As we know, defining a "region within region" is fine if they're points, like cities. Is the some middle ground to be careful about?
Title: Re: regions within regions?
Post by: Meridian on September 12, 2016, 07:24:16 pm
I talk about regions, not cities.

(https://www.ufopaedia.org/images/b/bd/WorldMap_RegionalZones_Ufo.png)
Title: Re: regions within regions?
Post by: Solarius Scorch on September 12, 2016, 07:57:34 pm
But cities are a region too. So are other spawned missions in mods.
I thought it didn't matter to the engine if it's a region with a surface or a region composed of dots. If I'm wrong and it could cause problems, I'd like to know. :)
Title: Re: regions within regions?
Post by: Meridian on September 12, 2016, 08:40:51 pm
But cities are a region too. So are other spawned missions in mods.
I thought it didn't matter to the engine if it's a region with a surface or a region composed of dots. If I'm wrong and it could cause problems, I'd like to know. :)

I haven't seen any "cities as regions" in piratez, didn't check x-files... would you have an example?
Title: Re: regions within regions?
Post by: Solarius Scorch on September 12, 2016, 08:52:44 pm
Sure, this from X-Com Files:

Code: [Select]
  - type: REGION_MONSTERS_HUNT_SINGLE_JUNGLE
    missionZones:
      -
#SOUTHERN AFRICA
        - [14.9, 14.9, 3.1, 3.1, -101]
        - [38.88, 38.88, 9.77, 9.77, -101]
        - [47.57, 47.57, 15.73, 15.73, -101]
        - [35.35, 35.35, 14.28, 14.28, -101]
        - [5.4, 5.4, -5.7, -5.7, -101] # Kurast w Nigerii
#NORTH AMERICA
        - [268.5, 268.5, -29.63, -29.63, -101]
#SOUTH AMERICA
        - [296, 296, 6.5, 6.5, -101]
        - [298, 298, 21, 21, -101]
#CENTRAL ASIA
        - [77, 77, -24, -24, -101]
        - [80, 80, -18, -18, -101]
        - [80.8, 80.8, -7.9, -7.9, -101]

It's a region, no?

It's the same with vanilla terror in cities, only that the coordinates also have names there.
Title: Re: regions within regions?
Post by: Meridian on September 12, 2016, 09:04:31 pm
But this region is completely empty (doesn't even have any "dots").
The "mission zones" don't count towards "areas".

And an empty region will not conflict with non-empty regions... so you're safe.
Or in other words, empty regions will be completely excluded from region-related functionality... like scoring, etc.
Title: Re: regions within regions?
Post by: Solarius Scorch on September 12, 2016, 09:41:05 pm
All right, thanks!
Title: Re: regions within regions?
Post by: Hobbes on September 12, 2016, 10:13:03 pm
Or in other words, empty regions will be completely excluded from region-related functionality... like scoring, etc.

To clarify, regions without areas defined will be completely excluded from scoring
Title: Re: regions within regions?
Post by: HelmetHair on September 13, 2016, 06:24:36 pm
Cool

thanks
Title: Re: regions within regions?
Post by: Meridian on September 13, 2016, 06:49:06 pm
Just like that?
Won't you tell us what you're planning to do with it?
Title: Re: regions within regions?
Post by: HelmetHair on September 14, 2016, 05:44:44 pm
Ha!

I could leave you hanging, but I won't...

I'm working on something a touch different. I'll try to explain, but I'm not ready for the big reveal.

So I don't want to alter the countries that are visible on the map but give the impression of members of a criminal syndicate within a region reporting activity. In some instances you would have areas that are contested with two or more parties interested in warring against one another but not an outside force...  so frenemies.

Like right now in reality in the south China Sea where you sometimes have 3 countries disputing a territorial claim and lets pretend we had an alien attack in that area and blustery politics means that you would get more points for responding to these types of missions.

Another scenario is observer confusion... so ee could also look at it like this... so let's say you have a ufo that that Flys along the Bosphorus on the European side. Could observers be able to identify at range that it was on the European side or Asian side? I'd say that it's close enough to count for both.

thoughts?

I know this is weird, but since their is no mission spawning, as far as I understood it in overlapping regions... it's a touch moot.... unless I misunderstood.
Title: Re: regions within regions?
Post by: Solarius Scorch on September 14, 2016, 07:55:33 pm
That's a pretty nice idea. Exciting even.

But I think if area regions aren't possible, it would work well enough with pre-defined locations, if there are enough points defined.
Title: Re: regions within regions?
Post by: Hobbes on September 14, 2016, 11:29:59 pm
Like right now in reality in the south China Sea where you sometimes have 3 countries disputing a territorial claim and lets pretend we had an alien attack in that area and blustery politics means that you would get more points for responding to these types of missions.

Another scenario is observer confusion... so ee could also look at it like this... so let's say you have a ufo that that Flys along the Bosphorus on the European side. Could observers be able to identify at range that it was on the European side or Asian side? I'd say that it's close enough to count for both.

thoughts?

I know this is weird, but since their is no mission spawning, as far as I understood it in overlapping regions... it's a touch moot.... unless I misunderstood.

There are already a few vanilla countries that fit this description. While the Geoscape displays the correct US-Canada border, in reality in some areas like the Great Lakes both countries have areas overlapping. So any Alien/XCOM activity there will be counted both for the US and Canada

The areas of the countries are only used for scoring/funding proposes. Regions are used for spawning alien missions and you can basically spawn everything you want in any place on the globe.

EDIT: Just to further my last point, you could have 3 different factions, like the PRC, Vietnam and Philippines and each have their own missions over the South China Sea. The main issue with this idea would be that they would all generate negative score for the player, even from Chinese craft overflying the PRC's territory, or you could set flyovers to generate no score at all, but that would go against your original idea.