Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weapons of Legacy Infrastructure #1146

Open
jonovotny opened this issue Mar 7, 2023 · 15 comments
Open

Weapons of Legacy Infrastructure #1146

jonovotny opened this issue Mar 7, 2023 · 15 comments
Assignees

Comments

@jonovotny
Copy link
Contributor

I am currently working on the Tome of Battle files and the book includes some legacy weapons.
It seems like there is no support for Weapons of Legacy yet. (Apart from the display Feats in the weapons of legacy source)

I am willing to put some work into this, but want to check how to best approach this to fit with the rest of the dataset.
There are 3 main components needed:

  1. Least/Lesser/Greater Legacy Feats: All these are specific to a given legacy item. One way to deal with this would be to literally have 3 different feats for each item (i.e. Least Legacy (Desert Wind), etc.), but that might clog up the feat list. I'm not sure if a CHOOSE:EQUIPMENT|TYPE=Legacy could be used to also grant some internal abilities to track weapon specific boni/penalities. I guess an ability pool would work (i.e. Least Legacy adds to the weapon selection pool in which the player gets to select the ability matching their legacy weapon)
  2. Personal Costs/Penalties: Probably best implemented as internal ability added via ADD:ABILITY when a character gains the Least Legacy feat for a weapon. Penalties persist even if the character loses the weapon, so the ability should probably be displayed in the Misc tab (ADD ensures that the ability persists even if the feat is removed). The ability can then add penalties based on the characters level and progression of the Legacy Feat chain.
  3. Legacy Weapon Benefits: Here I see two options. Either contain all boni directly in the item's line in equip.lst and expand the item's DESC as more abilities get unlocked, or add the boni as Special Abilities (probably leading with the weapon name to keep these abilities grouped up on the character sheet). I could see arguments for either option but would personally lean towards the latter.

Looking forward to feedback on this.

@FerretDave
Copy link
Contributor

Greetings
I have coded up some weapons of legacy already, not sure if I pushed them here or if they are in my own homebrew (but are from an official adventure), will check tomorrow and confirm

@jonovotny
Copy link
Contributor Author

Great, thank you.

ad 1: I think it would work to use
CHOOSE:ABILITYSELECTION|Special Ability|TYPE=Legacy ABILITY:Special Ability|AUTOMATIC|%LIST
and implement a set of Special Abilities that have exactly the same names as the legacy items and no KEY. That way the feat should show something like "Least Legacy (Weapon name)". Though at least the "Desert Wind" item from ToB might cause some ambiguity, since I already added selection abilities by that name (hoeever, those do have a different KEY).

@FerretDave
Copy link
Contributor

Managed to check, it's just in my homebrew files. I have templates that can be freely added to characters that grant the virtual feats (defined as abilities) as they achieve the various 'unlocks', and the equipment uses various PREVARs to update the weapon based on those feats. An example of (bits of!) one are below, though this campaign hasn't been used for a few years so I'm not sure if it's fully up to v6.8 specs, but should suffice to get the idea.
I've got VISIBLE:EXPORT set so the feats are not visible in the GUI.

legacy_template:
Legacy Merthuvial (Unite the People) SORTKEY:Legacy Merthuvial 03 ABILITY:FEAT|VIRTUAL|Greater Legacy ~ Merthuvial PRETEMPLATE:1,Legacy Merthuvial (Know the Pain) PRETEXT:You must forge an alliance between two or more disparate groups of people in order to unite them against a common foe, and you must work to protect them from that foe until the danger is past. Cost 40500

legacy_ability.lst:
Greater Legacy (Merthuvial) KEY:Greater Legacy ~ Merthuvial CATEGORY:FEAT TYPE:Legacy PREEQUIP:1,Merthuvial (Legacy Longsword) VISIBLE:EXPORT DESC:Kings Command.|PREPCLEVEL:MIN=20 ABILITY:Special Ability|AUTOMATIC|Merthuvial ~ Kings Command|PREPCLEVEL:MIN=20 BONUS:VAR|MerthuvialSavePenalty|1|PREPCLEVEL:MIN=18 BONUS:VAR|MerthuvialHPPenalty|2|PREPCLEVEL:MIN=18 BONUS:VAR|MerthuvialHPPenalty|2|PREPCLEVEL:MIN=19 BONUS:VAR|MerthuvialHPPenalty|2|PREPCLEVEL:MIN=20

