Outdoor Fight Terrain

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: Outdoor Fight Terrain
Infiltrator
Member # 148
Profile #0
Can terrain/town scripts be used in an outdoor encounter when you use a custom outdoor fight terrain?

--------------------
My ego is bigger than yours.
Posts: 480 | Registered: Thursday, October 11 2001 07:00
Law Bringer
Member # 2984
Profile Homepage #1
I really doubt it. Most likely, only the floor and terrain get imported from the town set as the outdoor fight area - scripts and other paraphernalia don't. But since I'm testing anyway...

--------------------
Encyclopaedia ErmarianaForum ArchivesForum StatisticsRSS [Topic / Forum]
My BlogPolarisI eat novels for breakfast.
Polaris is dead, long live Polaris.
Look on my works, ye mighty, and despair.
Posts: 8752 | Registered: Wednesday, May 14 2003 07:00
Master
Member # 5977
Profile Homepage #2
For as far as I know, in the outdoors only outdoor scripts work, and nothing else, until you get into a town. All terrain/creature and town scripts do work there.

--------------------
Play and rate my scenarios:

Where the rivers meet
View my upcoming scenario: The Nephil Search: Escape.

Give us your drek!
Posts: 3029 | Registered: Saturday, June 18 2005 07:00
Infiltrator
Member # 148
Profile #3
Actually I was referring to the towns you fight in when you have an outdoor encounter. Each battlefield is pre-designed, and is a town, but it is a special usage of a town, so I'm not sure.

--------------------
My ego is bigger than yours.
Posts: 480 | Registered: Thursday, October 11 2001 07:00
? Man, ? Amazing
Member # 5755
Profile #4
Smoo should know the answer, as he used fight towns in one of his scenarios.

--------------------
quote:
Originally written by Kelandon:

Well, I'm at least pretty sure that Salmon is losing.


Posts: 4114 | Registered: Monday, April 25 2005 07:00
Shock Trooper
Member # 5459
Profile Homepage #5
The answer is: no. No you can't. I'm almost positive of this.

--------------------
These are my scenarios. I may have too much free time but I really don't care.
Backwater Calls, Magus of Cattalon, Rats Aplenty
Get them here
Visit The Lyceum for all your rating needs.
Posts: 211 | Registered: Sunday, January 30 2005 08:00
Apprentice
Member # 8386
Profile #6
All I know in terms of what I've tried is that if you put items in the outdoor fight town, they won't be spawned when the town is generated for an outdoor fight.

My suggestion would be to have the outdoor fight town be composed of a terrain or floor that calls a scenario script state when stepped on, and use that state for whatever it is you want to do. You don't necessarily have to use that terrain anywhere else, either, it can be an alternate version of the regular terrain. Or you could probably fiddle with the 'outdoor state called when met' thing in the encounter itself, but I kind of doubt you'd be able to get it to affect the fight town. Could have the called when met state set an sdf, then the scenario start_state checks to see if that sdf has been set, and if it has and the party is in a small town, do whatever it is you want it to do (and afterwards unset the sdf).

But there's probably simpler ways to do it. I seem to have a talent for coming up with code that's five times as complex as it needs to be, simply because it doesn't occur to me that the less complex ways exist.
Posts: 10 | Registered: Monday, March 26 2007 07:00
Lifecrafter
Member # 6193
Profile Homepage #7
The scenario script start_state doesn't get called in outdoor combat. Just another quirk Jeff threw in to show he loves us.

The best way I came up with is to include an invisible dummy creature included in the fight, with a custom script that runs like a town script's start_state. There might be better ways, I haven't looked into it too closely.

--------------------
Guaranteed to blow your mind.

Frostbite: Get It While It's...... Hot?
Posts: 900 | Registered: Monday, August 8 2005 07:00
? Man, ? Amazing
Member # 5755
Profile #8
Would there be any place in a creature script to check terrain, and possibly have a result happen? Could a creature script also look at the character location, and then at the terrain at that location, and then do an action?
Hmmm.

--------------------
quote:
Originally written by Kelandon:

Well, I'm at least pretty sure that Salmon is losing.


