Profile for spyderbytes

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
Calls that we wish existed in Blades of Avernum Editor
Shock Trooper
Member # 4180
Profile #20
has_item_of_variety(short which_variety, short take_item)

Just like has_item_of_class, but works with variety (food, armor, weapon, object, etc.).

-spyderbytes

--------------------
-spyderbytes
Posts: 200 | Registered: Wednesday, March 31 2004 08:00
Calls that we wish existed in Blades of Avernum
Shock Trooper
Member # 4180
Profile #20
has_item_of_variety(short which_variety, short take_item)

Just like has_item_of_class, but works with variety (food, armor, weapon, object, etc.).

-spyderbytes

--------------------
-spyderbytes
Posts: 200 | Registered: Wednesday, March 31 2004 08:00
Am I missing something? (food items) in Blades of Avernum Editor
Shock Trooper
Member # 4180
Profile #12
Yikes! That's way more work than the importance of this exchange to my scenario. :) I'll either figure out something different or make the NPC picky about what he eats. ;)

I would have thought there would be a simple single call for this, since Jeff is most likely grouping all food together somewhere internally (to facilitate taking some when the party sleeps or enters certain terrain types or whatever). I mean, if all food has the same value for 'variety', he's bound to have some way to query inventory by variety, I would think. It's likely just not public.

Thanks for explaining how to do it, though. :)

-spyderbytes

--------------------
-spyderbytes
Posts: 200 | Registered: Wednesday, March 31 2004 08:00
Am I missing something? (food items) in Blades of Avernum
Shock Trooper
Member # 4180
Profile #12
Yikes! That's way more work than the importance of this exchange to my scenario. :) I'll either figure out something different or make the NPC picky about what he eats. ;)

I would have thought there would be a simple single call for this, since Jeff is most likely grouping all food together somewhere internally (to facilitate taking some when the party sleeps or enters certain terrain types or whatever). I mean, if all food has the same value for 'variety', he's bound to have some way to query inventory by variety, I would think. It's likely just not public.

Thanks for explaining how to do it, though. :)

-spyderbytes

--------------------
-spyderbytes
Posts: 200 | Registered: Wednesday, March 31 2004 08:00
Am I missing something? (food items) in Blades of Avernum Editor
Shock Trooper
Member # 4180
Profile #2
Umm... that doesn't answer my question (perhaps I asked it badly?). Food items do show up in inventory. What I'm wanting to do is to give the player a choice to give a (generic) food item to a NPC.

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

--------------------
-spyderbytes
Posts: 200 | Registered: Wednesday, March 31 2004 08:00
Am I missing something? (food items) in Blades of Avernum
Shock Trooper
Member # 4180
Profile #2
Umm... that doesn't answer my question (perhaps I asked it badly?). Food items do show up in inventory. What I'm wanting to do is to give the player a choice to give a (generic) food item to a NPC.

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

--------------------
-spyderbytes
Posts: 200 | Registered: Wednesday, March 31 2004 08:00
Am I missing something? (food items) in Blades of Avernum Editor
Shock Trooper
Member # 4180
Profile #0
Is there an easy way to check if the party has any food items and take one away? Without checking for each individual type of food item, that is.

-spyderbytes

--------------------
-spyderbytes
Posts: 200 | Registered: Wednesday, March 31 2004 08:00
Am I missing something? (food items) in Blades of Avernum
Shock Trooper
Member # 4180
Profile #0
Is there an easy way to check if the party has any food items and take one away? Without checking for each individual type of food item, that is.

-spyderbytes

--------------------
-spyderbytes
Posts: 200 | Registered: Wednesday, March 31 2004 08:00
BoA Editor Cookbook in Blades of Avernum Editor
Shock Trooper
Member # 4180
Profile #4
quote:
Originally written by Drakefyre:

