Jump to content

Things that work


Recommended Posts

... and things that don't.

 

A few things in the documentation say "Do this" or "Do that" but never explain what will happen if you do something else. I wanted to try a few of them and see if they worked. Some do, and some don't.

 

This will probably become an article someday, but for now, it's just a few notes I thought I'd share with everyone. For now it's mostly graphical things, but I'll come back and try other things later.

 

Giving custom graphics resource IDs outside the 500-599 range: works. I gave a custom monster graphic the ID 610 and then set the custom objects script to use graphic 610, and it worked fine. This may mean we can have a lot of custom graphics, not just 100.

Limitations: In BoE, there was some sort of crashing problem with too many graphics, though; I didn't try loading up the file with over 100 graphics and seeing if it still worked.

Also, certain graphics already use IDs outside this range. I will investigate this later to see which ones these are, so as not to give conflicting resources. For that matter, I will test what happens when you do give conflicting resources.

 

Using a PC graphics sheet for an NPC: does not work. The Louvre has a lot of custom PC graphics sheet, but you can't cut and paste them and use them as NPCs. You have to make them smaller. And setting cr_small_or_large_template to 1 didn't help. Will try other values later, but I doubt this will matter. (I'm guessing they are intended for hacking into the BoA graphics files and pasting directly, which *does* work.)

 

Using huge talking pics: does work. The docs say that these should be 64 by 64 or smaller, and that larger will work, but it's not recommended. There seems to be no problem with big ones, to a point. The height is limited to a little over 200, and I will test the width limitations later. Anything so large that it actually runs into the talking box is bad, though; it will move to the upper right-hand corner and cut off extra area.

 

Using the whole rectangle for a custom creature: does not work. You have to use a roughly diamond-shaped thing, like with terrains, or else the creature will spill over into other spaces, which really doesn't look right at all.

 

Having larger dialog pics than 400 by 400: does not work. It sticks them off to the side and cuts off the extra area.

 

Having more than 3 dialog choices: does not work. It ignores something labeled, say, add_dialog_choice(4,"Blah") but does not give an error.

 

More experiments later as I come up with things. Anyone else feel free to post strange things that you've tried that do or do not work.

 

EDIT: noticed a typo

Link to comment
Share on other sites

  • 3 weeks later...

(I am using Mac version 1.1)

 

Various experiments with removing characters from the party or adding them without using the NPCs joining party calls failed. Changing the members of group 0, the party's group, has no effect. However, I did discover an amusing thing: set_attitude(1000,10) makes the party Hostile, type A, so monsters don't attack them, but "friendly" characters do. The player can still talk to "friendlies" (assuming they have the basicnpc script), but not the normal enemies, though, and there are many other strange effects of it (you can slaughter "enemies" with impunity, if you're willing to dismiss the "do you really want to attack a non-hostile creature" dialog a lot).

 

erase_char() on a party member: works. The party member is permanently deleted. However, that character's items will appear on the ground the next time a town is entered. If you want to use this in a town, use Advanced Item Management Calls to deal with the character's items first: take_item_char_item() to put them on the ground (or just kill_char() before erasing him/her, if you don't mind a death animation, sound, etc.) or, if you want to be really evil, use destroy_char_item().

 

Further testing reveals that kill_char() works with any value listed in the char_status() documentation, including 0 for erased/nonexistent, but it can have strange behavior. Using 0 causes the same problem as above about not dropping the character's items. For all other values, it displays the death animation, but only the death sound for the standard ways of dying: Dead, Dust, and Stone. Using 1, which means alive and ok, drops the char's items and displays the death animation, but no sound. That character will be in the last death animation frame until something happens to change its displayed image, such as attacking. Don't use unused values such as 6, they produce strange results.

Link to comment
Share on other sites

A couple more BoA idiosyncracies:

 

* The overload limit on calls is 8000. After 8000 calls, BoA returns an error saying that you have an infinite loop. I produced this using the code:

 

j = 0;

k = 0;

while [j < 1]

{print_num[k]

k = k + 1; }

 

All parentheses are replaced with brackets, because UBB doesn't like parentheses, for some reason.

 

* BoA rounds down non-integers. For BoA, [25 / 4 == 6] is TRUE. Using %, you can get an exact value, though.

 

* Although the character _ shows up as " in dialogs, it does NOT in text bubbles or printed strings. Thus message_dialog["The dude says, _Yo!_",""] pops a dialog that says

The dude says, "Yo!"

but print_str["The dude says, _Yo!_"] prints the string

The dude says, _Yo!_

I think this is a bug, not just an idiosyncracy, because it means that we can't display double quotes in text bubbles or printed strings, so I e-mailed Jeff about it. I don't know if he will change this for a later version.

Link to comment
Share on other sites

Quote:
Originally written by Kelandon:
A couple more BoA idiosyncracies:

* The overload limit on calls is 8000. After 8000 calls, BoA returns an error saying that you have an infinite loop. I produced this using the code:

j = 0;
k = 0;
while [j < 1]
{print_num[k]
k = k + 1; }

All parentheses are replaced with brackets, because UBB doesn't like parentheses, for some reason.
I did some testing, and actually, the limit is 32000. Each instruction — [j < 1], print_num[k];, and k = k + 1; — increases the count towards overload by 1.
Link to comment
Share on other sites

*smacks forehead*

 

Duh. My bad. I think the limit is 24000, but I haven't done more testing and don't have time right now.

 

EDIT: Or possibly 16000... are you (Isaac) sure that it counts the "while" over and over again? Perhaps you should detail what testing you did.

 

EDIT 2: And actually, Khoth, I ran up against that limit already. The HLPM sets up shops specific to each level, and it ranges from level 5 to 100 (plus god). That means in one state, I put in enough calls to set up sixteen separate shops in twenty-one different ways, plus a series of dialog choices to indicate which of the twenty-one choices you wanted. This overloaded the system and I had to shorten it by setting up some of the shops differently.

 

And if I hit the limit already, I imagine real programmers will be hitting this limit from time to time.

Link to comment
Share on other sites

This is what I did:

Code:
int i = 0;//...while(TRUE) {i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;//... 800 of theseprint_big_str("number: ",i,"");i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;i = i + 1;//... 200 here}
The last number printed was 31800. If I put the print at the end of the while loop, the last number printed (31000) is less than that, therefore it doesn't get to when i = 32000. This is because of the additional instructions used in printing and 'while'.

 

As a theoretical reason why 32000 makes sense, it's a fairly round number close to, but within the limits of, 32767.

 

Yes, that probably means it counts the 'while' itself and its condition both as instructions each time through the loop. I just didn't notice before that 3 * 8000 = 24000, not 32000. :p

Link to comment
Share on other sites

  • 1 month later...
Quote:
Originally written by Kelandon:
but print_str["The dude says, _Yo!_"] prints the string
The dude says, _Yo!_
I think this is a bug, not just an idiosyncracy, because it means that we can't display double quotes in text bubbles or printed strings, so I e-mailed Jeff about it. I don't know if he will change this for a later version.
I hope Jeff fixes this soon! smile On the other hand, direct speech doesn't need quotes... smile
Link to comment
Share on other sites

There was a point in my scenario where I had the party mention the Empire, and then a character (who was from the utter depths of Avernum) said, "I have never heard of this 'Empire.' " It was supposed to be a text bubble. That's why I tried to have quotes in a text bubble.

 

For the record, te_anim_steps does work. Dahak is just wrong.

Link to comment
Share on other sites

Quote:
Originally written by Kelandon:
For the record, te_anim_steps does work. Dahak is just wrong.
Oh, I figured out the problem a while ago. I guess I should have mentioned it. The problem was I always play with the game speed set to fast. I didn't realize that fast game speeds disable the simmer effect and animations of terrain. Whoops.
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...