Guide to Infinity Engine

Discussion in 'Icewind Dale Total Conversion' started by anatoliy, May 8, 2022.

Remove all ads!
  1. anatoliy

    anatoliy Established Member

    Joined:
    Feb 18, 2017
    Messages:
    635
    Likes Received:
    200
    Resources
    Basic structure
    Map information is called Area and is stored in ARE folder.
    are1.jpg

    It contains many lists of different entities: actors, containers, doors, POI, ambients etc. But main interest here is in in actors.

    Actor is essentially instance of a creature. In ToEE it's MOB or PyObjHandle of type obj_t_npc. Actor has base class, which is called character (CRE) and is kind of PROTO in ToEE.
    actor1.jpg

    All actors have unique name. It's important, as referencing actors (NPC) by name is what scripts do.

    Script hooks are set up on Actor level, not on CRE level. This is contrary to ToEE practice, as most script hooks are setup on PROTO level.

    But Dialog script is setup on CRE level, not on actor's.

    Creature (CRE) has many properties set. More in later posts.
    cre1.jpg

    are2.jpg

     
  2. anatoliy

    anatoliy Established Member

    Joined:
    Feb 18, 2017
    Messages:
    635
    Likes Received:
    200
    Scripts
    Script structure is very simple - it consists of code blocks:

    IF
    ...trigger lines...
    THEN
    RESPONSE #<weight>
    ...action lines...
    RESPONSE #<weight>
    ...action lines...
    END
    script1.jpg

    Trigger lines are essentially condition functions. They are described here: IWD2 Script Triggers.

    Response line is a tricky one - essentially it's randomized execution blocks based on weight. Only one response block is executed. Most script blocks have only one response line.

    Continue() means that script execution should go next block. Otherwise script will be ended.

    Action lines are described here: IWD2 Script Actions.

    Sometimes trigger lines have inner functions, which are called identifiers: BG(2)EE Identifiers.
    Example: See(NearestEnemyOf(Myself),0)

     
    Shiningted, Endarire and Sitra Achara like this.
Our Host!