It's usually spelled 'dialogue'. Dialog boxes are boxes that pop up with options for you to choose.
Umm, not to quibble (OK, maybe I'm quibbling just a bit ;) ), but AFAIK, 'dialogue' is simply an archaic spelling of 'dialog' (the modern, more accepted spelling). They're called dialog boxes because it's a metaphor for carrying on a conversation between you and your computer. :)

To the subject at hand: this looks terrific! Thanks for doing this! :)

-spyderbytes

--------------------
-spyderbytes
Posts: 200 | Registered: Wednesday, March 31 2004 08:00
BoA Editor Cookbook in Blades of Avernum
Shock Trooper
Member # 4180
Profile #4
quote:
Originally written by Drakefyre:

It's usually spelled 'dialogue'. Dialog boxes are boxes that pop up with options for you to choose.
Umm, not to quibble (OK, maybe I'm quibbling just a bit ;) ), but AFAIK, 'dialogue' is simply an archaic spelling of 'dialog' (the modern, more accepted spelling). They're called dialog boxes because it's a metaphor for carrying on a conversation between you and your computer. :)

To the subject at hand: this looks terrific! Thanks for doing this! :)

-spyderbytes

--------------------
-spyderbytes
Posts: 200 | Registered: Wednesday, March 31 2004 08:00
Poison spitting creature script in Blades of Avernum Editor
Shock Trooper
Member # 4180
Profile #0
There are probably some optimizations that can be made to this (I'm an Avernumscript noob), but it should be pretty safe and generic. Enjoy! :)

// cpoisonspit.txt
// Much like basicnpc, but creature spits poison every other round at anyone in the
// party in an adjacent and visible location. Also includes logic for granting an optional
// special item after a number of these cretures specified in Memory Cell 4 have died.
// Memory Cells:
// Cell 0 - How creature moves.
// 0 - If 0, wander randomly.
// 1 - Stands still until a target appears.
// 2 - Completely immobile, even if target appears.
// Cell 1,2 - Stuff done flag. If both 0, nothing. Otherwise when each of these dies,
// flag is incremented.
// Cell 3 - Dialogue node to start with if talked to. if left at 0, this
// character doesn't talk.
// Cell 4 - Number of these things to die before a special item is granted. If 0, no
// special item is granted.
// Cell 5 - Special item to grant on death.
// Cell 6 - Number of dice for poison damage
// Cell 7 - Size of dice for poison damage

begincreaturescript;

variables;

short i, target, last_abil_time, distance, max;

body;

beginstate INIT_STATE;
if (get_memory_cell(0) == 2)
set_mobility(ME, 0);
last_abil_time = get_current_tick(); // uesd to determine when to spit poison
break;

beginstate DEAD_STATE;
// Increment the appropriate stuff done flag for this character being dead
if ((get_memory_cell(1) != 0) || (get_memory_cell(2) != 0)) {
inc_flag(get_memory_cell(1), get_memory_cell(2), 1);

if (get_memory_cell(4) != 0 && (get_memory_cell(4) ==
get_flag(get_memory_cell(1), get_memory_cell(2)))) {
// only want to do this after specified number of these die
// give the special item
change_spec_item(get_memory_cell(5), 1);

// make it more obvious to the player that a special item was found
play_sound(0); // high beep
message_dialog("Your message here...",
"(You have gained a special item. Check the Character Info screen to examine it.)");
}
}
break;

beginstate START_STATE;
// if I have a target for some reason, go attack it
if (target_ok()) {
if (dist_to_char(get_target()) <= 16)
set_state(3);
else set_target(ME, -1);
}

// Look for a target, attack it if visible
if (select_target(ME, 8, 0)) {
do_attack();
set_state(3);
}

// Have I been hit? Strike back!
if (who_hit_me() >= 0) {
set_target(ME, who_hit_me());
do_attack();
set_state(3);
}

// Otherwise, just peacefully move around. Go back to start, if I'm too far
// from where I started.
if ((my_dist_from_start() >= 6) || ((my_dist_from_start() > 0) && (get_memory_cell(0) > 0))) {
if (get_ran(1, 1, 100) < 40)
return_to_start(ME, 1);
}
else if (get_memory_cell(0) == 0) {
fidget(ME, 25);
}

// if we're in combat and the above didn't give me anything to do, just
// stop now. Otherwise, game will keep running script, and that eats up CPU time.
if (am_i_doing_action() == FALSE)
end_combat_turn();
break;

beginstate 3; // attacking
if (target_ok() == FALSE)
set_state(START_STATE);

// time to spit more poison?
if (tick_difference(last_abil_time, get_current_tick()) > 1) {
max = party_size();
i = 0;
while (i < max) { // loop through party
distance = char_dist_to_loc(i, my_loc_x(), my_loc_y()); // how close is this char?
if (distance == 1 && (can_see_char(i) == TRUE)) {
print_named_str(ME, " spits poison!");
play_sound(42); // acid spray -- close enough for poison, I reckon ;)
damage_char(i, get_ran(get_memory_cell(6), 1, get_memory_cell(7)), 2);
}
i = i + 1;
}
last_abil_time = get_current_tick();
}

do_attack();
break;

beginstate TALKING_STATE;
if (get_memory_cell(3) == 0) {
print_str("Talking: It doesn't respond.");
end();
}
begin_talk_mode(get_memory_cell(3));
break;
-spyderbytes

[ Monday, April 05, 2004 22:09: Message edited by: spyderbytes ]

--------------------
-spyderbytes
Posts: 200 | Registered: Wednesday, March 31 2004 08:00
Poison spitting creature script in Blades of Avernum
Shock Trooper
Member # 4180
Profile #0
There are probably some optimizations that can be made to this (I'm an Avernumscript noob), but it should be pretty safe and generic. Enjoy! :)

// cpoisonspit.txt
// Much like basicnpc, but creature spits poison every other round at anyone in the
// party in an adjacent and visible location. Also includes logic for granting an optional
// special item after a number of these cretures specified in Memory Cell 4 have died.
// Memory Cells:
// Cell 0 - How creature moves.
// 0 - If 0, wander randomly.
// 1 - Stands still until a target appears.
// 2 - Completely immobile, even if target appears.
// Cell 1,2 - Stuff done flag. If both 0, nothing. Otherwise when each of these dies,
// flag is incremented.
// Cell 3 - Dialogue node to start with if talked to. if left at 0, this
// character doesn't talk.
// Cell 4 - Number of these things to die before a special item is granted. If 0, no
// special item is granted.
// Cell 5 - Special item to grant on death.
// Cell 6 - Number of dice for poison damage
// Cell 7 - Size of dice for poison damage

begincreaturescript;

variables;

short i, target, last_abil_time, distance, max;

body;

beginstate INIT_STATE;
if (get_memory_cell(0) == 2)
set_mobility(ME, 0);
last_abil_time = get_current_tick(); // uesd to determine when to spit poison
break;

beginstate DEAD_STATE;
// Increment the appropriate stuff done flag for this character being dead
if ((get_memory_cell(1) != 0) || (get_memory_cell(2) != 0)) {
inc_flag(get_memory_cell(1), get_memory_cell(2), 1);

if (get_memory_cell(4) != 0 && (get_memory_cell(4) ==
get_flag(get_memory_cell(1), get_memory_cell(2)))) {
// only want to do this after specified number of these die
// give the special item
change_spec_item(get_memory_cell(5), 1);

// make it more obvious to the player that a special item was found
play_sound(0); // high beep
message_dialog("Your message here...",
"(You have gained a special item. Check the Character Info screen to examine it.)");
}
}
break;

beginstate START_STATE;
// if I have a target for some reason, go attack it
if (target_ok()) {
if (dist_to_char(get_target()) <= 16)
set_state(3);
else set_target(ME, -1);
}

// Look for a target, attack it if visible
if (select_target(ME, 8, 0)) {
do_attack();
set_state(3);
}

// Have I been hit? Strike back!
if (who_hit_me() >= 0) {
set_target(ME, who_hit_me());
do_attack();
set_state(3);
}

// Otherwise, just peacefully move around. Go back to start, if I'm too far
// from where I started.
if ((my_dist_from_start() >= 6) || ((my_dist_from_start() > 0) && (get_memory_cell(0) > 0))) {
if (get_ran(1, 1, 100) < 40)
return_to_start(ME, 1);
}
else if (get_memory_cell(0) == 0) {
fidget(ME, 25);
}

// if we're in combat and the above didn't give me anything to do, just
// stop now. Otherwise, game will keep running script, and that eats up CPU time.
if (am_i_doing_action() == FALSE)
end_combat_turn();
break;

beginstate 3; // attacking
if (target_ok() == FALSE)
set_state(START_STATE);

// time to spit more poison?
if (tick_difference(last_abil_time, get_current_tick()) > 1) {
max = party_size();
i = 0;
while (i < max) { // loop through party
distance = char_dist_to_loc(i, my_loc_x(), my_loc_y()); // how close is this char?
if (distance == 1 && (can_see_char(i) == TRUE)) {
print_named_str(ME, " spits poison!");
play_sound(42); // acid spray -- close enough for poison, I reckon ;)
damage_char(i, get_ran(get_memory_cell(6), 1, get_memory_cell(7)), 2);
}
i = i + 1;
}
last_abil_time = get_current_tick();
}

do_attack();
break;

beginstate TALKING_STATE;
if (get_memory_cell(3) == 0) {
print_str("Talking: It doesn't respond.");
end();
}
begin_talk_mode(get_memory_cell(3));
break;
-spyderbytes

[ Monday, April 05, 2004 22:09: Message edited by: spyderbytes ]

--------------------
-spyderbytes
Posts: 200 | Registered: Wednesday, March 31 2004 08:00
Getting rid of webs in Blades of Avernum
Shock Trooper
Member # 4180
Profile #4
quote:
Originally written by ThirdParty:

It says it in the manual.
As well as in the dialog that comes up the very first time you get webbed. :)

--------------------
-spyderbytes
Posts: 200 | Registered: Wednesday, March 31 2004 08:00
what's wrong with this code? in Blades of Avernum Editor
Shock Trooper
Member # 4180
Profile #0
At the risk of making a pest of myself, I'd like to know why this doesn't work. :) I decided to code around the problem with damage_near_loc passing through walls, and came up with this:

