Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Mad Poster
Original Poster
#1 Old 27th Mar 2015 at 11:38 AM
Default Need help understanding BCON
Hi everyone!

I've never dealt with BCONs before, and I'm confused. I've tried to find tutorials, but everything I find only mentions them briefly, or doesn't answer what I want to know.

I want to mod out the need-losses from reading books for fun, because I find it silly that different books affect your motives in different ways. I've found the BHAV that controls it, and the BCON it pulls it's values from. I've also tried editing the BCON to make sure I'm not misunderstanding, and editing it does change how it works, so it looks like I've found all the right stuff.

However, I'm assuming that BCON's aren't necessarily unique to a specific BHAV, so just editing it willy-nilly seems like a bad idea. While I want to change book reading, I don't want to change anything else it's affected by. And this is where I'm stuck. What do I do now? I see three possible solutions
- Make new BCON
- Remove code in BHAV that pulls from BCON
- Find if the BCON is used by something else, and check if I'm okay with those being edited

That leads me to some questions
1. Is it even possible to make a new BCON? And if so, how?
2. Is it complicated to remove parts of a BHAV? I've looked at it, and I wouldn't know where to "cut", and what to set previous lines to, the ones that point to the removed code. Is it as simple as putting the last one to false, or is there more to it?
3. Is there an easy way to find all the BHAVs connected to a BCON?

I suspect once I've figured this out there will be a lot more things I'll mod the motive drops from, so I'd really like to understand how this whole BCON-editing works

Creations can be found on my on tumblr.
Advertisement
*shrugs*
retired moderator
#2 Old 29th Mar 2015 at 8:44 PM Last edited by maybesomethingdunno : 29th Mar 2015 at 8:59 PM.
1) Yes, but first let me explain scope. Resources are distinguished or grouped by certain levels. Consider a bed and all the functionality associated with it. Rather than recreating all this code each time you want to create a new bed object, it would be best to make a group. All basic interactions with a bed can be housed in a specific location. All beds will use this. Suppose you want a special bed with an added feature. This bed would reference the "Bed" group but it would also have code specific to it for that added feature. This code would be private and confined to that object. Likewise, you may have code that is used everywhere, not just beds, so it would be in an even higher grouping. This is how/why you have Global, Semi-global, and Private realms of scope, as represented by the Group value. Private resources have a Group value of 0xFFFFFFFF. Within each scope, you further distinguish resources by the Instance value. If two resources have the same Instance value in the same Group level, they will conflict. When you want to make a mod that, for example, affects all beds, you would override the Semi-global file.

So, yes, you can add BCONs (giving it an unique Instance value) but most people use them at the Private level unless they are making overrides. Many BHAVs can reference BCONs, so long as they are in the same Group ascending in scope: Global resources can't reference Private resources. If I recall correctly, it is possible to add BHAVs and BCONs to above-Private scope so long as it has the same Group value and non-conflicting Instance value.

2) Depends...If you have followed Echo's tutorial, you should have a better idea on how to do this.

3) Tools > Object Tools > Import Semi-Globals. This will bring in all/most of the resources for a particular Semi-Global group. (I usually do this in a New package so as not to cause confusion with any resources in my current package.). You will need to go through all the BHAVs to see if they reference the BCONs in that group. I'm not sure if there are any BCONs at a Global level.

I don't mind if you call me "MSD" or something for short.
Tumblr
Perhaps someday I'll have leisure time back...
Mad Poster
Original Poster
#3 Old 29th Mar 2015 at 10:03 PM
1. Thanks. Do you happen to know a tutorial on how to create custom BCONs? I'm fairly certain that would be the easiest way to deal with books, but I haven't been able to figure out how to change instance, and how to make it do what I wanted to do. I tried to clone the BCON as a start, but when I tried removing the excess motives it controls, the lines I don't touch are automatically changed. So I either need to understand why and how to prevent it, or I make a new BCON that only controls hygiene. I also couldn't figure out how to change the instance, and how to make sure the new one isn't used by something else (maxis or custom).

2. I've read that one before, but it's worth taking a new look at it.

3. Let's see if I follow. Importing semi-globals is how I usually go about finding code, what's confusing me in this situation is that the BCON does not show up in the semi-global group that the BHAV belongs to. Group IDs are different. I've not looked at BCONs before so I don't know if that's normal. Is it? I figured different groups meant that books aren't going to be the only thing that pulls from this BCON, hence being hesitant to edit it as I feel more things that doesn't appear under importing semi globals may use it.

Creations can be found on my on tumblr.
*shrugs*
retired moderator
#4 Old 31st Mar 2015 at 1:50 AM
BCONs, like BHAVs, can be created by cloning one and changing the instance number. You need to actually do the tutorial, not just read it. Practice with the tutorial first and then come back to this. Don't be afraid to experiment. Testing to see what works and what crashes is a part of creating and learning.

I don't mind if you call me "MSD" or something for short.
Tumblr
Perhaps someday I'll have leisure time back...
Mad Poster
Original Poster
#5 Old 6th Apr 2015 at 4:40 PM
Life has been busy, so haven't had time for this. I will do the tutorial, probably good for many other projects too.

