Author Topic: Solar's wishlist  (Read 494645 times)

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9104
    • View Profile
Solar's wishlist
« on: August 12, 2016, 12:42:34 pm »
Just putting this into separate thread, so that I can report on progress and ask questions without polluting other threads...

I sat down with Dioxine and we have compiled a list of features that we would like to see implemented the most. It is here:

https://docs.google.com/document/d/1pUZBoVKeZmfXUwIm4-FDRLx_fIISGFrp1131DLfyO40/edit?usp=sharing

Each feature contains a brief description of how it should work.

Many of these are old and already mentioned in places. Also, some of them are more sensible/easy than others. But all of them are there for a specific, practical reason, ie. there are actual plans for their use (in Piratez and X-Com Files).

Hopefully this will be of some use.
« Last Edit: February 19, 2023, 10:01:58 am by Meridian »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9104
    • View Profile
Re: Solar's wishlist
« Reply #1 on: August 12, 2016, 12:43:08 pm »
For Yankes (he already changed this part of code, I shouldn't be messing with it)
-------------
- Global damageAlter per type
- [DONE] Custom damage types
- More than 1 damage type per bullet
- Alternate animation for overkill

Interesting (I'll put it on my todo list)
-------------
- [DONE] Exclude a soldier type from the promotion system/military ranks
- [DONE] Sick Bay facility -- including option limit of facilities per base
- [DONE] Soldiers as pilots
- [DONE] Exclude a soldier type from driving
- [DONE] Environmental effects
- [DONE] Starting conditions by terrain
- [DONE] Terrain destruction by melee

Hmm? (on todo list with low prio)
-------------
- [DONE] Random Treasure Lists
- [DONE] Unhardcode approach/disengage speed per ship
- [DONE] Alternate vision modes
- [DONE] Definable types of Alien Containment
- X-Com craft crash sites

Meh! (not my taste...)
-------------
- Custom factions in battles ... I think we have enough factions
- Everyone can do everything ... scientists don't make good soldiers and soldiers don't make good scientists... not even in Star Trek... amount of necessary changes would be immense too... for almost zero benefit

Huh? (I have currently no knowledge of this part of the code, can't say if possible or not)
-------------
- Vertical maps

AI (I would need to look at AI source code... which I don't wanna... <spoilers>)
-------------
- Terrain trampling by AI units...
« Last Edit: December 10, 2023, 06:17:31 pm by Meridian »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9104
    • View Profile
Re: Solar's wishlist
« Reply #2 on: August 12, 2016, 12:44:12 pm »
If possible, I would like to recommend to move random treasure lists to a higher priority. Because it looks (to me, a layman) like a relatively simple job, and I know it'd be colossally beneficial. For example Piratez has many copies of the same ship with the only difference being some items laying on the floor; this is a very messy and time-consuming method.

Yeah, it's not difficult.
I did this so far, is it sufficient?

Node is called "randomizedItems" and it is a list.
Each item within this list contains:
- position - defult [0, 0, 0]
- amount - default 1
- mixed - default false
- itemList - default empty

Position says on which position the item(s) should spawn.
Amount says how many items should spawn.
ItemList is a list of items to choose from randomly.
Mixed says if one item should be picked and generated amount-times... or if each of the amount-number of items should be picked randomly.

Example below shows:
1. 30 identical items of type either STR_SOME_JUNK or STR_OTHER_JUNK spawned on [6, 2, 0]
2. 5 different items of type 1 or 2 (for example 4 items of type 1 and 1 item of type 2)

Code: [Select]
  - type: STR_VESSEL_CC_CLOUDCAR
      mapBlocks:
        - name: VESSEL_CC5
          randomizedItems:
            - position: [6, 2, 0]
              amount: 30
              mixed: false
              itemList: [STR_SOME_JUNK, STR_OTHER_JUNK]
            - position: [4, 3, 0]
              amount: 5
              mixed: true
              itemList: [STR_RANDOM_ITEM_1, STR_RANDOM_ITEM_2]
          width: 10
          length: 10
          items:
            STR_UFO_POWER_SOURCE_SMALL:
              - [6, 2, 0]
            STR_FIRE_EXT:
              - [4, 3, 0]

Yes, it looks very good.
Do I understand this correctly: if I set Mixed to false, I'll get either 30 STR_SOME_JUNK or 30 STR_OTHER_JUNK, with a 50% chance for either. If I set it to true, then I'll get 30 items altogether, some of them STR_SOME_JUNK and some STR_OTHER_JUNK. Yes?

Exactly.

Offline Arctic

  • Sergeant
  • **
  • Posts: 32
    • View Profile
Re: Solar's wishlist
« Reply #3 on: August 12, 2016, 12:46:37 pm »
For Yankes (he already changed this part of code, I shouldn't be messing with it)
-------------
- Global damageAlter per type
- Custom damage types
- More than 1 damage type per bullet

Interesting (I'll put it on my todo list)
-------------
- Terrain destruction by melee
- Environmental effects
- Starting conditions by terrain ... except for allowedCraft, since terrain is unknown at take-off time
- Exclude a soldier type from the promotion system/military ranks
- Exclude a soldier type from driving
- Soldiers as pilots
- Sick Bay facility

Hmm? (on todo list with low prio)
-------------
- Terrain trampling by AI units... would need to look at AI... which I don't want
- Random Treasure Lists
- X-Com craft crash sites
- Unhardcode approach/disengage speed per ship
- Definable types of Alien Containment

Meh! (not my taste...)
-------------
- Custom factions in battles
- Alternate vision modes
- Everyone can do everything

Huh? (I have no knowledge of this part of the code, can't say if possible or not)
-------------
- Vertical maps

What about "Integrated HWPs"? Basically, craft could have HWPs pre-attached, which spawned in the same place relative to the craft every time. It would make stuff like gun turrets possible. Imagine: Do you bring 14 men, or 6 men and a craft capable of fire support?

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9104
    • View Profile
Re: Solar's wishlist
« Reply #4 on: August 12, 2016, 12:48:27 pm »
Exclusion of soldier types from promotions is now possible:

Code: [Select]
  - type: STR_SOLDIER_S
    allowPromotion: false

Technically, these guys are rookies.
Instead of rookie, description STR_RANK_NONE is used everywhere.
For promotion mechanics, these soldiers don't exist... i.e. cannot be promoted and also don't count into number of soldiers when determining promotions eligibility.

Translations:

Code: [Select]
      STR_RANK_NONE: "-"
« Last Edit: August 13, 2016, 02:34:43 pm by Meridian »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9104
    • View Profile
Re: Solar's wishlist
« Reply #5 on: August 12, 2016, 12:50:18 pm »
What about "Integrated HWPs"? Basically, craft could have HWPs pre-attached, which spawned in the same place relative to the craft every time. It would make stuff like gun turrets possible. Imagine: Do you bring 14 men, or 6 men and a craft capable of fire support?

Was it really necessary to quote the entire previous post to ask a question?
Also, please open a new thread... I opened this one so that I don't pollute others... and you polluted mine (with unrelated topic) after 2 minutes of its life.
« Last Edit: August 12, 2016, 12:57:15 pm by Meridian »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9104
    • View Profile
Re: Solar's wishlist
« Reply #6 on: August 12, 2016, 12:55:29 pm »
@Solarius: how should the Sick Bay facility work?

Should it decrease the recovery time immediately after the mission?
- problem: after moving that soldier to a different base, the bonus would not be revoked

Or should it "heal" a different amount of hit points per day than 1?
- problem: healing 1.5 HP sounds stupid, but doable :) in this case, should the bonus from multiple facilities stack? if yes, how? if no, which takes precedence?

EDIT: also, I wanted to add possibility to limit number of facilities of certain type in a base (and also globally across all bases)... would that be something interesting for you?
« Last Edit: August 12, 2016, 01:02:04 pm by Meridian »

Offline Dioxine

  • Commander
  • *****
  • Posts: 5458
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: Solar's wishlist
« Reply #7 on: August 12, 2016, 01:23:21 pm »
EDIT: also, I wanted to add possibility to limit number of facilities of certain type in a base (and also globally across all bases)... would that be something interesting for you?

Such limit, at least per base, should be controllable with other facilities (eg. 2 Workshops/base for each Power Plant +1 workshop free, or 20 buildings total allowed for each Command Center + 20 free), but even if not, certainly useful!

That reminds me... if you don't want removing wounded soldiers on the training list, how about at least marking in red those who are signed in, but cannot profit from training anymore? (either due to wounds, or reaching facility's caps).

As for the hospital, I'd use the training facility interface. Hospital has capacity, people signed in heal x amount of sick leave each day.
However, this would also probably require unhardcoding the basic healin formula for proper balancing (what I see is formula of number of sick days infliced = (a%....b%)y + (c%...d%)z*e, where y is the amount of hit point lost, and z is percentile amount of health lost (so, setting y to 0, you will have people with high hp heal back as fast as those with low hp).
Also, with cut down recovery times by a factor of 2 or 3, due to hospitals, we can go back to the idea of 'stress from combat' :) (but I'll leave this for later time and better place).

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11731
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Solar's wishlist
« Reply #8 on: August 12, 2016, 02:15:11 pm »
Exclusion of soldier types from promotions is now possible: (...)

Excellent, I couldn't ask for more.

@Solarius: how should the Sick Bay facility work?

I don't know to be honest, I don't have the knowledge, that's why I left it vague. Anything is acceptable, as long as the bonus doesn't affect people who are transferred out.

A possible, if a bit hackish, solution is to roll every day for every wounded soldier in the base if the healing time is reduced (in addition to the normal -1 day). We could define the chance (in percentage) and the amount (in days).

It's just an example though, not actual guidelines. Dioxine's system looks more robust. (I read his answer after I wrote my example solution.)

EDIT: also, I wanted to add possibility to limit number of facilities of certain type in a base (and also globally across all bases)... would that be something interesting for you?

Yes, I think I've explained this before... This can be done by the reversal of "required function" for buildings, which is "forbidden function". So if you want to disallow more than one HQ per base, you can give it the function BASE_HQ add also the flag FORBIDDEN_BASE_FUNC: BASE_HQ so that it forbids itself.

That reminds me... if you don't want removing wounded soldiers on the training list, how about at least marking in red those who are signed in, but cannot profit from training anymore? (either due to wounds, or reaching facility's caps).

Not a bad idea.
Though I think it was done best in Apocalypse, where you can go over the max slots, but the training efficiency drops. It would probably be hard to do though.

Offline Dioxine

  • Commander
  • *****
  • Posts: 5458
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: Solar's wishlist
« Reply #9 on: August 12, 2016, 03:12:28 pm »
Not a bad idea.
Though I think it was done best in Apocalypse, where you can go over the max slots, but the training efficiency drops. It would probably be hard to do though.

Depends on how micro-managey you want to get. Still, such script would need to account for wounded/maxed out soldiers before arriving at final stat gain chance.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11731
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Solar's wishlist
« Reply #10 on: August 12, 2016, 03:37:02 pm »
Depends on how micro-managey you want to get.

Not much, that's why I like this system. You can just put everyone on board and not worry about wounds etc.

Still, such script would need to account for wounded/maxed out soldiers before arriving at final stat gain chance.

Yeah, that's why I said it would be hard to do.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9104
    • View Profile
Re: Solar's wishlist
« Reply #11 on: August 12, 2016, 03:48:38 pm »
Such limit, at least per base, should be controllable with other facilities (eg. 2 Workshops/base for each Power Plant +1 workshop free, or 20 buildings total allowed for each Command Center + 20 free), but even if not, certainly useful!

General idea is not bad. Maybe in phase 2, let's start with small steps.

That particular example is however something I really don't like. The Power Plant is totally useless and annoying. It doesn't serve any purpose other than take valuable space. Facilities like workshop (or initial Lab for that matter) should come with built-in power plant or other power source. That's an abstraction I think we can afford... to make our lives easier and concentrate on the game instead of femto-management.
And if taking space (or prolonging building time) was the original intention, I'd just decrease workshop space (or increase building time).

That reminds me... if you don't want removing wounded soldiers on the training list, how about at least marking in red those who are signed in, but cannot profit from training anymore? (either due to wounds, or reaching facility's caps).

User option to automatically remove the soldiers from training is now implemented.

As for the hospital, I'd use the training facility interface. Hospital has capacity, people signed in heal x amount of sick leave each day.
However, this would also probably require unhardcoding the basic healin formula for proper balancing (what I see is formula of number of sick days infliced = (a%....b%)y + (c%...d%)z*e, where y is the amount of hit point lost, and z is percentile amount of health lost (so, setting y to 0, you will have people with high hp heal back as fast as those with low hp).
Also, with cut down recovery times by a factor of 2 or 3, due to hospitals, we can go back to the idea of 'stress from combat' :) (but I'll leave this for later time and better place).

Hmm, again probably phase 2 with the interface.
For now, I'll just do a facility, which can increase the recovery speed (per day).

Yes, I think I've explained this before... This can be done by the reversal of "required function" for buildings, which is "forbidden function". So if you want to disallow more than one HQ per base, you can give it the function BASE_HQ add also the flag FORBIDDEN_BASE_FUNC: BASE_HQ so that it forbids itself.

The "forbids" function is fundamentally flawed and simply doesn't work for anything else than making singletons from certain facilities. All other (potential) use cases can be workedaround by the player. I have illustrated this on examples in other thread.

The limit I want to do is a much simpler concept and already allows more... for example allowing max 3 buildings per base (e.g. max three sick bays). And by setting it to one, it encompasses all functionality the "forbids" function can realistically give you.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11731
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Solar's wishlist
« Reply #12 on: August 12, 2016, 03:58:08 pm »
The limit I want to do is a much simpler concept and already allows more... for example allowing max 3 buildings per base (e.g. max three sick bays). And by setting it to one, it encompasses all functionality the "forbids" function can realistically give you.

Yes, if it's doable, that's certainly better.

Offline Dioxine

  • Commander
  • *****
  • Posts: 5458
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: Solar's wishlist
« Reply #13 on: August 12, 2016, 06:36:33 pm »
That particular example is however something I really don't like. The Power Plant is totally useless and annoying. It doesn't serve any purpose other than take valuable space.

No, that's totally out-of-the ass idea. If asked seriously, I have no solid plans yet, but I'm thinking to add some sort of 'command' buildings, each more expensive than the last, each increasing the total number of structures you can build (all bases included). But like I said, just a fancy, not sure if it's a good idea at all.
In general, maybe this system can be used to limit the valuable space in more elegant ways that it is done now (because yes, that's the precise purpose of the power plant - to take up space and limit the sprawl - well yes it's also used to increase the investment required to have laser weapons) :)

User option to automatically remove the soldiers from training is now implemented.

Great!

The limit I want to do is a much simpler concept and already allows more... for example allowing max 3 buildings per base (e.g. max three sick bays).

I like it, but good luck explaining such limits to the player... Well I mean, that's my job, and I dread it :)
« Last Edit: August 12, 2016, 06:39:38 pm by Dioxine »

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: Solar's wishlist
« Reply #14 on: August 12, 2016, 06:57:53 pm »
I'm not sure you're looking for input from "randoms", so if that pollutes the thread, feel free to remove.

Re: sick bay
The interface allowing to select wounded soldiers is best and a neat goal. Otherwise the same one tile space that can only support ~40 people living suddenly becomes able to heal 200. Although I guess maybe they go back to sleep on their own bunks after treatment.. The simple way works too with that argument, but it removes any need to have more than one of the best facility (unless they stack but that'd be insane).

The easiest implementation would be to make the facility heal 0-X sick days per day and allowing non-integer number of sick days. Pick the best sick bay on site to determine X, as stacking there can be a justification for them stacking.

Is there a way to make facilities require items to be built? Would be neat to have surgery rooms that require surgery tools, cloning bays that require cloning tech, etc. And eventually cloning allows you to bring back dead soldiers, which is not all that unbalancing anymore given how good trained rookies can become with the gym.

Re: Power plant
I hope not, I thought the electricity bill was included in maintenance!

Re: Forbid
Can you set "maxFacility" to zero, for mutually exclusive facilities? Like Altar of Hell preventing Shrine of Heaven, otherwise there would be a civil war on the base. That property would have to count as soon as the building is under construction of course.