More Awesome Than You!
Welcome, Guest. Please login or register.
2024 November 24, 15:18:26

Login with username, password and session length
Search:     Advanced search
540287 Posts in 18067 Topics by 6545 Members
Latest Member: cincinancy
* Home Help Search Login Register
+  More Awesome Than You!
|-+  The Bowels of Trogdor
| |-+  The Small Intestines of Trogdor
| | |-+  Procedural Modification of TTAB Flags?
0 Members and 2 Chinese Bots are viewing this topic. « previous next »
Pages: [1] THANKS THIS IS GREAT Print
Author Topic: Procedural Modification of TTAB Flags?  (Read 10503 times)
jase
Dimwitted Dunce
*
Posts: 174



View Profile
Procedural Modification of TTAB Flags?
« on: 2006 December 03, 07:35:54 »
THANKS THIS IS GREAT

At the risk of sounding redundant - I've asked this before many moons ago but: social advertisement aside, is anyone aware of a mechanism by which the flags of a TTAB interaction can be modified procedurally?  Say, for example, I want to expose Kiss... | Peck to children.  This behavior is normally restricted to teens and older.  For the sake of argument, let's assume that I also want to suppress this interaction for all other age groups.  I know I could extend this interaction to children via a social plug-in, but is there any known mechanism for directly modifying the flags of the existing one?  Or possibly: can a social plug-in behavior "supplant/mask out/trump" a PersonGlobal interaction so that the PersonGlobal is no longer considered?
Logged

Isn't it about time you did your part in God's plan?  Go on, install InTeen today.  What would Jesus do?
J. M. Pescado
Fat Obstreperous Jerk
El Presidente
*****
Posts: 26288



View Profile
Re: Procedural Modification of TTAB Flags?
« Reply #1 on: 2006 December 03, 07:38:58 »
THANKS THIS IS GREAT

This really is more Bowels of Trogdor material.

And no, there is no way known to modify a TTAB in-game. TTABs can only be hacked from outside the system and overridden, which is probably not what you want to be doing with PersonGlobals. If you want to suppress an interaction, you're better off hacking the test BHAV. However, there are issues with autonomy and plug-in socials for non-adults.
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.
jase
Dimwitted Dunce
*
Posts: 174



View Profile
Re: Procedural Modification of TTAB Flags?
« Reply #2 on: 2006 December 03, 07:57:23 »
THANKS THIS IS GREAT

Alas.  Such was the case when I first posed this question a year ago.  It's easy enough to add new interaction functionality w/o going near PersonGlobals, but modifying a PersonGlobal interaction without actually touching PersonGlobals itself is problematic (if not impossible).  Moreover, the lack of consistency in how Maxis handles its age checks is bothersome.  Some interactions are gated by age in their TEST routines.  Others are gated by their TTAB flags. And still others are some perverse combination of the two.  I imagine this was done for performance reasons - since testing a bit is certainly faster than executing a script - but damn, it really limits your choices where modding PersonalGlobal interactions are concerned.
Logged

Isn't it about time you did your part in God's plan?  Go on, install InTeen today.  What would Jesus do?
syberspunk
Heretic
Terrible Twerp
****
Posts: 2365


ISTJ - what a crazy random happenstance


View Profile WWW
Re: Procedural Modification of TTAB Flags?
« Reply #3 on: 2006 December 03, 08:24:50 »
THANKS THIS IS GREAT

Or possibly: can a social plug-in behavior "supplant/mask out/trump" a PersonGlobal interaction so that the PersonGlobal is no longer considered?

I think you should be able to do this. I don't remember if it was pinhead or ebruere maybe that suggested this to me once (and I don't remember if it was in private via pm/email or if it was publicly posted... maybe on MTS2 somewhere?). But if I understand what you are asking, you should be able to create a social plug in... and then couldn't you just modify/override the Maxis EA TEST and interaction BHAVs. I used pinhead's moveinall hack as the basis for creating my vamprocillin-d fix for teens and elders. Unfortunately... as Pescado points out (and twojeffs explained to me) social plugins do not advertise to non-adults. My crappity workaround for this was to hack my own PersonalGlobals TTAB and set the motive advertising the same for all age groups.