But if this is to see light of day anytime soon, I think cloning the BCON and changing the instance would be the easiest. Which brings me back to an old question, how do I make sure the instance number won't be the same as an already existing one? Is there something similar for it as with GUIDs for objects?

And I know, trying and seeing what happens is how I do things. I'm bad at that whole tutorial thing, I don't tend to learn much. I'm more of the "this didn't work, why?"-type and learning that way.

Also, unrelated question, but is there perhaps some other Sims site where the modding community is more active? I love MTS to death and rarely venture outside it, but this forum is pretty dead :/ A place where I could bounce ideas with people who know what they are doing would be mighty helpful.

Creations can be found on my on tumblr.
*shrugs*
retired moderator
#6 Old 7th Apr 2015 at 1:02 AM
If it's private (Group value of 0xFFFFFFFF), it will be in the same package and you can look to see if there are any duplicate instance numbers. (Click on the header cell to sort.) If it's in the semi-global level, the Import Semi-Globals may be your best bet.

As for GUIDs, not really. If you have your SimPE in Advanced mode, you can use the "Open by GUID" option in the Object Workshop. This allows you to easily clone/recolor an EA object if you know the GUID. So you could use that to see if a GUID is already being used by EA. For custom GUIDs, you have the GUID database, but it was down for a good while and people used GUID generators.

As for other sites, it kinda depends on what kind of modding you are wanting to do.

I don't mind if you call me "MSD" or something for short.
Tumblr
Perhaps someday I'll have leisure time back...
Mad Poster
Original Poster
#7 Old 7th Apr 2015 at 4:30 AM
Sorry, I'm confused. I'm either not explaining my question, or I'm not understanding your answer.

Let's try again. I used import semi globals to find BHAVs related to reading books. Amongst that group, I located one specific BHAV that controls motive changes when reading books. The lines in the BHAV that control motive, all reference to a BCON that has the constant value that motives decrease/increase by. The BCON is not located among the stuff found by import globals, I found it by looking at BHAV.

Because the BCON has more motives in it than what that BHAV uses, I assume it's used by more things than this BHAV. I want to clone it so that it's specific for the BHAV, allowing me to edit the constants and be sure it only affects book-reading. I want to know how I do that.

Perhaps I'm over-complicating it in my mind and all I need to do is make a package with the BHAV and the BCON, but I assumed the BCON would conflict with the original if I don't change something since that's how BHAVs work. Do they not work the same way?

As for the group value you mention, I don't get it. Nor do I understand what package it is you are talking about. All of this is from objects.package from installation files. The only group value I know of is the one that appears as a header in resource tree, and there are no BHAVs or BCONs with 0xFFFFFFFF, which makes me wonder if I'm perhaps thinking of a different group value than you are.

Never mind on the guid part, it was a poor example on my part, and not relevant for this project.

As for modding, I mean this kind of modding. Not creating objects or bodyshop stuff, mods/hacks that change how the game works. Like this project, where I want to change book reading works.

Creations can be found on my on tumblr.
*shrugs*
retired moderator
#8 Old 8th Apr 2015 at 1:01 AM
When you import Semi-Globals, it typically changes the Group instance to be 0xFFFFFFFF so that the imported resources are at the "private" level. You can think of it as working with a copy of the original.

If you extract the BHAV, such as from the objects.package, you can retain the Group value and it will work as an override. Extract the BHAV you want to modify or import it into an empty .package file and change the Group value back to what it is in objects. package. Do the same for the BCON. Back in the objects.package, look at the BCONs and sort them by Group number. Take note of the instance numbers used in that group. You will need to come up with an instance number that is not used in that group. If it ends with 0x200A, you might try 0x200B. That will be the instance number for your BCON. Edit your BHAV to reference that BCON. Since they have the same Group number as their originals, they will work as overrides. I hope that is more clear.

I don't mind if you call me "MSD" or something for short.
Tumblr
Perhaps someday I'll have leisure time back...
Mad Poster
Original Poster
#9 Old 8th Apr 2015 at 1:35 AM
I've never been able to get importing to work. I don't know why. I always extract each one manually, since I have no choice.

Thank you for explaining, I am a little clearer now. One more question though. You say to try and change it to some instance that's not used in that group, but the group of the BCON and the BHAV are different. I assume I should look at the group the BCON is in? And by changing instance of BCON, but not group of either, it will be an override for the BHAV but not the BCON, yes?

Creations can be found on my on tumblr.
*shrugs*
retired moderator
#10 Old 9th Apr 2015 at 2:02 AM
Yes, look at the BCONs by Group. Think of "Group" as being higher up the pyramid than Instance number; within a single Group value there can only be one occurrence of an Instance value. Keep the Group value the same, just change the Instance. Yes, overrides work because you keep the same Group and Instance values.

So your BHAV will retain the same Group and Instance value but will make use of your new BCON, which has the same Group as the original BCON but a different Instance value. Because your new BCON has a different Instance value, it will not override anything; being in the same Group, the BHAV should be able to see it.

I don't mind if you call me "MSD" or something for short.
Tumblr
Perhaps someday I'll have leisure time back...
Mad Poster
Original Poster
#11 Old 9th Apr 2015 at 4:25 AM
Awesome. Thank you for patiently explaining this to me. Now I know what I'm doing this weekend :3

Creations can be found on my on tumblr.
Back to top