Wheel of Time - Morrowind Mod

Gateways

[Home] [Members] [Links and Downloads] [Forums] [Modder's Resource] [Files and Pictures] [Design Specs] [Project Plan] [What's New] [Issues] [Search]


Up

Gateways/Traveling 

Created by:  Kiriel

Create Date:  12/28/2003

Status:  In Process

Summary of Magic Spell: 

A magic user can cast a spell that opens a doorway to another place. He/she and many companions/ncps can move through it to get to a new place. gateways will probably end up being a modification of the MultipleMark mod code and mine from Enchanted Paintings...not released yet. Hessi9 has provided a great perl program that extracts out the cell ID and records positions and does the teleporting. While I am working on the code for my Enchanted Paintings I keep thinking of how you guys are going to implement gateways.

The problem is you can't really replicate the gateways exactly. But, I have come up with a solution that may work....depending on a few things.

Requirements: 

These are pie in the sky requirements. They are what the books portray.

  • Gateways are different sizes depending on the magical strength and fatigue of the caster 
  • You can look through the gateways and see the destination.
  • Caster should not be able to cast any other spell until the gateway is closed.
  • Caster can make a gateway to anyplace they can think of.
  • The caster is supposed to know the starting location very well. They need to study the land there before opening the gateway.
  • You can walk around a gateway.
  • A gateway is stable until the caster drops it.
  • The gateway exists on both sides...start and destination.
  • A gateway can transport any number of people, animals, wagons.

Can anyone think up some other requirements or correct the above assumptions if I have them wrong.

Technical Difficulties of Morrowind:

  • There needs to be a destination coordinate. You can't have a menu that shows 300 cells to pick from.
  • Teleporting will only work when you know the ID's of everyone going. Is this subject to change or is the person just running around by themselves all the time?
  • You can't make a door and script the destination. You have to make a door with a defined destination and it has to be there already. You can't place it by scripting because it will have no destination when placed.....so no doors.

Implementation Possibilities:

1) Teleport everyone there. Cast the spell, use some kind of spell affect or activator that looks like a shimmering door. Fade out during the teleporting. Create activators that will be placed when the player casts Gateway. The player then activates the gateway to use it or close it down.

Predefined gateways exist with coding by xxx.  The code drains the caster of mana.  There is a menu of places that the caster may go to.  

2) I can't think of any other solution. Can anyone else?

Requirement Modifications:

Because of the difficulties, gateways are going to be a problem. If number 1 is implemented, then this is the modifications to the requirements.

1) Gateways are different sizes depending on the magical strength and fatigue of the caster.

No problem with this one. Scripting will determine which activator is placed.

2) You can look through the gateways and see the destination. 

Two solutions:

a)  Create a picture of each doorway.  See enchanted Paintings mod for how this would be done.  Lots of screenshots and every destination has a new activator. 

b)  Just show something shimmering instead.  This is easier.

3) Caster should not be able to cast any other spell until the gateway is closed. 

I don't think there is a problem with this. It will be scripting of course. May have to remove all the player's magicka until the gateway is closed down. Then return magicka to the player---starting amount minus the amount needed for the gateway.

4)  Caster can make a gateway to anyplace they can think of. 

Issue, issue issue. There are a number of ways to simulate this. And a few issues on this.  

a)  Destinations that are available:

Somehow, whatever places are open on the map, a player may go to.  How does the game mechanics place a new city on the map?  One way is for the player to have been there.  The other way is for someone to tell them about it or the player to get a map.

The trick is to have the code figure out which locations are available.  Some thinking is needed on this.

b)  Types of destinations.

i) Predefined locations
Make a list of places and that is all they can go to. Three mods use the same technology:  MultipleMark, Enchanted Paintings, and the existing WOT.  This same coding can be modified and used. 

ii) User defined locations:
In order for the player to go to other locations they know of, they will have had to travel there and decide they might want to use those locations and mark them.  We use a preset number of these.

I think it is important to have these types.  It will allow the player to set gateways to anywhere they want to get into a closet or something so they may sneak and do something.

Use the MultipleMark and Enchanted Paintings way of storing player set locations. This is not like in the books but we can say that the player really only knows of those specific locations because they had been there and decided to remember them.

5) The caster is supposed to know the starting location very well. 

They need to study the land there before opening the gateway. Not sure. Player activates a ring/amulet etc to start the pre-gateway steps. Then the player is required to stick around for x number of minutes/sec before casting the gateway.

Or just skip this.  The player is there.  The player knows the start location.  The player can cast the spell.

6) You can walk around a gateway.

No problem.

7) A gateway is stable until the caster drops it. 

No problem. Player can hit spacebar (Activate) on the gateway to drop it.

8)  The gateway exists on both sides...start and destination. 

No problem. Throw up another activator after the teleporting.

9) A gateway can transport any number of people, animals, wagons. 

Big big problem. Scripting will need to know the ID's of all to transport. How is that going to happen? You can't store string variables so you can't store an array of them. At the most you can have a set of possible companions that the player can work with. The scripts would check for those companions. Other scripted NCP's that are supposed to be someplace for a particular quest could be transported as well. A bunch of extra scripting for this. Lots unless kept down. And then what is to prevent the player from just making another one and then only the player and companions go through....not the rest of those NCP's. They get stuck at that other destination.

Conclusions:

The best solution is to do the proposed gateway. Number 1 from above. Of course, since there is no number 2 solution this is obvious.

- use teleporting technology. Spell is attached to a script. Script does all the work.

- Have the player only be allowed to hire/work with a relatively small number of possible companions that they meet on the way. Scripting wouldn't be too horrible for maybe 10-20 possible companions. Even this number will vastly expand the existing MultipleMark scripting.
Other option is the amulet/item that pulls a companion with the player.

- Activators that look like shimmering doors, based on player's max magicka. No view to destination.

- Player can teleport to any location they know of or have marked.  See text above for complete description. 

This means that any place have been to a destination to gateway to it. The player can mark up to 20 different locations. For new locations, there could be a number of predefined locations. Those should be limited to outside each village and city only. Maybe a few other places such as outside steddings and Aiel camps. Remember, there has to be a menu to choose which destination. There could be some submenus so the player picks a region first. But still, this needs to be a reasonable menu.

The above solution will be about 15-40,000 lines of code. The reason for the large amount is the need to hardcode all the teleport commands for the player and each ncp. Each new NCP you might want to teleport would get 6 lines of code per cell that exists in the game. If there are 300 possible cells to open a gateway to, then that is a minimum of 3600 lines of code for one NCP companion. Plus 6 lines of code per predefined destination. If there are 100 of those, that is another 600 lines of code.

I can go into the technical aspects of the code and the limitations for anyone who wants to work on this.

Real decisions that need to be made:

- does the gateway proposal sound reasonable? 

- what is the plan for NPC companions? This may have to change if you want gateways. 

- what is a reasonable set of questions for the player to click on before the gateway destination is chosen?


The Wheel of Time and all its subject matter is copyright by Robert Jordan.  Morrowind, the gaming engine, and the modules created for it are copyright by Bethesda.  This project is a not-for-profit endeavor.  It is done in homage to a great fantasy series.  It is not intended to be an official representation of the works of Robert Jordan.
For problems or questions regarding this web contact the webmaster: Kiriel@direcway.com.
Last updated: August 31, 2005.