From a4da94792d2d7a128675794b5ca50602c592d87f Mon Sep 17 00:00:00 2001 From: Kam Date: Thu, 5 Mar 2026 14:45:34 -0500 Subject: [PATCH 1/2] Unfocus Textfield on Subgui Close --- src/main/java/noppes/npcs/client/gui/util/SubGuiInterface.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/noppes/npcs/client/gui/util/SubGuiInterface.java b/src/main/java/noppes/npcs/client/gui/util/SubGuiInterface.java index b10ba84bd..f95bb59f0 100644 --- a/src/main/java/noppes/npcs/client/gui/util/SubGuiInterface.java +++ b/src/main/java/noppes/npcs/client/gui/util/SubGuiInterface.java @@ -12,6 +12,7 @@ public class SubGuiInterface extends GuiNPCInterface { @Override public void close() { + GuiNpcTextField.unfocus(); save(); if (parent instanceof ISubGuiListener) From c11cd4a6bb7c82ded9a486761e89b603a4c5fd08 Mon Sep 17 00:00:00 2001 From: Kam Date: Thu, 5 Mar 2026 14:46:49 -0500 Subject: [PATCH 2/2] Upgrade MD Files --- Ability_Beta_Update.md | 144 ------------------------ Ability_Update.md | 247 ++++++++++++++++++++++++++++++++++------- Auction_Beta_Update.md | 57 ---------- Auction_Update.md | 68 ++++++++++-- Extra_Update.md | 143 ++++++++++++++++++++++++ 5 files changed, 408 insertions(+), 251 deletions(-) delete mode 100644 Ability_Beta_Update.md delete mode 100644 Auction_Beta_Update.md create mode 100644 Extra_Update.md diff --git a/Ability_Beta_Update.md b/Ability_Beta_Update.md deleted file mode 100644 index 8733ebc8b..000000000 --- a/Ability_Beta_Update.md +++ /dev/null @@ -1,144 +0,0 @@ -# CNPC+ 1.11 Ability System Beta - -ðŸŸĄ **In Testing** - - - -## Features: ⚒ïļ - -- **Phase-Based Execution:** - -> All abilities follow a Wind-up → Active → Completion flow. Wind-up lets players react, Active deals the effect. - - - -- **Melee Abilities:** - -> - **Slam** - Leap and AOE on impact. -> - **Heavy Hit** - Single powerful strike with bonus knockback. -> - **Cutter** - Slashing cone arc attack. -> - **Shockwave** - AOE burst radiating from the caster. - - - -- **Energy Orbs:** - -> - **Orb** - Homing energy sphere. -> - **Dual Orb** - Two simultaneous homing orbs. -> - **Orb Barrage** - Rapid volley of orbs in sequence. - - - -- **Energy Discs:** - -> - **Disc** - Spinning flat projectile with optional boomerang. -> - **Dual Disc** - Two simultaneous discs. - - - -- **Energy Beams:** - -> - **Beam** - Sustained homing beam from caster to target. -> - **Dual Beam** - Two simultaneous beams. - - - -- **Laser Shot:** - -> Instant-fire projectile with no homing. Pure aim. - - - -- **Projectile:** - -> Standard projectile using classic Minecraft physics. - - - -- **Movement Abilities:** - -> - **Charge** - Rush forward in a line, damaging everything in path. -> - **Dash** - Quick directional movement without damage. -> - **Teleport** - Instant relocation to the target. - - - -- **AOE Abilities:** - -> - **Sweeper** - Wide rotational sweep around the caster. -> - **Vortex** - Pulls entities inward while dealing damage. - - - -- **Telegraph System:** - -> Visual ground indicators during wind-up. Supports Circle, Ring, Line, Cone, and Point shapes with color customization and warning phase transitions. - - - -- **Energy Projectile Customization:** - -> Modular data system for all energy projectiles: Anchor Point, Display Colors, Homing, Combat Stats, and Lifespan. - - - -- **Ability Effects:** - -> Abilities can apply potion effects on hit: Slowness, Weakness, Poison, Wither, Blindness, Nausea, Hunger, Mining Fatigue. - - - -- **Ability Conditions:** - -> Condition system controlling when abilities can execute based on target state and custom predicates. - - - -- **Interruptible Wind-ups:** - -> Abilities can be interrupted by damage during wind-up, forcing a configurable Dazed recovery state. - - - -- **Movement & Rotation Locking:** - -> Lock caster movement, rotation, or both during Wind-up, Active, or both phases. - - - -- **Animation & Sound Integration:** - -> Wind-up and Active animations with optional duration sync. Custom sound events per phase. - - - -- **Player Abilities:** - -> Players can unlock abilities, select one at a time, and share a universal cooldown. - - - -- **Ability Preview:** - -> Live preview in the ability editor GUI. Test telegraphs, animations, and projectiles on a dummy NPC. - - - -- **Scripting API:** - -> Full event support: Start, Execute, Interrupt, Complete, Hit (modifiable damage/knockback), and Tick events. Start, Execute, and Hit are cancelable. - - - -- **Ability Commands:** - -> `/kam ability list`, `types`, `info`, `delete`, `reload` for managing custom abilities. - - - -**Extras** - -- Global ability presets that update everywhere when edited. -- Weighted ability selection for NPC random usage. -- Configurable min/max range per ability. -- Reusable telegraph presets shared across abilities. diff --git a/Ability_Update.md b/Ability_Update.md index cf160bc5f..c81302f1c 100644 --- a/Ability_Update.md +++ b/Ability_Update.md @@ -2,7 +2,7 @@ --- -The **Ability Update** introduces a full combat ability system to CNPC+! Give your NPCs powerful attacks with **visual telegraphs**, launch **energy projectiles** that home in on targets, and let players unlock abilities of their own! +The **Ability Update** introduces a full combat ability system to CNPC+! Give your NPCs powerful attacks with **visual telegraphs**, launch **energy projectiles** that home in on targets, set **traps** and **hazards**, chain abilities into devastating combos, and let players unlock abilities of their own! --- @@ -16,12 +16,16 @@ Every ability follows a **phase-based execution flow** that gives combat a reada - **Dazed** - Optional recovery state if the ability is interrupted during wind-up **Core Configuration:** -- **Cooldown** - Time before the ability can be used again +- **Cooldown** - Time before the ability can be used again. Supports both a **universal cooldown** and **per-ability cooldowns** - **Targeting Mode** - Aggro Target, Self, AOE on Self, or AOE on Target - **Range** - Configurable min and max range for activation - **Lock Movement** - Lock the caster's movement, rotation, or both during any phase - **Interruptible** - Allow damage to interrupt wind-up and force a dazed state - **Weight** - Priority weighting for NPC random ability selection +- **Invulnerability** - Make the caster invulnerable during Wind-up, Active, or both phases +- **Ignore I-Frames** - Bypass Minecraft's damage immunity timer, allowing rapid consecutive hits +- **Free on Cast** - The ability enters cooldown the moment it launches, freeing the caster while spawned entities (projectiles, zones, barriers) persist independently +- **Magic Damage** - Abilities can deal magic damage as a separate damage type, with configurable damage values and split ratios > Abilities support both **inline configuration** on individual NPCs and **global presets** that update everywhere when edited. @@ -31,10 +35,9 @@ Every ability follows a **phase-based execution flow** that gives combat a reada Close-range attacks that hit hard and punish positioning. -- **Slam** - Leap toward the target in an arc, dealing AOE damage on impact. Configurable radius, knockback, and leap height -- **Heavy Hit** - A single powerful melee strike with bonus knockback +- **Slam** - Leap toward the target in an arc, dealing AOE damage on impact. Configurable radius, knockback, and leap height. Air slams deal reduced damage based on required leap height +- **Heavy Hit** - A single powerful melee strike with bonus knockback and a configurable hit delay - **Cutter** - A slashing arc attack in a cone. Configurable angle and reach -- **Shockwave** - An AOE burst radiating outward from the caster > All melee abilities support configurable **damage**, **knockback**, and **potion effects** on hit. @@ -42,47 +45,64 @@ Close-range attacks that hit hard and punish positioning. ## Energy Projectiles âœĻ -A brand new projectile system built from the ground up with full visual customization. +A brand new projectile system built from the ground up with full visual customization. Energy projectiles use a **Variant System** — each base type (Orb, Beam, Disc) can be configured with variants like dual-fire or barrage patterns, all from within the same ability type. ### Orbs -Homing energy spheres that track their target through the air. - -- **Orb** - A single homing projectile -- **Dual Orb** - Fires two orbs simultaneously -- **Orb Barrage** - Fires a volley of orbs in rapid sequence +Homing energy spheres that track their target through the air. Configurable with variants for dual or barrage firing patterns. ### Discs -Flat spinning projectiles with optional **boomerang** behavior. - -- **Disc** - A single spinning disc with configurable radius and thickness -- **Dual Disc** - Fires two discs simultaneously +Flat spinning projectiles with optional **boomerang** behavior. Supports both vertical and horizontal orientation. ### Beams -Sustained energy beams that connect the caster to their target. - -- **Beam** - A homing beam with configurable width and head size. Locks the caster in place during channeling -- **Dual Beam** - Fires two beams simultaneously +Sustained energy beams that connect the caster to their target. Supports a **Free Aim** mode for manual aiming without homing. ### Laser Shot -An **instant-fire** projectile with configurable width and speed. No homing — pure aim. - -### Projectile - -A standard projectile using classic Minecraft physics for a more traditional ranged attack. +An **instant-fire** hitscan projectile with configurable width and speed. No homing — pure aim. ### Energy Configuration Every energy projectile shares a **modular data system** for deep customization: -- **Anchor Point** - Choose where the projectile spawns: Right Hand, Left Hand, Front, Center, Chest, or Above Head +- **Anchor Point** - Choose where the projectile spawns: Right Hand, Left Hand, Front, Center, Chest, or Above Head. Supports custom offset anchors and a **Launch From Anchor** setting - **Display** - Set core color, edge color, glow effect, transparency, and size - **Homing** - Toggle homing, adjust turn rate and max tracking range - **Combat** - Damage, knockback, vertical knockback, hit cooldown, and optional AOE splash -- **Lifespan** - Projectile speed, max age, and max travel distance +- **Hit Type** - Choose how the projectile interacts with targets: **Single** (hits one), **Pierce** (passes through), or **Multi** (hits multiple) +- **Lifespan** - Projectile speed, max age, and max travel distance (up to 150 blocks) +- **Explosions** - Energy projectiles can detonate on impact with configurable explosion radius. Block damage can be toggled in the Energy Config + +--- + +## Energy Barriers ðŸ›Ąïļ + +Defensive energy constructs that block incoming projectiles and attacks. + +- **Dome** - A spherical barrier centered on the caster. Blocks incoming energy projectiles with configurable per-type damage multipliers, HP/durability, and duration +- **Wall** - A placeable flat energy panel with configurable dimensions and height offset. Has an optional **launch mode** that fires the wall forward, dealing damage and knockback +- **Shield** - A held energy panel that follows the caster's facing direction for directional blocking + +**Barrier Properties:** +- **HP & Durability** - Barriers have health and break when depleted +- **Melee Vulnerability** - Barriers can be configured to take damage from melee attacks +- **Damage Absorption** - Attacks aimed at the caster can be redirected to damage the barrier instead +- **Ally/Target Filtering** - Configure which projectiles are blocked based on ownership +- **Offset Support** - Position barriers with custom offsets from the caster + +--- + +## Defensive Abilities 🏰 + +Reactive defensive stances that protect the caster when hit. + +- **Guard** - Enter a defensive stance that **reduces incoming damage** by a configurable percentage. Lasts until duration expires or a max hit count is reached +- **Counter** - Absorb incoming attacks and **counter-attack the attacker**. Counter damage can be a flat value or a percentage of the absorbed damage. Plays a counter-attack animation on each successful counter +- **Dodge** - Fully **evade incoming attacks**, negating all damage. Plays randomized dodge animations from up to three configurable animation slots + +> All defensive abilities support configurable duration and maximum hit counts before they break. --- @@ -102,14 +122,116 @@ Abilities that reposition the caster in combat. Area control abilities that dominate space. -- **Sweeper** - A wide rotational sweep attack around the caster with configurable radius and rotation speed +- **Shockwave** - An AOE burst radiating outward from the caster, dealing damage and knockback in a configurable radius +- **Sweeper** - A wide rotational sweep attack around the caster with configurable radius and rotation speed. Can run concurrently with other abilities in chains - **Vortex** - Creates a pulling force that drags nearby entities toward the center while dealing damage --- +## Hazards & Traps ðŸŠĪ + +Ground-based zone abilities for area denial and ambush tactics. + +### Hazards + +Persistent damaging areas that continuously hurt entities standing inside them. Configurable damage interval, zone count (up to 20), shape (circle or square), zone height, and duration. Can optionally affect the caster. + +**Zone Visual Presets:** Default, Toxic, Inferno, Arcane, Electric, Frost — each with themed colors, particles, and visual effects. + +### Traps + +Proximity-triggered burst abilities that sit dormant until an entity enters the trigger radius. Support configurable arm time, multiple triggers before expiring, trigger cooldown, damage radius, and knockback. Traps can be **hidden** (invisible) until triggered, revealing with a brief burst effect. + +**Trap Presets:** +- **Hidden** - Minimal visibility, no effects — a pure stealth trap +- **Venom** - Applies Poison with toxic green visuals +- **Explosive** - Applies Fire with fiery orange particles +- **Cursed** - Applies Weakness with purple arcane effects +- **Shock** - Applies Mining Fatigue with blue electrical sparks +- **Snare** - Applies Slowness with icy blue visuals + +### Zone Visuals + +Both hazards and traps share a rich visual system with configurable layers: ground fill, concentric rings, rotating borders, accents (static, swaying, or flickering), lightning arcs, and particle effects with multiple motion types (rising, drifting, sparks). + +--- + +## Ability Effect ðŸ’Ŧ + +A support ability for applying buffs, debuffs, healing, and custom effects to allies or enemies. + +**Targeting:** +- **Self** - Affect only the caster (self-buffs, self-healing) +- **AOE Self** - Area-of-effect centered on the caster with a configurable radius + +**Target Filter (AOE):** +- **Allies** - Only affect friendly entities +- **Enemies** - Only affect hostile entities +- **All** - Affect everyone in range + +Allies are determined by **Party** for players and **Faction** for NPCs. A toggle controls whether the caster is included in AOE effects. + +**Effect Types:** +- Flat and percentage-based healing (instant or over time) +- Vanilla potion effects +- Custom effects from the Custom Effect system +- Mod-registered effect actions + +**Built-in Variants:** Self Heal, Healing Aura, Poison Debuff. + +--- + +## Custom Ability 🔧 + +A blank-slate ability type designed for **scripters** to build fully custom abilities through script hooks. + +**Script Hooks:** +- **Start** - Fired when the ability begins +- **Execute** - Fired when entering the active phase +- **Tick** - Fired every game tick with phase and tick count +- **Complete** - Fired when the ability finishes +- **Toggle / Toggle Tick** - For toggle-mode abilities with multiple states + +**Features:** +- Full telegraph control with all shape types (Circle, Ring, Line, Cone, Point, Square) +- Configurable telegraph dimensions, colors, and duration +- Supports both instant execution and multi-state toggle modes + +--- + +## Burst System 🔁 + +Abilities can be configured to **fire multiple times in rapid succession** as a single use. + +- **Burst Amount** - Number of additional repetitions after the initial cast +- **Burst Delay** - Ticks between each burst iteration +- **Replay Animations** - Optionally replay the wind-up animation on each burst +- **Overlap Mode** - Previous entities can persist while the next burst fires, allowing stacking effects + +> Burst is available on most ability types including energy projectiles, melee abilities, and movement abilities. + +--- + +## Chained Abilities ⛓ïļ + +Chain multiple abilities together into **sequential combos** that execute one after another. + +- **Ordered Entries** - Each entry in the chain references an ability with a configurable delay before it fires +- **Wind-up All** - Optionally wind up all abilities simultaneously before the chain begins +- **Chain Cooldown** - A single cooldown applied after the entire chain completes +- **Chain Conditions** - Conditions checked once for the whole chain, not per-ability + +### Concurrency + +Specific ability types can be marked to run **concurrently** within a chain — executing alongside the primary ability instead of waiting in sequence. Concurrent-capable types include Effect, Hazard, Trap, and Sweeper. + +> Chained abilities work with the ability hotbar and support live previewing in the editor. + +--- + ## Telegraph System 📍 -**Telegraphs** are visual ground indicators that warn players before an ability lands. They appear during the wind-up phase and disappear when the ability fires. +**Telegraphs** are visual ground indicators that warn players before an ability lands. They appear during the wind-up phase and transition into a warning state before the ability fires. **Shapes:** - **Circle** - Filled circle with configurable radius @@ -117,12 +239,14 @@ Area control abilities that dominate space. - **Line** - Rectangle along the attack direction - **Cone** - Fan/wedge shape with configurable angle - **Point** - Single point indicator +- **Square** - Square area indicator **Features:** - **Color Customization** - Set ARGB colors for both the telegraph and its warning phase - **Warning Phase** - Color shifts in the final ticks before the ability fires - **Entity Tracking** - Telegraphs can follow a moving entity or stay at a fixed position -- **Smooth Interpolation** - Position updates are interpolated for clean visuals +- **Height Handling** - Telegraphs properly handle ground and air positioning +- **Custom Controls** - Full telegraph configuration available on Custom Abilities > Telegraphs are saved as **reusable presets** and can be shared across multiple abilities. @@ -134,9 +258,11 @@ Abilities integrate directly with the animation and sound systems. - **Wind-up Animation** - Plays during the charging phase - **Active Animation** - Plays when the ability fires +- **Dazed Animation** - Plays during the dazed recovery state - **Animation Sync** - Optionally sync wind-up duration to match animation length exactly - **Sound Events** - Assign custom sounds to both wind-up and active phases - **Phase Colors** - Visual color feedback on the caster during wind-up and active +- **Multiple Animations** - Multiple animations can be registered under one common name > Many ability types include **built-in animation names** that work automatically when matching animations exist. @@ -146,24 +272,41 @@ Abilities integrate directly with the animation and sound systems. ### Potion Effects -Abilities can apply **potion effects** to any entity they hit. Each effect has configurable type, duration, and amplifier. +Abilities can apply **potion effects** to any entity they hit. Each effect has configurable type, duration, and amplifier. Supports both preset effect types and **manual potion IDs** for custom or modded effects with amplification up to 255. -**Available Effects:** -Slowness, Weakness, Poison, Wither, Blindness, Nausea, Hunger, Mining Fatigue +**Available Preset Effects:** +Fire, Slowness, Weakness, Poison, Wither, Blindness, Nausea, Hunger, Mining Fatigue ### Conditions -Abilities support a **condition system** that controls when they can be used. Conditions are evaluated before execution and can require specific target states, ranges, or custom predicates. +Abilities support a **condition system** that controls when they can be used. Each condition can be checked on the **Caster**, the **Target**, or **Both**. + +**Condition Types:** +- **HP Threshold** - Check if an entity's health is above, below, or equal to a value (supports flat or percentage) +- **Hit Count** - Require the caster to have been hit a certain number of times within a time window +- **Has Item** - Check if an entity is holding, wearing, or carrying a specific item +- **Quest Completed** - Check if a player has completed a specific quest +- **Has Effect** - Check if an entity has a specific custom effect applied --- ## Player Abilities 🧑 -Players can unlock and use abilities too! +Players can unlock and use abilities with a full hotbar and management system! +### Ability Hotbar + +The **Ability Hotbar** is a 12-slot bar for equipping and switching between unlocked abilities. Hold the **HUD Key** and use the **scroll wheel** to cycle through your equipped abilities. The hotbar displays ability icons with cooldown progress and supports horizontal or vertical layouts with 3, 5, or 7 visible slots. + +Configure your hotbar through drag-and-drop in the **CNPC+ Inventory Ability Tab**, and customize its appearance in the **HUD Editor** under CNPC+ Inventory Settings. + +### Player Features - **Unlock System** - Players receive abilities via scripting or commands -- **Ability Selection** - Choose one ability at a time from your unlocked list -- **Universal Cooldown** - Shared cooldown across all player abilities +- **Per-Ability Cooldowns** - Each ability can have its own cooldown in addition to the universal cooldown +- **Cancel on Double-Tap** - Double-tap the ability key during wind-up to cancel and immediately enter cooldown +- **Ability Visibility** - Hide or show specific abilities in the HUD and usage +- **State Management** - Abilities are properly cancelled on logout, dimension change, death, and respawn. Movement input is suppressed during ability locks +- **Flight Safety** - Abilities do not affect players who are flying --- @@ -177,6 +320,26 @@ Full scripting support for ability lifecycle events: - **CompleteEvent** - Fired when the ability finishes - **HitEvent** *(Cancelable)* - Fired on each entity hit. Damage and knockback values can be modified - **TickEvent** - Fired every tick with current phase and tick count +- **PlayerAbilityEvent** - Events for player ability actions + +### Energy Projectile Scripting + +Full scripting interfaces for all energy projectile types with 5 event hooks: +- **Fired** - When the projectile launches +- **Update** - Every tick during flight +- **EntityImpact** - On hitting an entity +- **BlockImpact** - On hitting a block +- **Expired** - When the projectile's lifespan ends + +### Ability Extender System + +Register custom **lifecycle hooks** on abilities with the Ability Extender system: +- **onAbilityStart** - When the ability begins +- **onAbilityTick** - Every tick during execution +- **onAbilityComplete** - When the ability finishes +- **onAbilityDamage** - When the ability deals damage + +Multiple extenders can be registered per ability. Ability scripts are **instanced** — every use gets its own fresh set of variables for optimal performance. > Scripts can cancel, modify damage, and react to every phase of ability execution. @@ -184,7 +347,7 @@ Full scripting support for ability lifecycle events: ## Ability Preview 🔎 -The ability editor includes a **live preview system**. Test your telegraph shapes, animations, and projectile visuals directly in the GUI on a dummy NPC — no world effects applied. +The ability editor includes a **live preview system**. Test your telegraph shapes, animations, projectile visuals, burst patterns, and chained ability sequences directly in the GUI on a dummy NPC — no world effects applied. --- @@ -192,8 +355,14 @@ The ability editor includes a **live preview system**. Test your telegraph shape - `/kam ability list` - List all custom abilities - `/kam ability types` - List all registered ability types -- `/kam ability info ` - View ability details -- `/kam ability delete ` - Delete a custom ability +- `/kam ability prebuilts` - List all built-in abilities +- `/kam ability info ` - View ability details +- `/kam ability delete ` - Delete a custom ability - `/kam ability reload` - Reload abilities from disk +- `/kam ability give` - Give an ability to a player +- `/kam ability remove` - Remove an ability from a player +- `/kam ability giveChain` - Give a chained ability to a player +- `/kam ability removeChain` - Remove a chained ability from a player +- `/kam ability player` - Manage player abilities --- diff --git a/Auction_Beta_Update.md b/Auction_Beta_Update.md deleted file mode 100644 index 8b382b4af..000000000 --- a/Auction_Beta_Update.md +++ /dev/null @@ -1,57 +0,0 @@ -# CNPC+ 1.11 Beta - Market Update - -ðŸŸĄ **In Testing** - -## Features: ⚒ïļ - -- **Built-in Currency System:** -> Fully configurable economy currency used across all Market features. Profile persistent across character slots with Vault support for Bukkit-compatible plugins. - -- **Auction House:** -> Global player marketplace for listing items, bidding, and instant buyouts. Auctions last 24 hours by default. - -- **Auction Bidding & Snipe Protection:** -> Competitive bidding with a 5% minimum bid increment. Snipe Protection extends auctions on last-second bids. Outbid players are automatically refunded. - -- **Buyout System:** -> Instant purchase at the seller's Buyout Price. Highest bidder only pays the difference between their bid and the buyout. - -- **My Trades:** -> Single screen for managing Active Listings, Active Bids, and Pending Claims. Players can cancel listings with a 10% penalty if bids exist. - -- **Auction Notifications:** -> Real-time notifications for sales, outbids, and wins. Offline players receive a claim summary on login. - -- **Trade Slots:** -> Limited slots (default 8, max 45) shared across listings, bids, and claims. Configurable via permissions. - -- **Claim Expiration:** -> Uncollected claims expire after 20 days. - -- **Item Blacklist:** -> Block items by registry name, wildcard pattern, mod, or NBT tag. Soulbound and Profile-Slotbound items are always blocked automatically. - -- **Listing Fee & Sales Tax:** -> Configurable listing fee charged on creation and sales tax taken from successful sales. - -- **Search & Sorting:** -> Search by item name or seller. Sort by newest, ending soon, price, or most bids. - -- **Trader Stock System:** -> Limited stock with Global or Per-Player modes. Restock timers for MC Daily/Weekly, RL Daily/Weekly, or Custom intervals. - -- **Trader Currency Trades:** -> Trades can require currency on top of item costs. - -- **Auctioneer NPC Role:** -> New role that opens the Auction House on interaction. No configuration needed. - -- **Auction Commands:** -> `/kam auction open` for players. Admin commands for listing view and player activity inspection. - -**Extras** - -- Auction logging for server admins (tracks creates, bids, buyouts, sales, expirations, cancellations, claims). -- Lifetime currency tracking per player (total earned and spent). -- Configurable starting balance and max balance cap. -- Blacklist bypass permission for admins. diff --git a/Auction_Update.md b/Auction_Update.md index a04cc12e9..a4612402e 100644 --- a/Auction_Update.md +++ b/Auction_Update.md @@ -21,11 +21,11 @@ CNPC+ now has a **built-in currency** used across all Market features! ## Auction House 🏛ïļ -A **global player marketplace** where players can list items, bid against each other, and purchase instantly! Search for items by name or seller, and sort by newest, ending soon, price, or most bids. +A **global player marketplace** where players can list items, bid against each other, and purchase instantly! ### Selling -List any item with a **Starting Price** for competitive bidding. Set an optional **Buyout Price** for players who want to skip the wait and buy immediately. Auctions last **24 hours** by default. +List any item with a **Starting Price** for competitive bidding. Set an optional **Buyout Price** for players who want to skip the wait and buy immediately. Auctions last **24 hours** by default with a configurable **minimum listing price**. > A configurable **Listing Fee** is charged when creating auctions, and a **Sales Tax** is taken from successful sales. @@ -45,19 +45,37 @@ One screen to manage all your auction activity: - **Active Bids** - Auctions you're competing in - **Ready to Claim** - Won items and currency waiting for pickup -Players can **cancel** their own listings -- items are returned as a claim. If there are active bids on the listing, a **10% cancellation penalty** is charged. +Players can **cancel** their own listings — items are returned as a claim. If there are active bids on the listing, a configurable **cancellation penalty** is charged (default 10%). > Claims expire after **20 days**. Make sure to collect your items and currency before they're gone! +### Search & Sorting + +Find what you're looking for with search and sort tools. Search filters by both **item name** and **seller name** simultaneously. + +**Sort Options:** +- Newest +- Ending Soon +- Price (Low to High) +- Price (High to Low) +- Most Bids + ### Notifications -Get notified immediately when your item sells, when you're outbid, or when you win an auction. Offline? You'll get a full **claim summary** when you log back in showing exactly what's waiting for you. +Get notified immediately when: +- Your item **sells** +- You get **outbid** +- You **win** an auction +- Your auction **expires** with no bids +- A **claim is ready** for pickup + +Offline? You'll get a full **claim summary** when you log back in showing exactly what's waiting for you. ### Trade Slots -Every player gets a limited number of **Trade Slots** (default 8). Slots are shared across Active Listings, Active Bids, **and** Pending Claims -- so uncollected claims take up space. Pick up your claims to free slots for new listings and bids! +Every player gets a limited number of **Trade Slots** (default 8). Slots are shared across Active Listings, Active Bids, **and** Pending Claims — so uncollected claims take up space. Pick up your claims to free slots for new listings and bids! -> Server owners can grant players more slots via permissions up to a maximum of 45. +> Server owners can grant players more slots via permissions up to a maximum of 45, or grant **unlimited slots** with the `customnpcs.auction.trades.unlimited` permission. --- @@ -73,7 +91,12 @@ Server owners have full control over what items can be listed on the Auction Hou > **Soulbound** and **Profile-Slotbound** items are always blocked automatically, regardless of blacklist settings. Bound items cannot be traded! -Manage the blacklist in-game with `/kam auction blacklist` commands, or configure it directly in the config file. +**Blacklist Commands:** +- `/kam auction blacklist add ` - Add to the blacklist +- `/kam auction blacklist remove ` - Remove from the blacklist +- `/kam auction blacklist list [item|mod|nbt]` - View blacklisted entries +- `/kam auction blacklist reload` - Reload blacklist from config +- `/kam auction blacklist check` - Check if your held item is blacklisted --- @@ -104,18 +127,41 @@ Trades can now require **currency on top of items**. Combine material costs with ## Auctioneer Role 🧑‍💞 -New NPC role for the Auction House! Set the role on any NPC and players can access the full Auction House by interacting with them -- no extra configuration needed. The role respects the global Auction Enabled setting. +New NPC role for the Auction House! Set the role on any NPC and players can access the full Auction House by interacting with them — no extra configuration needed. The role respects the global Auction Enabled setting. + +--- + +## Admin Tools ðŸ”Ļ + +### Admin Auction GUI + +A dedicated management interface for server admins with three tabs: + +- **Listings** - View and search all active auctions. Stop or cancel any listing +- **Create** - Create server-managed listings with custom seller names, prices, and durations +- **Claims** - Manage the global admin claims pool ### Auction Commands -Players can also access the Auction House via command: - +**Player Commands:** - `/kam auction open` - Opens the Auction House GUI **Admin Commands:** - `/kam auction list [page]` - View active auctions in chat - `/kam auction view ` - View a player's auction activity -> Server owners can enable **auction logging** to track all auction activity (creates, bids, buyouts, sales, expirations, cancellations, and claims). +> Server owners can enable **auction logging** to track all auction activity — creates, bids, buyouts, sales, expirations, cancellations, and claims. Each log type can be toggled individually. + +--- + +## Scripting API 📜 + +Full event support for auction interactions. All events are **cancelable**, allowing scripts to intercept and control auction behavior: + +- **CreateEvent** - Before an auction is created +- **BidEvent** - Before a bid is placed +- **BuyoutEvent** - Before an instant purchase +- **CancelEvent** - Before a listing is cancelled +- **ClaimEvent** - Before a claim is collected --- diff --git a/Extra_Update.md b/Extra_Update.md new file mode 100644 index 000000000..279d9a6d4 --- /dev/null +++ b/Extra_Update.md @@ -0,0 +1,143 @@ +# ✏ïļ CustomNPC+ 1.11 - The Scripting Update ✏ïļ + +--- + +The **Scripting Update** completely transforms how you write scripts in CNPC+! A brand new **Script Editor** with **syntax highlighting**, **autocomplete**, and **error detection** makes scripting feel like a real IDE. Write scripts in **Java** with the new Janino engine, enable **client-side scripting** for responsive experiences, and organize your Cloner with **folders**! + +--- + +## Script Editor 📝 + +The script editor has been rebuilt from the ground up into a **full-featured code editor** right inside Minecraft. + +### Writing Code + +- **Syntax Highlighting** - Keywords, types, variables, methods, strings, and comments are all color-coded automatically. The editor understands your code -- local variables, global fields, and chained method calls each get their own color +- **Autocomplete** - Start typing and get smart suggestions for methods, fields, and classes. Suggestions know whether you're in a static or instance context, and frequently used members appear first. Smart cursor placement inserts methods with the cursor between parentheses when parameters exist +- **Auto Imports** - Type a class name and the editor suggests the correct import for you +- **Error Detection** - Catch mistakes before you even run your script! Wrong argument types, missing methods, type mismatches, unused imports, and more are all underlined with detailed error messages on hover +- **ECMAScript 5.1 Globals** - Built-in objects like `Math`, `JSON`, `Date`, and `Number` are recognized automatically in JavaScript mode +- **Global Script Variables** - Variables like `npc`, `world`, and `event` are recognized in the syntax highlighter and autocomplete as global definitions + +> Hover over any symbol to see its **full type information**, documentation, and declaration -- just like a desktop IDE. Hover tooltips render **JSDoc with markdown formatting**, headings, and code blocks, and support **scrolling and panning** for long documentation. + +--- + +### Navigation + +- **Go To Line** - `CTRL+G` jumps to any line instantly +- **Search & Replace** - `CTRL+F` to search, `CTRL+H` to replace. All matches highlight in real-time +- **Go To Definition** - `CTRL+Click` any method, field, or type to jump straight to its definition +- **Fullscreen Mode** - Expand the editor to fill your entire game window for maximum workspace + +### Editing + +- **Undo/Redo** - Smart undo that works on whole words at a time, not individual characters +- **Line Operations** - Duplicate lines with `CTRL+D`, delete lines, and move lines up or down with shortcuts +- **Comment Toggle** - `CTRL+/` to comment or uncomment selected lines +- **Rename** - Rename a variable or method and every occurrence updates at once +- **Copy Whole Line** - Copy with nothing selected grabs the entire line +- **Triple Click** - Select an entire line instantly + +### Visual Polish + +- **Line Numbers** - A clean gutter with line numbers and current line highlighting +- **Smooth Scrolling** - Eased scroll animations for a polished feel +- **Indent Guides** - Vertical lines show your code's nesting depth, with the current scope highlighted in green +- **Brace Matching** - Matching `{}` braces light up, and unclosed braces turn red +- **Smart Brackets** - Typing `{` automatically creates the closing `}` with correct indentation. Same for `()`, `[]`, `""`, and `''` +- **Resizable Panels** - Autocomplete and hover info panels can be resized and panned to fit your workspace +- **Keyboard Shortcut Overlay** - Press a button to see all available shortcuts at a glance + +--- + +## Java Scripting ☕ + +Write scripts in **real Java** instead of JavaScript! Powered by the **Janino** compiler, your Java code is compiled and runs natively. + +- **Full Java Language** - Use classes, interfaces, enums, generics, lambdas, and everything you know from Java +- **Automatic Hook Resolution** - Just name your methods after the hook you want (e.g., `init`, `tick`, `interact`) and they're wired up automatically +- **Language Selector** - Each script tab has a dropdown to choose between JavaScript and Java. Mix and match across tabs +- **External Files** - Write `.java` scripts in an external editor and they're loaded automatically + +> Java and JavaScript scripts coexist side by side. Pick whichever language fits your workflow! + +--- + +## Client-Side Scripting ðŸ–Ĩïļ + +Scripts can now run **on the client** for responsive, visual experiences! + +- **Server Controlled** - Server owners decide whether client scripting is allowed. Players can't enable it on their own +- **Automatic Sync** - Script files are sent from the server to all connected clients on login, and re-synced whenever scripts are reloaded +- **Safe by Default** - Client scripting is off by default and must be explicitly enabled in the server config + +> Client-side scripts open the door to custom UI effects, visual feedback, and client-only hooks -- all while the server stays in full control. + +--- + +## Cloner Tab Overhaul 📂 + +The Cloner now supports **folders** for organizing your saved NPCs, items, and entries! + +- **Folder System** - Create folders and subfolders to keep your cloner organized however you like +- **Full Screen Browser** - A new full-width directory view makes browsing large collections much easier +- **Improved Tabs** - Better tab navigation for switching between cloner categories + +--- + +## Addon API Support 📘 + +Addon developers can now ship **type definitions** alongside their mods, giving scripters full autocomplete and documentation for addon APIs! + +- **Automatic Loading** - Any mod can include API definitions and they'll appear in the script editor automatically +- **Patch Support** - Addons can extend existing CNPC+ types with new methods (e.g., a DBC addon adding `getDBCPlayer()` to the Player type) +- **Full Documentation** - Parameter names, return types, and descriptions all show up in autocomplete and hover info + +> If you're a scripter using addons, you get autocomplete for their APIs with zero setup. If you're an addon developer, just include your definitions and everything works. + +--- + +## Animation Improvements 🎎 + +- **Data Store** - Animations can now store and pass data across events and frames for more complex animation logic +- **Task System** - A new consumer-based system for reacting to animation lifecycle events, replacing the old approach +- **Expanded API** - More animation control exposed to the scripting API + +--- + +## Animated Textures 🖞ïļ + +Items and effects now support **frame-based animated textures**! + +- **Linked & Scripted Items** - Configure animated textures with custom frame count and frame time +- **Custom Effects** - Custom effect icons support animation with the same frame system +- **Configurable** - Set frames per row, ticks per frame, and interpolation between frames + +--- + +## NPC API Additions ðŸ§Đ + +New scripting API properties for finer control over NPC behavior and appearance: + +- **Hitbox Data** - Scale NPC hitbox width and height independently via `IHitboxData` +- **Tint Data** - Control hurt tint (damage flash) and apply persistent color tints with alpha via `ITintData` +- **Behavior Properties** - Sprint, swim, door interaction, and walking range are now scriptable +- **Sound Control** - Full sound management via `ISound` with volume, pitch, repeat, and position +- **Error Reporting** - Script action exceptions now report to the Script Console with full stack traces instead of failing silently + +--- + +## Additional Changes 🔧 + +- **Player Dialog Events** - Now work the same way as NPC Dialog Events for consistency +- **Linked Item Attack Speed** - Added attack speed configuration to linked items +- **Trader Balance Preview** - Client-side balance prediction shows your expected balance during trades +- **Right-Click Cycling** - Multi-option NPC buttons (Hair, Eyes, Fur, etc.) can now be right-clicked to cycle backwards +- **Quest Cooldown Fix** - Fixed cooldown not working for MC Custom and RL Custom timer types +- **Bard Music Fix** - Fixed music restarting or duplicating when opening dialogs +- **Biome Spawn Fix** - Fixed NPC biome spawn settings not saving after editing +- **Block Waypoint Fix** - Fixed issues with block waypoints +- **Script Config Fix** - Fixed script configuration not syncing properly between server and client + +---