The magical subsystem
The magical system in Traveller is very complex and very complicated... Spells can be cast on spells, spell can be cast on specific targets, spell can be cast on characters and all of them will have different reactions according to the spell...
Let's just take an example how we can mess up something... Let's say the player casts the spell 'Fire' (which creates a fireball) and then he casts 'Move' after it, the normal result should be that the fireball will start flying toward the target... But what will happen if the player casts 'Move' followed by the 'Fire' spell. Try to imagine. The move spell tries to move the thing that it was cast on. If there is no target for it, then it should create some kind of moving stream away from the player... So what will happen if we cast fire on a moving stream... The stream should be turned to fire of course. So, the inverse spell would actually create a fire wave... or something similar.
Now, of course all this must go into code...
The first thing that came up when I was thinking how in the heck should I even try to imagine the very complicated magical system as an abstraction for the computer was to create a list of all the possible combinations and simply choose the one the player has cast. But this will not work, since the magic system was thought to offer endless possibilities of creating spells (of course, depending on the player magical possibilities) so I just threw away this idea... If I'd been stuck to this, then fine, I could have hard coded the Fire-Move and Move-Fire sequences having the result above, and done... But what if the player would have been wanting to cast: Move-Fire-Move which of course would have moved the fire wave away from him... This wouldn't have been working.
The next idea was to create a kind of automaton which gets as input symbols the spells and its nodes are different phases which can work as spells to, but it allows the spells to be casted on to... This sounds a nice idea, but it requires a lot of thinkings and ideas. This way the output of a spell could be used as an input for the next one, this way creating the required mechanism to cast spells on a spell result which could be a spell too... But the problem of expanding the system would be almost impossible (I mean, when the player wants to create a new spell... which is not equal to the combination of two already existing spells), because we can't make it possible binding s spell created by player X to a spell created by player Y without contacting both of them and spending lot of time...
Finally, the third solution was the most appealing to me. Create a powerful scripting language which interacts with the world and the entities of the world (world entities are based on some type so it would be enough to define a spell which interacts with different kind of types) and of course, build the entire world based up on this scripting language. So when the player wants to turn to gold a wall he can do it (of course, after this he'll need a bunch of weapons to protect it).
This last idea is the most intuitive one, because once a player creates a spell he can upload it to the common server (Oh, sorry I forgot to mention that I have fantasized a MMORPG game where the players create their own worlds, upload, the server assigns a sequence of runes to the world, and from that moment every player can go to that world by simply casting the transport spell to the specific world) and everyone can enjoy it...
Of course, this would make some real good spellcasters who will master the new scripting language, and yes, this would lead to unbalancing the game, so I have to think to a way that the more complex (and powerful) the spell is the more 'resources' it takes from the player, so if he'll want to cast something way above his capabilities he'll simply die...
(c) 2006 fritzone