Quests

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.

Moderator: POL Developer

Post Reply
Harley
Forum Regular
Posts: 360
Joined: Sat Mar 18, 2006 1:41 am
Location: Germany

Quests

Post by Harley »

Hello everyone! I search for a script-package with full or not very fully loaded quest scripts with quests something like: Mine 5 ore, Bring 10 logs, Kill 25 rats and etc.

If every one have, I'll be very grateful.
If someone have mega-great system, we can talk about rewarding for your work.

Especially interested in scripts like at Zulu Hotel Italia 7th Age, with their Quest and PvM Experience systems.
If someone from Develop team here, please, contact me. We will talk about it.

With best regards, Hrl)
Yukiko
Distro Developer
Posts: 2825
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Re: Quests

Post by Yukiko »

Ah, the quest for the ultimate questing system. :)

If you find it, please share it.

My son and I have talked about how to create a system such as you describe, possibly even one more complex. I think it would need a simple "quest language" system, supported by config files. I have never written any type of an interpreter. That is what would be needed, a simple interpreter to read a config file with simple commands that perform various functions during the "quest processing". I am certain I am not explaining this well but maybe you understand my meaning. Also, the quest system might require adjustments if your server has a class system (God forbid!). For example, you would not want a warrior class to be given a quest to mine some rare ore, or a carpenter to have to go kill 5 trolls and bring back their heads. Of course, I suppose if the warrior player wanted to he could accept the quest and choose to buy the rare ore from a miner. So maybe you would not need to adjust the quest system for use with class system based servers.

I hope you are successful in your quest. :)
User avatar
CWO
POL Expert
Posts: 1159
Joined: Sat Feb 04, 2006 5:49 pm
Location: Chicago, IL USA

Re: Quests

Post by CWO »

This brings up memories of a system I wanted to do a long time ago. I had documentation on how I wanted to structure it and everything. Config driven from a quest package, I had a ton of //Insert quest stuff here... in my scripts too. Damnit don't make me have to pull out old backups and actually script it... I think I even classified it as an easy thing to pull off, just a bit time consuming...
Yukiko
Distro Developer
Posts: 2825
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Re: Quests

Post by Yukiko »

*twists CWO's arm behind his back*
Pull out your old backups and script the damn thing!

But seriously, it would be a wonderful contribution to the Distro.
Duttones
Apprentice Poster
Posts: 54
Joined: Tue Mar 27, 2012 8:56 pm

Re: Quests

Post by Duttones »

Hi,
I have a quest system in my roleplay shard. The thing is that it is much dependent on my shard system. I can share with you in private, it can help you to have something to start with.
If you prefer to wait, I'm adapting the system to another system. I will have something more generic to use with another's shards in a few weeks, which I can share with the community.

The quests are designed in the game, so it will not read cfg's. But it can be adapted with a little work.
Yukiko
Distro Developer
Posts: 2825
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Re: Quests

Post by Yukiko »

I think a quest system designed in-game is fine but my thoughts are the config files would hold templates that would be used as a framework for setting up the quests in-game. Quests that have been created would be stored in a data file. Here's an example of a template with an explanation of it.

Code: Select all

QuestTemplate    1
{
    ItemToFind   <RandomItem>
    ItemQuantity    <amount>
    DeliverTo    <SerialOfNPC>
    Reward    <RandomItem>
    RewardQuantity    <amount>
 }
 
Above is a very simple example of a QuestTemplate. In-game you would select the quest template, in this case, template 1. A gump would appear with the items that need to be entered, ItemToFind, ItemQuantity (of items to find), DeliverTo, Reward, RewardQuantity. You could leave the ItemToFind, ItemQuantity blank and have the quest creation system pick randomly or you could enter a specific item and quantity for a custom quest. The same thing could be done for the reward section as well. I would have a button next to the DeliverTo text entry box to allow the quest creator to target the NPC to whom the delivery is to be made and have the quest creation system store that NPC's serial in the data file where the created quests are stored.

Of course this is just an example and there are many other issues that would need to be perfected but this gives a general idea of what I am thinking.
User avatar
CWO
POL Expert
Posts: 1159
Joined: Sat Feb 04, 2006 5:49 pm
Location: Chicago, IL USA

Re: Quests

Post by CWO »

Hmm... this is what I found. I though I had more documented like how the config file would be formatted and such but this was my outline. The idea was to have the quest system run through 2 main scripts. A questgiver AI script and a main script that always ran and received events from other scripts when quest objectives were done. I believe to lower the amount of code outside of the quest package, the scripts outside of the main quest script wouldn't have to check if you had the quest or anything to do with it, just send the event to the main quest script where it would be checked there. Any other question you would have for me would have to be answered knowing that I haven't really given any thought to this system for 10 years.

Code: Select all

Quest system

Quest script starts at startup and sets global prop #questscript to PID so all scripts can find it and send events to it.

Each character can only have one quest active at a time.
Current quest stored on character as a struct:

struct{	type := String type of quest, 
		obj := array of objects/npcs/serials, 
		amt := array of amounts, 
		timer := Int Gameclock when quest expires, 
		nextquest := Int Gameclock before next quest};
		
Quest Types:
	Slay certain NPC/NPCs 
		type := "slay" 
		obj := NPC template names. 
		amt := amount of each NPC to slay. 
Send event from misc/death with questscript.sendevent(struct{type := "slay", obj := npctemplate, char := killer serial})


	Gather Resource (Fishing, Lumberjacking, Mining) Taming?
		type := "gather"
		obj := objtypes of items.
		amt := amount of each item to gather.
