aliens

Author Topic: Bladum's ideas compilation  (Read 15689 times)

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9098
    • View Profile
Re: Bladum's ideas
« Reply #15 on: October 31, 2016, 02:41:58 pm »
15) Oh Gollop, yes. This is something we've felt is a big problem from the start. It would allow to the player to choose if s/he wants a psionic helmet, or a night vision helmet, for example. Or either a jetpack or a normal backpack (no item, just standard inventory space). It would add a neat new tactical layer, and it is how things work in some pretty much all other tactical games. I repeat: this is something I've been agonizing over since I've started modding X-Com.

Although I personally feel there is absolutely no problem at all, I don't like to see people in agonizing pain.
Consider it an early Christmas present.

Btw.
- psionic helmet doesn't exist (if I am not mistaken)
- night vision helmet exists only if you understand Yankes' script magic
- jetpack doesn't exist either

So, good luck.

EDIT: PS: works if you are equipping items in the inventory (drag&drop and also ctrl+click)... auto-equip however ignores it... hopefully that won't be a problem. If yes, post some example saves please.

Code: [Select]
items:
  - type: STR_ELECTRO_FLARE
# Empty list means all sections are supported, STR_GROUND is also always supported (even if not listed)
    supportedInventorySections:
      - STR_LEFT_HAND
      - STR_RIGHT_HAND
extraStrings:
  - type: en-US
    strings:
      STR_CANNOT_PLACE_ITEM_INTO_THIS_SECTION: "It's not allowed to place that item there.{NEWLINE}Don't ask why!"
« Last Edit: October 31, 2016, 07:39:09 pm by Meridian »

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11728
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Bladum's ideas compilation
« Reply #16 on: October 31, 2016, 03:35:16 pm »
Meridian, thank you for such a gift! And if all goes well, the players will also get a Christmas present in the form of revamped armour mechanics. :)

I guess we should start pestering Yankes for help right now... :)

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9098
    • View Profile
Re: Bladum's ideas
« Reply #17 on: October 31, 2016, 04:21:57 pm »
Meridian, thank you for such a gift! And if all goes well, the players will also get a Christmas present in the form of revamped armour mechanics. :)

I guess we should start pestering Yankes for help right now... :)

Well, enjoy. I just hope you know what you're doing.

This is partially done already, this is question of when I add script in interesting places. Closest thing I plan to add is script weapon damage and defense, but this will be after nightly merge.

Yeah, the word interesting is the key here.
I've looked at it too and I could add some properties to items quite easily. Some not so easily.

Also, there's a question of when should stats update... immediately after equipping? ...or next turn? ...or just once per battle?

Imagine, there is a "Ring of Life" item, which increases you HP pool:
1. your current and max HP is 60
2. equip the ring (+100), your current and max HP is now 160
3. someone shoots at you, your current HP goes down to 80 (max HP still 160)
4. take off the ring (current HP = max HP = 60)... effectively getting rid of 80 lost HP
5. goto 1

Anyway, I could add items which affect:
a/ soldier basic stats (TU, stamina, accuracy, etc.)
b/ armor basic stats (front, left, etc.)
c/ new visibility effects (all those new OXCE+ armor flags: day/night, camo, predator, heat vision, psi vision, etc.)

Everything else (e.g. jetpack, resistances, immunities, ...) would be more difficult.

Offline Dioxine

  • Commander
  • *****
  • Posts: 5458
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: Bladum's ideas compilation
« Reply #18 on: October 31, 2016, 06:16:24 pm »
When we discussed that kind of thing with Yankes, the general consensus was that such items, to avoid insanity, should only be equippable on the base and can't be removed/equipped during a mission. But it was a long time ago.

Offline Bloax

  • Colonel
  • ****
  • Posts: 322
  • do you want to be any of those things
    • View Profile
Re: Bladum's ideas compilation
« Reply #19 on: October 31, 2016, 06:59:40 pm »
There are two ways to handle stat damage while wearing a stat-increasing item:

1) When item is taken off, set "current" stat to [MaxStat * (BoostedStat / BoostedMaxStat)], so taking off a ring of +100 hp at 160/180 hp would set it to [80 MaxHp * (160 BoostedHp / 180 BoostedMaxHp) = 71 hp].
2) When item is taken off, simply deduct the bonus from the current stat. Yes, this means that you'll die if you take that ring off at <=99 hp. Tough luck if you wanted another ring in that slot!

The use case of #1 is rather limited without tedious swappy-swaps for min-maxing, so the Oh So Dangerous #2 is probably the way2go.

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Bladum's ideas compilation
« Reply #20 on: October 31, 2016, 10:11:58 pm »
Well, enjoy. I just hope you know what you're doing.

Yeah, the word interesting is the key here.
I've looked at it too and I could add some properties to items quite easily. Some not so easily.

Also, there's a question of when should stats update... immediately after equipping? ...or next turn? ...or just once per battle?

