aliens

Author Topic: OXCE (OpenXcom Extended) main thread  (Read 441016 times)

Offline krautbernd

  • Commander
  • *****
  • Posts: 1116
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #255 on: August 09, 2019, 12:41:36 am »
I could have sworn i read something about a new feature referencing content from other mods inside your own mod, but for the life of me i can't find that post. Am i misremembering this?

Offline mercy

  • Colonel
  • ****
  • Posts: 338
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #256 on: August 09, 2019, 11:40:38 am »
Panic Message PopUp Timeout:

Is there an INI variable that can be changed to reduce the on-screen time of panic message popups? "XY has Panicked / Gone Berserk"

Online Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 8578
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #257 on: August 09, 2019, 08:41:52 pm »
I could have sworn i read something about a new feature referencing content from other mods inside your own mod, but for the life of me i can't find that post. Am i misremembering this?

https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)#Negative_indices_and_cross-referencing_other_mods

Panic Message PopUp Timeout:

Is there an INI variable that can be changed to reduce the on-screen time of panic message popups? "XY has Panicked / Gone Berserk"

No, it's hardcoded: https://github.com/OpenXcom/OpenXcom/blob/master/src/Battlescape/InfoboxState.h#L39

But you can press any key or any mouse button to close it.

Offline mercy

  • Colonel
  • ****
  • Posts: 338
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #258 on: August 10, 2019, 12:41:01 am »
https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)#Negative_indices_and_cross-referencing_other_mods

No, it's hardcoded: https://github.com/OpenXcom/OpenXcom/blob/master/src/Battlescape/InfoboxState.h#L39

But you can press any key or any mouse button to close it.

Thank You. I would change the code and place a PanicMessageDisplayTime  variable into  options.cfg.


Online Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 8578
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #260 on: August 10, 2019, 01:11:17 am »
Ah yeah, only for sprites - that's the part i forgot. Thanks  :)

Well, everything else you could reference already before.
What do you have in mind?

Offline krautbernd

  • Commander
  • *****
  • Posts: 1116
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #261 on: August 10, 2019, 07:44:37 am »
Well, everything else you could reference already before.
What do you have in mind?
The problem I currently have is that I have some submods for OXCF. One of them introduces new soldier types, among other things. These soldiers are supposed to use the same armor types as the regular ones. Right now I have to add armor defintions (i.e. which armors they are allowed to use, and the default armors for some special map/mission types) every time the mod introduces new armors.

If possible i'd prefer to re-use the existing armor definitions, but simply add my soldier type(s) to the list of units - i.e replace
Code: [Select]
    units:
      - STR_SOLDIER

with

Code: [Select]
    units:
      - STR_SOLDIER
      - STR_CUSTOM_SOLDIER

Yes, i can do that manually on every release, but it's not what i'd call elegant. I either have to include all of the original armor definitions and search&replace the entries, or i can sift through the original definations and copy&paste the new ones into my own definition rul. Either way the mod needs to be updated by hand. If i had a way to reference the entries the mod would work work with new releases without having to be updated.

I'm not sure this is even possible using YAML.

Online Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 8578
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #262 on: August 10, 2019, 10:19:52 am »
There is no easy way for the game to know if you intend to replace list entries or only add to the list entries... so current modding system assumes you intend to replace.

Offline krautbernd

  • Commander
  • *****
  • Posts: 1116
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #263 on: August 10, 2019, 11:01:39 am »
There is no easy way for the game to know if you intend to replace list entries or only add to the list entries... so current modding system assumes you intend to replace.
I'm not sure if i follow, but why would that be a problem?

Online Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 8578
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #264 on: August 10, 2019, 11:59:21 am »
Let's say vanilla research is:

Code: [Select]
research:
  - name: STR_PSI_AMP
    dependencies:
      - STR_PSI_LAB

and your mod is:

Code: [Select]
research:
  - name: STR_PSI_AMP
    dependencies:
      - STR_SUNFLOWER

How should the game know if you meant the final result to be:

Code: [Select]
research:
  - name: STR_PSI_AMP
    dependencies:
      - STR_SUNFLOWER

or

Code: [Select]
research:
  - name: STR_PSI_AMP
    dependencies:
      - STR_PSI_LAB
      - STR_SUNFLOWER

Offline krautbernd

  • Commander
  • *****
  • Posts: 1116
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #265 on: August 10, 2019, 12:06:45 pm »
Like i said in my initial post, i just want to replace the whole list. I don't necessarily need to 'add' the soldier type - i can simply replace the list with STR_SOLDIER + STR_CUSTOM_SOLDIER. That's not the problem i'm running into.

My question is how would go on referencing all entries containing STR_SOLDIER in the unit list without having to sort through them by hand every time a new armor gets added. And as far as i can tell that's not really trivial. What i want to do is copy all armor entries from one soldier/unit to another (or rather the other way around, seeing how armor is handled), without having to actually copy&paste all entries by hand. Something like "if this armor supports soldier_type_x, it should also support soldier_type_y".
« Last Edit: August 10, 2019, 12:11:27 pm by krautbernd »

