[Proposal] Meta Entity.

ItsaMen

First time out of the vault
[REDACTED]
I propose having a new type of entity. A meta-entity.

A meta entity is collection of entities. Each will be assumed to be on same team, and be the same player. Assuming health applies, if one is destroyed all are destroyed.
A meta entity physically has only one of its entities known to the game engine in the same space and time. This entity we'll call the Ranking Entity.
A meta entity may be configured to have one or more of its entities active overall. Active would mean possibly accessible by LUA or the player, when or IF it becomes the Ranking Entity.
By accessible I mean only its object state not other properties.

To set the Ranking Entity this will be done by cycling through them all. The trigger could be something like a hotkey suchas ctrl-leftclick. We'll do a distance check on the main player to the Meta Entity before accepting a hotkey trigger.

The moment an entity becomes the Ranking Entity overhead text will be shown to indicate all of:

A) its index
B) its object script state
C) extra string

An inactive entity of the meta entity will be skipped in the cycling process.

==================

What does this thing solve? In FOT there is no object with multiple modes that also store information and that you could stand in front of and interact without having to move. Especially with modes we can render inaccessible when we desire and make the entity itself suddenly "become" any other entity type.

To be clear this isn't about propagating properties from one entity to another. Nor do we magically get to make doors be both doors and lootable bookcases. Although you might be able to make the illusion if they used same graphics.

How do we make Meta Entities?
Melindils FOT scripting engine could be modified to allow us to do it easily (especially regarding entity creation and swapping). LUA can be used to handle customization/design of the the Meta Entities themselves.
 
You can already pretty much do this with the basic editor tools. I implemented techniques in my mod that achieved basically what you are proposing.... using multiple clone entities to represent a single entity in a different state (ie: crouch/prone/stand/sleep/sneak etc.) at a different time depending on the game situation.

you are correct however, in that, the other mode entities, when activated, will not be in the exact same spot as the prime entity and you have to move a little bit to interact with the new mode entity. but if you use waypoints and the 'move unit' trigger to waypoint. the entities should all line up properly and you won't have to move when you interact with alternate modes. (theoretically).

What you are proposing is pretty cool because it would probably eliminate a ton of trigger scripting work!!
 
You can already pretty much do this with the basic editor tools. I implemented techniques in my mod that achieved basically what you are proposing.... using multiple clone entities to represent a single entity in a different state (ie: crouch/prone/stand/sleep/sneak etc.) at a different time depending on the game situation.

you are correct however, in that, the other mode entities, when activated, will not be in the exact same spot as the prime entity and you have to move a little bit to interact with the new mode entity. but if you use waypoints and the 'move unit' trigger to waypoint. the entities should all line up properly and you won't have to move when you interact with alternate modes. (theoretically).

What you are proposing is pretty cool because it would probably eliminate a ton of trigger scripting work!!

I may have a better option than using move entity (this is tricky and long to set up too...), but I haven't tested it, it is just in my head. I think it might be possible to use the keyboard (CTRL+arrow) to move two different entites with the same sprite but different type (let's say, two computers, one shut down and the other usable) at the exact same spot, one above the other. You set up the two entites in different "player index", player indexes not used by any other entity. Then you set one of them to "disabled", wich makes it disappear completely. Then, with triggers, you always activate one and disable the other, without need of moving or storing them, and they always show at the right place. If it works, you only need 2 lines of code and no waypoint.
 
Last edited:
I propose having a new type of entity. A meta-entity...

This all sounds great, but maybe some (more easy) improvements to entites could or should be done first. I say that but I realise it all concerns items, so I think it might be a bit beyond the topic here.

1. The first that I can see is to allow all items entity to modify character sheets. At this point, no item type except the "armour" and "skill enhancer" (like the lockpick), allow modification of the character sheet, and even that don't allow modification to perks and other more cryptic elements of the character sheet. It means that you can't have a weapon that give you a bonus to "small gun", to "PER" because there is a scope, or reduce your "DEX" because it is so very heavy, for example. That would be great to have this kind of improvement first.

2. Next one is an item that can be of multiple types AT ONCE. Like a consumable key, or a weapon ammo. Imagine you have some ammo, like the "acid jar". You could use it as a weapon and throw it to your opponent as an improvised, splash weapon, or use it as an ammo in the "super soaker" gun for better results.

3. Like I already said before, another great improvement to entities would be to have items affect the character sheet sometimes even when they are only in the inventory. That way, you would have an unlimited amount of items that are "wearable" by the character. For example, you get +5 outdoorsman if you have a rope, + 5 too if you have a compass, + 5 for binoculars, electric resistance for boots, and +50 carry weight for the extra backpack in your inventory, etc. etc.
 
Back
Top