OpenXcom Forum

Modding => Work In Progress => Topic started by: Arpia on October 27, 2013, 06:08:35 pm

Title: items with 2 or more battleType's?
Post by: Arpia 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??
Title: Re: items with 2 or more battleType's?
Post by: Svanh 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.
Title: Re: items with 2 or more battleType's?
Post by: Arpia 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.
Title: Re: items with 2 or more battleType's?
Post by: SupSuper 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.
Title: Re: items with 2 or more battleType's?
Post by: Sharp 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.
Title: Re: items with 2 or more battleType's?
Post by: Svanh 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.
Title: Re: items with 2 or more battleType's?
Post by: SupSuper on October 28, 2013, 07:41:12 pm
You can have one-use clipless weapons now, just specify the appropriate clipSize with no compatibleAmmo.
Title: Re: items with 2 or more battleType's?
Post by: Sharp on October 28, 2013, 10:20:37 pm
So that is one-use and weapon is no more or just one-use per battle?
Title: Re: items with 2 or more battleType's?
Post by: SupSuper on October 28, 2013, 10:31:41 pm
Per battle.
Title: Re: items with 2 or more battleType's?
Post by: Arpia on October 28, 2013, 10:56:23 pm
thankyou! ^.^
Title: Re: items with 2 or more battleType's?
Post by: moriarty 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.
Title: Re: items with 2 or more battleType's?
Post by: Arpia on November 13, 2013, 08:17:42 pm
have you tried setting the items [recover] flag to false? like unit corpses
Title: Re: items with 2 or more battleType's?
Post by: moriarty 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.
Title: Consumables.
Post by: Arpia 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.
Title: Re: items with 2 or more battleType's?
Post by: moriarty 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 :)
Title: Re: items with 2 or more battleType's?
Post by: BlackLibrary on February 27, 2014, 02:14:28 am
Moriarty or whoever...was this last request ever implemented?
Title: Re: items with 2 or more battleType's?
Post by: tuszek on March 05, 2014, 12:58:32 pm

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.

Well i think it does. I tried to mod laser weapons to recieve a booster pack that would increase power for a shot or two, but leave the weapon with unlimited ammo normally. So i left the clipsize alone and put compatible ammo for it. In battlescape it looked like a normal laser rifle, but i culd not shoot with it until i loaded it with a booster. I fell back on the exchangeable battery laser idea with 2 kinds of clips.