RavienGaming / Reforged-Eden-2

Reforged Eden 2 bug reporting
https://steamcommunity.com/sharedfiles/filedetails/?id=3143225812
10 stars 0 forks source link

YAML exception errors in EAH when running a server based on RE2 scenario #389

Open RedScourge opened 5 days ago

RedScourge commented 5 days ago

Reforged Eden 2 Build Number

24

Game mode

Dedicated Server

Tested in vanilla

Not tested in vanilla or not applicable

Description of issue

Every few minutes when running a server using the RE2 scenario, you will get the following errors in the bottom left corner of the EAH windows. This is due to 2 playfield YAML files containing tabs instead of spaces

FIX: You can fix this error by opening the playfield_static.yaml files in the EdenMoonMethane2 and EdenMoonTemperate playfield folders, and replacing all tab characters with 4 or 5 space characters each.

Lines 53, 56, and 57 of Playfields/EdenMoonMethane2/playfield_static.yaml Lines 74 and 75 of Playfields/EdenMoonTemperate/playfield_static.yaml

Error code from console or log (Optional)

Error: YamlDotNet.Core.YamlException: (Line: 1, Col: 1, Idx: 0) - (Line: 1, Col: 1, Idx: 0): Expected 'SequenceStart', got 'MappingStart' (at Line: 1, Col: 1, Idx: 0). at YamlDotNet.Core.EventReader.Expect[T]() at YamlDotNet.Serialization.NodeDeserializers.CollectionNodeDeserializer.DeserializeHelper(Type tItem, EventReader reader, Type expectedType, Func3 nestedObjectDeserializer, IList result, Boolean canUpdate) at YamlDotNet.Serialization.NodeDeserializers.CollectionNodeDeserializer.YamlDotNet.Serialization.INodeDeserializer.Deserialize(EventReader reader, Type expectedType, Func3 nestedObjectDeserializer, Object& value) at YamlDotNet.Serialization.ValueDeserializers.NodeValueDeserializer.DeserializeValue(EventReader reader, Type expectedType, SerializerState state, IValueDeserializer nestedObjectDeserializer) at YamlDotNet.Serialization.ValueDeserializers.AliasValueDeserializer.DeserializeValue(EventReader reader, Type expectedType, SerializerState state, IValueDeserializer nestedObjectDeserializer) at YamlDotNet.Serialization.Deserializer.Deserialize(EventReader reader, Type type) at YamlDotNet.Serialization.Deserializer.Deserialize[T](TextReader input) at EPG.SectorYamlData.Deserialize(String path) at EmpAdminHelper.Funktionen.Fill_Playfields(Boolean blnForceReadMainSector): Further Infos: Fill_Playfields Yaml: -

POI Name

No response

Playfield Name

EdenMoonMethane2, EdenMoonTemperate

Playfield Class

No response

Star Name

No response

Star Class

No response

Mission Name

No response

Mission Objective

No response

Game Seed

No response

RedScourge commented 5 days ago

I am still getting this error, however I am not sure if it is because there are other invalid characters I did not search for, or if there are also tabs in other YAML files in places other than in the Playfields folder.

That being said, if you could run the following regex search and replace on all the playfield YAML files, this should remove extraneous spaces at the ends of values that extend all the way to line ends for no good reason:

Replace: ([a-zA-Z0-9]) +\n With: \1\n

I was able to do it in TextPad, you may also be able to do it in Notepad++ or other programs.

It results in a LOT of unnecessary spaces being removed. See the attached screenshots for what I mean by that.

regex2 regex1

RavienGaming commented 3 days ago

Fixed the tabs in the playfield files you mentioned in the first post for the next update.