Things that work

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: Things that work
Off With Their Heads
Member # 4045
Profile Homepage #0
... 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

[ Wednesday, June 02, 2004 11:23: 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 # 4186
Profile #1
It's always dangerous to exploit non documented features, it could not work at next release.
Posts: 175 | Registered: Friday, April 2 2004 08:00
Warrior
Member # 4202
Profile Homepage #2
(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.

--------------------
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
Profile Homepage #3
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.

--------------------
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
Profile Homepage #4
quote:
Originally written by Kelandon:

All parentheses are replaced with brackets, because UBB doesn't like parentheses, for some reason.
That's what the CODE tag is for:
message_dialog("The dude says, _Yo!_","")

--------------------
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
Profile Homepage #5
*notes this down for future reference*

EDIT: It does make the text rather small. Oh well.

[ Wednesday, June 02, 2004 12:20: 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
Profile Homepage #6
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.

[ Saturday, June 05, 2004 10:59: 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
...b10010b...
Member # 869
Profile Homepage #7
Wouldn't that make it 24000, then? 8000 * 3 = 24000.

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00
Post Navel Trauma ^_^
Member # 67
Profile Homepage #8
I'd guess that it is actually 32,767 instructions of some sort. It's just not quite clear what counts as an instruction.

But whatever it is, it's plenty.

--------------------
Barcoorah: I even did it to a big dorset ram.

New Mac BoE
Posts: 1798 | Registered: Thursday, October 4 2001 07:00
Off With Their Heads
Member # 4045
Profile Homepage #9
*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.

[ Saturday, June 05, 2004 13:55: 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
...b10010b...
Member # 869
Profile Homepage #10
It might actually count the "while" as two instructions (essentially, a conditional and a goto), which would make it 32000. I don't know how Jeff is doing it, though, and I'm not a programmer anyway, so I don't know how plausible this is.

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00
Warrior
Member # 4202
Profile Homepage #11
This is what I did:
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 these

print_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

--------------------
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
BoE Posse
Member # 112
Profile #12
Two things that don't work: As mentioned elsewhere, the Clear All Items command, and the call te_can_look_at=0.

--------------------
Rate my scenarios!

Areni
Revenge
To Live in Fear
Deadly Goblins
Ugantan Nightmare
Isle of Boredom
Posts: 1423 | Registered: Sunday, October 7 2001 07:00
Off With Their Heads
Member # 4045
Profile Homepage #13
I believe those are bugs, not idiosyncracies. Still worth noting, though.

--------------------
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
Infiltrator
Member # 148
Profile #14
Another thing that doesn't work:

te_anim_steps

It does nothing.

No matter what is put in, no animation occurs.

--------------------
My ego is bigger than yours.
Posts: 480 | Registered: Thursday, October 11 2001 07:00
Infiltrator
Member # 4637
Profile Homepage #15
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! :) On the other hand, direct speech doesn't need quotes... :)

--------------------
Visit the Blades of Avernum Center
and the Beta Testing Center

--------------
"Beware lest anyone cheat you through philosophy and empty deceit, according to the tradition of men, according to the basic principles of the world, and not according to Christ." Colossians 2:6-9
Posts: 483 | Registered: Tuesday, June 29 2004 07:00
Off With Their Heads
Member # 4045
Profile Homepage #16
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.

--------------------
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
Agent
Member # 2820
Profile #17
I wonder if the last parameter in the place_monster() call can be a number other than 0 or 1. I have this strange feeling that you can set the summon level on the spawned creatures by changing this number.

--------------------
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
Off With Their Heads
Member # 4045
Profile Homepage #18
Try it and tell us what happens! That was the point of this topic, originally.

--------------------
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
Infiltrator
Member # 148
Profile #19
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.

--------------------
My ego is bigger than yours.
Posts: 480 | Registered: Thursday, October 11 2001 07:00