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.


Messages - hellrazor

Pages: [1] 2 3 ... 138
1
The closest thing to case matching would be with nested else cases like so
Code: [Select]
  scripts:
#BEGIN ADJUSTED SELL PRICE BY DIFFICULTY
    sellCostItem:
      - offset: 3
        code: |
          var int temp;
          geoscape_game.difficultyLevel temp;  # get difficulty

          if le temp DIFF_EXPERIENCED; # For BEGINNER and EXPERIENCED
            item_rule.getTag temp Tag.SELL_PRICE_BE;  # custom item sell price
          else le temp DIFF_GENIUS; # For VETERAN and GENIUS
            item_rule.getTag temp Tag.SELL_PRICE_VG;  # custom item sell price
          else; # For SUPERHUMAN
            set temp 0;
          end;

          if neq temp 0;
            set cost_current temp;
          end;

          return cost_current;
#END ADJUSTED SELL PRICE BY DIFFICULTY

Absorbed, will test this but should work.

I've also changed to check to lower or equal instead of just equal, this way the starting 'if' looks for both beginner and experienced, the first 'else' then checks for veteran or genius, tecnically it would also look for the other 2 lower difficulties, but since those are covered in the initial 'if' they aren't a factor at this point. In addition I've extracted the temp check to it's own exterior check so you don't have include it in every previous 'if' or 'else'. Did have to add a 2nd 'else' for SH with my change otherwise 'temp' would of remained with a value of 4 and mess up the return cost.

Jeah that sounds right. I take it thanks.

In addition, depending on how you would rather approach it, instead of manually setting the prices you could use the factor you want to use and put this in the script
Code: [Select]
            muldiv cost_current temp 1000;
before returning it. The factor would have to be in an integer format, so using your example in the code for beginner, set it to 1786 and divide by 1000. You could also add a tag for the divider so you can customize the precision per item, but that does mean more tags to read in the script and manually set in the rules.

A factor won't do.  I only wanna change prices for Items which are effected by different spawn numbers, meaning Weapons and Items the aliens carry and their corpse and alive sales values.
So a list with specific items is the only way.

2
Progress, I got the Script for the Difficulty based Price adaption to work.

The solution looks ugly and I wish there was a case match in the scripting language...

Code: [Select]
extended:
#BEGIN TAGS
  tags:
    RuleItem:
      TIMER: int
      SELL_PRICE_BE: int
      SELL_PRICE_VG: int
#END TAGS

  scripts:
#BEGIN ADJUSTED SELL PRICE BY DIFFICULTY
    sellCostItem:
      - offset: 3
        code: |
          var int temp;
          geoscape_game.difficultyLevel temp;  # get difficulty
          if eq temp DIFF_BEGINNER;
            item_rule.getTag temp Tag.SELL_PRICE_BE;  # custom item sell price
            if neq temp 0;
              set cost_current temp;
            end;
          end;
          if eq temp DIFF_EXPERIENCED;
            item_rule.getTag temp Tag.SELL_PRICE_BE;  # custom item sell price
            if neq temp 0;
              set cost_current temp;
            end;
          end;
          if eq temp DIFF_VETERAN;
            item_rule.getTag temp Tag.SELL_PRICE_VG;  # custom item sell price
            if neq temp 0;
              set cost_current temp;
            end;
          end;
          if eq temp DIFF_GENIUS;
            item_rule.getTag temp Tag.SELL_PRICE_VG;  # custom item sell price
            if neq temp 0;
              set cost_current temp;
            end;
          end;

          return cost_current;
#END ADJUSTED SELL PRICE BY DIFFICULTY

items:
#BEGIN ADJUST SELL PRICE TAGS BY DIFFICULTY
#FACTORS: BE: 1,786 VG: 1,282 TO SH (50% VANILLA)
  - type: STR_PLASMA_BLADE
    tags:
      SELL_PRICE_BE: 32148
      SELL_PRICE_VG: 23076
###List of Items

Maybe someone knows a different solution for this, but i do not see any other way.
I hope that with a complete list of items, I can fix the lower difficulties economy for Hardmode Expansion.
I will have to ask for people testing this, once the newest Version is released.

EDIT: And yes Beginner and Experienced use the same number of spawning units, the same can be said for Veteran and Genius.
The Alien stats will of course differ.

3
Also, please, check attached:
-hit animation for Alloy Knife (recolored plasma blade`s slash from last update);
-big, medium and small plasma firearms hit animation.

All absorbed. ;)
I attach some screenshots later.

4
Is it ok to upgrade my current game of v0.99.9.5 to the master WIP 0.99.9.6 as the mod.io website is still showing 0.99.9.5 as the latest-see attached.
https://mod.io/g/openxcom/m/hardmode-expansion

I was able to fix the scripting bugs and conflicts I had. And I updated the meleeHitAnimations and the Plasma HitAnimations.
So if you like, you can update: GitHub WIP Version: Hardmode Expansion WIP

But do not complain about the X-Com Drone Combat Analysis UFOpaedia articles crashing, they are missing graphics, for the armor articles. -> InventorySprites.

If you run into any other Bugs, please let me know so I can fix those. Thank you.

EDIT: Heavy Plasma is now nearly as deadly as the Plasma Shotguns up close! You have been warned!
EDIT2: Hovertanks are basically fire support Platforms and pretty resitant to plasma (more as in vanilla). They do have good aim and good drop off values and can autofire within sightrange without dropoff, autofire provides 4 shots.

5
You can fine tune that with the ToTile property under meleeAlter making them do their usual damage to units, but greatly reduced to terrain, enough so it can't cut through walls you don't want them to. Also under meleeAlter are RandomTile and TileDamageMethod. But yes, if you're not careful with how you configure the damage, they'll start slicing UFO walls like melted cheese.

Currently i do not want to dive into this. There are other more present things which I need in my Mod.
For example implementing the costSellScript, so I can balance the Economy for lower difficulties. This has priority.

6
Seems, It started by Solarius Scorch and finished by Dioxine (Alien Origin thread)

Thanks I will update Credits accordingly.

BTW, what do you think about Melee terrain damage ?

That is a thing now? I need to take a closer look, also it would potentially allow to breach UFO walls with Plasma Sword (100 base damage + 70 soldier strength = 0-340 possible damage). I am not sure if this is a good thing.

Also, please, check attached:
-hit animation for Alloy Knife (recolored plasma blade`s slash from last update);
-big, medium and small plasma firearms hit animation.

Uhhh those look nice. If you do not mind I will use them, but will also make a golden/yellows recolor for the elerium plasma weapon clips.
OK?

7
Is it ok to upgrade my current game of v0.99.9.5 to the master WIP 0.99.9.6 as the mod.io website is still showing 0.99.9.5 as the latest-see attached.
https://mod.io/g/openxcom/m/hardmode-expansion

I do not recommend there are some serious bugs i am aware of, which i was not able to fix so far.
There is also some stuff missing and some other things not completly implemented.
Its called WIP/dev version. for a reason...

8
Hardmode Expansion / Re: Youtube Videos / Attached Videos
« on: February 20, 2025, 06:59:46 am »
Since some people seem to have issues...

Here is a small vid on how to properly bombard things :)

9
Hardmode Expansion / Re: Hardmode Expansion - Bugreports
« on: February 19, 2025, 07:07:14 am »
I haven't played Hardmode in a couple of years, but have you considered that you don't actually need to deal with the base in January? In my campaigns, I recall intentionally farming the supply ships coming to the base for 1-3 months or so. That would give you both loot and score. And with loot, you could build more bases and radars also.

Thats the way i also do it. He ran into a scoring error. UFO's on Terror Missions were providing 100 score per scoretick instead of 10....
I fixed this in 0.99.9.6 and totally forgot about it, since I was playing with scripts, Celatids and other stuff around OOOPSIE....

10
Hardmode Expansion / Re: Hardmode Expansion - Bugreports
« on: February 19, 2025, 07:03:52 am »
I'm playing on Openxcom extended, version 7.15.0, with hardmode version 0.99.9.5

I don't know if it's a bug per say, or if I am just not understanding something about the game, but I cannot get enough missions to not lose by March. January goes great, with the hardcoded alien base, I have plenty of missions to do so that I can get enough score, February I generally can't find many if any UFOs, then March I generally have enough radars to find some missions, but not enough to counteract the score loss of the missions in Antarctica, or Australasia.

I didn't save most of my attempts files, but I do have one of my most recent attempt, which is attached.

If it is a bug, I see it being that too much score is lost when aliens perform a mission, or not enough alien missions are happening. OR, my radar is not detecting UFOs as often as it should be. I can see there being extreme bad luck on my part with UFOs just not entering my radar range, or finally I am just not getting radars up fast enough. Sorry if this is not a bug, and if it is not, what should I do to get a run going? This run was over 11 hours to get to where it is in the file, where there is.

Ok first of all, you did run into a scoring dysbalance. (One zero makes a BIG difference here, between 10 and 100....)

I totally forgot about this but i fixed this in the upcoming Version 0.99.9.6.

Attached to this post you find a patch for Version 0.99.9.5 which provides you with a proper balanced scoring for alien mission (Terror Mission were giving LOADS of negative points).

Just download the file and replace the alienMission_HM.rul in the mod folder with it. I advise to restart the campaign. Sorry.

11
Hardmode Expansion / Re: Hardmode Expansion - Bugreports
« on: February 19, 2025, 06:14:27 am »
I'm playing on Openxcom extended, version 7.15.0, with hardmode version 0.99.9.5

I don't know if it's a bug per say, or if I am just not understanding something about the game, but I cannot get enough missions to not lose by March. January goes great, with the hardcoded alien base, I have plenty of missions to do so that I can get enough score, February I generally can't find many if any UFOs, then March I generally have enough radars to find some missions, but not enough to counteract the score loss of the missions in Antarctica, or Australasia.

I didn't save most of my attempts files, but I do have one of my most recent attempt, which is attached.

If it is a bug, I see it being that too much score is lost when aliens perform a mission, or not enough alien missions are happening. OR, my radar is not detecting UFOs as often as it should be. I can see there being extreme bad luck on my part with UFOs just not entering my radar range, or finally I am just not getting radars up fast enough. Sorry if this is not a bug, and if it is not, what should I do to get a run going? This run was over 11 hours to get to where it is in the file, where there is.

Loosing to score you need to have two months of score -1500 directly after each other.

Usually it's worth keeping the alien base around since its in your starting region. I personally take it out somewhere during march or beginning of april. Once you get at least 2 supply ships per month its actually a net positive scorewise and resourcewise.  It also has the ability to start missions in the starting region, like abductions or harvest or terror. Knowing that planning ahead can provide additional score and resources.
I personally use a small supplemental mod, replacing one starting Interceptor with a second Skyranger. Can be found here: https://openxcom.org/forum/index.php?topic=4980.0
It allows to capture the January base building fleet nearly completly. I sometimes have to skip the battleship, since i run out of soldiers/tanks. Even when slapping two battle battered teams together.
It slows down your initial research a little bit, since recruiting troops over scientists takes priority.
I also noticed that building radar bases initially only with a small radar is very cheap and provide some detection in the regions (better then none). Just a access lift and a small radar will do. My personal strategy is to get three combat teams operational until may/june. Operating usually from North America, Europe and South East Asia. The southern parts end up having small radars.
Oh and one important advice each large radar at a base provides a detection check each 30 ingame minutes. So perspectively building 3 large radars per base will provide you with 3 checks at 20% each every 30 minutes. This really helps detecting activity. Of course this is not cheap. But building up engineering capacity early is needed anyway (keep them nearly cost neutral by letting them produce motion scanners for selling, you can tank 114 engineers at the starting base this way also speeds up craft production. Getting rid of the base craft is overall better, you can have to Skystriker for the same monthly maintenances as one Skyranger, same goes for Interceptor/Retaliator.

Note to self: threshold for getting outpaced by alien base and their generated activity in midgame is around 10-14 alien bases. (You will get aaaa lot of missions....) so taking out alien bases is needed. I kept letting them sitting around for testing purposes and know my psi wimp soldiers have a dedicated job assignment. Destroying muton bases ;);)

Edit: I might increase the loose score to -2000 in 0.99.9.6 that should help a little.
I will your savegame once I am back from work later this day or tomorrow.

12
Open Feedback / Re: tweaking Chryssalids
« on: February 17, 2025, 03:34:47 pm »
Here you go
Code: [Select]
extended:
  tags:
    BattleUnit:
      AUTO_DEATH: int
      DEATH_COUNTUP: int