beginstate 3; // attacking
...stuff here that's ok...

// time to spit more poison?
if (tick_difference(last_abil_time, get_current_tick()) > 1) {
// don't use damage_near_loc, because it damages where it shouldn't
i = 0;
while (i < 4) {
distance = char_dist_to_loc(i, my_loc_x(), my_loc_y());
if (distance == 1) { // character is adjacent
print_named_str(ME, "spits poison!");
play_sound(42); // acid hiss
damage_char(i, get_ran(3, 1, 3), 2);
}
i = i + 1;
}
}

do_attack();
break;
That seems to me as if it should work, but any character that's adjacent ends up taking damage four times, instead of only once. So where did I go wrong?

-spyderbytes

EDIT: DOH! It's always the simple gotchas. :D Adding last_abil_time = get_current_tick(); before the last curly bracket makes it work as expected. Sorry 'bout dat!

[ Monday, April 05, 2004 20:28: Message edited by: spyderbytes ]

--------------------
-spyderbytes
Posts: 200 | Registered: Wednesday, March 31 2004 08:00
what's wrong with this code? in Blades of Avernum
Shock Trooper
Member # 4180
Profile #0
At the risk of making a pest of myself, I'd like to know why this doesn't work. :) I decided to code around the problem with damage_near_loc passing through walls, and came up with this:

