• Welcome to the Fable Community Forum!

    We're a group of fans who are passionate about the Fable series and video gaming.

    Register Log in

Creating New Quests [How To]

Keshire

Modder
Joined
Mar 9, 2007
Messages
271
Reaction score
113
Points
115
Here we go. Here's how to start a new quest script.

You'll need to modify 2 files and add a new one.
luaenums.lua to add the scriptcode (There's more than enough unused for now though)
scriptactivation.lua to add the scriptactivation

And the new quest script.
The quest script has to be the same name as the questname your using in the scriptactivation

I'm using a scriptcode that isn't used at the moment.
scriptactivation.lua
Code:
-- QO810 Test
ScriptActivation[ScriptCode.QO810] = {}
ScriptActivation[ScriptCode.QO810].name = "QO810_KesQuest"
ScriptActivation[ScriptCode.QO810].display_name = "Kes Test Quest"
ScriptActivation[ScriptCode.QO810].start_chap = Chapters.Start
ScriptActivation[ScriptCode.QO810].end_chap = Chapters.End
ScriptActivation[ScriptCode.QO810].states = 
{
    "START"
}
ScriptActivation[ScriptCode.QO810].AbleToRun = nil

scripts/quests/QO810_KesQuest.lua
Code:
module(...,package.seeall)

QuestManager.NewQuestQuestThread("QO810_KesQuest")

function QO810_KesQuest:Init()
end

function QO810_KesQuest:State_START_SkipTo()
end

function QO810_KesQuest:State_START_Main()
    while true do
        coroutine.yield()
    end
end

function QO810_KesQuest:OnExit()
end

And now the quest is active from startgame to endgame.

I'll list how to register it in the hero's quest table next.
 
Top