GameGuru Store / Moshroom's Quest Script

Author
Message
Moshroom
4
Years of Service
User Offline
Joined: 18th Jul 2015
Location: Finland
Posted: 6th Jan 2016 09:30 Edited at: 6th Jan 2016 21:08
If you have questions, comments, etc. regarding my Quest script, you can contact me directly or post to this thread (which I recommend because I read the posts in the forum more actively than my Store account).

Video about the script:

https://www.youtube.com/watch?v=RLzY8lp7WC8

Description:

This script creates a flexible alternative for a Quest system.

Features:
- 5 Quest types (Get, Give, Bribe, Kill, Destroy)
- 5 Rewards (Weapon, Admission, EXP, Gold, HP)
- 4 RPG compatible AI:s for Kill Quest (Character, Creature, Taurus, Zombie)
- 5 FPS compatible AI:s for Kill Quest (Character, Creature, Taurus, Zombie, Soldier)
- NPC character that tells player's Quest status
- Bonus: 2 Objects with EXP threshold (Weapon, Door)

Getting started:

1) Place a character entity into your map with AI System:Main set to moshroom_quest_begin.lua. ("Initiator")
2) Change the name of the entity to a number between 1 and 9999. This will link together all the parts of a certain Quest.
3) Place an entity into your map with AI System:Main set to moshroom_quest_bribe.lua, moshroom_quest_destroy.lua, moshroom_quest_getitem.lua, moshroom_quest_giveitem.lua or moshroom_quest_kill_N.lua.
4) Change the name of the entity to a number between 1 and 9999. Make sure that this is the same number you used previously.
5) Make sure that Static Mode -boolean is set to No.

Setting a reward - Option 1:

6) Place an entity into your map with AI System:Main set to moshroom_quest_reward_door.lua or moshroom_quest_reward_weapon.lua.
7) Change the name of the entity to a number between 1 and 9999 as previously.

Setting a reward - Option 2:

6) Change the Strength value of the Initiator (entity with moshroom_quest_begin.lua) to set the amount of the Reward.
7) Reward type will depend on other RPG scripts in use. If there is RPG AI on the map, reward will be EXP. If there is RPG Shop in the map, reward will be Gold. If there are no RPG scripts on the map, reward will be Health.

Quest 1 : Get Item

Objective: Player must collect every item with AI System:Main set to moshroom_quest_getitem.lua and Name set as the same number as the Initiator
Multiple targets: Yes
RPG compatible: Yes (the item isn't shown in the Inventory in version 1.1 RPG Menu)
Save/Load compatible: Yes

Quest 2 : Give Item

Objective: Player must talk to character entity with AI System:Main set to moshroom_quest_giveitem.lua and Name set as the same number as the Initiator
Multiple targets: No
RPG compatible: Yes (the item isn't shown in the Inventory in version 1.1 RPG Menu)
Save/Load compatible: Yes

Quest 3 : Bribe

Objective: Player must give money to character entity with AI System:Main set to moshroom_quest_bribe.lua
Multiple targets: No
RPG compatible: Yes
Save/Load compatible: Yes
Misc: Doesn't require Initiator

Quest 4a : Kill (RPG)

Objective: Player must kill every character with AI System:Main set to moshroom_quest_killrpg_Y.lua and Name set as the same number as the Initiator
Multiple targets: Possible
RPG compatible: Yes
Save/Load compatible: Yes
Other: The character will be invulnerable and behave as neutral until the Quest is initiated

Quest 4b : Kill (FPS)

Objective: Player must kill every character with AI System:Main set to moshroom_quest_kill_Y.lua and Name set as the same number as the Initiator
Multiple targets: Possible
RPG compatible: No
Save/Load compatible: No

Quest 5 : Destroy

Objective: Player must destroy every entity with AI System:Main set to moshroom_quest_destroy.lua and Name set as the same number as the Initiator
Multiple targets: Possible
RPG compatible: No relevance
Save/Load compatible: No

NPC : Quest Overview

A character that tells player's Quest status. If there is an RPG Shop or Bribe Quest on the map, the character also tells the amount of Gold. If there is an RPG AI or RPG Kill Quest on the map, the character also tells the RPG Status.

Misc : Quest Door

The door is locked until player accepted certain Quest (use number in the Name field of the doors like previously).

Misc : EXP Door

The door is locked until player has collected the amount of EXP defined in the Strength parameter of the EXP Door.

Misc : EXP Weapon

The weapon is uncollectable until player has collected the amount of EXP defined in the Strength parameter of the EXP Door entity.

How to customize:

1) Create Quests folder (Game Guru\Files\Quests\)
2) Create dat file to Quests folder to override a default dialogue (eg. Game Guru\Files\Quests\request1.dat)
3) Write text to your dat file.

Data files (X = Quest number):

nameX.dat - Name of the target entity. Works with every Quest type. If there is no name set, the name of the entity will be "???" and the Initiator will use vague terms when speaking about the target (e.g. "There's something I want you to destroy."

initiateX.dat - Two first lines of this file are read. First line will be used as the name of the Initiator (entity with moshroom_quest_begin.lua). Second line will be the conversation initiation line of the character. If these aren't set, the name of the character will be "???" and the initiation line will be "Hey you! Got a minute?".

requestX.dat - The Initiator will speak these lines before the Quest has been accepted. Each line in the file represents a sentence the character will speak between player pressing E.

activeX.dat - The Initiator will speak these lines after the Quest has been accepted but before it's finished. Each line in the file represents a sentence the character will speak between player pressing E. If there is only one line and there are multiple targets, the amount of remaining targets will also be shown.

completedX.dat - The Initiator will speak these lines after the Quest is finished. Each line in the file represents a sentence the character will speak between player pressing E.

bribeX.dat - The target character of the Bribe Quest will speak these lines after the Quest has been accepted. Each line in the file represents a sentence the character will speak between player pressing E.

giveX.dat - The target character of the Give Quest will speak these lines before the Quest has been accepted. Each line in the file represents a sentence the character will speak between player pressing E.

killX.dat - The target character of the RPG Kill Quest will speak these lines before the Quest has been accepted (Note that the target of the FPS Kill Quest will be active even before initiating the Quest and therefore never talks these lines). Each line in the file represents a sentence the character will speak between player pressing E.

destroyX.dat - This will be shown when player approaches the target of the Destroy Quest. First line will be shown if player approaches the entity before the Quest has been accepted and the second one after the Quest has been accepted.

itemX.dat - This will be shown when player approaches the target of the Get Quest. First line will be shown if player approaches the entity before the Quest has been accepted and the second one after the Quest has been accepted.

doorX.dat - This will be shown when player approaches a Quest Door or Reward Door before the Quest has been initiated.

The Quest script is published in the Asset Store:

https://en.tgcstore.net/product/26063

For my other compatible scripts, please visit these threads in the Scripts forum:

https://forum.game-guru.com/thread/213751 (RPG Module)
https://forum.game-guru.com/thread/213084 (Save Game / Load Game)

Attachments

Login to view attachments
Pirate Myke
Forum Support
9
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 7th Jan 2016 06:24
Got it. thank you.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

Login to post a reply

Server time is: 2020-02-29 05:52:50
Your offset time is: 2020-02-29 05:52:50