aliens

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 - The Martian

Pages: 1 ... 5 6 [7] 8 9 ... 11
91
I think it would be useful if there was a way to have more control over the chance that a unit catches on fire when struck by an incendiary weapon.

Perhaps something like:
Code: [Select]
  - type: STR_EXAMPLE_WEAPON
    FireChance: 0.7

With FireChance: 0.0 meaning the unit would never catch on fire (But terrain tiles would) and FireChance: 1.0 being a 100% chance of a unit being set on fire with every hit.

92
OXCE Support / [Answered] 100% chance of a unit catching on fire?
« on: June 02, 2020, 07:42:02 pm »
I've been trying to use FireThreshold: to make an explosion that sets struck units on fire 100% of the time if they are in the blast radius.

But I have been unsuccessful.

From what I've read on the UFOpaedia's Incendiary section it appears that the chance of igniting a unit is random:
Quote
Initial "impact" damage from incendiary ammunition is either for no points (unit does not catch fire), or between 5-10 points (unit catches fire). Since the distribution is randomly chosen from the set [ 0, 5, 6, 7, 8, 9, 10 ] (seven values), the probability of remaining unharmed is 14% (1/7), while there is an 86% chance (6/7) a unit will take some damage. The average damage is 6.4.

Is there a way to make a weapon that always ignites the unit it strikes?

93
I have two questions about the recoveryTransformations: feature in OXCE.


Question #1:
If recoveryTransformations: is used to change a recovered live alien into an item but there is no alien containment at the base will the item still be recovered as it is an item now and not a live alien?

Or is the alien corpse item recovered instead since the live alien died and thus was not transformed via recoveryTransformations: into a different item.

Question #2:
If recoveryTransformations: is used to change a recovered live alien into an item but there is no alien containment at the base will the "Captured aliens die due to lack of alien containment" message still be displayed after battle?

94
Help / Is there a max listOrder: value?
« on: May 04, 2020, 04:30:20 pm »
I'm aware that extraSprites: has a maximum value and that it can be increased via reservedSpace: in the metadata.yml file.

My understanding is that increasing reservedSpace: also increases the amount of RAM required by the computer running the mod as it reserves the space the potential images will need, so unnecessary expansion is discouraged.

Does the listOrder: variable have any similar limits?

If possible I want to leave large unused spaces in the listOrder: sequence between groups of items so that future expansion can be done without much reorganizing.