Posts: 4114 | Registered: Monday, April 25 2005 07:00
Shock Trooper
Member # 7662
Profile #9
If you really want to use the features of a town in an outdoor fight you can borrow an idea from the Exodus scenario. Create a real town, have the fight take place there, then make the town invisible when the PCs leave it, this would use the Exit state:
beginstate EXIT_STATE;
set_town_visibility(12,0);
break;

Floor and terrain types can only call Scenario script states, they do this as part of their special properties. To call anything else would involve the use of terrain scripts, one per square.

[ Tuesday, April 24, 2007 17:23: Message edited by: Ishad Nha ]
Posts: 292 | Registered: Monday, November 13 2006 08:00
Shaper
Member # 7472
Profile Homepage #10
Creature scripts work fairly reliably in outdoor fights, so what I'm doing (or planning on doing, anyway) is creating a duplicate of the desired creature(s) and giving them a different default script. Then, when a certain fight is joined, use the special when met thing to call a state that sets a flag. Then, when the creatures are initializing, have a bit of code in their INIT_STATE and having the code play out in that, so long as the flag is set correctly. Then, once the creature is done with whatever it's doing, reset the flag so that none of the other creatures can call it.

EDIT: And I fairly certain that most calls that work for towns also work for outside fights.

[ Tuesday, April 24, 2007 17:17: Message edited by: Nioca ]

--------------------
I tried to think of something witty to put here.

Needless to say, I failed.
Posts: 2686 | Registered: Friday, September 8 2006 07:00
Lifecrafter
Member # 6193
Profile Homepage #11
Some, but not all. I can't really comment much on this, except that I remember some "Error: Town function called outdoors" or some such messsages when testing E:R, so proceed with caution when doing odd things outdoors.

--------------------
Guaranteed to blow your mind.

Frostbite: Get It While It's...... Hot?
Posts: 900 | Registered: Monday, August 8 2005 07:00
Infiltrator
Member # 148
Profile #12
The whole reason I wanted it outdoors was so that the party cannot rest or use any town-only functions. I also didn't them to be able to enter and then leave w/o killing everyone. I know I can extend the border of the town from (1,1) to (48,48), but there is no call to force them to leave unless I use move_to_new_town(). Correct? Also, I'll probably test this later, but you can perform a teleport (within a town) and call a cutscene upon the death of an NPC, correct?

--------------------
My ego is bigger than yours.
Posts: 480 | Registered: Thursday, October 11 2001 07:00
Shaper
Member # 7472
Profile Homepage #13
quote:
Originally written by Dahak:

I know I can extend the border of the town from (1,1) to (48,48), but there is no call to force them to leave unless I use move_to_new_town(). Correct?
That's the only call that immediately moves them to a new town, though you have to have the party step on it or it won't work. You can also teleport them to an area where they have no choice but to leave.

quote:
Also, I'll probably test this later, but you can perform a teleport (within a town) and call a cutscene upon the death of an NPC, correct?
Yes. You can pretty much do anything in a DEAD_STATE that you could in a normal state.

--------------------
I tried to think of something witty to put here.

Needless to say, I failed.
Posts: 2686 | Registered: Friday, September 8 2006 07:00
Infiltrator
Member # 148
Profile #14
In that case I'll make it impossible for them to leave, and then when they've killed everyone, I'll move them to the second fight. Is there any way stop them from leaving fight mode? Also, this is a 1 on 1 fight.

--------------------
My ego is bigger than yours.
Posts: 480 | Registered: Thursday, October 11 2001 07:00
Infiltrator
Member # 5576
Profile Homepage #15
quote:
Is there any way stop them from leaving fight mode?
Not really. You could do something like what Kelandon did in Bahs and punish the player for leaving combat mode, but that's about all. (I would also remark that this method alone is not necessarily very effective. My whole party died repeatedly in Bahs before I figured it out, because I didn't realise that if I enetered combat mode I would stop taking damage.)

--------------------
Überraschung des Dosenöffners!
"On guard, you musty sofa!"
Posts: 627 | Registered: Monday, March 7 2005 08:00
Infiltrator
Member # 148
Profile #16
So, a warning not to leave combat mode or instant death while in the town? Yay! The minute they leave combat mode, DIE!

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