legacy_equipment.lst
Merthuvial Legacy Longsword KEY:Merthuvial (Legacy Longsword) PROFICIENCY:WEAPON|Longsword TYPE:Magic.Enhancement.Weapon.Melee.Martial.Specific.Slashing.Sword COST:5315 WT:4 CRITMULT:x2 CRITRANGE:2 DAMAGE:1d8 EQMOD:ADAMANT_WEAP.STEEL WIELD:OneHanded SIZE:M !PREALIGN:LE,CE,NE,CN PREATT:3 PRESKILL:1,Diplomacy=2 SOURCEPAGE:p.19 SOURCESHORT:DG/PC SOURCELONG:Pete Campaign SPROP:This jet black longsword is decorated with a single large pearl in the pommel, with a plain hilt. When unsheathed the weapon glows with a light the strength of a torch. In combat this changes to a deep red SPROP:+1d6 electricity damage. On a critical hit deals +%d10 additional electricity damage|CRITMULT-1|PREMULT:2,[PREPCLEVEL:MIN=17],[PREABILITY:1,CATEGORY=FEAT,Geater Legacy ~ Merthuvial] BONUS:EQMWEAPON|CRITRANGEDOUBLE|1|TYPE=NonStackingCrit|PREMULT:2,[PREPCLEVEL:MIN=11],[PREABILITY:1,CATEGORY=FEAT,Lesser Legacy ~ Merthuvial] SPROP:threat range doubled|PREMULT:2,[PREPCLEVEL:MIN=11],[PREABILITY:1,CATEGORY=FEAT,Lesser Legacy ~ Merthuvial]

@FerretDave
Copy link
Contributor

I have these four:
Aegis Inviolable Legacy Shield
Banrhialorg Queens Staff
Merthuvial Legacy Longsword
Nanietharil Legacy Scale Mail

coded up and could add to Bahamuts source if that helps

@jonovotny
Copy link
Contributor Author

jonovotny commented Mar 7, 2023

I have been looking at Bloodcrier's Hammer to test out a template that can be reused for multiple weapons.
Here's a link to the branch on my fork.

Things mostly work, but I can't figure out how to automatically ADD the Personal Costs (Bloodcrier's Hammer, X) abilities. I can add them manually in the misc tab, but I think that makes it easy to forget. I also have to rethink the prerequisits, to apply the boni one needs to have the feat and the personal cost. (Currently I am only checking for the feat).

@FerretDave
Copy link
Contributor

Templates I think are the way

@jonovotny
Copy link
Contributor Author

jonovotny commented Mar 8, 2023

After some testing I now think that CHOOSE:ABILITYSELECTION in the Legacy Feat is probably not the way to go. Taking the feat adds the internal ability as intended, but this ability is not removed if the feat is lost (which can happen during gameplay) and is left without a (simple) way of removal. The CHOOSE dialog also seems to prevent the ADD: dialog from being displayed.

The proposed templates still requires individual least/lesser/greater Legacy for every single weapon that show up in the feat list, correct? It might be the safest way of adding the abilities and would fix the ADD problem, but it will generate a large number of feats (weapons of legacy alone has 48 items, so 144 feats). My approach technically only needs individual Least Legacies, since Lesser and Greater don't grant any additional abilities (this would save space on the feat list at the cost of inconsistency when selecting the feats). I'll implement this later today and test it out.

Adding the penalties to the Legacy feats is probably correct in 99% of cases, but the "Sever Legacy" spell exists, which could leave a character in a state where it still takes the penalties while not having the feats. Renouncing the legacy is an option at that point, but characters may want to avoid paying 1000gp and regain the legacy feats directly. It's a pretty narrow edge case, not sure how much effort should be spent on it. (To perfectly cover all cases, each level of penalties would have to be in a separate ability, that way the character can stop gaining new penalties on a levelup when he lost Legacy feats, while retaining already applied penalties. There will also be some trouble with penalties that require user choices, e.g. a caster class selection for lost spell slots.)

@BahamutDragon
Copy link
Owner

I weigh the options between keep it simple, and versatility (complexity). If a decision needs to be altered easily, then more complexity is usually the answer.

If you feel driven to do a complete perfect coverage, then do so. I usually aim for the 90%. What is going to happen 90% of the time or be required and cover that. Edge cases can be easily written in as notes in the program. My advice is to spend the limited time you have to coding the most likely situations.

@jonovotny
Copy link
Contributor Author

Well, I want to make sure all the common cases work well before diving into edge cases created by specific items. I think in my most recent push I have come up with a system that handles the entire thing quite well (explained in detail in the wl_abilities comments)

