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 - scarf

Pages: 1 [2]
16
Released Mods / [ARMOR] Powered Exoskeletons
« on: April 21, 2021, 04:22:18 pm »



X-COM recently had contract with powered exoskeleton suppliers. While  a bit cumbersome, it grants extra mobility and assists soldier's load. You can also manufacture enchanced version powered by elerium after researching alien alloys and elerium-115.




it uses OXCE features to simulate better stamina regeneration (vanilla: 0.33 x TU, this: 0.5 x TU, 0.6 x TU) so OXCE version exoskeleton would work better than OXCE version.
the elerium exoskeleton is intended to be same tier as personal armour, so you could choose between mobility and heavier loadout or decent protection from all directions (notably explosives).

downloads are at the bottom of the post.


Credits: combat armor mod
by Warboy1982, Ryskeliini
recolor by Solarius Scorch


Use the mod freely; all my works are released under CC-BY.

17
`getFire` is not fire intensity, it's fire duration

fire intensity is in `getSmoke`


oh, I've misunderstood, changed it to more suitable one. thank you!

18
1. Environmental Damages
script that deals additional environmental damage (smoke & fire) to units every turn. also getSmoke gets the intensity of EITHER FIRE or SMOKE (thanks meridian)

Code: [Select]

extended:
  scripts:
    newTurnUnit:
      - offset: 2
        code: |
          var int LOG 0; # 0: none; 1: simple 2: detailed


          var ptr Tile tile_info;


          var int x;
          var int y;
          var int z;


          var int Hazard_Intensity;
          var int Fire_Duration;


          unit.getPosition.getX x;
          unit.getPosition.getY y;
          unit.getPosition.getZ z;


          battle_game.getTile tile_info x y z;


          tile_info.getSmoke Hazard_Intensity;
          tile_info.getFire Fire_Duration;
          #debug_log "hazard intensity:" Hazard_Intensity "fire duration:" Fire_Duration;


          if and gt Fire_Duration 0 gt Hazard_Intensity 0;
            begin;
              var int Fire_Damage 0;
              var int Total_Fire_Damage 0;


              var ptr RuleArmor Unit_Armor;
              var int Unit_Size; # 1 for small, 2 for big
              var int Unit_Armor_Under;
              var int Resist_Under 70;


              unit.getRuleArmor Unit_Armor;
              Unit_Armor.getSize Unit_Size;
              Unit_Armor.getArmor Unit_Armor_Under 4;
              sub Resist_Under Unit_Armor_Under;




              if ge LOG 1;debug_log "trauma report for:" unit;end;
              if ge LOG 1;debug_log "original hazard intensity:" Hazard_Intensity;end;
              if ge LOG 2;debug_log " armor size" Unit_Size;end;


              #normalizing
              # from 01 02 03 04 05 06 07 08 09 10 11 12
              # to   06 06 06 06 07 07 07 07 08 08 08 08
              if gt Hazard_Intensity 8;
                set Hazard_Intensity 8;
              else gt Hazard_Intensity 4;
                set Hazard_Intensity 7;
              else gt Hazard_Intensity 0;
                set Hazard_Intensity 6;
              end;
              if gt Unit_Size 1;
                div Hazard_Intensity 4;
              end;
              if ge LOG 2;debug_log "normalized hazard intensity:" Hazard_Intensity;end;
              loop var i Hazard_Intensity;
                #set Fire_Damage Hazard_Intensity;
                battle_game.randomRange Fire_Damage 0 Hazard_Intensity;
                unit.reduceByResistance Fire_Damage 2;
                mul Fire_Damage Resist_Under;
                div Fire_Damage 70; # under armor over 70 completely negates fire damage
                mul Fire_Damage -1;
                if ge LOG 2;debug_log "   fire damage for loop" i ":" Fire_Damage;end;
                if lt Fire_Damage 0;
                  unit.addHealth Fire_Damage;
                  unit.addMorale Fire_Damage;
                  add Total_Fire_Damage Fire_Damage;
                end;
              end;
              if ge LOG 1;debug_log "total fire damage [" Total_Fire_Damage "]";end;
              #adds fatal damage (2x2 units are immune)
              if and le Total_Fire_Damage -10 eq Unit_Size 1;
                # START WOUNDED_PART
                # TORSO 1 RL 4 LL 5
                var int Wounded_Part;
                battle_game.randomRange Wounded_Part 3 5;
                if eq Wounded_Part 3; sub Wounded_Part 2; end;
                # FINISH WOUNDED PART
                mul Total_Fire_Damage -1;
                div Total_Fire_Damage 2;
                battle_game.randomRange Total_Fire_Damage 1 Total_Fire_Damage;
                unit.addFatalwounds Wounded_Part Total_Fire_Damage;
                if ge LOG 1;debug_log Total_Fire_Damage "wound to" Wounded_Part;end;
              end;
            end;
          else gt Hazard_Intensity 0;
            div Hazard_Intensity 4;
            battle_game.randomRange Hazard_Intensity 0 Hazard_Intensity;
            unit.reduceByResistance Hazard_Intensity 9;
            if gt Hazard_Intensity 0;
              if ge LOG 1;debug_log "total smoke damage:" Hazard_Intensity;end;
              unit.addStun Hazard_Intensity;
            end;
          end;
          return;



