OpenXcom Forum

Modding => OpenXcom Extended => OXCE Suggestions DONE => Topic started by: Nord on July 17, 2018, 10:21:05 am

Title: [DONE] [Suggestion] Changing alien base deployment by time passed
Post by: Nord on July 17, 2018, 10:21:05 am
I have a request for my new mod idea:
Changing alien base deployment by time passed.
E.g. by the end of month.
So if you leave base untouched, it can develop and grow.

I can now create new bases with new deployments based on current month, but what i want - is to allow old bases to grow.
Title: Re: Suggestion/request: Changing alien base deployment by time passed
Post by: Meridian on July 17, 2018, 10:31:09 am
Seems nice.
Todolisted.
Title: Re: [Suggestion] Changing alien base deployment by time passed
Post by: Solarius Scorch on July 17, 2018, 02:00:40 pm
Very nice indeed. But what exactly would grow? I understand the base size and the number of enemies, but anything else? (Defensive UFOs maybe, if they are coded? I don't really have any ideas.)
Title: Re: [Suggestion] Changing alien base deployment by time passed
Post by: Meridian on July 17, 2018, 02:22:05 pm
Anything deployment related.

PS: Defensive UFOs are already able to change over time.
Title: Re: [Suggestion] Changing alien base deployment by time passed
Post by: Hobbes on July 18, 2018, 12:44:22 am
Me likes this!
Title: Re: [Suggestion] Changing alien base deployment by time passed
Post by: ohartenstein23 on July 18, 2018, 12:58:40 am
I'd be interested in this too. Can I add to this the option to tie map generation RNG to a seed based on mission latitude and longitude, like I did for base defense missions? That way, if you go to a base multiple times, it could look the same instead of complete remodeling every time.
Title: Re: [DONE] [Suggestion] Changing alien base deployment by time passed
Post by: Meridian on October 04, 2018, 03:23:15 pm
Done.
Alien bases can now upgrade their deployment, after the first game month... and based on their current age in months.

Ruleset example:

Code: [Select]
alienDeployments:
  - type: STR_ALIEN_BASE_ASSAULT
    alienBaseUpgrades:
      0:
        STR_ALIEN_BASE_ASSAULT: 100
      3:
        STR_ALIEN_BASE_ASSAULT_OLDBASE_1: 50
        STR_ALIEN_BASE_ASSAULT_OLDBASE_2: 50
      6:
        STR_ALIEN_BASE_ASSAULT_VERYOLDBASE: 100

Change happens once every month, for each alien base separately.

Affected:
 - alien battlescape deployment
 - starting conditions
 - base detection range
 - base hunt missions type and frequency
 - base supply mission type and frequency
 - geoscape scoring
 - base's saving/loading ID (depends on markerName, see disclaimer)

Not affected:
 - counter of generated supply missions
 - alien race
 - corresponding infiltrated country

DISCLAIMER:
All upgrades (deployments) must use the same "markerName" as the original deployment!
Otherwise weird shit will happpen... you've been warned.
Title: Re: [DONE] [Suggestion] Changing alien base deployment by time passed
Post by: Nord on October 04, 2018, 03:28:00 pm
Wonderful.
But what is used: current base age in months or global months?
Title: Re: [DONE] [Suggestion] Changing alien base deployment by time passed
Post by: Meridian on October 04, 2018, 03:31:05 pm
Wonderful.
But what is used: current base age in months or global months?

Global number of game months... is that OK?
Title: Re: [DONE] [Suggestion] Changing alien base deployment by time passed
Post by: Nord on October 04, 2018, 04:00:51 pm
Global number of game months... is that OK?
Well, i think that count age of each base is far more complicate to do, so global months should be just fine.
Title: Re: [DONE] [Suggestion] Changing alien base deployment by time passed
Post by: Solarius Scorch on October 04, 2018, 04:08:53 pm
Global number of game months... is that OK?

But if the idea is to make the base grow over time, then it should be based on the base age, not campaign age, no?
If I am mistaken and it's actually not about base age, then sorry in advance.
Title: Re: [DONE] [Suggestion] Changing alien base deployment by time passed
Post by: Meridian on October 04, 2018, 04:26:08 pm
I don't care, both are doable... let me know.
Title: Re: [DONE] [Suggestion] Changing alien base deployment by time passed
Post by: Nord on October 04, 2018, 04:59:47 pm
I don't care, both are doable... let me know.
If it is not too hard, base age will be better.
Thanks.  :)
Title: Re: [DONE] [Suggestion] Changing alien base deployment by time passed
Post by: Meridian on October 04, 2018, 07:13:17 pm
If it is not too hard, base age will be better.
Thanks.  :)

