BoA Editor Suggestions
Pages
Author | Topic: BoA Editor Suggestions |
---|---|
Agent
Member # 2820
|
written Tuesday, August 3 2004 12:14
Profile
I just realized that the game returning the coordinates of a picked up item is probably impossible without an engine change, because they automatically lost their IDs when that occurs. And they are given new ones when they are dropped back on the ground. Slightly tweaked variation to accommodate these issues: short item_loc_x(short which_item) - Returns the x of the location of item which_item. which_item refers to the items ID in the scenario editor. If the item has either been picked up or non-existent, call returns -1. short item_loc_y(short which_item) - Returns the y of the location of item which_item. which_item refers to the items ID in the scenario editor. If the item has either been picked up or non-existent, call returns -1. I assume that items afffected by move_item_on_spot() will still retain their original IDs. To be truthful, the main reason for this call for me is to have certain creatures go hostile when they 'notice' that the items are no longer there or cannot be located. Oh, and is just me, or is there NO call to check if an item of type x is on a certain spot? I see a call to check for an item of class x on spot, but no counterpart. -------------------- Thuryl: I mean, most of us don't go around consuming our own bodily fluids, no matter how delicious they are. ==== Alorael: War and violence would end if we all had each other's babies! ==== Drakefyre: Those are hideous mangos. Posts: 1415 | Registered: Thursday, March 27 2003 08:00 |
Warrior
Member # 2838
|
written Tuesday, August 3 2004 12:21
Profile
Also, is there a way to identify party items? -------------------- …../|,-‘`¯¯`\(o)_\,----,,,_……… …( `\(o),,_/` ¯ : o : :: o`-, … I'm under your bed. Posts: 118 | Registered: Wednesday, April 2 2003 08:00 |
Agent
Member # 2820
|
written Tuesday, August 3 2004 15:52
Profile
Not directly (of course skipping ID shops), no. There are many ugly workarounds, as you may imagine. Perhaps identify_item(int item_type) - Identifies all items of item_type currently in the party's possession. identify_item_with_class(int item_special_class) - Identifies all items with item_special_class in the party's possession. -------------------- Thuryl: I mean, most of us don't go around consuming our own bodily fluids, no matter how delicious they are. ==== Alorael: War and violence would end if we all had each other's babies! ==== Drakefyre: Those are hideous mangos. Posts: 1415 | Registered: Thursday, March 27 2003 08:00 |
Apprentice
Member # 4696
|
written Tuesday, August 3 2004 17:15
Profile
Here's one: recalculate_lighting(); Posts: 8 | Registered: Sunday, July 11 2004 07:00 |
Warrior
Member # 2838
|
written Tuesday, August 3 2004 18:01
Profile
quote:Maybe if we can identify the item that is in a slot? Identify_item(short which_char,short which_slot) - Identifies the item on which_slot of which_char. -------------------- …../|,-‘`¯¯`\(o)_\,----,,,_……… …( `\(o),,_/` ¯ : o : :: o`-, … I'm under your bed. Posts: 118 | Registered: Wednesday, April 2 2003 08:00 |
Agent
Member # 2820
|
written Tuesday, August 3 2004 19:36
Profile
The slot thing doesn't seem to be too useful. I mean, Why? Because you force the player to equip a cursed sword and he won't be able to identify it until you make some weird encounter for it? -------------------- Thuryl: I mean, most of us don't go around consuming our own bodily fluids, no matter how delicious they are. ==== Alorael: War and violence would end if we all had each other's babies! ==== Drakefyre: Those are hideous mangos. Posts: 1415 | Registered: Thursday, March 27 2003 08:00 |
Warrior
Member # 2838
|
written Tuesday, August 3 2004 21:04
Profile
Maybe, but I would like a call that would allow me to emulate the identify spell of the Exile series. -------------------- …../|,-‘`¯¯`\(o)_\,----,,,_……… …( `\(o),,_/` ¯ : o : :: o`-, … I'm under your bed. Posts: 118 | Registered: Wednesday, April 2 2003 08:00 |
Warrior
Member # 4202
|
written Wednesday, August 4 2004 13:17
Profile
Homepage
quote:I also. And, void put_party_outdoors(short what_section_x,short what_section_y,short loc_in_sector_x, short loc_in_sector_y) It can only be used in a town script. -------------------- Creator of the 3D Blades of Avernum Editor for Mac. Get it at Ingenious Isaac's Illusion, my web page. Better yet, get Battle for Wesnoth, a wonderful free TBS game. Posts: 192 | Registered: Sunday, April 4 2004 08:00 |
Off With Their Heads
Member # 4045
|
written Wednesday, August 4 2004 20:09
Profile
Homepage
Another thought: perhaps a call that would ask the player to target a creature in sight -- exactly like using a wand that requires a target, but without the wand. This would allow custom abilities to have targets, and it would also allow for cool RP actions like pointing ones finger at someone else. Something like... short request_target() - returns the number of a visible creature of the player's choice. Cannot be used outdoors. -------------------- Arancaytar: Every time you ask people to compare TM and Kel, you endanger the poor, fluffy kittens. Smoo: Get ready to face the walls! Ephesos: In conclusion, yarr. Kelandon's Pink and Pretty Page!!: the authorized location for all things by me The Archive of all released BoE scenarios ever Posts: 7968 | Registered: Saturday, February 28 2004 08:00 |
Law Bringer
Member # 2984
|
written Thursday, August 5 2004 02:38
Profile
Homepage
quote:So what happens when you use it in a script? It isn't mentioned in the documentation, so does the scripting engine recognize it if you include that command in a town script? -------------------- Encyclopaedia • Archives • Members • RSS [Topic / Forum] • Blog • Polaris • NaNoWriMo Look on my works, ye mighty, and despair. I have a love of woodwind instruments. Posts: 8752 | Registered: Wednesday, May 14 2003 07:00 |
Shock Trooper
Member # 4239
|
written Thursday, August 5 2004 03:51
Profile
No, it doesn't. It's C code, not Avernumscript. -------------------- There are two kinds of game players...those who are newbies, and those who were. Posts: 322 | Registered: Monday, April 12 2004 07:00 |
Law Bringer
Member # 2984
|
written Thursday, August 5 2004 08:58
Profile
Homepage
So how hard would it be for Jeff to include that call in Avernumscript as well? The game itself is based on C, isn't it? -------------------- Encyclopaedia • Archives • Members • RSS [Topic / Forum] • Blog • Polaris • NaNoWriMo Look on my works, ye mighty, and despair. I have a love of woodwind instruments. Posts: 8752 | Registered: Wednesday, May 14 2003 07:00 |
Agent
Member # 2820
|
written Thursday, August 5 2004 12:03
Profile
I'm pretty sure that a large portion of the game was written in C. -------------------- Thuryl: I mean, most of us don't go around consuming our own bodily fluids, no matter how delicious they are. ==== Alorael: War and violence would end if we all had each other's babies! ==== Drakefyre: Those are hideous mangos. Posts: 1415 | Registered: Thursday, March 27 2003 08:00 |
Shock Trooper
Member # 4557
|
written Thursday, August 5 2004 13:07
Profile
quote:the set_up_lights() function is used by the editor to put final touches on the current town's lighting array before saving. although its possible that this function also exists in Blades of Avernum, and that it could be linked to Avernum Script, i doubt it would have much use. Posts: 264 | Registered: Wednesday, June 16 2004 07:00 |
Agent
Member # 2820
|
written Thursday, August 5 2004 13:48
Profile
If what you say is true, Kernel, then the lighting points ARE NOT calculated when the town is entered like Jeff says in the manual, but rather in a matrix inside the town itself. This doesn't bode well for the future of this call because then it would require an engine change. Personally, I don't understand how calculating which terrain spots give off light every time there is a force_instant_terrain_redraw() could be a performance problem. -------------------- Thuryl: I mean, most of us don't go around consuming our own bodily fluids, no matter how delicious they are. ==== Alorael: War and violence would end if we all had each other's babies! ==== Drakefyre: Those are hideous mangos. Posts: 1415 | Registered: Thursday, March 27 2003 08:00 |
Shock Trooper
Member # 4557
|
written Friday, August 6 2004 04:03
Profile
the set_up_lights function itself is relatively short, and shouldn't be too hard to include into the engine (although it would be a performance dampener when called by Avernum Script). But it shouldn't be too hard to put in auxillary functions that recalculate lighting for certain terrain spots and maybe rectangles. This however could be too annoying for someone who would tends to use this function alot (whoever that may be), so Jeff would have to put in an auto check for it whenever the lighting array may have been comprimised by a terrain change or whatever. There can then be two more functions that enable and disable auto lighting, which again shouldn't be to0 hard. [ Friday, August 06, 2004 04:05: Message edited by: KernelKnowledge12 ] Posts: 264 | Registered: Wednesday, June 16 2004 07:00 |
Agent
Member # 2820
|
written Friday, August 6 2004 04:49
Profile
I feel as if the best way to do it is to have the change terrain calls also do a quick check to see if they emit light. If they do, then the game will recalculate on next turn or when there is a terrain redraw. -------------------- Thuryl: I mean, most of us don't go around consuming our own bodily fluids, no matter how delicious they are. ==== Alorael: War and violence would end if we all had each other's babies! ==== Drakefyre: Those are hideous mangos. Posts: 1415 | Registered: Thursday, March 27 2003 08:00 |
Shock Trooper
Member # 4557
|
written Friday, August 6 2004 05:56
Profile
My sentiments exactly. :) Posts: 264 | Registered: Wednesday, June 16 2004 07:00 |
The Establishment
Member # 6
|
written Wednesday, August 11 2004 20:15
Profile
Bump. Come on! I'm, sure we want other things. I give you guys one more week before closing this topic and sending it off. -------------------- Your flower power is no match for my glower power! Posts: 3726 | Registered: Tuesday, September 18 2001 07:00 |
Infiltrator
Member # 148
|
written Wednesday, August 11 2004 21:16
Profile
day_size(ticks_per_day) -------------------- My ego is bigger than yours. Posts: 480 | Registered: Thursday, October 11 2001 07:00 |
Off With Their Heads
Member # 4045
|
written Wednesday, August 11 2004 22:05
Profile
Homepage
*i, it might be helpful to group the requested new calls by category. I think the groups fall roughly along these lines: Advanced Dialog Box Calls * void add_dialog_pic(short which_pic) - Puts a dialog picture in the upper-left corner of the dialog. Animation and SFX Functions * void put_missile_animation(short source_x,short source_y,short dest_x,short dest_y,short which_sfx) - Missile animations. Terrain Script and Creature Calls * short get_creature_memory_cell(short which_char,short which_cell) - Returns the value of memory cell which_cell of creature which_char. * short get_terrain_memory_cell(short which_script,short which_cell) - Returns the value of memory cell which_cell of terrain script which_script. * cast_spell(mage_or_priest, which_spell, spell_level, is_forced) - For creature AI scripts only. Causes the creature to cast spell which_spell at spell_level depending on mage_or_priest regardless of mage or priest spell ability. If is_forced is 0, the spell is only cast if the creature has enough spell points, otherwise the spell is always cast. Shop Calls (a new category) * short shop_item_quantity(short which_shop,short which_item) - Returns the quantity of which_item still left in the shop that can be bought with enough gold, 0 if the item is not there. * void add_item_to_shop() - Allow negative values for modifying shops. * void change_shop_money(short which_shop,short how_much) - Changes (as in increment and decrement) the amount of money a shop can have for buying the players items. Similar to Geneforge. I'm not exactly sure how the 'unlimited money' switch should work, so here is just a simple suggestion. If the shop ends up having equal to or greater than 30000, the shop has unlimited money, but it can only be given that much with this call. Shops default to having unlimited money. * short shop_money(short which_shop) - Returns how much money which_shop has to buy the player's items. Returns 30000 if the shop has unlimited money. * void shop_selling_options(short which_shop,short selective_sell_category,short cant_sell_this_category,short can_resell) - Changes whether or not a shop will purchase certain kinds of goods, like in Exile. selective_sell_category is the variety of the item that is affected. The varieties are exactly the same as they are in the custom item scripts (like 1-handed,pants,ring,etc...). If cant_sell_this_category is 0, a shop may purchase items of the defined variety from the player. If 1, not. If can_resell is 0, the shop won't list the bought item back on its inventory for sale. This means that a shop can buy an item, but not resell it. All of the varieties default to being sellable by the player when possible, and can be resold by the merchant. The Passage of Time Calls * void calculate_ticks_forward(short num_ticks) - Makes the game calculate num_ticks forward, and of course will act upon these calculations. * void set_day(which_day) - Changes the day to which_day. * void set_year(which_year) - Changes the year of the scenario to year which_year. * void set_day_size(ticks_per_day) - Changes the length of the day. * void set_daylight(short how_much_light - I assume that the engine has 'levels' of daylight as the day progresses to determine how much to darken terrain and such. This call sets the amount of daylight to how_much_light. * short get_daylight() - Returns the current level or amount of daylight. * void stop_daylight_progress(short stop) - Starts or stops the progression of daylight throughout the scenario. If stop is 1, then the daylight will stay the exact same as it is when this call is used. Daylight will change if stop is 0. Advanced Item Management Calls * void identify_item(int item_type) - Identifies all items of item_type currently in the party's possession. * void identify_item_with_class(int item_special_class) - Identifies all items with item_special_class in the party's possession. * void identify_item(short which_char_or_group,short which_slot) - Identifies the item on which_slot of which_char. which_slot of -1 implies all items on that specific character or group becomes identified. Should probably only be used on party members. * short item_loc_x(short which_item) - Returns the x of the location of item which_item. which_item refers to the items ID in the scenario editor. If the item has either been picked up or non-existent, call returns -1. * short item_loc_y(short which_item) - Returns the y of the location of item which_item. which_item refers to the items ID in the scenario editor. If the item has either been picked up or non-existent, call returns -1. Basic Character Calls * void set_char_presence_status(short which_char,short which_status) - Sets the status checked in char_status (whether the character is dead, not present, etc), as opposed to the status checked in get_char_status (whether the character is blessed, hasted, etc) which is already settable. * short char_weight(short which_char) - Returns the weight of the character which_char. * get_immunity(short which_char, short immunity_type) - Returns a value from 0 to 100 depending on the assigned immunity value. * set_immunity(short which_char, short immunity_type, value) - Sets a value from 0 to 100 to the immunity_type. * void set_hp_regen(short which_char, short what_percentage) - Gets what percentage of which_char's maximum health is regained every tick. * void set_hp_regen(short which_char_or_group, short what_percentage) - Sets what percentage of which_char_or_group's maximum health is regained every tick. * short get_sp_regen(short which_char, short what_percentage) - Returns what percentage of which_char's maximum spell points are regained every tick. * short get_sp_regen(short which_char_or_group, short what_percentage) - Returns what percentage of which_char_or_group's maximum spell points are regained every tick. * void deduct_ap_from(short which_char, short how_much) - Counterpart to deduct_ap(), but you can affect other character's ap. Probably more useful in terrain scripts and custom abilities. The affected character's ap is reduced by how_much, which can be negative to add ap. Town Calls * void change_lighting(which_type) - Allows us to make the dungeon totally dark, fully lit, etc. * void add_light(what_amount) - Gives ability to change the light level (as from torches or Light spells). Can be negative. * short get_light(), returns the current light level (number of turns of light the party has left). * void set_up_lights() - Has the game refresh the lighting of a dungeon. * void put_party_outdoors(short what_section_x,short what_section_y,short loc_in_sector_x, short loc_in_sector_y) - Puts the party outdoors. It can only be used in a town script. * void set_town_status(short which_town,short new_status) - This call does not appear to do anything in the current version of BoA. * short town_status(short which_town) - Right now always returns 0, even if the town status is not 0. It should return 0, 1, 2, or 3. Grouping Calls * short group_member(short which_group,short which_member) - Returns the creature number that is in the which_member slot of which_group. So if which_member was 1 and which_group was 2, the call would return the first creature in group 2. Basic Script and IO Calls * short request_target() - Returns the number of a visible creature of the player's choice (like targeting a spell or a wand). Cannot be used outdoors. * run_imported_state(file_name, state_number) run_imported_state_continue(file_name, state_number) - Runs state state_number out of file file_name. The former call ends the current call whereas the latter finishes the given call. See set_state() and set_state_continue. Terrain Checking and Modification * short space_blocked(short loc x, short loc y) - Returns 1 if the space is blocked and 0 otherwise. This does check if the floor or terrain type is blocked (fl_blocked = 1 or te_full_move_block = 1), as well as if the floor was made blocked in the editor. Data storage and Manipulation (a new category) * vector v1(n) - Placed in the variables section. Creates a vector array of size (1xn). * matrix m1(m,n) - Placed in the variables section. Creates a matrix array of size (mxn) to store data. If full matrices are too much, vectors would be fine. * v1(i) - Returns the ith component of vector v1. * m1(i,j) - Returns the i,jth component of matrix m1. Miscellaneous Special Calls * short check_path_between_locs(short loc_x1, short loc_y1, short loc_x2, short loc_y2) - Has the pathing engine calculate whether or not a character at location {loc_x1,loc_y1} could reach location {loc_x2,loc_y2}. Returns 1 if a path is found, 0 if there is definitely no path, -1 if there was no path found because the pathing engine stopped before exhausting all possible nodes. Location and Distance Calls * short waypoint_x(short which_wayp) - Returns the x coordinate of waypoint which_wayp. * short waypoint_y(short which_wayp) - Returns the y coordinate of waypoint which_wayp. [ Thursday, August 19, 2004 11:43: Message edited by: Kelandon ] -------------------- Arancaytar: Every time you ask people to compare TM and Kel, you endanger the poor, fluffy kittens. Smoo: Get ready to face the walls! Ephesos: In conclusion, yarr. Kelandon's Pink and Pretty Page!!: the authorized location for all things by me The Archive of all released BoE scenarios ever Posts: 7968 | Registered: Saturday, February 28 2004 08:00 |
Warrior
Member # 4202
|
written Thursday, August 12 2004 00:33
Profile
Homepage
quote:I am a little confused by this wording, but I think it means how much light the party has, given by torches, etc? If so, we need: * short get_light(), returns the current light level (number of turns of light the party has left). It would also be useful to have a chart of what numbers of turns of light correspond to which light radii the party can have. [ Thursday, August 12, 2004 00:34: Message edited by: Isaac ] -------------------- Creator of the 3D Blades of Avernum Editor for Mac. Get it at Ingenious Isaac's Illusion, my web page. Better yet, get Battle for Wesnoth, a wonderful free TBS game. Posts: 192 | Registered: Sunday, April 4 2004 08:00 |
The Establishment
Member # 6
|
written Thursday, August 12 2004 07:57
Profile
Yes, very nice. Thank you, Kel. And yes, I do mean the lighting level that the party has produced. A get_light() command would be nice as well. -------------------- Your flower power is no match for my glower power! Posts: 3726 | Registered: Tuesday, September 18 2001 07:00 |
Agent
Member # 2820
|
written Thursday, August 12 2004 08:23
Profile
I'm not sure if this would be a *call*, but there should be a way to disable the 'Done' button that is at the bottom right corner of the dialogue screen when you are talking to creatures. That way you could force the player to go through the dialogue thread to the end. And this (could be under time or lighting): void set_daylight(short how_much_light - I assume that the engine has 'levels' of daylight as the day progresses to determine how much to darken terrain and such. This call sets the amount of daylight to how_much_light. short get_daylight() - Gets the current level or amount of daylight. void stop_daylight_progress(short stop) - This call starts or stops the progression of daylight throughout the scenario. If stop is 1, then the daylight will stay the exact same as it is when this call is used. Daylight will change if stop is 0. -------------------- Thuryl: I mean, most of us don't go around consuming our own bodily fluids, no matter how delicious they are. ==== Alorael: War and violence would end if we all had each other's babies! ==== Drakefyre: Those are hideous mangos. Posts: 1415 | Registered: Thursday, March 27 2003 08:00 |
Babelicious
Member # 3149
|
written Thursday, August 12 2004 12:33
Profile
Homepage
How about getting rid of the 64000-line limit for scripts? -------------------- I've got a pyg in a poke. Posts: 999 | Registered: Friday, June 27 2003 07:00 |