beginstate 3; // attacking
...stuff here that's ok...

// time to spit more poison?
if (tick_difference(last_abil_time, get_current_tick()) > 1) {
// don't use damage_near_loc, because it damages where it shouldn't
i = 0;
while (i < 4) {
distance = char_dist_to_loc(i, my_loc_x(), my_loc_y());
if (distance == 1) { // character is adjacent
print_named_str(ME, "spits poison!");
play_sound(42); // acid hiss
damage_char(i, get_ran(3, 1, 3), 2);
}
i = i + 1;
}
}

do_attack();
break;
That seems to me as if it should work, but any character that's adjacent ends up taking damage four times, instead of only once. So where did I go wrong?

-spyderbytes

EDIT: DOH! It's always the simple gotchas. :D Adding last_abil_time = get_current_tick(); before the last curly bracket makes it work as expected. Sorry 'bout dat!

[ Monday, April 05, 2004 20:28: Message edited by: spyderbytes ]

--------------------
-spyderbytes
Posts: 200 | Registered: Wednesday, March 31 2004 08:00
intended behavior? (damage_near_loc) in Blades of Avernum Editor
Shock Trooper
Member # 4180
Profile #2
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. Sure, my spider COULD go out the door, around the building and into the shop in question, but not in 'range' moves. So it shouldn't do damage there.