Send event from each gathering script with questscript.sendevent(struct{type := "gather", obj := objtype, amt := amount, char := gatherer serial})


	Craft items (Alchemy, Blacksmithy, Bowcrafting, Carpentry, Cooking, Inscription, Tailoring, Tinkering)
		type := "craft"
		obj := objtypes of items.
		amt := amount of each item to craft.
Send event from each crafting script with questscript.sendevent(struct{type := "craft", obj := objtype, amt := amount, char := crafter serial})


	Give NPC items
		type := "give"
		obj := objtypes of items.
		amt := amount of each item to give.
Send event from NPC AI script with questscript.sendevent(struct{type := "give", obj := objtype, amt := amount, char := giver serial})


	Talk to certain NPC
		type := "talk"
		obj := serial of NPC.
		amt := 1 since this will be ticked to 0 when talked to.
This should be a permanent invulnerable NPC. Check that the NPC exists before setting the quest. Put a check in misc/logon to check for existance of NPC on login. Possibly make NPC invisible and only become visible when someone who has the quest triggers ENTEREDAREA (could even emulate the packet and only send it to the person with the quest when entering area). Send event from AI script questscript.sendevent(struct{type := "talk", obj := serial of NPC, char := talker serial})
Yukiko
Distro Developer
Posts: 2825
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Re: Quests

Post by Yukiko »

The quest types look good. I would rather have the quester deliver crafted or gathered items to an NPC and have that NPC send the "quest completed" event to the quest script. It simplifies things considerably by not having to add the "send event" code to all of the crafting gathering scripts. I am thinking of maybe 2-5 different quest AI scripts that could be assigned NPCs created for quests. There might be a "talk to" AI, a "deliver to" AI, etc. Also, you forgot a staple in any quest system, "rescue the damsel in distress" quest :)
User avatar
CWO
POL Expert
Posts: 1159
Joined: Sat Feb 04, 2006 5:49 pm
Location: Chicago, IL USA

Re: Quests

Post by CWO »

Yukiko and I were talking it out in Discord and I stated my reasons for something like "craft an item" without turning it in, just the fact that you crafted it. What would the point be? Well, on my shard, I was moving away from the random gain 0.1% every now and then for repeatedly doing the same thing. The whole set your macro for the night and wake up GM in the skill and able to craft everything the next day type of thing. I was figuring to have quests like...

Practice your craft. Make 100 boards and I'll help you refine your skill. Reward: 1.0% Carpentry skill gain.

or

Practice your craft. Make 100 boards and I'll teach you how to make tables. Reward: Unlock crafting tables.
ThisIsMe
Distro Developer
Posts: 101
Joined: Sun Jul 17, 2016 1:29 am
Contact:

Re: Quests

Post by ThisIsMe »

I'll post this here too, this is a very useful link to help you on the design aspects of a quest system. It describes the types of systems out there and their pros and cons as well as the types of quests.

The quest for the custom quest system
Harley
Forum Regular
Posts: 360
Joined: Sat Mar 18, 2006 1:41 am
Location: Germany

Re: Quests

Post by Harley »

Duttones wrote: Sun Jan 20, 2019 9:29 pm Hi,
I have a quest system in my roleplay shard. The thing is that it is much dependent on my shard system. I can share with you in private, it can help you to have something to start with.
If you prefer to wait, I'm adapting the system to another system. I will have something more generic to use with another's shards in a few weeks, which I can share with the community.

The quests are designed in the game, so it will not read cfg's. But it can be adapted with a little work.
I'll be very grateful for your share in private for understanding your system and our community will be very grateful to, if Quest system will be here!

PMed you.
Harley
Forum Regular
Posts: 360
Joined: Sat Mar 18, 2006 1:41 am
Location: Germany

Re: Quests

Post by Harley »

Duttones wrote: Sun Jan 20, 2019 9:29 pm Hi,
I have a quest system in my roleplay shard. The thing is that it is much dependent on my shard system. I can share with you in private, it can help you to have something to start with.
If you prefer to wait, I'm adapting the system to another system. I will have something more generic to use with another's shards in a few weeks, which I can share with the community.

The quests are designed in the game, so it will not read cfg's. But it can be adapted with a little work.
Month has passed, and no message from Duttones... it's so pitty to wait for nothing.

Maybe someone else have good quest system, like RunUO/ServUO servers have?
strobelartesao
New User
Posts: 17
Joined: Sat Sep 11, 2021 1:10 pm

Re: Quests

Post by strobelartesao »

i'll keep reading the forum, but I had to stop here and say: THis sistem would change the game allooooot! It is awesome that we are able to change UO so much.
I'm new in programing and stuf (actualy I've never programed anything! Total noob) and learning by reading all the forums posts haha
CWO wrote: Mon Jan 21, 2019 12:45 am Yukiko and I were talking it out in Discord and I stated my reasons for something like "craft an item" without turning it in, just the fact that you crafted it. What would the point be? Well, on my shard, I was moving away from the random gain 0.1% every now and then for repeatedly doing the same thing. The whole set your macro for the night and wake up GM in the skill and able to craft everything the next day type of thing. I was figuring to have quests like...

Practice your craft. Make 100 boards and I'll help you refine your skill. Reward: 1.0% Carpentry skill gain.

or

Practice your craft. Make 100 boards and I'll teach you how to make tables. Reward: Unlock crafting tables.
Post Reply