Profile for Walker White

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

Recent posts

Pages

AuthorRecent posts
Am I missing something? (food items) in Blades of Avernum
Apprentice
Member # 4127
Profile #9
quote:
Originally written by Newtfeet:

Remind me why we have those "begindefineitem 450" and "import = 450" lines in there.

Edit: And crap, I double posted and the first post is complete nonsense.

Simple. I copied Bread into slot 450 which is the first empty item slot. I then cleared slot 4 (you can redefine ANY item slot you want) so that I could alter it. I loaded in all the data for Bread (which is now in slot 450) and added the extra definition to give it a special class.

Rinse, lather, repeat.

You cannot just say begindefineitem 4 as that will erase all the old Bread information. And I did not want to leave Bread as item 450, as then I would have two different types of Bread.
Posts: 48 | Registered: Saturday, March 20 2004 08:00
Am I missing something? (food items) in Blades of Avernum Editor
Apprentice
Member # 4127
Profile #7
quote:
Originally written by Newtfeet:

What is that begindefinecreature bit in there? What does that have to do with items?
Heh. The danger of not reading before I post. This was a mistake and I editted while you posted.

I copied the example from the Chitrach level bump in VoDT (which is creature, not item). I forgot to make definecreature as defineitem everywhere.
Posts: 48 | Registered: Saturday, March 20 2004 08:00
Am I missing something? (food items) in Blades of Avernum
Apprentice
Member # 4127
Profile #7
quote:
Originally written by Newtfeet:

What is that begindefinecreature bit in there? What does that have to do with items?
Heh. The danger of not reading before I post. This was a mistake and I editted while you posted.

I copied the example from the Chitrach level bump in VoDT (which is creature, not item). I forgot to make definecreature as defineitem everywhere.
Posts: 48 | Registered: Saturday, March 20 2004 08:00
Aggravating Bug in Blades of Avernum Editor
Apprentice
Member # 4127
Profile #2
It won't be a problem if Jeff is a good programming language designer and does not eliminate the old API, just adding new ones. We will be fine.

It may affect the scenario design contest. But then, by waiting until the Windows one is done, he will probably level the playing field a bit there.
Posts: 48 | Registered: Saturday, March 20 2004 08:00
Aggravating Bug in Blades of Avernum
Apprentice
Member # 4127
Profile #2
It won't be a problem if Jeff is a good programming language designer and does not eliminate the old API, just adding new ones. We will be fine.

It may affect the scenario design contest. But then, by waiting until the Windows one is done, he will probably level the playing field a bit there.
Posts: 48 | Registered: Saturday, March 20 2004 08:00
Am I missing something? (food items) in Blades of Avernum Editor
Apprentice
Member # 4127
Profile #4
quote:
Originally written by spyderbytes:

Obviously, the option should only come up in dialog if someone in the party actually has a food item. But I don't care WHAT particular food item (fish, bread, steak, whatever) it might be.

So... do I have to check for each food item the party MIGHT have individually (until I find one or work through every possible food item), or is there an easy way?

-spdyerbytes

You will have to change food and give it a special class (say 0). To do this, in your scenario data file, do things like this

// Give Bread special class 0
begindefineitem 450;
import = 4;
begindefineitem 4;
import = 450;
it_special_class = 0;

// Give Mushrooms special class 0
begindefineitem 450;
import = 5;
begindefineitem 5;
import = 450;
it_special_class = 0;
and so on. If you do this for all the foods, you can use the item_of_class functions everywhere to query for food.

Edit: Newtfeet beat me to the post.

[ Tuesday, April 06, 2004 13:27: Message edited by: Walker White ]
Posts: 48 | Registered: Saturday, March 20 2004 08:00
Am I missing something? (food items) in Blades of Avernum
Apprentice
Member # 4127
Profile #4
quote:
Originally written by spyderbytes:

Obviously, the option should only come up in dialog if someone in the party actually has a food item. But I don't care WHAT particular food item (fish, bread, steak, whatever) it might be.

So... do I have to check for each food item the party MIGHT have individually (until I find one or work through every possible food item), or is there an easy way?

-spdyerbytes

You will have to change food and give it a special class (say 0). To do this, in your scenario data file, do things like this

// Give Bread special class 0
begindefineitem 450;
import = 4;
begindefineitem 4;
import = 450;
it_special_class = 0;

// Give Mushrooms special class 0
begindefineitem 450;
import = 5;
begindefineitem 5;
import = 450;
it_special_class = 0;
and so on. If you do this for all the foods, you can use the item_of_class functions everywhere to query for food.

Edit: Newtfeet beat me to the post.

[ Tuesday, April 06, 2004 13:27: Message edited by: Walker White ]
Posts: 48 | Registered: Saturday, March 20 2004 08:00
Post yer monster scripts here in Blades of Avernum Editor
Apprentice
Member # 4127
Profile #31
quote:
Originally written by wizardr6:

quote:
Walker White:
It would be nice, however, to have !x available for making x = 1 if 0 and 0 if anything else. Right now that requires an if-branch.
Or you could do:
x = 1 - x

