Jump to content

Perks/Attributes as Quest Rewards


NattHrafn

Recommended Posts

Hi Guys,

 

I'm currently fiddling around with the whole modding thing. (And I must say, I quite enjoy it. ^^)

 

Just for experimenting, I'm trying to introduce a Class System with a chain quest for each class. Now, so fare so good, this seems to work. But it would be fancy if I could add Attribute Points as quest rewards (Archery Class gives points in Perception, etc.), and not just Items, XP, Skill Points or loot... But I can't figure out how to do it.

 

Anyone got an idea? Is it even possible?

 

Thanks in advance,

Hrafn

Link to comment
Share on other sites

So I think this will work for what you are after. It worked in game for me

 

First you will make an item like this as fast example

<item name="RaiseAttributePerception">
<property name="Extends" value="drugPainkillers"/>
<property name="DisplayType" value="drugSteroids"/>
<property name="Group" value="Food/Cooking"/>
<property name="EconomicValue" value="250"/>

<effect_group tiered="false">
	<display_value name="dStrength" value="3"/>
	<display_value name="dCarryCapacity" value="50"/>
	<display_value name="waterAmount" value="-50"/>

	<!-- <triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="waterPerkDisplay" operation="add" value="@waterHydrationPSec"/> -->
	<triggered_effect trigger="onSelfPrimaryActionEnd" action="AddBuff" target="self" buff="Raise_Attribute_Perception"/>
</effect_group>
</item>

 

Next add this line to your quest reward <reward type="Item" id="RaiseAttributePerception" value="1" />

Full code and for testing reasons I used the starter quest when in full looks like this

	<quest id="quest_BasicSurvival1">
	<property name="group_name_key" value="quest_BasicSurvival" />
	<property name="name_key" value="quest_BasicSurvival1" />
	<property name="subtitle_key" value="quest_BasicSurvival1_subtitle" />
	<property name="description_key" value="quest_BasicSurvival1_description" />
	<property name="icon" value="ui_game_symbol_map_bed" />
	<property name="category_key" value="quest" />
	<property name="difficulty" value="veryeasy"/>
	<property name="offer_key" value="quest_BasicSurvival_offer" />
	<property name="shareable" value="false" />

	<action type="ShowTip" value="tutorialTipQuest02" />
	<action type="TrackQuest" />

	<objective type="FetchKeep" id="resourceYuccaFibers" value="20" phase="1" />
	<objective type="Craft">
		<property name="phase" value="2" />
		<property name="item" value="bedroll" />
		<property name="count" value="1" />
	</objective>

	<objective type="BlockPlace" id="bedroll" value="1" phase="2" />

	<reward type="Exp" value="100" />
	<reward type="Item" id="RaiseAttributePerception" value="1" />
	<reward type="Quest" id="quest_BasicSurvival2" />

   </quest>

 

Lastly make a buff like this

	<buff name="Raise_Attribute_Perception" icon="ui_game_symbol_perk" icon_color="132,0,155">
	<effect_group>
			<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" target="self" buff="Raise_Attribute_Perception"/>
			<passive_effect name="AttributeLevel" tags="attPerception" operation="base_add" value="1" />
	</effect_group>
</buff>

 

When in game upon quest completion they will receive the item, and when they use the item they will add an attribute level to perception in this case. You would need to make items and buffs for all of the attributes but its the only way I can think of to do this. Hope it helps, Cheers!

Link to comment
Share on other sites

You could also make it levels or stages and the next quest require that the player has the previous attribute level before they complete it.

 

So you could make <buff name="Raise_Attribute_Perception01", 02, 03 and so on and do this.

<requirement type="Group" value="OR" phase="1" >
		<requirement type="Buff" id="Raise_Attribute_Perception01" />
	</requirement>

It would check if they had the buff Perception01 and if so the reward could be perception02. Just food for thought for ya

Link to comment
Share on other sites

Thanks a lot, Sorrowthief!

 

That seems like it definitely should work, so I'll definitely go for that solution for now.

But it's not quite as elegant as I was hoping. I mean, it involves the player having to level the skill manually; and I was really hoping for something that does this automatically for you. But I guess that's just how it is... :)

 

PS: While writing this I was thinking: Is it possible to have a buff on an item that is triggered upon receiving the item/having the item in the inventory; and is it possible for a buff to "self-destroy" the item it was triggered by?

Link to comment
Share on other sites

Thanks a lot, Sorrowthief!

 

