More Awesome Than You!
Welcome,
Guest
. Please
login
or
register
.
2024 November 22, 14:47:17
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
SUPPORT THE MUNICIPALITY!
Have you destroyed a paysite today?
"Jelenedra" is the new "gay".
All Lythdans are stupid and suck!
DEATH TO ALL STUPID HAIRY-BELLIED NESSES!
All Kewians are stupid and suck! Accept no Kewian-based substitutes!
Clearly, BlueSoup has failed us! You must not! BlueSoup has a fat head!
Hobbsee has a
scrawny pencil neck.
Rohina the Ugly Butted is a Horny Turkey
540287
Posts in
18067
Topics by
6545
Members
Latest Member:
cincinancy
More Awesome Than You!
TS2: Burnination
The Podium
[Modding Question] BHAV calling scope
0 Members and 1 Chinese Bot are viewing this topic.
« previous
next »
Pages:
[
1
]
Author
Topic: [Modding Question] BHAV calling scope (Read 4786 times)
rufio
Non-Standard
Uncouth Undesirable
Posts: 3030
More Nonstandard Than You
[Modding Question] BHAV calling scope
«
on:
2009 December 19, 21:14:44 »
I understand the concept of globals: any BHAV from any group can call them, but they can't call BHAVs from other groups. Does this extend to BHAVs defined in a package file that contains overridden globals with the group 0xFFFFFFFF? E.g., say I have written a new version of global BHAV 0x0XYZ and in the same package where my version of 0x0XYZ is, there is a private BHAV with instance 0x1001 and group 0xFFFFFFFF. Can I call the 0x1001 BHAV from 0x0XYZ, or do I have to create a new global? I did create new globals in my family hack, but I do (and did) realize that that's not a great thing to do, and I want to know if there's a way around it.
Logged
Quote from: Tsenatserix on 2010 December 08, 08:01:19
I was thinking about these things and I am a feminist.
J. M. Pescado
Fat Obstreperous Jerk
El Presidente
Posts: 26288
Re: [Modding Question] BHAV calling scope
«
Reply #1 on:
2009 December 20, 03:59:41 »
0xFFFFFFFF is automatically remapped to a random group, so 0xFFFFFFFFs cannot call others not in their package. An 0x2XXX semiglobal can call a local 0x1XXX, with the resulting local that runs being the one attached to that object. It is not known what happens if an 0x0XXX global tries this, as there is no telling what will run if this happens. If you wish to invoke a specific effect, it is best to use RTBN, so that the BHAV will be invoked by name instead of by instance number.
Logged
Grant me the serenity to accept the things I cannot change, the courage to change the things I cannot accept, and the wisdom to hide the bodies of those I had to kill because they pissed me off.
rufio
Non-Standard
Uncouth Undesirable
Posts: 3030
More Nonstandard Than You
Re: [Modding Question] BHAV calling scope
«
Reply #2 on:
2009 December 22, 22:30:27 »
I see. If the 0xFFFFFFFF BHAV is in the same package as the OBJD/OBJf of the current stack object than it can be called via RTBN, right?
I have another question about tokens, too - I have gotten one to work as I want it to, but it does not seem to be saving when the game is saved. I've looked through multiple token-using hacks made by other people, and I can't see what I'm doing wrong. HALP? Token has OBJD, OBJf, unique GUID, can be added to neighborhood memory and have its properties modified, etc., but when the game reloads it can't be found.
Logged
Quote from: Tsenatserix on 2010 December 08, 08:01:19
I was thinking about these things and I am a feminist.
J. M. Pescado
Fat Obstreperous Jerk
El Presidente
Posts: 26288
Re: [Modding Question] BHAV calling scope
«
Reply #3 on:
2009 December 31, 02:54:24 »
Quote from: rufio on 2009 December 22, 22:30:27
I see. If the 0xFFFFFFFF BHAV is in the same package as the OBJD/OBJf of the current stack object than it can be called via RTBN, right?
Any BHAV may be called by RTBN, regardless of whether it is global, semiglobal, or local, whether or not is an 0x7FXXXXXX, or an 0xFFFFFFFF. That's the entire point of RTBN. Any "local" will always be run in preference over a semiglobal over a global. It does not matter what groups are involved here, or whether the instance numbers are the same across all objects that may the RTBN may be invoked on.
Logged
Grant me the serenity to accept the things I cannot change, the courage to change the things I cannot accept, and the wisdom to hide the bodies of those I had to kill because they pissed me off.
rufio
Non-Standard
Uncouth Undesirable
Posts: 3030
More Nonstandard Than You
Re: [Modding Question] BHAV calling scope
«
Reply #4 on:
2010 January 01, 07:36:39 »
Right - but just to be clear, it's local/semiglobal where the current stack object is concerned, right? So, like with the spell code, you get something like:
Ensure that SO is an instance of (Spell GUID)
RTBN "CT - Cast Spell"
which will run the CT - Cast Spell that's in the same group as the spell object, if it exists, and otherwise some general semiglobal version, and this is completely independent of the group number of the calling BHAV. (Right?)
Logged
Quote from: Tsenatserix on 2010 December 08, 08:01:19
I was thinking about these things and I am a feminist.
J. M. Pescado
Fat Obstreperous Jerk
El Presidente
Posts: 26288
Re: [Modding Question] BHAV calling scope
«
Reply #5 on:
2010 January 01, 07:43:15 »
Quote from: rufio on 2010 January 01, 07:36:39
Right - but just to be clear, it's local/semiglobal where the current stack object is concerned, right?
Depends on the arguments. Using an RTBN-2, yes, the BHAV run will be the one associated with the stack object in aforementioned order of precedence. RTBN-3, however, will let you invoke a BHAV by a GUID of an object that may or may not actually be present, which will also be invoked in aforementioned order of precedence, only the stack object will be twaddle and no physical object will exist, and the BHAVs run will be those associated with the GUID.
Logged
Grant me the serenity to accept the things I cannot change, the courage to change the things I cannot accept, and the wisdom to hide the bodies of those I had to kill because they pissed me off.
rufio
Non-Standard
Uncouth Undesirable
Posts: 3030
More Nonstandard Than You
Re: [Modding Question] BHAV calling scope
«
Reply #6 on:
2010 January 03, 18:16:39 »
The -2/-3 is the version/format/whatever-it-was setting when setting opcodes and operands, then? I haven't messed with it much, but I have noticed that the Relationship primitive seems to have different incarnations based on what goes there.
"Associated with the GUID" just means "in the same group as the OBJD of the object with that GUID", right?
(Slightly) related question: NREFs determine group numbers, right? If I put an NREF with a unique name/number into a package with one OBJD (and the same instance as that OBJD) then when the package is loaded, everything in the package will be considered to be in the group corresponding to the NREF - correct? If there are multiple OBJDs in the package (and multiple NREFs corresponding to them by instance number) does this divide all the non-immediately-OBJD-associated resources (like general-purpose non-Pie-Menu-related BHAVs and BCONs) into different groups? What does including NREFs in a package do, from a purely functional standpoint? Are they necessary/do things break if they aren't there? Sims 2 Wiki just says something about unknown EAxian hash functions.
If it
is
possible to hand-pick group numbers using NREFs, is it also possible to set up one's own semiglobal groups and determine which private groups have access to their resources? Are the semiglobal groups determined by some mathematical function of the group numbers, or are they hardcoded?
Logged
Quote from: Tsenatserix on 2010 December 08, 08:01:19
I was thinking about these things and I am a feminist.
J. M. Pescado
Fat Obstreperous Jerk
El Presidente
Posts: 26288
Re: [Modding Question] BHAV calling scope
«
Reply #7 on:
2010 January 04, 01:19:49 »
Quote from: rufio on 2010 January 03, 18:16:39
"Associated with the GUID" just means "in the same group as the OBJD of the object with that GUID", right?
Or its semiglobal, or its global.
Quote from: rufio on 2010 January 03, 18:16:39
(Slightly) related question: NREFs determine group numbers, right? If I put an NREF with a unique name/number into a package with one OBJD (and the same instance as that OBJD) then when the package is loaded, everything in the package will be considered to be in the group corresponding to the NREF - correct?
Nope. Everything in 0xFFFFFFFF in one package is associated and shares a group. Everything outside that package isn't, unless explicitly given a group.
Quote from: rufio on 2010 January 03, 18:16:39
If there are multiple OBJDs in the package (and multiple NREFs corresponding to them by instance number) does this divide all the non-immediately-OBJD-associated resources (like general-purpose non-Pie-Menu-related BHAVs and BCONs) into different groups?
No.
Quote from: rufio on 2010 January 03, 18:16:39
What does including NREFs in a package do, from a purely functional standpoint? Are they necessary/do things break if they aren't there? Sims 2 Wiki just says something about unknown EAxian hash functions.
They show up in error logs. Other than that, nothing we can tell.
Quote from: rufio on 2010 January 03, 18:16:39
If it
is
possible to hand-pick group numbers using NREFs, is it also possible to set up one's own semiglobal groups and determine which private groups have access to their resources? Are the semiglobal groups determined by some mathematical function of the group numbers, or are they hardcoded?
They are determined by a reference type, GLOB, or something.
Logged
Grant me the serenity to accept the things I cannot change, the courage to change the things I cannot accept, and the wisdom to hide the bodies of those I had to kill because they pissed me off.
rufio
Non-Standard
Uncouth Undesirable
Posts: 3030
More Nonstandard Than You
Re: [Modding Question] BHAV calling scope
«
Reply #8 on:
2010 January 04, 21:38:54 »
Ahh. I had thought they might have something to do with the group number, because the NREFs in objects.package seem to have numbers corresponding to the groups they are in.
Logged
Quote from: Tsenatserix on 2010 December 08, 08:01:19
I was thinking about these things and I am a feminist.
Pages:
[
1
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
TS4: The Pee-ening
-----------------------------
=> Insert Amusing Name Here
=> Facts and Strategery
-----------------------------
TS3/TSM: The Pudding
-----------------------------
=> The World Of Pudding
=> Facts & Strategery
=> Pudding Factory
===> World of Puddings
===> Pudding Plots
-----------------------------
TS2: Burnination
-----------------------------
=> The Podium
===> Oops! You Broke It!
=> The War Room
=> Planet K 20X6
===> Building Contest of Awesomeness
=> Peasantry
===> Taster's Choice
-----------------------------
The Bowels of Trogdor
-----------------------------
=> The Small Intestines of Trogdor
=> The Large Intestines of Trogdor
-----------------------------
Awesomeware
-----------------------------
=> TS4 Stuff
=> Armoire of Invincibility
===> AwesomeMod!
=> The Armory
===> Playsets & Toys
===> The Scrapyard
-----------------------------
Darcyland
-----------------------------
=> Lord Darcy Investigates
-----------------------------
Ye Olde Simmes 2 Archives: Dead Creators
-----------------------------
=> Ye Olde Crammyboye Archives
=> Ye Olde Syberspunke Archives
-----------------------------
Serious Business
-----------------------------
===> Spore Discussions
Loading...