Jump to content

Teleporting the Party with an Item


Recommended Posts

I have an item in my scenario that is supposed to teleport the party to a specific town. I was using the move_to_new_town call, but then realized that it can't be used unless it's activated by a stepped on space. Is there a conceivable way to have an item teleport the party to a town from either the indoors or outdoors? Or should I scrap it?

Link to comment
Share on other sites


Don't want much, do you?


Well, since move_to_new_town doesn't work unless you move onto it and as far as I know there's no way to place special nodes or terrain scripts from within the game, you'd have to have a space set up where the party could step to activate the move_to_new_town function in advance. You *could* set up a place in each town in the scenario where you can teleport the party upon using your special item, then have that place move them to the new town when they move. It would probably work okay, but I don't think it would be easy to set up or very smooth looking.


As far as teleporting directly into a town from the outdoors, I don't believe it's possible. You *could* do something like what I mentioned above using town entrances instead of the move_to_new_town function, but it still wouldn't look very good.


My advice: just scrap it.

Link to comment
Share on other sites

You could have them use the item and then walk onto a placed special. Have the item set a sdf by calling a state in the scenario script.

If the flag is not set the special ends immediately, otherwise the move to new town happens. I don't know if this works in practice or not.

If you wanted to make it so the item worked everywhere in the scenario, doing it this way would require filling nearly every space in the scenario with such specials. I'm not even sure if BoA will let you place that many.
Link to comment
Share on other sites

It does work in practice.

Placed special for enacting this move to new town must be marked by a unique floor or terrain type. In the town concerned the floor/terrain must only occur where the given placed special occurs. (Or you could use a unique location that is easy to describe.)


Here is a specimen item:

begindefineitem 471;


it_name = "Crystal";

it_full_name = "Teleport Crystal";

it_variety = 21;

it_floor_which_sheet = 1017;

it_floor_which_icon = 9;

it_inventory_icon = 8;

it_ability_1 = 207;

it_ability_str_1 = 30;

it_value = 50;

it_weight = 5;

it_magic = 1;


A specimen scenario state:

beginstate 30;


print_str_color("Now go walk onto the purple carpet.",2);


(The purple carpet covers the area of the placed special.)


The placed special from the town script:

beginstate 16;

if (get_flag(200,0) == 0) {




move_to_new_town (13,17,17);


Link to comment
Share on other sites

That still requires the party to travel to a set location to activate the move_to_new_town special. I can't be sure exactly what Excalibur wanted, but I don't think that was it. Yes, you could do things that way. It's still not something I would recommend.


Also, if you have to put in specific teleport spots anyway, at that point it's probably more user-friendly to just have the special rectangle check for the item and ask if the player wants to teleport rather than make the player use the item.

Link to comment
Share on other sites

In E2 and E3 you had a spell: Word of Recall.

In the first Avernum trilogy you had an expendable Recall Crystal.

In A3 you eventually get a permament item, the Jewel of Return, that returns you to the start, if you are not too far from the start.

I tried to replicate the Return to Start function in my Avernum Templates, see:



You could only recreate the Return to Start function if there was viable A3 legacy code found in the BoA engine. I don't know if there is.

Edited by Ishad Nha
Link to comment
Share on other sites

  • 1 year later...

One of the original suggestions — have the item teleport the party to a specific part of town where the party can only step in one direction, and have the move_to_new_town() special there — would work. This is how I dealt with the move_to_new_town() limitation in Thanopolen Tower in Exodus, where a town change needed to be triggered by a combat death.

Link to comment
Share on other sites

Wouldn't that mean basically hiding a tile somewhere inaccessible in every town and having the item script call it depending on the town? Probably via SDF setting upon town entry.

I did hide a portion of the town, yes. You move the party there via march_party() or the like, and then let the party take a step. Once the party steps on the special rectangle, move_to_new_town() can be activated.


Because you can read the town number using current_town(), you can send the party to wherever you want in that town; it doesn't have to be the same coordinates in each town.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...