Quest Loot Items...

Mar 8, 2015
51
0
6
#1
Hello,

I am able to grant Credits for completing a quest:

{ rewardType = "credits", amount = 152000 },

I am able to grant a LootGroup Item from completing a quest:

{ rewardType = "loot", lootGroup = "pod_racer" },

I am able to grant permission/access to an area from a quest:

{ rewardType = "permission", permissionGroup = "emperors_retreat2" }

Also able to grant faction for a quest reward:

{ rewardType = "faction", faction = "imperial", amount = 75 },


Is there a way to grant an item from tangible area for a quest reward? Just as an example a swoop

object/tangible/deed/vehicle_deed/speederbike_swoop_deed.iff

I am not sure how to change the code to pull from the tangible area.  Any help would be great!
 

Lasko

Moderator
Staff member
Moderator
Feb 13, 2012
272
12
18
#2
Easiest way would be to just make a new loot item and group for your object.

BARC item

BARC group

Or if you wanna do it this way, pick from the list in themeParkLogic.lua

Code:
	local rewards = mission.rewards

	for i = 1, # rewards, 1 do
		local reward = rewards[i]
		if reward.rewardType == "credits" then
			self:giveCredits(pConversingPlayer, reward.amount)
		elseif reward.rewardType == "faction" then
			self:giveFaction(pConversingPlayer, reward.faction, reward.amount)
		elseif reward.rewardType == "loot" then
			self:giveLoot(pConversingPlayer, reward.lootGroup)
		elseif reward.rewardType == "loot_set" then
			self:giveLootSet(pConversingPlayer, reward.lootGroup, reward.setSize)
		elseif reward.rewardType == "badge" then
			self:giveBadge(pConversingPlayer, reward.badge)
		elseif reward.rewardType == "permission" then
			self:givePermission(pConversingPlayer, reward.permissionGroup)
		elseif reward.rewardType == "item" then
			self:giveItemReward(pConversingPlayer, reward.itemTemplate)
		end
	end
end
 
Mar 8, 2015
51
0
6
#3
Lasko said:
Easiest way would be to just make a new loot item and group for your object.

BARC item

BARC group

Or if you wanna do it this way, pick from the list in themeParkLogic.lua

Code:
	local rewards = mission.rewards

	for i = 1, # rewards, 1 do
		local reward = rewards[i]
		if reward.rewardType == "credits" then
			self:giveCredits(pConversingPlayer, reward.amount)
		elseif reward.rewardType == "faction" then
			self:giveFaction(pConversingPlayer, reward.faction, reward.amount)
		elseif reward.rewardType == "loot" then
			self:giveLoot(pConversingPlayer, reward.lootGroup)
		elseif reward.rewardType == "loot_set" then
			self:giveLootSet(pConversingPlayer, reward.lootGroup, reward.setSize)
		elseif reward.rewardType == "badge" then
			self:giveBadge(pConversingPlayer, reward.badge)
		elseif reward.rewardType == "permission" then
			self:givePermission(pConversingPlayer, reward.permissionGroup)
		elseif reward.rewardType == "item" then
			self:giveItemReward(pConversingPlayer, reward.itemTemplate)
		end
	end
end

thank you Lasko!!! That is what I was needing the "item" part.  I am writing a armor quest and didn't wanna create a bunch of loot items and groups.
 
Sep 13, 2013
188
2
18
#4
any quick fixes to restrict themeparks to a certain skill discipline? right now I'm using standard screenplay construction to build pseudo themeparks where I can change conversations and results based on a particular train skill, so for instance "jedi_light_side_journeyman_novice", or "crafting_architect_master", etc... sure would be nice, and elegant, to figure out how to work that into the themepark logic.

:)
 

Lasko

Moderator
Staff member
Moderator
Feb 13, 2012
272
12
18
#5
Know you can restrict faction, the only skill limited quest I can think of is the RIS armour quest.

As they both use Luas, there may be a way to use the same checks. Try looking through the TP logic file above for the factional checks, there may be something there you can use or adapt. I'll look a little deeper when I get more time later tonight.
 

drdax

New Member
Jun 11, 2015
132
0
0
#6
Lasko said:
Know you can restrict faction, the only skill limited quest I can think of is the RIS armour quest.

As they both use Luas, there may be a way to use the same checks. Try looking through the TP logic file above for the factional checks, there may be something there you can use or adapt. I'll look a little deeper when I get more time later tonight.
that would be very cool, as I remember profession types for the 'ol NGE Empire day quests.. like the Engineer multi-step quest of finding and building / assembling ... good times!
 
Sep 13, 2013
188
2
18
#7
yeah, I've already solved this by not using themepark logic for my quests, and instead just scripting the quests using screenplay code direct, and including the object manager as a reference. it allows me to refuse quests if a player doesn't have xxx skill, or gives different rewards based on what skill you have, etc... Plus it doesn't need STF file's for converstation text, so that's a bonus too.

But... it's not nearly as easy as themepark logic to use, and thus far, all I have are the constructs, no actual quests yet since I can't figure out what "story" I want the quests to tell. Just what function I want them to provide.

-Duff
 

PikkonMG

New Member
Aug 29, 2013
14
0
0
#8
duffstone said:
yeah, I've already solved this by not using themepark logic for my quests, and instead just scripting the quests using screenplay code direct, and including the object manager as a reference.  it allows me to refuse quests if a player doesn't have xxx skill,  or gives different rewards based on what skill you have, etc...   Plus it doesn't need STF file's for converstation text, so that's a bonus too.

But... it's not nearly as easy as themepark logic to use,  and thus far, all I have are the constructs, no actual quests yet since I can't figure out what "story" I want the quests to tell.  Just what function I want them to provide.

-Duff
I did something similar at one time just goofing off using the village unlock method as my reference.

If your doing this as a Jedi quest might be better off checking if the char is a Jedi vs check for a skill.

Code:
-- Check if the player is a Jedi or not.
function MyCustomQuest.isJedi(pCreatureObject)
	return MyCustomQuest.withCreaturePlayerObject(pCreatureObject, function(playerObject)
		return playerObject:isJedi()
	end)
end
Been along time so above might off little but it gives an idea. And isjedi is referenced to ">= Greater than or equal to" So any one with a jedi state of 2 or above is allowed.