Data Realms Fan Forums
http://45.55.195.193/

PresetName or InstanceName?
http://45.55.195.193/viewtopic.php?f=1&t=17355
Page 1 of 1

Author:  DSMK2 [ Sun Dec 13, 2009 12:50 am ]
Post subject:  PresetName or InstanceName?

Its struck me that I'm seeing more use of PresetName then InstanceName, whats up with that?

Author:  CaveCricket48 [ Sun Dec 13, 2009 1:57 am ]
Post subject:  Re: PresetName or InstanceName?

PresetName is used in all vanilla content, so when someone goes to copy some thing from Base.rte or other default content, they copy that. And I guess they want to keep consistancy and make everthing PresetName.

Author:  MaximDude [ Sun Dec 13, 2009 2:03 am ]
Post subject:  Re: PresetName or InstanceName?

PresetName.

InstanceName is old and was changed to PresetName, though I still see it is used for bunker modules (Why? I don't know).

Author:  411570N3 [ Sun Dec 13, 2009 2:11 am ]
Post subject:  Re: PresetName or InstanceName?

Technically it's PresetName, but InstanceName works just as well.

Author:  Azukki [ Sun Dec 13, 2009 8:26 am ]
Post subject:  Re: PresetName or InstanceName?

If I remember correctly, the two are partially interchangeable, but there's some problems with Lua using InstanceNames, and maybe some problems with copying one from another?

But PresetName is the new one in use by vanilla content, so your best bet is probably to use PresetNames. InstanceName will probably get more and more problems as time goes by, and it was probably kept functional just so we wouldn't complain of the entirety of mods becoming incompatible all at once.

That brings up the question of why presetname was needed in the first place instead of continuing to use instancename. It was probably less confusing when integrating Lua or something, I don't know.

Author:  Areku [ Sun Dec 13, 2009 3:53 pm ]
Post subject:  Re: PresetName or InstanceName?

No no no no no no no. PresetName is the basic variable that defines a new object's name. InstanceName, on the other hand, is used when you are coding an object that is a CopyOf of something else. That way:

Code:
AddParticle = MOPixel
   CopyOf = Pixel01
   InstanceName = Pixel02
etc.


It can also be used in place of PresetName, but sometimes it can cause bugs, so try to avoid that.

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/