Profile for Venom

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
Moving carts in Blades of Avernum Editor
Warrior
Member # 4792
Profile #15
Ok, it did not work. This is the twentieth hour I have been working on this creature script with no success. I now officially hate BoA. Yet I persist.
Posts: 57 | Registered: Wednesday, July 28 2004 07:00
Moving carts in Blades of Avernum
Warrior
Member # 4792
Profile #15
Ok, it did not work. This is the twentieth hour I have been working on this creature script with no success. I now officially hate BoA. Yet I persist.
Posts: 57 | Registered: Wednesday, July 28 2004 07:00
Moving carts in Blades of Avernum Editor
Warrior
Member # 4792
Profile #14
Well, in theory, no. The initial if statement should only allow the else statement to be called if the cart is at an x,y coordinate. The carts can't move until they have coordinates in mem_cell 4 and 5. When the script is first run, there is nothing there and i = 0. I'm not sure if that makes the get_memory_cell() call false, but to ensure it, I place the i != 0. Since it is false, it goes to the else statement. This is the tricky part.
The first else statement does not set anything for the mem_cells. It only increments i. Wait, hold on. The light just went on! I know what I did wrong! Yippee! I think that the program beleives that nothing in mem_cells 4 and 5 is a number. It can't go to nothing, but the statement is true. This doesn't cause it to keep incrementing. Rather, it just keeps trying to go to 0,0 (the status of the mem_cells). Well, inadvertenly, Garrison, you have helped me greatly. My thanks to you. I think what I should do is kill the (i != 0) in the first part, and manually enter in the first coordinates for each cart. I'll let you know if this works. Thanks again.
Posts: 57 | Registered: Wednesday, July 28 2004 07:00
Moving carts in Blades of Avernum
Warrior
Member # 4792
Profile #14
Well, in theory, no. The initial if statement should only allow the else statement to be called if the cart is at an x,y coordinate. The carts can't move until they have coordinates in mem_cell 4 and 5. When the script is first run, there is nothing there and i = 0. I'm not sure if that makes the get_memory_cell() call false, but to ensure it, I place the i != 0. Since it is false, it goes to the else statement. This is the tricky part.
The first else statement does not set anything for the mem_cells. It only increments i. Wait, hold on. The light just went on! I know what I did wrong! Yippee! I think that the program beleives that nothing in mem_cells 4 and 5 is a number. It can't go to nothing, but the statement is true. This doesn't cause it to keep incrementing. Rather, it just keeps trying to go to 0,0 (the status of the mem_cells). Well, inadvertenly, Garrison, you have helped me greatly. My thanks to you. I think what I should do is kill the (i != 0) in the first part, and manually enter in the first coordinates for each cart. I'll let you know if this works. Thanks again.
Posts: 57 | Registered: Wednesday, July 28 2004 07:00
Moving carts in Blades of Avernum Editor
Warrior
Member # 4792
Profile #12
I love you, Thuryl! I would have never thought of that, and it turned out several portions were not being called. This gave way to a massive overhual of my script and scenario. I simplified the scenario so that the carts did not intersect, ever. This required deletion of three carts, which drastically reduced the amount of script. Then I rewrote the script into a new format, consisting of one big if statement.

After several hours testing this, however, I'm lost again (really, this doesn't happen often). Thanks to Thuryl, I know that my last else statement is not getting called. It just keeps calling the first if "bit". I can get it to call the else, but it only calls it once and then returns to repeating the if "bit". And this without moving. I'm just not sure why it won't move. Here is the code, if I could ask for your,(forum members), help once more. I'm going to post almost all of it this time, to get a better view.
// something2.txt
// Neither simple, nor naive, this text has the creature follow a certain route.
// Memory Cells:
// Cell 1,2 - Stuff done flag. If both 0, nothing. Otherwise when this
// is killed, set to 1. (Example: If cell 1 is 3 and cell 2 is 5, when
// creature is killed, sets SDF(3,5) to 1.)
// Cell 3 - Dialogue node to start with if talked to. if left at 0, this
// character doesn't talk.
// Cell 4 - X coordinate to move to.
// Cell 5 - Y coordinate to move to.

