mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-08 18:54:50 +00:00
Linked NPC Abilities + Overlays Fix
This commit is contained in:
1 parent
19d6ec7e52
commit
d5356a83ef
8 files changed
+150
-696
No files matched your search
-143
@@ -1,143 +0,0 @@
|
||||
# ✏️ 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
|
||||
|
||||
---
|
||||
@@ -136,6 +136,7 @@ public class LinkedNpcController {
|
||||
|
||||
npc.ais.readToNBT(compound);
|
||||
npc.transform.readToNBT(compound);
|
||||
npc.abilities.readFromNBT(compound);
|
||||
npc.ais.setMovingPath(points);
|
||||
npc.updateClient = true;
|
||||
}
|
||||
@@ -161,6 +162,7 @@ public class LinkedNpcController {
|
||||
npc.ais.writeToNBT(compound);
|
||||
npc.advanced.writeToNBT(compound);
|
||||
npc.transform.writeToNBT(compound);
|
||||
npc.abilities.writeToNBT(compound);
|
||||
compound.setTag("ModelData", ((EntityCustomNpc) npc).modelData.writeToNBT());
|
||||
return compound;
|
||||
}
|
||||
|
||||
+63
-206
@@ -2,41 +2,25 @@
|
||||
|
||||
---
|
||||
|
||||
The **Ability System** adds full combat abilities to CustomNPC+. Give your NPCs powerful attacks with visual telegraphs, launch energy projectiles, set traps, chain abilities into combos, and let players unlock abilities of their own.
|
||||
The **Ability System** adds full combat abilities to CustomNPC+. Give NPCs powerful attacks with visual telegraphs, launch energy projectiles, set traps, chain abilities into combos, and let players unlock abilities of their own.
|
||||
|
||||
---
|
||||
|
||||
## How Abilities Work
|
||||
|
||||
Every ability follows a **phase-based flow**:
|
||||
Every ability follows a **phase-based flow**: **Wind-up** (charge with telegraphs/animations) → **Active** (fire, deal damage, apply effects) → **Dazed** (optional recovery if interrupted).
|
||||
|
||||
- **Wind-up** - The ability charges up. Telegraphs appear on the ground, animations play, and observant players can react
|
||||
- **Active** - The ability fires. Damage is dealt, projectiles launch, effects apply
|
||||
- **Dazed** - Optional recovery state if the ability gets interrupted during wind-up
|
||||
**Core Settings:** Cooldown (universal + per-ability), Targeting (Aggro/Self/AOE Self/AOE Target), Range (min/max), Lock Movement/Rotation per phase, Interruptible wind-up, Weight (NPC priority), Invulnerability per phase, Ignore I-Frames, Free on Cast, and Magic Damage (separate type with split ratios).
|
||||
|
||||
**Settings you can configure:**
|
||||
- **Cooldown** - Time before the ability can be used again. Supports both a universal cooldown and per-ability cooldowns
|
||||
- **Targeting** - Aggro Target, Self, AOE on Self, or AOE on Target
|
||||
- **Range** - Minimum and maximum range for activation
|
||||
- **Lock Movement** - Lock the caster's movement, rotation, or both during any phase
|
||||
- **Interruptible** - Allow damage to interrupt the wind-up and force a dazed state
|
||||
- **Weight** - Priority weighting for NPC ability selection
|
||||
- **Invulnerability** - Make the caster invulnerable during Wind-up, Active, or both
|
||||
- **Ignore I-Frames** - Bypass the damage immunity timer for rapid consecutive hits
|
||||
- **Free on Cast** - The ability enters cooldown the moment it fires, freeing the caster while projectiles or zones persist on their own
|
||||
- **Magic Damage** - Deal magic damage as a separate damage type with configurable values and split ratios
|
||||
|
||||
> Abilities can be configured directly on individual NPCs or saved as **global presets** that update everywhere when edited.
|
||||
> Abilities can be configured on individual NPCs or saved as **global presets**.
|
||||
|
||||
---
|
||||
|
||||
## Melee Abilities
|
||||
|
||||
Close-range attacks for punishing positioning.
|
||||
|
||||
- **Slam** - Leap toward the target in an arc, dealing AOE damage on impact. Configure the radius, knockback, and leap height. Air slams deal reduced damage based on the 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. Configure the angle and reach
|
||||
- **Slam** - Leap toward target, AOE on impact. Configurable radius, knockback, leap height. Air slams deal reduced damage
|
||||
- **Heavy Hit** - Powerful single strike with bonus knockback and configurable hit delay
|
||||
- **Cutter** - Slashing arc in a cone with configurable angle and reach
|
||||
|
||||
> All melee abilities support configurable damage, knockback, and potion effects on hit.
|
||||
|
||||
@@ -44,129 +28,77 @@ Close-range attacks for punishing positioning.
|
||||
|
||||
## Energy Projectiles
|
||||
|
||||
A full projectile system with deep visual customization. Energy projectiles use a **Variant System** — each base type can be configured with variants like dual-fire or barrage patterns.
|
||||
A full projectile system with a **Variant System** for patterns like dual-fire or barrages.
|
||||
|
||||
### Types
|
||||
**Types:** Orb (homing spheres, dual-fire/barrage variants), Disc (spinning, optional boomerang, vertical/horizontal), Beam (sustained, Free Aim mode), Laser Shot (instant hitscan, no homing).
|
||||
|
||||
- **Orb** - Homing energy spheres that track their target. Supports dual-fire and barrage variants
|
||||
- **Disc** - Flat spinning projectiles with optional boomerang behavior. Supports vertical and horizontal orientation
|
||||
- **Beam** - Sustained energy beams connecting the caster to their target. Supports Free Aim mode for manual aiming
|
||||
- **Laser Shot** - Instant-fire hitscan projectile with configurable width and speed. No homing
|
||||
|
||||
### Projectile Settings
|
||||
|
||||
Every energy projectile shares these configurable properties:
|
||||
|
||||
- **Anchor Point** - Where the projectile spawns: Right Hand, Left Hand, Front, Center, Chest, Eye, or Above Head. Supports custom offset anchors
|
||||
- **Display** - 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
|
||||
- **Hit Type** - How the projectile interacts: Single (hits one), Pierce (passes through), or Multi (hits multiple). Pierce and Multi support a configurable max hit count
|
||||
- **Lifespan** - Speed, max age, and max travel distance (default 150 blocks)
|
||||
- **Size Interpolation** - Projectile size can smoothly change during flight
|
||||
- **Proximity Alpha** - Projectiles can fade based on distance from the viewer
|
||||
- **Explosions** - Detonate on impact with configurable radius. Block damage can be toggled
|
||||
**Shared Settings:** Anchor Point (7 presets + custom offset), Display (colors, glow, transparency, size), Homing (toggle, turn rate, range), Combat (damage, knockback, AOE splash), Hit Type (Single/Pierce/Multi with max hit count), Lifespan (speed, max age, max distance), Size Interpolation, Proximity Alpha, and Explosions (configurable radius, toggleable block damage).
|
||||
|
||||
---
|
||||
|
||||
## Energy Barriers
|
||||
|
||||
Defensive energy constructs that block incoming attacks.
|
||||
Defensive constructs that block incoming attacks.
|
||||
|
||||
- **Dome** - A spherical barrier centered on the caster. Blocks incoming projectiles with configurable damage multipliers, HP, and duration
|
||||
- **Wall** - A flat energy panel with configurable dimensions. 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
|
||||
- **Dome** - Spherical barrier around the caster
|
||||
- **Wall** - Flat panel with optional launch mode (fires forward dealing damage/knockback)
|
||||
- **Shield** - Held panel following the caster's facing direction
|
||||
|
||||
**Barrier Properties:**
|
||||
- HP and durability — barriers break when depleted
|
||||
- Configurable melee vulnerability
|
||||
- Damage absorption — attacks on the caster can be redirected to the barrier
|
||||
- Reflection — barriers can reflect projectiles back at the attacker
|
||||
- Ally/target filtering for which projectiles are blocked
|
||||
- Custom position offsets
|
||||
**Properties:** HP/durability, melee vulnerability toggle, damage absorption (redirects caster damage to barrier), projectile reflection, ally/target filtering, custom position offsets.
|
||||
|
||||
---
|
||||
|
||||
## Defensive Abilities
|
||||
|
||||
Reactive stances that protect the caster when hit.
|
||||
|
||||
- **Guard** - Reduces incoming damage by a configurable percentage. Lasts until duration expires or max hit count is reached
|
||||
- **Counter** - Absorbs attacks and counter-attacks the attacker. Counter damage can be flat or a percentage of absorbed damage. Plays a counter animation on each trigger
|
||||
- **Dodge** - Fully evades incoming attacks, negating all damage. Plays randomized dodge animations from up to three configurable animation slots
|
||||
|
||||
> All defensive abilities support configurable duration and max hit counts.
|
||||
- **Guard** - Reduces incoming damage by configurable %. Ends on duration or max hit count
|
||||
- **Counter** - Absorbs attacks and counter-attacks. Flat or percentage-based counter damage with counter animation
|
||||
- **Dodge** - Fully evades incoming attacks. Randomized dodge animations from up to 3 slots
|
||||
|
||||
---
|
||||
|
||||
## Movement Abilities
|
||||
|
||||
Reposition the caster during combat.
|
||||
|
||||
- **Charge** - Rush forward in a line, damaging everything in the path. Configure speed, hit width, and knockback
|
||||
- **Dash** - Quick directional movement without dealing damage. Supports directional key input to control the dash direction
|
||||
- **Teleport** - Instantly relocate to the target's position
|
||||
|
||||
> Charge locks direction during wind-up, so the telegraph accurately shows the attack path.
|
||||
- **Charge** - Rush forward dealing damage in path. Configurable speed, hit width, knockback. Direction locks during wind-up
|
||||
- **Dash** - Quick directional movement without damage. Supports directional key input
|
||||
- **Teleport** - Instant relocate to target's position
|
||||
|
||||
---
|
||||
|
||||
## AOE Abilities
|
||||
|
||||
Area control abilities that dominate space.
|
||||
|
||||
- **Shockwave** - AOE burst from the caster, dealing damage and knockback in a configurable radius
|
||||
- **Sweeper** - Wide rotational sweep around the caster with configurable radius and rotation speed. Can run alongside other abilities in chains
|
||||
- **Vortex** - Creates a pulling force that drags nearby entities toward the center while dealing damage
|
||||
- **Shockwave** - AOE burst from caster with configurable radius and knockback
|
||||
- **Sweeper** - Rotational sweep around caster. Can run alongside other abilities in chains
|
||||
- **Vortex** - Pulling force dragging entities toward center while dealing damage
|
||||
|
||||
---
|
||||
|
||||
## Hazards & Traps
|
||||
|
||||
Ground-based abilities for area denial and ambushes.
|
||||
|
||||
### Hazards
|
||||
|
||||
Persistent damaging zones that continuously hurt entities inside them. Configure the damage interval, number of zones (up to 20), shape (circle or square), zone height, and duration. Can optionally affect the caster.
|
||||
Persistent damaging zones with configurable damage interval, zone count (up to 20), shape (circle/square), height, and duration. Can affect caster.
|
||||
|
||||
**Visual Presets:** Default, Toxic, Inferno, Arcane, Electric, Frost — each with themed colors, particles, and effects.
|
||||
**Visual Presets:** Default, Toxic, Inferno, Arcane, Electric, Frost.
|
||||
|
||||
### Traps
|
||||
|
||||
Proximity-triggered abilities that sit dormant until an entity enters the trigger radius. Configure arm time, number of triggers, trigger cooldown, damage radius, and knockback. Traps can be hidden (invisible) until triggered.
|
||||
Proximity-triggered, sit dormant until an entity enters trigger radius. Configurable arm time, trigger count, cooldown, damage radius, knockback. Can be hidden until triggered.
|
||||
|
||||
**Trap Presets:**
|
||||
- **Hidden** - Minimal visibility, 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
|
||||
**Presets:** Hidden, Venom (Poison), Explosive (Fire), Cursed (Weakness), Shock (Mining Fatigue), Snare (Slowness).
|
||||
|
||||
### Zone Visuals
|
||||
|
||||
Both hazards and traps have a rich visual system with configurable ground fill, concentric rings, rotating borders, accents (static, swaying, or flickering), lightning arcs, and particle effects with multiple motion types.
|
||||
Both have configurable ground fill, concentric rings, rotating borders, accents (static/swaying/flickering), lightning arcs, and particles with multiple motion types.
|
||||
|
||||
---
|
||||
|
||||
## Ability Effect
|
||||
|
||||
A support ability for applying buffs, debuffs, healing, and custom effects.
|
||||
Support ability for buffs, debuffs, healing, and custom effects.
|
||||
|
||||
**Targeting:**
|
||||
- **Self** - Affect only the caster
|
||||
- **AOE Self** - Area-of-effect centered on the caster
|
||||
**Targeting:** Self or AOE Self (with Allies/Enemies/All filter based on Party/Faction).
|
||||
|
||||
**Target Filter (AOE):**
|
||||
- **Allies** - Only friendly entities (determined by Party for players, Faction for NPCs)
|
||||
- **Enemies** - Only hostile entities
|
||||
- **All** - Everyone in range
|
||||
|
||||
**What it can apply:**
|
||||
- Flat and percentage-based healing (instant or over time)
|
||||
- Vanilla potion effects
|
||||
- Custom effects from the Custom Effect system
|
||||
- Mod-registered effect actions
|
||||
**Applies:** Flat and percentage healing (instant or over time), vanilla potion effects, custom effects, and mod-registered effect actions.
|
||||
|
||||
**Built-in Variants:** Self Heal, Healing Aura, Poison Debuff.
|
||||
|
||||
@@ -174,83 +106,45 @@ A support ability for applying buffs, debuffs, healing, and custom effects.
|
||||
|
||||
## Custom Ability
|
||||
|
||||
A blank-slate ability type for scripters to build fully custom abilities through script hooks.
|
||||
|
||||
**Script Hooks:**
|
||||
- **Start** - When the ability begins
|
||||
- **Execute** - When entering the active phase
|
||||
- **Tick** - Every game tick with phase and tick count
|
||||
- **Complete** - When the ability finishes
|
||||
- **Toggle / Toggle Tick** - For toggle-mode abilities with multiple states
|
||||
|
||||
Full telegraph control with all shape types, configurable dimensions, colors, and duration. Supports both instant execution and multi-state toggle modes.
|
||||
Blank-slate ability for scripters with hooks: **Start**, **Execute**, **Tick** (with phase/count), **Complete**, **Toggle / Toggle Tick** (multi-state). Full telegraph control with all shapes. Supports instant and multi-state toggle modes.
|
||||
|
||||
---
|
||||
|
||||
## Burst System
|
||||
|
||||
Abilities can fire **multiple times in rapid succession** as a single use.
|
||||
Abilities fire **multiple times in rapid succession** as a single use.
|
||||
|
||||
- **Burst Amount** - Number of additional repetitions after the initial cast
|
||||
- **Burst Amount** - Additional repetitions after initial cast
|
||||
- **Burst Delay** - Ticks between each burst
|
||||
- **Replay Animations** - Optionally replay the wind-up animation on each burst
|
||||
- **Overlap Mode** - Previous entities persist while the next burst fires, allowing stacking effects
|
||||
- **Replay Animations** and **Overlap Mode** (previous entities persist during next burst)
|
||||
|
||||
> Available on most ability types including energy projectiles, melee abilities, and movement abilities.
|
||||
> Available on most ability types including energy projectiles, melee, and movement abilities.
|
||||
|
||||
---
|
||||
|
||||
## Chained Abilities
|
||||
|
||||
Chain multiple abilities into **sequential combos** that execute one after another.
|
||||
Chain abilities into **sequential combos** with configurable delays between entries. Options: Wind-up All (simultaneous wind-up), Chain Cooldown, Chain Conditions (checked once for the whole chain).
|
||||
|
||||
- **Ordered Entries** - Each entry 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 after the entire chain completes
|
||||
- **Chain Conditions** - Conditions checked once for the whole chain, not per-ability
|
||||
**Concurrency:** Effect, Hazard, Trap, and Sweeper types can execute alongside the primary ability instead of waiting.
|
||||
|
||||
### Concurrency
|
||||
|
||||
Specific ability types can run **concurrently** within a chain — executing alongside the primary ability instead of waiting. Concurrent-capable types include Effect, Hazard, Trap, and Sweeper.
|
||||
|
||||
> Chained abilities work with the ability hotbar and support live previewing in the editor.
|
||||
> Works with the ability hotbar and supports live previewing in the editor.
|
||||
|
||||
---
|
||||
|
||||
## Telegraph System
|
||||
|
||||
**Telegraphs** are visual ground indicators that warn players before an ability lands. They appear during wind-up and shift color before the ability fires.
|
||||
Visual ground indicators during wind-up that shift color before firing.
|
||||
|
||||
**Shapes:**
|
||||
- **Circle** - Filled circle with configurable radius
|
||||
- **Ring** - Donut shape with inner and outer radius
|
||||
- **Line** - Rectangle along the attack direction
|
||||
- **Cone** - Fan/wedge shape with configurable angle
|
||||
- **Point** - Single point indicator
|
||||
- **Square** - Square area indicator
|
||||
**Shapes:** Circle, Ring (donut), Line (rectangle), Cone (fan/wedge), Point, Square.
|
||||
|
||||
**Features:**
|
||||
- ARGB color customization for both telegraph and warning phase
|
||||
- Color shifts in the final ticks before firing
|
||||
- Can follow a moving entity or stay at a fixed position
|
||||
- Proper ground and air height handling
|
||||
- Saved as reusable presets shared across abilities
|
||||
**Features:** ARGB color customization for telegraph and warning phases, entity-following or fixed position, proper ground/air height handling, saved as reusable presets.
|
||||
|
||||
---
|
||||
|
||||
## Animations & Sound
|
||||
|
||||
Abilities integrate directly with the animation and sound systems.
|
||||
|
||||
- **Wind-up Animation** - Plays during charging
|
||||
- **Active Animation** - Plays when the ability fires
|
||||
- **Dazed Animation** - Plays during recovery
|
||||
- **Animation Sync** - Optionally match wind-up duration to animation length
|
||||
- **Sound Events** - Custom sounds for 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.
|
||||
Per-phase animations (Wind-up, Active, Dazed) with optional animation-synced duration. Custom sound events for wind-up and active phases. Phase colors on the caster. Multiple animations can be registered under one common name.
|
||||
|
||||
---
|
||||
|
||||
@@ -258,93 +152,56 @@ Abilities integrate directly with the animation and sound systems.
|
||||
|
||||
### Potion Effects
|
||||
|
||||
Abilities can apply potion effects to any entity they hit. Each effect has a configurable type, duration, and amplifier. Supports preset effect types and manual potion IDs for modded effects with amplification up to 255.
|
||||
Abilities can apply potion effects on hit with configurable type, duration, and amplifier (up to 255). Supports modded effects via manual potion IDs.
|
||||
|
||||
**Preset Effects:** Fire, Slowness, Weakness, Poison, Wither, Blindness, Nausea, Hunger, Mining Fatigue
|
||||
**Presets:** Fire, Slowness, Weakness, Poison, Wither, Blindness, Nausea, Hunger, Mining Fatigue.
|
||||
|
||||
### Conditions
|
||||
|
||||
Conditions control when an ability can be used. Each condition can check the **Caster**, the **Target**, or **Both**.
|
||||
Control when abilities can be used. Each checks **Caster**, **Target**, or **Both**:
|
||||
|
||||
- **HP Threshold** - Health above, below, or equal to a value (flat or percentage)
|
||||
- **Hit Count** - Caster hit a certain number of times within a time window
|
||||
- **Has Item** - Entity holding, wearing, or carrying a specific item
|
||||
- **Quest Completed** - Player has completed a specific quest
|
||||
- **Has Effect** - Entity has a specific custom effect applied
|
||||
- **HP Threshold** - Above/below/equal (flat or percentage)
|
||||
- **Hit Count** - Times hit within a time window
|
||||
- **Has Item** - Holding, wearing, or carrying a specific item
|
||||
- **Quest Completed** - Player completed a specific quest
|
||||
- **Has Effect** - Has a specific custom effect
|
||||
|
||||
---
|
||||
|
||||
## Player Abilities
|
||||
|
||||
Players can unlock and use abilities with a full hotbar system.
|
||||
|
||||
### Ability Hotbar
|
||||
|
||||
The **Ability Hotbar** is a 12-slot bar for equipping abilities. Hold the **HUD Key** and use the **scroll wheel** to cycle through equipped abilities. The hotbar shows 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.
|
||||
12-slot bar accessed by holding **HUD Key** + **scroll wheel**. Shows icons with cooldown progress. Horizontal or vertical layout with 3, 5, or 7 visible slots. Configured via drag-and-drop in the CNPC+ Inventory Ability Tab, customized in the HUD Editor.
|
||||
|
||||
### Player Features
|
||||
- **Unlock System** - Players receive abilities via scripting or commands
|
||||
- **Per-Ability Cooldowns** - Each ability can have its own cooldown on top of the universal cooldown
|
||||
- **Cancel on Double-Tap** - Double-tap the ability key during wind-up to cancel and enter cooldown immediately
|
||||
- **Ability Visibility** - Hide or show specific abilities in the HUD
|
||||
- **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
|
||||
|
||||
Unlock via scripting/commands, per-ability cooldowns, cancel on double-tap during wind-up, ability visibility toggle, proper state management (logout/dimension/death/respawn cleanup, movement suppression during locks), and flight safety.
|
||||
|
||||
---
|
||||
|
||||
## Scripting API
|
||||
|
||||
Full scripting support for ability lifecycle events:
|
||||
**Ability Events:** StartEvent, ExecuteEvent (both cancelable), InterruptEvent, CompleteEvent, HitEvent (cancelable, modifiable damage/knockback), TickEvent (phase + count), PlayerAbilityEvent.
|
||||
|
||||
- **StartEvent** *(Cancelable)* - When wind-up begins
|
||||
- **ExecuteEvent** *(Cancelable)* - When the ability activates
|
||||
- **InterruptEvent** - When wind-up is interrupted
|
||||
- **CompleteEvent** - When the ability finishes
|
||||
- **HitEvent** *(Cancelable)* - On each entity hit. Damage and knockback can be modified
|
||||
- **TickEvent** - Every tick with current phase and tick count
|
||||
- **PlayerAbilityEvent** - For player ability actions
|
||||
**Energy Projectile Events:** Fired, Update, EntityImpact, BlockImpact, Expired.
|
||||
|
||||
### Energy Projectile Scripting
|
||||
|
||||
Full scripting for all energy projectile types:
|
||||
- **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:
|
||||
- **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. Scripts are instanced — every use gets its own fresh set of variables.
|
||||
**Ability Extender System:** Register custom lifecycle hooks (onAbilityStart, onAbilityTick, onAbilityComplete, onAbilityDamage) per ability. Scripts are instanced per use.
|
||||
|
||||
---
|
||||
|
||||
## Ability Preview
|
||||
|
||||
The ability editor includes a **live preview system**. Test telegraph shapes, animations, projectile visuals, burst patterns, and chained ability sequences directly in the GUI on a dummy NPC — no world effects applied.
|
||||
Live preview in the editor — test telegraphs, animations, projectiles, burst patterns, and chains on a dummy NPC with no world effects.
|
||||
|
||||
---
|
||||
|
||||
## Commands
|
||||
|
||||
- `/kam ability list` - List all custom abilities
|
||||
- `/kam ability types` - List all registered ability types
|
||||
- `/kam ability prebuilts` - List all built-in abilities
|
||||
- `/kam ability info <name>` - View ability details
|
||||
- `/kam ability delete <name>` - Delete a custom ability
|
||||
- `/kam ability reload` - Reload abilities from disk
|
||||
- `/kam ability give <player> <ability>` - Give an ability to a player
|
||||
- `/kam ability remove <player> <ability>` - Remove an ability from a player
|
||||
- `/kam ability giveChain <player> <chain>` - Give a chained ability to a player
|
||||
- `/kam ability removeChain <player> <chain>` - Remove a chained ability from a player
|
||||
- `/kam ability list|types|prebuilts` - List abilities, types, or built-ins
|
||||
- `/kam ability info|delete|reload <name>` - View, delete, or reload abilities
|
||||
- `/kam ability give|remove <player> <ability>` - Player ability management
|
||||
- `/kam ability giveChain|removeChain <player> <chain>` - Chain management
|
||||
- `/kam ability player` - Manage player abilities
|
||||
|
||||
---
|
||||
+15
-85
@@ -8,148 +8,78 @@ The **Auction House** is a global player marketplace where players can list item
|
||||
|
||||
## Currency System
|
||||
|
||||
CNPC+ has a **built-in currency** used across all market features.
|
||||
|
||||
- **Fully Configurable** - Name it Coins, Gold, Credits — whatever fits your world. Set a starting balance and max balance cap
|
||||
- **Profile Persistent** - Currency carries across all your character slots
|
||||
- **Vault Support** - Integrates with Bukkit-compatible economy plugins if Vault is installed. Falls back to built-in currency otherwise
|
||||
- **Lifetime Tracking** - Tracks total earned and total spent per player
|
||||
|
||||
> Full scripting API support for currency operations on players.
|
||||
CNPC+ has a **built-in currency** — fully configurable name, starting balance, and max cap. Profile-persistent across character slots. Integrates with Vault-compatible economy plugins. Tracks lifetime earned/spent per player. Full scripting API support.
|
||||
|
||||
---
|
||||
|
||||
## Selling
|
||||
|
||||
List any item with a **Starting Price** for competitive bidding. Optionally set a **Buyout Price** so players can skip the wait and buy immediately. Auctions last **24 hours** by default.
|
||||
|
||||
- A configurable **Listing Fee** is charged when creating an auction
|
||||
- A **Sales Tax** is taken from successful sales
|
||||
- A configurable **minimum listing price** prevents spam listings
|
||||
List items with a **Starting Price** for bidding and an optional **Buyout Price** for instant purchase. Auctions last **24 hours** by default. Configurable listing fee, sales tax, and minimum listing price.
|
||||
|
||||
---
|
||||
|
||||
## Bidding
|
||||
|
||||
Compete for items by placing bids. Each bid must meet a **minimum increment** above the current bid (default 5%, configurable by the server).
|
||||
|
||||
- **Snipe Protection** - Auctions extend when last-second bids come in, giving everyone a fair shot
|
||||
- **Auto Refund** - If you get outbid, your currency is automatically returned
|
||||
Bids must meet a **minimum increment** above the current bid (default 5%, configurable). **Snipe Protection** extends auctions on last-second bids. Outbid currency is automatically refunded.
|
||||
|
||||
---
|
||||
|
||||
## Buyout
|
||||
|
||||
See something you want right now? Hit **Buy Now** to purchase instantly at the seller's Buyout Price. If you're already the highest bidder, you only pay the **difference** between your bid and the buyout.
|
||||
Instant purchase at the seller's Buyout Price. If you're the highest bidder, you only pay the **difference** between your bid and the buyout.
|
||||
|
||||
---
|
||||
|
||||
## My Trades
|
||||
|
||||
One screen to manage all your auction activity:
|
||||
Manage all auction activity in one screen: Active Listings, Active Bids, and Ready to Claim. Cancel your own listings (items returned as claims, configurable cancellation penalty if bids exist, default 10%).
|
||||
|
||||
- **Active Listings** - Items you're currently selling
|
||||
- **Active Bids** - Auctions you're competing in
|
||||
- **Ready to Claim** - Won items and currency waiting for pickup
|
||||
|
||||
You can **cancel** your own listings — items are returned as a claim. If there are active bids, a configurable **cancellation penalty** is charged (default 10%).
|
||||
|
||||
> Claims expire after **20 days**. Collect your items and currency before they're gone!
|
||||
> Claims expire after **20 days**.
|
||||
|
||||
---
|
||||
|
||||
## Search & Sorting
|
||||
|
||||
Find items with search and sort tools. Search filters by both **item name** and **seller name** at the same time. Item listings display their **attributes and stats** so you can evaluate items before bidding.
|
||||
|
||||
**Sort Options:**
|
||||
- Newest
|
||||
- Ending Soon
|
||||
- Price (Low to High)
|
||||
- Price (High to Low)
|
||||
- Most Bids
|
||||
Search by **item name** and **seller name** simultaneously. Listings show item attributes and stats. Sort by: Newest, Ending Soon, Price (Low/High), Most Bids.
|
||||
|
||||
---
|
||||
|
||||
## Notifications
|
||||
|
||||
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
|
||||
|
||||
If you're offline, you'll get a full **claim summary** when you log back in.
|
||||
Instant notifications for: item sold, outbid, auction won, auction expired, claim ready. Offline players receive a **claim summary** on login.
|
||||
|
||||
---
|
||||
|
||||
## Trade Slots
|
||||
|
||||
Every player gets a limited number of **Trade Slots** (default 8). Slots are shared across Active Listings, Active Bids, **and** Pending Claims — uncollected claims take up space. Pick up your claims to free slots!
|
||||
|
||||
> Server owners can grant more slots via permissions (up to 45) using `customnpcs.auction.trades.X` (where X is the number of slots), or grant **unlimited slots** with `customnpcs.auction.trades.*`.
|
||||
Players get limited **Trade Slots** (default 8) shared across listings, bids, and pending claims. Expandable via permissions (`customnpcs.auction.trades.X`, up to 45, or `.*` for unlimited).
|
||||
|
||||
---
|
||||
|
||||
## Item Blacklist
|
||||
|
||||
Server owners control what items can be listed on the Auction House.
|
||||
Block items by: specific registry name, wildcard patterns, entire mods, or NBT tags. **Soulbound** and **Profile-Slotbound** items are always blocked.
|
||||
|
||||
**Block by:**
|
||||
- **Item** - Specific registry names like `minecraft:diamond_sword`
|
||||
- **Wildcard** - Patterns like `minecraft:diamond*` to block all diamond items
|
||||
- **Mod** - Block all items from a specific mod
|
||||
- **NBT Tag** - Block items containing certain NBT data
|
||||
|
||||
> **Soulbound** and **Profile-Slotbound** items are always blocked automatically. Bound items cannot be traded.
|
||||
|
||||
**Blacklist Commands:**
|
||||
- `/kam auction blacklist add <item|mod|nbt> <value>` - Add to the blacklist
|
||||
- `/kam auction blacklist remove <item|mod|nbt> <value>` - Remove from the blacklist
|
||||
- `/kam auction blacklist list [item|mod|nbt]` - View blacklisted entries
|
||||
- `/kam auction blacklist reload` - Reload from config
|
||||
- `/kam auction blacklist check` - Check if your held item is blacklisted
|
||||
**Commands:** `/kam auction blacklist add|remove|list|reload|check`
|
||||
|
||||
---
|
||||
|
||||
## Auctioneer Role
|
||||
|
||||
A new NPC role that gives players access to the Auction House. Set the Auctioneer role on any NPC and players can interact with them to open the full Auction House — no extra setup needed.
|
||||
Set the Auctioneer role on any NPC — players interact to open the full Auction House.
|
||||
|
||||
---
|
||||
|
||||
## Admin Tools
|
||||
|
||||
### Admin Auction GUI
|
||||
**Admin GUI** with three tabs: Listings (view/search/stop/cancel), Create (server listings with custom seller/prices/durations), Claims (global admin pool).
|
||||
|
||||
A 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
|
||||
|
||||
### Commands
|
||||
|
||||
**Player Commands:**
|
||||
- `/kam auction open` - Open the Auction House GUI
|
||||
|
||||
**Admin Commands:**
|
||||
- `/kam auction list [page]` - View active auctions in chat
|
||||
- `/kam auction view <player>` - View a player's auction activity
|
||||
|
||||
> Server owners can enable **auction logging** to track all activity — creates, bids, buyouts, sales, expirations, cancellations, and claims. Each log type can be toggled individually.
|
||||
**Commands:** `/kam auction open` (player), `/kam auction list [page]` and `/kam auction view <player>` (admin). Configurable per-type auction logging.
|
||||
|
||||
---
|
||||
|
||||
## Scripting API
|
||||
|
||||
All auction events are **cancelable**, letting scripts intercept and control 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
|
||||
All auction events are **cancelable**: CreateEvent, BidEvent, BuyoutEvent, CancelEvent, ClaimEvent.
|
||||
|
||||
---
|
||||
@@ -1,96 +0,0 @@
|
||||
# Bug Fixes
|
||||
|
||||
---
|
||||
|
||||
Fixes to pre-existing systems included in this update.
|
||||
|
||||
---
|
||||
|
||||
## Scripting Engine
|
||||
|
||||
- Fixed instance scripts not loading correctly
|
||||
- Fixed script contexts not initializing properly
|
||||
- Fixed hooks not registering in certain scenarios
|
||||
- Fixed script configuration not syncing between server and client
|
||||
- Fixed Bukkit integration compatibility issues
|
||||
|
||||
---
|
||||
|
||||
## Quests & Dialogs
|
||||
|
||||
- Fixed quest cooldown not working for MC Custom and RL Custom timer types
|
||||
- Fixed quest and dialog modification names not saving correctly
|
||||
- Fixed quest and dialog saving bugs
|
||||
- Fixed dialog and quest category assignment bugs
|
||||
- Fixed bard music restarting or duplicating when opening dialogs
|
||||
|
||||
---
|
||||
|
||||
## NPCs
|
||||
|
||||
- Fixed NPC spawner yaw using camera yaw instead of proper facing direction
|
||||
- Fixed NPC biome spawn settings not persisting after editing
|
||||
- Fixed NPC invisibility caused by request client packet issues
|
||||
- Fixed NPC track speed handling
|
||||
- Fixed NPC set speed edge cases
|
||||
- Fixed missing spawn data on certain NPCs
|
||||
- Fixed block waypoint pathing
|
||||
- Fixed job spawner behavior
|
||||
- Fixed `setRace` not applying correctly
|
||||
- Fixed timer not being callable from a spawning NPC
|
||||
|
||||
---
|
||||
|
||||
## Animations
|
||||
|
||||
- Fixed animation offsets conflicting with vanilla offsets
|
||||
- Fixed animation lookup failures
|
||||
- Fixed animation syncing for built-in animations
|
||||
- Fixed animation resync on teleport
|
||||
- Fixed wrong names being registered on animation registration
|
||||
- Fixed animation controller loading twice on startup
|
||||
|
||||
---
|
||||
|
||||
## GUI
|
||||
|
||||
- Fixed hover labels on scroll components
|
||||
- Fixed text field input handling
|
||||
- Fixed close-on-ESC for outline and tag selection screens
|
||||
- Fixed rendering and selection in fullscreen move systems
|
||||
- Fixed crosshair alignment
|
||||
- Fixed sub-GUI spam closing on rapid clicks
|
||||
- Fixed GUI tab navigation
|
||||
- Fixed panel redirection logic
|
||||
- Fixed player data search functionality
|
||||
- Fixed GL rendering issues
|
||||
|
||||
---
|
||||
|
||||
## Mounts
|
||||
|
||||
- Fixed mount movement jitter by following vanilla horse/boat sync pattern
|
||||
- Fixed mount edge case handling for dismount scenarios
|
||||
|
||||
---
|
||||
|
||||
## Networking
|
||||
|
||||
- Fixed packet race conditions with language handling
|
||||
- Fixed wrong packet channel and misplaced SideOnly annotations
|
||||
- Fixed categorical assign packets
|
||||
|
||||
---
|
||||
|
||||
## Rendering & Textures
|
||||
|
||||
- Fixed texture pathing removing icons
|
||||
- Fixed rendering glitches in various systems
|
||||
|
||||
---
|
||||
|
||||
## Hitbox
|
||||
|
||||
- Fixed hitbox scaling and collision issues
|
||||
|
||||
---
|
||||
+53
-70
@@ -1,88 +1,71 @@
|
||||
# NPC, Animation & Tool Improvements
|
||||
|
||||
---
|
||||
|
||||
A collection of improvements to NPCs, animations, items, and tools added alongside the major feature updates.
|
||||
|
||||
---
|
||||
A collection of improvements to NPCs, animations, items, and tools alongside the major feature updates.
|
||||
|
||||
## Cloner Tab Overhaul
|
||||
|
||||
The Cloner now supports **folders** for organizing your saved NPCs, items, and entries.
|
||||
|
||||
- **Folder System** - Create folders and subfolders to organize the cloner however you like. Works for animations, abilities, forms, auras, outlines, effects, and linked items
|
||||
- **Full Screen Browser** - A new full-width directory view for browsing large collections
|
||||
- **Improved Tabs** - Better tab navigation for switching between cloner categories
|
||||
- **Quick Tags** - Tag-based filtering for fast searching within the cloner
|
||||
|
||||
---
|
||||
The Cloner now supports **folders and subfolders** for organizing all cloner categories (animations, abilities, forms, auras, outlines, effects, linked items). Full-width directory browser, improved tab navigation, and tag-based quick filtering.
|
||||
|
||||
## Animation Improvements
|
||||
|
||||
- **Data Store** - Animations can store and pass data across events and frames for complex animation logic
|
||||
- **Task System** - A new consumer-based system for reacting to animation lifecycle events
|
||||
- **Expanded API** - More animation control exposed to the scripting API
|
||||
|
||||
---
|
||||
- **Data Store** for passing data across animation events and frames
|
||||
- **Task System** - Consumer-based animation lifecycle events
|
||||
- **Expanded 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
|
||||
- **Ability Icons** - Ability icons in the hotbar support animated textures
|
||||
- **Scripted GUI** - Textured rectangles in scripted GUIs support animation
|
||||
- **Configurable** - Set frames per row, ticks per frame, and interpolation between frames
|
||||
|
||||
---
|
||||
**Frame-based animated textures** for linked/scripted items, custom effect icons, ability hotbar icons, and scripted GUI textured rectangles. Configurable frames per row, ticks per frame, and interpolation.
|
||||
|
||||
## NPC API Additions
|
||||
|
||||
New scripting API properties for finer control over NPCs:
|
||||
|
||||
- **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, fire reactions, tactical chance, and walking range are now scriptable
|
||||
- **Sound Control** - Full sound management via `ISound` with volume, pitch, repeat, and position
|
||||
- **Skin Overlay Colors** - `getColor()` and `setColor()` on skin overlays for tinting overlay layers
|
||||
- **Six Overlays in Singleplayer** - Skin overlays now work properly in singleplayer
|
||||
- **Knockback API** - New methods for applying knockback with support for respecting or ignoring knockback resistance
|
||||
- **Error Reporting** - Script exceptions now report to the Script Console with full stack traces instead of failing silently
|
||||
|
||||
---
|
||||
- **Hitbox Data** (`IHitboxData`) - Independent width/height scaling
|
||||
- **Tint Data** (`ITintData`) - Hurt tint and persistent color tints with alpha
|
||||
- **Behavior Properties** - Sprint, swim, doors, fire reactions, tactical chance, walking range now scriptable
|
||||
- **Sound Control** (`ISound`) - Volume, pitch, repeat, position
|
||||
- **Skin Overlay Colors** - `getColor()`/`setColor()` for tinting overlay layers
|
||||
- **Knockback API** - With support for respecting/ignoring knockback resistance
|
||||
- **Six Overlays in Singleplayer** now work properly
|
||||
- **Error Reporting** - Script exceptions report to Script Console with stack traces
|
||||
|
||||
## Natural Spawn Improvements
|
||||
|
||||
The natural NPC spawning system received several improvements:
|
||||
|
||||
- **GUI Improvements** - Better interface for configuring biome-based NPC spawns
|
||||
- **Runtime Control** - Improved runtime management of natural spawns
|
||||
- **Despawn Handling** - Better logic for naturally despawning NPCs when appropriate
|
||||
- **Biome Persistence** - Fixed NPC biome spawn settings not saving after editing
|
||||
|
||||
---
|
||||
Improved GUI, runtime control, despawn handling, and fixed biome spawn persistence.
|
||||
|
||||
## NPC Combat & Behavior
|
||||
|
||||
- **Attack Speed** - NPCs now properly respect attack speed when dealing damage, checking elapsed time before allowing hits
|
||||
- **Passive Faction Protection** - NPCs in passive factions are now prevented from taking damage
|
||||
- **Track Speed** - Improved NPC tracking speed handling for smoother target following
|
||||
- **Invalid Texture Fallback** - NPCs with invalid or missing texture paths now gracefully fall back to a default skin instead of showing errors
|
||||
|
||||
---
|
||||
- NPCs now properly respect **attack speed** before allowing hits
|
||||
- **Passive Faction Protection** prevents damage to passive faction NPCs
|
||||
- Improved **track speed** handling for smoother target following
|
||||
- **Invalid Texture Fallback** to default skin instead of errors
|
||||
|
||||
## Additional Changes
|
||||
- Player Dialog Events now work like NPC Dialog Events
|
||||
- Linked Item attack speed configuration and new scripting API methods
|
||||
- Right-click cycling on multi-option NPC buttons (Hair, Eyes, Fur, etc.)
|
||||
- Legacy Quest Import (CustomNPCs 1.6.4 format)
|
||||
- Fullscreen & pannable GUIs, unified menu background
|
||||
- Textfield CTRL shortcuts (A, C, V, etc.)
|
||||
- `java.lang.reflect` banned in scripts for security
|
||||
- Server-side fix for entity packet loss (invisible NPCs)
|
||||
|
||||
- **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
|
||||
- **Linked Item API** - New scripting API methods for linked items
|
||||
- **Right-Click Cycling** - Multi-option NPC buttons (Hair, Eyes, Fur, etc.) can be right-clicked to cycle backwards
|
||||
- **Legacy Quest Import** - Support for importing quest data from legacy CustomNPCs 1.6.4 format
|
||||
- **Fullscreen GUIs** - GUIs extending the CNPC+ base can now be fullscreen and pannable
|
||||
- **Menu Background** - Unified menu background applied across all CNPC+ GUI screens
|
||||
- **Textfield CTRL Operations** - Text fields now support CTRL+A, CTRL+C, CTRL+V, and other standard shortcuts
|
||||
- **Reflection Ban** - `java.lang.reflect` is now banned in scripts for security hardening
|
||||
- **Entity Packet Loss Fix** - Server-side mixin fix for entity packet loss preventing NPCs from becoming invisible
|
||||
# Bug Fixes
|
||||
|
||||
---
|
||||
## Scripting Engine
|
||||
- Fixed script config sync between server and client
|
||||
- Fixed Bukkit integration compatibility
|
||||
|
||||
## Quests & Dialogs
|
||||
- Fixed quest cooldown for MC Custom and RL Custom timer types
|
||||
- Fixed quest/dialog modification names, saving, and category assignment
|
||||
- Fixed bard music restarting/duplicating on dialog open
|
||||
|
||||
## NPCs
|
||||
- Fixed spawner yaw using camera yaw instead of proper facing
|
||||
- Fixed biome spawn settings not persisting
|
||||
- Fixed NPC invisibility from request client packet issues
|
||||
- Fixed track speed handling and set speed edge cases
|
||||
- Fixed missing spawn data, block waypoint pathing, and job spawner behavior
|
||||
- Fixed hitbox scaling and collision issues
|
||||
|
||||
## Animations
|
||||
- Fixed animation offsets conflicting with vanilla offsets
|
||||
- Fixed lookup failures, syncing, resync on teleport
|
||||
- Fixed wrong names on registration and controller loading twice on startup
|
||||
|
||||
## Mounts
|
||||
- Fixed movement jitter (now follows vanilla horse/boat sync pattern)
|
||||
- Fixed dismount edge cases
|
||||
+12
-62
@@ -2,7 +2,7 @@
|
||||
|
||||
---
|
||||
|
||||
The script editor has been rebuilt from the ground up into a **full-featured code editor** right inside Minecraft, with syntax highlighting, autocomplete, error detection, and support for writing scripts in Java.
|
||||
The script editor has been rebuilt into a **full-featured code editor** inside Minecraft with syntax highlighting, autocomplete, error detection, and Java scripting support.
|
||||
|
||||
---
|
||||
|
||||
@@ -10,85 +10,35 @@ The script editor has been rebuilt from the ground up into a **full-featured cod
|
||||
|
||||
### Writing Code
|
||||
|
||||
- **Syntax Highlighting** - Keywords, types, variables, methods, strings, and comments are color-coded automatically. Local variables, global fields, and chained method calls each get their own color
|
||||
- **Autocomplete** - Smart suggestions for methods, fields, and classes as you type. Knows whether you're in a static or instance context. Frequently used members appear first, and the cursor is placed between parentheses when a method has parameters
|
||||
- **Auto Imports** - Type a class name and the editor suggests the correct import
|
||||
- **Error Detection** - Catches mistakes before you run your script. Wrong argument types, missing methods, type mismatches, and unused imports are underlined with detailed error messages on hover
|
||||
- **Built-in Globals** - Objects like `Math`, `JSON`, `Date`, and `Number` are recognized automatically in JavaScript mode. Script variables like `npc`, `world`, and `event` are also recognized
|
||||
- **JS Language Support** - Arrow functions (`=>`), shorthand methods, object literals, and array expressions are all understood by the highlighter and type resolver
|
||||
- **Syntax Highlighting** - Color-coded keywords, types, variables, methods, strings, comments. Context-aware coloring for locals, globals, and chained calls
|
||||
- **Autocomplete** - Smart suggestions with static/instance context awareness, frequency-based ordering, and smart cursor placement for method parameters. Auto-imports for class names
|
||||
- **Error Detection** - Catches wrong argument types, missing methods, type mismatches, unused imports with detailed hover messages
|
||||
- **Built-in Globals** - ECMAScript 5.1 objects (`Math`, `JSON`, `Date`, `Number`) and script globals (`npc`, `world`, `event`) recognized automatically
|
||||
- **JS Language Support** - Arrow functions, shorthand methods, object literals, and array expressions understood by highlighter and type resolver
|
||||
|
||||
> Hover over any symbol to see its **full type information**, documentation, and declaration. Hover tooltips support JSDoc with markdown formatting, headings, code blocks, and scrolling for long documentation.
|
||||
|
||||
---
|
||||
> Hover any symbol for **full type info and documentation** with JSDoc markdown formatting, scrollable tooltips, and code blocks.
|
||||
|
||||
### Navigation
|
||||
|
||||
- **Go To Line** - `CTRL+G` jumps to any line
|
||||
- **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 to its definition
|
||||
- **Fullscreen Mode** - Expand the editor to fill your entire game window
|
||||
|
||||
---
|
||||
`CTRL+G` Go to Line, `CTRL+F` Search, `CTRL+H` Replace, `CTRL+Click` Go to Definition, Fullscreen Mode.
|
||||
|
||||
### Editing
|
||||
|
||||
- **Undo/Redo** - Smart undo that works on whole words, not individual characters
|
||||
- **Duplicate Line** - `CTRL+D` to duplicate the current line
|
||||
- **Comment Toggle** - `CTRL+/` to comment or uncomment selected lines
|
||||
- **Rename** - Rename a variable or method and every occurrence updates at once
|
||||
- **Move Lines** - Move lines up or down with shortcuts
|
||||
- **Copy Whole Line** - Copy with nothing selected grabs the entire line
|
||||
- **Triple Click** - Select an entire line instantly
|
||||
|
||||
---
|
||||
Undo/Redo (word-level), Duplicate Line (`CTRL+D`), Comment Toggle (`CTRL+/`), Rename (all occurrences), Move Lines, Copy Whole Line (empty selection), Triple Click (select line).
|
||||
|
||||
### Visual Polish
|
||||
|
||||
- **Line Numbers** - Clean gutter with current line highlighting
|
||||
- **Smooth Scrolling** - Eased scroll animations
|
||||
- **Indent Guides** - Vertical lines showing nesting depth, with the current scope highlighted in green
|
||||
- **Brace Matching** - Matching `{}` braces light up, unclosed braces turn red
|
||||
- **Smart Brackets** - Typing `{` auto-creates the closing `}` with correct indentation. Same for `()`, `[]`, `""`, and `''`
|
||||
- **Resizable Panels** - Autocomplete and hover panels can be resized and panned
|
||||
- **Keyboard Shortcut Overlay** - Press a button to see all available shortcuts
|
||||
Line numbers with current line highlight, smooth scrolling, indent guides (green current scope), brace matching (red unclosed), smart bracket auto-close, resizable/pannable panels, keyboard shortcut overlay.
|
||||
|
||||
---
|
||||
|
||||
## Java Scripting (Janino)
|
||||
|
||||
Write scripts in **real Java** instead of JavaScript. Powered by the **Janino** compiler, your Java code is compiled and runs natively.
|
||||
|
||||
- **Full Java Language** - Classes, interfaces, enums, generics, lambdas, and method references — everything you know from Java
|
||||
- **Automatic Hook Resolution** - 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
|
||||
- **Broad Support** - Java scripting works in NPC, Player, Forge, Recipe, Effect, and Linked Item scripts
|
||||
- **External Files** - Write `.java` scripts in an external editor and they load automatically
|
||||
|
||||
> Java and JavaScript scripts coexist side by side. Pick whichever language fits your workflow.
|
||||
Write scripts in **real Java** compiled natively via the **Janino** compiler. Full Java language support (classes, interfaces, enums, generics, lambdas, method references). Automatic hook resolution by method name. Per-tab language selector to mix Java and JavaScript. Works in NPC, Player, Forge, Recipe, Effect, and Linked Item scripts. External `.java` files load automatically.
|
||||
|
||||
---
|
||||
|
||||
## Client-Side Scripting
|
||||
|
||||
Scripts can now run **on the client** for responsive, visual experiences.
|
||||
Scripts can run **on the client** — server-controlled, auto-synced on login and reload, off by default. Enables custom UI effects, visual feedback, and client-only hooks while the server stays in control.
|
||||
|
||||
- **Server Controlled** - Server owners decide whether client scripting is allowed. Players can't enable it themselves
|
||||
- **Automatic Sync** - Script files are sent from the server to all clients on login, and re-synced on script reload
|
||||
- **Safe by Default** - Off by default, 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 control.
|
||||
|
||||
---
|
||||
|
||||
## Addon API Support
|
||||
|
||||
Addon developers can ship **type definitions** alongside their mods, giving scripters full autocomplete and documentation for addon APIs.
|
||||
|
||||
- **Automatic Loading** - Any mod can include `.d.ts` definition files in their `assets/<modid>/api/` directory and they 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 show up in autocomplete and hover info
|
||||
- **Hot Reload** - Definition files are reloaded when Minecraft resources are reloaded
|
||||
|
||||
> Scripters get autocomplete for addon APIs with zero setup. Addon developers just include their definitions.
|
||||
|
||||
---
|
||||
+5
-34
@@ -1,40 +1,11 @@
|
||||
# Trader Enhancements
|
||||
|
||||
---
|
||||
|
||||
Traders have been upgraded with a **stock system** and **currency integration**, turning them into proper shops with limited supply and real economy support.
|
||||
|
||||
---
|
||||
Traders upgraded with a **stock system** and **currency integration** for proper shops with limited supply and real economy support.
|
||||
|
||||
## Stock System
|
||||
|
||||
Traders now support **limited stock** with automatic restocking.
|
||||
|
||||
**Stock Modes:**
|
||||
- **Global** - All players share the same stock pool. When an item sells out, it's gone for everyone until restock
|
||||
- **Per-Player** - Each player has their own purchase limits. One player buying out stock doesn't affect others
|
||||
|
||||
**Restock Timers:**
|
||||
- **MC Daily / Weekly** - Restock based on Minecraft time
|
||||
- **RL Daily / Weekly** - Restock based on real-life time
|
||||
- **Custom** - Set your own interval in MC ticks or real-time
|
||||
|
||||
Stock counts, out-of-stock indicators, and restock timers are all visible directly in the trade interface so players know exactly what's available.
|
||||
|
||||
> Admins can manually reset stock or cooldowns via the Trader GUI.
|
||||
|
||||
---
|
||||
**Stock Modes:** Global (shared pool) or Per-Player (individual purchase limits).
|
||||
**Restock Timers:** MC Daily/Weekly, RL Daily/Weekly, or Custom (MC ticks / real-time).
|
||||
> Stock counts, out-of-stock indicators, and restock timers are visible in the trade interface. Admins can manually reset stock/cooldowns via the Trader GUI.
|
||||
|
||||
## Currency Trades
|
||||
|
||||
Trades can now require **currency on top of items**. Combine material costs with coin costs for balanced economy progression.
|
||||
|
||||
For example, a diamond sword might cost 3 diamonds **plus** 500 coins — creating more meaningful economic choices.
|
||||
|
||||
---
|
||||
|
||||
## Balance Preview
|
||||
|
||||
A **client-side balance preview** shows your expected balance during trades, so you can see exactly how much you'll have left before confirming a purchase.
|
||||
|
||||
---
|
||||
Trades can require **currency on top of items** — e.g., a diamond sword costing 3 diamonds **plus** 500 coins.
|
||||
Reference in new issue
Block a user