Is it possible to include DPLC data (in ASM format) in an XML file? I attempted to use dplcfile, but it just results in an error describing that there's an invalid index in a source array.
I'm not sure what the problem would be then, other than a bug in the parser, an invalid frame number, or if you're using S3K mappings with S2-style DPLCs.
What do you exactly mean by that? Aren't S2 and S3K DPLCs the same format or are you referring to how the S2 disassembly uses binary mappings?
No, S3K has two types of DPLCs, the ones used by the player characters (and possibly something else) which are identical to the format used by Sonic 2, and ones used by other objects which use a brand new format. SonLVL defaults to the object format in S3K, you need to specify dplcver="S2" to use the player format. If you're wondering what the differences are, S2 has a range of 0-65535 entries per frame, while S3K has a range of 1-65536 entries per frame, and S2's entries have the tile count in the first four bits, while S3K's have the count last.
And that fixed it for the XML file, so, thank you! However, one more problem. I did the same for the INI file since certain objects would not show up, and out of the three I defined, only one actually worked. The others just spit out the same error as before. Code: System.ArgumentException: Source array was not long enough. Check srcIndex and length, and the array's lower bounds. at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable) at SonicRetro.SonLVL.API.LevelData.ProcessDPLC(Byte[] artfile, DPLCFrame dplc) in C:\Users\REDACTED\Documents\SonLVL-Owari\SonLVLAPI\LevelData.cs:line 2082 at SonicRetro.SonLVL.API.LevelData.MapFrameToBmp(Byte[] art, MappingsFrame map, DPLCFrame dplc, Int32 startpal, Boolean priority) in C:\Users\REDACTED\Documents\SonLVL-Owari\SonLVLAPI\LevelData.cs:line 2095 at SonicRetro.SonLVL.API.ObjectHelper.MapDPLCToBmp(Byte[] artfile, Byte[] mapfile, EngineVersion mapversion, Byte[] dplc, EngineVersion dplcversion, Int32 frame, Int32 startpal, Boolean priority) in C:\Users\REDACTED\Documents\SonLVL-Owari\SonLVLAPI\ObjectHelper.cs:line 36 at SonicRetro.SonLVL.API.ObjectHelper.MapASMDPLCToBmp(Byte[] artfile, String mapfileloc, EngineVersion mapversion, String dplcloc, EngineVersion dplcversion, Int32 frame, Int32 startpal, Boolean priority) in C:\Users\REDACTED\Documents\SonLVL-Owari\SonLVLAPI\ObjectHelper.cs:line 70 at SonicRetro.SonLVL.API.DefaultObjectDefinition.Init(ObjectData data) in C:\Users\REDACTED\Documents\SonLVL-Owari\SonLVLAPI\ObjectDefinition.cs:line 530 My DPLCs looks like this: Code: ; -------------------------------------------------------------------------------- ; Dynamic Pattern Loading Cues - output from SonMapEd - Sonic 3 & Knuckles format ; -------------------------------------------------------------------------------- SME_4L7nY: dc.w SME_4L7nY_2-SME_4L7nY SME_4L7nY_2: dc.b 0, 1, $F0, 0 even
Well assuming you've set that to S2, the only other thing it could be is that there aren't enough tiles in the art file to cover the range used by the DPLC.
So thanks to @Samey, the project files for the S1 2005 disassembly have been updated and are not only fully compatible with the current version of SonLVL, but they've been updated so they have all the same information as the GitHub disassembly's project files.
So I decided to do some level editing in Sonic 2 but there are missing object definitions now, the bridge in Emerald Hill, the path swaper and the twisting pathway object are the biggest examples of this though I did check other levels and most of them have a least 1 missing object definition, also in Sky Chase the Balkries and Turtleroids are silhouetted out. I think all of this has something to do with my attempt to download an update for SonLVL which failed and gave me a "Can't download file" message EDIT: I just had to download the new Sonic 2 Git INI files, I only just noticed that the Shellcracker doesn't have art but it has it's name listed and the Balkries and Turtleroids in SCZ are still silhouetted out. Is there a way I can add the art for these objects myself?
Man, I have a suggestion for the games in general. I'm editing a level here and I'm confusing about which collision solids are being used and which ones aren't. Would by any chance be added a function that could check which ones are unused so that we could clear all the unused with just one click? I mean, perhaps in a way similar to the "Delete Unused" function that exists with tiles, chunks, and blocks, but just clearing the unused collision solids once the deletion of them isn't a good idea.
Um. Collision data is normally game-wide, so just clearing out anything that's not used in the current level would have an adverse effect on all other levels. I believe the Usage Counts window will show you which collision indexes are being used by the current level, if you really must know.
Another little suggestion. Addition of a "Export selected chunk" option in this context menu, so we could straight export a specific chunk, tile or block to edit the same way as we can import instead of having to export the whole tileset for just edit a single chunk, block or tile. So we could edit it straight without to mess up the palette.
I second this. It would be great if you could export a selection, too. There were several times where I had to temporarily delete a background and replace it with some specific chunks so I could just export those chunks. It would be convenient to have a quicker way of doing that.
Can you add the option to import .pal files for palettes? I can't seem to find a way to convert a .pal file to an image that can be imported into Sonlvl without just doing it manually, which seems like a waste of time...
Besides I LOVING SonLVL, nothing is perfect, but I think it's like, 85% perfect for me. One of the things that it didn't looked good was some of the custom letters, so they're revamped now. btw, with all those years of SonLVL, I think it's kinda strange no one approached to help with this lil' issue. :^P Also, if someone else wants to use them as well, feel free to do so! ^u^ Obviously, this was made by me. EDIT: if you're going to have some trouble by putting the new Q, don't worry, the original one isn't that bad either.