Fields

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: Fields
Apprentice
Member # 5044
Profile #0
Does anyone know why the call put_field_on_space does not reliably put a field on a space? By this I mean it does it most of the time, but not 100% of the time. Does anyone know a way to fix this?

Thanks
Posts: 30 | Registered: Sunday, October 3 2004 07:00
Off With Their Heads
Member # 4045
Profile Homepage #1
Can you give an example when it does not do so?

--------------------
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 # 5159
Profile #2
put_field_on_space(x,y,n)
put_field_on_space(x,y,n)

i used this call (i don't remember the actual format) and used 6 for the space (quickfire) and put in the EXACT coordinates (i know i checked like 5 times) and only one showed up. there is your example.

--------------------
"The whoopie cushion shall rise again."
- Anton Szandor LaVey
Founder of the Church of Satan
Posts: 78 | Registered: Wednesday, November 3 2004 08:00
Off With Their Heads
Member # 4045
Profile Homepage #3
I meant actually post the script.

--------------------
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 #4
It'd also help if we knew a little about the map; whether there were terrains, monsters, other fields, etc. on the spaces you tried to stick fields on.

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00
Apprentice
Member # 5044
Profile #5
beginstate START_STATE;
if (is_field_on_space(39,38,2) == 0)
put_field_on_space(39,38,2);
if (is_field_on_space(40,38,2) == 0)
put_field_on_space(40,38,2);
if (is_field_on_space(41,38,2) == 0)
put_field_on_space(41,38,2);
if (is_field_on_space(42,38,2) == 0)
put_field_on_space(42,38,2);

if (is_field_on_space(38,39,2) == 0)
put_field_on_space(38,39,2);
if (is_field_on_space(39,39,2) == 0)
put_field_on_space(39,39,2);
if (is_field_on_space(40,39,2) == 0)
put_field_on_space(40,39,2);
if (is_field_on_space(41,39,2) == 0)
put_field_on_space(41,39,2);
if (is_field_on_space(42,39,2) == 0)
put_field_on_space(42,39,2);
if (is_field_on_space(43,39,2) == 0)
put_field_on_space(43,39,2);

if (is_field_on_space(38,40,2) == 0)
put_field_on_space(38,40,2);
if (is_field_on_space(39,40,2) == 0)
put_field_on_space(39,40,2);
if (is_field_on_space(40,40,2) == 0)
put_field_on_space(40,40,2);
if (is_field_on_space(41,40,2) == 0)
put_field_on_space(41,40,2);
if (is_field_on_space(42,40,2) == 0)
put_field_on_space(42,40,2);
if (is_field_on_space(43,40,2) == 0)
put_field_on_space(43,40,2);

if (is_field_on_space(38,41,2) == 0)
put_field_on_space(38,41,2);
if (is_field_on_space(39,41,2) == 0)
put_field_on_space(39,41,2);
if (is_field_on_space(40,41,2) == 0)
put_field_on_space(40,41,2);
if (is_field_on_space(41,41,2) == 0)
put_field_on_space(41,41,2);
if (is_field_on_space(42,41,2) == 0)
put_field_on_space(42,41,2);
if (is_field_on_space(43,41,2) == 0)
put_field_on_space(43,41,2);

if (is_field_on_space(38,42,2) == 0)
put_field_on_space(38,42,2);
if (is_field_on_space(39,42,2) == 0)
put_field_on_space(39,42,2);
if (is_field_on_space(40,42,2) == 0)
put_field_on_space(40,42,2);
if (is_field_on_space(41,42,2) == 0)
put_field_on_space(41,42,2);
if (is_field_on_space(42,42,2) == 0)
put_field_on_space(42,42,2);
if (is_field_on_space(43,42,2) == 0)
put_field_on_space(43,42,2);

if (is_field_on_space(39,43,2) == 0)
put_field_on_space(39,43,2);
if (is_field_on_space(40,43,2) == 0)
put_field_on_space(40,43,2);
if (is_field_on_space(41,43,2) == 0)
put_field_on_space(41,43,2);
if (is_field_on_space(42,43,2) == 0)
put_field_on_space(42,43,2);
break;

I don't think it's to do with the terrain, floor, objects or characters present, as each turn, the spaces that aren't filled change. It's as if blades is adding in an "if random number is greater than" type of call.

I'm happy to send you the entire (half built) scenario if that would help.

Thanks
Posts: 30 | Registered: Sunday, October 3 2004 07:00
Off With Their Heads
Member # 4045
Profile Homepage #6
Why not take out the "if" part of the calls? Putting a field on a space that already has a field does nothing harmful.

It may just be a matter of when BoA reads the fields as disappearing: if it erases fields after the START_STATE, which I think it does, it would take an extra turn to add a new field. Getting rid of the "if" parts might fix this.

--------------------
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
Apprentice
Member # 5044
Profile #7
I previously had it without the if statements then changed it because I thought adding a field to a field might be causing the problem. So basically the same problem occurs with or without the if statement.

Thanks
Posts: 30 | Registered: Sunday, October 3 2004 07:00
Warrior
Member # 5159
Profile #8
While crude and inefficient programming at best, you could try putting it in the.... i forget what state it is but the one that checks every turn. making it so that every turn, the field is created in that spot, as far as i know this would not have any negative effects unless the fields grouped, and instead of 1 quickfire, you were getting hit by 200. just a suggestion.

--------------------
"The whoopie cushion shall rise again."
- Anton Szandor LaVey
Founder of the Church of Satan
Posts: 78 | Registered: Wednesday, November 3 2004 08:00
Off With Their Heads
Member # 4045
Profile Homepage #9
That's the START_STATE, and it's already there.

--------------------
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
Apprentice
Member # 5044
Profile #10
quote:
Originally written by Captain Obvious:

While crude and inefficient programming at best, you could try putting it in the [START_STATE].
Why's it crude and inefficient?

If game is randomly removing fields after the START_STATE, is there some other call I could use to get the field created each turn?

I though of using special encounters on every square in that area of the map, but what about if the party are in fight mode or they hit wait?
Posts: 30 | Registered: Sunday, October 3 2004 07:00
Apprentice
Member # 5044
Profile #11
Tried putting the same the same code in the START_STATE of a character script but the same problem applies.
Posts: 30 | Registered: Sunday, October 3 2004 07:00
Warrior
Member # 4202
Profile Homepage #12
quote:
Originally written by demipomme:

quote:
Originally written by Captain Obvious:

While crude and inefficient programming at best, you could try putting it in the [START_STATE].
Why's it crude and inefficient?

Scripts are somewhat slow, so a long script that occurs every move (whether implemented with START_STATE or some other way) may slow the player down noticably.

quote:
Originally written by demipomme:

If game is randomly removing fields after the START_STATE, is there some other call I could use to get the field created each turn?
No, but if you're just placing quickfire, I don't think it gets randomly removed, it just spreads, unless a script explicitly destroys it. It seems to me that placing the script in the INIT_STATE should work, if it's quickfire. However, looking at your script, I see that it places antimagic fields.

You DEFINATELY do not need the ifs.

I think the problem is that antimagic fields decay after the town's START_STATE happens. You might want to try putting it in the START_STATE of a terrain script that you place nearby
(you may need to put
set_script_mode(2);
//make that 3 if you want it to happen everywhere in town
in its INIT_STATE; I'm not sure)
because terrain script START_STATE triggers far more often than town START_STATE.

quote:
Originally written by demipomme:

I though of using special encounters on every square in that area of the map, but what about if the party are in fight mode or they hit wait?
If you want it to happen every turn everywhere in the town, use START_STATE. Besides, there is a maximum of about 60 specials you can place in a town (it depends on town size; I think that's for large towns).

If there was some good reason to have one everywhere, you could make new floor types so that every floor in the area has the special ability to trigger a special encounter. It would trigger for each character that move, even out of combat, and trigger even in combat, but not in either case if the party stands still. You do not want to try this here.

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