Tuesday, May 27, 2008

Portfolio Oblivion Quest and TheDuel

Part 4 of my portfolio. The duel is a lua based text game, and a description of a quest done for Oblivion. Both done in 2006.



The Duel (2006)
amateur Lua game

After toying around in Oblivion, making a small quest and dungeon to learn their systems, I found myself intrigued with their scripting language. I was always interested in learning more coding / scripting, and this gave me a nice start. My friend Justin Smith introduced me to Lua at that point. I set out to make a small game in it, text based.

It is a mix of RPG combat damage, with Magic the Gathering style cards that you get randomly out of the card database ala crazy 8's. In short: you get a card; compare your cards in hand; decide if you want to play one or not; you deal combat damage and your opponent gets to hit you back. After combat you get a chance to play another card before your turn ends and this is where your opponents turn starts. He gets to play a card, do combat, and play another card. This way you get one chance to play a card knowing which card your opponent played, and one time where he will know what card you played.


Justin showed me the basics from setting variables to making functions and tables. He helped me debug my problems and pointed me in the right directions as to which functions / commands I should use. I came up with the gameplay idea, how to add in the cards with the combat damage, and the 'ai' of the opponent. The opponent will look at what card you played, it's health and your health and figure out which card it should prioritize to play.

Lua is a text based scripting language, feel free to download the game and look at the code.

Click to read the design doc
Click here to read an example log
Click to download TheDuel.zip


Oblivion Quest(2006)
amateur mod

Click to download CheckerQuest.zip

===================================================================================

Checkers Quest
by: Bastiaan (Checker)Frank
http://checkerschapel.beyondunreal.com

===================================================================================

This is a mod with one new quest line. Find the old man dressing in brown pants and green shirt in the arcane university. When you talk to him he will give you the quest to find his book.

====================================================================================



====================================================================================
SPOILERS:
====================================================================================

Locations: Added one cave; connected cave to Oblivion worldmap.
Characters: Magnus the cave robber; Barney the old man; Dorethy the daughter.
Items: Barneys lost book, Letter to Dorethy, Reward book.

Description:
Stage1: Barney asks you to find his book or you come upon a book in a cave.
Stage2: You read the book and get +1 Destruction magic skillup.
Stage3: You return the book to Barney, he is grateful and tells you his daughter can reward you.
Stage4: You bring a letter from Barney to Dorethy.
Stage5: You get a reward book that up's your Destruction skill by 5 as long as you carry the book with you.

====================================================================================

Script examples:

====================================================================================

;this is the reward book

Scriptname CheckerRegenBookScript01

short GotBook

Begin OnAdd Player

if GotBook == 0
player.ModActorValue destruction 5
player.addspell CheckerRewardAbility
set GotBook to 1
endif

End


Begin OnDrop Player

if GotBook == 1
player.ModActorValue destruction -5
player.removespell CheckerRewardAbility
set GotBook to 0
endif

End

===================================================================================

Scriptname CheckersOldManScript02

Begin OnAdd

;The following if statement triggers quest advancement if already on quest.
if GetStage CheckersOldManQuest01 >= 5
setstage CheckersOldManQuest01 15
endif

;The following if statement triggers quest starting if not on quest line.
if Getstage CheckersOldManQuest01 < 5
setstage CheckersOldManQuest01 17
AddTopic BMBthebook
endif
End


===================================================================================
copyright Bastiaan Frank 2006-2008
===================================================================================

Labels: ,

1 Comments:

Anonymous Anonymous said...

can u help me learn how to make a 2d scriptting game with lua?

August 11, 2008 4:19 PM  

Post a Comment

<< Home