Shorts can be negative. So if x = 2, x = 1 - x makes -1, not 0.
Posts: 48 | Registered: Saturday, March 20 2004 08:00
Post yer monster scripts here in Blades of Avernum
Apprentice
Member # 4127
Profile #31
quote:
Originally written by wizardr6:

quote:
Walker White:
It would be nice, however, to have !x available for making x = 1 if 0 and 0 if anything else. Right now that requires an if-branch.
Or you could do:
x = 1 - x

Shorts can be negative. So if x = 2, x = 1 - x makes -1, not 0.
Posts: 48 | Registered: Saturday, March 20 2004 08:00
AvernumScript Ideosyncracies in Blades of Avernum Editor
Apprentice
Member # 4127
Profile #2
quote:
Originally written by wizardr6:

Maybe the error is from a missing parenthesis? There should be a ")" before the "<=2".
Oh. That's a typo in the post. It's okay in the actual script (which is actually more complicated. Compare

if (who_hit_me() >= 0 && dist_to_char(who_hit_me() <= 2)) {

which has problems with

if (who_hit_me() >= 0) {
if (dist_to_char(who_hit_me() <= 2)) {


which works. I have tested the function. It's a short-circuit issue.
Posts: 48 | Registered: Saturday, March 20 2004 08:00
AvernumScript Ideosyncracies in Blades of Avernum
Apprentice
Member # 4127
Profile #2
quote:
Originally written by wizardr6:

Maybe the error is from a missing parenthesis? There should be a ")" before the "<=2".
Oh. That's a typo in the post. It's okay in the actual script (which is actually more complicated. Compare

if (who_hit_me() >= 0 && dist_to_char(who_hit_me() <= 2)) {

which has problems with

if (who_hit_me() >= 0) {
if (dist_to_char(who_hit_me() <= 2)) {


which works. I have tested the function. It's a short-circuit issue.
Posts: 48 | Registered: Saturday, March 20 2004 08:00
Blades Out Fight in Blades of Avernum Editor
Apprentice
Member # 4127
Profile #2
quote:
Originally written by Newtfeet:

Even with those, I'm not sure if scripting a outdoor combat town would work.
You are right. I just tried it on the original, and nothing. Oh well, so much for that idea.

[ Tuesday, April 06, 2004 06:37: Message edited by: Walker White ]
Posts: 48 | Registered: Saturday, March 20 2004 08:00
Blades Out Fight in Blades of Avernum
Apprentice
Member # 4127
Profile #2
quote:
Originally written by Newtfeet:

Even with those, I'm not sure if scripting a outdoor combat town would work.
You are right. I just tried it on the original, and nothing. Oh well, so much for that idea.

[ Tuesday, April 06, 2004 06:37: Message edited by: Walker White ]
Posts: 48 | Registered: Saturday, March 20 2004 08:00
Calls that we wish existed in Blades of Avernum Editor
Apprentice
Member # 4127
Profile #19
Thought of two more:

item_uses_in_slot(short which_char, short which_slot); and item_uses_on_loc(short loc_x, short loc_y). Returns the number of charges of the requisite specific item (not an item type).alter_item_uses_in_slot(short which_char, short which_slot, short amount); and alter_item_uses_on_loc(short loc_x, short loc_y, short amount). Recharges or drains item.EDIT: I just realized that there can be multiple items on a space. So only the item_uses_in_slot() [there can only be one wand in a slot] will work for these calls. The location ones are right out.

[ Tuesday, April 06, 2004 15:02: Message edited by: Walker White ]
Posts: 48 | Registered: Saturday, March 20 2004 08:00
Calls that we wish existed in Blades of Avernum
Apprentice
Member # 4127
Profile #19
Thought of two more:

item_uses_in_slot(short which_char, short which_slot); and item_uses_on_loc(short loc_x, short loc_y). Returns the number of charges of the requisite specific item (not an item type).alter_item_uses_in_slot(short which_char, short which_slot, short amount); and alter_item_uses_on_loc(short loc_x, short loc_y, short amount). Recharges or drains item.EDIT: I just realized that there can be multiple items on a space. So only the item_uses_in_slot() [there can only be one wand in a slot] will work for these calls. The location ones are right out.

[ Tuesday, April 06, 2004 15:02: Message edited by: Walker White ]
Posts: 48 | Registered: Saturday, March 20 2004 08:00
intended behavior? (damage_near_loc) in Blades of Avernum Editor
Apprentice
Member # 4127
Profile #4
quote:
Originally written by spyderbytes:

You wouldn't need AoE spells to have what (to me) would be correct behavior for this call. Seems to me it would just be a check with the pathfinding algorithm to see if the path from the damager's current loc to the loc in question is range squares or less.
The simplest solution is probably just to use the can_see calls for area effect attacks. If you cannot see the square, then some terrain is blocking it. This differs from the pathfinding as it would allow stuff to go through windows (which is probably a desirable effect).
Posts: 48 | Registered: Saturday, March 20 2004 08:00
intended behavior? (damage_near_loc) in Blades of Avernum
Apprentice
Member # 4127
Profile #4
quote:
Originally written by spyderbytes:

You wouldn't need AoE spells to have what (to me) would be correct behavior for this call. Seems to me it would just be a check with the pathfinding algorithm to see if the path from the damager's current loc to the loc in question is range squares or less.
The simplest solution is probably just to use the can_see calls for area effect attacks. If you cannot see the square, then some terrain is blocking it. This differs from the pathfinding as it would allow stuff to go through windows (which is probably a desirable effect).
Posts: 48 | Registered: Saturday, March 20 2004 08:00
Blades Out Fight in Blades of Avernum Editor
Apprentice
Member # 4127
Profile #0
To anyone who knows:

If I copy Blades of Avernum Out Fight and stick it into my scenario folder, will it use the copy or the original in the Files folder for the random encounter towns? Initial experimentation suggest that the original is loaded and the copy is ignored. However, I just want to be sure.

In a nutshell, it would be nice to script the outdoor encounter towns without replacing the original Out Fight (which would script all scenarios: Bad!).
Posts: 48 | Registered: Saturday, March 20 2004 08:00
Blades Out Fight in Blades of Avernum
Apprentice
Member # 4127
Profile #0
To anyone who knows:

If I copy Blades of Avernum Out Fight and stick it into my scenario folder, will it use the copy or the original in the Files folder for the random encounter towns? Initial experimentation suggest that the original is loaded and the copy is ignored. However, I just want to be sure.

In a nutshell, it would be nice to script the outdoor encounter towns without replacing the original Out Fight (which would script all scenarios: Bad!).
Posts: 48 | Registered: Saturday, March 20 2004 08:00
char_on_spot...? in Blades of Avernum Editor
Apprentice
Member # 4127
Profile #11
One more thing. To make it a little more efficient, you want to write (now that I know the UBB for code)

beginstate 31;
if (char_on_loc(19,36) >= 0 && char_on_loc(19,36) <= 3) {
print_str("You are standing on the mat.");
} else {
print_str("You are not standing on the mat.");
}
break;

Posts: 48 | Registered: Saturday, March 20 2004 08:00
char_on_spot...? in Blades of Avernum
Apprentice
Member # 4127
Profile #11
One more thing. To make it a little more efficient, you want to write (now that I know the UBB for code)

beginstate 31;
if (char_on_loc(19,36) >= 0 && char_on_loc(19,36) <= 3) {
print_str("You are standing on the mat.");
} else {
print_str("You are not standing on the mat.");
}
break;

Posts: 48 | Registered: Saturday, March 20 2004 08:00
Calls that we wish existed in Blades of Avernum Editor
Apprentice
Member # 4127
Profile #17
quote:
Originally written by Drakefyre:

For creature AI scripts - several calls that would be able to control where the creature moves, get the next move of the creature, tell it to acquire a next move randomly, etc.

It's possible now, but only with horrible, horrible workarounds.

What are you asking for here? Are you wanting the creature script to be called in the middle of movement and tell you the next square in the path computed by the path-finding algorithm? Or is it something else? Because the former would be really expensive.

quote:

Also, the ability to block a space only to one character or group.

That will almost certainly break the path-finding algorithms; badly. Yeah, it would be great, but I doubt we will ever see that.
Posts: 48 | Registered: Saturday, March 20 2004 08:00
Calls that we wish existed in Blades of Avernum
Apprentice
Member # 4127
Profile #17
quote:
Originally written by Drakefyre:

For creature AI scripts - several calls that would be able to control where the creature moves, get the next move of the creature, tell it to acquire a next move randomly, etc.

It's possible now, but only with horrible, horrible workarounds.

What are you asking for here? Are you wanting the creature script to be called in the middle of movement and tell you the next square in the path computed by the path-finding algorithm? Or is it something else? Because the former would be really expensive.

quote:

Also, the ability to block a space only to one character or group.

That will almost certainly break the path-finding algorithms; badly. Yeah, it would be great, but I doubt we will ever see that.
Posts: 48 | Registered: Saturday, March 20 2004 08:00
Post yer monster scripts here in Blades of Avernum Editor
Apprentice
Member # 4127
Profile #29
quote:
Originally written by Drakefyre:

Well, it's not hard to fake the not operator with excessive use of DeMorgan's laws.
True. I was thinking that you cannot do it in unary instances such as !char_ok(x), but I guess in all those cases you just do (char_ok(x) == FALSE). So maybe that's not too bad.

It would be nice, however, to have !x available for making x = 1 if 0 and 0 if anything else. Right now that requires an if-branch.
Posts: 48 | Registered: Saturday, March 20 2004 08:00
Post yer monster scripts here in Blades of Avernum
Apprentice
Member # 4127
Profile #29
quote:
Originally written by Drakefyre:

Well, it's not hard to fake the not operator with excessive use of DeMorgan's laws.
True. I was thinking that you cannot do it in unary instances such as !char_ok(x), but I guess in all those cases you just do (char_ok(x) == FALSE). So maybe that's not too bad.

It would be nice, however, to have !x available for making x = 1 if 0 and 0 if anything else. Right now that requires an if-branch.
Posts: 48 | Registered: Saturday, March 20 2004 08:00

Pages