Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Strive for Power

Fantasy Slave Management/RPG Erotic Game · By Strive4Power

[Help] Custom Repeatable Quests?

A topic by AlexandraTDC created Sep 09, 2019 Views: 1,397 Replies: 13
Viewing posts 1 to 6

Would anyone know how I could go about creating Custom Requests? Like the repeatable ones that can be picked up/ turned in at Slaver's Guilds. I'm wanting to make a few to add to the seemingly limited amount currently available (I've only seen 5 different ones but there may be more).

have you searched the mods section to see if it has not been done already?

My Gorn/Frostford mod has code for that.

It was unfortunately one of those code changes that got bigger and bigger in order to fix stuff, and the original code needed changing in a few different files, so it might not be easy to pick out just the changes you want.

If you want to hack the game just for yourself, open files\scripts\repeatable_quests.gd with Notepad++ or another editor, find the line

var questsarray = {

and insert your custom requests after it. Read how the existing requests are written and follow this template:

    questXXX = {
    code = 'XXX',
    shortdescription = '...',
    description = '...',
    reqs = [...],
    reqstemp = [...],
    time = round(rand_range(DAY_MIN,DAY_MAX)),
    reward = round(rand_range(GOLD_MIN,GOLD_MAX))*10,
    location = [...],
    difficulty = ...
    },

"XXX" must be a unique code. Currently it must be bigger than 023
"shortdescription" and "description" are plain text
in "time" and "reward" replace DAY_MIN/MAX and GOLD_MIN/MAX with numbers (GOLD_MIN/MAX must be 1/10th of the final min/max reward)
"location" is where the quest is available: it could be 'any' or one or more towns, separated by commas ('winborn', 'gorn', 'frostford')
'difficulty' can be 'easy', 'medium' or 'hard'
'reqs' and 'reqstemp' are a list of requirements. Each of them is inside square brackets and it is like ['STAT, 'OPERATOR', VALUE]:
- STAT can be any physical or mental stat (obed for obedience, conf for confidence, sagi for agility, sex, race, origins, beauty, haircolor, titssize, ...). For the full list, see files\scripts\person\person.gd
- 'OPERATOR' can be 'eq' (equal), neq (not equal), 'gte' (equal to or greater than), 'lte' (equal to or less than);
- VALUE can be a number, a 'string' or a function extracting a random value (e.g. randsex() returns male or female)

If you want to make a mod instead, and share your custom requests with any other player, follow this guide.

Create a folder, let's say it is called "ALEXANDRA_CR", with an info.txt file (the description of the mod) and a "scripts" folder: inside the latest folder, create a new text file and call it "repeatable_quests.gd":

ALEXANDRA_CR
|-- scripts
|   |-- repeatable_quests.gd
|-- info.txt

Inside repeatable_quests.gd write:

func questarray():
<AddTo 1>
#INSERT YOUR CUSTOM REQUESTS HERE

and append your custom requests. When the mod is loaded, they will be added to the original file.

This is technically correct but in practice you might run into errors with the code merge (when a mod is applied). Questarray uses nested {} and that is a known problem area for the merge, leading to unpredictable results. My code contains a way for a mod to include new quests without changing the questarray definition.

Just replacing repeatable_quests.gd will not cause this problem of course as (the program can't see the old version and) there is no code merge.

Okay, so by following your guide I did manage to make a Custom Request that does appear in Slaver's Guilds, however, it does not show the requirements that I made, and if I try to turn it in using a servant that does fulfill the requirements, it simply does not allow me to. Would you know how to fix this? It's entirely possible I may have misspelled a requirement in the file and it made everything else break. 

There are too many potential problems to offer solutions without knowing the exact details as you coded them.  A misspelling can be corrected by comparing with similar quests.  Either post the lines of the offending details or the entire new request.

I have found that the guild request system was minimally complete so if you are trying to do something that no other request does, then it may not exist.

My entire request is as follows (line-by-line in Notepad++):


quest024 = {

code = '024',

questreq = true,

shortdescription = "Test Title",

description = 'Test Description. ',

reqs = [['sex', 'eq', 'female'], ['obed', 'gte', 50], ['beauty', 'gte', 60], ['char', 'gte', 20]],

reqstemp = [],

time = round(rand_range (20,40)),

reward = round(rand_range (175, 225))*10,

location = ['any'],

difficulty = 'medium'

},


I've compared it a good 20+ times to other quests but can't figure out the problem. 

['char', 'gte', 20]
I assume this should be 'charm'.

Char is charm, yes. I was going based on stats I saw in the other quests, which I could have sworn spelled it char. I'll change that and see if it fixes. 

That has fixed it, thanks! Figures it would be 1 letter that messed everything up x_x

Thank you all for the help! I looked around for other mods that do what I'm looking for but I didn't find any, or didn't see where it said it added custom requests (like Leonais's mod). I will try all of your suggestions and see what I can do. 

Hey. Someone in the Discord server helped me with this: https://mega.nz/#F!S7oGgaKS!QNA1PlGoZ9NtNt5M_MrU0A