Done.

Base age (in months) is calculated as current game month minus month when the base spawned.

So if the base spawned on 31.1.2000 and it is now 2.2.2000, the base is 1 month old.

PS: month when the base was discovered is irrelevant
Title: Re: [DONE] [Suggestion] Changing alien base deployment by time passed
Post by: Nord on October 04, 2018, 08:11:21 pm
Done.

Base age (in months) is calculated as current game month minus month when the base spawned.

Great!
The syntaxis has been not changed?
Title: Re: [DONE] [Suggestion] Changing alien base deployment by time passed
Post by: Meridian on October 04, 2018, 08:24:16 pm
Great!
The syntaxis has been not changed?

No change, syntax is still the same.
Title: Re: [DONE] [Suggestion] Changing alien base deployment by time passed
Post by: robin on October 05, 2018, 12:42:24 am
nooOOOoooo stop adding good features i absolutely must use!
 :P
thanks for adding it.

Title: Re: [DONE] [Suggestion] Changing alien base deployment by time passed
Post by: davide on October 05, 2018, 09:56:30 pm
nooOOOoooo stop adding good features i absolutely must use!
 :P
thanks for adding it.

....It is a double strike!! ;D
Title: Re: [DONE] [Suggestion] Changing alien base deployment by time passed
Post by: robin on November 01, 2018, 11:38:20 am
Question: do I need to add the progression to every deployment in the chain, or only to the first one?

example A:
Code: [Select]
  - type: STR_BASE_0
    alienBaseUpgrades:
      0:
        STR_BASE_0: 100
      1:
        STR_BASE_1: 100
    data:
      ...

  - type: STR_BASE_1
    alienBaseUpgrades:
      0:
        STR_BASE_1: 100
    data:
      ...

example B:
Code: [Select]
  - type: STR_BASE_0
    alienBaseUpgrades:
      0:
        STR_BASE_0: 100
      1:
        STR_BASE_1: 100
    data:
      ...

  - type: STR_BASE_1
    data:
      ...

Title: Re: [DONE] [Suggestion] Changing alien base deployment by time passed
Post by: Meridian on November 01, 2018, 02:40:28 pm
That's a damn good question... I wanted to implement B (only first one), but I have implemented A (every deployment in the chain).

I can change that easily... but before I do... which one would you prefer?
Title: Re: [DONE] [Suggestion] Changing alien base deployment by time passed
Post by: robin on November 01, 2018, 03:18:58 pm
I think after all that A is better.
The reason is that, in the mission scripts, you can make the chain start from an advanced point, as the game progresses, and it will still upgrade from there.
Example:
Code: [Select]
missionScripts:
  - type: alienBase
    missionWeights:
      0:
        STR_BASE0: 100
      2:
        STR_BASE1: 100
      4:
        STR_BASE2: 100

alienDeployments:
  - type: STR_BASE_2
    alienBaseUpgrades:
      0:
        STR_BASE_2: 100
      2:
        STR_BASE_3: 100
    data:
      ...

From month 4 missionScripts spawns BASE_2 bases directly, but the progression to BASE_3 still happens because it is directly defined for BASE_2; if the upgrades were defined only on BASE_0, I guess the progression wouldn't happen if you start from BASE_2.
Sure there is some duplicate data, but it matters little.


Title: Re: [DONE] [Suggestion] Changing alien base deployment by time passed
Post by: Nord on April 19, 2020, 05:52:58 am
Please, point me to the right syntax.
How is correct:
  - type: STR_ALIEN_NEST_1
...
    alienBaseUpgrades:
      0:
        STR_ALIEN_NEST_1: 100
      2:
        STR_ALIEN_NEST_2: 100
      4:
        STR_ALIEN_NEST_3: 100

  - type: STR_ALIEN_NEST_2
