Author Topic: items with 2 or more battleType's?  (Read 12086 times)

Offline Arpia

  • Colonel
  • ****
  • Posts: 116
    • View Profile
items with 2 or more battleType's?
« on: October 27, 2013, 06:08:35 pm »
Is it possible to set items to function as ammo for a weapon AND have grenade behavior when used on its own?
My thinking was basically a modified Small Launcher, able to fire standard alien grenades as well as stun bombs. And also to let stun bombs be primed and thrown as grenades by hand.
My tinkering doesn't seem to yield the desired results.

i also wanted to make a new alien grenade that was both HE and INC. To go with this improved SLauncher

...while I'm at it, I also had an idea for what I call a splinter rifle, a low damage alien AP weapon... that keeps generating extra wounds per turn (aka - bleeds you out) until treated with a medkit... or until you die of major blood loss.
but I have no idea how to even begin to do that ._.

Also! while messing with rulesets, i'm not sure if this is a limitation or an oversight or intended...
but I can't make a one-shot laser weapon. internal battery capable of a single shot, gets recharged once back at base (aka no ammo)
the wiki says: https://www.ufopaedia.org/index.php?title=Rulesets_(OpenXcom)#Items
compatibleAmmo: List of string IDs of the ammo items that can be loaded on this weapon. If none are specified, the weapon doesn't need ammo.
clipSize: The amount of ammo stored in each weapon clip. If -1 is specified, this weapon has infinite ammo.

so it tells me if I set the clip to 1, and don't set the ammo... that the weapon would have 1 shot and doesn't require ammo. but what happens is it tells me theres no clip loaded.
oversight? limitation? am I doing it wrong??
« Last Edit: October 27, 2013, 06:51:26 pm by Arpia »

Offline Svanh

  • Captain
  • ***
  • Posts: 70
    • View Profile
Re: items with 2 or more battleType's?
« Reply #1 on: October 27, 2013, 11:56:50 pm »
The splinter rifle is impossible at this time. Fatal wounds are only guaranteed when a soldier takes more than 11 damage so a weapon won't always cause fatal wounds unless it causes 11 damage through every armour. Bear in mind that aliens don't take fatal wounds unless they are shot when you have MCed them.

As far as I can tell, compatibleAmmo doesn't affect the weapon needing ammo, only clipSize does. You can have an infinite-ammo weapon or one that requires some sort of clip. The wiki is not to be trusted in several areas. It says that setting the percentage of TUs required for auto/snap/aimed shot to 0 means the weapon doesn't have one but the weapon ends up having a zero-cost shot (You can fire an infinite amount in a turn).

I'm fairly sure dual battleTypes aren't possible right now. Hope this helped, even if it does shoot down some of your ideas.

Offline Arpia

  • Colonel
  • ****
  • Posts: 116
    • View Profile
Re: items with 2 or more battleType's?
« Reply #2 on: October 28, 2013, 01:22:00 am »
thanks, it does help... sort of. well, it tells me that i'm not doing it wrong atleast.

the idea behind the splinter rifle was that its an alien terror weapon. So it doesn't need to work against the aliens, just against xcom. i suppose it'd work more if we were able to set how much armor a weapon/item could ignore... then we could have true armor-piercing weaponry.

the ammo thing is a bit of a let down though... since theres no room for a weapons with a limited charge and non replaceable clip. The idea was trying to make certain weapons a little more tactical - high damage output but you only get one shot... and only one shot. i could make it so that its one shot per clip, but then you can just load up on clips, defeats the point of it.

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: items with 2 or more battleType's?
« Reply #3 on: October 28, 2013, 04:46:09 am »
The splinter rifle is impossible at this time. Fatal wounds are only guaranteed when a soldier takes more than 11 damage so a weapon won't always cause fatal wounds unless it causes 11 damage through every armour. Bear in mind that aliens don't take fatal wounds unless they are shot when you have MCed them.

As far as I can tell, compatibleAmmo doesn't affect the weapon needing ammo, only clipSize does. You can have an infinite-ammo weapon or one that requires some sort of clip. The wiki is not to be trusted in several areas. It says that setting the percentage of TUs required for auto/snap/aimed shot to 0 means the weapon doesn't have one but the weapon ends up having a zero-cost shot (You can fire an infinite amount in a turn).

I'm fairly sure dual battleTypes aren't possible right now. Hope this helped, even if it does shoot down some of your ideas.
If the wiki isn't to be trusted, then you can fix it, that's why it's a wiki.

Multiple BattleTypes are impossible, but we'll look into the other issues.

Offline Sharp

  • Colonel
  • ****
  • Posts: 181
    • View Profile
