Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Yankes

Pages: [1] 2 3
1
OXCE Suggestions Y-script / [Suggestion] Sell/Buy prices (Y-script)
« on: April 01, 2024, 12:02:16 am »
<snip> And yet, here I am, implemented whole pack of features for my own submod (and some of the have made their way into official branch/release). I actually had fun writing C++ code for OXCE. And for dumb C++ question you can use ChatGPT to answer them, just like I do.

I would prefer code form people who know what they do, this mean beginning programmer only with help of ChatGPT. Mainlining long term projects like require lot of work and half-baked features only increase this cost (like long debugging session with questions like "what should happens when X? Should be Y or Z?").
For personal fork this will work fine as all burden is on owner of this fork not on OXCE or OXC
(it look we start having healthy community of forks, at least 4 major, but still some time to Doom community).

On another hand "I'm not programmer" is not avoidable even if any feature like this will be added as only possibility I see is to add y-scripts hooks for it.
Tweaking some costs by new flags cost more than its worth IMHO, scripts on other hand are lot harder to implement and use but have infinity more uses and power than any new flag in item. In long run could fundamental change how whole sell/buy work form gameplay perspective.

2
OXCE Suggestions OK / Option for alien morale loses based on rank
« on: April 24, 2023, 01:59:28 pm »
Allows aliens to have similar mechanic to xcom where when you kill leader you see big morale lose spike.
Currently in OXCE only aliens number affect theirs morale change.

3
I need some sanity checks if my new rules are intuitive:

Code: [Select]
transparencyLUTs:
  - colors:
      - [  8,  8, 12, 2 ] # "white"
      - [ 16,  8,  0, 2 ] # orange
      -
        - [ 88, 82, 82,  55 ]
        - [ 48, 48, 42,  30 ]
        - [ 62, 12,  8,  10 ]
        - [ 82, 82,  2,   2 ]
      - [  4, 16,  4, 2 ] # green
What would be intuitive interpretation of this config?

4
I pushed yesterday a couple of changes in OXCE 7.8.10:

  • Added `update:`, `override:` and `new:` to old list of `type:` (or `name:` for some) or `delete:` special properties in ruleset that define how handle rulesets,
    Supported rulesets can be check by `!info` tag on main node like (`ufos: !info`)
  • Fix some bugs/quirks in loading rulesets (mostly in case of `refNode:`)

5
In OXCE 7.8.9 I added option to share tags definition between files:

Code: [Select]
extended:
  tagsFile: Ruleset/OtherFile.rul

this effective copy `tags` from other file and insert them in current file.

6
This more a fluff, more interesting would be if base placement affect what is possible to buy/recruit

7
New changes in nightly:

- Script now can change movement type of unit, aka swap fly with walk.
- Rule set and script can alter cost of moving item in inventory:
Code: [Select]
items:
  - type: STR_PISTOL
    inventoryMoveCost:
      basePercent: 200

8
OXCE Support / [Feedback] Falling damage and Goomba Stomp
« on: April 07, 2022, 03:09:07 pm »
As I toy with move types and flying I conclude that current handling of falling is not satisfactory.

I think of adding option for damaging unit when it fall from heights bigger than 1 level, question is how should it be calculated and what it should "damage"?
Another thing is that falling unit always can knock out lower unit, even when its lot bigger and stronger unit, at least 2x2 units should withstand 1x1 unit and small one should be knockout instead.

Any thoughts on this topic?

9
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.

10
OXCE Suggestions DONE / [Documentation][y-script] Ufopedia custom info
« on: January 04, 2021, 01:45:13 am »
In recent nightly I added option for scripts to add custom info to `INFO` button from ufopedia.
For now supported is:
Code: [Select]
extended:
  scripts:
    statsForNerdsArmor:
      - offset: 1
        code: |
          # rule <- name of variable that have given rule object, every script hook use same names.
          # geoscape_game <- current game, you can check if you have research to show some info
          return;
    statsForNerdsItem:
      - offset: 1
        code: |
          #current available operations.
          stats_state.addIntRow "The Answer to the Ultimate Question of Life, The Universe, and Everything" 42;
          stats_state.addTextRow "Can run Crisis?" "STR_TRUE";
          stats_state.addTextRow "Can run CyberPunk 2077?" "STR_FALSE";
          stats_state.addTextFormatRow "Format" "test1 {0}%" 1;
          stats_state.addTextFormatRow "Format" "test2 {0}% - {1}%" 1 2;
          return;
    statsForNerdsCraft:
      - offset: 1
        code: |
          return;
    statsForNerdsUfo:
      - offset: 1
        code: |
          return;

