Putting the 'role' back in role-playing games since 2002.
Donate to Codex
Good Old Games
  • Welcome to rpgcodex.net, a site dedicated to discussing computer based role-playing games in a free and open fashion. We're less strict than other forums, but please refer to the rules.

    "This message is awaiting moderator approval": All new users must pass through our moderation queue before they will be able to post normally. Until your account has "passed" your posts will only be visible to yourself (and moderators) until they are approved. Give us a week to get around to approving / deleting / ignoring your mundane opinion on crap before hassling us about it. Once you have passed the moderation period (think of it as a test), you will be able to post normally, just like all the other retards.

Procedurally Generated Garbage: NWN2 Edition

Crichton

Prophet
Joined
Jul 7, 2004
Messages
1,214
So I've recently figured out how to make some simple procedurally generated quests in the NWN2 toolset. There are a few caveats; I can't journal entries on the fly, so each quest type from a given quest-giver use the same set of journal entries and are hence "one at a time".

Sample Code:

void main() {
object oPC = GetFirstPC();
int i, n;
string sTemplate, sNumber;

i = Random(2);
n = Random(10);
sNumber =IntToString(n);
if (i==0) {
SetCustomToken(1000, "Spears");
sTemplate = "nw_wplss001"; // Tag in Caps
}
if (i==1) {
SetCustomToken(1000, "Hides");
sTemplate = "n2_crft_hideleather"; // Also the tag
}
SetCustomToken(2000,sNumber);
SetGlobalInt("Number",n);
SetGlobalString("Template",sTemplate);

CreateItemOnObject(sTemplate,oPC,n, "", 1);
}

Convo line:

Very well, take these <CUSTOM2000> <CUSTOM1000> to the gnome.

Journal Entries:

I have been contracted to deliever <CUSTOM2000> <CUSTOM1000> to the gnome.

I have delivered <CUSTOM2000> <CUSTOM1000> to the gnome.

I have failed to deliever the <CUSTOM1000> and must make restitution.

My business with the Dwarf is finished.

My current module is just about finished and trying to add more quests to it at this point would require too much effort. But I plan to make procedural quests the backbone of my next mod. The big question is, how?

There weren't enough quest-types in Daggerfall to keep me interested (at least not with the scuzzy gameplay) and they all seemed to boil down to tromping through a nearly identical dungeon and stomping $Monster.

So what kind of quests should I try to create and how should I try to spice things up? Keep in mind that I want every quest to involve something more than walking to $NPC and clicking pickpocket.

Current prospective quest-type list:

Hunting (bring back $number $animal part)
Escort (spawn an NPC of $Type with $Name who wants to be taken to $Area)
Delivery (as above, with possible bandit attack on area transition where the PC can skip the fight and fail the quest by handing over the goods)
Bounty Hunting (Kill $Dude out in the wilderness)
Robbery (hold up $merchant on $road)
 

Oarfish

Prophet
Joined
Sep 3, 2005
Messages
2,511
The guy behind Iinfinity is doing some interesting things with natural language generation / procedural stories. Article here. I don't think you would be able to implement it in a scripting language, but you could always use something like it to generate scripts..
 

Crichton

Prophet
Joined
Jul 7, 2004
Messages
1,214
Both of those are interesting in their own way.

What I've come up with so far is a series of possible variations for each quest, expressed in area transition encounters.

Some could happen during any quest, examples:

-Attack by wild animals (survival allows you avoid, you can try sneaking past them, but it's really tough)

-Bandits demand you pay a toll (sneak past them if you can, diplomacy lessens they amount, intimidate can get them to back off completely, but might fail, or you can just kill them all)

Examples for a "delivery" quest:

-Hold Up (bandits know you have the goods, you can hand them over and fail the quest, use intimidate to try to scare them, fight them or sneak past)

-Illegal Goods [only happens when working for shady merchants] (a sheriff accosts you and tells you the goods are illegal; you can hand them over and fail the quest, fight it out and risk being outlawed or try to bluff your way out)

-Offer to Buy (a rival offers to buy the goods for megabucks, accept and fail the quest, use appraise to up your price

-Hard Luck Story (starving beggars ask for your goods for a good cause, hand them over to fail the quest or let them suffer, possibly hurting your rep with the common folk)

-Fake Cop (Like Illegal goods, but the sheriff is phony, spot sees through the ruse)

-Ambush (The buyer decides to kill you instead of paying, quest automatically fails and you have to fight your way out, hopefully you get enough loot to pay off your employer since he'll inevitably blame it on you)
 

Trojan_generic

Magister
Joined
Jul 21, 2007
Messages
1,565
Strap Yourselves In Codex Year of the Donut Codex+ Now Streaming!
Just an idea for another quest type: Go get me something special, with the possibility of crafting the item, buying/stealing it or finding it. Might work with procedural generation as long as raw materials or the item are somehow available.
 

As an Amazon Associate, rpgcodex.net earns from qualifying purchases.
Back
Top Bottom