#xml issue

15 messages · Page 1 of 1 (latest)

bright birch
#

i made a custom tileset template and upon loading the map i am met with this error

System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at Celeste.Autotiler.orig_ReadInto(TerrainType data, Tileset tileset, XmlElement xml)
   at Celeste.Autotiler.ReadInto(TerrainType data, Tileset tileset, XmlElement xml) in /home/vsts/work/1/s/Celeste.Mod.mm/Patches/Autotiler.cs:line 39
   at Celeste.Autotiler..ctor(String filename)
   at DMD<Celeste.LevelLoader::.ctor>(LevelLoader this, Session session, Nullable`1 startPosition)
#

and i believe the cause to be this line

    <set mask="center" tiles="5,13; 5,14; 5,15; 5,16; 5,17; 5,18; 6,13; 6,14; 6,15; 6,16; 6,17; 6,18; 7,13; 7,14; 7,15; 7,16; 7,17; 7,18; 8,13; 8,14; 8,15; 8,16; 8,17; 8,18; 9,13; 9,14; 9,15; 9,16; 9,17; 9,18; 10,13; 10,14; 10,15; 10,16; 10,17; 10,18"/>
#

(for context it's just me wanting to have a lot more center tiles)

#

is there a way to get around this crash?

bright adder
#

can you provide the tileset png? i recall this error occurs if you utilize a co-ordinate outside the bounds of the texture

bright birch
#

this is the template

bright adder
#

i believe you've inverted your x and y co-ordinates in the new tiles

#

did that once myself for a really long xml; luckily someone i was working with knew enough python to invert the values automatically xD

bright birch
#

would inverting them be enough to crash it though

#

or would it just display gibberish on the screen

acoustic grove
#

depends; if it tries to get from outside the image i think that crashes

bright adder
#

it would crash, yes. it's looking for a section of texture that doesnt exist

acoustic grove
#

i mean, the vanilla textures are in an atlas, so doing it for that displays random other textures, but in this case they're actual separate textures, so it crashes

acoustic grove
bright birch
#

i'll try fixing the coords