You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After some thoughts, this resource is a bit useless and could just be replaced by an integer key (not an index!).
The only moment where we require to know the attachment is when receiving MasterServer units data.
But if we register archetype informations somewhere in the game (both GH and Unity) that contains a conversion of MasterServer-Id to Key, then it would be possible.
It would save a few bytes when transfering data in multiplayer or GH <-> Unity.
When creating NPC or AI enemies, the map-maker will not need to know the ID of the attachment, which is kinda good, and can also give an easier access to freedom instead of having the feeling to be constrained by availables attachments.
On the Unity side, we could just have a Model prefab with a map of integral keys instead of string keys (which is honestly, easier to work with, especially for map-making)
The Unity client will now have less dependencies to hard-coded master server ids
Cons
Models of the same "archetype" need to respect the same integral keys (eg: not mistyping 1 for helmet and 0 for helmet on another model)
If we implement dual-wield ability, and if it need to know the stat of each weapon, how could the ability know that? How can the ability enforce the archetype to be only dual-wield?
// on attack framevarequip=default;foreach(var equipment inGetBuffer<UnitDisplayedEquipment>(owner)){// Is this right? WeaponHand would indicate which hand is using that weapon... (this mean it would be possible to have an archetype with multiple hands!)if(archetype.GetEntity(equipment.Key).Has<WeaponHand>().Index ==isRightHand?1:0){equip= equipment.Resource;break;}}// apply stat based on 'equip' varisRightHand=!isRightHand;
The text was updated successfully, but these errors were encountered:
After some thoughts, this resource is a bit useless and could just be replaced by an integer key (not an index!).
The only moment where we require to know the attachment is when receiving MasterServer units data.
But if we register archetype informations somewhere in the game (both GH and Unity) that contains a conversion of MasterServer-Id to Key, then it would be possible.
There isn't a strong reason to do that, but:
Pros
Cons
The text was updated successfully, but these errors were encountered: