View Full Version : A three part question for adding the write term paper interaction to an assignment booklet.
26th Jun 2008, 9:20 PM
I hate having to have my olden time Sims write their term paper on a computer and wanted to make it so they could use the assignment book to do so. I was wondering:
A) How could I add the write term paper interaction to my cloned assignment?
B) Is there a way to allow accessing the term paper booklet as a self interaction?
C) Could I have them write in the booklet as opposed to having them act like it's a computer?
I would appreciate an answer to any part of this inquiry.
27th Jun 2008, 10:10 AM
What you want to do is apparently simple, but technically challenging.
The main problem is that all the "write term paper" functions, animations and code is in the Computer semiglobals, while the booklet assignment don't use semiglobals at all.
Of course, you could import into the cloned homework all the semiglobals (including BHAVs, BCONs, STR# etc) required by the term paper, but it's a huge work.
However, here is my suggestion; I can only give rough directions, because there is a lot to work to do and I can't explain all the details (some of them I can't even imagine because I never did it).
- Clone a computer, and extract the Global Data (GLOB) file; import it into your cloned booklet.
- Examine the computer TTAB in order to understand which BHAVs are called for the term paper interaction.
- Create a new entry in the TTAB and in the TTAS of the booklet and set all the values as you read them from the computer ones.
- Follow the workflow ot the interaction in the computer, starting from the Guardian/Action BHAVs shown in the computer TTAB; every time you see a private BHAV/BCON referenced (i.e. BHAV/BCON with instance 0x1nnn), you have to export it from the computer and import it in the booklet; the semiglobal BHAV/BCON (i.e. instance 0x2nnn) and the global resources (instance 0x0nnn) don't need to be exported and reimported.
At this stage, the booklet should have the term paper interaction, but the animations will be all messed up (the sims acts like he is using a PC). You have to modify all the BHAVs and STR# related to the animations so to replace the PC animation with the ones included in the booklet (the booklet already contains the references to all the booklet animations, in its STR#).
My opinion is that only an experienced modder can do that, however. It's definitely a difficult job to do.
27th Jun 2008, 9:08 PM
Well I have gotten the interaction but currently it is very...odd...you do need it to be on a table with a chair as expected but my Sim then sinks through the chair and acts like he is writing an assignment with the assignment half sunk into the table but not in his hands. Then with boolprop on I get an error of Missing Material / Mesh Group Name at which point without boolprop they jump and with boolprop they must be reset (jump) or deleted. I will look at the error file and see if I can fix it.
Update: Ok I changed a few things and now I don't get the earlier error message instead they reach 1% completion and then get a different error "Attribute number out of range" (Can be done consecutively so you could raise % but quite tedious). Still have the writing on floor animation but havenít bothered to try and tackle this yet.
28th Jun 2008, 10:40 AM
As for the wrong animation, try understanding which BHAV calls that animation and modify the "Animate Sim" to make it point to the correct line of the Adult Anim STR#. If the animation is called from within a semiglobal BHAV, you could try modifying the private STR# for the Adult Anims, replacing the "writing on the floor" anim reference with the "writing sitting" one.
28th Jun 2008, 8:35 PM
Ok so after some trial and error I managed to find that the animations for the assignment booklet are controlled by STR#, the Sim by "Anims - Adult" and the booklet by "Anims - Object - Adult". So I have gotten the Sim animated correctly but the booklet is more complex and usually rotates to an odd angle and floats part above the desk and part cutting through the desk. It's harder but I am sure I will get it eventually.
I still get that "Attribute number out of range" error after 1 percent but am stumped because the error message told me "Node: 23 Tree: id 8273 name 'Write Term Paper Loop' version -32749" which when I looked at referenced to "Stack Object's attribute 0x000B". This made sense since on the computer under the STR# named Attribute that was the only string with a name. So then I copied the attribute on the same string from my booklet but I still get the error. There is a description on it but it has me baffled. "The C++ code modifies this attribute, so don't move it." So...any hints? Again I probably could get it eventually but for this it may be a long eventually.
29th Jun 2008, 2:28 AM
Umph! I never remember how the Attribute work, so I bookmarked this thread (http://www.modthesims2.com/showthread.php?t=78040) :lol:
In order to add an attribute (a "private" attribute, not semiglobal), you have to edit the OBJD section, where is says Num Attributes (make sure you don't use the "type attributes" field by mistake). As the attributes start from 0, if your highest attribute is 0x0B (11), you'll need to put 0x0C (12) in this field - ie one more than your highest attribute.
The node 23 you mention refers to private attribute 0x0B, so the info above should work fine for you.
However, if you are interested (it may be useful in the future), the number of semi attributes is not to be set in the OBJD. They are dynamically defined when the object is created based on the number of lines existing in semiglobal STR# 0x100.
So far you were lucky, because the BHAVs for the term paper only called private attributes; but if they should call a semi-attribute, you'll be in trouble, because the booklet does NOT use any semiglobal, and can't have semi-attributes (in case, we'll find a workaround).
30th Jun 2008, 4:49 PM
Ok I was busy over the past day so I couldn't do anything. Anyway they now can write the full term paper but the grade points don't get added to them. Definitely a problem :P.
1st Jul 2008, 2:10 AM
This is strange, because the "Write Term Paper Loop" simply adds 1 to the invisible token "Term Paper" located in the sim's inventory; it's not related in any way to the animation palyed or the object that thesims interacts with.
Of course, it is required that somehow the "Write Term Paper Loop" IS executed (I think it is, because this very same BHAV caused the problem you mentioned earlier...).
Does the meter appear over the sim's head?
1st Jul 2008, 9:04 AM
Yes it does...I don't know why but one thing I neglected to mention was the fact that after they write the paper the start all over again...
1st Jul 2008, 10:19 AM
You can only follow as carefully as possible the operation flow of the BHAVs, until you discover why it loops; after all, the call to the Write Term Paper Loop has been inserted by you in the booklet code: examine more carefully the BHAV that contains the call to the said BHAV.
3rd Jul 2008, 4:59 AM
Ok they don't start again (in fact can't) but still don't get the points point for the paper (but they do satisfy the want)
vBulletin v3.0.14, Copyright ©2000-2013, Jelsoft Enterprises Ltd.