1. #1
    Nurgelrot's Avatar
    Join Date
    Dec 2012
    Intermountian West, USA

    Extention Creation Questions

    The latest question:

    I don't want to use Athletics for thrown weapons in my setting. So I assume that I add the following to my onInit()

    registerWeaponType("Thrown", "Throwing", true)
    or even
    registerWeaponType("Thrown Knife", "Throwing Knife", true)

    If I wanted to really get into the crunchy weeds of skill specialization.

    My question is: Should I or do I have too explicitly call unregisterWeaponType("Thrown") beforehand? Or will mine just overwrite the default: and that's fine to do?

    Sorry I know this stuff is nit-picky and I already have it working I just want my extensions to be as code correct as possible. I find that proper use really cuts down on the bugs and makes bug hunting easier.
    Last edited by Nurgelrot; July 3rd, 2019 at 04:22.

  2. #2
    Ikael's Avatar
    Join Date
    Jan 2008
    WeaponManager.registerWeaponType does not replace/update existing weapon types, it will always add new one. If you want to update existing one, you could use WeaponManager.unregisterWeaponType to unregister is first and re-register it again. Alternatively you could fetch existing one with WeaponManager.getWeaponTypeTitles, update its properties and store changes with WeaponManager.updateWeaponType.
    "Alright, you primitive screwheads, listen up: THIS... is my BOOMSTICK!" -- Ash Williams, Army of Darkness

    Post your SavageWorlds ruleset feature requests and issue reports here!

    Enhance your core Savage Worlds ruleset with SW Enhancement Extensions, get more to savage!
    Want to create SW NPCs quickly? Use SW NPC Maker extension!
    Want to prove your dices are cursed or blessed? Try out SW Roll Statistics

Thread Information

Users Browsing this Thread

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

Posting Permissions

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

Log in

Log in