More Awesome Than You!

TS2: Burnination => The Podium => Topic started by: rufio on 2009 January 11, 21:26:59



Title: Modding Question - Using things from Inventory
Post by: rufio on 2009 January 11, 21:26:59
So, I've been playing around with object modding a little bit, to see what I can do with it.  I've cloned the anti-witch potion, got it a new GUID, made it buyable, and made it so non-witches can use it.  Now I want to make it usable from inventory, and while there is a pie menu option that is connected up to the Use From Inventory BHAV, the Guardian BHAV was set to something like "Hide Interaction" and the option didn't come up.  So I wrote a new BHAV with just "Manage Inventory (Set To Next Token Of GUID <GUID of cloned object> : visible non-memory)" with true returning true and false returning false (this I gleaned out of someone else's potion hack - I'm guessing it means "find the next object in inventory with this GUID") and made that BHAV the Guardian.  However, in the game, the option still doesn't come up when I click on the sim with the potion in inventory, but I get an error when I click on the potion not in inventory, apparently coming from the new BHAV.  It looks to me like the Inventory menu option is overriding the Use From World option, and so the game is using its Guardian BHAV instead of the other one.  So, I need some way to specify that the one interaction is use from Inventory, and the other is for use from World.  How do I do that?  I've looked at corresponding pie menu interactions from the other hack, but I can't see anything different about them.


Title: Re: Modding Question - Using things from Inventory
Post by: J. M. Pescado on 2009 January 12, 02:50:21
Making an object usable from INSIDE the inventory, I.E., when it doesn't really exist, by clicking on a sim, involves a lot of rigamarolity, and your inventory-based code will never actually run and you cannot place it on the object itself. You need one of those Download Social Launchers the way Macrotastics and the salvaged CS crap does it.


Title: Re: Modding Question - Using things from Inventory
Post by: rufio on 2009 January 12, 03:31:49
Yeah, I thought it might be a pain in the ass, but the pie menu option was just there, so I wondered if it might just work.  :D  Trust EA not to make it that simple.

Who designed whatever language BHAVs are written in, anyway?  It's what, one step above assembly?  It's like they designed it to be difficult to mod or something.  I'm having fun, though, which is all that really matters here.