OpenXcom Forum

Modding => OpenXcom Extended => OXCE Suggestions DONE => Topic started by: Yankes on March 07, 2022, 08:36:41 pm

Title: [DONE] Ability to change tile move cost (per armor)
Post by: Yankes on March 07, 2022, 08:36:41 pm
In recent nightly I added option to control cost of armor moving, now is possible to implement "glue" gun that prevent unit form moving from given spot.
By default each unit use value from:
Code: [Select]
armors:
  - type: STR_NONE_UC
    moveCost:
      basePercent: [100, 100] #TU%, ENERGY%
Then in y-script you can alter it per unit:

Code: [Select]
begin;
  var int temp;
  unit.MoveCost.getBaseTimePercent temp;
  add temp 100;
  unit.MoveCost.setBaseTimePercent temp;
end;
This properties can have any value but game enforce that result TU cost is in range [1, 254] and Energy in [0, 255].


As side notes, now save files should be smaller by up to 40% because game stop print some whitespaces that take took lot wasted of space in file.
Title: Re: Ability to change tile move cost (per armor)
Post by: Ethereal on March 26, 2022, 10:26:39 pm
You need to be running OXCE 7.5.7 (https://lxnt.wtf/oxem/#/Extended) (Preview Build) or later to use this new version.

Do you want to tell us anything interesting?
Title: Re: Ability to change tile move cost (per armor)
Post by: The Martian on March 28, 2022, 01:08:17 pm
You need to be running OXCE 7.5.7 (https://lxnt.wtf/oxem/#/Extended) (Preview Build) or later to use this new version.
Do you want to tell us anything interesting?

Version 7.5.7 has an interesting new feature that allows for better control of movement costs:

In recent nightly I added option to control cost of armor moving, now is possible to implement "glue" gun that prevent unit form moving from given spot.
By default each unit use value from:
Code: [Select]
armors:
  - type: STR_NONE_UC
    moveCost:
      basePercent: [100, 100] #TU%, ENERGY%
Then in y-script you can alter it per unit:

Code: [Select]
begin;
  var int temp;
  unit.MoveCost.getBaseTimePercent temp;
  add temp 100;
  unit.MoveCost.setBaseTimePercent temp;
end;
This properties can have any value but game enforce that result TU cost is in range [1, 254] and Energy in [0, 255].


As side notes, now save files should be smaller by up to 40% because game stop print some whitespaces that take took lot wasted of space in file.


It is a pretty fun addition. (https://openxcom.org/forum/Themes/InsidiousV1-k/images/post/thumbup.gif)
Title: Re: Ability to change tile move cost (per armor)
Post by: Ethereal on March 28, 2022, 06:24:56 pm
Thanks for the information. I just would like to understand why there was no announcement with a description of the changes? Or is there a big 7.6.0 release planned with a lot of changes? And when is it planned?
Title: Re: Ability to change tile move cost (per armor)
Post by: Yankes on March 28, 2022, 06:43:43 pm
Thanks for the information. I just would like to understand why there was no announcement with a description of the changes? Or is there a big 7.6.0 release planned with a lot of changes? And when is it planned?
When will be new version released is up to Meridian. And every thing that is working at this point from nightly it will be included. This mean it could be lot of changes or only few.

And for announcement, post that The Martian link is from this thread, more official could be only change log in new release :>
Title: Re: Ability to change tile move cost (per armor)
Post by: Meridian on March 28, 2022, 06:56:55 pm
Thanks for the information. I just would like to understand why there was no announcement with a description of the changes? Or is there a big 7.6.0 release planned with a lot of changes? And when is it planned?

The official update is not planned at the moment.

The next official version number will be 7.6, earliest possible date for it is May 2022 (or later).
Title: Re: Ability to change tile move cost (per armor)
Post by: Ethereal on March 28, 2022, 07:21:00 pm
The next official version number will be 7.6, earliest possible date for it is May 2022 (or later).

I understand. Thanks. Will wait. Armageddon is canceled, so there's time.
Title: Re: Ability to change tile move cost (per armor)
Post by: Yankes on April 04, 2022, 09:46:53 pm
And Lord said:
Quote
upon thy breast shalt thou go, and earth shalt thou eat all the days of thy life.
If God want to humans to fly he would give them wings.
Now OXCE support this God command and allow punish puny humans that try to fly using alien tech.

You can make now that any human that try fly up will pay heavy energy penalty for doing so,
flaying down as is more in line of God plan could be even cost less than previously.

Code: [Select]
armors:
  - type: STR_FLYING_SUIT_UC
    moveCost:
      #fist level of multipliers
      basePercent: [100, 100] #overall move cost

      #second level of multipliers
      baseNormalPercent: [100, 100] #move cost for ground
      baseFlyPercent: [100, 100] #move cost for flying

      #third level of multipliers
      walkPercent: [100, 50] #cost of normal move type
      runPercent: [75, 75] #cost of run aka with `ctrl`
      strafePercent: [100, 50] #cost of strafe when `ctrl` and only one tile aside
      sneakPercent: [100, 50] # !new move type with `alt`, force unit to move on ground even if is capable of flying

      flyWalkPercent: [100, 50] #cost of normal move type in air
      flyRunPercent: [75, 75] #cost of run aka with `ctrl` in air
      flyStrafePercent: [100, 50] #cost of strafe when `ctrl` and only one tile aside in air
      flyUpPercent: [100, 0] #cost of flying up
      flyDownPercent: [100, 0] #cost of flying down
      gravLiftPercent: [100, 0] #cost for using gravLift


[ps]
fixed type in example, correct version of OXCE is 7.5.10
Title: Re: Ability to change tile move cost (per armor)
Post by: Yankes on April 08, 2022, 10:19:46 pm
Funny glitch that change tank graphic when you swap move type.
Title: Re: [DONE] Ability to change tile move cost (per armor)
Post by: Meridian on April 29, 2023, 03:37:47 pm
Together with the ladder climbing feature: https://openxcom.org/forum/index.php/topic,11186.0.html

several new attributes for changing tile move cost per armor have been added in OXCE v7.9:

Code: [Select]
armors:
  - type: STR_POWER_SUIT_UC
    moveCost:
      baseClimbPercent: [100, 100]

      climbUpPercent: [100, 50]
      climbDownPercent: [100, 50]