CONTEST: LotsOfPhil's Lunar Isotope Quest Script

Whee!

Here is my first attempt at the lunar isotope quest. It "works" start to finish with a few provisos:

* It assumes you can handle all combats.
* Even more, it assumes you can handle the combats with the spooky little girl equipped.
* If you are okay with it buying/using transponders, edit the boolean keepUpTranspondent to be true. Otherwise you have to use them manually.
* Do not change attemptCombat. Just not ready yet.

If the above are taken care of, it should work.

**
v 0.7
Changes
Comments, both code and to user
Abort if spooky girl is killed
Decided not to use zlib for best_fam()
Made 2H weapon spooky girl failure more verbose
exit --> abort
check equipped_amount as well as item_amount
aborts if you have E.M.U. Unit and don't get Big-Time generator
simplified maximize calls

It's a work in progress and I welcome feedback.
 

Attachments

  • lotsofphil_Isotope_v05.ash
    5.6 KB · Views: 85
  • lotsofphil_Isotope_v06.ash
    7.2 KB · Views: 108
  • lotsofphil_Isotope_v07.ash
    9.3 KB · Views: 240
Last edited:

bumcheekcity

Active member
Phil, as a bit of advice, keep a changelog for your script. Just a few notes about what changes you've made in each version. Not a bad script.
 

NardoLoopa

Member
LoP, worked pretty well except that I had a 2-handed weapon equiped when I got the girl. The script aborted at that point. Otherwise it looked good.
 
Thanks Nardo. I've added some more comments to the user there. Since I am not (yet?) setting CCS-es I am not changing peoples' weapons. It will now direct you to use a 1handed weapon and re-run.
 

Aankhen

Member
Very useful script—thank you! I have a few suggestions:

  • Maximizing for just item drops left me holding a bottle-rocket crossbow as a TT, which meant I couldn’t hit anything. Maybe this would be better:
    Code:
          if (my_primestat() == $stat[muscle]) {
            maximize("item +melee -tie", false);
          } else if (my_primestat() == $stat[moxie]) {
            maximize("item -melee -tie", false);
          } else {
            maximize("item -tie", false);
          }
  • To avoid the problem of equipping the spooky little girl with a 2-handed weapon already being held, you could try this Maximizer incantation:
    Code:
    maximize(my_primestat() + " -tie +equip spooky little girl", false);
    I figure maximizing your primary stat won’t hurt one way or the other, right?
  • It would be nice to be able to change variables without touching the code, maybe using Zlib:
    Code:
    import <zlib.ash>
    
    setvar("keepUpTranspondent", "false");
    setvar("attemptCombat", "false");
    
    ⋮
    
    if (vars["keepUpTranspondent"] == "true") { … }
    
    ⋮
    
    if (vars["attemptCombat"] == "true") { … }
 

lostcalpolydude

Developer
Staff member
It would be nice to be able to change variables without touching the code, maybe using Zlib

I feel like the decision of whether or not to use zlib depends on your target audience. Using it just to have a few settings that don't require editing the script to change seems like overkill, since it means a script that probably won't need too many updates suddenly relies on a script that needs regular updating.
 
I figure maximizing your primary stat won’t hurt one way or the other, right?

Except, here, these monsters scale attack to movie and defense to muscle. So you can buff moxie too much that you get hit for more damage than you want to take during the Escort part of the mission causing you to lose the Spooky Little Girl, and if you're muscle class, you can buff enough that your shieldbutt doesn't do enough damage vs. the monster defense. It's a very slippery slope to buff against scalable monsters unless you're absolutely certain you have a way to kill them, like spells.
 

Aankhen

Member
I feel like the decision of whether or not to use zlib depends on your target audience. Using it just to have a few settings that don't require editing the script to change seems like overkill, since it means a script that probably won't need too many updates suddenly relies on a script that needs regular updating.
Well, I personally advocate code reuse wherever possible, as people tend to reinvent the wheel often, but I can see your point for a small script. That said, I looked at the code again and several other Zlib functions could be of use too: have_item() (wraps the item_amount and equipped_amount checks), obtain() (buys, pulls or adventures to get the specified items) and best_fam() (figures out, er, the best familiar for a given category). The last one in particular could be useful since the script currently goes ‘Hatrack if we have it and the sombrero, otherwise Hound Dog, otherwise whatever we’re using right now’:
Code:
// switch to the Hatrack and equip the sombrero if available, as it won’t be considered otherwise
if (have_familiar($familiar[mad hatrack]) && available_amount($item[4447]) > 0)
{
  use_familiar($familiar[mad hatrack]);
  equip($slot[familiar], $item[4447]);
}

maximize("item -tie +switch " + best_fam("item"));
Except, here, these monsters scale attack to movie and defense to muscle. So you can buff moxie too much that you get hit for more damage than you want to take during the Escort part of the mission causing you to lose the Spooky Little Girl, and if you're muscle class, you can buff enough that your shieldbutt doesn't do enough damage vs. the monster defense. It's a very slippery slope to buff against scalable monsters unless you're absolutely certain you have a way to kill them, like spells.
Good catch. I didn’t consider that they could become too powerful. Maybe one could maximize item drop instead? I guess just letting the user take care of it isn’t a big deal either.
 
Top