Making Skill Objects

Discussion in 'Objects' started by Raeven, May 11, 2017.

  1. Raeven

    Raeven Active Member

    I've made a (cooking) skill object and it turns out they are much simpler to pull off in TSO/FreeSo and Volcanic than the TS1 versions. This is because TSO has a Skill Objects semi-global. Globals are collections of pre-made trees - the work has been done for you so all you need to learn is the right way to use those trees. (Mainly what information you need to pass TO the semi-global and what information you'll receive from it.)

    First assign the correct semiglobal to your object.
    fsoSkillObjects_01.png
    The skill object uses the semi-global just 4 times:
    • Skill - Enter
    • Skill - Update
    • Skill - Exit Check
    • Skill - Exit
    Skill - Enter and Skill - Update each require you pass information to the semi-global.

    Skill - Enter needs to know which skill we're doing. Use Temp 0 to do that.
    fsoSkillObjects_02.png

    Skill - Update also needs to know which skill we are working with. Again, Use Temp 0 to do that.
    NOTE: I spotted Temp 1 being used in other skill objects so added it in "just in case" but as near as I could tell it doesn't actual get used any more. It depends on what tree is being run by name inside of Skill - Update. In this case no harm came from including it so there it is.
    fsoSkillObjects_03.png

    Skill - Exit Check and Skill Exit each work the same way no matter which skill we are working with so nothing needs to be passed along to either (though you will find remnants of Temp 0 and Temp 1 having been used in the past).

    ---

    In addition to those 4 globals calls, skill objects each have an extra tree that seems designed to be called by name. (These called trees almost always start with CT-) I have not yet confirmed the object is calling this tree by name, or what said object is using the information for, but I suspect it is used by the skill tracker and is used to count how many objects for each skill have been placed on the lot. (The number of skill objects present effects skill speed, up to a max of 6 objects) . as the UL Parrots are missing this call tree and do not contribute toward skill speed unless they are in use.

    This tree must be labeled
    CT - Is Skill Object?
    and it tells which type of skill this object gives but each skill a different value than the one used by Skill - Enter and Skill Update.
    The Constant used for this is labeled "Skill Type Mask" and these used allow bookcases to add cooking with mechanic, accurately conveying that this is dual-skill object.
    fsoSkillObjects_04.png
    • BODY is Skill Type Mask #0 (1)
    • CHARISMA is Skill Type Mask #1 (2)
    • COOKING is Skill Type Mask #2 (4)
    • CREATIVITY is Skill Type Mask #3 (8)
    • LOGIC is Skill Type Mask #4 (16)
    • MECHANIC is Skill Type Mask #5 (32)
    Last edited: Aug 14, 2017 at 7:39 PM
    Chompers, mrpenguinb, Alonzo and 4 others like this.
  2. zero35

    zero35 Active Member

    thanks for TSO skill objects made tutorial
  3. simsfreak

    simsfreak Active Member

    Very nice tutorial

Share This Page