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 - Kzer-Za

Pages: 1 ... 3 4 [5] 6 7 ... 10
61
Rejection reason: this is incompatible with the current OXCE architecture

Note: other things requested later in the thread have been implemented in the meantime (energy weapons, overheating, spending more than one ammo per shot, etc.)


Currently you can create a weapon that does not have "compatibleAmmo" but does have non-zero and non-infinite "clipSize". In that case this weapon disappears into thin air as soon as the clip is emptied. For example, I see such a fire extinguisher in one of the mods, it has three "ammo" and when they are spent, it disappears. Could such weapons not disappear, please, but just stay as empty weapons?

Why I'm asking for it?

First, in case of the said fire extinguisher, while it can't be used to extinguish fire anymore once the "ammo" is spent, it can still be used as a melee weapon. And it seems to be right for it to both have non-inifinite clip size, and to not have an actual compatibleAmmo.

Second, I would like to make a mod that makes laser weapons have a limited clip size, but without actual clips, so they could not be reloaded. Instead I would refill a certain amount of charges with a script "newTurnItem". That way I want to emulate that a laser can make a certain amount of shots before overheating, then it needs to cool down, then some more shots can be made. But with the current system, such a weapon disappears when the counter of ammo reaches zero, so while I can watch out for not depleting the ammo completely during my turn, but reaction shots become a disaster.

So, could you please make such weapons stay?

62
Released Mods / Re: Wounds proportional to damage [OXCE]
« on: August 24, 2019, 11:47:47 am »
Currently, no. It simply takes the amount of damage inflicted to health, divides it by 5, and sets the amount of woulds equal to the received figure. Perhaps, what you want is doable, but as I have already mentioned, I'm lazy :)

If you want to add this feature yourself, then you need to edit the script damageUnit and probably get the ammo used for the shot with "damaging_item.getAmmoItem" (I'm not sure), and add a condition depending on whether this ammo has a tag, which you will also need to add to the description of this ammo. I think, this could work.

63
OXCE Support Y-scripts / Re: Scripting basics
« on: August 23, 2019, 11:15:51 pm »
I will be waiting eagerly :) In the meantime, I suppose, there is no way to add some damage to psi attacks?

64
Released Mods / Re: Wounds proportional to damage [OXCE]
« on: August 23, 2019, 10:46:11 pm »
1. It overrides ToWound and RandomWound. But if you want for some specific weapon to have a different wound calculation, you can give this weapon a tag SPECIAL_WOUND equal to 1 (see readme) and specify damageAlter with ToWound and RandomWound.

2. Of course, you are welcome :)

65
OXCE Support Y-scripts / Re: Scripting basics
« on: August 22, 2019, 05:18:21 pm »
Could you please describe the hook psiDefenceBonusStats? It seems to me that if I try to change the "bonus" it returns, it takes effect only after the success of the attack is calculated. For example, for this experiment I tried this:

Code: [Select]
    psiDefenceBonusStats:
      - offset: 10
        code: |
          set bonus 1;
          debug_log 1 bonus;
          return bonus;

I psi-attack a unit two times by a soldier with a rather low psi-attack rating. In the log for both attacks I see "1 1" written. But the first attack always fails, even if it is Panic. The second always succeeds, even if it is Mind Control. So it seems that the bonus affects only the subsequent attacks, but not the current one. Am I right?

Also if I just output the bonus like this:

Code: [Select]
    psiDefenceBonusStats:
      - offset: 10
        code: |
          debug_log 1 bonus;
          return bonus;

it is equal to the "pure" Defense Strength of the attacked unit, without the Difficulty modifier (I mean the formula: Defense Strength (DS) = Psi Strength + (Psi Skill / 5 ) + Difficulty (from here https://www.ufopaedia.org/index.php/Psionics)). Does it mean the Difficulty is hard-coded and can't be affected?

Also, am I right that I cannot from this script access the attack strength of the incoming attack and change it? Or take into account some additional characteristics of the attacker?

66
Released Mods / Woundable Reaper [OXCE]
« on: August 22, 2019, 10:50:55 am »
It is a small "flavor" mod to be used in addition to the game option "Alien bleeding". You may have noticed that the said option does not affect the Reapers (because they are regarded as "tanks", I suppose).

So this mod makes the Reaper susceptible to wounds (just as the rest of organic units and as opposed to cybernetic Sectopods and Cyberdiscs), though still more resistant to wounds than other susceptible units (since, accroding to UFOpaedia it has "two 'brains' and two 'hearts' which allow it to function even when heavily wounded"). It receives half the normal amount of wounds, rounded down.

This mod can be used by itself or with another mod of mine, "Wounds proportional to damage" (https://openxcom.org/forum/index.php/topic,7310.0.html). In the latter case, the Reapers also receive half the usual amount of wounds (which, in case of the said mod, results in 1 wound per 10 HP lost).

Again, thanks to Yankes for his great help.

67
Released Mods / Wounds proportional to damage [OXCE]
« on: August 22, 2019, 10:42:46 am »
The original formula for calculation of the amount of received wounds is rather illogical. In one hit you receive from one to three wounds, with the exact amount being absolutely independent from the amount of damage. You can receive 3 wounds if the threshold of 10 hit points is exceeded by just 1 HP, and at the same time you can't get more than 3 wounds (in one hit), even if the hit has dealt 50 damage (suppose your soldier had 60 HP, so he survived that hit). Furthermore, that 50-damage hit can leave you with 1 wound with the same probability as with 3 wounds! (And an 11-damage hit can leave you with 3 wounds with, again, the same probability).

It bugged me a lot, so I decided to make this tweak that distributes the wounds proportionately to the lost HP. If I were more meticulous, I would even made it so that the amount of wounds received grew with the lost HP exponentially (like the difference between 0 and 10 lost HP would result in 1 wound, but the difference between 30 and 40 lost HP would mean about 5 wounds), but being lazy as I am, I just went with even distribution: for every 5 HP lost you receive 1 wound, as simple as that. This, of course, is also true for all units that can be wounded (if you enabled "Alien bleeding" in advanced options of the game).

There is one difference between the aliens and the humans though: humans will die the moment they have 10 fatal wounds, even if they still have some HP left. I decided against extending this mechanic to aliens, since most of them are either mentioned in UFOpaedia for their survival abilities, like Snakemen, or are enhanced in some way, or, in case of Ethereals, are not even supposed to be able to survive without their psychic powers (which would also enable them to withstand fatal wounds, I suppose). The only species for which dying upon receiving a certain amount of fatal wounds would make sense is Sectoids, but they already have rather few HP, so I didn't want to make them even more wimpy.

The mechanic with 1 wound per 5 lost HP should work on all weapons, even those added by other mods. The mechanic with 10 fatal wounds works only as long as you use vanilla armors, so if you have some additional armors from other mods, you would have to make the adjustments yourself. (Or you can leave a comment here with the id of the armor, and I would add it to the list). I also covered the civilian armors (including the civilians from the "Armed Civilians" mod), in case you increased the amount of HP civilians have.

In case you want some weapon to be more/less likely to inflict wounds, you can give this weapon a tag SPECIAL_WOUND if it does not use any clips like laser weapons or melee weapons. If it has a clip, give this tag to the clip.
For example:

Code: [Select]
items:
  - type: STR_SOME_WEAPON_OR_CLIP
    tags:
      SPECIAL_WOUND: 1

  - type: STR_SOME_OTHER_WEAPON_OR_CLIP
    tags:
      SPECIAL_WOUND: 2
      WOUND_FACTOR: 3

The weapon/clip with "SPECIAL_WOUND: 1" would either use the vanilla formula for wound amount, or you can adjust it with "damageAlter" in this item's ruleset as explained here:
https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)#Power_and_Damage_types
and here:
https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)#Item_Damage_Types

The weapon/clip with "SPECIAL_WOUND: 2" needs to be given one more tag: WOUND_FACTOR. The value you assign to this tag means how many hitpoints will be lost by the unit damaged with that item before a wound is inflicted. For example, "WOUND_FACTOR: 3" means that the item will give one wound per three HP.

I wouldn't be able to create this mod without the great help from Yankes.

Upd. Attached version 1.1

68
Released Mods / Re: UFOpaedia-friendly Celatid [UNIT] [OXCE]
« on: August 22, 2019, 10:31:41 am »
You are welcome to use it :)

69
Released Mods / Decreased TUs for aliens on your first turn [OXCE]
« on: August 21, 2019, 05:32:11 pm »
This is a little tweak that decreases the amount of TUs the aliens have during your first turn in Battlescape.

I have the plans of making this amount equal to the amount of TUs they normally reserve when in Patrol mode depending on their aggression stat. However, for now I had to go with one common amount for all of them, because I have no means to query the spawned unit about its aggression. So I went with 33% because: a) it is more or less average figure (they reserve 0% TUs with aggression 3+, 33% with aggression 2, 40% with aggression 1, and 50% with aggression 0 — my thanks to Meridian for providing that information); b) it corresponds to aggression 2, which is the most likely aggression level for the units you are going to encounter during the first turn.

As to the rationale for decreasing their first-turn TUs, there are two reasons: a gameplay-related one and a "realism"-related one.

