Baiprog: Difference between revisions

From ZeldaMods (Breath of the Wild)
Jump to navigation Jump to search
m (Clearer wording (?))
m (Forgot 0 was a number again...)
 
(2 intermediate revisions by the same user not shown)
Line 3: Line 3:
<onlyinclude>
<onlyinclude>
{{Parameter archive infobox|param_type=baiprog|version=0|type=xml}}
{{Parameter archive infobox|param_type=baiprog|version=0|type=xml}}
'''AIProgram''' (''baiprog'') can execute classes from the executable on command, and is most famously used to manage the movement and actions of all actors. </onlyinclude> Its flow of logic is ''vaguely'' similar to [[Bas|Bas]] files, in that "elements" of the AIProgram can call each other by number. However, AIPrograms are much more complex, and can do much more than just deciding which animation(s) to play. Most notably, Actions and Queries in an AIProgram are accessible from the event system if added to the DemoAIActionIdx.
'''AIProgram''' (''baiprog'') can execute classes from the executable on command, and is most famously used to manage the movement and actions of all actors. </onlyinclude> Its flow of logic is ''somewhat'' similar to [[Bas|Bas]] files, in that "elements" of the AIProgram can call each other by an index. However, AIPrograms are more complex and more powerful. Most notably, Actions and Queries in an AIProgram are accessible from the event system if added to the DemoAIActionIdx.


==Indexes==
==Indexes==
Everything in an AIProgram's parameter list is addressed by an index. This includes AIs, Actions, Behaviors, and Queries. Imagine every AI, Action, Behaviour, and Query as objects in an array. Counting starts at 0, and doesn't reset at the end of any section. For example, if there are 140 AIs and you wanted to reference Action 19, its index would be 160 (140 + 19 + 1 because counting starts at [AI/Action/etc.]_0).
Everything in an AIProgram's parameter list is addressed by an index. This includes AIs, Actions, Behaviors, and Queries. Imagine every AI, Action, Behaviour, and Query as objects in an array. Counting starts at 0, and doesn't reset at the end of any section. For example, if there are 140 AIs and you wanted to reference Action 20, its index would be 160 (140 + 20).


=Parameter Objects=
=Parameter Objects=

Latest revision as of 15:03, 6 August 2022

baiprog
Format AAMP
Version 0
Type xml
This article is about the structure in general. For actual values, check the GameROM or the pseudo-source.

AIProgram (baiprog) can execute classes from the executable on command, and is most famously used to manage the movement and actions of all actors. Its flow of logic is somewhat similar to bas files, in that "elements" of the AIProgram can call each other by an index. However, AIPrograms are more complex and more powerful. Most notably, Actions and Queries in an AIProgram are accessible from the event system if added to the DemoAIActionIdx.

Indexes

Everything in an AIProgram's parameter list is addressed by an index. This includes AIs, Actions, Behaviors, and Queries. Imagine every AI, Action, Behaviour, and Query as objects in an array. Counting starts at 0, and doesn't reset at the end of any section. For example, if there are 140 AIs and you wanted to reference Action 20, its index would be 160 (140 + 20).

Parameter Objects

DemoAIActionIdx

An alphabetically ordered list of Actions and Queries that are visible to the event system. Each key matches the name of the Action / Query, and the value is its index.

Parameter Lists

AI

Action

Behavior

Query