begincreaturescript;

variables;

short i = 1;
short target;
short x = 0;
short y = 0;

body;

beginstate INIT_STATE;

break;

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

beginstate START_STATE;
// Start ifs for cart #13
if
(i == 1) {
x = 52;
y = 53;
}
if
(i == 2) {
x = 52;
y = 49;
}
if
(i == 3) {
x = 57;
y = 49;
}
if
(i == 4) {
x = 57;
y = 40;
}
if
((dist_to_loc(get_memory_cell(4),get_memory_cell(5)) > 0) && (i <= 13) && (i != 0) && (my_number() == 13)) {
print_str("Testing 1.0");
move_to_loc_x_y(my_number(),get_memory_cell(4),get_memory_cell(5));
}
else if
((dist_to_loc(get_memory_cell(4),get_memory_cell(5)) > 0) && (i >= 14) && (i <= 18) && (my_number() == 15)) {
print_str("Testing 1.1");
move_to_loc_x_y(my_number(),get_memory_cell(4),get_memory_cell(5));
}
else if
((dist_to_loc(get_memory_cell(4),get_memory_cell(5)) > 0) && (i <= 26) && (i >= 19) && (my_number() == 17)) {
print_str("Testing 1.2");
move_to_loc_x_y(my_number(),get_memory_cell(4),get_memory_cell(5));
}
else if
((dist_to_loc(get_memory_cell(4),get_memory_cell(5)) > 0) && (i <= 30) && (i >= 27) && (my_number() == 18)) {
print_str("Testing 1.3");
move_to_loc_x_y(my_number(),get_memory_cell(4),get_memory_cell(5));
}
else if
((dist_to_loc(get_memory_cell(4),get_memory_cell(5)) > 0) && (i <= 40) && (i >= 31) && (my_number() == 19)) {
print_str("Testing 1.4");
move_to_loc_x_y(my_number(),get_memory_cell(4),get_memory_cell(5));
}
else {
print_str("Testing A");
i = i + 1;
set_memory_cell(4,x);
set_memory_cell(5,y);
}

break;

beginstate TALKING_STATE;
if (get_memory_cell(3) == 0) {
print_str("It's a cart. It doesn't talk.");
end();
}
break;

Posts: 57 | Registered: Wednesday, July 28 2004 07:00
Moving carts in Blades of Avernum
Warrior
Member # 4792
Profile #12
I love you, Thuryl! I would have never thought of that, and it turned out several portions were not being called. This gave way to a massive overhual of my script and scenario. I simplified the scenario so that the carts did not intersect, ever. This required deletion of three carts, which drastically reduced the amount of script. Then I rewrote the script into a new format, consisting of one big if statement.

After several hours testing this, however, I'm lost again (really, this doesn't happen often). Thanks to Thuryl, I know that my last else statement is not getting called. It just keeps calling the first if "bit". I can get it to call the else, but it only calls it once and then returns to repeating the if "bit". And this without moving. I'm just not sure why it won't move. Here is the code, if I could ask for your,(forum members), help once more. I'm going to post almost all of it this time, to get a better view.
// something2.txt
// Neither simple, nor naive, this text has the creature follow a certain route.
// Memory Cells:
// Cell 1,2 - Stuff done flag. If both 0, nothing. Otherwise when this
// is killed, set to 1. (Example: If cell 1 is 3 and cell 2 is 5, when
// creature is killed, sets SDF(3,5) to 1.)
// Cell 3 - Dialogue node to start with if talked to. if left at 0, this
// character doesn't talk.
// Cell 4 - X coordinate to move to.
// Cell 5 - Y coordinate to move to.

begincreaturescript;

variables;

short i = 1;
short target;
short x = 0;
short y = 0;

