Jump to content

BoA BUGS v6.0


Kelandon

Recommended Posts

I don't know if this is common knowledge (been out of the loop in BoA for a while), but you can cause an Unhandled Exception in Windows if you erase a character who doesn't exist, even though you don't get an error if you do the same on a Mac.

 

I think this is the cause of some of those lingering UE's in Exodus. A player was finally able to help me track down one and isolate the problematic section of code. As soon as he verifies a fix, I'll have out a new version of Exodus that should fix at least some of the UE's.

Link to comment
Share on other sites

Originally Posted By: Thuryl
Originally Posted By: Archmage AlNIK
Yay! And the line "been out of the loop in BoA for a while" implies that you're back in the loop.


Does saying that someone's been dead for a while imply that they're now alive?


It should.

Of course, with Kel's post also saying that he had been working on bug fixes, it's a fair assumption to make that he is working with BoA.
Link to comment
Share on other sites

I didn't actually set out to fix any bugs in Exodus. I just got a bug report from a player that was specific enough that I could easily locate the problem. And I guess Jeff's suggestion some while back about what causes UE's gave me a better idea of what to look for.

 

So I wouldn't get over-excited.

Link to comment
Share on other sites

  • 1 month later...
  • 10 months later...

The call change_spell_level() will show an update for NPCs learning spells, but only on Windows. Example:

 

"(NPC name) learned Fireblast at level 3."

 

...this only appears on Windows. On Mac, the text only appears if the NPC in question can't learn the spell due to insufficient skills.

 

Best way to deal with it (really, the only way), is to simply clear the text box afterwards:

 

Code:
	i = 0;	while (i < 64) {		print_str(" ");		i = i + 1;		}
Link to comment
Share on other sites

No, they work. I have used them before. The documentation is a bit unclear, though.

 

From the Appendix:

 

short friends_nearby(short range) - This can only be called in a creature’s script. Returns the number of characters within range spaces that the character can see and which are friendly towards the creature in question.

 

Boldness is my clarification. The same thing applies to enemies_nearby too, naturally.

Link to comment
Share on other sites

  • 8 months later...
  • 6 months later...

All BoA Editors create new creatures with an Event of 0, ditto the clear creature function "void creature_start_type::clear_creature_start_type()" sets "attached_event = 0;".

Yet the documentation makes 0 one of the numbers for a regular event:

Event Calls

short day_event_happened(short which_event)

Returns -1 if the event which_event (which is from 0 to 9) has not happened, or the day it happened if it has happened.

void set_event_happened(short which_event,short what_day)

