#Weapon overhaul

1 messages · Page 1 of 1 (latest)

regal robin
#

here

lusty token
#

Ok, thank you.

regal robin
#

I hate to do it, but let's start at the beginning. What are you trying to do here? Do you want to add some new weapons with a new category or is this a complete reworking/recategorization of the weapons?

lusty token
#

Complete recategorization.
Light Weapons
Versatile weapons
Heavy weapons
Polar weapons
Thrown weapons
Ranged weapons
Exotic weapons
Improvised weapons
Unarmed combat

#

I have removed the simple, martial types

regal robin
#

So instead of Simple and Martial, you want all these to be top-level categories

#

okay

lusty token
#

Yes.

regal robin
#

Normally I prefer to add/delete from the config objects rather than replace the entire thing, but maybe in this case it'd be better to just wholesale replace everything.

#

The system already calls out unarmed strikes separately now. I don't know how that fits with your overhaul so for simplicity, I'm going to leave it out.
I'd start with the CONFIG.DND5E.weaponProficiencies

#
CONFIG.DND5E.weaponProficiencies = {
  light: "Light",
  versatile: "Versatile",
  heavy: "Heavy"
  // and so on
};
#

I think you already have this

lusty token
#

Yes, but each proficiency is a separate config line instead of grouped

#

Example:

CONFIG. DND5E. weaponProficiencies. light = "Light Weapons";

Done same with mapping and types

regal robin
#

Then you have the weaponProficienciesMap, something like

CONFIG.DND5E.weaponProficienciesMap = {
  // all these names are going to be used later in weaponTypes
  // the values are the property names in weaponProficiencies
  lightM: "light",
  lightR: "light",
  heavyM: "heavy",
  // and so on
};
lusty token
#

Disregard.

regal robin
#

I'm following the system's pattern of separating them out to Melee and Ranged attacks

lusty token
#

Realized this

regal robin
#

Then weaponTypes and it's map

CONFIG.DND5E.weaponTypes = {
  // the property names match the ones in weaponProficienciesMap
  // the value is the label shown on the character sheet
  lightM: "Light Melee",
  lightR: "Light Ranged",
  heavyM: "Heavy Melee",
  // and so on
};
#
// maps the weapon types to the kind of attack
CONFIG.DND5E.weaponTypeMap = {
  lightM: "melee",
  lightR: "ranged",
  heavyM: "melee",
  // and so on
};
#

Once you have that, you can create the weapons in your compendium pack and can set their Weapon Type in the Details tab to match the weapon types you've defined

#

And again, you can double-check that the proficiencies show up on a new actor (which you already did)

#

Once the weapons are created, then you can replace CONFIG.DND5E.weaponIds or just add to it. In this example, I'll replace

CONFIG.DND5E.weaponIds = {
  // these property names are just shortened versions of the weapon's name, like a class's identifier
  dagger: "UUID of your dagger",
  hammer: "UUID of your hammer",
  hugeSword: "UUID of your big sword",
  // and so on
};
lusty token
#

So I am copying all the uuid of said weapons of a specific category to the script?

#

This means if I ever add an additional weapon in the future, I will need to add it to the script, correct?

regal robin
#

Do it for all the new weapons you're making. Well, the base version of the weapon that is. Don't add UUIDs for their magical versions

lusty token
#

Ok. Does everything need to be separate or under same hook header?

regal robin
#

You don't have to add a new weapon to the list, but you'll probably want to. Adding a weapon to the list will allow you to:

  • give a PC proficiency on that specific weapon as opposed to the entire weapon type (e.g. just give Dagger proficiency instead of all Light weapons)
  • set it as a Base Weapon for the magical versions, for the automatic proficiency to work
#

You can put all of this in one hook

lusty token
#

I think this is where I am getting confused. Each category has 3-5 weapons under them, exceptions being unarmed combat and exotic weapons. We will ignore those two for the moment.

I have made the weapons under the specific weapon groups in item tab. The weapons themselves have the type set to the specific categories.

Example: Great Axe, weapon type: heavy weapons

In script I have under same hook:

CONFIG. DND5E. weaponTypes. heavy = "Heavy Weapons";

CONFIG. DND5E. weaponProficiencies. heavy = "Heavy Weapons";

CONFIG. DND5E. weaponProficienciesMap. heavy = "Heavy Weapons";

Now I need to go and add a new line:

CONFIG. DND5E. weaponIds. heavy = "Heavy Weapons";

#

Then add the UUID of each heavy weapon to the Ids

CONFIG. DND5E. weaponIds. heavy = "UUID number";

#

Sorry, learning how to do this without any Java experience

regal robin
#

The weaponProficienciesMap is wrong. The property name of heavy is fine, but the value should match one of the property names in weaponProficiencies (i.e. "heavy", not "Heavy Weapons")

lusty token
#

So CONFIG. DND5E. weaponProficienciesMap. heavy = "Heavy";

regal robin
#
CONFIG.DND5E.weaponProficienciesMap.heavy = "heavy"; // value matches the entry in weaponProficiencies
#

the property name, the .heavy part before the equals sign, matches the entry in weaponTypes

#

in the code you shared, it's hard to see that link since they're all heavy

#

One more fix, for the weaponIds line. Do this instead:

CONFIG.DND5E.weaponIds.greatAxe = "the Greate Axe UUID";
#

you add the individual weapons, not a weapon type

lusty token
#

Ok. Followed the instructions using a dagger, and set character to have light weapons proficiency.

This is what the code looks like

#

Still shows up not proficient on a new character

#

I noticed weapons is under map, so took that part off and tried again. Same results

regal robin
#

weaponTypes and weaponProficiencies are fine, but the next two lines need to be fixed

CONFIG.DND5E.weaponProficienciesMap.light = "light";
CONFIG.DND5E.weaponTypeMap.light = "melee";
CONFIG.DND5E.weaponIds.dagger = "Compendium.dnd5e.items.Item.0E565kQUBmndJ1a2";
#

replace the UUID I used for the last line with yours

lusty token
#

Dear lord…. So frustrating
I see what the problem was

#

The Light under profmap was capitalized

regal robin
#

It's real easy to add new base weapons, just have to add a weaponIds line. But adding new (or overhauling) the types and proficiencies is a big task

lusty token
#

Lowered it and working now

#

Checking the rest now

#

Thank you sooooo much! It is working. I feel like an idiot.

regal robin
#

Just learning. This level of system customization can take time

lusty token
#

Last thing I have to do to be up and running is figure out how to change critical hit threshold. Can’t find that anywhere. Still looking into that

regal robin
#

globally, or per actor, or per weapon?

lusty token
#

Per weapon. That is the special feature of heavy weapons, they will crit on a 19-20

regal robin
#

It's in the weapon's Attack activity, on the last tab

lusty token
#

Ahh, ty