STAR TREK 2d20
  1. #1

    Join Date
    Sep 2020
    Location
    Ballston Lake, NY
    Posts
    604

    Vehicle Attacks from CT Not Working

    This is for the SWADE ruleset.

    We had a slew of errors last night during combat, enough that vehicle combat was unplayable. The recent updates fixed almost all of them.
    A remaining bug is that you can't roll vehicle attacks or damage from CT.

    Here's what it looks like:
    vehicle_attack_ct.jpg

    The entry in the cyan box is what appears when clicking on the vehicle weapon in CT. It's the same for attack and damage.
    If you open the vehicle and click on the weapon in the character sheet, it rolls attack and damage correctly, as you see under the cyan box.

    This works properly for NPCs. It affects only vehicles.
    There is a NPC assigned to pilot and to the weapon, and a target is selected.

    Let me know if you need more information.
    Thanks!

  2. #2
    @Mike,

    Can you provide the campaign folder zipped up, as well as steps to recreate? Or a walk through to see in a new campaign?
    (I tried with an Apache from SWADE, and dropped a pilot in the vehicle record on the second tab, and the attack/damage rolls seemed to be working for me.)

    Thanks,
    JPG

  3. #3

    Join Date
    Sep 2020
    Location
    Ballston Lake, NY
    Posts
    604
    I investigated further and discovered a few things.

    The problem vehicles have two similar weapons, e.g. two medium laser cannons.
    The vehicles that are not working correctly are from my setting module. It may be affecting vehicles in other modules, but I don't have any other modules with vehicles set up with two similar weapons.

    The pilot is not being assigned properly to those duplicate weapons.
    If I drop the pilot or another NPC into the weapon slot, it works correctly.
    If I remove the pilot from the weapon, it continues to work correctly.

    Here's an example:
    some_working.jpg
    The weapon in the cyan square is not working properly, and it's the weapon the pilot is not perpetuating to correctly. Notice the weapon shows only damage in CT. When clicked it doesn't roll, and shows the "weapon +4" message.
    The weapon in the green rectangle shows the attack die and is the weapon I dropped the pilot into. This weapon rolls attacks correctly.

    Here you see a vehicle with two different weapons (in green).
    The lower vehicle (in blue) has two similar weapon.
    working_vs_not.jpg
    Both have a pilot assigned, and the Piloting Skill shows under Traits, as it should.

    I cleaned out CT before setting this up, so there's nothing leftover from pre-updated code.
    When I exit this campaign, I get "Object databasenode deleted without cleaning up attached Lua object.

    I'll zip up my campaign, module, and error log and attach that.

  4. #4

    Join Date
    Sep 2020
    Location
    Ballston Lake, NY
    Posts
    604
    Here's my error log generated after exiting the campaign.
    The zipped campaign and mod files are too large to attach.
    You can download them from here:
    my google drive
    Attached Files Attached Files

  5. #5

    Join Date
    Sep 2020
    Location
    Ballston Lake, NY
    Posts
    604
    I figured out what's happening.

    In my module. I add an NPC pilot to the vehicles. The idea being that it will save me time during game. When I drop a vehicle into CT, it will already have the pilot assigned.
    That doesn't work as I expected. The vehicle doesn't have a pilot assigned when dropped into CT.

    If you look at the vehicle in the <combattracker> node, you'll see that pre-assigned npc under the vehicle and weapon. e.g.
    Code:
    <actor type="windowreference">
    	<class>npc</class>
    	<recordname>reference.npcs.jumpcorp_pilot_kalian@Quar Dai - GM</recordname>
    </actor>
    is set, so it's carrying over from the exported module.

    vehicle_combat.lua and mountedweapon_listentry.lua doesn't pick this up, so the npc doesn't display in CT.
    When I drop an npc into the pilot position, it's already assigned to the weapons, so it doesn't notify CT to refresh the Attacks section.
    When I drop the npc into the weapon section, it fires the notifications, and CT refreshes the Attacks section, but only for that single weapon.

    This is why the attacks work from the vehicle character sheet as expected; the npc is already assigned.
    However, the vehicle character sheet doesn't display the assigned npcs either. Even though the <actor> nodes are set properly.

    The fix is to not assign npcs to vehicles in the module being exported.
    When I cleared those npcs from the vehicles and exported, the bug didn't happen.

    It would be nice to be able to pre-assign npcs to vehicles in the module. It would be a time saver.
    Alternatively, it would be nice to be able to assign npcs to vehicles when creating encounters. But that's not possible because module vehicles are locked.

    In the end, this isn't a bug. It's a "didn't work like I thought it would".

  6. #6

    Join Date
    Sep 2020
    Location
    Ballston Lake, NY
    Posts
    604
    Further discoveries.

    If you drop npcs into all the vehicle weapon slots on the combat tab, export that module, and use that vehicle in a campaign, that sets all the weapon attack dice properly, and the piloting/driving die.

    For vehicles that are not pre-populated (like the SWADE book and Vehicles Guide), when you drop a character into the pilot slot, the weapons all take on the pilot's attack dice by default, which is nice.
    Except when you remove the pilot, the weapon attack dice don't update in CT. But when you click on a weapon, it will roll as unskilled, whatever the attack dice say. It should refresh the CT to remove attack dice. So there's a small bug there, fortunately nothing breaking.

    That means, if you're going to pre-populate your vehicles with NPCs to speed up vehicle combat setup, you must populate all the positions. Otherwise, leave all the positions blank to avoid this "bug".

  7. #7
    We actually suggest that all adventure modules are built as non-read-only, so that they can be customized by the GM to fit the needs of the session. Only core rulebooks are recommended for read-only to preserve base content.

    Did you figure out where in the scripts where the lookup was failing?
    I can take a quick poke around to see if I can figure out where the limitation is, but no guarantees.

    Regards,
    JPG

  8. #8
    I dug in a little bit with your example campaign. For the weapons where you had problems, it looks like the NPC references are set up to point to "Quar Dai - Player" module, instead of the "Quar Dai - GM" module. (i.e. reference.npcs.tazanianpilot@Quar Dai - Player)

    Did you perhaps change the modules around at some point?

    I'm not sure if this is applicable; but it's usually best not to load modules into the campaign you are building the module in, to avoid any linking issues in the export.

    Regards,
    JPG

  9. #9

    Join Date
    Sep 2020
    Location
    Ballston Lake, NY
    Posts
    604
    I just noticed that too. I don't know how it's doing that. The module isn't loaded into it's own campaign. Though I was testing a module load script which loaded it, but I unloaded it. Maybe something is still pointing at it.
    Thanks for looking at that. Good to know it's on my end.

    In looking at the module deeper, I found other links pointing to the wrong module. I'm now thinking this is from before I split the module into a player and GM version.
    Sorry for the wild goose chase.
    Last edited by Mike Serfass; March 13th, 2023 at 04:00.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
FG Spreadshirt Swag

Log in

Log in