- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Create a World >
- Research - Research Thread: Turning a world into a University Town
- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Create a World >
- Research - Research Thread: Turning a world into a University Town
Posts: 997
Thanks: 22004 in 95 Posts
talks about rent), check this out: http://www.modthesims.info/download.php?t=498857
Posts: 289
Thanks: 1021 in 2 Posts
Not sure if it's what you are looking for (I don't remember how it works but the description talks about rent), check this out: http://www.modthesims.info/download.php?t=498857 |
I have that already, but it doesn't work that way.
Posts: 289
Thanks: 1021 in 2 Posts
I've also found out a lot of stuff about the roommate manager.
Posts: 997
Thanks: 22004 in 95 Posts
something that has been already solved months/years ago :P
In one of my previous replies, I talked about meta-autonomy. I researched that subject deeply but only in
relation to commercial lots (and it was weeks ago, I don't remember all details), so maybe what I wrote
wasn't very accurate or anyway helpful. IIRC residential lots also rely on meta-autonomy (for visitors for
example) but I doubt that is related to rental houses. By the way, unless I'm mistaken, the rental houses
in the UNI world are regular residential lots, so I guess the different behaviour depends by the world itself,
like you too speculated in one of the 26 threads you opened/necroed about it. Just kidding ^^
I got curious and made a little research myself. I haven't found much so far.
Can I ask you something? I never played much in the UNI world (and I have no intention to start), can you
please tell me what are the differences between a rental house in a Uni world and a regular house in a regular world?
- you don't have to buy it (at least in the screen you get the first time you go to the UNI world)
- you pay rent instead of bills (is it just an aesthetic change? is the amount to pay the same?)
- maybe the day of the week when you have to pay?
- are there other things?
If those are the only differences, then I guess they are mostly aesthetics ones (like simply using the word "rent" instead of "bill").
Not that there's something wrong if those are exactly the reasons you are interested in this subject.
Very OT and I apologize: I'm also wondering what is the difference between a regular residential lot and an apartment lot
(those that came with the UNI EP, nothing to do with LN). I know this is a very trivial question, but I never played with those either.
Posts: 289
Thanks: 1021 in 2 Posts
I haven't read this thread or others related, I'm hoping you did because it would be silly if we're talking about something that has been already solved months/years ago :P In one of my previous replies, I talked about meta-autonomy. I researched that subject deeply but only in relation to commercial lots (and it was weeks ago, I don't remember all details), so maybe what I wrote wasn't very accurate or anyway helpful. IIRC residential lots also rely on meta-autonomy (for visitors for example) but I doubt that is related to rental houses. By the way, unless I'm mistaken, the rental houses in the UNI world are regular residential lots, so I guess the different behaviour depends by the world itself, like you too speculated in one of the 26 threads you opened/necroed about it. Just kidding ^^ I got curious and made a little research myself. I haven't found much so far. Can I ask you something? I never played much in the UNI world (and I have no intention to start), can you please tell me what are the differences between a rental house in a Uni world and a regular house in a regular world? - you don't have to buy it (at least in the screen you get the first time you go to the UNI world) - you pay rent instead of bills (is it just an aesthetic change? is the amount to pay the same?) - maybe the day of the week when you have to pay? - are there other things? If those are the only differences, then I guess they are mostly aesthetics ones (like simply using the word "rent" instead of "bill"). Not that there's something wrong if those are exactly the reasons you are interested in this subject. Very OT and I apologize: I'm also wondering what is the difference between a regular residential lot and an apartment lot (those that came with the UNI EP, nothing to do with LN). I know this is a very trivial question, but I never played with those either. |
Hey, it was only like 3 threads! And I figured I would make a new one since this one is 2 years old ...
Yes, that is right about the differences between the rental home and regular home in the homeworld. You don't get bills in the mailbox in Uni, the rent is automatically deducted from your funds once a week - the day that you move in, so in Uni that's on Sundays (I think). Any roommates you have living with you in Uni always pays you rent on Fridays. The value is based on the value of the lot. I think it's 1% of the value based on the cost of the items, architecture, etc.
In the homeworld, an "Apartment" lot charges you rent, calculated the same way, except that it automatically forces you to take roommates - and the roommates that it spawns are added to your household, you have to control them. The Uni roommates, and roommates in regular lots that you activate over the phone/computer under Real Estate and Travel Services / Enable Roommates are NPCs.
Further, the apartment roommates will spawn a random number to fill you up to 4 PC Sims, and then the rest will be NPCs to equal 8. It makes absolutely no sense.
I looked at the code where it generates the roommates (thanks to a post at NRaas) and it mentions somewhere about the max number of roommates being 8. I was thinking, if it was changed to 0, maybe that would solve the problem. Here:
public void MoveSelectableIntoRoommateLot(Household selectableHousehold)
{
if (this.mHousehold == null)
{
this.MoveIn(selectableHousehold, false);
Household.RoommateManager.StartAcceptingRoommates(8, selectableHousehold);
}
else
{
List<SimDescription> list = new List<SimDescription>();
for (int i = 8 - selectableHousehold.NumActorMembersCountingPregnancy; ((i > 0) && (this.mHousehold != null)) && (this.mHousehold.SimDescriptions.Count > 0); i--)
{
SimDescription randomObjectFromList = RandomUtil.GetRandomObjectFromList<SimDescription>(this.mHousehold.SimDescriptions);
this.mHousehold.Remove(randomObjectFromList);
list.Add(randomObjectFromList);
}
while ((this.mHousehold != null) && (this.mHousehold.AllSimDescriptions.Count > 0))
{
SimDescription simDescription = this.mHousehold.AllSimDescriptions[0];
this.mHousehold.Remove(simDescription);
RoommateManager.PutRoommateInTowniePool(simDescription);
if (simDescription.CreatedSim != null)
{
simDescription.CreatedSim.Destroy();
}
}
if (this.mHousehold != null)
{
this.mHousehold.MoveOut();
}
this.MoveIn(selectableHousehold);
Household.RoommateManager.StartAcceptingRoommates(8, this.mHousehold);
foreach (SimDescription description3 in list)
{
Household.RoommateManager.AddRoommate(description3, this.mHousehold);
}
}
}
"Start Accepting Roommates" if you look up in Reflector calls MaxNumRoommates, which they are saying is 8. What if that was changed to 0 ... maybe the rest would stop?
This is the code that runs when you move a sim onto an apartment lot.
Posts: 997
Thanks: 22004 in 95 Posts
I'll check more carefully the code later, but after a quick glance I'm afraid changing that method requires a core mod.
Thanks for your explanations, I appreciate that ^^
Posts: 997
Thanks: 22004 in 95 Posts
It picks existing townies and if there aren't enough it creates and adds them until it reaches the max
number set for that household.
The function you mentioned sets that number to 8 (selectable Sims included) when you move
(from the Bin or with a transfer) a selectable family to a new lot. It's not tunable. Just 8. End of story.
But that number is stored in a variable, household.RoommateManager.mMaxNumberOfRoommates,
and that can be changed with a phone interaction, CallToggleRoommateServices, but not
on apartments or dormitories. RoommateManager.CanControlRoommateServices returns false in those cases
(and returns false as well if you are in a vacation world).
Maybe that interaction can be replaced with another less restrictive (and more customizable,
where you can select the roommates) or a new one can be added (to the phone or to the lot itself).
Posts: 289
Thanks: 1021 in 2 Posts
using System; using System.Collections.Generic; using System.Text; using Sims3.Gameplay.Actors; using Sims3.Gameplay.ActorSystems; using Sims3.Gameplay.CAS; using Sims3.Gameplay.Interactions; using Sims3.UI; using Sims3.SimIFace; using Sims3.Gameplay.Utilities; using Sims3.Gameplay.Objects.Electronics; namespace LeapsForCauchy { public class AlwaysAllowRoommateServicesMenu { [Tunable] protected static bool kInstantiator = false; static AlwaysAllowRoommateServicesMenu() { LoadSaveManager.ObjectGroupsPreLoad += new ObjectGroupsPreLoadHandler(OnPreLoad); } private static void OnPreLoad() { Phone.CallToggleRoommateServices.Singleton = new AlwaysAllowRoommateServicesMenu(); } } }
But I keep getting errors when trying to compile. It tells me this:
Warning 1 The predefined type 'System.Runtime.InteropServices.DefaultParameterValueAttribute' is defined in multiple assemblies in the global alias; using definition from 'c:\Users\Patrick\Documents\TS3 Mods\mscorlib.dll'
Error 2 Cannot implicitly convert type 'LeapsForCauchy.AlwaysAllowRoommateServicesMenu' to 'Sims3.Gameplay.Interactions.InteractionDefinition'. An explicit conversion exists (are you missing a cast?)
Not sure what to do for either one!
Posts: 997
Thanks: 22004 in 95 Posts
you are trying to assign to it a completely different type/class.
Copy/Paste CallToggleRoommateServices to your code, modify it and assign that to Singleton
(maybe you don't even need to rename it, it should be clear by the scope that you are referring
to the one in your code).
About the first error I'm not sure, are you using as reference for System.dll the one extracted from the game?
Posts: 289
Thanks: 1021 in 2 Posts
You have to assign to Singleton the InteractionDefinition of your custom interaction, you are trying to assign to it a completely different type/class. Copy/Paste CallToggleRoommateServices to your code, modify it and assign that to Singleton (maybe you don't even need to rename it, it should be clear by the scope that you are referring to the one in your code). About the first error I'm not sure, are you using as reference for System.dll the one extracted from the game? |
Yeah, I just learned that I am actually making a custom interaction. I thought that I was just trying to call the current interaction at a different time.
Yes, using the one extracted from the game. I had to "un protect" the DLLs in order to call Phone.CanToggleRoommateService, and I just did all of the DLLs that I extracted. Perhaps I shouldn't have done that.
Posts: 289
Thanks: 1021 in 2 Posts
using System; using System.Collections.Generic; using System.Text; using Sims3.Gameplay.Actors; using Sims3.Gameplay.ActorSystems; using Sims3.Gameplay.CAS; using Sims3.Gameplay.Interactions; using Sims3.UI; using Sims3.SimIFace; using Sims3.Gameplay.Utilities; using Sims3.Gameplay.Objects.Electronics; namespace LeapsForCauchy { public class RoommatesFix { [Tunable] protected static bool kInstantiator = false; public class CallToggleRoommateServices : Phone.Call { public class Definition : Phone.Call.CallDefinition<Phone.CallToggleRoommateServices> { public override string GetInteractionName(ref InteractionInstanceParameters parameters) { if (Household.RoommateManager.AcceptingRoommates) { return Localization.LocalizeString("Gameplay/Interactions/Roommates:Disable", new object[0]); } return Localization.LocalizeString("Gameplay/Interactions/Roommates:Enable", new object[0]); } public override string[] GetPath(bool isFemale) { return new string[] { Localization.LocalizeString("Gameplay/Objects/Electronics/SmartPhone:RealEstateAndTravel", new object[0]) + Localization.Ellipsis, Localization.LocalizeString("Gameplay/Interactions/Roommates:RoommatesPathName", new object[0]) + Localization.Ellipsis }; } public override bool Test(Sim a, Phone target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback) { return target.IsUsableBy(a) && !isAutonomous && RoommateManager.CanControlRoommateServices(a.Household) && base.Test(a, target, isAutonomous, ref greyedOutTooltipCallback); } } public static InteractionDefinition Singleton = new Phone.CallToggleRoommateServices.Definition(); public override Phone.Call.ConversationBehavior OnCallConnected() { return Phone.Call.ConversationBehavior.TalkBriefly; } public override void OnCallFinished() { if (Household.RoommateManager.AcceptingRoommates) { Household.RoommateManager.StopAcceptingRoommates(true); return; } Household.RoommateManager.StartAcceptingRoommates(this.Actor.Household); this.Actor.ShowTNSIfSelectable(Localization.LocalizeString("Gameplay/Notifications/Roommates:StartAccepting", new object[] { new AbsoluteTime(RoommateManager.kRoommateValidationTimeOfDay), RoommateManager.GetRentAmount(this.Actor.Household) * Household.RoommateManager.MaxNumRoommates }), StyledNotification.NotificationStyle.kGameMessagePositive); } } static RoommatesFix() { LoadSaveManager.ObjectGroupsPreLoad += new ObjectGroupsPreLoadHandler(OnPreLoad); } private static void OnPreLoad() { Phone.CallToggleRoommateServices.Singleton = new Phone.CallToggleRoommateServices.Definition(); } } }
Except it didn't do what I wanted it to. On an apartment lot, I still couldn't get to the roommates menu. But that's because I didn't change "CanControlRoommateServices" which looks like this (from ILSpy):
public static bool CanControlRoommateServices(Household household)
{
return household != null && household.LotHome != null && !household.LotHome.IsDormitoryLot && !household.LotHome.IsApartmentLot && !GameUtils.IsOnVacation();
}
So, do I need to make a new "CanControlRoommateServices" and just remove the part about "IsApartmentLot" ?
Posts: 997
Thanks: 22004 in 95 Posts
CanControlRoommateServicesCustom (to make it clearer that you are using a modified version)
and call your version of the method from the interaction.
But there's also something else you have to adapt:
private static void OnPreLoad() { Phone.CallToggleRoommateServices.Singleton = new Phone.CallToggleRoommateServices.Definition(); }
Phone.CallToggleRoommateServices.Singleton = new CallToggleRoommateServices.Definition();
Otherwise it will keep using the default one. You can also use "new RoommatesFix.CallToggle...etc"
to make it even clearer that you are using the modified version (but shouldn't be strictly needed).
-----
Inside the interaction, you should also change
public static InteractionDefinition Singleton = new Phone.CallToggleRoommateServices.Definition();
To
public static InteractionDefinition Singleton = new CallToggleRoommateServices.Definition();
Even if this is not needed since you are not going to use the Singleton defined there, but it's better to fix it anyway.
-----
In AssemblyInfo.cs, remember to put
using Sims3.SimIFace; [assembly:tunable]
-----
Let me know how it goes ^^
Posts: 289
Thanks: 1021 in 2 Posts
I was able to disable roommate services on an apartment lot. However, between 1 am and 2 am, it still randomly generated 2 roommates and added them to my household of 2 sims. So ... there seems to be something else that pushes the game to do this...
EDIT: I wish this was part of its own thread with a better subject so more people might see it!
Posts: 289
Thanks: 1021 in 2 Posts
Posts: 997
Thanks: 22004 in 95 Posts
to apartments lots even if you disable the service (probably because the game takes for granted that apartments must have them).
Does it at least respect the max number of roommates you set or it ignores that too?
Posts: 289
Thanks: 1021 in 2 Posts
It's working for me, but I play with story progression disabled. So I guess there's something there that keeps sending roommates to apartments lots even if you disable the service (probably because the game takes for granted that apartments must have them). Does it at least respect the max number of roommates you set or it ignores that too? |
Really? That's interesting...did you use the code I posted?!
Mine didn't let me choose the number of roommates. It just said Enable or Disable and that was it. My test family had 2 Sims, and it added 2 more. Didn't think about SP.
Posts: 997
Thanks: 22004 in 95 Posts
Kinda. I rewrote it from scratch re-using the existing code (inheriting from the default interactions instead of rewriting them entirely).
Same result with less code to write (but more effort to adapt the interactions).
Uhm, I'm not quite sure what's happening in my game. Apartment lots turn into regular lots for some reason. Is that normal? Bah!
I've also replaced the other 2 interactions, the one to select the roommate type (male, female or coed) and mostly the one that
lets you select the number of roommates, CallChangeRoommatesCount, adding "0" as option, to see if setting their max
number to zero would stop them but, with EA story progression enabled, they keep coming nonetheless. I had 1 Sim, 2 were
added in the next night - when StoryActions take place - and 1 more the following night until I got 4. I made a few test,
using 1 Sim + 1 explicitly invited to be a rommate and the total was always 4. So the cap is not considered in this case.
By the way, also the roommate type setting is ignored, I set coed but got only males. The Sim I've used for the tests was male,
maybe there's a relation but a bigger sample of tests is needed to make conclusions.
So these settings (enabled/disabled and roommate type/number) are only taken into consideration by the RoommateServices,
SP ignores/bypass them. Which is not surprising, but an attempt was due.
[Rambling about the number of beds] EDIT: Nope, the number of beds doesn't count.
I see a StoryProgressionService.AddRoommate, when I have time I'll try to see where that leads. Let me know if you have news.
Posts: 289
Thanks: 1021 in 2 Posts
# did you use the code I posted?! Kinda. I rewrote it from scratch re-using the existing code (inheriting from the default interactions instead of rewriting them entirely). Same result with less code to write (but more effort to adapt the interactions). Uhm, I'm not quite sure what's happening in my game. Apartment lots turn into regular lots for some reason. Is that normal? Bah! I've also replaced the other 2 interactions, the one to select the roommate type (male, female or coed) and mostly the one that lets you select the number of roommates, CallChangeRoommatesCount, adding "0" as option, to see if setting their max number to zero would stop them but, with EA story progression enabled, they keep coming nonetheless. I had 1 Sim, 2 were added in the next night - when StoryActions take place - and 1 more the following night until I got 4. I made a few test, using 1 Sim + 1 explicitly invited to be a rommate and the total was always 4. So the cap is not considered in this case. By the way, also the roommate type setting is ignored, I set coed but got only males. The Sim I've used for the tests was male, maybe there's a relation but a bigger sample of tests is needed to make conclusions. So these settings (enabled/disabled and roommate type/number) are only taken into consideration by the RoommateServices, SP ignores/bypass them. Which is not surprising, but an attempt was due. [Rambling about the number of beds] EDIT: Nope, the number of beds doesn't count. I see a StoryProgressionService.AddRoommate, when I have time I'll try to see where that leads. Let me know if you have news. |
Hm, that's really interesting! Yeah, there's a bug like that. If you change the lot to a regular lot, leave edit town, go back, change to something like community with no visitors allowed, leave edit town, go back, change to apartment, then go back and add the family, it'll stay as Apartment. Quirky, I know. You can see how hard EA really worked on this idea!
I posted over at NRaas and they suggested I add something else about OnWorldLoadFinished, did the same thing. I bet you're right, that it does have something to do with Story Progression. I believe that will keep adding them until you have 4 people in the household, from what others have also said. Why "4" is some magic number, who knows! It's interesting that it is totally ignoring the roommates setting.
I see there is also "AllowMoreStoryProgressionMoveIns" could have to do with that, too, maybe? Also just found StoryProgression.Demographics.RoommatePopulationDemographic and it mentions something about Apartment lots.
Posts: 338
Thanks: 28594 in 186 Posts
Absolutely unfamiliar with EA's SP, but after looking through the parts you've both pointed out, it looks like you could possibly disable EA'S SP from adding roommates by editing the Demographics XML. Look for the AddRoommate Action and try setting the Multiplier to 0 to see if that works. (If you are playing in a specific EA default world, you'll need to instead edit the XML for the specific world if there is one. If I were to hazard a guess the default Demographics XML is used for Sunset Valley, the Store Worlds and all custom worlds). Just a hunch at this point, but worth a try perhaps. If it works it'll only work at stopping EA's SP from adding roommates (not sure if NRaas does this), but you'll still have to disable the roommate manager of the lot from doing it via the custom interaction or some other method. Good luck
Posts: 997
Thanks: 22004 in 95 Posts
Testing now... yep, it's working (custom interaction to disable the RoommateServices,
EA's SP, default replacement of Demographics _XML and custom world).
Probably needs more testing to see if everything is fine, but seems very promising.
I wonder if it's worth to try to make also this adjustment (multiplier = 0) with a script mod,
to avoid potential conflicts with other mods that override that xml and make it work with any world.
Posts: 338
Thanks: 28594 in 186 Posts
Posts: 289
Thanks: 1021 in 2 Posts
Okay, so I know how to edit an XML, but I don't know where to find the file unless it is part of a package in S3PE. And I am playing in a custom world, the remake of Sunset Valley that is on the exchange at EA. (Oh! Would I just open the .world in S3PE to find the XML?)
Also, yeah I'd like to eventually put it in a script mod ... Wouldn't that make it easier to upload/share here? For installation ease and yes, lack of conflicts.
Can't wait to try this out when I get home from work. I do still need to add the number of roommates and type to my custom interaction. I'd like to test this out with the roommates enabled also, to make sure those roommates work the way they should. (I know, you're probably thinking, doesn't that defeat the purpose of this mod???? But my main purpose was just to disable the auto-spawning roommates that get added to the family. Now you can play with or without roommates, and still rent a lot instead of purchase if you so choose.)
Figuring out how to make this work with NRaas SP would be nice, too, since I know that is really popular.
Posts: 997
Thanks: 22004 in 95 Posts
of your mod and edit them from there (right clicking and selecting Notepad or an external editor if you defined one, Notepad++ is a common
choice, it offers syntax highlighting and other handy features).
I'll test it with NRaas SP and AwesomeMod StoryDriver. If it works with those too (I think it will) - and if you want - I'll help you find a way to
script the multiplier thingy.
You better double/triple check, but
NRaas SP : seems to work fine (using default settings and speed)
AwesomeMod StoryDriver : seems to work fine too (it's been a while since the last time I used it, but I think it was active)
Replacing the other 2 interactions to make them work in Apartments seems useless, since those settings aren't used in Apartments,
but if you want I'll post my sourcecode (the relevant part).
// EVENT HANDLERS private static void OnPreLoad() { Phone.CallToggleRoommateServices.Singleton = new CallToggleRoommateServicesModded.DefinitionModded(); Phone.CallChangeRoommateType.Singleton = new CallChangeRoommateTypeModded.DefinitionModded(); Phone.CallChangeRoommateCount.Singleton = new CallChangeRoommateCountModded.DefinitionModded(); } // CUSTOM INTERACTIONS public class CallToggleRoommateServicesModded : Phone.CallToggleRoommateServices { public class DefinitionModded : Phone.CallToggleRoommateServices.Definition { public override InteractionInstance CreateInstance(ref InteractionInstanceParameters parameters) { InteractionInstance ii = new CallToggleRoommateServicesModded(); ii.Init(ref parameters); return ii; } public override bool Test(Sim a, Phone target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback) { return target.IsUsableBy(a) && !isAutonomous && CanControlRoommateServicesModded(a.Household); } } } public class CallChangeRoommateTypeModded : Phone.CallChangeRoommateType { public class DefinitionModded : Phone.CallChangeRoommateType.Definition { public override InteractionInstance CreateInstance(ref InteractionInstanceParameters parameters) { InteractionInstance ii = new CallChangeRoommateTypeModded(); ii.Init(ref parameters); return ii; } public DefinitionModded() { } public DefinitionModded(RoommateManager.RoommateTypes type) { this.mType = type; } public override bool Test(Sim a, Phone target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback) { if (!target.IsUsableBy(a)) { return false; } if (isAutonomous) { return false; } if (!CanControlRoommateServicesModded(a.Household)) { return false; } if (!Household.RoommateManager.AcceptingRoommates) { greyedOutTooltipCallback = new GreyedOutTooltipCallback(Phone.CallChangeRoommateType.Definition.EnableRoommatesFirst); return false; } if (Household.RoommateManager.RoommateType == this.mType) { greyedOutTooltipCallback = new GreyedOutTooltipCallback(Phone.CallChangeRoommateType.Definition.AlreadyCurrentType); return false; } return true; } public override void AddInteractions(InteractionObjectPair iop, Sim actor, Phone target, List<InteractionObjectPair> results) { results.Add(new InteractionObjectPair(new CallChangeRoommateTypeModded.DefinitionModded(RoommateManager.RoommateTypes.Female), target)); results.Add(new InteractionObjectPair(new CallChangeRoommateTypeModded.DefinitionModded(RoommateManager.RoommateTypes.Male), target)); results.Add(new InteractionObjectPair(new CallChangeRoommateTypeModded.DefinitionModded(RoommateManager.RoommateTypes.Coed), target)); } } } public class CallChangeRoommateCountModded : Phone.CallChangeRoommateCount { public class DefinitionModded : Phone.CallChangeRoommateCount.Definition { public override InteractionInstance CreateInstance(ref InteractionInstanceParameters parameters) { InteractionInstance ii = new CallChangeRoommateCountModded(); ii.Init(ref parameters); return ii; } public DefinitionModded() { } public DefinitionModded(int num) { this.mNumRoommates = num; } public override bool Test(Sim a, Phone target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback) { if (!target.IsUsableBy(a)) { return false; } if (isAutonomous) { return false; } if (!CanControlRoommateServicesModded(a.Household)) { return false; } if (!Household.RoommateManager.AcceptingRoommates) { greyedOutTooltipCallback = new GreyedOutTooltipCallback(Phone.CallChangeRoommateCount.Definition.EnableRoommatesFirst); return false; } if (Household.RoommateManager.MaxNumRoommates == this.mNumRoommates) { greyedOutTooltipCallback = new GreyedOutTooltipCallback(Phone.CallChangeRoommateCount.Definition.CurrentNumRoommates); return false; } if (this.mNumRoommates < a.Household.GetNumberOfRoommates()) { greyedOutTooltipCallback = new GreyedOutTooltipCallback(Phone.CallChangeRoommateCount.Definition.TooManyCurrentRoommates); return false; } return true; } public override void AddInteractions(InteractionObjectPair iop, Sim actor, Phone target, List<InteractionObjectPair> results) { int num = 8 - actor.Household.NumActorMembersCountingPregnancy + actor.Household.GetNumberOfRoommates(); for (int i = 0; i <= num; i++) //for (int i = 1; i <= num; i++) { results.Add(new InteractionObjectPair(new CallChangeRoommateCountModded.DefinitionModded(i), target)); } } } } // AUXILIARY METHODS public static bool CanControlRoommateServicesModded(Household household) { return household != null && household.LotHome != null && !household.LotHome.IsDormitoryLot && //!household.LotHome.IsApartmentLot && !GameUtils.IsOnVacation(); }
Posts: 289
Thanks: 1021 in 2 Posts
Ok, so extract the XML from GameplayData.package. that I can do! Then I should add it to my scripted package as an XML? Is it okay/does it matter that the script isn't referencing that? And since it's not, will it automatically override the original settings?
Thanks for your code, it's definitely cleaner than mine! I'm actually impressed with myself that I even got mine to show up in the game so I'm certainly not opposed to constructive criticism about it!
I'm sure we could spend hours debating why EA did what they did, but I have to wonder if this is really how they expected an apartment lot to work, or it was just an oversight on their part that they didn't correct. In hindsight, it really was a seemingly simple fix.
So, if you'd be willing to help figure out a way to script it that would be great! I'd like to post this here because I think it's actually something a lot of people would like, but don't realize it. Or, like me, tried an apartment lot once and abandoned the idea since it works so poorly.
I'd feel bad posting, though, since in the end I won't have done too much of the actual coding, but it was my idea ... And of course I'd acknowledge those who helped! 😁
Posts: 997
Thanks: 22004 in 95 Posts
# Do you say those aren't relevant because they won't work in an apartment lot? Or because it defeats the purpose?
The first you said.
# Either way, though, since this action replaced the default phone interaction, it should be there so it will work properly on other lots.
If we leave them as they are, they will continue doing that.
# Besides, I could think of situations where you might want an apartment to run that way (assuming that it works).
Such as?
# Ok, so extract the XML from GameplayData.package. that I can do! Then I should add it to my scripted package as an XML?
# Is it okay/does it matter that the script isn't referencing that? And since it's not, will it automatically override the original settings?
Yes, it doesn't matter and yes.
EDIT: don't change its/their Instance ID.
# So, if you'd be willing to help figure out a way to script it that would be great!
Sure.
# I'd feel bad posting, though, since in the end I won't have done too much of the actual coding, but it was my idea ... And of course I'd acknowledge those who helped! 😁
Of course you'll be the one to upload it. I helped you gladly and I'm not interested in being credited.
Who Posted
|