95
OXCE Support / [Answered] Questions about zombieUnit
« on: May 02, 2020, 11:07:17 am »
(Question #1): No zombifying enemy units?

I noticed that when shooting X-Com units with a weapon that has the zombieUnit: variable they change into a zombie on death as expected.

However if an enemy unit is struck and killed with the same weapon they do not become a zombie.

Is there a way around this?
(I don't mind if the spawned unit from the dead enemy is hostile, in fact that would be ideal)

(Question #2): Can zombieUnit: be made to only effect specific genders?

Is it possible to use zombieUnitByArmorMale: and / or zombieUnitByArmorFemale: to make it so that soldiers of one gender are turned into zombies on death while the others simply die from the same attack?

(Question #3): Can it be made so some armors spawn zombies on death but not others?

Can the zombieUnitByType: variable be used to allow weapons that can zombifying units but only effect soldiers equipped (Or not equipped) with specific armors causing any other ones to just die normally when struck?

96
Is it possible to prevent a piece of equipment (Weapon or device) from being used if the unit carrying it doesn't have one or all of the following:
- A high enough value in a specific stat (For example strength.)
- Unit is not wearing a specific armor.
- Unit has not had a 'Soldier Transformation' to a specific type.

I'm still reading up on Transformation so I may have misunderstood how it works.

My current understanding is it allows the increase or decrease of max stat caps as well as the increase or decrease of existing stat values the unit has. Sounds pretty useful.


So for example a soldier may not be able to fire a heavy cannon if not wearing power armor or having Strength above X or having undergone a specific Transformation.


97
Could someone please give me an example of the syntax for categories: for use with the items: section.

My understanding is that it is possible to allow one item to be in multiple categories, example:

A laser weapon could be in both the categories "Laser Weapons" and "Alien made Laser Weapons" to differentiate it from other weapons found in the category of "X-Com made Laser Weapons".

How do I phrase this on the item?

Is it done like the compatibleAmmo: variable?
Code: [Select]
items:
  - type: STR_EXAMPLE_LASER_RIFLE
    categories:
      - STR_CAT_LASER_WEAPONS
      - STR_CAT_ALIEN_LASER_WEAPONS

Or is it more like this?
Code: [Select]
items:
  - type: STR_EXAMPLE_LASER_RIFLE   
    categories: [ STR_CAT_LASER_WEAPONS, STR_CAT_ALIEN_LASER_WEAPONS ]



I'm assuming that the categories themselves are defined just like an item by placing them after the items: variable like this:
Code: [Select]
items:
# Category for all Laser Weapons
  - type: STR_CAT_LASER_WEAPONS   
    hidden: false

# category for only Alien Laser Weapons
  - type: STR_CAT_ALIEN_LASER_WEAPONS   
    hidden: true

Is that correct?

98
Help / Can a mod have two .rul files with an items: section?
« on: April 29, 2020, 12:46:05 pm »
Can two .rul files each with an items: section exist in the same Mod's ruleset folder?

Also, if the above is possible, what determines which file's items: list is loaded first?

99
Offtopic / XCOM: Chimera Squad
« on: April 15, 2020, 04:23:03 am »


100
Offtopic / Recommended method(s) for offline file storage?
« on: April 04, 2020, 01:35:43 pm »
Hello again! ^_^
(It has been a while)

Earlier this year my computer suffered a failure that took it out of commission.

Fortunately I was in the habit of archiving my
OpenXcom files to physical media so I haven't lost the mod I was working on.

This situation has got me curious as to what everyone else is using for their mod file's offline backup solution.

I used to use USB sticks until one faulted and corrupted some important data, now I'm relying on burning everything to DVDs.
(Takes a bit longer but so far the safety net provided is worth it.)


So what is your preferred method of offline backup?

101
This poison script created by Yankes looks very useful.

Simple poison bullets that do damage over time:

Code: [Select]
extended:
  tags:
    RuleItem:
      POISON_STRENGTH: int
    RuleArmor:
      POISON_SUSCEPTIBILITY: int
    BattleUnit:
      POISON_LEVEL: int
  scripts:
    damageUnit:
      - offset: 1
        code: |
          var int susceptibility 0;
          var int strength 0;
          var int temp 0;
          var ptr RuleArmor armor_rule;
          var ptr RuleItem item_rule;
         
          unit.getRuleArmor armor_rule;
          armor_rule.getTag susceptibility Tag.POISON_SUSCEPTIBILITY;
          damaging_item.getRuleItem item_rule;
          item_rule.getTag strength Tag.POISON_STRENGTH;
         
          debug_log 1 strength;
          debug_log 2 susceptibility;
          if and gt strength 0 gt susceptibility 0;
          debug_log 3 3;
            mul strength susceptibility;
            div strength 10;
            unit.getTag temp Tag.POISON_LEVEL;
            if lt temp strength;
              unit.setTag Tag.POISON_LEVEL strength;
            end;
          end;
         
          return;
    newTurnUnit:
      - offset: 1
        code: |
          var int poison;
          var int hp;
          unit.getTag poison Tag.POISON_LEVEL;
          if gt poison 0;
            unit.getHealth hp;
            sub hp poison;
            unit.setHealth hp;
            sub poison 1;
            unit.setTag Tag.POISON_LEVEL poison;
          end;
          return;
    recolorUnitSprite:
      - offset: 4
        code: |
          var int poison;
          unit.getTag poison Tag.POISON_LEVEL;
          if gt poison 0;
            set_color new_pixel 4; #green color
          end;
          return new_pixel;
items:
  - type: STR_PISTOL_CLIP
    tags:
      POISON_STRENGTH: 6
     

armors:
  - type: STR_SOME_MARTIAN
    tags:
      POISON_SUSCEPTIBILITY: 20

I have a few questions about how it is used.


(Question #1):
Which *.rul file does it need to be in to function?

Can I place it in its own PoisonScript.rul file or does it need to be in the same file as the *.rul that has the items: section in it?



(Question #2):
I'm guessing that the variable POISON_STRENGTH: on the item and POISON_SUSCEPTIBILITY: on the unit armor determine how much HP is lost by a poisoned unit per turn and either the number of turns the unit is poisoned or a resistance to the applied poison effect, I'm not sure exactly which from trying to read the code.

How do this work?




(Question #3):
Although the above question may answer this, I'll ask directly as it would be odd to see mechanical tanks succumbing to the effects of poisoning.

Is it possible to prevent a unit from being able to be afflicted with the poison script's effects?



(Question #4):
If a unit is already poisoned and is afflicted with poison again, what happens?
. Does it overwrite the Poison with the new value?
. Does it overwrite the Poison with the highest value?
. Does increase the value of the Poison by combining both?
. Do the instances of Poison stack each running separately?
. Or can a unit already effected by poison not be poisoned further?



(Question #5):
The words recolorUnitSprite: seem to suggest that the poisoned unit will display its affliction by shifting colour to a greenish tint.

Is it possible to cause this effect to display as other colours?
(Red/Blue/Yellow)



(Question #6):
Can a poisoned unit be cured of the poison effect, or must it run its course once inflicted?

For example by a medkit?




(Question #7):
Is it possible to have several versions of this script running simultaneously if these three varables are renamed in an additional copy of the script which is also present in a *.rul file along side the original?
POISON_STRENGTH:
POISON_SUSCEPTIBILITY:
POISON_LEVEL:

For example:
POISON_STRENGTH_B:
POISON_SUSCEPTIBILITY_B:
POISON_LEVEL_B:


If that is possible and the scripts unit affliction display colour can be altered then one version of the script could cause an effected unit to become green coloured when hit while others could switch to different colours representing other damaging afflictions.
(Also they would both have separate instances of damage if applied to the same unit.)

This would be very useful.

102
Offtopic / "Merry Christmas!
« on: December 25, 2019, 07:29:56 am »
Merry Christmas!

103
Resources / [UNIT][GRAPHICS] Cyber Cylinder
« on: December 25, 2019, 06:29:41 am »
The alien threat has deployed several types of mechanical weapons against X-Com already.

Cyberdiscs:



Cyber Spheres: (Drawn by NeoWorm)



And now, Cyber Cylinders!

(Note: The above animated examples look correct ingame, the *.gif file type doesn't always capture the energy effect under the Cyber Cylinder properly.)


What geometric horror will emerge next?






I've setup three different versions of the Cyber Cylinder type enemy.

The first one's sprite sheet can be used like the original Cyberdisc's sprites (drawingRoutine: 3) and also comes in a colour varient matching the original disc's colours if you wish it: (I think the blue one looks better though.)


The second one requires you to use drawingRoutine: 12 (Hallucinoid) instead of drawingRoutine: 3 (Cyberdisc). Unlike the above version this one cannot visually turn, however this sacrifice allows for an animated light to run along its outer hull in a sequence.
(Like the above both colour varients are available.)


And the third version is a slightly taller Cyber Cylinder that rapidly flashes different colours in a repeating sequence, again you will need to use drawingRoutine: 12 (Hallucinoid) instead of drawingRoutine: 3 (Cyberdisc) to make it work.




Have fun. ^_^

104
Help / Armed civilians?
« on: December 01, 2019, 04:06:45 am »
If a civilian unit spawns with a weapon will it fire on alien units?

105
Help / Randomized alien equipment?
« on: November 23, 2019, 06:43:29 am »
I'm trying to make it so that an alien soldier sometimes spawns with weapon (A) and sometimes with weapon (B).

So for example if an alien UFO held the following aliens:
Rank 0 - Commander
Rank 1 - Leader
Rank 2 - Engineer 
Rank 3 - Medic     
Rank 4 - Navigator
Rank 5 - Soldier
Rank 6 - Terrorist 1
Rank 7 - Terrorist 2


And there are 3 "Rank 5" Soldiers deployed, each soldier may be carrying a different weapon.

To achieve this my first thought was to use extraRandomItems: to grant that rank random weapons and leave their rank's itemSets: without weapons so the extraRandomItems: would be the sole source supplying them firearms.

In theory this would work, however only for weapons that do not require ammo as extraRandomItems: appears to only award one item from each list so unless the alien spawns with all possible ammo types their weapon will potentially be unloaded.


My other thought was to expand the number of Ranks so that there were more variants of a specific "Rank" then use lowQty, highQty & extraQty to make that enemy item set randomly appear by giving it a lowQty / highQty value of 0 with an extraQty value of X(Desired max number).

So it would look more like this:
Rank 0 - Commander
Rank 1 - Leader
Rank 2 - Engineer 
Rank 3 - Medic     
Rank 4 - Navigator
Rank 5 - Soldier
Rank 6 - Additional Soldier (A)
Rank 7 - Additional Soldier (B)
Rank 8 - Additional Soldier (C)
Rank 9 - Additional Soldier (D)
Rank 10 - Terrorist 1
Rank 11 - Terrorist 2



However if all of the soldier ranks can spawn lowQTy / highQty of 0 the UFO could be devoid of soldiers, and if I make it so each "Soldier" rank has a minimum value greater than 0 that just assures the deployment of the item set defeating the intended purpose of making it not always present.


I also considered trying to force the alien to spawn with the intended weapons using an attached weapon and the livingWeapon: setting, but my understanding is that would prevent it from accessing its inventory or dropping the weapon if the unit panicked.

The builtInWeaponSets: variable appears to be what I'm looking for as if I'm reading this correctly it will allow a randomization between several pre-defined item sets specifically referenced by that unit itself.

(builtInWeaponSets)    A set of lists of weapons this unit can come pre-equipped with. Game will pick one set "at random" (randomness comes from the current alien tech level definition). These weapons WILL appear in inventory slots (references items).

So if builtInWeaponSets: was used in combination with membersRandom: and the Rank 5 Soldier was configured to spawn either as a Sectoid soldier or a Muton soldier, builtInWeaponSets: could then be used to cause the Sectoid to spawn randomly with a Plasma Pistol or Plasma Rifle where as the Muton could be configured to only spawn with an Alien Launcher or Blaster Bomb. Do I understand this correctly?

(membersRandom)    Alternative to members. Instead of defining just a single unit type per alien rank, you can define any number of unit types here and one will be chosen randomly (each time a new unit is generated). To increase a chance of a certain unit type being selected, you can add it multiple times.


For example using builtInWeaponSets: there would be 3 different units of a Sectoid soldier with the only difference between them being the contents of the builtInWeaponSets: list:
A: Sectoid with Plasma Pistol | Plasma Pistol Clip
B: Sectoid with Plasma Rifle | Plasma Rifle Clip
C: Sectoid with Heavy Plasma  | Heavy Plasma Clip


Then membersRandom: would randomly deploy either A, B or C version of the Sectoid soldier every time a Rank 5 was placed in the UFO. So if a UFO had 4 soldiers in it they could potentially all be Rank 5 soldier but be carrying different equipment.


(Question)
Is this membersRandom: + builtInWeaponSets: the best method for setting up multiple potential loadouts for the same unit in a UFO without other aliens of the same rank sharing that randomized loadout, or is there a different way of doing this?

Pages: 1 ... 5 6 [7] 8 9 ... 11