User Tools

Site Tools


cerea2:build:avatar

Avatars

This page describes how the avatar system interacts with the ambient animation and walk waypoints code.

The basic idea is that avatar is initialized once when we start running it. That will set all waypoint variables on the creature and creature will not be deleted after that. For each different job parts we have different set of waypoints to be walked. We also have waypoint sets pointing how to walk out from each job part and how to walk in to each job part.

Things are initialized as follows:

Type Base In Out Description
W 100 200 250 Working in job
E 300 350 375 Eating in the inn
S 400 450 475 Sleeping at home
B 500 550 575 Break at worksite
F 600 650 675 Free time at home

When we initialize avatar we set following variables:

Variable Value Description
WalkTag AVATAR Use AVATAR as tag for initializing walk waypoint code.
WP_SCRIPT variable in WP_AVATAR waypoint cw_a_avatar_next The WP_AVATAR waypoint is somewhere in generic area and it will have one variable WP_SCRIPT that will point to the script cw_a_avatar_next script that will check the correct time, and then find the correct type for that time of day, and then call C_WalkSetNext with correct number in In column for that type of action
WADD_01 100 Job waypoint set start
WADD_01 WP_<value of JobWP> First waypoint in job set
WADD_02 200 Waypoint leading in to job
WADD_02 WP_<areatag>_IN First waypoint leading in to job
WADD_NEXT_02 100 After we finish leading in set, we go to do normal job
WADD_03 250 Waypoint leading out from job
WADD_03 WP_<areatag>_OUT First waypoint leading out from job
WADD_NEXT_03 1 After we finish leading out set, we go to the first waypoint which will call cw_a_avatar_next which will then put us to next in set.
WADD_04 300 Waypoint set start
WADD_04 <EAT_WP> First waypoint when eating
WADD_05 350 Waypoint leading in to eating place
WADD_05 WP_<areatag>_IN First waypoint leading in to eating
WADD_NEXT_05 300 After we finish leading in set, we go to do eating
WADD_06 375 Waypoint leading out from eating place
WADD_06 WP_<areatag>_OUT First waypoint leading out
WADD_NEXT_06 1 After we finish leading out set, we go to the first waypoint which will call cw_a_avatar_next which will then put us to next in set.
WADD_07 400 Waypoint set start
WADD_07 Housing_x_y_Bed First waypoint when sleeping
WADD_08 450 Waypoint leading in to there
WADD_08 WP_<areatag>_IN First waypoint leading in
WADD_NEXT_08 400 After we finish leading in set, we go to do sleeping
WADD_09 475 Waypoint leading out
WADD_09 WP_<areatag>_OUT First waypoint leading out
WADD_NEXT_09 1 After we finish leading out set, we go to the first waypoint which will call cw_a_avatar_next which will then put us to next in set.
WADD_10 500 Waypoint set start
WADD_10 WP_<ValueOfJobWP>_BRK First waypoint when having break
WADD_11 550 Waypoint leading in to there
WADD_11 WP_<ValueOfJobWP>_BRK_IN First waypoint leading in, usually this waypoint is nonexistent, thus it will not do anything
WADD_NEXT_11 500 After we finish leading in set, we go to break
WADD_12 575 Waypoint leading out
WADD_12 WP_<ValueOfJobWP>_BRK_OUT First waypoint leading out, usually this waypoint is nonexistent, thus it will not do anything
WADD_NEXT_12 100 After we finish leading out set, we go to the first waypoint which will call cw_a_avatar_next which will then put us to next in set.
WADD_13 600 Waypoint set start
WADD_13 Housing_x_y_FREE First waypoint when having free time
WADD_14 650 Waypoint leading in to there
WADD_14 WP_<areatag>_IN First waypoint leading in
WADD_NEXT_14 600 After we finish leading in set, we go to have free time
WADD_15 675 Waypoint leading out
WADD_15 WP_<areatag>_OUT First waypoint leading out
WADD_NEXT_15 1 After we finish leading out set, we go to the first waypoint which will call cw_a_avatar_next which will then put us to next in set.
cerea2/build/avatar.txt · Last modified: 2015/05/03 12:32 by 127.0.0.1