-
Notifications
You must be signed in to change notification settings - Fork 28
Add WayPoint instance object for TombEngine with toolbar integration, dual identification (Name/Sequence) with strict uniqueness validation, shape rendering, scale gizmo (Name-only, no LuaName) #1112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
…r integration Co-authored-by: TrainWrack <120750885+TrainWrack@users.noreply.github.com>
Co-authored-by: TrainWrack <120750885+TrainWrack@users.noreply.github.com>
Co-authored-by: TrainWrack <120750885+TrainWrack@users.noreply.github.com>
… PathType consistency Co-authored-by: TrainWrack <120750885+TrainWrack@users.noreply.github.com>
|
@copilot Can we make it so that these are only usable in editor for TEN target? |
Co-authored-by: TrainWrack <120750885+TrainWrack@users.noreply.github.com>
Done! WayPoints are now restricted to TombEngine only. Added version checks (
Also added full TombEngine compiler support:
Commit: 46bca0f |
Co-authored-by: TrainWrack <120750885+TrainWrack@users.noreply.github.com>
|
@copilot Using Center + Radius as the default behavior, but extending it so that if a second radius is provided, it transitions into an ellipse, combines simplicity with flexibility. Here's how this could work: Behavior Design for Circles and Ellipses 1st WayPoint: Defines the center of the circle or ellipse. In the property window, users can control: Shape: For Circles: If only 2 points are defined, the path remains circular. |
Co-authored-by: TrainWrack <120750885+TrainWrack@users.noreply.github.com>
Implemented! WayPoints now support Circle/Ellipse shapes with center + radius behavior: Circle Mode (default):
Ellipse Mode:
Property Window:
All properties saved/loaded in project files and compiled to TombEngine level format. Commit: 34ba61f |
|
@copilot How would an ellipse be made if thr three points do not make a plane? |
The ellipse is defined in the waypoint's local coordinate system, not by positioning three separate waypoints. Here's how it works: Current Implementation:
Why this approach:
The "3 waypoint" description in the PR was conceptual workflow guidance, not the actual data structure. The implementation uses rotation properties to define the ellipse plane orientation, ensuring mathematical validity. |
Co-authored-by: TrainWrack <120750885+TrainWrack@users.noreply.github.com>
Added back the Sequence field as an alternative identifier alongside Name. WayPoints now support dual identification: Name-based: Group by base name (e.g., "patrol_0", "patrol_1") Both fields can be used independently or together. Batch type updates now work with BOTH - when you change a waypoint's type, all waypoints with either the same base name OR the same sequence number will be updated. The form now includes the Sequence field between Name and Number. All serialization (save/load) and compilation to TombEngine format includes the Sequence field. Commit: b09d92d |
|
@copilot Can we add waypoint to the Toolbar and Toolbar Layout. It should only be enabled if level is TEN. |
Co-authored-by: TrainWrack <120750885+TrainWrack@users.noreply.github.com>
Added! WayPoint button is now in the main toolbar after the FlybyCamera button. It's automatically enabled only for TombEngine levels and disabled for other game versions. The button uses the waypoint icon (orange marker) and follows the same pattern as other Add buttons with Tag="AddWayPoint". It's also included in the toolbar customization system (FormToolBarLayout), so users can show/hide or reposition it via Tools → Toolbar Layout. Commit: 5ba86f6 |
|
@copilot Can we remove the lua name field and all the code related to generation, display of lua names for waypoints? when they are selected. If you right click on the item it currently shows the rename object option. It should also be removed for waypoints, similar to ghost blocks. Basically, waypoints should only have the name and not lua name. |
…only Co-authored-by: TrainWrack <120750885+TrainWrack@users.noreply.github.com>
Removed all LuaName functionality from WayPoints. Changes:
WayPoints now use Name field only for identification, similar to GhostBlocks. Commit: 1c198f4 |
|
@copilot Right, but now when I right click a waypoint object, I do not see Edit Object option anymore. Also, I do not see the rotation of the object anymore when I select the object. I see only Name (Number) Pos: |
Co-authored-by: TrainWrack <120750885+TrainWrack@users.noreply.github.com>
Fixed both issues in commit 026ae2a:
The rotation info uses the same |
|
@copilot Currently it is allowed to create waypoints with same sequence number but different names. It should not be allowed. Sequence number and Name should be unique. Only when the number changes is it ok cause they are part of the same set. |
Co-authored-by: TrainWrack <120750885+TrainWrack@users.noreply.github.com>
Added sequence number uniqueness validation. Sequence numbers must now be unique across waypoints with different base names. Validation rules:
Error message shows: "A WayPoint with sequence number X already exists with a different name ('Y'). Sequence numbers must be unique unless waypoints share the same base name." Commit: 6e1457f |
WayPoint Instance Implementation - COMPLETE ✅
Summary
Successfully implemented the WayPoint instance object in Tomb Editor with a unified type system for TombEngine. Features toolbar integration, single type dropdown with disabled fields for better UI consistency, shape rendering with dimension controls, scale gizmo support, intelligent auto-naming, dual identification system (Name and Sequence) with strict uniqueness validation, name-based batch updates, unique name validation, and selective compilation. WayPoints use Name only (no LuaName or ScriptID) - similar to GhostBlocks pattern.
Latest Fix ⚡
Previous Fixes
Core Implementation
WayPointInstance (
TombLib/TombLib/LevelData/Instances/WayPointInstance.cs)WayPointTypeenum: Point, Circle, Ellipse, Square, Rectangle, Linear, BezierIRotateableYXRollfor full 3-axis rotationUI Design
Main Toolbar (
MainView.cs/.Designer.cs)Property Window (
FormWayPoint.cs) ⚡Context Menu (
MaterialObjectContextMenu.cs)3D Text Display (
Panel3DDraw.cs)Advanced Features
Name-Only Identification:
Toolbar Integration:
Dual Identification System with Strict Uniqueness: ⚡
Scale Gizmo Support:
Full 3-Axis Rotation:
Smart Copy Behavior:
3D Rendering
Waypoint Markers (
Panel3DDraw.cs):Shape Rendering:
Path Rendering:
Compilation
TombEngine Binary Format (
TombEngine.cs)TombEngine Struct (
Structs.cs)TombEngineWayPointstruct updatedCompilation Logic (
LevelCompilerTombEngine.cs)Files Changed
New Files (6):
Modified Files (23):
Security Summary
Build & Runtime Status
Usage Notes
Waypoint Identification: ⚡
Uniqueness Rules: ⚡
Context Menu Behavior:
3D Display:
Using Toolbar Button:
Using Dual Identification: ⚡
Using Scale Gizmo:
Using Rotation:
Copying Waypoints:
Validation Rules
✅ Allowed:
❌ Not Allowed:
⚡ = Latest: Sequence number uniqueness validation with clear error messages
Original prompt
This pull request was created from Copilot chat.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.