Re: items with 2 or more battleType's?
« Reply #4 on: October 28, 2013, 10:40:24 am »
the ammo thing is a bit of a let down though... since theres no room for a weapons with a limited charge and non replaceable clip. The idea was trying to make certain weapons a little more tactical - high damage output but you only get one shot... and only one shot. i could make it so that its one shot per clip, but then you can just load up on clips, defeats the point of it.

You can just make the weapon itself fairly light but have the clip be heavy and large. I mean if the way you want it to work is possible then instead of loading up on clips you would just be loading up on weapons which has the same result.

That being said it should be possible to have a weapon with limited shots and recharge after battle, unless plasma hovertanks are different in OXC and aren't limited to 255 shots, haven't actually built them in my games in OXC but looking at ruleset it seems same as laser weapons so might be infinite shots.
« Last Edit: October 28, 2013, 12:47:27 pm by Sharp »

Offline Svanh

  • Captain
  • ***
  • Posts: 70
    • View Profile
Re: items with 2 or more battleType's?
« Reply #5 on: October 28, 2013, 12:40:40 pm »
You can just make the weapon itself fairly light but have the clip be heavy and large. I mean the if the way you want it to work is possible then instead of loading up on clips you would just be loading up on weapons which has the same result.

That being said it should be possible to have a weapon with limited shots and recharge after battle, unless plasma hovertanks are different in OXC and aren't limited to 255 shots, haven't actually built them in my games in OXC but looking at ruleset it seems same as laser weapons so might be infinite shots.

The HWPs that require ammo have the ammo's bigSprite set to -1 so it can't be equipped to a craft and doesn't show up in the battlescape as an item. Due to the weapon being HWP-mounted, it is auto-loaded. Attempting to use this property for non-fixed weapons doesn't work. You just end up with a weapon you can't load due to not being able to equip the ammo to the craft.

Making the ammunition large enough that is can only be auto-loaded would be a way to force only one shot per weapon in the absence of a cleaner solution.

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: items with 2 or more battleType's?
« Reply #6 on: October 28, 2013, 07:41:12 pm »
You can have one-use clipless weapons now, just specify the appropriate clipSize with no compatibleAmmo.

Offline Sharp

  • Colonel
  • ****
  • Posts: 181
    • View Profile
Re: items with 2 or more battleType's?
« Reply #7 on: October 28, 2013, 10:20:37 pm »
So that is one-use and weapon is no more or just one-use per battle?

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: items with 2 or more battleType's?
« Reply #8 on: October 28, 2013, 10:31:41 pm »
Per battle.

Offline Arpia

  • Colonel
  • ****
  • Posts: 116
    • View Profile
Re: items with 2 or more battleType's?
« Reply #9 on: October 28, 2013, 10:56:23 pm »
thankyou! ^.^

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: items with 2 or more battleType's?
« Reply #10 on: November 13, 2013, 05:41:19 pm »
ah, so this was the thread... finally found it again. sooo, SupSuper, do you think it would be possible to add another option to the ruleset, to allow clipless weapons with limited number of shots that disappear after use?

while I honestly have no idea how that could be explained and handled for weapons with more than one shot, it would be certainly nice for single-shot weapons. for example a "drone" type weapon (guided projectile, like an RC plane with explosives) - once you use it, it's gone for good and shouldn't reappear after combat.

Offline Arpia

  • Colonel
  • ****
  • Posts: 116
    • View Profile
Re: items with 2 or more battleType's?
« Reply #11 on: November 13, 2013, 08:17:42 pm »
have you tried setting the items [recover] flag to false? like unit corpses

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: items with 2 or more battleType's?
« Reply #12 on: November 13, 2013, 08:55:37 pm »
actually, no... I figured it wouldn't work, because the item disappears after use, so it's not lying around for "recovery"... maybe I should try ;)

EDIT: no, that's not good... took two shape charges with me on a mission (with recover: false), used one, went back to base - both were gone :(
apparently, if you bring anything with you that has recover: false, it's not coming back. even if it's in the skyranger when you abort the mission.
« Last Edit: November 13, 2013, 09:11:23 pm by moriarty »

Offline Arpia

  • Colonel
  • ****
  • Posts: 116
    • View Profile
Consumables.
« Reply #13 on: November 13, 2013, 09:18:08 pm »
hmm... it seems like the game is missing 'consumable' items. feature request? I know it'd be great for other things too. like single use healing items. could be used for 'potions' for that fantasy mod.

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: items with 2 or more battleType's?
« Reply #14 on: November 13, 2013, 09:32:50 pm »
exactly :) or "stim-packs" for modern settings. or a thousand other uses :) single-use flares, for example. oh, those would need some new mechanics: "only give light once activated" or something like that... or, actually, that could be done already: by making them a grenade that instead of exploding spawns a non-recoverable light source. which reminds me that I still don't know how to make a grenade spawn something else. I remember Warboy saying that it was possible, but I don't think he ever said how :)