aliens

Author Topic: Operator call on a Scalar[]  (Read 3960 times)

Offline RSSwizard

  • Commander
  • *****
  • Posts: 748
    • View Profile
Operator call on a Scalar[]
« on: February 02, 2018, 03:47:48 am »
Just started getting this error on a mod im working on, but it will not mention the line/column where its getting it.

Im guessing this may have something to do with accuracy multiplier or damage bonus bits because thats what I was mainly adding in. Particularly using flatHundred to impose a penalty in both cases. Is that whats causing it? (im gonna be pretty pissed if it is) If it is that then will putting it in the format "flatHundred: [-0.12]" fix it?

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1510
    • View Profile
Re: Operator call on a Scalar[]
« Reply #1 on: February 02, 2018, 06:46:46 am »
Upload the mod that's having the issue.

Offline RSSwizard

  • Commander
  • *****
  • Posts: 748
    • View Profile
Re: Operator call on a Scalar[]
« Reply #2 on: February 02, 2018, 10:34:22 pm »
due to buggy internet I lost my message, but I think I solved the problem anyway...

one instance of "costThrow: 0" because thats a header not a property, meant to put "tuThrow: 0" to shut off the ability to throw the item
(items under 2 pounds behave funky when thrown in vanilla, I have to assume they crash in OXC too, but most ammo clips especially loose ammo like shotgun shells weighs 1 pound or less)

do you know if setting flatHundred to a negative value will impose a penalty, or if its range of output is limited to positive numbers only?

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8597
    • View Profile
Re: Operator call on a Scalar[]
« Reply #3 on: February 03, 2018, 01:30:46 am »
do you know if setting flatHundred to a negative value will impose a penalty

yes

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1510
    • View Profile
Re: Operator call on a Scalar[]
« Reply #4 on: February 03, 2018, 01:31:10 am »
I don't think there is a problem with weight and throwing in OXC. I just tested by throwing a 1 weight item across the battlescape using a soldier with 60 strength.

I have never used flatHundred command, sorry. I don't even know what it's for. I'd just take Meridian's word on it.
« Last Edit: February 03, 2018, 01:48:16 am by The Reaver of Darkness »

Offline RSSwizard

  • Commander
  • *****
  • Posts: 748
    • View Profile
Re: Operator call on a Scalar[]
« Reply #5 on: February 09, 2018, 08:15:11 pm »
Thanks guys. About the item weight I remember setting it to 1 in the vanilla game and sometimes it would crash I guess because most items were set to 3 pounds and the throwing trajectory equation was balanced around that.

(Another thing is loose ammo isnt the kinda thing you just throw around, unless you want shells just tossed like a pile of pebbles, so setting them to weight 0 and turning off the ability to throw them is actually okay. Things like shotgun shells still weigh like 10-12 per pound, and have no clip or magazine to add extra weight. The damage they do against carrying capacity is the fact they take up so much space in the pockets, a pile of shotgun shells takes up alot of space. Stuff like a 2-shell buckshot pack definitely should have a weight of 0 since after all you're only going to be able to hold 2 shells per inventory space)

As for the FlatHundred thanks alot and thats excellent.
Because it means I can do the following things:

* Weapons that rely on damage bonuses due to stats can have an "average" value automatically considered in their equation for those stats, and use a penalty to undercut that to the amount you actually intend it to be so, that the Displayed value is more representative of what you might see.

Example being the silenced pistol in piratez, which adds 1/4 reactions to damage, but only displays 10 firepower; using this mechanism you can set it at 25 firepower assuming that someone will have 60 reactions and apply a -15 damage penalty behind the scenes.

* Weapons like the Panzerfaust with a shaped charge (but a small explosion) can apply a damage penalty (like -65) to the firepower and then tweak the DamageAlter so that it still has the same effectiveness against targets (tohealth, towound, tostun). Since this makes it do 60 explosive damage (but appears to do 125 as per the pedia article) the displayed explosion effect is going to be small.

Pretty much being able to present to the player what something does, without it getting in the way of the actual dynamics involved.
« Last Edit: February 09, 2018, 08:17:20 pm by RSSwizard »