Imagine, there is a "Ring of Life" item, which increases you HP pool:
1. your current and max HP is 60
2. equip the ring (+100), your current and max HP is now 160
3. someone shoots at you, your current HP goes down to 80 (max HP still 160)
4. take off the ring (current HP = max HP = 60)... effectively getting rid of 80 lost HP
5. goto 1

Anyway, I could add items which affect:
a/ soldier basic stats (TU, stamina, accuracy, etc.)
b/ armor basic stats (front, left, etc.)
c/ new visibility effects (all those new OXCE+ armor flags: day/night, camo, predator, heat vision, psi vision, etc.)

Everything else (e.g. jetpack, resistances, immunities, ...) would be more difficult.
right now I don't have plans to items that change stats directly, this will be responsible of scripts that will alter calculations that use stats.
And some script will be allowed to directly change current stats of unit, and without any problems they could change maximum values too.
One benefic of scripts is that modder can override how is handle hp when max is changed, default will be something like you said,
but modder can adust hp after that in any way he want.

Scripts that are candidates for this are "whehUnitIsDamaged" and "endOfTurn" (not added yet, this would allow creating temporary buffs and debuffs).
In some future another place could be "itemEquiped" and "itemDroped".
With all this and new special stat "flyEnginePower" (when it have value greater than zero unit can fly) I could add without any big problems support for jetpack and lot of other interesting mechanic (limited fuel, net that can bring down some flying units, weight limit, etc.).
Only change from code perspective is to call "apply gravity" function after call of this selected scripts and this new stats is needed for reducing conflicts between multiple mods/scripts that try affect flying capabilities of unit.

Right now only real limitation in scripts is that only items in hand are accessible. I need figure out how access to full inventory should look like in scripts.

Offline bladum

  • Colonel
  • ****
  • Posts: 213
  • Bladum
    • View Profile
Re: Bladum's ideas compilation
« Reply #21 on: November 21, 2016, 11:29:14 am »
progress report in my so far local fork based on OXCE+ 3.5

EDIT: all progres reported in first post
« Last Edit: November 29, 2016, 10:54:29 pm by bladum »

Offline bladum

  • Colonel
  • ****
  • Posts: 213
  • Bladum
    • View Profile
Re: Bladum's ideas compilation
« Reply #22 on: November 28, 2016, 09:28:21 pm »
git repo, sorry for not perfect docs / code quality

https://github.com/Bladum/OXCE-Bladum

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9098
    • View Profile
Re: Bladum's ideas compilation
« Reply #23 on: November 30, 2016, 02:12:56 pm »
So far (30.11.2016), this looks interesting to me:
- display weapon damage on cursor under accuracy ... I will make it a toggle tho
- effective weight of the item for throwing
- scripted terrain damage before battle

This looks nice, but is not robust enough:
- click on paperdoll to change armor, avatar, and display armor weight ... the paperdoll doesn't have a fixed size (64,90,50,54) and also there could be inventory slots on the chest for example, which would conflict with the paperdoll button

The rest is not interesting for me.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11728
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Bladum's ideas compilation
« Reply #24 on: November 30, 2016, 04:35:30 pm »
The rest is not interesting for me.

Meridian, by "the rest" you mean this document?

https://docs.google.com/spreadsheets/d/1yzyycRJ6Nq_SC3bE5sdq41aq_x7GgkQ9eAyoulpJYoI/edit#gid=0

Sorry, I'm just getting confused.
« Last Edit: November 30, 2016, 04:45:01 pm by Solarius Scorch »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9098
    • View Profile
Re: Bladum's ideas compilation
« Reply #25 on: November 30, 2016, 06:10:35 pm »
By the rest, I mean the rest as implemented here (as per today): https://github.com/Bladum/OXCE-Bladum

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11728
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Bladum's ideas compilation
« Reply #26 on: November 30, 2016, 06:31:11 pm »
By the rest, I mean the rest as implemented here (as per today): https://github.com/Bladum/OXCE-Bladum

Thanks. I thought so too, but was hoping there's a human readable list somewhere (I mean, relevant to the commit).

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9098
    • View Profile
Re: Bladum's ideas compilation
« Reply #27 on: November 30, 2016, 06:39:06 pm »
Well, I didn't check, but Bladum has updated the Workbook with progress too... it's probably in sync or close to it.

Offline bladum

  • Colonel
  • ****
  • Posts: 213
  • Bladum
    • View Profile
Re: Bladum's ideas compilation
« Reply #28 on: November 30, 2016, 10:13:31 pm »
it is in sync :)

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: Bladum's ideas compilation
« Reply #29 on: November 30, 2016, 10:42:50 pm »
I like the idea of wind effect, but I'd have to check how it actually looks. Also quite like the base defence stuff. Base defence facilities could benefit from more variation, and damaged aliens showing up after defence fired has been a recurring request. Honestly, base defences battles are boring given that the AI is too dumb to breach and clear so it ends up being you breaching and clearing the hangars. So anything to make the battles less tedious (like starting with hurt aliens) is fine by me. It's not like you were going to lose that base, was it? (unless it's some form of crazy MC - psi vision ethereal, but that's also boring and it's frustrating so...)