The idea is to handle personal costs in an ability pool. Every cost line gets an ability (or multiple abilities) in that pool and points are added on levels in which costs need to be paid (This makes the pool show up on the Todo list in the PCGen Summary Tab). Each cost ability after the first requires the preceding ability to be selected, so costs are paid in order. Adding the cost ability applies the penalties and increases an internal variable that stores up to which level legacy abilities costs have been paid for.

The main legacy item ability then grants individual legacy abilities based on the minimum of total class levels and level of costs paid. Removing the Legacy Feat(s) or the item itself removes all the legacy abilities, but the personal cost pool remains. In that case, a warning indicates that too many cost abilities have been selected, but they will still be applied.

So far I implemented Bloodcrier’s Hammer, which works without problems. But i'll have to test out all the other possible cost abilities. Global penalties (Skill Check, Caster level, Manifester level) should be fine, but Skill Point Loss and Spell Slot Loss will need a bit more work.

@jonovotny
Copy link
Contributor Author

jonovotny commented Mar 16, 2023

Ok, i am pretty much finished with a system that can implement all named legacy items in the book. I am currently taking a jab at the Legacy Champion class and the problem of basically advancing 2 classes at the same time. Here's my proposal to get things to (kinda) work:

  • Only implement class level 1 and 7 of Legacy Champion and let players advance their original classes at the remaining levels.
  • The actual class level of the Legacy champion is tracked via an ability adjusting an internal variable that the player needs to update manually after each levelup.
  • Class features are granted based on that LegacyChampionLVL variable.
  • Any deviation from the class progression in BAB, Saves, HP and Skillpoints can be adjusted by the player with a provided set of abilities, similar to the Personal Cost of Legacy items or GM Awards.
  • Support for ability Replacements needs to be integrated in every legacy item.
    • Before granting an ability, each item needs to check if that ability has been selected by one of the three replacement abilities. If it was, the ability is just not granted.
    • Replacement abilities are then selected via an ability pool.

It's not pretty, but it gets the right values onto the character sheet. Still, I'm not sure if this is too wonky to be added to the dataset. Any comment on this would be appreciated.

I'll create a pull request with the class and 3 demo legacy items in the next few days (Planeshifter's Knife is already fully implemented here)

@jonovotny
Copy link
Contributor Author

jonovotny commented Mar 18, 2023

Created a pull request for review.
It would be great if someone could try to create a new legacy with my instructions in "wl_legacyitem_template.lst"
They should include everything that's needed to get everything listed the character sheet, but a blind test run would help identify if i missed anything.

ToDo: If this is approved there'd still be 45 legacy items in this book to implement, as well as most of the ability exchange options of the Legacy Champion. (Also around 20 or so items from other sources)

@BahamutDragon
Copy link
Owner

comments were added with PR merged.

@jonovotny
Copy link
Contributor Author

Thanks for the feedback.
I think before adding more items I will take one more pass to polish things a bit more:

  • Make the Least Legacy Feat Define hasLeast/Lesser/GreaterXY variables and set them with feat gains. These feats get checked a lot and variables are easier to handle for later lookups/calculations.
  • Change the Personal Cost Pool into a single calculation rather than multiple bonuses with PREMULTS
    (i.e. leastFeat*(((CL>=5)*pointsAt5)+...+(CL>=10)*pointsAt10)+lesserFeat*(...)+...).
  • Merge the selections of "Legacy Champion ~ Replace Legacy Ability Least/Lesser/Greater" into one ability, so only one ability has to be checked rather than 3.
  • Remove the TotalEnhancement calculation. In many cases the players would need to customize their legacy item with the item builder anyway. It is more consistent to also make them add the enhancement bonus manually.

@jonovotny
Copy link
Contributor Author

Quick update on this. I have collected the data of all published weapons of legacy (there are a handful spread in other books/scenarios) and am still working on the script to turn everything into pcgen files.

@jonovotny
Copy link
Contributor Author

I got the files done and am testing the items to make sure nothing breaks.
There is one issue with a default variable that will be used in two sources (LegacyAbilityDC).
Currently I define it in in the Weapons of Legacy ability file, and the only other source with legacy items is the Tome of Battle. Normally I would just make ToB have a PRECAMPAIGN requirement for WoL, but WoL has a lot of dependencies itself and some players might not want to include these sources just to get access to ToB Legacy items... Is there a good/canonical file to add the variable as system wide default? E.g. ur_abilities? @BahamutDragon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants