Entity Tag System
See original GitHub issueSummary
This feature introduces a tag system for entities that can be used to make decisions.
Goals
- Simple straight forward API for working with tags.
- Simple JSON serialization types.
- Existing systems (status effects, item condition, etc) should participate in to tag system to allow decision marking.
Use Cases
- A breakable that only breaks when hit with a weapon with a specific tag. A boulder is only broken by a mattock. The mattock would be a weapon with the tag
rock-breaker
. - Triggers only fire when the encroaching entity has a specific tag. A special door only opens if the player is poisoned.
- Monster only takes damage from certain tags. A ghost might only be hurt with
magical
tagged weapons.
Proposed JSON
{
"id": "MyEntity",
"tags": "poisoned,broken,unique"
}
Proposed Data Structure
public interface TagCollection {
void add(String value);
void add(TagCollection values);
void remove(String value);
void remove(TagCollection values);
void toggle(String value);
void toggle(TagCollection values);
void contains(String value);
void containsAny(TagCollection values);
void containsAll(TagCollection values);
}
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:9 (5 by maintainers)
Top Results From Across the Web
What is entity tag (ETag)? | Definition from TechTarget
An entity tag (ETag) is an HTTP header used for Web cache validation and conditional requests from browsers for resources.
Read more >HTTP ETag - Wikipedia
The ETag or entity tag is part of HTTP, the protocol for the World Wide Web. It is one of several mechanisms that...
Read more >webDEALER | eTAG | TxDMV.gov
The webDEALER|eTAG system is designed to make processing dealer tags fast and easy for dealerships throughout the state while making temporary tag information ......
Read more >Tag component - Game Torrahod
A system DistanceToNearestShop where it is able to ensure all entities with Home component, will have an up to date ShopDistance with a...
Read more >Entity Tags - S&box Wiki
Entities can be tagged with string tags. These tags are networked, so are also available for query on the client. Entity tags are...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Why would that be difficult? It would look like:
Mock example of a trigger that removes a set of tags
Completely forgot about the editor, you’re right!
Is there a way to add an ‘editor representation’? As in, have the internal data structure be an array but be represented as string array (or other complex form) in the editor. Not too involved with editor param pane code.