MBINCompiler icon indicating copy to clipboard operation
MBINCompiler copied to clipboard

Specify size of strings in string list instead of using List<NMSString0x80> etc

Open emoose opened this issue 8 years ago • 1 comments

Should be pretty easy, can probably just change it to List<string> and use [MarshalAs(SizeConst= <stringLength>)], then in the deserializer have it use that SizeConst value when it encounters a List<string>.

I've just used special NMSString0x templates as a hacky workaround right now but that uglies up the XML a lot, I'll probably get around to fixing it later but if anyone wants to look into this in the meantime feel free.

emoose avatar Aug 19 '16 02:08 emoose

Maybe we should change the NMSAttribute to have a Size and a Count field, Size for lengths of data, Count for number of entries in an array.

That way we can use string[] instead of NMSString0x80[] and specify the lengths of the strings in the template.

emoose avatar Aug 30 '16 01:08 emoose