Ste
Logged

dizzy
Souped!
*
Posts: 1572


unplugged


View Profile
Re: Procedural Modification of TTAB Flags?
« Reply #4 on: 2006 December 03, 11:59:40 »
THANKS THIS IS GREAT

If you don't mind dinking around with Lua, I think there's a function for that:

OverrideTreeTable(objectId, value1, value2, bool)

I'm not completely sure what it does, though.  Tongue
Logged

jase
Dimwitted Dunce
*
Posts: 174



View Profile
Re: Procedural Modification of TTAB Flags?
« Reply #5 on: 2006 December 03, 17:50:42 »
THANKS THIS IS GREAT

and then couldn't you just modify/override the Maxis EA TEST and interaction BHAVs.
Indeed, but the objective here is to affect the original tree without actually overriding a PersonGlobal BHAV or TTAB in the process.  It really boils down to procedurally overriding the TEST conditions (and apparently the non-adult advertisement).  Keep in mind that some interactions (not just PersonGlobals) share a common test BHAV (although I think these are extremely rare) and some don't even supply a guardian test BHAV at all you could even override.

Using your vamprocillin example, it's clear how you can "add" to the pie menu as you've done.  What's not clear is how you can "subtract" from it.  What if you wanted (for some stupid reason) to disallow adults from using the vamprocillin?  I see no clear alternative but to override Interaction - Use Vampire Cure - TEST to always return FALSE and then replace it with the version supplied via your social plug-in or (god-forbid) you override the PersonGlobals TTAB and untick all the flags *gaugh* so you now have the very worst of both worlds: a global override of PersonGlobals and broken advertisement to boot (not that anyone really cares about the latter in this particular example).

Quote from: dizzy
If you don't mind dinking around with Lua, I think there's a function for that:
OverrideTreeTable(objectId, value1, value2, bool)

Curious.  Is there an example of its usage anywhere?

Logged

Isn't it about time you did your part in God's plan?  Go on, install InTeen today.  What would Jesus do?
J. M. Pescado
Fat Obstreperous Jerk
El Presidente
*****
Posts: 26288



View Profile
Re: Procedural Modification of TTAB Flags?
« Reply #6 on: 2006 December 03, 19:37:14 »
THANKS THIS IS GREAT

I'm pretty sure it doesn't do what you think it does, if simply because I can't imagine how you'd overwrite an entire TTAB entry in two values. I think the idea you propose is simply impossible: How would you override the entry on a permanent basis WITHOUT a global override? Some BHAV line would have to run, and how would you insure that this line would be run before that particular test was ever evaluated? It does not make sense.

The only way I can think of to do this would be to override the test tree, inserting a bit of code to selectively disable that interaction in cases where it would normally be available, but you wish it to be unavailable, and then use the plugin method to enable it in cases where it would never have been available in the first place.
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.
jase
Dimwitted Dunce
*
Posts: 174



View Profile
Re: Procedural Modification of TTAB Flags?
« Reply #7 on: 2006 December 03, 21:57:24 »
THANKS THIS IS GREAT

The only way I can think of to do this would be to override the test tree, inserting a bit of code to selectively disable that interaction in cases where it would normally be available, but you wish it to be unavailable, and then use the plugin method to enable it in cases where it would never have been available in the first place.
Oi.  That's the only way I can think to do this also.  Unfortunately, that puts you squarely back in the land of global mods and PersonGlobals.  Undecided  Of course if the test behavior doesn't exist at all, then you're truly fux0red.
Logged

Isn't it about time you did your part in God's plan?  Go on, install InTeen today.  What would Jesus do?
dizzy
Souped!
*
Posts: 1572


unplugged


View Profile
Re: Procedural Modification of TTAB Flags?
« Reply #8 on: 2006 December 03, 22:02:18 »
THANKS THIS IS GREAT

If you want examples, try looking at the Lua code for "HidingFunctions" or "DisablingFunctions" in the Global Lua function. "ResetShop" also uses it in Object Lua functions. Use dizziness or ChunkSpy rather than SimPE for that.

It may well only govern the specialty functions for Hiding and For Sale modes, but I rather doubt that.
Logged

Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.077 seconds with 20 queries.