- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Modding Discussion >
- Battery.Utility Menus help regarding Sims
- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Modding Discussion >
- Battery.Utility Menus help regarding Sims
Replies: 8 (Who?), Viewed: 989 times.
#1
16th Apr 2021 at 8:34 AM
Posts: 1,500
Thanks: 4283 in 41 Posts
Battery.Utility Menus help regarding Sims
I wanted to know how I can add a bunch of sims profiles to the menu like Nraas does. And then select one or multiple sims from that menu. I'm working on it. But if someone can provide a quick tip it'll solve hours of trial and error. @Battery
Advertisement
Space Pony
#2
16th Apr 2021 at 2:52 PM
Last edited by Battery : 16th Apr 2021 at 5:49 PM.
Posts: 433
Thanks: 792 in 6 Posts
Hey @PuddingFace,
if you are using version 1.02b8 or newer (just uploaded) you can use a preset for a Simpicking Menu ( you can find these under "Battery.UI.Menus.MenuContainer.Presets")
Example:
This would be the simplest way, if you need more customization options let me know and i will try to guide you
E: Be careful when using OnSimsPicked some functions wont work on that one thread, you have to experiment to figure out which methods you can use, if you want to use a method that does not work let me know and i see what i can do about it
Example:
SwitchToOutfitWithoutSpin works /no thread sync required
SwitchToOutfitWithSpin does NOT work /sync required
if you are using version 1.02b8 or newer (just uploaded) you can use a preset for a Simpicking Menu ( you can find these under "Battery.UI.Menus.MenuContainer.Presets")
Example:
Code:
public static void OnSimsPicked(IList<Sim> sims) { //Do stuff with picked sims } . . .. Sim[] Simlist = Sims3.Gameplay.Queries.GetObjects<Sim>(Sim.ActiveActor.LotCurrent); //Get all sims on the same lot of the currently selected sim MenuGetter menu = MenuContainer.Presets.GetColorCodedSimPicker(Simlist , OnSimsPicked, "Select Sims Menu", 3); // Create a On time Menu (List , Action<List<Sim>>, Menu Name,Selectable Sims) MenuController.Show(menu); //Show the menu
This would be the simplest way, if you need more customization options let me know and i will try to guide you
E: Be careful when using OnSimsPicked some functions wont work on that one thread, you have to experiment to figure out which methods you can use, if you want to use a method that does not work let me know and i see what i can do about it
Example:
SwitchToOutfitWithoutSpin works /no thread sync required
SwitchToOutfitWithSpin does NOT work /sync required
#3
17th Apr 2021 at 5:46 AM
Posts: 1,500
Thanks: 4283 in 41 Posts
Thank you I shall try this. Btw do I have to update my Vampire mod for 1.02b8 if I want to use 1.02b8 for a different mod? (I'll probably do it anyway but just trying to confirm)
Space Pony
#4
17th Apr 2021 at 9:57 AM
Posts: 433
Thanks: 792 in 6 Posts
Quote: Originally posted by PuddingFace
Thank you I shall try this. Btw do I have to update my Vampire mod for 1.02b8 if I want to use 1.02b8 for a different mod? (I'll probably do it anyway but just trying to confirm) |
You dont have to update your mod if you are not using features of the newer version in that mod. So if your Enhanced Vampires was built on 1.02b5 it will still be run fine by 1.02b8.
I would just tell your users which version they should get for which mod ( like version >=1.02b5 for the Vampire mod and >=1.02b8 for your other mod).
Of course you can just always compile your mods against the newest version and just require that. if you do just remember your players to update the utility aswell if you use methods not present in older versions (and delete the older version).
Good luck with your new "mysterie mod", cant wait to see whats that :D
#5
21st Apr 2021 at 11:32 AM
Posts: 1,500
Thanks: 4283 in 41 Posts
@Battery I have updated my Vampire mod to use 1.02b8
I had another question about the sim menu. Can I make it so that there's one big menu like an Nraas menu, where there will be two buttons. Clicking the button will bring up a sim selection menu. And clicking the second button will bring up another sim selection menu. And once a Sim has been selected from both of these menus we'll be able to click accept.
I had another question about the sim menu. Can I make it so that there's one big menu like an Nraas menu, where there will be two buttons. Clicking the button will bring up a sim selection menu. And clicking the second button will bring up another sim selection menu. And once a Sim has been selected from both of these menus we'll be able to click accept.
Space Pony
#6
21st Apr 2021 at 4:54 PM
Posts: 433
Thanks: 792 in 6 Posts
Hi @PuddingFace while it is possible to achieve this you would have to jump through some ugly hoops to accomplish that.
I can offer you working on an update to make it easier. ( cant say right now if it might break anything)
I can offer you working on an update to make it easier. ( cant say right now if it might break anything)
Space Pony
#7
21st Apr 2021 at 8:05 PM
Last edited by Battery : 21st Apr 2021 at 8:25 PM.
Posts: 433
Thanks: 792 in 6 Posts
ok ive written a quick update for the utility and would like to get your feedback before uploading
So here is the code example
Method for the First Sim Selection
Method for the Second Sim Selection
Code
So here is the code example
Method for the First Sim Selection
Code:
public static void OnSimsPicked(IList<Sim> sims) { MenuController.mParameter = new object[]{sims[0]}; //Save the first sim as Parameter for the second menu (of course you can save anything you like in mParameter) }
Method for the Second Sim Selection
Code:
public static void OnSimsPicked2(IList<Sim> sims) { Sim firstpickedSim = MenuController.mParameter[0] as Sim; //Get the in OnSimsPicked saved sm back from MenuController.mParameter firstpickedSim .SwitchToOutfitWithoutSpin(OutfitCategories.Formalwear); //Do Something with choice from menu 1 sims[0].SwitchToOutfitWithoutSpin(OutfitCategories.Swimwear); //Do Something with choice from menu 2 MenuController.mParameter = null; //SetParameter back to null }
Code
Code:
MenuGetter menu2 = MenuContainer.Presets.GetColorCodedSimPicker(arr as IList<Sim>, OnSimsPicked2, "Pick 2", 1); MenuGetter menu1 = MenuContainer.Presets.GetColorCodedSimPicker(arr as IList<Sim>, OnSimsPicked, "Pick 1", 1, menu2); //Last Parameter is the Follow up Menu MenuController.Show(menu1); //Show the first menu
#8
22nd Apr 2021 at 6:52 AM
Posts: 1,500
Thanks: 4283 in 41 Posts
Would love to test it out. For now I was making the menus pop up one after another. But I shall test this out as well.
Btw I can use S3SE with 1.02b8 right? I've been meaning to try that mod as well.
Btw I can use S3SE with 1.02b8 right? I've been meaning to try that mod as well.
#9
22nd Apr 2021 at 3:24 PM
Posts: 1,500
Thanks: 4283 in 41 Posts
Ok so right now the way I'm using this is that the first menu pops up and then after selecting a sim the second menu pops up. And that's working fine at the moment. So It's your wish if you want to add this feature or not.
I think you should wait a bit before quickly updating. Maybe you can expand on what you're doing by making the selected sim's face appear just like how an integer value or bool value can appear when we change it.
The Hospital Overhaul mod has done this with it's UI.
But this is not urgent or anything. The current system is working just fine.
I think you should wait a bit before quickly updating. Maybe you can expand on what you're doing by making the selected sim's face appear just like how an integer value or bool value can appear when we change it.
The Hospital Overhaul mod has done this with it's UI.
But this is not urgent or anything. The current system is working just fine.
Who Posted
|