Post by autisims on Apr 4, 2019 14:49:27 GMT -5
Hi everyone, I'm trying to make a tuning mod with Sims 4 Studio but today I've started getting an error message that's preventing me from saving my mod. It's not appearing every time I try to save - I've been able to make certain changes, but when I edit other things the message will appear.
I'm new to modding and Sims 4 Studio (well... I've been messing around with it for over a year but haven't successfully made anything yet), so I'm fully prepared to accept that this is something I've messed up somehow. It's just annoying because I thought I was finally getting somewhere with my mod until this happened :/
This is the error message I'm getting:
The Sims 4 Studio - Version 3.1.2.4
System.NullReferenceException: Object reference not set to an instance of an object.
at S4Studio.Data.IO.Tuning.SimDataResource.ProcessXField(List`1 tables, IList`1 schemas, UInt32 vh, row_data row, XElement xfield, SimDataType cSimtype, String cname)
at S4Studio.Data.IO.Tuning.SimDataResource.GenerateRowData(List`1 tables, XElement xtable, IList`1 schemas)
at S4Studio.Data.IO.Tuning.SimDataResource.ProcessXField(List`1 tables, IList`1 schemas, UInt32 vh, row_data row, XElement xfield, SimDataType cSimtype, String cname)
at S4Studio.Data.IO.Tuning.SimDataResource.GenerateRowData(List`1 tables, XElement xtable, IList`1 schemas)
at S4Studio.Data.IO.Tuning.SimDataResource.ProcessXField(List`1 tables, IList`1 schemas, UInt32 vh, row_data row, XElement xfield, SimDataType cSimtype, String cname)
at S4Studio.Data.IO.Tuning.SimDataResource.GenerateRowData(List`1 tables, XElement xtable, IList`1 schemas)
at S4Studio.Data.IO.Tuning.SimDataResource.Write(Stream stream, IReferenceList resources)
at S4Studio.Data.IO.Package.DBPFPackage.WriteResourceStream(FileStream final_stream, IPackedResource resource, IDBPFResourcePointer index)
at S4Studio.Data.IO.Package.DBPFPackage.WriteDataStream(Stream src_stream, FileStream final_stream)
at S4Studio.Data.IO.Package.DBPFPackage.SaveTempPackage(String out_file, String tmp, Stream pkg_stream)
at S4Studio.Data.IO.Package.DBPFPackage.Save(String out_file, Boolean inline, String temp_path)
at S4Studio.Shared.StudioDocumentModel.Save(String filename)
Any help with what this error message means would be appreciated. Thanks!
Edit: Figured out what I was doing wrong! I was trying to stop a trait conflicting with another trait, and figured I could just delete the entire line of code relating to conflicting traits. Turns out that you need to keep <L name="conflicting_traits" /> in there even if you don't want the trait to conflict with anything. Same goes for the custom gender option I was adding - even if you don't want to set the option as a default for either gender, you need to include <T name="MaleDefault">0</T>
and<T name="FemaleDefault">0</T> or it won't work. I can save the file fine now.
I'm new to modding and Sims 4 Studio (well... I've been messing around with it for over a year but haven't successfully made anything yet), so I'm fully prepared to accept that this is something I've messed up somehow. It's just annoying because I thought I was finally getting somewhere with my mod until this happened :/
This is the error message I'm getting:
The Sims 4 Studio - Version 3.1.2.4
System.NullReferenceException: Object reference not set to an instance of an object.
at S4Studio.Data.IO.Tuning.SimDataResource.ProcessXField(List`1 tables, IList`1 schemas, UInt32 vh, row_data row, XElement xfield, SimDataType cSimtype, String cname)
at S4Studio.Data.IO.Tuning.SimDataResource.GenerateRowData(List`1 tables, XElement xtable, IList`1 schemas)
at S4Studio.Data.IO.Tuning.SimDataResource.ProcessXField(List`1 tables, IList`1 schemas, UInt32 vh, row_data row, XElement xfield, SimDataType cSimtype, String cname)
at S4Studio.Data.IO.Tuning.SimDataResource.GenerateRowData(List`1 tables, XElement xtable, IList`1 schemas)
at S4Studio.Data.IO.Tuning.SimDataResource.ProcessXField(List`1 tables, IList`1 schemas, UInt32 vh, row_data row, XElement xfield, SimDataType cSimtype, String cname)
at S4Studio.Data.IO.Tuning.SimDataResource.GenerateRowData(List`1 tables, XElement xtable, IList`1 schemas)
at S4Studio.Data.IO.Tuning.SimDataResource.Write(Stream stream, IReferenceList resources)
at S4Studio.Data.IO.Package.DBPFPackage.WriteResourceStream(FileStream final_stream, IPackedResource resource, IDBPFResourcePointer index)
at S4Studio.Data.IO.Package.DBPFPackage.WriteDataStream(Stream src_stream, FileStream final_stream)
at S4Studio.Data.IO.Package.DBPFPackage.SaveTempPackage(String out_file, String tmp, Stream pkg_stream)
at S4Studio.Data.IO.Package.DBPFPackage.Save(String out_file, Boolean inline, String temp_path)
at S4Studio.Shared.StudioDocumentModel.Save(String filename)
Any help with what this error message means would be appreciated. Thanks!
Edit: Figured out what I was doing wrong! I was trying to stop a trait conflicting with another trait, and figured I could just delete the entire line of code relating to conflicting traits. Turns out that you need to keep <L name="conflicting_traits" /> in there even if you don't want the trait to conflict with anything. Same goes for the custom gender option I was adding - even if you don't want to set the option as a default for either gender, you need to include <T name="MaleDefault">0</T>
and<T name="FemaleDefault">0</T> or it won't work. I can save the file fine now.