Logo Platform
logo amplifiers simplified

EncounterEntityReference

Reply
Copied to clipboard!
7 years ago
Feb 20, 2018, 3:39:14 AM

I've seen another discrepency between directly editing the original game files and when using a mod instead.


This time with the anomaly models that apper on the map and in the system. I can't get them to show up anymore. Even when I've exactly copied the original entries.


I'm taking a guess that this is referenced in AnomalieDefinitions.xml / <AnomalyDefinition> / <EncounterEntityReference>

Either way changing in mod it has no effect, but editing it on the original files does.


Is this another one of thoes secret hidden tables references that need to be added in the <PlugIns> of the index of modded xml files to load?

0Send private message
7 years ago
Feb 20, 2018, 9:17:41 AM

Hey Tychonoir,


The visual of anomalies is linked to the XmlMapping "ClassPlanet.Anomaly" (add .Discovery or .Battle if it's the system discovery sequence or a space battle).

The game retrieves all descriptors of type "PlanetAnomaly" on the planet, then builds a path to the prefab using the XmlMapping and spawns the visual of all the prefabs which exist.


It is currently not possible to add new visuals, because that would require to create new prefabs and this is not supported by our game architecture.

The existing visuals are PlanetAnomaly01-27, 29, 30, 38, 48, 49, PlanetAnomalyAcademy, PlanetAnomalyAcademyDestroyed, PlanetAnomalyAcademyRestored, PlanetAnomalyEndlessWonder1, PlanetAnomalyEndlessWonder2, PlanetAnomalyNaturalWonder1-6. Some of them have a Discovery or Battle specific visual (more detailed), but not all do.


As for the EncounterEntityReferences, those are the EncounterEffectArea provided by the anomaly. 

They are defined in Simulation/Battles/EncounterEntityDefinitions.xml in the vanilla files, and can provide effects in battle (like Special nodes do), but vanilla anomalies have no effect.

0Send private message
7 years ago
Feb 20, 2018, 11:32:55 PM

In my case, I'm using moon type anomalies, which I notice have slightly different rules.


As a reference, I looked at every file that contained "PlanetAnomaly25" (One of the vanilla moons) to see if I was missing something.

As far as I can see, I've included everthing. Although I don't yet see how it decides which prefab to assign to PlanetAnomaly25, so there must be something I'm missing.

In the case of anomalies, it looks like it's constructing a name reference based on the name of the anomaly. I don't know what's happeneing with the moons. In both cases it's unclear of how I make an anomaly or moon use one of the exsisting prefabs. Nor how it was working in my early tests.



0Send private message
7 years ago
Feb 22, 2018, 11:37:10 AM

This is the extract of Mapping.xml which defines how to find the prefab based on the anomaly SimulationDescriptor name (referenced here as $(PlanetAnomaly)):


<XmlMapping Name="ClassPlanet.Anomaly">
    <GameObject Name="Format('Anomaly_{0}', $(PlanetAnomaly))" Prefab="Format('Prefabs/Game/Environment/Anomaly/{0}', $(PlanetAnomaly))"/>
</XmlMapping>

Here, the Name of the GameObject is only used to rename the object in Unity. The Prefab however is what's interesting, because it is the path to the visual of the anomaly.

The name of the AnomalyDefinition is never taken into account: instead, the name of all the SimulationDescriptors it applies on the planet are used. 

It just happens that the descriptors are named exactly like the AnomalyDefinitions in vanilla files, which is why it can be confusing.

0Send private message
7 years ago
Feb 22, 2018, 4:50:01 PM

Ah ha.
I see what I have to do now. If I want to use the a moon prefab for a custom anomaly, I essentially have to replace the SimulationDescriptor with that exsisting moon name, soley to use it to call the prefab. Then use that along with the descriptor that has all my new data.


Cool. I'm nearly done now.

Thanks again.

0Send private message
?

Click here to login

Reply
Comment

Characters : 0
No results
0Send private message