body;

beginstate INIT_STATE;

break;

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

beginstate START_STATE;
// Start ifs for cart #13
if
(i == 1) {
x = 52;
y = 53;
}
if
(i == 2) {
x = 52;
y = 49;
}
if
(i == 3) {
x = 57;
y = 49;
}
if
(i == 4) {
x = 57;
y = 40;
}
if
((dist_to_loc(get_memory_cell(4),get_memory_cell(5)) > 0) && (i <= 13) && (i != 0) && (my_number() == 13)) {
print_str("Testing 1.0");
move_to_loc_x_y(my_number(),get_memory_cell(4),get_memory_cell(5));
}
else if
((dist_to_loc(get_memory_cell(4),get_memory_cell(5)) > 0) && (i >= 14) && (i <= 18) && (my_number() == 15)) {
print_str("Testing 1.1");
move_to_loc_x_y(my_number(),get_memory_cell(4),get_memory_cell(5));
}
else if
((dist_to_loc(get_memory_cell(4),get_memory_cell(5)) > 0) && (i <= 26) && (i >= 19) && (my_number() == 17)) {
print_str("Testing 1.2");
move_to_loc_x_y(my_number(),get_memory_cell(4),get_memory_cell(5));
}
else if
((dist_to_loc(get_memory_cell(4),get_memory_cell(5)) > 0) && (i <= 30) && (i >= 27) && (my_number() == 18)) {
print_str("Testing 1.3");
move_to_loc_x_y(my_number(),get_memory_cell(4),get_memory_cell(5));
}
else if
((dist_to_loc(get_memory_cell(4),get_memory_cell(5)) > 0) && (i <= 40) && (i >= 31) && (my_number() == 19)) {
print_str("Testing 1.4");
move_to_loc_x_y(my_number(),get_memory_cell(4),get_memory_cell(5));
}
else {
print_str("Testing A");
i = i + 1;
set_memory_cell(4,x);
set_memory_cell(5,y);
}

break;

beginstate TALKING_STATE;
if (get_memory_cell(3) == 0) {
print_str("It's a cart. It doesn't talk.");
end();
}
break;

Posts: 57 | Registered: Wednesday, July 28 2004 07:00
Moving carts in Blades of Avernum Editor
Warrior
Member # 4792
Profile #10
I've revised my code and, as I have done before, I anticipated some of the problems that Garrison points out. Very odd coincidences. Here is a revised sample of the code:
if
(dist_to_loc(get_memory_cell(4),get_memory_cell(5)) > 0)
move_to_loc_x_y(ME,get_memory_cell(4),get_memory_cell(5));
else if
((i <= 14) && (my_number() == 10)) {
i = i + 1;
set_memory_cell(4,x);
set_memory_cell(5,y);
}
else if
((i >= 15) && (i <= 28) && (my_number() == 13)) {
i = i + 1;
set_memory_cell(4,x);
set_memory_cell(5,y);
}
if
(i == 1) {
x = 55;
y = 53;
}
if
(i == 2) {
x = 52;
y = 53;
}
if
(i == 3) {
x = 52;
y = 49;
}
I figured out the ME thingy, but instead of the far simpler way of my_number, I had assigned a preset memory cell to the creature number. The multiple comparisons I had also changed previously, but I had no idea why. It gave me no error when testing, which, sadly, none of this does. However, I was running out of ideas and though that did not solve the problem entirely, at least it was constructive. The carts, as of this post, still sit there. Argh. I'm going to bed.
Posts: 57 | Registered: Wednesday, July 28 2004 07:00
Moving carts in Blades of Avernum
Warrior
Member # 4792
Profile #10
I've revised my code and, as I have done before, I anticipated some of the problems that Garrison points out. Very odd coincidences. Here is a revised sample of the code:
if
(dist_to_loc(get_memory_cell(4),get_memory_cell(5)) > 0)
move_to_loc_x_y(ME,get_memory_cell(4),get_memory_cell(5));
else if
((i <= 14) && (my_number() == 10)) {
i = i + 1;
set_memory_cell(4,x);
set_memory_cell(5,y);
}
else if
((i >= 15) && (i <= 28) && (my_number() == 13)) {
i = i + 1;
set_memory_cell(4,x);
set_memory_cell(5,y);
}
if
(i == 1) {
x = 55;
y = 53;
}
if
(i == 2) {
x = 52;
y = 53;
}
if
(i == 3) {
x = 52;
y = 49;
}
I figured out the ME thingy, but instead of the far simpler way of my_number, I had assigned a preset memory cell to the creature number. The multiple comparisons I had also changed previously, but I had no idea why. It gave me no error when testing, which, sadly, none of this does. However, I was running out of ideas and though that did not solve the problem entirely, at least it was constructive. The carts, as of this post, still sit there. Argh. I'm going to bed.
Posts: 57 | Registered: Wednesday, July 28 2004 07:00
Moving carts in Blades of Avernum Editor
Warrior
Member # 4792
Profile #8
Hmm, I just noticed I posted the wrong code. Only the first nine lines of the initial if statement are valid. I hadn't changed the rest to match yet. The i,x,y statements are ok, though.

