List of bugs affecting BoA Calls

Error message

Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /var/www/pied-piper.ermarian.net/includes/common.inc).
AuthorTopic: List of bugs affecting BoA Calls
Shock Trooper
Member # 7662
Profile #0
Here is a list of bug reports listed in the order in which they appear in the Wiki BoA Script Reference. All calls have been listed, even though most appear to be alright, this is in case bugs are found in the future.

I hope to follow up with companion files for bugs relating to functions found in the manual or in the BoA Editor Help file. This is a plain text condensation of a Rich Text Format original.

Miscellaneous Special Calls: in my own version I have distributed these calls among the other headings, but here I will use the standard format.

In the comments below, “I” will be the person who wrote the original post.
TSE = the Windows version of Technical Support for the Editor.
Comments with no attribution come from Kel.

Script and IO Calls 1
Campaign and Scenario Calls 2
Basic Character Calls 2
Item, Special Item and Gold Calls 4
Location and Distance Calls 4
Statistic and Damage Functions 5
Animation and SFX Functions 5
Scenario Initialization Calls 6
Boats and Horses 6
Event Calls 6
Town Calls 6
Outdoor Calls 7
The Passage of Time 7
Miscellaneous Special Calls 7
Terrain Checking and Modification 8
Dialog Calls 8
Basic Dialog Box Calls 9
Advanced Dialog Box Calls 9
Terrain Script and Creature Script Calls 9
Terrain Script Calls 10
Movement, AI Functions 10
Combat and Targeting Calls 10
Grouping Calls 11
Messaging Calls 11
Advanced Item Management Calls 11
NPCs Joining Party Calls 11
Splitting Up the Party Calls 11
Custom Item Ability Calls 11
Custom Character Ability Calls 11
Cutscene Calls 12
String Manipulation Calls 12
Debugging Procedures 12

Script and IO Calls
1 print_big_str
2 print_big_str_num
TSE: print_big_str_color ignored the color field. The text was always
black. This is fixed in the versions more recent than 10/8/04, (it is?).

3 void block_entry
4 void end
5 short get_ran
6 short get_selected_char
7 short is_combat
8 short is_outdoor
9 short is_town
10 void play_sound
11 void print_str
12 void print_str_color
13 void run_scenario_script
14 void run_town_script
15 void set_incidental_sound
16 void set_state
17 void set_state_continue

Campaign and Scenario Calls
18 void clear_quest
19 void end_scenario
20 short get_flag
21 short get_sdf
22 void inc_flag
23 void set_flag
24 void toggle_quest

Basic Character Calls
25 void alert_char
26 void award_char_xp
27 void award_party_xp
28 short can_see_char
29 void change_char_xp
30 void change_pc_skill_pts
31 void change_spell_level
TSE: change_spell_level currently gives an unfortunate text message
when used for a non-party creature. This is fixed in the versions more
recent than 10/8/04. (It is?)

32 short char_attitude_to_char
33 short char_has_trait
34 short char_ok
35 short char_on_spot
TSE: The descriptions of the calls char_on_loc and char_on_spot are
unclear (and the call names are unhelpful). char_on_spot only checks
for NPCs, so it will return -1 if one of the player's characters is on that
spot. char_on_loc checks for all characters (as does char_on_me).

36 short char_status
37 short creature_type

38 void deduct_ap
TSE: calls end_combat_turn and deduct_ap were originally designed to
only be called in creature scripts. This is highly unfortunate, because these
calls are very valuable for custom abilities, and because there is no way to
reliably get them to work on PCs. If called in a scenario script, these calls
affect PC 0 only. In later versions of Blades of Avernum (v1.0.1 Windows),
when these calls are used in a non-creature script, they will affect the
currently selected character (when not in combat) or the currently active
character (in combat).

39 void end_combat_turn
40 short enemies_nearby
41 void erase_char
42 short friends_nearby
43 short get_attitude
* As far as I can tell, the attitude of the party is 0, which should be
mentioned under the get_attitude description.

44 short get_char_skill_pts
45 short get_energy
The Immortal: Either there is no get_max_energy(); call, or there is no
such call in the docs. Either way, this should be fixed.
Ishad Nha: Maximum Spell Energy is statistic 36, so “get_stat(
which_char,36);” should work here.

46 short get_health
47 short get_level
TSE: the ME paramater doesn't work with relocate_character or
get_level If you want to use these calls inside a creature script, use
the my_number call.

