Skip to content

Add `isElectronic` / `providesHardening` to Gear

Ryan Walder requested to merge ryanw/electronic-items into dev

Intent

  • Adds an isElectronic / providesHardening flags to
    • cyberdeck
    • cyberware
    • gear
    • itemUpgrade
  • Updates items in compendia with flags
  • Migration for world/owned items
  • Add Get EMP'd Items System Macro
  • Adds utility script to get translated names from Babele files

  • This is meant for a hotfix
  • This is meant for the next release (see milestone)
  • This needs more reviewers than normal, there may be controversy or high complexity
  • This intentionally introduces regressions that will be addressed later
  • There is/will be documentation changes on the wiki
  • Please do not send commits here without coordinating closely with the owner
  • This is a Build System change

Related Issues

Steps to Test

Fresh World

  1. Create new Gear Item
  2. Can set it to be Electronic / providesHardening in Settings
  3. Check it has Electronic shown in the Description Sidebar
  4. Review the changes to packs/gear check if an item should be electronic or not and confirm it has isElectronic set correctly

image

image

Macro Testing

  1. Create some Actors (Character/Mook)
  2. Add them to a Scene
  3. Add/Install Cyberware
    • Add some Shielding/Hardening Cyberware
    • Add some Meat Cyberware
    • Add some Cyberware items (Battleglove etc.)
  4. Add some Cyberdecks
    • Add Shielding/Hardening Upgrades to a Cyberdeck
    • Equip some Cyberdecks, Own some of Cyberdecks, Carry some Cyberdecks
  5. Add some electronic and non electronic Gear
    • Electronic: Agent, Linear Frame, etc.
    • Non-Electronic: Kibble, Rope, etc.
    • Equip some Gear, Own some of Gear, Carry some Gear
  6. Repeat on multiple Actors
  7. Import Get EMP'd Items Macro
  8. Select some Actors in the scene
  9. Run the Macro
  10. Should output a Chat message with 2 items selected

Migration

As per src/modules/system/migration/scripts/009-isElectronic.js we do a best effort to migrate world items with the same names as the items in the compendia. Testing a migration would be prudent.


  • It should output 2 of (or 1 of if they only have 1):
    • Installed Cyberware (non Shielded/Hardened)
    • Equipped/Carried Cyberware Gear (non Shielded/Hardened)
    • Equipped/Carried Cyberdecks (non Shielded/Hardened)
    • Equipped/Carried (Electronic) Gear

Example:

image

Test Migration

  1. Checkout dev/Build/Load Foundry
  2. Create some Actors (Character/Mook)
  3. Give them some Electronic/Non-Electronic Gear
    • Electronic: Agent, Linear Frame, etc.
    • Non-Electronic: Kibble, Rope, etc.
  4. Close Foundry
  5. Checkout ryanw/electronic-items/Build/Load Foundry
  6. Load world
  7. Let Migration finish
  8. Check electronic/non-electronic items have migrated

Additional Notes

Much like Concealability this isn't really used directly within the system but is useful for applying the effects of an EMP in a macro, module developers, future automation etc.

Edited by Ryan Walder

Merge request reports