I wanted an external script that VMF could call to do the daily turn-free quest from Rufus. So here we are.
It's essentially complete, as of revision 7: it works fine for the artifact, entities, and items, and is VMF-ready.
It is tested from VMF, which calls it as part of free fights, with an item drop familiar.
Examples:
(And now the "rufusDesiredArtifact", "rufusDesiredEntity", "rufusDesiredItems" properties are set, for use by scripts.)
(Those are from "questRufus", "rufusQuestType", and "rufusQuestTarget".)
Accept the artifact quest from Rufus, go to a random Shadow Rift ingress, and after Rufus gives you a shadow lodestone, go into the chosen Shadow Rift and visit the forest, collecting items.
Accept the entity quest from Rufus, enter the Shadow Rift through The 8-bit Realm, and after Rufus gives you a shadow lodestone, open the Shadow Forge.
Accept the items quest from Rufus, 'acquire' the items he wants, turn them in, and after Rufus gives you the shadow lodestone, enter the Shadow Rift through the Hidden City and visit the forest, collecting items. (If you have already visited the forest today, visit the fountain and get Shadow Waters.)
Accept the items quest from Rufus, adventure for the items he wants, turn them in, and after Rufus gives you the shadow lodestone, enter the Shadow Rift through the Hidden City and visit the fountain, getting the Shadow Waters effect.
We will stop adventuring when you either have the items or have encountered the Shadow Labyrinth and gotten the desired reward. I.e., at most 11 turns.
(I don't recommend adventuring for items. Items you already have will count against the three you need, so maybe you only need to find 1 or 2 more, but even so, the drop rates are so low, it may take multiple iterations.)
Your CCS has to be capable of dealing with normal shadow monsters.
We maximize for item drop, but do not switch to an item drop familiar. Make sure you have one at your side.
If you are using free turns to adventure, we'll cast Steely-eyed Squint to double your item drop, if it is available.
Since it only lasts for one turn, this is a perfect place to use it.
Install via:
Potential improvements:
1) For entity quest, when you are about to fight the boss, we'll heal you to 100% (avoid first round insta-kill from scythe, say), but is there anything else we could do? We depend on your CCS to handle each kind of boss, which is the easiest; only you know what your resources are and how you wish to use them.
2) Before adventuring, we maximize using "Item Drop -equip broken champagne bottle". Perhaps we should give you (configurable) control to add additional arguments?
3) Add documentation to README.md on github. If nothing more, installation instructions and the "help" text.
Suggestions (and even Pull Requests) are welcome.
Here's the configuration info from the top of the script.
It's essentially complete, as of revision 7: it works fine for the artifact, entities, and items, and is VMF-ready.
It is tested from VMF, which calls it as part of free fights, with an item drop familiar.
Code:
> ShadowRift help
ShadowRift KEYWORD [KEYWORD]...
KEYWORD can be a command:
help - print this message
check - visit Rufus and see what he is looking for.
KEYWORD can be 'default' to simply use all properties as configured/defaulted.
That is normal behaviour unless you override individual properties.
You only need this if you don't intend (need) to override anything.
KEYWORD can override configuration properties:
What kind of quest to accept (VSR.QuestGoal):
artifact, entity, items
What reward to get at the Labyrinth of Shadows (VSR.LabyrinthGoal - 'items' only)
muscle, mysticality, moxie, effects, maxHP, maxMP, resistance
What reward to get with your shadow lodestone (VSR.QuestReward)
forge, waters, forest (once per day; chooses waters subsequently)
Which shadow rift ingress to use for getting the quest reward (VSR.RiftIngress)
(also used for adventuring, except for 'items', if it doesn't have what Rufus wants)
desertbeach, forestvillage, mclargehuge, beanstalk, manor3, 8bit
pyramid, giantcastle, woods, hiddencity, cemetery, plains, town_right
random - pick an ingress at random. For 'items', one which has what Rufus wants.
What kind of shadow item you want to harvest.
(randomly selects one of the 3-4 ingresses that provide that item.)
bread, brick, flame, fluid, glass, ice
nectar, sausage, sinew, skin, stick, venom
Use free turns (Shadow Affinity) only? (VSR.FreeTurnsOnly)
(If not and you attempt it, you'll get a nag to confirm.
onlyfree, notonlyfree
Buy shadow items to full Rufus's needs for an 'items' quest? (VSR.BuyShadowItems)
(This will let you finish the quest with no turns spent.)
buy, nobuy
Use up Shadow Affinity if fulfill quest with turns available? (VSR.UseUpShadowAffinity)
allfree, notallfree
Code:
> ShadowRrift check
You are not currently on a quest for Rufus.
use 1 closed-circuit pay phone
Encounter: Calling Rufus
He'd like you to fight a shadow orrery
He'd like you to retrieve a shadow bucket
He'd like you to fetch 3 shadow bricks
Code:
> ShadowRrift check
You are on an 'items' quest to get 3 shadow bricks for Rufus
You are ready to call him back and turn it in!
Code:
> ShadowRift artifact random forest
Code:
> ShadowRift entity 8bit forge
Code:
> ShadowRift items hiddencity forest buy
Code:
> ShadowRift items hiddencity waters nobuy
We will stop adventuring when you either have the items or have encountered the Shadow Labyrinth and gotten the desired reward. I.e., at most 11 turns.
(I don't recommend adventuring for items. Items you already have will count against the three you need, so maybe you only need to find 1 or 2 more, but even so, the drop rates are so low, it may take multiple iterations.)
Your CCS has to be capable of dealing with normal shadow monsters.
We maximize for item drop, but do not switch to an item drop familiar. Make sure you have one at your side.
If you are using free turns to adventure, we'll cast Steely-eyed Squint to double your item drop, if it is available.
Since it only lasts for one turn, this is a perfect place to use it.
Install via:
Code:
> git checkout Veracity0/shadow-rift
Potential improvements:
1) For entity quest, when you are about to fight the boss, we'll heal you to 100% (avoid first round insta-kill from scythe, say), but is there anything else we could do? We depend on your CCS to handle each kind of boss, which is the easiest; only you know what your resources are and how you wish to use them.
2) Before adventuring, we maximize using "Item Drop -equip broken champagne bottle". Perhaps we should give you (configurable) control to add additional arguments?
3) Add documentation to README.md on github. If nothing more, installation instructions and the "help" text.
Suggestions (and even Pull Requests) are welcome.
Here's the configuration info from the top of the script.
Code:
//-------------------------------------------------------------------------
// All of the configuration variables have default values, which apply
// to any character who does not override the variable using the
// appropriate property.
//
// You can edit the default here in the script and it will apply to all
// characters which do not override it.
//
// define_property( PROPERTY, TYPE, DEFAULT )
// define_property( PROPERTY, TYPE, DEFAULT, COLLECTION )
// define_property( PROPERTY, TYPE, DEFAULT, COLLECTION, DELIMITER )
//
// Otherwise, you can change the value for specific characters in the gCLI:
//
// set PROPERTY=VALUE
//
// Both DEFAULT and a property VALUE will be normalized
//
// All properties used directly by this script start with "VMF."
//-------------------------------------------------------------------------
// What is our quest goal?
//
// artifact Easiest.
// 10 combats with normal shadow creatures; mundane shadow item
// non-combat offers a choice for the artifact.
// entity Most profitable, but hardest.
// 10 combats with normal shadow creatures
// non-combat replaced by shadow boss, with combat powers
// Each boss always drops two specific mundane shadow items
// items 10 combats with normal shadow creatures.
// non-combat offers buffs or stats
// costs 3 of a specific mundane shadow item
string quest_goal = define_property( "VSR.QuestGoal", "string", "artifact" );
// If we seek items, the Shadow Labyrinth will give us a buff or stats.
// Which one do you want?
//
// muscle 90-100 Muscle substats
// mysticality 90-100 Mysticality substats
// moxie 90-100 Moxie substats
// effects +3 turns to 3 random effects
// maxHP 30 Shadow's Heart: Maximum HP +300%
// maxMP 30 Shadow's Chill: Maximum MP +300
// resistance 30 Shadow's Thickness: +5 Spooky, Hot, Sleaze resistance
string labyrinth_goal = define_property( "VSR.LabyrinthGoal", "string", "maxHP" );
// What is our quest reward?
//
// forge Opens Shadow Forge until you use an adventure.
// You can craft special shadow items from mundane shadow items.
// waters 30 turns of Shadow Waters:
// Initiative: +100, Item Drop: +100, Meat Drop: +200, Combat Rate: -10
// forest (Once per day) 2-3 each of the 3 mundane items from the
// specific ingress you used to enter the Shadow Rift
// Default is "forest" (or "waters" if already looted forest today).
string quest_reward = define_property( "VSR.QuestReward", "string", "forest" );
// Which shadow rift ingress to use?
//
// desertbeach shadow flame shadow fluid shadow sinew
// forestvillage shadow bread shadow ice shadow venom
// mclargehuge shadow skin shadow ice shadow stick
// beanstalk shadow fluid shadow glass shadow nectar
// manor3 shadow sausage shadow flame shadow venom
// 8bit shadow ice shadow fluid shadow glass
// pyramid shadow sausage shadow brick shadow sinew
// giantcastle shadow sausage shadow bread shadow fluid
// woods shadow flame shadow nectar shadow stick
// hiddencity shadow brick shadow sinew shadow nectar
// cemetery shadow bread shadow brick shadow stick
// plains shadow sausage shadow skin shadow venom
// town_right shadow skin shadow bread shadow glass
//
// random Pick one at random from the 13 possible
//
// This will be the rift we collect the reward from. If Rufus wants "items", we might
// have to pick a different one that has the specific mundane item that Rufus wants.
string rift_ingress = define_property( "VSR.RiftIngress", "string", "random" );
// Should we use only free turns? I.e., require Shadow Affinity to be
// active (or available). If so, we will prompt for confirmation if you
// attempt a quest where you will run out of free turns.
boolean free_turns_only = define_property( "VSR.FreeTurnsOnly", "boolean", "true" ).to_boolean();
// Should we buy items to fulfill an "items" quest?
boolean buy_shadow_items = define_property( "VSR.BuyShadowItems", "boolean", "true" ).to_boolean();
// Should we use up remaining turns of Shadow Affinity after fulfilling quest?
//
// If you are questing for "items" and are buying them, quests take zero
// turns. You might want to do that as often as you like and then
// finish up with a different quest which will use up all your free
// turns.
boolean use_up_shadow_affinity = define_property( "VSR.UseUpShadowAffinity", "boolean", "true" ).to_boolean();