Of course, not knowing the particulars of the implementation, such a call to the pathfinding algorithm might be prohibitively expensive. In that case, current behavior would be correct (not to say optimal ;) ).

-spyderbytes

--------------------
-spyderbytes
Posts: 200 | Registered: Wednesday, March 31 2004 08:00
intended behavior? (damage_near_loc) in Blades of Avernum
Shock Trooper
Member # 4180
Profile #2
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. Sure, my spider COULD go out the door, around the building and into the shop in question, but not in 'range' moves. So it shouldn't do damage there.

Of course, not knowing the particulars of the implementation, such a call to the pathfinding algorithm might be prohibitively expensive. In that case, current behavior would be correct (not to say optimal ;) ).

-spyderbytes

--------------------
-spyderbytes
Posts: 200 | Registered: Wednesday, March 31 2004 08:00
intended behavior? (damage_near_loc) in Blades of Avernum Editor
Shock Trooper
Member # 4180
Profile #0
OK... I decided my spiders still weren't quite challenging enough, so I decided to have them spit poison every couple of turns to soften up the melee types standing adjacent to them and hacking at them. damage_near_loc seemed the perfect candidate for that, and works perfectly EXCEPT... a shopkeeper on the other side of a stone wall from the spiders also gets poisoned. :)

It's a simple enough matter to move the shopkeeper far enough away from the wall to not get poisoned. I just expected intervening impassible terrain to block the damage, so I'm wondering if the current behavior is intended or a bug.

-spyderbytes

--------------------
-spyderbytes
Posts: 200 | Registered: Wednesday, March 31 2004 08:00
intended behavior? (damage_near_loc) in Blades of Avernum
Shock Trooper
Member # 4180
Profile #0
OK... I decided my spiders still weren't quite challenging enough, so I decided to have them spit poison every couple of turns to soften up the melee types standing adjacent to them and hacking at them. damage_near_loc seemed the perfect candidate for that, and works perfectly EXCEPT... a shopkeeper on the other side of a stone wall from the spiders also gets poisoned. :)

It's a simple enough matter to move the shopkeeper far enough away from the wall to not get poisoned. I just expected intervening impassible terrain to block the damage, so I'm wondering if the current behavior is intended or a bug.

-spyderbytes

--------------------
-spyderbytes
Posts: 200 | Registered: Wednesday, March 31 2004 08:00
special items in Blades of Avernum Editor
Shock Trooper
Member # 4180
Profile #10
Hmmm... good point, so I changed it. Thanks for the tip! :)

-spyderbytes

--------------------
-spyderbytes
Posts: 200 | Registered: Wednesday, March 31 2004 08:00
special items in Blades of Avernum
Shock Trooper
Member # 4180
Profile #10
Hmmm... good point, so I changed it. Thanks for the tip! :)