Online Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 8578
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #266 on: August 10, 2019, 12:32:28 pm »
Like i said in my initial post, i just want to replace the whole list. I don't necessarily need to 'add' the soldier type - i can simply replace the list with STR_SOLDIER + STR_CUSTOM_SOLDIER. That's not the problem i'm running into.

You CAN simply replace one with another... what I am reading is that you don't want to do it simply... instead you want to do it with some supercomplicated logic so that the game does it AUTOMAGICALLY for you.

What i want to do is copy all armor entries from one soldier/unit to another (or rather the other way around, seeing how armor is handled), without having to actually copy&paste all entries by hand.

When you mod, everything existing is copypasted without you having to copypaste it.

Something like "if this armor supports soldier_type_x, it should also support soldier_type_y".

But that's not copypasting.
That's adding support for automated replacement of old values with new values based on your defined rules.
Nothing like that exists... especially not if you want it to be a global rule, i.e. not having to define a rule on each entity (e.g. on each armor or each soldier).

Even simpler example:
Rules like "change all weapons with power 50 to power 60" are NOT available.

Offline davide

  • Commander
  • *****
  • Posts: 565
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #267 on: August 10, 2019, 12:36:27 pm »
There is no easy way for the game to know if you intend to replace list entries or only add to the list entries... so current modding system assumes you intend to replace.

There are others case of this behavior that must be maintained as default.

The wish is to add some contents to a huge master mod, as example I would like to add some variant of a battleship to Area51 mod:

Code: [Select]
  - type: STR_BATTLESHIP
    size: STR_VERY_LARGE
    sprite: 6
    damageMax: 3200
    speedMax: 5000
    radarRange: 1000
    accel: 6
    power: 148
    range: 65
    score: 700
    reload: 24
    breakOffTime: 4000
    battlescapeTerrainData:
      name: UFO_160
      mapDataSets:
        - BLANKS
        - U_EXT02
        - U_WALL02
        - U_PODS
        - U_BITS
      mapBlocks:
        - name: UFO_160
          width: 30
          length: 30

I found in the forum  a mod with this rule:

Code: [Select]
ufos:
  - type: STR_BATTLESHIP
    size: STR_VERY_LARGE
    sprite: 6
    damageMax: 3000
    speedMax: 5000
    accel: 6
    power: 140
    range: 65
    score: 700
    reload: 24
    breakOffTime: 4000
    battlescapeTerrainData:
      name: UFO_160
      mapDataSets:
        - BLANKS
        - U_EXT02
        - U_WALL02
        - U_PODS
        - U_BITS
        - UFOL83
      mapBlocks:
        - name: UFO_BS1
          width: 30
          length: 30
        - name: UFO_BS2
          width: 30
          length: 30
        - name: UFO_BS3
          width: 30
          length: 30
        - name: UFO_BS4
          width: 30
          length: 30
        - name: UFO_BS5
          width: 30
          length: 30

If I add them as a sub mod  I "loose" the original UFO_160.map and the objects attributes of the master mod.

I would love to do so:

Code: [Select]
add_ufos_block:
  - type: STR_BATTLESHIP
      mapDataSets:
         - UFOL83
      mapBlocks:
        - name: UFO_BS1
          width: 30
          length: 30
        - name: UFO_BS2
          width: 30
          length: 30
        - name: UFO_BS3
          width: 30
          length: 30
        - name: UFO_BS4
          width: 30
          length: 30
        - name: UFO_BS5
          width: 30
          length: 30

It could be usefull for all objects with a list of map blocks, such as terrains.

Online Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 8578
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #268 on: August 10, 2019, 12:43:02 pm »
It could be usefull for all objects with a list of map blocks, such as terrains.

See attribute "addOnly": https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)#Terrains

Offline krautbernd

  • Commander
  • *****
  • Posts: 1116
    • View Profile
Re: OXCE (OpenXcom Extended) main thread
« Reply #269 on: August 10, 2019, 01:00:42 pm »
You CAN simply replace one with another... what I am reading is that you don't want to do it simply... instead you want to do it with some supercomplicated logic so that the game does it AUTOMAGICALLY for you.
To be fair, you asked me what i had in mind. I also wouldn't call it 'automagically' - what i'm looking for is a way to inherit armor types (or soldiers types).

When you mod, everything existing is copypasted without you having to copypaste it.

Yes, but in order to actually modify stuff i have to copy and paste it. There is no simple way to add a new soldier type that references existing soldier types in regards to what armor it is able to use. I have to replace each unit list of every armor that soldier type is supposed to use. Why can't we simply reference an existing soldier type? Something like

Code: [Select]
soldiers:
  - type: STR_CUSTOM_SOLDIER
     [Stats...]
    armor: STR_SUIT_UC
    armorForAvatar: STR_SUIT_UC
    armorRef: STR_SOLDIER

And the game would allow that unit to use all armors that contain STR_SOLDIER in their unit list. But i guess that would fall under the 'global replace' rule?
« Last Edit: August 10, 2019, 01:02:44 pm by krautbernd »