Forum Announcement, Click Here to Read More From EA_Cade.

XML: Crafting Progress (or lack thereof) in custom CraftingPhaseStagingSuperInteraction

pboxpbox Posts: 630 Member
edited March 5 in Nominated Threads
I'm making a writing notebook (the pen-and-paper kind) based on writing interactions from computers; I had to clone them all since I'm using teen homework animations. Everything's working so far except for one crucial bit: the progress bar/circle for writing books doesn't update while the staging interaction is running, and the crafting process never finishes. Non-craftable writing (love letters, excuse notes) works fine, progress bar and all, so I guess something is wrong with either the recipes or the staging .. but I cannot figure out what the problem is since the statistics and craftables aren't changed =/.

Writing the same books on computers works fine (updates and finishes properly), so it wouldn't be an issue with my game or my sims I think.

Any ideas on what I could be missing? This is pure XML tuning so far; is there anything related to crafting interactions that would need an edited DATA file as well?

I've uploaded the raw XML here, can provide the package as well if that would be helpful.


ETA, a preliminary version (without the crafting stuff, just the object with Practice Writing and other time-based interactions) is available here.
Stuff for TS2 · TS3 · TS4
Post edited by EA_Cade on

Comments

  • Options
    ScumbumboScumbumbo Posts: 148 Member
    edited January 2015
    I got the writing working by removing the false advertisements and carry_transfer_animation from the CraftingPhaseStagingSuperInteraction. Not sure which portion was the bad part, or both, but this should get you motoring again. :)

    EDIT: OK, my sim starts writing but gets stuck - however it does start the actual writing process now, lets her name the book, carry the notepad to a table and start writing. After a bit she closes the book and starts over. I suspect one of the other phases has a similar, if not the same, issue.

    It also appears that the books are not compatible with those started on the computer, she can resume a book she starts on the notebook, but not one from the computer (actually the resume did work once, but she went to the computer to resume after selecting the resume option on the notepad).

    Starting a new book on the notepad then overwrote the book she had in progress on the computer.
  • Options
    pboxpbox Posts: 630 Member
    edited January 2015
    Scumbumbo wrote: »
    EDIT: OK, my sim starts writing but gets stuck - however it does start the actual writing process now, lets her name the book, carry the notepad to a table and start writing.

    Yeah that's what I'm also seeing -- they can start books, resume them, and also scrap them. Just the progress won't work.
    Scumbumbo wrote: »
    It also appears that the books are not compatible with those started on the computer, she can resume a book she starts on the notebook, but not one from the computer (actually the resume did work once, but she went to the computer to resume after selecting the resume option on the notepad).

    Starting a new book on the notepad then overwrote the book she had in progress on the computer.

    What do you mean by "overwrote"? The books-in-progress are actually independent objects (memory sticks; I called them "drafts" n my xml) that can be accessed from any computer or notebook .. I believe they're invisible inventory objects, as I understand it. (Actually, for debugging it might be useful to make the memory sticks un-invisible -- they're COBJ/OBJD 0x0000000000004B62, I dumped an untouched original package here if you want to play with that).

    The sim walking to the computer might be due to the posture preferences -- I gave the book a much bigger cost for standing up and a stronger preference for sitting at a desk than the homework had, so if when using the book directly they would have ended up working on a non-desk, they might have chosen the computer because of the desk workspace. This can also happen when you have multiple books around -- they don't always use the one that you select the interaction with. (I believe this is tuneable to some extent, just haven't done that yet -- something with "click in world" in the tdesc)

    But yeah, irregularities with accessing the books-in-progress are I think where the problem lies .. I'm just not sure how to solve it since I haven't changed anything about that. An alternative approach to the whole thing might be to use the original computer interactions and then try to override the animation factories so that they use different loops depending on what object the sim is using .. unfortunately the pen-and-paper writing needs those carry transfer parts that the computer typing doesn't have, so not sure how well that would work =/

    Here is the WIP package with all the recipes and so on, as well.

    Thank you! =)


    ETA: Inability to resume writing a book with the notebook that was started on the computer might be due to a missing recipe for that book, now that I think about it -- did you use *all* of the XML I posted above when you tested that? The computer recipes check for computer compatibility (and also for power to be on I believe), that's why the book needs its own separate ones.
    Post edited by pbox on
    Stuff for TS2 · TS3 · TS4
  • Options
    ScumbumboScumbumbo Posts: 148 Member
    Turns out the book in progress was already bugged in an earlier save, so it's disappearance was not related to the notepad. Cleared the bad book out, started a new one (Book C) on the computer, reinstalled the notepad and tried resuming the book. The sim went straight upstairs to the computer and used that for the resume action. Started a new book on the notepad (Book N) and now both stories are available for resume.

    Resuming "Book N" on the computer will cause the sim to go to the notepad and continue. Resuming "Book C" on the notepad will cause the sim to go to the computer to continue. Interesting, the memory stick must be tied to the original object it was used with and are not compatible between items.

    Writing on the notepad is actually updating the progress, if I let it run a while, cancel and then resume, it shows that progress was made but, of course, still doesn't show any progress during the writing process. If I let it resume long enough, it thinks the book is completed. I can still resume writing it, but it no longer shows any progress bar at all.

    So no real progress, just letting you know what I've seen so far in case I'm seeing something that sparks a "Eureka" moment.
  • Options
    pboxpbox Posts: 630 Member
    edited January 2015
    Scumbumbo wrote: »
    Writing on the notepad is actually updating the progress, if I let it run a while, cancel and then resume, it shows that progress was made but, of course, still doesn't show any progress during the writing process. If I let it resume long enough, it thinks the book is completed. I can still resume writing it, but it no longer shows any progress bar at all.

    Yes, that's exactly the behaviour I'm seeing as well =) .. it's almost working, only the part where the game understands that this book is finished now is somehow borked (i.e. the transition from the staging phase to create book is never made). Sims also gain writing skill and writer's block like they should.

    Regarding which object sims use to resume writing stuff: which version of the notebook are you using? The updates (v1.1 and 1.2) that I posted in the upload thread both have <T n="prefer_clicked_part">True</T> set (which means the sim should try and use the object you clicked on -- "If True, this interaction will prefer to take the Sim to the part near where you clicked in world." ) . This is not set in the original upload and also not in the XML I posted above.

    But anyhow, the behaviour you describe actually makes total sense to me .. writing something on a computer would mean the text file is on the computer, so I'd use that to continue. This seems to be working as designed .. I just wonder what would happen when a sim is taking a notebook to some other lot and tries to continue there; I've never tested that scenario. Not with laptops either btw.

    Stuff for TS2 · TS3 · TS4
  • Options
    ScumbumboScumbumbo Posts: 148 Member
    MAJOR PROGRESS!! Very near to success... I'll let you take it from here! :D

    The main problem seems to be in the staging, which points to Book_Homework_Active and Book_Homework_Passive for the staging_content. Those are not crafting interactions. I created two new crafting interactions, pbox_Book_Write_Active and pbox_Book_Write_Passive, based off the Computer_Write_Keyboard (E882D22F_00000000_00000000000033C1) staging_content from the computer book staging (E882D22F_00000000_00000000000033C0). I tried combining the animations from the Book_Homework_Active and Passive interactions, but the animations are screwed up - possibly due to other changes I made along the way to this discovery.

    My sim was able to select writing a new book, stood about five feet from the table where the notepad was and leafed through an invisible copy, LOL. So yeah, the animation needs fixing. But the progress bar updated, she finished the book, and was able to publish it. Resuming also works.

    Other changes that may have helped include:
    - Modified the super affordance list for the memory stick (B61DE6B4_00000000_0000000000003A5E) to include your notebook versions of the resume and resume_scrap interactions.
    - Modified the staging's affordance_to_save/use_another_si to point to your write-book_resume.

    I don't think anything else I did helped, possibly as I said some of it hurt. :) I can't post a link to my modified package on here, so I'll send you a link on MTS.
  • Options
    pboxpbox Posts: 630 Member
    Oh, awesome! I believe the noncraftingness of the interactions is probably closest to fixing the actual problem -- I'll take a look at the rest as well, but I think affordance_to_save/use_another_si might be working OK even so (the one referenced there is just generic crafting, not computer stuff).

    I was wondering anyway how the game decides at what interval stuff gets updated (because that is not explicitely tuned anywhere) .. maybe that depends on the interaction somehow.
    Stuff for TS2 · TS3 · TS4
  • Options
    pboxpbox Posts: 630 Member
    edited January 2015
    OK I think the problem is here (line 89ff of computer_WriteBook_Staging):
          <V n="content" t="staging_content">
            <U n="staging_content">
              <U n="content_set">
                <L n="affordance_links">
                  <T>13249<!--Computer_Write_Keyboard-->
                  </T>
                  <T>9559<!--Computer_Write_Mouse-->
                  </T>
                  <T>9561<!--Computer_Write_Read-->
                  </T>
                </L>
              </U>
              <V t="disabled" n="push_affordance_on_run"/>
            </U>
          </V>
    

    All of these are one_shot interaction, just like Homework_Active -- but Homework_Passive is a looping interaction, maybe that's why it never finishes .. also, both of the Homework ones do not have an outcome. I'll try to dissect those and make them behave like the writing ones -- thanks for the second set of eyes! =)

    ETA: Now I hope I can get away without too much fumbling .. the JAZZ in charge of the homework is only 24.000something lines long o.O
    Stuff for TS2 · TS3 · TS4
  • Options
    pboxpbox Posts: 630 Member
    Meanwhile I think the animation wasn't the main issue after all ..
    <V n="outcome" t="single">
        <U n="single">
          <U n="actions">
            <L n="basic_extras">
              <V t="transfer_name">
                <U n="transfer_name">
                  <E n="participant_receiving_name">CraftingProcess</E>
                  <E n="participant_sending_name">CraftingObject</E>
                </U>
              </V>
            </L>
          </U>
        </U>
      </V>
    

    As I understand it, this means the progress only gets updated at the end of the interaction .. and I can't figure out how to change that. Nor do I understand why the computer interactions have continuous updates despite of this. Whatever I do with the animations, I always end up with one of two results: proper updating and broken animations, or proper animations and no progress update. Even a copy of 13114 Book_Homework_Active with nothing but the name and ID changed will break the animation – it's a bit beyond me what is going on there exactly.

    Tried to re-do the whole thing from violin-write-song, that one doesn't work either (not even with explicit listening on the progress bar update option).

    Hrm. Maybe @SimGuruEugi would have an idea on how to go about this?
    Stuff for TS2 · TS3 · TS4
  • Options
    ScumbumboScumbumbo Posts: 148 Member
    edited January 2015
    I think I've got it really close now. Yes, the main problem after setting up the two CraftingStepInteraction items seemed to be that the sim just wasn't picking up the notebook. Everything else seemed to work. I made a wild guess that maybe there wasn't really anything wrong with the new CSIs. Maybe CSIs just weren't made to pick up the item? So I tried inserting back affordance #13114 BEFORE the two new CSIs in the staging file, like so:

    (replaced gt and lt symbols below with [ and ] as there doesn't seem to be a code option, not sure how you did that, maybe as I'm a new member)

    [V n="content" t="staging_content"]
    [U n="staging_content"]
    [U n="content_set"]
    [L n="affordance_links"]
    [T]13114[/T]
    [T]9925384858017238595[/T]
    [T]15304797812437575096[/T]
    [/L]
    [/U]
    [/U]
    [/V]

    Sims would then go over to the notebook, pick it up and start writing like before, only now it would update. Resuming a book also worked (apart from the issue below). Once the book was completed, I got a copy of the book in my inventory and I could sell it normally at the mailbox.

    The only problem, at least that I'm seeing (there may be hidden ones!) now is that the progress stored on the memory stick goes away if I save and reload the game. Other than that a sim can write a book, cancel, resume, etc. and the progress circle updates.
  • Options
    pboxpbox Posts: 630 Member
    Wow thanks =)

    Not being able to use BBCode formatting is due to being a "new member", yes. I don't know what the threshold is exactly .. you need a bunch of posts and likes to be promoted.

    Re. progress not being stored: do you still have that "staging's affordance_to_save/use_another_si to point to your write-book_resume" in your code? That may be what keeps it from updating properly (I kept the original code, a generic crafting interaction, and for me everything was consistent during saves while I tested. I restarted a LOT =P)

    13114 is what again, is that the Homework-Start-Set or something? (I don't have anything in front of me right now) .. Anyhow, that is definitely something I haven't tried yet (and would perhaps also expain my violin fail) so I'll give it a try next time I'm on the TS4 computer!

    Thanks so much for the help =)!
    Stuff for TS2 · TS3 · TS4
  • Options
    ScumbumboScumbumbo Posts: 148 Member
    13114 is the Book_Homework_Active generic mixer interaction.

    I tried restoring the affordance_to_save to the generic crafting interaction but that didn't fix the save issue. No time at the moment to look into it deeper, and besides it sounds like you might have it working on your copy anyway.
  • Options
    pboxpbox Posts: 630 Member
    Yeah it's no rush =) with the upcoming game pack I'll wait with updating anyway, until I know whether or not there will be a new patch that breaks everything again =P ..
    Stuff for TS2 · TS3 · TS4
  • Options
    pboxpbox Posts: 630 Member
    I think I got it to work now -- FINALLY -- with the staging cloned from violin_WriteSong_Staging (plus your latest find about adding in the Book_Homework_Active mixer interaction) instead of the computer one. That deals with the progress and updates differently. I only did a quick test but the book progress survived both exiting to the neighbourhood and exiting / reloading the game.

    Phew! Thank you, again =)
    Stuff for TS2 · TS3 · TS4
  • Options
    ScumbumboScumbumbo Posts: 148 Member
    Excellent! Looking forward to seeing the finished product and what the exact differences are. I enjoy solving problems like this, at least when they interest me, so thanks for coming up with a worthwhile brainteaser :D
  • Options
    pboxpbox Posts: 630 Member
    edited January 2015
    V2 is available now: http://modthesims.info/download.php?t=545512 -- it also survived the patch it seems (I didn't even see any changes in the original code). Thanks again =)

    I would still love to know why a verbatim copy of 13114 Book_Homework_Active was breaking everything o.O .. I couldn't see anything anywhere in the code that would somehow explicitely refer back to this.
    Stuff for TS2 · TS3 · TS4

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file
Return to top