I don't think it will take up too much memory, as I am having the carts only act at a distance. That may be a bit unrealistic however. And this is a friendly town. And the carts are magical. And there are eight carts. I may have to keep them stationary, but until everything else has been exhausted, I'm not ready to give up.
Posts: 57 | Registered: Wednesday, July 28 2004 07:00
Moving carts in Blades of Avernum
Warrior
Member # 4792
Profile #8
Hmm, I just noticed I posted the wrong code. Only the first nine lines of the initial if statement are valid. I hadn't changed the rest to match yet. The i,x,y statements are ok, though.

I don't think it will take up too much memory, as I am having the carts only act at a distance. That may be a bit unrealistic however. And this is a friendly town. And the carts are magical. And there are eight carts. I may have to keep them stationary, but until everything else has been exhausted, I'm not ready to give up.
Posts: 57 | Registered: Wednesday, July 28 2004 07:00
Moving carts in Blades of Avernum Editor
Warrior
Member # 4792
Profile #6
Well, I tried my code, and it did not work. I've gone over it several times and I can't figure it out. I would like to post it here to see if anyone can find the error. Meanwhile, I'll keep searching.
if
(dist_to_loc(get_memory_cell(4),get_memory_cell(5)) > 0) // checks to see if cart there
move_to_loc_x_y(ME,get_memory_cell(4),get_memory_cell(5)); // if not, goes there
else if
((0 < i < 15) && (ME == 10)) { // if there, calculate next route for cart #10
set_memory_cell(4,x);
set_memory_cell(5,y);
i = i + 1;
}
else if
((29 > i > 14) && (ME == 13)) {
stop_moving(ME);
set_memory_cell(4,x);
set_memory_cell(5,y);
i = i + 1;
}
else while
((36 > i > 28) && (ME == 14)) {
stop_moving(ME);
set_memory_cell(4,x);
set_memory_cell(5,y);
i = i + 1;
}
else while
((42 > i > 35) && (ME == 15)) {
stop_moving(ME);
set_memory_cell(4,x);
set_memory_cell(5,y);
i = i + 1;
}
else while
((54 > i > 41) && (ME == 16)) {
stop_moving(ME);
set_memory_cell(4,x);
set_memory_cell(5,y);
i = i + 1;
}
else while
((63 > i > 53) && (ME == 17)) {
stop_moving(ME);
set_memory_cell(4,x);
set_memory_cell(5,y);
i = i + 1;
}
else while
((68 > i > 62) && (ME == 18)) {
stop_moving(ME);
set_memory_cell(4,x);
set_memory_cell(5,y);
i = i + 1;
}
else while
((81 > i > 67) && (ME == 19)) {
stop_moving(ME);
set_memory_cell(4,x);
set_memory_cell(5,y);
i = i + 1;
}

if // sample paths
(i == 1) {
x = 55;
y = 53;
}
if
(i == 2) {
x = 52;
y = 53;
}
if
(i == 3) {
x = 52;
y = 49;
}
if
(i == 4) {
x = 57;
y = 49;
}
if
(i == 5) {
x = 57;
y = 40;
} // 400 lines more of this
I set i = 1 in INIT_STATE, and I set mem_cells 4 and 5 to the carts starting location in INIT_STATE. I also declared the variables, if you were wondering.
Posts: 57 | Registered: Wednesday, July 28 2004 07:00
Moving carts in Blades of Avernum
Warrior
Member # 4792
Profile #6
Well, I tried my code, and it did not work. I've gone over it several times and I can't figure it out. I would like to post it here to see if anyone can find the error. Meanwhile, I'll keep searching.
if
(dist_to_loc(get_memory_cell(4),get_memory_cell(5)) > 0) // checks to see if cart there
move_to_loc_x_y(ME,get_memory_cell(4),get_memory_cell(5)); // if not, goes there
else if
((0 < i < 15) && (ME == 10)) { // if there, calculate next route for cart #10
set_memory_cell(4,x);
set_memory_cell(5,y);
i = i + 1;
}
else if
((29 > i > 14) && (ME == 13)) {
stop_moving(ME);
set_memory_cell(4,x);
set_memory_cell(5,y);
i = i + 1;
}
else while
((36 > i > 28) && (ME == 14)) {
stop_moving(ME);
set_memory_cell(4,x);
set_memory_cell(5,y);
i = i + 1;
}
else while
((42 > i > 35) && (ME == 15)) {
stop_moving(ME);
set_memory_cell(4,x);
set_memory_cell(5,y);
i = i + 1;
}
else while
((54 > i > 41) && (ME == 16)) {
stop_moving(ME);
set_memory_cell(4,x);
set_memory_cell(5,y);
i = i + 1;
}
else while
((63 > i > 53) && (ME == 17)) {
stop_moving(ME);
set_memory_cell(4,x);
set_memory_cell(5,y);
i = i + 1;
}
else while
((68 > i > 62) && (ME == 18)) {
stop_moving(ME);
set_memory_cell(4,x);
set_memory_cell(5,y);
i = i + 1;
}
else while
((81 > i > 67) && (ME == 19)) {
stop_moving(ME);
set_memory_cell(4,x);
set_memory_cell(5,y);
i = i + 1;
}

if // sample paths
(i == 1) {
x = 55;
y = 53;
}
if
(i == 2) {
x = 52;
y = 53;
}
if
(i == 3) {
x = 52;
y = 49;
}
if
(i == 4) {
x = 57;
y = 49;
}
if
(i == 5) {
x = 57;
y = 40;
} // 400 lines more of this
I set i = 1 in INIT_STATE, and I set mem_cells 4 and 5 to the carts starting location in INIT_STATE. I also declared the variables, if you were wondering.
Posts: 57 | Registered: Wednesday, July 28 2004 07:00
Moving carts in Blades of Avernum Editor
Warrior
Member # 4792
Profile #4
Thank you very much, both Linthar and Garrison. It's weird, because I started coding it exactly the way Linthar said about an hour after I posted. Weird, huh? Anyways, I have yet to test it, but I think it should work. I'm not entirely certain how I can get them to go back, but I have an idea. See, to differentiate each direction, I incremented a variable for each new path call. I think I can go backwards by subtracting one without having to re-enter all the x,y coordinates. It was very much a pain the first time I did it, and this will be the third such change I've done on that scale.

Just a sidenote: Garrison is correct in saying that the documentation provided says only eight. However, you can place ten in the game. I tried editing the source code for more, but the box can't fit more than one digit, and I have no idea how to change that.

