More Awesome Than You!

TS2: Burnination => The Podium => Topic started by: rufio on 2009 December 06, 23:18:56



Title: Miscellaneous Moddling Questions
Post by: rufio on 2009 December 06, 23:18:56
1.  How would one go about creating an invisible, omnipresent object that does not need to be bought and cannot be sold, which would sit around for the purpose of storing a set of global, hood-wide settings?  Alternatively, is there a way to do this without creating an object?
2.  To what extent is it possible to have an object on a community lot maintain a persistent state between visits from sims who do not own the lot, without resetting every time someone new shows up?  Would the state have to be saved to an above-mentioned global object, or is there a neater way to do it?
3.  Business info: where is it stored?  How does one get to it?  I notice that BRY calls Lua scripts to find out whether a lot has a business - does all business info have to be accessed through Lua scripts?  Are there major differences for home businesses?  Is it possible to get a list of all the businesses in the current hood without going through every single lot and testing to see if it is a business?  Are there ways to attach additional info fields to a business and be reasonably certain that it won't be overwritten with garbage later?


Title: Re: Miscellaneous Moddling Questions
Post by: J. M. Pescado on 2009 December 07, 01:13:09
1.  How would one go about creating an invisible, omnipresent object that does not need to be bought and cannot be sold, which would sit around for the purpose of storing a set of global, hood-wide settings?  Alternatively, is there a way to do this without creating an object?
Invisible omnipresent objects are common, as "controllers", and can be created by setting the "Global Object" bit in the OBJD, but they do not retain hood-wide settings, and each instance of an object is seperate and independent of those on other lots. If you wish to retain a global setting, you will need to utilize global neighborhood tokens, which don't necessarily need an invisible object. An example of global settings is seen in the Autonomy Controller, which retains the list of global proscriptions across all lots.

2.  To what extent is it possible to have an object on a community lot maintain a persistent state between visits from sims who do not own the lot, without resetting every time someone new shows up?  Would the state have to be saved to an above-mentioned global object, or is there a neater way to do it?
There isn't. This is neither feasible nor advisable.

3.  Business info: where is it stored?  How does one get to it?  I notice that BRY calls Lua scripts to find out whether a lot has a business - does all business info have to be accessed through Lua scripts?
Yes.

Are there major differences for home businesses?  Is it possible to get a list of all the businesses in the current hood without going through every single lot and testing to see if it is a business?  Are there ways to attach additional info fields to a business and be reasonably certain that it won't be overwritten with garbage later?
No.


Title: Re: Miscellaneous Moddling Questions
Post by: rufio on 2009 December 07, 01:22:44
Thanks.

If you wish to retain a global setting, you will need to utilize global neighborhood tokens, which don't necessarily need an invisible object. An example of global settings is seen in the Autonomy Controller, which retains the list of global proscriptions across all lots.

Ah, ok.  I looked at autonomycontrol briefly, but I was looking for global objects, not tokens.  How do neighborhood tokens work?  Do they carry across play sessions?  Are there problems if a mod that creates and manages such tokens is installed and then later deleted?

As for the global objects, I take it they can still be used to store persistent lot-wide settings, provided the lot isn't a community lot?


Title: Re: Miscellaneous Moddling Questions
Post by: J. M. Pescado on 2009 December 07, 01:38:26
Ah, ok.  I looked at autonomycontrol briefly, but I was looking for global objects, not tokens.  How do neighborhood tokens work?  Do they carry across play sessions?  Are there problems if a mod that creates and manages such tokens is installed and then later deleted?
Yes, and no, deleting them will just cause the loss of all tokens. You can store instance-specific data on lot-controllers, but don't expect them to stick around. For that, you will want lot-tokens, similar to AC's "proscribe for lot".


Title: Re: Miscellaneous Moddling Questions
Post by: rufio on 2009 December 07, 02:05:45
Ok - I'll go look at AC some more and see if I can figure out how it works.

ETA:  Ok, I understand how the tokens work.  Are there any special flags that need to be set to define an object as a token, or can any object be used as a token?  In AC specifically, what's the function of the Helper objects - are they needed for token manipulation in general, or just for your implementation of AC?  Why are they defined as "SimType"s (type value of 0x7)?