Adding custom quest action
Posted: Sun Oct 11, 2020 4:57 am
So. I recently released a mod called Pilgrimages (http://forums.dfworkshop.net/viewtopic. ... 783b88080b)
The gist of it is that it lets you go to wilderness shrines to pray to the divines. Most of the time, prayer will only get you some vague advice messages, but there's a chance that you will get a negative or positive effect, like being given an item, getting teleported to a random dungeon, being assigned a quest by one of the divines, getting your legal reputation modified, etc. All off this is handled through the quest system.
I intend to keep updating the mod with some more effects, and an effect i have had in mind since the start is being blessed/cursed with a week of good/bad luck. It'd essentially lower or raise your Luck attribute temporarily and then set it back to normal.
I think making this work with the rest of the mod would require to implement a custom quest action to modify player attributes. There is already some level of interaction between the quest system and player attributes, as actions like "when attribute Luck is at least 50" can clearly check the value of these player attribute variables, so the idea would be to introduce an action capable of modifying them, along the lines of "change attribute Luck +10"
I'm mostly a noob when it comes to Unity and C#. I did learn some basic stuff about using transforms and vector3 movement to make a mouselook fps character and using a raycast to create crosshair interaction a few months ago for a college project, but that's as much as I know.
I AM pretty good at figuring out how stuff works once I start fiddling around with it, but the scripts of a project as vast as DFU are so intimidating to even look at that I don't even know where to grab onto to start fiddling around with it.
So... I was hoping someone here in the forums could give at least some idea of where to start looking to eventually figure this out.
The gist of it is that it lets you go to wilderness shrines to pray to the divines. Most of the time, prayer will only get you some vague advice messages, but there's a chance that you will get a negative or positive effect, like being given an item, getting teleported to a random dungeon, being assigned a quest by one of the divines, getting your legal reputation modified, etc. All off this is handled through the quest system.
I intend to keep updating the mod with some more effects, and an effect i have had in mind since the start is being blessed/cursed with a week of good/bad luck. It'd essentially lower or raise your Luck attribute temporarily and then set it back to normal.
I think making this work with the rest of the mod would require to implement a custom quest action to modify player attributes. There is already some level of interaction between the quest system and player attributes, as actions like "when attribute Luck is at least 50" can clearly check the value of these player attribute variables, so the idea would be to introduce an action capable of modifying them, along the lines of "change attribute Luck +10"
I'm mostly a noob when it comes to Unity and C#. I did learn some basic stuff about using transforms and vector3 movement to make a mouselook fps character and using a raycast to create crosshair interaction a few months ago for a college project, but that's as much as I know.
I AM pretty good at figuring out how stuff works once I start fiddling around with it, but the scripts of a project as vast as DFU are so intimidating to even look at that I don't even know where to grab onto to start fiddling around with it.
So... I was hoping someone here in the forums could give at least some idea of where to start looking to eventually figure this out.