Conversation
Fix creature skinning
Run item preverb scripts for GET and DROP
Run item preverb scripts for equipment commands
added 25 commits
August 8, 2026 15:52
… and scripted movement
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Modern Weapon Trait System
This branch introduces a reusable trait system for weapons and begins moving weapon-specific behavior into a new set of modern LOFP script files.
Why
The original LOFP item scripts often combine an item's basic definition, descriptive text, interaction behavior, magical effects, special attacks, and other logic into a single
INUMBERdefinition.For complex weapons this becomes extremely difficult to maintain. The original Long Sword definition, for example, grew to more than 500 lines of script. Much of that code represents behavior that could be shared by an entire class of weapons rather than duplicated on every individual item.
That makes the original scripts valuable as a record of how LOFP worked, but increasingly difficult to use as the foundation for new development.
The goal of this work is not to replace LOFP's script-driven design with hard-coded Go behavior. Instead, it gives the scripting system a cleaner way to express reusable behavior.
Trait system
Weapons can now attach reusable traits:
Traits themselves remain scripts:
This allows common behavior such as wielding, unwielding, turning, examining, magical effects, and eventually other weapon abilities to be implemented once and reused across many weapons.
Traits can exist on the base item archetype or on an individual item instance, allowing otherwise identical weapons to acquire unique properties.
Trait order also provides simple specialization: later traits can override an earlier trait's implementation of the same event while retaining unrelated behavior from the earlier trait.
Script organization
Modern weapon behavior is being separated from the original scripts:
The original scripts remain available as the historical source of truth while the modern scripts provide a substantially more readable and maintainable representation of the same game concepts.
Generic weapon-family behavior is separated from individual weapon descriptions. For example, swords can share
GENERIC_SWORDbehavior while Short Sword, Long Sword, Rapier, Greatsword, etc. provide their ownEXAMINEtraits.Magic and item state
The trait system is also designed to work with LOFP's existing weapon ItemVals rather than replacing them with a parallel set of mechanics.
Current investigation has identified the original weapon fields as including:
PARAMETER1— base weapon damageITEMVAL2— magical weapon bonus / WeaponPlusITEMVAL3— elemental critical, slayer, and other special weapon typesITEMVAL5— weapon damage modifier used by special/critical weapon effectsThis means modern traits can eventually expose existing LOFP mechanics such as magical weapons, elemental weapons, slayers, temporary blade spells, and other special properties while retaining compatibility with the original data model.
Going forward
This branch establishes the infrastructure rather than attempting to redesign the entire weapon system at once.
The next steps are to:
ITEMVAL2/WEAPONPLUSmagic bonus to combat.POWERas a basis for magical-item strength and treasure-generation limits.The larger goal is to make LOFP's item system readable, composable, and extensible without moving gameplay into hard-coded Go.
Instead of another 500-line Long Sword definition, a weapon should increasingly be expressible as a small base definition plus the handful of traits that make that particular weapon interesting.
New in this update
ADJDEF.EXAMINE.EXAMINEasUndamagedorDamaged.VAL3.