2. More Fatal Wounds
this script overrides vanilla fatal wound limit of 1 to 3. code below deals roughly 1/4 inflicted damage to fatal wounds.
Code: [Select]

extended:
  scripts:
    damageUnit:
      - offset: 1
        code: |
          var int LOG 2; # 0: none; 1: simple 2: detailed


          var int Temp 0;


          if ge LOG 2;debug_log "start:" to_health to_wound unit;end;


          set to_wound 0;


          loop var i to_health;
            battle_game.randomRange Temp 0 3; #25% chance
            if eq Temp 0; add to_wound 1;end;
          end;


          if ge LOG 1;debug_log "end:" to_health to_wound;end;
          return;
3. Fatal Wounds inflict Moral Loss
Code: [Select]

extended:
  scripts:
    newTurnUnit:
      - offset: 1
        code: |
          var int Fatal_Wounds;
          var int Moral_Damage;


          unit.getFatalwoundsTotal Fatal_Wounds;


          if gt Fatal_Wounds 0;
            begin;
              loop var i 4;
                unit.reduceByBravery Fatal_Wounds;
                battle_game.randomRange Moral_Damage 0 Fatal_Wounds;
                mul Moral_Damage -1;
                unit.addMorale Moral_Damage;
                #debug_log "moral dmg:" Moral_Damage;
              end;
            end;
          end;
          return;
4. Automatic Priming
script that automatically primes grenades tagged as START_PRIMED. newTurnItem methods are preferred as it does not prime grenades on floor.

  • code attached on createItem automatically primes grenades regardless its position if it's tagged. (since items can be created 'before' start of mission, you can't search for grenade that isn't on ground then prime it)
  • code attached on newTurnItem only primes grenades if it's tagged and also start of mission (turn 1) and not on ground (so no introductory crash mission explosions from dead aliens and havoc from 20 primed grenades on skyranger floor).
Code: [Select]
extended:
  tags:
    RuleItem:
      START_PRIMED: int
  scripts:
    newTurnItem:
      - offset: 52
        code: |
          var int Current_Turn;
          battle_game.getTurn Current_Turn;


          if eq Current_Turn 1;
            var ptr RuleInventory Items_Inventory;
            var int Inventory_Slot;
            item.getSlot Items_Inventory;
            Items_Inventory.getType Inventory_Slot;


            if neq Inventory_Slot INV_GROUND;
              var int Start_Primed;
              item.getTag Start_Primed Tag.START_PRIMED;


              if eq Start_Primed 1;
                item.setFuseTimer 0;
                return;
              end;
            end;
          end;
          return;

5. change ammo sprite by rounds left
Code: [Select]
extended:
  tags:
    RuleItem:
      ALLOW_AMMO_TO_RESPRITE: int # 0: NO, 1 ~ 4: how many ammos to compute, recommended max 3
      PAEDIA_OFFSET: int # on ufopaedia weapon on max loadout is shown; negates that offset. usu. sum of ommo offsets
      OFFSET_BIGOB_WEAPON: int # 0: empty, 1 ~ 4: ammo type 1 ~ 4
  scripts:
    selectItemSprite:
      - offset: 1
        code: |
          var int Ammo_Types;


          if eq blit_part blit_item_big; # if blit_part == blit_item_big; -> on bliting big item
            item.getTag Ammo_Types Tag.ALLOW_AMMO_TO_RESPRITE; # find matching tag: ALLOW_AMMO_TO_RESPRITE


            if gt Ammo_Types 0; # if Ammo_Types > 0; -> tagged as resprite
              var int Paedia_Offset;
              var int Ammo_Offset;
              var ptr BattleItem Loaded_Ammo;


              # NEGATES PEDIA OFFSET
              item.getTag Paedia_Offset Tag.PAEDIA_OFFSET;
              sub sprite_index Paedia_Offset;


              # LOOP THROUGH AMMO SLOTS
              loop var i Ammo_Types;
                item.getAmmoForSlot Loaded_Ammo i; # get ammo item as Loaded_Ammo
                Loaded_Ammo.getTag Ammo_Offset Tag.OFFSET_BIGOB_WEAPON; # find offset value as Ammo_Offset
                add sprite_index Ammo_Offset; # ammo offset applied to sprite_index
              end;
            end;
          end;
          return sprite_index;

19
OXCE Suggestions OK / [Suggestion] base x-com craft positioning
« on: September 21, 2019, 01:52:58 am »
I have made a mod about big fighter craft, but the position gets moved (because of the bigger image size). Is there a ruleset reference to change the position of baseview image?

20
Help / Re: image color gets crashed
« on: September 20, 2019, 05:17:35 pm »
Thank you!!

21
Help / Re: image color gets crashed
« on: September 20, 2019, 04:35:50 pm »
I've tried using the color palettes, but it does not seem to work. Is there a way to convert palette properly that I don't know?

22
Help / image color gets crashed
« on: September 20, 2019, 03:35:36 pm »
So I was creating a mod that adds a new x-com craft, and the color pallete gets crashed. I think I must use some correct color pallete to prevent this to happen. Could you please tell me the appropriate color pallete to use?


I've attatched mod(with image files), save file and screenshots of how the error happens.

23
OXCE Suggestions DONE / Re: How underwater bullet trajectory works?
« on: September 10, 2019, 06:57:27 pm »
Thanks for your information. Also, would there be a way to implement the vapor into xcom 1?

24
In TFTD, projectiles that are fired underwater leaves traces of bubble, or bullet trajectory (couldn't figure out the exact name to call it). I am wondering which part of the ruleset causes it. Also, I'd like to know if the 'trajectory' can be implemented on surface shooting/ xcom 1. I think it would be a great missile smoke trails.

25
Work In Progress / Re: BlastRadius won't work!
« on: January 20, 2016, 03:52:51 am »
Hmm... But when I use
-Autocannon HE
There's an explosion, but no scorched grounds, even no smoke
-Heavycannon HE
There's only one tile of scorched grounds and smokes.
But I did not change neither damage nor blastradius. Now it's getting weird.

Hey, here's my recent mod. Maybe you can check what's wrong.

26
Work In Progress / BlastRadius won't work!
« on: January 20, 2016, 03:34:20 am »
Hello, I'm just new in here and I wanted to make a mod that adjusts blastRadius of AC/HE and HC/HE.
But when I change it, it really does not work.
When I set the blastRadius big, only one tile gets smoke/scorched ground. It does same when I set it -1.
But somehow  HWP cannon shell works normally. (It explodes 3x3)

P.s - HWP ammos are able to carry in custom battles... What the?)
P.p.s- Can you make "HWP cannon shell box magazine" So you can load 30 shots in a single item like "Cannon x50"? (the craft weapon)

27
Work In Progress / Re: [HWP]Tanks, Drones, Sectopods? Oh my! Version 0.6
« on: January 18, 2016, 04:36:31 am »
Hello, I've been using your TDS mod and it was great but somehow when I shoot cannons with conventional tank/cannon, it just crashes the game.
I wonder what is the problem.

Pages: 1 [2]