#2

15th Jan 2015 at 11:32 AM
Last edited by plasticbox : 15th Jan 2015 at
3:01 PM.
Posts: 11,006
Thanks: 429762 in 1128 Posts
47 Achievements
Just in general, I'd suggest you split this up in two steps: first create your object with unchanged tuning, and make sure it works in game without errors, and once you've tested that add in your modified tuning. Also, a useful trick to test tuning for objects would be to temporarily override the tuning of an original Maxis object -- that way you can be sure the object as such will work properly (so errors with the object won't get in the way of your testing).
I'd also advise against copying the entire object tuning of some other object (except when you really want every aspect of it to be identical), since that can have rather a lot of undesired side effects. The object tuning governs a LOT of stuff -- interactions, placement, routing, animations, everything ... and when you don't know that structure very well, it can be really hairy to track errors with that. Most of the time it will be much simpler for you to copy the *original* tuning and change that, because then you know exactly what you changed.
--
Environment score is in the OBJD though, not in the object tuning. I'd recommend using s4pe for this kind of thing since that field is clearly labeled "PositiveEnvironmentScore" in that. If you don't change anything else about the object (mesh, texture) a COBJ and OBJD with a new instance is enough for that to work, there's no need to clone it at all (see my No-Drop Cabinets or the Readable Books for an example of this). Or of course you can make it an override (i.e. COBJ/OBJD with the original instance) if what you want to do is change the stats of existing objects.
Other than that, not sure what could be wrong with your code -- you'd need to attach it, from your description I can't tell what you did exactly. But try just modifying the environment score (both in the OBJD, this is the actual score, and the COBJ, this is for the text to show in the catalog entry) and see if that works.
ETA -- off the top of my head I'm not sure whether you can add e.g. the PositiveEnvironmentScore field in s4pe when it doesn't already exist, but what you can always do is copy and paste an OBJD from an object that has one, and copy and paste your ID, name, and TGIBlockList into that (so the result is effectively a copy with one additional field). The TGIBlock is usually only five entries long (except with "manifold" objects like cabinets) so that shouldn't be too much hassle. You can run two (or more) instances of s4pe in parallel to make the copy-pasting easier.
--
ETA2: some other aspects (like how fun it is to use an object) can be in the interactions, too -- those are not static values like environment score. Look in the SuperAffordances list of your object tuning for the list of available interactions.
Stuff for
TS2 ·
TS3 ·
TS4 | Please do not PM me with technical questions – we have
Create forums for that.
In the kingdom of the blind, do as the Romans do.