48 short get_max_health
49 short get_species
50 short get_spell_level
51 short get_summon_level
52 void give_recipe
53 short has_recipe
54 void kill_char
55 short my_ap
56 short my_number
57 short party_can_see_loc
58 short party_has_trait
59 short party_size
60 void print_named_str
61 short random_party_member
62 void revive_party
63 void set_attitude
64 void set_char_alert
65 short set_char_script_mode
66 void set_char_trait
67 void set_creature_memory_cell
68 void set_level
69 void set_mobility
70 void set_name
71 void set_special_ability
72 void set_summon_level
73 short species_in_party

Item, Special Item and Gold Calls

74 void change_coins
75 void change_spec_item
76 void char_give_item
* Items don't stack when given via this call_give_item (so if you give three
potions of the same kind, the character ends up with three different
potions). This doesn't happen with reward_give or other item management
calls as far as I know.

77 short char_has_item
78 short char_has_item_of_class_equip
79 void char_take_item
TSE: Don't use the call char_take_item. It won't work. Use the call
take_item instead. Note that this means that you can't take items from
NPCs once they have been given.

80 short coins_amount
81 short has_item
82 short has_item_of_class
83 short has_num_of_item
84 short has_special_item
85 short item_of_class_on_spot
86 void move_item_on_spot
87 short pay_coins
88 void put_item_on_spot
89 short reward_give
90 short take_all_of_item
91 short take_all_of_item_class
92 void take_item

93 short take_item_of_class_on_spot
94 void take_num_of_item
95 void take_special_item

Location and Distance Calls
96 short char_loc_x
97 short char_loc_y
98 short char_dist_to_loc
99 short char_on_loc
TSE: The descriptions of the calls char_on_loc and char_on_spot are
unclear (and the call names are unhelpful). char_on_spot only checks
for NPCs, so it will return -1 if one of the player's characters is on that
spot. Char_on_loc checks for all characters (as does char_on_me).

100 short dist_to_waypoint
101 short group_dist_to_loc
102 short my_dist_from_start

Statistic and Damage Functions
103 void alter_stat
TSE: alter_stat can't drop the main stats Strength, Dexterity,
Intelligence, or Endurance below the default starting level for those
stats. Which is probably a good thing.

104 void change_char_energy
105 void change_char_health
106 short char_with_highest_skill
107 void damage_char
108 void damage_near_loc
109 short get_char_status
110 short get_highest_skill
111 short get_skill_total
112 short get_stat
113 short get_stat_levels_bought
114 void heal_char
115 short party_has_status
116 short party_member_has_skill
117 void restore_energy_char
118 void restore_pc
119 void set_char_status
TSE: When using set_char_status with is_forced set to 0, curse/bless
and shield/weaken are flipped. So
set_char_status(5,1,10,FALSE,TRUE)
will give character 5 10 levels of bless instead of shield (because the
1, which should be shield, is being read as bless instead).

120 void set_party_status
121 void status_near_loc
122 void waypoint_damage_party

Animation and SFX Functions
123 void put_boom_on_char
124 void put_boom_on_space
125 void put_effect_on_char
126 void put_effect_on_space
127 void put_jagged_zap
128 void put_sparkles_on_char
129 void put_sparkles_on_space
130 void put_straight_zap
131 void run_animation
132 void run_animation_sound

Scenario Initialization Calls
133 void add_item_to_shop
134 void create_boat
135 void create_horse
136 void init_quest
137 void init_special_item
138 void set_creature_type_level

Boats and Horses
139 short in_boat
140 short in_horse
141 void set_boat_property
142 short set_boat_range_property
143 void set_horse_property
144 short set_horse_range_property

Event Calls
145 short day_event_happened
146 void set_event_happened

Town Calls
147 void activate_hidden_group
148 void change_crime_level
149 void change_outdoor_location
150 void clear_town
* Something odd and undocumented is going on with the clear_town call.
The description of the problem is here.

151 short current_town
152 short current_town_size
153 void enable_add_chars
154 short get_crime_level
155 void make_town_hostile
156 void move_to_new_town
* The call move_to_new_town can't be called from an INIT_STATE, a
START_STATE, a creature script, or a terrain script, even if you distance
the call from the state with set_state_continue, run_town_script, or
run_scenario_script. (I put this under documentation because apparently
this would be hard to change.)