...
    alienBaseUpgrades:
      0:
        STR_ALIEN_NEST_1: 100
      2:
        STR_ALIEN_NEST_2: 100
      4:
        STR_ALIEN_NEST_3: 100
or

  - type: STR_ALIEN_NEST_1
...
    alienBaseUpgrades:
      0:
        STR_ALIEN_NEST_1: 100
      2:
        STR_ALIEN_NEST_2: 100

  - type: STR_ALIEN_NEST_2
...
    alienBaseUpgrades:
      0:
        STR_ALIEN_NEST_2: 100
      2:
        STR_ALIEN_NEST_3: 100
Thanks.
Title: Re: [DONE] [Suggestion] Changing alien base deployment by time passed
Post by: Thermite on April 19, 2020, 05:42:40 pm
Would this be available as a default (the mods that come with the install on the standard folder) mod?
Title: Re: [DONE] [Suggestion] Changing alien base deployment by time passed
Post by: ohartenstein23 on April 19, 2020, 07:36:26 pm
Would this be available as a default (the mods that come with the install on the standard folder) mod?

No. The standard folder is only for recreating the original game and the UFOExtender/XComUtil features. Any features OXCE adds will have to be activated by a mod in the users folder. In other words, almost nothing in OXCE is activated "by default".
Title: Re: [DONE] [Suggestion] Changing alien base deployment by time passed
Post by: Thermite on April 21, 2020, 02:31:40 pm
No. The standard folder is only for recreating the original game and the UFOExtender/XComUtil features. Any features OXCE adds will have to be activated by a mod in the users folder. In other words, almost nothing in OXCE is activated "by default".

I see...
Thanks
Title: Re: [DONE] [Suggestion] Changing alien base deployment by time passed
Post by: Meridian on May 05, 2020, 11:00:44 am
Please, point me to the right syntax.

Syntactically, both are correct.

Semantically, the first option is better IMO.
But I would even suggest a third option (to prevent accidental downgrade back to STR_ALIEN_NEST_1 in case you make it more complicated):

Code: [Select]
  - type: STR_ALIEN_NEST_1
...
    alienBaseUpgrades:
      0:
        STR_ALIEN_NEST_1: 100
      2:
        STR_ALIEN_NEST_2: 100
      4:
        STR_ALIEN_NEST_3: 100

  - type: STR_ALIEN_NEST_2
...
    alienBaseUpgrades:
      0:
        STR_ALIEN_NEST_2: 100
      4:
        STR_ALIEN_NEST_3: 100

The number of months is always "since the creation of the original base"... when upgrading a base, its age does NOT reset back to zero months.
Title: Re: [DONE] [Suggestion] Changing alien base deployment by time passed
Post by: Nord on May 05, 2020, 01:52:18 pm
The number of months is always "since the creation of the original base"... when upgrading a base, its age does NOT reset back to zero months.
This is a key, thanks.
Title: Re: [DONE] [Suggestion] Changing alien base deployment by time passed
Post by: Meridian on December 30, 2021, 11:00:01 am
Since OXCE 7.3 it is possible to reset the base age when upgrading.

Let's assume you are upgrading an alien base with deployment type A into deployment B.

To reset the base age, you have two options:
1. set `resetAlienBaseAgeAfterUpgrade: true` on deployment A
2. or set `resetAlienBaseAge: true` on deployment B
Title: Re: [DONE] [Suggestion] Changing alien base deployment by time passed
Post by: Meridian on January 21, 2022, 03:31:00 pm
Since OXCE 7.4.4 it is possible to change the race of an alien base during the upgrade.

Attribute `upgradeRace`

Example:

Code: [Select]
alienDeployments:
  - type: STR_ALIEN_BASE_OLD
    alienBaseUpgrades:
      0:
        STR_ALIEN_BASE_OLD: 100
      3:
        STR_ALIEN_BASE_NEW_MUTONS: 100

Code: [Select]
alienDeployments:
  - type: STR_ALIEN_BASE_NEW_MUTONS
    upgradeRace: STR_MUTON