Trying to redirect BHAV to new BCON
- First, you should at least not choose a lower number, because those are most likely already all in use, just like the BCON you're planning to clone. So the only way to go is UP.
- Next, it is just convenient and sensible not to leave gaps in the numbering. Because that would force others who might end up in a similar situation, to start looking for gaps. Don't do to others, what you don't want to have them do to you!
- Last, finding the next number is not at all that hard.
- First, using the filter to the right side of the screen, filter out the group (by Group ID) that you're looking at.
- Second, select "Behavior Constant" [BCON]" in the resource tree to the left.
- Third, at the top of the resource list in the middle, click twice (no double click) on the "Instance" tag.
- Now you see only BCONs listed, and they're perfectly in descending order, highest numbered at the top and then going down... Could not be any simpler!
- Absolutely the last thing: if the top BCON is numbered 0x007F (127 decimal), you'll be stuck, because the game doesn't accept BCONs with a higher number.
I hope that this helps. If not, then please let me know, ok?
Good to know that it doesn't have to be in order, but it's nice if it is. I always do it in order when creating myself, but it's useful to know it's more about making it easy later than it being required. And thank you for teaching me the filter thing exists, that's going to make looking at code so much easier. I also thought instance numbers were group specific, but I see now that it's also type of thing within group specific, so BCONs have their own and BHAVs and so on.
I have a stupid question that I've been wondering for a while. You write that the highest is 0x007F, but that's only 6 digits. In SimPE, instance numbers are 8 digits. I've seen the same thing in tutorials and other places. What's the difference between 6 digits and 8, and how does one translate 6 to 8 for SimPE? The highest BCON in the group is 0x0000017F.
Last night I figured out how to completely remove the motive part from the BHAV, so that the BCON is no longer needed. I would however like to also offer a version with BCON intact, for those who do like the motive changes but would like to alter the rate. But then I figured I'm unlikely to be the only one to have cloned a BCON in this group, as it seems to hold a lot of frequently used stuff, and if someone used the same instance number I pick for their creation, then they would conflict. Yet I can't go around looking at every mod ever made with a BCON in it. Should I just pick one, and wait to see if anyone finds a conflict?
Thing with the digits is this: the "0x" is not part of the digits. It is an identifier that normally ALWAYS preceeds hexadecimal code, just so everyone will *know* that it's hexadecimal code!
So "0x007F" is a FOUR digit code, and it can also be written as 8-digit code "0x0000007F", or - without the 0x - as 0000007F. In FRONT of the number, the 0x is like the $ in money, and the 0000's don't count. Like on your bank account $0,000,000,100.00 is merely a hundred dollars, just like $100.00.
And to your last question: yup, that's how it works. Since there is no database of all the stuff that everyone made for the Sims, nobody knows which BHAV and BCON numbers have already been used by anyone for any purpose. There are millions of player AND coders out there, and they've surely made billions of mods... try to figure THAT out! So what you do is pick the lowest number you can. And if someone tells you that it conflicts with something, you pick a NEW number, and again and again, until nobody complains anymore.
BUT... if you correctly cloned the object, the Group ID for your new object is most probably just 0x7FFFFFFF. And that is a very special group: every object that has this group number, only shares its code WITHIN the package. So if another person for another cloned object of exactly the same original ALSO uses your BCON number, they still will NOT conflict, because it is in another file!
Really, most of the modded objects out there (like 999 out of every 1000) are made by modders (and I use that term lightly, because most are just morons with a computer) who have no idea what they're doing. They just hit the "clone" button, because SimPE makes it that simple, and now they have a cloned object... They 'eff around' with the bloody thing until it does what they want it to do, and then they put it on MTS or TSR as the next best thing. And there is never a conflict, because of how cloning works.
YOU are smarter than that, and ask some effing intelligent questions about how to do stuff *correctly*. So don't you say again that your questions are dumb or silly or stupid. It's GOOD to ask questions, because that shows that you want to LEARN something! Be PROUD of that, ok? Because really, @leefish, @celebkiriedhel, @NixNivis, Cyjon, Pescado, TwoJeffs, Inge Jones and many, many others who are now called great modders... they ALL started out knowing nothing! Some figured it out on their own, but most of them had the guts to ask questions when they didn't get it on their own! *I* started out that way too. That's normal.
What I'm trying to make is a global mod that removes the hygiene tank from reading Sci-Fi books. As a proper nerd I find the notion that sci-fi makes you dirty kind of offensive, and really, hygiene drops as if the Sims were rolling in stinky mud. Makes no sense whatsoever. Because I want it to be global, I didn't clone a book case, I extracted the BHAV that controls motive changes, and the BCON it pulls rates from, and made a package file with the two.
Like I said in my previous post, last night I figured out how to simply edit the BHAV and remove motive loss from it. The reason I still want to try and create a BCON-including version is because there are three books that have motive changes beyond fun, and which ones bug people and how it bugs them is going to vary. The hygiene I find stupid, but hunger from cook books and social from romance makes a little bit of sense, although the rates are too steep. If people could simply edit motive drain rate in the BCON to their preference, there's room to accommodate every preference in one file. Plus, this way I learn more stuff
Thanks to your instructions/explanations, I now understand the instance part and what I should change it to. But the problem I mentioned in the first post remains. Attempting to change the instance number called by BHAV causes a "not found"-message, and if I click away from the box I edited, it will automatically change what's written from 180 to 018. Using an existing BCONs works, but my new one, nope. Any idea what's up with that?
Looking at the line it calls a global BHAV, which in turn calls another global BHAV that says there are 4 args, and lists which these are. Those 4 are what appears in the pop-up wizard when trying to edit the line in the first BHAV. I'm not sure what that all means, but it looks to me like the other two bhavs tell the frame of what it wants to do, and the first bhav holds the information to put in the frame. In this case, info on which bcon to pull data from. Is that correct, or am I misunderstanding it?
But here's a wild idea: why don't you just edit the BCON to more reasonable values for reading SciFi books? It should just be one or two lines of all there is in the file, and they shouldn't affect anything else!
And while this project could be solved by just editing the bhav, I feel like knowing how to redirect a bhav to a new bcon is something I might want to do in some other project down the road, so I'd like to learn how it's done
Sorry, I realize now that my questions rather assume you've seen the code, which you obviously haven't. I'll add screenshots, so that it makes more sense. But if you are busy then don't feel pressured to look at it now (or ever, for that matter), there's no hurry
The third one is really long so I won't add pictures. It contains a bunch of Expressions, a Set Motive Change for each possible motive, and a few other random stuff like "Is Pet a cat?" and Verify Person ID. But it differs from the first two in that the lines can't be edited with pop up wizard, which is why I'm thinking it might just be a frame telling the other two what data they should hold.
And remember, as you said that this is a Global thing, I feel I must warn you: the Global group already uses ALL the available BCON numbers from 0000 up to 007F. (In decimal numbers, that's 0 to 127). You cannot make a higher numbered BCON than that, because the system doesn't understand that. Trust me, I've tried it and I hit my head hard!!!
I thought I had understood the instance-thing but I don't think I have. As I understand hex goes from 1-9 and then A-F. You say the highest the game can read for BCONs is 007F, which I interpret as starting on 0000, going up to 007F. But the game code for this group starts at 0100 and ends at 017F, which in my mind is higher than 007F. But 100 to 17F is 127 values, so is it that it can only hold that many, but the actual number doesn't have to be 0000 to 007F?
Should I just give up and settle for editing BHAV, or is it possible to create a whole new group for the new BCON and redirect the BHAV to that group instead?
Ok, I may have forgotten about the 1 in the BCON number... it was quite a while ago that I was battling the same kind of problem. So in that case it's 100 to 17F, the difference is the same. It's 127 BCONs, and that's the end of it. Believe me, when *I* needed a new BCON in the Global group, I slammed my face into that same wall over and over again, because the game will just keep repeating that it cannot find the BCON. Sorry, but there is nothing you can do, except trying to find some other way to store your numbers.
An idea is to just go back to the original idea, and maybe for this special case add some new values at the bottom of the existing BCON, and use those for the SciFi-book thingy. Sure, others may already be using that BCON, but that doesn't matter. If someone tells you that there's a conflict with mod 'so-and-so', you DL that mod, check that it's a BCON conflict, and then you import the BCON from that other mod into your own and make the same changes again. Now your mod will still conflict with the other one, but as long as you warn people that your mod must load AFTER the other one, it will be compatible because you included the changes that the other mod requires! THAT is how modders solve such conflicts