157 short num_killed_in_town
* The call num_killed_in_town always returns 0. (I have not verified this.)
158 void place_monster
159 void set_crime_tolerance
160 void set_items_not_property

161 void set_town_status
TSE: Problems With town_status Calls. The call town_status only works
when passed the value -1 (for the current town). So town_status(-1) will
return the status of the current town, but town_status(any other
number) won't work correctly.

162 void set_town_visibility
163 short spawn_creature
164 short teleport_party
Ishad Nha: Mode 2 does not work, fortunately modes 0,1 do work.
165 short town_status
166 void turn_off_training

Outdoor Calls
167 void create_out_spec_enc
168 short current_out_section
169 void eliminate_outdoor_enc
170 void out_move_party
171 short outdoor_enc_exists
172 void outdoor_enc_result
173 void place_out_spec_enc
174 void set_out_fight_town_loaded

The Passage of Time
175 void force_start_day
176 short get_current_tick
177 void set_ticks_forward
178 short tick_difference
179 short what_day_of_scenario
* Arguably not a documentation problem, using force_start_day(-1) makes
what_day_of_year always return 0, but what_day_of_scenario still works
fine. This should at least be mentioned somewhere. Also,
what_day_of_scenario starts at 0, despite the fact that the games in-game
calendar starts at 1, which should at least be mentioned.

180 short what_day_of_year
Lancer: It is worth noting that what_day_of_year() always returns a value of 0 if used with force_start_day(). In other words, the value for
what_day_of_year fails to increment with each passing day. The way
around it is by using the what_day_of_scenario() call which works correctly
in conjunction with force_start_day().
Thralni: the call what_day_of_scenario() appears to always return the
number of days - 1. This appears to be normal...So, if its day 3,
what_day_of_scenario will return 2.

Miscellaneous Special Calls
181 void create_text_bubble
* The call create_text_bubble cannot be called from a terrain script, even
though the docs say that it can. (I have not verified this.)

182 void drop_item
183 short get_char_who_stepped_on
184 void make_wandering_monst
185 void put_object_on_waypoint
186 short run_bash_door
187 short run_pick_lock
188 short set_ter_script_mode
189 void set_terrain_memory_cell
190 void text_bubble_on_char

Terrain Checking and Modification
191 void change_blocked
192 short get_floor
193 short get_height
194 short get_terrain
195 void flip_terrain
196 short is_blocked
197 short is_field_on_space
198 short is_object_on_space
199 short is_stain_on_space
200 void put_field_on_space
201 void put_object_on_space
202 void put_stain_on_space
* The call put_stain_on_space sometimes does nothing when attempting
to remove a stain. This is a bit unpredictable, but most of the time that I've
tried it, it does nothing. It also works fine putting a stain down, just not removing it.

203 void set_floor
* The calls set_terrain, set_floor, and set_height only inconsistently work
outdoors. They most often do nothing.

204 void set_height
205 void set_terrain
206 void swap_floor
207 void swap_terrain

Dialog Calls
208 void add_string
209 void begin_shop_mode
210 void begin_talk_mode
211 short character_talking_to
212 void clear_strings
213 short current_personality
214 void remove_string
215 void set_char_dialogue_pic

Basic Dialog Box Calls
216 reset_dialog
217 void add_dialog_choice
* As described here, in a dialog box, choosing the second dialog choice
always returns the number 2, even if the dialog choice was added as the
third option.

218 reset_dialog_preset_options
219 void add_dialog_str
220 void message_dialog
221 short run_dialog

Advanced Dialog Box Calls
222 void check_text_response_match
223 short get_selected_pc
224 void get_text_response
225 short got_text_match
226 void large_draw_pic_dialog
227 short run_select_a_pc
228 void small_draw_pic_dialog

Terrain Script and Creature Script Calls
229 short can_see_loc
230 void damage_nearby
231 short dist_to_char
232 short dist_to_loc
233 short dist_to_party
234 short floor_in_this_spot
235 void force_status_nearby
236 short get_memory_cell
237 short get_nearest_char
TSE: If you use this call in a creature script, it will return the number of the creature whose script is running, not the nearest other creature. This
makes the call useless for creatures (it was originally intended for use in
terrain scripts). Alignment-based calls (like get_nearest_evil_char) work
fine as long as you're looking for creatures of a different alignment.