-spyderbytes

--------------------
-spyderbytes
Posts: 200 | Registered: Wednesday, March 31 2004 08:00
special items in Blades of Avernum Editor
Shock Trooper
Member # 4180
Profile #8
I'm not sure I understand why that would be safer, at least as long as I'm sure (and I am) there's no chance of other hostiles nearby in this particular town. Am I missing something?

-spyderbytes

--------------------
-spyderbytes
Posts: 200 | Registered: Wednesday, March 31 2004 08:00
special items in Blades of Avernum
Shock Trooper
Member # 4180
Profile #8
I'm not sure I understand why that would be safer, at least as long as I'm sure (and I am) there's no chance of other hostiles nearby in this particular town. Am I missing something?

-spyderbytes

--------------------
-spyderbytes
Posts: 200 | Registered: Wednesday, March 31 2004 08:00
Article - Why? in Blades of Avernum Editor
Shock Trooper
Member # 4180
Profile #19
quote:
Originally written by Imban:

I guess what I'm trying to say is that designers have to remember that they're making a game, not a novel. While a good plot can certainly make a scenario more enjoyable, challenging, fast-paced, fun, and unpredictable gameplay goes so much further.
While hoping I can avoid adding fuel to a smouldering fire, I have to say I completely agree with that statement. In a CRPG, story is a vehicle and gameplay is the driver. While most people would prefer to ride in style in a luxury vehicle, just sitting in one that isn't going anywhere isn't overly enjoyable--or at least not for long. :)

"Story" seems to be the Holy Grail that has replaced "realism" in what hardcore fanatics ask for these days. Don't get me wrong, both are Good Things(TM) and need to be there--but both also need to take a back seat to fun when they get in its way.

As I'm sure someone will see fit to question my credentials for making such a statement, I'll say I spent many a year doing professional game design. I'm retired now (for health reasons), but the principals remain unchanging.

I've read the reviews of Jeff's scenarios, and have to respectfully disagree with many of the negative comments. Are his scenarios perfect? Far from it. Could they have better stories? Most likely. But story served its purpose in them, to me at least. It kept me interested enough to play the scenarios through to the end (and I assure you there are many, many CRPGs I can't say that for)--and have fun by doing so. That's what games are all about. :)

-spyderbytes

--------------------
-spyderbytes
Posts: 200 | Registered: Wednesday, March 31 2004 08:00
Article - Why? in Blades of Avernum
Shock Trooper
Member # 4180
Profile #19
quote:
Originally written by Imban:

I guess what I'm trying to say is that designers have to remember that they're making a game, not a novel. While a good plot can certainly make a scenario more enjoyable, challenging, fast-paced, fun, and unpredictable gameplay goes so much further.
While hoping I can avoid adding fuel to a smouldering fire, I have to say I completely agree with that statement. In a CRPG, story is a vehicle and gameplay is the driver. While most people would prefer to ride in style in a luxury vehicle, just sitting in one that isn't going anywhere isn't overly enjoyable--or at least not for long. :)

"Story" seems to be the Holy Grail that has replaced "realism" in what hardcore fanatics ask for these days. Don't get me wrong, both are Good Things(TM) and need to be there--but both also need to take a back seat to fun when they get in its way.

As I'm sure someone will see fit to question my credentials for making such a statement, I'll say I spent many a year doing professional game design. I'm retired now (for health reasons), but the principals remain unchanging.

I've read the reviews of Jeff's scenarios, and have to respectfully disagree with many of the negative comments. Are his scenarios perfect? Far from it. Could they have better stories? Most likely. But story served its purpose in them, to me at least. It kept me interested enough to play the scenarios through to the end (and I assure you there are many, many CRPGs I can't say that for)--and have fun by doing so. That's what games are all about. :)

-spyderbytes

--------------------
-spyderbytes
Posts: 200 | Registered: Wednesday, March 31 2004 08:00

Pages