Oh, and I was wondering; do you think that I need to manually code something to stop the cart if something obstructs it's path?

Thanks again for your help.
Posts: 57 | Registered: Wednesday, July 28 2004 07:00
Moving carts in Blades of Avernum
Warrior
Member # 4792
Profile #4
Thank you very much, both Linthar and Garrison. It's weird, because I started coding it exactly the way Linthar said about an hour after I posted. Weird, huh? Anyways, I have yet to test it, but I think it should work. I'm not entirely certain how I can get them to go back, but I have an idea. See, to differentiate each direction, I incremented a variable for each new path call. I think I can go backwards by subtracting one without having to re-enter all the x,y coordinates. It was very much a pain the first time I did it, and this will be the third such change I've done on that scale.

Just a sidenote: Garrison is correct in saying that the documentation provided says only eight. However, you can place ten in the game. I tried editing the source code for more, but the box can't fit more than one digit, and I have no idea how to change that.

Oh, and I was wondering; do you think that I need to manually code something to stop the cart if something obstructs it's path?

Thanks again for your help.
Posts: 57 | Registered: Wednesday, July 28 2004 07:00
Nethergate gets no love! in Nethergate
Warrior
Member # 4792
Profile #11
I thought Nethergate was ok, but it was incredibly short. Why was that? I beat both sides in less than three days. The end came so quickly that it was kind of disappointing.
Posts: 57 | Registered: Wednesday, July 28 2004 07:00
Moving carts in Blades of Avernum Editor
Warrior
Member # 4792
Profile #0
Hello. I am not quite certain if this is the correct board to be posting to, but I had a question in regards to scripting.

If one wanted to make multiple creatures move back and forth along long paths which would take many twists and turns, how would one go about that? The character must always travel in a straight line and never fidget or waver inbetween two waypoints. I'm trying to move mining carts along railroad tracks. This would need to be called continuosly while a party was in a town. So far I've been able to figure everything I've needed to do, but this one seems to be beyond me. I'll keep trying, but if someone has any ideas, I'd really appreciate them. I can't use waypoints as there are too many turns by too many carts. And the move_to_loc_x_y is quite odd. My carts just stop halfway there.
Posts: 57 | Registered: Wednesday, July 28 2004 07:00
Moving carts in Blades of Avernum
Warrior
Member # 4792
Profile #0
Hello. I am not quite certain if this is the correct board to be posting to, but I had a question in regards to scripting.

If one wanted to make multiple creatures move back and forth along long paths which would take many twists and turns, how would one go about that? The character must always travel in a straight line and never fidget or waver inbetween two waypoints. I'm trying to move mining carts along railroad tracks. This would need to be called continuosly while a party was in a town. So far I've been able to figure everything I've needed to do, but this one seems to be beyond me. I'll keep trying, but if someone has any ideas, I'd really appreciate them. I can't use waypoints as there are too many turns by too many carts. And the move_to_loc_x_y is quite odd. My carts just stop halfway there.
Posts: 57 | Registered: Wednesday, July 28 2004 07:00
Nethergate outside map error in Tech Support
Warrior
Member # 4792
Profile #1
Close to 5000 members and not one has experienced my dilema? Perhaps I should rephrase: "Are there any here with sufficient knowledge of Nethergate to postulate a solution?" If so, I would like to know what you think may be the problem.
Posts: 57 | Registered: Wednesday, July 28 2004 07:00
Nethergate outside map error in Tech Support
Warrior
Member # 4792
Profile #0
I played Nethergate (as the Romans) for an hour or so, and after beating the goblins in the cave, I crossed out of the valley. With the minimap up, I was traversing the outside for about 30 seconds, when the game froze. After terminating the program I restarted. Same problem experienced. I tried to live with it, saving every 20 seconds or so, but it is incredibly frustrating. I have Windows 98SE with the download off Spiderweb two months ago. Has anyone else experienced this?
Posts: 57 | Registered: Wednesday, July 28 2004 07:00

Pages