238 short get_nearest_evil_char
239 short get_nearest_good_char
240 void heal_nearby
241 short my_loc_x
242 short my_loc_y
243 void restore_energy_nearby
244 void set_memory_cell
245 short set_script_mode
246 void status_nearby
247 short terrain_in_this_spot

Terrain Script Calls
248 short char_on_me
249 short char_who_activated_script
250 short get_mechanism_difficulty
251 short get_physical_strength

* The call get_unlock_spell_strength is undocumented.

252 void set_mechanism_difficulty
253 void set_physical_strength

Movement, AI Functions
254 short am_i_doing_action
255 short approach_char
256 void approach_ter_script
257 short approach_waypoint
258 void fidget
259 short flee_char
260 short maintain_dist_to_char
261 short move_to_loc_x_y
262 short return_to_start
* When a creature can't get to a location that it's trying to get to, the game
slows to a crawl. For example, when a creature gets lured out of a building
hrough an open door, the door gets closed, and then the creature tries to
return_to_start, the game slows. (This has been reported on Windows, and
I have not verified it personally.)

263 void stop_moving

Combat and Targeting Calls
264 void do_attack
265 void do_attack_tactic
266 short get_aggression
267 short get_courage
TSE: The description of the call get_courage in the documentation is
wrong. It should read: “short get_courage(short which_char,short
dummy_value) - Returns the current courage of which_char.
Dummy_value is ignored.”

268 short get_strategy
269 short get_target
270 short select_target
271 void set_aggression
272 void set_courage
273 void set_strategy
274 void set_target
275 short target_ok
276 short who_hit_me

Grouping Calls
277 void add_char_to_group
278 void add_range_to_group
279 short char_in_group
280 void clear_all_groups
281 short first_group_member
282 short num_chars_in_group
283 short random_group_member
284 void remove_char_from_group
285 short what_group_in

Messaging Calls
286 void broadcast_char_message
287 void broadcast_message_from_x_y
288 void broadcast_terrain_message
289 void give_char_message
290 void give_ter_script_message
291 short my_current_message

Advanced Item Management Calls
TSE: Do not use the ME value for which_char for these calls. Use the
creature's actual number. Inside a creature script, you can get this
with the my_number call.

292 void destroy_char_item
293 short get_item_variety
294 short item_type_in_slot
295 void take_item_char_item

NPCs Joining Party Calls
296 short add_char_to_party
297 short character_in_party
298 short remove_char_from_party
299 short this_char_is_in_party

Splitting Up the Party Calls
300 void reunite_party
301 void split_off_one_char
302 short try_to_split_party

Custom Item Ability Calls
303 short who_is_custom_item_target
304 short who_used_custom_item

Custom Character Ability Calls
305 void change_custom_abil_uses
306 short get_custom_abil_uses
307 void init_special_abil
308 short who_used_custom_abil

Cutscene Calls
309 void erase_text_bubbles
310 void force_instant_terrain_redraw
311 void force_view_center
312 void march_party
313 void pause
314 void relocate_character
TSE: the ME paramater doesn't work with relocate_character or
get_level If you want to use these calls inside a creature script, use
the my_number call.

315 void set_character_facing
316 void set_character_pose
317 void set_total_visibility

String Manipulation Calls
318 void append_char_name
319 void append_number
320 void append_string
321 void clear_buffer
322 void get_buffer_text

Debugging Procedures
323 void print_num
TSE: The call print_num won't properly print negative numbers. If you need negative numbers, use print_nums.

324 void print_nums
325 turn_on_debug_mode
Posts: 292 | Registered: Monday, November 13 2006 08:00
Shock Trooper
Member # 10488
Profile #1
quote:

* The call get_unlock_spell_strength is undocumented.

This is in fact only partially true. The call is not included in the appendix, but it is documented in "Chapter 1.7: Editing Towns", section "Magical Doors (Advanced)", on page 41.

It does fail to specify what sort of arguments the call takes.
Posts: 334 | Registered: Friday, September 14 2007 07:00
Law Bringer
Member # 4153
Profile Homepage #2
...okay. Did you want me to do anything in particular with this? And I apologize, but if it's going to be a serious reference, I'll be tidying up the formatting to make it a bit more readable.

--------------------
TM: "I want BoA to grow. Evolve where the food ladder has rungs to be reached."

Gamble with Gaea, and she eats your dice.
Posts: 4130 | Registered: Friday, March 26 2004 08:00