Records that event which_event (a number from 0 to 9) happened on day what_day (you'll probably pass what_day_of_scenario()) to this.

 

Then the Editor screen says that "Event Creature Linked To (-1 = none)". Best solution is to preserve compatibility with previous scenarios so I will change this to "(0 = none)".

 

Editor also allows you to give illegal values to certain variables in the monster editing screen like a hidden class of 330.

Link to comment
Share on other sites

The links in the OP no longer work, and I really don't know what the dialogue box error entails. It sounds terrifying.

 

Also, the Sanctuary status is a bit wonky. I'm not sure how it's exactly supposed to work, but sometimes you can randomly break through an enemy's sanctuary. I'm not sure if enemies can target PCs with sanctuary.

Link to comment
Share on other sites

If you're referring to what I think you are, I luckily have a record of Kel's example. From the reference material I've slowly been writing:

 

"run_dialog also returns the number of the choice made by the player, with some complication: The number returned will be 1, 2, or 3, being one plus the index of the selected choice. However a known issue is that the code:

Code:
     reset_dialog();     add_dialog_str(0,"1, 2, or 3?",0);     add_dialog_choice(0,"1");     add_dialog_choice(2,"3");     print_num(run_dialog(1));     //code example by Kelandon

will actually print '2' if the player selects the choice whose label is "3". This can be a tricky pitfall, so if your dialog setup process if using logic to decide which choices to display, test carefully that the return values from run_dialog are what you think they are in all cases."

Link to comment
Share on other sites

Quote:
From what I've gathered, confused/charmed party members are treated as "friendly" to enemies by the call char_attitude_to_char()

Yes, this seems to be the case in my experience; these statuses effectively change a creature's attitude.

Quote:
What this means is that anything written after do_attack() is ignored. This makes it difficult to do things like check whether or not a party member was hit by an attack.

This is not true, as far as I know. The way (I think) it works is this: The game decides that it is creature X's turn. So, creature X's script will be run repeatedly, each time resuming from the state in which it ended (either by reaching the end of that state or by jumping to it via set_state()). This continues as long as the creature has AP, and do_attack() is just one way that the creature's AP can be decreased and cause the loop to end.
Link to comment
Share on other sites

Originally Posted By: Niemand
Quote:
From what I've gathered, confused/charmed party members are treated as "friendly" to enemies by the call char_attitude_to_char()

Yes, this seems to be the case in my experience; these statuses effectively change a creature's attitude.

Quote:
What this means is that anything written after do_attack() is ignored. This makes it difficult to do things like check whether or not a party member was hit by an attack.

This is not true, as far as I know. The way (I think) it works is this: The game decides that it is creature X's turn. So, creature X's script will be run repeatedly, each time resuming from the state in which it ended (either by reaching the end of that state or by jumping to it via set_state()). This continues as long as the creature has AP, and do_attack() is just one way that the creature's AP can be decreased and cause the loop to end.

I wish I still had the example to show you, but I changed the script to compensate. Essentially it was set up something like this:

Code:
beginstate 3;	if(target_ok() == FALSE)		set_state(START_STATE);	target = get_target();	variable = get_health(target);	do_attack();	if(variable > get_health(target)){		do stuff (i.e poison the target)		}break;

Maybe I screwed something up like having the ">" in the wrong direction, but it otherwise ran when I put the code before the do_attack();. I'm going to be pissed if that was the case, because I had to make a pretty big workaround.

I'll have to check again.

EDIT: I just tested this with a new script, and it seems that I was wrong, except about the part where I must have put the ">" in the wrong direction. Poop.
Link to comment
Share on other sites

Originally Posted By: Enraged Slith
Characters killed with the call kill_char() give exp to the party, regardless of their attitude. This makes using kill_char() incredibly arduous to use during cut scenes.

Maybe I'm misunderstanding you, and you're just reporting this bug. But if you needed to kill someone during a cutscene, the workaround would be to use erase_char(char_number), I believe.
Link to comment
Share on other sites

Originally Posted By: Metatron
Originally Posted By: Enraged Slith
Characters killed with the call kill_char() give exp to the party, regardless of their attitude. This makes using kill_char() incredibly arduous to use during cut scenes.

Maybe I'm misunderstanding you, and you're just reporting this bug. But if you needed to kill someone during a cutscene, the workaround would be to use erase_char(char_number), I believe.

erase_char() doesn't perform the same functions as kill_char(). It could, but it would require a lot of extra work.

EDIT: char_take_item(my_number(),insert item here); isn't #@%&ing working in creature scripts! It keeps giving me a "peculiar error: undefined function."

Here's the piece of the offensive code, that works fine except for the char_take_item() bit. Maybe, I'm doing something wrong?
Code:
	if(my_ap() > 0){ //heal		if(char_has_item(my_number(),228) == TRUE){			if(get_health(ME) < get_max_health(ME)){				heal_char(ME,75);				play_sound(56);				clear_buffer();				append_char_name(ME);				append_string(" quaffs a healing elixir!");				get_buffer_text(potion);				print_str_color(potion,2);				put_sparkles_on_char(ME,3,5);				run_animation_sound(166);				char_take_item(my_number(),228);				deduct_ap(3);				}			}		}
Link to comment
Share on other sites

I seem to remember that 'char_take_item' had problems also. I have used 'destroy_char_item' to remove items from characters in a character script in the past. Since it is slot based, you'll need to do something like the following to get the slot the item is in (untested):

Code:
slt = 0; // or 13 if skipping equipped itemsitm = 0;while ((slt < 40) && (itm != 228)) {	itm = item_type_in_slot(my_number(), slt);	if (itm != 228) { slt = slt + 1; }}if (slt < 40) { destroy_char_item(my_number(), slt); }

I don't recall if the destroy_char_item will remove 1 of stacked items or all, so this might not be the best way if you have multiple items you're using one of.

Link to comment
Share on other sites

Beautiful workaround Mike, thank you so much. We should probably add that to the tips and tricks section in case the problem ever crops up again.

 

I just discovered a funny little bug where if your combat turn ends while trying to give a party member an item when they're too far away, the item is still held in your cursor when starting someone else's turn. You can then place the item in their inventory.

Link to comment
Share on other sites

  • 7 months later...
Originally Posted By: Celtic Minstrel
Exactly what do you mean by that?


This is how these two statuses appear in the documentation:
1 - Bless/Curse. If positive, character is blessed. If negative, cursed.
2 - Shield/Weaken. If positive, character is shielded. If negative, weakened.

In my experience, Bless/Curse is actually "2" and Shield/Weaken is "1".
Link to comment
Share on other sites

  • 1 year later...

Possible bug: I found that when making stores that sell skills, they apparently are bugged after a certain shop number. I had shops 32 and 33 sell skills in Mage and Priest spells, and when I went to those shops, the skills were free, whereas shop 2 charged money for the skills.

 

Maybe you already know this, but I couldn't find the answer to this problem until I figured it out.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...