That seems like it definitely should work, so I'll definitely go for that solution for now.

But it's not quite as elegant as I was hoping. I mean, it involves the player having to level the skill manually; and I was really hoping for something that does this automatically for you. But I guess that's just how it is... :)

 

PS: While writing this I was thinking: Is it possible to have a buff on an item that is triggered upon receiving the item/having the item in the inventory; and is it possible for a buff to "self-destroy" the item it was triggered by?

 

I don't think so as far as items are concerned but I just came back to modding so I would have to look closer. I do believe it's possible for the buff to remove itself, I set the value to 0 which I believe is infinite so for that part you could try changing the value to like a few seconds or something and check to see if even after the buff is gone the player retains the attribute point. The part I don't know is doable is apply buff on pick up. Now I know you can carry over the same type of result to blocks that would do that. The player walks over a block with the buffswhenwalkedon trigger and they could get it that way but I don't know how you would use that if you are modding for randongen and not Navez map. If it was Navz map you could already ha e these blocks in the spots you wanted and when the player walks over the block you set at the end of a quest it could do this. If you want to tell me more or exactly the idea you can pm me if it's a secret or tell me here and I'll try to see what I can do. I'm working till 12pm today, I'll try to figure out some stuff for you when I get home.

 

I just re-read your request and yes the example I gave you already detroys that item as the stack size is just one and it's a consumable

Link to comment
Share on other sites

If you're using an item, create an item with the following:

 

<property name="Extends" value="unlockBookMaster"/>
<property class="Action0">
<property name="Class" value="GainSkill"/>
<property name="Skills_to_gain" value="perkRuleOneCardio"/>
</property>

 

Replace perkRuleOneCardio with attribute/perk of choice from progression.xml. Equip item and left click. Can add the item on quest completion.

Link to comment
Share on other sites

If you're using an item, create an item with the following:

 

<property name="Extends" value="unlockBookMaster"/>
<property class="Action0">
<property name="Class" value="GainSkill"/>
<property name="Skills_to_gain" value="perkRuleOneCardio"/>
</property>

 

Replace perkRuleOneCardio with attribute/perk of choice from progression.xml. Equip item and left click. Can add the item on quest completion.

 

That's really the same thing I did except one is a consumable and the other a book type item. I think what he was asking was is there a way to apply the buff by just picking the item up and not have the player have to equip and use it.

Link to comment
Share on other sites

You Guys are amazing, thanks a lot!

That solution is exactzly what I've been dreaming of. ;)

 

@Sorrowthief: I'm currently still just playing around with these things, I don't really have much of a plan. What I've been thinking is that for each Player Attribute there's a chain quest that is startet at reasonable points of the Basic Survival (like the strength/melee-quest starts as a reward of the "craft a wooden club" and the perception/archery-quest as a reward for the "craft a wooden bow", etc.). And then these quest chains let you progress in that attribute... A bit like in A16 Ravenhears, or so.

(But in the long run - so it will probably never happen - I'm thinkig of writing an overhaul that changes the game to an medieval-fantasy-setting. I'm thinking of magic instead of firearms; lots of different bows, swords, and so forth; orks for zombies; etc.)

 

@Deceptive Pastry: I'll definitely have to look into the .dll at some point. I'm still new to modding, but I want to do it propperly. ;)

Link to comment
Share on other sites

You Guys are amazing, thanks a lot!

That solution is exactzly what I've been dreaming of. ;)

 

@Sorrowthief: I'm currently still just playing around with these things, I don't really have much of a plan. What I've been thinking is that for each Player Attribute there's a chain quest that is startet at reasonable points of the Basic Survival (like the strength/melee-quest starts as a reward of the "craft a wooden club" and the perception/archery-quest as a reward for the "craft a wooden bow", etc.). And then these quest chains let you progress in that attribute... A bit like in A16 Ravenhears, or so.

(But in the long run - so it will probably never happen - I'm thinkig of writing an overhaul that changes the game to an medieval-fantasy-setting. I'm thinking of magic instead of firearms; lots of different bows, swords, and so forth; orks for zombies; etc.)

 

@Deceptive Pastry: I'll definitely have to look into the .dll at some point. I'm still new to modding, but I want to do it propperly. ;)

Good deal bud, it's inspiring to see a new modder full of enthusiasm all these years later, takes me way back. I used to be real good at this stuff but I stepped away for a few alphas and have some learning/catching up to do with all the new stuff they have added. Best of luck, let me know if I can try and help in anyway.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...