Gameplay. Currently, on your first turn you either risk facing significant reaction fire, or just wait this turn out (if you don't see any enemies that can shoot you right inside your aircraft). This leads to the first turn always (with the above-mentioned limitation) being skipped. It means we might just as well give the aliens on your first turn the amount of TUs that they usually reserve. This way we get rid of: a) one routine action (clicking End of Turn); b) the element of being (un)lucky, because you can't just skip the first turn if an enemy has spawned in such a way that it can see the inside of your craft (I'm not a great fan of relying on luck).

"Realism". Of course, realism in a game is a very relative thing, and by itself it's not a reason to adjust something in the gameplay. But if there is a gameplay reason for some adjustment, then realism-related concerns can reinforce the decision. And the aliens having full TUs on your first turn do not make much sense. Did they have nothing to do until you arrived? Were they just standing there twiddling their thumbs? If a UFO has landed for its mission, they would be busy carrying out the said mission. If it has crash-landed, busy with repairing it: when your UFO is missing half a hull and a Power Source, I suppose even soldiers would have to lend a hand to engineers (not all work is gonna require qualified engineers in such a situation, there will be plenty of menial tasks). So they would have to rush out on your arrival, moving hurriedly, and barely having TUs to reserve. With the terror missions, the same: the aliens would be busy chasing civilians, civilians busy running away from aliens stupidly walking here and there, as they do :) So from the "realism" point of view it also makes sense that the aliens would have only their normally reserved TUs during the first turn, not the full amount.

70
Released Mods / UFOpaedia-friendly Celatid [UNIT] [OXCE]
« on: August 21, 2019, 05:28:30 pm »
The UFOpaedia states that the Celatid:

1. appears to detect human brain waves and will move towards a human target even if well hidden;

2. has the ability to clone itself at an alarming rate.

So I decided to give them both these abilities :) Now they can feel you outside of line of sight within 13 tiles from themselves, and every third turn (± one turn) they are gonna split out a clone. These clones are actually slightly weaker than the adult Celatid, and cannot reproduce yet, since I decided that the time they are gonna need to mature must last more than what combat spans. And since splitting itself approximately into two takes time, during the turn in which it clones itself, the Celatid has only 50% TUs.

This mod still has some quirks that I can't (or don't know how to) iron out for now, but they are minor.

1. Since the only way to spawn an enemy during combat is via a weapon, the Celatids are actually carrying around grenades that do nothing more than spawn the clones. These grenades can be picked up from the Celatid corpse. I did not assign any sprites to them, so you won't see them, but if you move your mouse pointer next to the Celatid corpse (in the Inventory screen, when standing on the tile with the corpse), you can pick them up. There is no way around this for now. Fixed.

2. If the Celatid was killed during the alien turn in the end of which it was gonna clone itself (i.e. alien turns 3, 6, 9, etc (± one turn)), then even though it's dead, its clone will still appear in the end of this turn. This is gonna be rather rare because it can only happen if it's killed during the alien turn, and only every third alien turn to boot, but it's still possible (if the Celatid is killed with reaction fire from your troops or with friendly fire from aliens). There is also no way around this for now.

Other than that it works fine.

I would like to express my gratitude to Yankes for his script language and his explanations on how to use it, and to Meridian and Solarius Scorch for explanations on rulesets.

---

Attached the version 0.9. The first of the mentioned issues is fixed.

71
OXCE Support / Re: How many TUs do aliens reserve?
« on: August 20, 2019, 11:43:13 pm »
Thanks! This will help a lot! :)

72
OXCE Support Y-scripts / Re: Scripting basics
« on: August 20, 2019, 11:20:13 pm »
Aha, thanks!

73
OXCE Support Y-scripts / Re: Scripting basics
« on: August 20, 2019, 10:09:42 pm »
Could you please give an example of how it's used? I tried this:

Code: [Select]
    scripts:
      createItem: |
        var int chance1;
        var int chance2;
        BattleGame.randomChance chance1;
        debug_log 1 chance1;
        BattleGame.randomRange chance2 0 3;
        debug_log 2 chance2;
        return;

I thought that BattleGame.randomChance assigns a random number (0-99 or something like that) to a variable, and BattleGame.randomRange assigns to a variable a number in range (between 0 and 3 in the case above). But these return errors.

74
OXCE Support Y-scripts / Re: Scripting basics
« on: August 20, 2019, 06:04:08 pm »
Oh, I forgot to ask one more thing: I don't see a way to randomize anything inside a script. Am I missing something, or is this possibility absent for now?

75
OXCE Suggestions DONE / Re: [SUGGESTION] Woundable Reapers
« on: August 20, 2019, 05:18:57 pm »
Thanks, after putting it in REAPER_ARMOR it works :)

Pages: 1 ... 3 4 [5] 6 7 ... 10