aliens

Author Topic: [Documentation] Up-/Downgrading Facilities  (Read 28709 times)

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1933
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: [EXE] Up-/Downgrading Facilities
« Reply #60 on: April 24, 2018, 04:15:36 pm »
No, that would require new code.  This is the best solution we have right now.

Offline clownagent

  • Colonel
  • ****
  • Posts: 380
    • View Profile
Re: [Documentation] Up-/Downgrading Facilities
« Reply #61 on: July 22, 2018, 02:14:33 pm »
A suggestion for improvement of user interface for this feature:

When you left-click on a facility there should be a third button if an upgrade/downgrade is possible (see image). When you press this button a window appears (like the normal build menu) where you can click on the available downgrade/upgrade options and see the costs.

The "dismantle" button should only be there for complete instant removal. If complete dismantling is disallowed by the ruleset, the button should be grayed out. (Any downgrade, e.g. making a facility to a corridor, should be handled by the additional downgrade/upgrade button)

Pros:
- The player gets the information which upgrades/downgrades are possible and what are the costs of building.
- The player does not need to know which building he needs to build on top of another building.
- "Dismantling" is unconfusing and has clear meaning.

Offline Biggieboy

  • Colonel
  • ****
  • Posts: 220
    • View Profile
Re: [Documentation] Up-/Downgrading Facilities
« Reply #62 on: August 12, 2018, 11:22:00 pm »
Great Idea!

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9094
    • View Profile
Re: [Documentation] Up-/Downgrading Facilities
« Reply #63 on: May 17, 2020, 07:11:55 pm »
1. a few bugfixes

A few math bugs have been fixed in OXCE v6.5.
The upgrade time costs are now consistent in all cases.

You won't see any difference when building 1x1 facility over 1x1 facility.
You may and may not see a small difference when building a 2x2 facility over 4 1x1 facilities.
You will likely see a medium to significant difference when building 3x3 facility over anything else than another 3x3 facility.
Building 2x2 facility over a 2x2 facility will be probably the most significant case/difference.

I won't go into math, you can check source code if you wish, but basically there were 2 issues:
1. scaling (building 2x2 facility over one 2x2 facility vs. four 1x1 facilities was significantly different, read buggy)
2. rounding (integer math cut off all fractions, which led to inconsistencies)

If you're using this feature, please review upgrades for your 2x2 and 3x3 facilities.
1x1 facilities are not affected.
Downgrades are also not affected.

-----

2. a new global option

I have also added one more global switch... to globally decrease time saving when upgrading (building over existing facilities).

Code: [Select]
buildTimeReductionScaling: 100

Default is 100% ... means existing facilities give 100% of their build cost into upgrade cost decrease.

75% would mean that existing facilities give 75% of their original build cost into upgrade cost decrease.

With 0% there is no upgrade cost decrease... upgrading a facility will cost the same as building it from scratch.

-----

3. a small (but useful) functionality improvement

Description: https://openxcom.org/forum/index.php/topic,8017.msg125175.html#msg125175
« Last Edit: May 17, 2020, 07:40:04 pm by Meridian »