View unanswered posts | View active topics It is currently Wed Oct 02, 2024 8:43 am



Reply to topic  [ 6 posts ] 
 PresetName or InstanceName? 
Author Message
User avatar

Joined: Fri Dec 28, 2007 4:19 am
Posts: 1119
Reply with quote
Post PresetName or InstanceName?
Its struck me that I'm seeing more use of PresetName then InstanceName, whats up with that?


Sun Dec 13, 2009 12:50 am
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13143
Location: Here
Reply with quote
Post 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.


Sun Dec 13, 2009 1:57 am
Profile
User avatar

Joined: Wed Nov 22, 2006 3:19 pm
Posts: 2073
Reply with quote
Post 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).


Sun Dec 13, 2009 2:03 am
Profile
User avatar

Joined: Wed Jan 07, 2009 10:26 am
Posts: 4074
Location: That quaint little British colony down south
Reply with quote
Post Re: PresetName or InstanceName?
Technically it's PresetName, but InstanceName works just as well.


Sun Dec 13, 2009 2:11 am
Profile WWW
User avatar

Joined: Sat Nov 03, 2007 9:44 pm
Posts: 1916
Location: Flint Hills
Reply with quote
Post 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.


Sun Dec 13, 2009 8:26 am
Profile
User avatar

Joined: Fri Oct 17, 2008 9:46 pm
Posts: 5212
Location: The Grills Locker.
Reply with quote
Post 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.


Sun Dec 13, 2009 3:53 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.044s | 14 Queries | GZIP : Off ]