Unintended target behaviour, and vehicle weapons

Discussion in 'Fallout Tactics Modding' started by Bigwilleh, May 10, 2019.

  1. Bigwilleh

    Bigwilleh First time out of the vault

    Apr 30, 2019

    Two things to ask about today: game behaviour when an unintended target gets hit with aimed shots, and vehicle weapons and/or how they can be implemented.

    1. Is it possible to modify the game such that hits on unintended targets from aimed shots behave like an un-targeted shot instead (not quite like 1 and 2 missed shot behaviour, I still want criticals on accidental hits, but not the targeting).

    The functional reason I want to change this is it drives me nuts when something rounds a corner I didn't expect (and/or I'm being lazy and deathballing) and my snipers blind half my squad, and the aesthetic reason is it really doesn't make sense that you aim a called shot on one entity and anything you hit will use the same called shot (why would my squadmate's eyes line up perfectly in the shot at a radscorpion's eyes except by pure random chance?).

    2. Regarding vehicle weapons, can you attach non-animated weapons to a vehicle, can you attach more than one weapon to a vehicle, and can you restrict vehicle weapons' firing arcs?

    For the former part, I have in mind trying to add in vehicle upgrading, allowing the player to strap on machine guns to the vehicles (for implementation I have in mind trying by adding a vendor and a vehicle zone in each bunker, and if you leave the bunker with a vehicle in the zone and a gun you can attach to it in the vendor's inventory, it deletes the vehicle and replaces it with a different variant of the same vehicle with that weapon type attached, preferably either transfering the vehicle's inventory to the new one, or otherwise dumping its inventory on the floor). Other upgrades I have in mind are varying armor retrofits that alter the vehicle's damage thresholds, damage resistances, and driving characteristics.

    For the middle and latter parts regarding multiple guns and firing arcs, I'm mostly looking at the tank. The model in game looks presumably similar to an M4 Sherman variant, which should have a top-mounted Browning M2, a .30 cal MG coaxial to the main gun, and a hull mounted .30 cal MG. I think it would be neat if it is possible to a) add each of these armaments for the crew to use if they want, and b) to restrict their lines of fire appropriately.
  2. nadeauhugo

    nadeauhugo Author of FOT mod THE SUM Modder

    Mar 9, 2014
    Hi there!

    For your first question, I think you should check with Melindil, or a other .exe/engine editing guru like him. He already patched the burst effect, so it may even already be in his list to repair called shots.

    As for the second version, it is totally feasible, except to control vehicle inventories. There is no such trigger to do that. Also, you will have some problems if there is someone in the vehicle you want to switch. I know that in the triggers you can detect some entity behaviors, like moving. But I think there is nothing to detect a car being used. If you want to add plating on top of that, I am afraid you will have to multiply the number of cars (platings X turrets) in order to make it work.

    You could always remotely destroy the car you switch, forcing the players inside to move out before moving the vehicle to a hidden place or changing its player to a deactivated one. That way you will have no bug, but possibly a explosion sound and animation, and no way to revert to a previous vehicle state.

    Another solution would be to prevent the vehicle from going elsewhere than the garage in the bunker, and placing the mecanist out of the garage. Then you only switch the vehicle if there is no human player inside the garage.
  3. nadeauhugo

    nadeauhugo Author of FOT mod THE SUM Modder

    Mar 9, 2014
    And you can always add a dialog note saying : « take your stuff out before we make the improvements on your tank. All items left behind will be kept by the brotherhood. »
  4. Bigwilleh

    Bigwilleh First time out of the vault

    Apr 30, 2019
    In terms of dealing with players inside the car, I have in mind that the trigger for it is car in replacement zone, pre-requesite item is only item in upgrade NPC's inventory (to avoid hung scripts on multiple items), and all player entities in exit grid...a) to instill at least some feel of "this might take a few hours", and b) to avoid conflicts with players sitting in the car.

    My biggest concern is definitely the inventory, because without a way to dump the inventory on the floor, that could be a quick way to nuke a player's stuff. That said, barring inventory, there's always all caps warnings of empty the car first.

    Addendum: After taking a bio break mid-composition of my reply, I thought of a solution to all of the above (its a bit blunt and brute force granted, if the correct checks are available): the triggers are vehicle in the upgrade spot, vehicle's inventory contains only the appropriate upgrade blueprint and appropriate weapon (prints sold by the upgrade npc), and all players are in the exit grid, and script execution is delete vehicle, replace with appropriate upgraded vehicle, and force restock of upgrade npc. Would this work?

    I do realise that two dimensional variation will require much copy-pasta work, and three dimensional is just unrealistic. I'm thinking along the lines of each vehicle has 3 available armaments and 3 available armor kits, as well as the standard kits; something along the lines of the following (which would only require 16 vehicle entries for each vehicle if my arithmetic is on point today):

    Scout car:

    Upgrades available at Bunker Gamma

    armaments available: M60, M249, avenger minigun

    plate/chassis kits available:
    standard (as is in game)
    added seating (+2 seats, -2 normal and explosive DT, -1 all other DTs, -5% all resistances, +25 hp)
    reinforced plating (-2 speed, -1 acceleration, +4 normal and explosive DT, +3 all other DTs, +10% all resistances, +50 hp)
    enhanced drive train (+2 acceleration, +2 steering)


    Upgrades available at Bunker Beta

    Armaments available M60, M249, Browning M2

    plate/chassis kits available:
    Lightweight (-3 all DTs, -10 all resistances (doubled for gas and fire), +3 speed, +2 acceleration, -25 hp)
    Reinforced plating (-2 speed, -0.5 acceleration, +3 all DTs, +10 all resistances)
    Reinforced and Sealed (-3 speed, -0.8 acceleration, -0.5 turning, gas and fire resistances raised to 100%, +3 all DTs, +10 all resistances)


    Upgrades available at Bunker Gamma

    Armaments available Browning M2, Vindicator Minigun, Rocket Launcher

    Plate/chassis kits available:
    Enhanced suspension and drive train (+1 speed, +2 steering, +0.2 acceleration, -10 fire threshold, -30 fire resistance)
    Urban combat package [reactive armor, reinforced underbelly] (raises explosive resist to 95%, -0.2 acceleration, +100 hp)
    Nuclear Strike Survival Package [sealed, EMP hardened; intended to survive near nuclear strike] (raises gas, fire resists to 100, electric resist to 85, all other DT and DR gain +5/+15; +200 hp; -2 speed, acceleration reduced to 0.3)

    Tank (M4 Sherman)

    Upgrades available at Bunker Delta

    For this one, instead of independant armaments and hulls, I figure it should be different standards of the Sherman design that it could be converted to. Each will be an upgrade over standard rather than a side-grade, but these upgrades will be costly, and possibly permanent. Each will also require a different ammo type (the guns will be otherwise the same, but the ammo will apply different modifiers).

    Chassis configurations available
    M4A3E8 (Adds +1 speed, +0.3 turn rate and acceleration, +100 hp, converts gun to 76mm (available shells 76mm AP (+60% pen, +140% damage), 76mm HE (+20% pen, +185% damage))
    M4A3E2 (-0.5 speed, +300 hp, adds 10 to explosive, energy, normal DT, adds 20% to all resists (max 95%), same gun as M4A3E8)
    Firefly (-1 seating, converts gun to british 17 pounder (although the brotherhood knows to remove the flawed muzzle break so it doesn't suffer from accuracy); ammo: 76mm APDS (+80% pen, +150% damage), HESHDS(+40% pen, +195% damage))

    Part of me wants to add the crab as an available retrofit, but I don't know how well the game could implement the mine flail on a vehicle (though it seems to work fine on a creep, so maybe theres hope).
  5. Melindil

    Melindil First time out of the vault

    Apr 15, 2018
    This is something that FTSE should be able to handle in 0.40. I do need to double-check some things, since the game code I've probed doesn't behave like described - shots hitting teammates are coded to not be critical hits (though non-teammate accidental shots still can crit), and I haven't yet found where regular single-shot guns trigger accidental hits (might be part of the critical miss mechanic, which I've found but not currently decoded).
  6. Bigwilleh

    Bigwilleh First time out of the vault

    Apr 30, 2019
    I suspect the game code of possible vestigial script then, because if you cluster a squad togethor and tell them all to aim for eyes, it only takes about 2 trigger pulls until at least one of them is blind most of the time.