DatabasePartition
A frostbite database partition. Partitions represent game-data bound structures (ebx).
Summary
Properties
| Name | Type |
|---|---|
| instances | DataContainer{} |
| guid | Guid |
| primaryInstance | DataContainer |
| name | string |
Methods
| Method | Returns |
|---|---|
| FindInstance(guid: Guid) | DataContainer | nil |
| ReplaceInstance(instance: DataContainer, replacement: DataContainer, replaceReferences: bool = true) | void |
| AddInstance(instance: DataContainer) | void |
| RemoveInstance(instance: DataContainer) | void |
Properties
instances
A table holding all the instances contained within this partition.
guid
The Guid of this partition.
primaryInstance
The primary instance of this partition.
name
string
The name of this partition. Ususally corresponds to the relative filename of the original file.
Methods
FindInstance
FindInstance(guid: Guid): DataContainer | nil
Tries to find and retrieve an instance with a matching guid from the current partition.
Parameters
| Name | Type | Description |
|---|---|---|
| guid | Guid | The Guid of the instance to find. |
Returns
| Type | Description |
|---|---|
| DataContainer | nil |
ReplaceInstance
ReplaceInstance(instance: DataContainer, replacement: DataContainer, replaceReferences: bool = true)
Replaces an instance within this partition with another replacement instance. When replaceReferences is set to true (default), VeniceEXT also calls DataContainer::ReplaceReferences on the original instance, replacing all references to it with its replacement.
Parameters
| Name | Type | Description |
|---|---|---|
| instance | DataContainer | The instance to replace. |
| replacement | DataContainer | The replacement instance. |
| replaceReferences | bool | Whether to replace all references of the original instance with the replacement. Defaults to true. |
AddInstance
AddInstance(instance: DataContainer)
Parameters
| Name | Type | Description |
|---|---|---|
| instance | DataContainer |
RemoveInstance
RemoveInstance(instance: DataContainer)
Parameters
| Name | Type | Description |
|---|---|---|
| instance | DataContainer |