5 - SPAWN/ RESPAWN RULES TO REVIEW
11 - SPLIT NPC GROUPS INTO TEAMS AND GROUPS (FOR GROUP SPLITTING AND PLAYER MANAGEMENT)
12 -- teams contain one or more NPC groups, one or more players
13 -- npc groups belong to one team
14 -- teams may contain sub-teams. in this case parent team exists only for organisation purposes...
16 2. ENHANCE PATAT READING - GEN RAND POINT SETS
17 3. ADD RANDOM_POS() TO STATE_POSITIONAL (To work for patats and splines - return StartPos in case of doubt)
18 2. BASIC BEHAVIOURS (NEED PATAT READ)
19 - add handy counter class like timer class for counters
20 - simple mobile obstacle avoidance (cell-based, no surface tesst)
21 - better management of place concept wrt midPos(), distTo(), etc
22 - Bots in towns lead you where you want to go
24 -- players who are added to the team are considered to be teamed by the 'team chat' code
25 -- bots must be able to 'invite to team'/ 'eject from team'/ etc
31 - CODE CLEAN & HEADER COMMENT REVIEW
32 -- make sure that no class that contains updateAliasTreeDelete() method is reffernced by a pointer
33 ---- consider using a special pointer class instead - eg ptr to vector + idx | linked list of ptrs
34 ---- by refferenced object allowing pointers to be NULLED out if need be
35 - add bigadd to caicoord for fixed precision
36 - integration with admin tools
37 - quickDistTo from AIpos to AIvector
38 - re-write fauna respawn mgmt code
42 -- release (initally just despawn)
44 -- Spawn (location, owner, burden, control mode<ridden|lead|free>, leader entity) - reply with ID
45 -- Despawn - reply with save message for backup/ respawn
46 [-- TP (via despawn & spawn - may result in identity change)]
47 -- Switch to remote control for riding
48 -- Switch to autonomous control (after riding)
49 -- Start following xxx
50 -- Stop following (whoever)
51 -- Save stats for backup (same messageing as despawn - above)
52 - Go to stable & despawn
53 -- Spawn from stable and go to 'leader' entity (bot or player)
62 - ON-THE-FLY UPDATE (AIDS)
63 - Split EGS property management into lib - use in both EGS and AIS - eliminate need for AIS parameters to be managed by EGS
64 - Add Kami & Karavn tp parameters
68 - integration of AIDS with LD tools
72 - bot identification in IOS - differentiate role master types for richer context text
79 - players registered in ais
80 - players in view by ais poulation
81 - players in view by mgr poulation (per mgr)
82 - ave update rate of bots in ais/ mgr
83 - graph of bot update count per tick
84 - graph of bot moves/ tick
85 - graph of bot actions/ tick (combat actions, spells, etc)
88 - command interface for pets (common to AI owners and player owners)
93 - ai behaviours for above points (and 'from stables')
95 PETS (pets of PLAYERS)
99 - Add spawn code to generate states, profiles, etc
100 - gisements & fame for kamis
103 - nogo zones listed in managers (& hierachical regions)
106 * change file naming and numbering policy
109 * add despawn messages
111 * from AIS log all bots by name w/id & test static nature of ids
112 - one bin file per .primitive (.ryzomai)
113 - file listing ai primitive files with their manager quotas & base addresses
114 - compile -> build: 1. alias tree, 2. map (by alias) of serialised argument sets (in cmd format) with src_id
115 - src_id is the low dword of src file time stamp
116 - on each re-compile bin compare map blocks (old and new) and replace old with new, updating src_id if different
117 - src_id for alias tree treated in same way as map blocks
118 - on connection of AIDS, AIS transmits alias tree src_id for each active mgr - if different, AIDS requests complete tree which AIS compiles and sends
119 - AIDS stores alias tree and map of block src_ids for each manager on each AIS
120 - AIDS transmits packets containing: alias tree delta (in the form of additions and suppressions), block count, blocks (alias, commands)
121 - loading and re-loading forms (creature, manager, prims, etc)
122 - landscape analysis & pathfinding & wandering etc
124 - collision detection
128 - NPC groups have a 'script' state (eg 'going to xxx') and a 'punctual' state (eg 'fending off an attack')
129 - both types of state are defined in the same way except that there is no location info in punctual states
130 - if the punctual state is non-null it is used instead of the script state - the location is defined as group's current location
131 - events can change punctual states & change script states
132 - The state defines a number of sets of parameters (one for each NPC role)
133 - There is a list of NPC roles in cfg file (eg group guardian, lead caravaneer, caravaneer, etc...)
134 - The groups have a set of NPCs
135 - The NPCs may have pets
136 - NPC pets behave like player pets (spawn/ despawn at stables, vanish on NPC death, etc)
137 - States define route and location information for the group
138 - All states contain an 'end of state' action (may be a composite action, a decision tree, etc)
139 -? How do we define the 'everyone is here so we can go' end of state condition for convoys?
140 -? Can convoy leader invite you to group at a distance/ send 'we're waiting for you...' type messages, etc?
141 -? If a convoy has no player protectors and is attacked - if aggressors repelled by players - can NPCs give reward?
142 - NPC actions & events can trigger group events for their group (eg NPC has sold all of his goods -> group can change state
144 - - The route is blocked in front
145 - - The group is under attack (triggered each time a new group of attackers added)
146 - - The group is no longer under attack (each time a group of attackers removed)
147 - - A group of players/ bots comes into view
148 - - A group member dies
149 - - A pack animal dies
150 - - The time is ... (time chosen by a random algo parameterised by 'earliest', 'latest' and 'spread' parameters- spread)
151 - - - Note: normal distribution simulation via for(i=0,val=1.0;i<spread;++i)val*=frand();
152 - - All of the subscribed players have arrived
153 - - The group's been in this state for ... minutes
154 - - All of the pets are here (from the stable)
155 - - All of the pets have gone (into the stable)
156 - - The group has reached its destination
157 - - Group members are LD (allows puntual state to wait for them for a short while before giving up)
158 - - Player group member requests pause
159 - - Player group members all ok to continue
160 - - State timer[n] - time is up
161 - - Group 'encounters' group (group dist calc below gives result <=5m)
162 - GRP Events contain set of states to which they apply (& flag for 'scripted' states to say whether the punctual state must be NULL)
163 - Internally we use linked lists of groups by state - setState moves GRP from one list to another
167 - - set punctual state
168 - - send event to the mission system (eg mission accomplished, etc)
169 - - set grp fame (for effect on FAUNA aggro - ctrl degree to which grp is attacked by predators, etc)
170 - - if condition then sub-action0 else sub-action1
171 - - for each group in view
172 - - for each enemy group in fight do action
173 - - for each friend group in fight do action
174 - - select an action at random <set of actions with random weightings>
175 - - ? is there some way of influencing random wirghtings dynamically - probably with a new type of action block (or allow variables & functions as well as constants)
176 - - state var[n]=xxx*old_val+yyy
177 - - state timer[n].set(xxx)
178 - - state timer[n].add(xxx)
179 - - state timer[n].pause
180 - - state timer[n].resume
181 - Condition components
182 - - all of <set of sub conditions>
183 - - any of <set of sub conditions>
184 - - group is stronger than aggressors (note: not equivalent to !weaker)
185 - - group is weaker than aggressors (note: not equivalent to !stronger)
186 - - all pack animals are dead/ vanished
187 - - all NPC group members are dead
188 - - time in this state > xxx && < yyy
189 - - grp state variable[n] > xxx && < yyy
190 - - there are > xxx bots(npcs) in the group
191 - - there are > xxx && < yyy entities in place ppp
192 - - there are > xxx NPC groups && < yyy NPC groups in place ppp
193 - - target group is NPC/ player/ KAMI/ caravan/ predator/ fauna/ ...
194 - - target group dist > xxx && < yyy (dist from group centrer to group center - dist from closest member of my group to their group center - dist from closest member of their group to my group center)
196 - - Each grp has a 'grp type' field to allow for sharing of states & events by groups but differentiaition at times
197 - - Each NPC has a role, defining which set of props defined in a state apply to them
198 - - The states define the AI_PROFILE to use for each role of bots & the associated parameter set
199 - - AI Profiles determiine the set of inputs, set of goals, set of actions and set of internal parameters for the AI decision unit
200 - Role info in states:
201 - - each state may define role info for given roles (and an optional 'default' clause)
202 - - role info includes:
203 - - - chat info - allowing dynamic parameterisation of the chat system - eg "we're on the way to Matisville", "we're waiting for xxx", etc
204 - - - AI_Profile parameterisation (see above)
207 - with group placement we define the starting bot state and the 'group type' for state logic bot state
208 - At save time we save bot group states, group positons & compositions
211 Example 1: Walker and talker:
212 - Group of walker and talker bots=1 or more bots who walk together
213 - One state for each town road segment in each direction
214 - One state for each public place (such as aggora) where bots can spend time without moving
215 - One state for each stationary bot to whom walker & talker bots can talk
216 - One event for 'arrived at destination' for each road segment -> random choice of new destinations
217 - Event for 'group encounters group' for triggering 'chat to passers by' sub-state - use state timer[0] to fix time before next conversation possible
218 - Event for 'group encounters player' for triggering 'appreciate' punctual state for admiring/ waving at/ hailing famous and/or friendly players
219 - Event for 'group encounters player' for wandering merchants to hail players with 'merchant-like' calls
222 Example 2: Newbee caravan escort mission:
223 - Group of caravaneer bots includes: a lead merchant(A), a second merchant(B), a healer(C), a mercenary(D)
224 - The mission description is as follows:
225 - - At 8:00 and 14:00 every day caravans sets out from town(T) and go to village(V) to sell merchandise.
226 - - After arriving at V the caravan master talks to merchant(M) in his shop - this done the caravan returns home
227 - - The caravan should be attacked by Fauna some time allong the route in each direction
228 - - If the lead caravaneer dies or all of the pack animals die the group returns home directly
229 - - The pack animals are left/ picked up from at the stables at the entrances to T and V
230 - - Players may subscribe to the mission as follows: up to 2 fighters (range, melee, harvester or attack magic), up to 2 healers (or buffers), up to 2 merchants
231 - - At 30 mins before the group departure time the NPCs spawn from the building in which they live and go to the aggora (as a meeting point)
232 - - Every 10 mins a reminder message goes to subscribed players to ask them to join up
233 - - When the subscribed players have all arrived the group goes to collect the pack animals and sets off on its journey
234 - - At 30 mins after the intended departure time any players who have not turned up are considered late and are not waited for
235 - - The healer, mercenary and 2nd caravaneer characters only join the group (at the moment of departure) if there are no players in the group with appropriate roles
239 - - - All say 'we're going to the Agora to prepare a convoy... go see xxx if you would like to join up'
240 - - Waiting for players
241 - - - Leader says 'we're waiting to leave with our convoy', also has 'join up' possibility (if not fully subscribed)
242 - - - Default say 'talk to xxx - he's the leader'
243 - - Route T-agora to T-stables
244 - - Getting beasts of burden from T stable
245 - - Route from T to V
246 - - Putting beasts of burden in V stable
247 - - Route from V stable to merchant M
248 - - Talking to merchant M
249 - - Route from M to V stable
250 - - Getting beasts from V stable
251 - - Route from V to T
252 - - Putting beasts into T stable
253 - - Mission debrief and thanks to players
254 - - Route T-stable to despawn point
255 - - Flee back home (after mission failure due to death of lead caravaneer or pack animals)
257 - - Stand and face attack
258 - - Wait for road to be cleared (in case of combat on road ahead)
259 * Each state merits a complete formula describing activity of different bot roles during state
260 * Note that many of these states may be shared by many different NPC groups
267 * * This is not the complete list ('cos I don't have time right now)
268 - - State var used to evaluate group's 'difficulty' rating so far (increment each time a group member hp drops below a given threshold)
269 - - State var used to evaluate 'action' rating (timer samples 'in combat' state and increments or decrements var as result
270 - - Timer events used to modify aggro level dynamically to increase (or not) fauna attacks - as need be (in function of above ratings)
271 * It would be handy to have comment fields with groups and events as a reminder/ fail safe for variable usage (eg one event uses var1 for one thing, another for another)
272 * Alternatively, all grps are allowed all states so all vars must be present for all groups so use a variable list to list vars and compile-time associate
276 - chat by composition:
277 - fixed set of bot chat page formats on the client,
278 - for each bot use a dynamic set of bot chat parameters,
279 - - what shop inventory (list of items, tp, animals),
280 - - what missions (defined by the mission system),
281 - - what news (defined by the news system),
282 - - what basic chat (automaton, text set)
283 - - - basic chat for team mates (defined by group state),
284 - - - basic chat for friendlies (defined by group state),
285 - - - basic chat for unfriendlies (defined by group state),
286 - Chat parameters are cumulative: "mission:...", "shop:...", etc add together
287 - - "-missions", "-shop" ets override to dissable parts of of dialogue tree
290 For an example we need an example NPC scenario:
291 - BOT A at home point H, steed B, pack animal C, stable S0, stable S1
292 - A spawns at H (if already spawned leave state machines untouched and return)
293 - when present at spawn point route to S0
294 - when at S0 trigger B & C to spawn from stable
295 - when B & C are present setup convoy as A leads B leads C and route to S1
296 - when arrived at S1 C to stable
297 - when C in stable A mounts B
298 - when mounted A rides B to S0
299 - when arrived A dissmounts
300 - when dissmounted B to stable and A route to H
301 - when A arrives at H despawn and set respawn timer for 10 minutes
305 - AI Profiles for NPC roles
306 - Based on a decision system of Pierre's/ Gabrielle's design
307 - Need to determine set of inputs
308 - - evaluation of 'is group in conflict'
309 - - evaluation of 'is group threatened'
310 - - evaluation of 'am I threatened'
315 SINGLETON TeamManager
316 -- Singleton Code modules
317 //???- contains vector of global event managers (code modules)
318 //???- methods for registering new global event handlers
319 //???- contains vector of AI_Profile modules (code modules)
320 //???- methods for registering new AI profile modules
323 - contains vector of Action classes (for factory)
324 - contains Action class factory fn(string action_name, vector<string> args)
325 - contains methods for registering new factory-producable classes
327 - contains vector of states (data units)
328 - methods for adding new states
330 - methods for setting the state of a team
331 - methods for updating team
332 - contains keyword set for teams
333 - contains keyword set for bots
334 - contains keyword set for states
336 - contains vector of TickUpdateCallback callbacks (and methods for adding/ removing these callbacks)
339 - may add an update into the 'update on tick' vector in singleton
340 - Reacts to global events (eg change of time)
341 - contains a vector of <event reaction>
342 - constains a vector of <event reaction, state> pairs
343 - when an event is triggered the event handler determines which <event reaction, state> pairs match the event
344 and triggers their execute() routines
347 - A module that defines the reaction to a given event (under given circumstances)
348 - Contains a vector of states to which it applies
350 - When event is triggered executes 'action' with refference to each state
353 - A parameterised class instance generated by a class factory
354 - execute method takes form execute(team)
355 - may perform actions on the team (eg state change, trigger event, etc...)
356 - contains a vector of sub-actions
357 - sub actions are NOT executed automatically - they may be execute explicitly from the main execute() method
360 - include a singleton
361 - contains method begin(bot,team) - called when a bot is given this profile
362 - contains method end(bot,team) - called when bot changes to another profile (or dies)
363 - contains method update(bot,team,dt) - called every time bot is updated (with tick count since last update)
364 - may add an update into the 'update on tick' vector in singleton
367 - contains a keyword mask
368 - contains vector of teams that are currently in this state
369 - contains vector of 'role-state-info'
370 - contains geometry (a vector of primitives)
371 - an inti method (can verify the geometry validity)
374 - contains bot chat args
375 - contains ai profile ptr
378 - contains a keyword mask
379 - contains a vector of bots
380 - contains a vector of players
381 - contains methods for managing pets of bots and players
382 - contains a state ptr
383 - contains a local event handler
386 - Reacts to local events (eg end of path)
387 - Contains a vector of event reactions
390 - bitmask representing keywords matched or not matched for an entity
393 - 'must-include-all-of' mask to apply to KeywordMask
394 - 'must-include-some-of' mask to apply to KeywordMask
395 - 'must-not-include-any-of' mask to apply to KeywordMask
398 - vector of keywords (strings)
399 - methods for converting a string to a keyword mask
400 - methods for converting a string to a keyword filter
401 - methods for converting keyword filters and keyword masks back to strings