Jump to content
  • Announcements

    • A more clever marketplace

      Logging in   05/10/2017

      If you had an account and can't log in as of 5/9/17, this may be because of a change in logins with new forum software. You can log in using your publicly displayed name (not your username) or your email address and the password you used before.   If you have problems with this, please ask any of the mods or admins. 
Sign in to follow this  
Kelandon

BoA BUGS v6.0

Recommended Posts

Kelandon   

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.

Share this post


Link to post
Share on other sites
nikki.   

Yay! And the line "been out of the loop in BoA for a while" implies that you're back in the loop.

Share this post


Link to post
Share on other sites
Lilith   
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?

Share this post


Link to post
Share on other sites
nikki.   
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.

Share this post


Link to post
Share on other sites
Kelandon   

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.

Share this post


Link to post
Share on other sites
Ephesos   

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;		}

Share this post


Link to post
Share on other sites
Ephesos   

I don't think that one works properly. I recall Niemand did some testing with it a while ago.

Share this post


Link to post
Share on other sites
Smoo   

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.

Share this post


Link to post
Share on other sites

Just realized that the te_can_look_at bug isn't mentioned here. Basically, the attribute doesn't work as expected unless you use the slots mentioned by Ephesos here.

 

In other news, guess who just replaced fifteen terrain types that together covered three quarters of a dungeon?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
Niemand   

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."

Share this post


Link to post
Share on other sites

Health and Spell Energy are not changed via item special abilities, it might just be a case of secondary skills generally are never changed.

Share this post


Link to post
Share on other sites
Niemand   

I believe that that is the case. And then there's Dread Curse, which is just a special case.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
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);				}			}		}

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
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".

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×