franc kaos said:
...I seem to recall a mod for MW that introduced a random dungeon creator, so how possible would it be to create a quest generator, or would that have to be built into the game engine? (I'm thinking of that combat mod that used an external program).
A random dungeon will almost certainly be do-able (though it might be very hard, it might not have a large set of possibilities, and there might be side effects). Truly random quests would not need to be hard coded, but they would require pointers to be practical (I'm 99% sure there will be no pointers in Oblivion's scripting language). Without pointers it still might be possible, but one hell of a lot harder. Don't go holding your breath.
With pointers you can write scripts based on talking to NPC X, finding object Y, going to location Z... Then pass in the identities of the NPC / object / location, to create a new quest. Without pointers you need to write specific code to deal with each situation. The same things are possible, so long as you have access to all the NPCs / objects / locations etc., it just takes a stupid amount of work.
For example with pointers:
Code:
gameObject *weapon
if ( global_RandomQuestStatus != 30 )
return
endif
Player->Equip *weapon
Without:
Code:
short weaponCode
if ( global_RandomQuestStatus != 30 )
return
endif
if ( weaponCode == 1 )
Player->Equip iron_hand_axe
elseif ( weaponCode == 2 )
Player->Equip steel_hand_axe
elseif ( weaponCode == 3 )
Player->Equip ebony_hand_axe
elseif ( weaponCode == 4 )
Player->Equip iron_mace
...
;insert laborious repetition here
...
elseif ( weaponCode == 20 )
Player->Equip ebony_longsword
endif
With pointers you'd have to write out a list like this once - for the input to the script(s). Without pointers you need to write it out whenever you do anything with the weapon. Extend this to every random NPC, every other random item, every random location, and things quickly become exceedingly annoying.
You end up writing a whole load of almost identical code for each slightly different situation. Then when anything changes, or you find a bug, you need to fix it in 50 places, rather than one place. For anything but the most simple script, this makes things exceedingly hard. I had to do it for my pool table mod for Morrowind, writing 15 almost identical scripts for 15 balls, then changing them over and over. Thankfully though, I was well prepared, since my previous mod suffered from a lack of
function pointers - meaning that the same thing needed to be done 27 times, over and over...
A random quest mod with enough possibilities to feel truly random would require similar code to be repeated (then changed, then changed again...) many more than 27 times. If anyone does do it, they'll be in need of a stiff drink afterwards.