#made this automatic quest gen, but idek where to start on the progression part

1 messages · Page 1 of 1 (latest)

summer cloak
#
    
    # don't touch this
    delete {questList::*}
    delete {questDev::*}

    # config stuff (u can edit this)
    # Syntax: (add 1 to id each time)
    # register new quest with name "Dirt Miner I", objective "Mine 10 Dirt", reward "$5,000", criteria "mine:dirt:10", id 1, codename "mine10dirt", item dirt

    # avaliable criteria:

    # mine:material:amount
    # kill:material:amount
    # craft:material:amount

    register new quest with name "Dirt Miner I", objective "Mine 10 Dirt", reward "$5,000", criteria "mine:dirt:10", id 0, codename "mine10dirt", item dirt block
    register new quest with name "Dirt Miner II", objective "Mine 50 Dirt", reward "$25,000", criteria "mine:dirt:50", id 1, codename "mine50dirt", item dirt block
    register new quest with name "Dirt Miner III", objective "Mine 100 Dirt", reward "$50,000", criteria "mine:dirt:100", id 2, codename "mine100dirt", item dirt block

effect register new quest (with name|named) %string%, objective %string%, reward %string%, criteria %string%, id %integer%, codename %string%, item %itemtype%:
    trigger:
        set {questDev::objective::%expr-5%} to expr-2 # used
        set {questDev::reward::%expr-5%} to expr-3 # used

        set {questDev::name::%expr-5%} to expr-1 # used
        set {questDev::codename::%expr-5%} to expr-6 # used
        set {questDev::item::%expr-5%} to expr-7 # used
        set {questDev::id::%expr-6%} to expr-5 # used
        add expr-6 to {questList::*}```

(not full code to prevent code swipers, ask if you need all the parts)


I need to make it so I can automate the progression (which is why i made the criteria like that, so i can split the var)
#

making it for a friend which is why theres some comments

lost tendon
#

Well Well Well..

summer cloak
#

ok bro get outta here

lost tendon
#

no

worn fern
#

sooo.. are you sure you made this?

#

cause the comments make it seem like you didnt

summer cloak
#

i promise you i did. i can show the file save history on it

#

earliest save of the file

worn fern
#

okay, mb

#

so, you're trying to detect when someone completes a quest (mine 10 dirt), and then automatically assign the next one (mine 50 dirt)?

#

can probably store the dirt they've mined and then check if they have enough on break of dirt:

summer cloak
#

yeah pretty much. but im wondering if theres a way to automatically check if the mined block is apart of a quest

#

so i dont have to manually add each on block break of x

worn fern
#

you could probably on break: if any: type of event-block = a type of event-block = b ... then: set {_type} to type of event-block # do stuff with {_type}

summer cloak
#

hmmm ok

#

i could see me going somewhere with that

worn fern
#

maybe add the blocktype to your questDev list, {questDev::blockType::%expr-5%} = ..., then you can just see if {questDev::blockType::*} contains {_type}

summer cloak
#

true, i could do that. ty

rigid skiff
#

bar

#

essss