11
I added new functionality to OXCE nightly:

For many list like `requires` or `requiresBuy` you can use new syntax like:

Base mod:
Code: [Select]
items:
  - type: STR_PISTOL
    requiresBuy:
      - STR_X
      - STR_Y
  - type: STR_PSI_AMP
    requires:
      - STR_X
      - STR_Y

Another mod:
Code: [Select]
items:
  - type: STR_PISTOL
    requiresBuy: !add
      - STR_Z
  - type: STR_PSI_AMP
    requires: !remove
      - STR_Y
Now `STR_PISTOL` need have additionally need `STR_Z` AND `STR_X`, `STR_Y` to buy
But `STR_PSI_AMP` need only `STR_X` from research.

With this you can easier add or remove some positions from list without know full lists.
This reduce many cases where mods extension could easy break by small change in main mod.

For now only two `!add` and `!remove`  basic operations are supported but in future it will be more complex too available (like `!replace`).

As some list have very strick order I could not add for now way to override them but in future depending on demand I could add ways to override them too.

12
OXCE Suggestions DONE / [Documentation] Improved item stat bonuses
« on: March 21, 2020, 05:29:23 pm »
In new version of OXCE all stats bonuses in items can now access to weapons and ammo from calculated attack.
This right now only available on script level as items on its own do not have any stats to read.

Scripts now have new variables with new info:
Code: [Select]
weapon
ammo
battle_action
skill

This mean ammo can now affect accuracy of weapon and weapon can affect damage of ammo, not mentioning that each attack type can have different power.

13
New functionality based on logic used by https://openxcom.org/forum/index.php/topic,7241.0.html

This mean this is make health work more similar to mana. As bonus mana and health loss can be consider as "wound" and prevent unit from participating in training or fighting (forced base defense still allow unit to defend base if total health loss is less than limit)
Code: [Select]
mana:
  #rest stay configs same
  woundThreshold: 200 #how much % of base mana cause unit to be consider "wounded"
  replenishAfterMission: true

health:
  woundThreshold: 100 #how much % of base health cause unit to be consider "wounded"
  replenishAfterMission: true

For base facilities:
Code: [Select]
facilities:
  - type: STR_MAGE_GUILD
    heathRecoveryPerDay: 3
Similar to mana this not stack, only max is taken.

Scripts now have access to both this values (mana and health loos) in script:
You can access and modify it by:
Code: [Select]
extended:
  scripts:
    returnFromMissionUnit:
      - offset: 1
        code: |
          set final_health_loss 13;
          set final_mana_loss 21;
          set recovery_time 0; #disable wound recovery time
         
          return;


Health "loss" is orthogonal to current wound status. You can mod game to simulate "wound" as heavy damage that make need hospitalization for some time, and health loss is small damage that soldier can heal by resting and still is battle ready. If you use `woundThreshold` then lot of health loss can still make unit have state "wounded", another important functionality is that mana and health regen only if unit is not really "wounded".

14
Fan-Stuff / Room of "Real" X-Com commander
« on: June 17, 2018, 11:51:24 pm »
Probably most accurate real life place to X-Com command room:
https://www.youtube.com/watch?v=lVWw628Mkac

15
Programming / Some bugs find in code
« on: April 27, 2018, 06:02:36 pm »
Doing other work I find couple dodgy parts in this function implementation.

First it not support multi purpose buildings because of `else if` (it will ignore cleanup of other functions)

Another is usage of `(*facility)->getCraft()` that look it should only be used for display purpose. What will happen when you use multiple crafts per hangar or craft is on mission when base was attacked?

[ps]
`getUsedHangars()` is call for each `_productions` even if do not need this value because type `getCategory()` is not craft. This is very heavy function and in each iteration value is same (until you remove something but then `break;` is done and you do not call it any more).

Pages: [1] 2 3