armors:
  - update: ZOMBIE_ARMOR
    scripts:
      createUnit: |
        var int auto_death;
        battle_game.randomRange auto_death 3 5;
        unit.setTag Tag.AUTO_DEATH auto_death;
        return;
      newTurnUnit: |
        var int auto_death;
        unit.getTag auto_death Tag.AUTO_DEATH;
        if gt auto_death 0;
          var int death_countup;
          unit.getTag death_countup Tag.DEATH_COUNTUP;
          if eq side FACTION_HOSTILE;
            add death_countup 1;
            unit.setTag Tag.DEATH_COUNTUP death_countup;
          else and eq side FACTION_PLAYER ge death_countup auto_death;
            unit.setHealth 0;
          end;
        end;
        return;

Scripts have been directly tied to the zombie armor, upon zombie creation a random roll will be made between 3 and 5, from that point, every alien turn AFTER spawning, a counter will go up for that zombie and at the start of the player turn it checks if the counter has reached that number and 'kill' the zombie, spawning the chryssalid. Time to die for the zombie will be slightly different depending if it spawned during the alien turn by direct alien action or during one of the other faction's turns.

This is something i really appreciate dude many Thanks. Now Hardmode Terrorsites with Chryssalids will be even more terrifying.
Uhh btw i also have a second Zombie unit spawning from Chryssalid Spitters, i guess i can just copy the script und use it on the other Zombies armor :)
Og course i will give credit.

13
Open Feedback / Re: tweaking Chryssalids
« on: February 17, 2025, 09:22:51 am »
There is this script, that should require at lest 1 point of HP damage, to trigger zombification.
I haven't tested it, but IIRC it is form Yankes so it should work.
Code: [Select]
extended:
  scripts:
    damageUnit:
    # Global fix to Transformation attacks like Chryssalid zombification
    # Requires at least 1 hit point of damage before zombification triggers
    # This applies to *every* weapon that zombifies.  It *has* to get through armor to work.
      - offset: 4
        code: |
          if gt to_transform 0;
            if eq to_health 0;
              set to_transform 0;
            end;
          end;
          return;

I am intrigued! Now i need a script to make Zombies turn into Chryssalids after 3-5 turns  by themselves.

14
Released Mods / Re: [COMMENDATIONS] UFOPedia Mod 3.3 (Updated by hellrazor)
« on: February 07, 2025, 09:49:02 pm »
I reuplaoded it here in the forum and on Mod.io. I noticed this because transfifex was bugging me with Emails....
Now it is silenced and all of you are happy :)

15
Released Mods / Re: UFOpaedia-friendly Celatid [UNIT] [OXCE]
« on: February 06, 2025, 04:15:26 pm »
Sure, no problem, but I can't guarantee that I'll be good at it.

I'll start with TIMER_BU, probably a terrible name, perhaps TURNS_BU would be better. It is used as a 'variable' where I store the acumulated number of turns from created embryos (per celatid), it starts at 0 since it's not set. At the end of the script hooked to 'createItem' it gets updated with the total calculated turns based from DELAY and RANDOM_DELAY.  TIMER_BU will be updated per each embryo item created and used for the next embryo item for that celatid. If we use delay values of 7 and 0 respectively for the tags, the first embryo for any celatid will read a value of 0 and at the end save a value of 7, the 2nd embryo will load that value of 7 and save a value of 14 at the end and so on. This tag variable is unique per celatid and each will update idependently based on the number of embryo items the celatid is loaded with. Also, the turns are not necessarily absolute from battle start, but rather relative from celatid spawn.

The 'offset' y-script operator takes 3 values, multiplies the 1st and 2nd, then adds the 3rd to the total and assigns it to the variable used for the 1st value. The way I use it, I always double the value of 'timer' and then add (-1) which of course ends up being a substraction. This ensures the actual embryo timer is set to an odd number. As you've clearly explained yourself, odd timers are used for alien end of turn.
'limit_lower' is just a safeguard for when 'timer' ends up having a value of 0 or negative due to delay values being 0 or negative themselves, setting any value lower than 1 to 1 (previously 0, but that was wrong) ensuring it will go off no earlier than the end of the 1st alien turn..

The reason why I decided to use turns instead of timers for the tags is to simplify the customization without having to calculate the timers. If any modder wants to set the cloning to happen at 8 turn intervals for example, they just need to set DELAY to 8 and the script will handle the conversion to timers and ensure it's done at the end of the alien's turn.

Hope I've managed to explain it in a clear enough manner.

Thanks so I actually got it :)

Pages: [1] 2 3 ... 138