One-Click Wossname -- automatic level 12 quest completion

kiltchdie

New member
Just got my first wossname with script version 1.2

Thank you Zarqon.

Going to try out version 1.3 later on today.

Tyvm!
 

Bear

New member
Sorry if this is just a stupid mistake (I'm really new to kolMafia) but I get this error: "No available namespace with function: PK"

Its probably a fault on my part... I was wondering if anyone could point me in the right direction.


(this is using version 1.2.3)


[EDIT] Huh, tried it again this morning and it worked! Thanks![/EDIT]
 

zarqon

Well-known member
Upcoming feature: I realized that some people are running this script on multiple characters, and might have a need to use different warplans on different characters. It would be really annoying to keep editing the script everyday when you switch characters, and it would be more than annoying to forget to edit the script and get really screwed up. In addition to a default warplan, I'll be adding functionality for specific plan selection per character in the next update.

@ArtemisDove: Just had a thought about this issue. Might have something to do with the character used to separate directories on mac/linux vs. windows. Try using the default configuration, but replacing line 179:

file_to_map("warplans\\"+warplan,plan);

with this:

file_to_map("warplans/"+warplan,plan);

I just recalled that from my PHP days. Don't know if it'll work here, but it might help any mac/linux users with this issue.

@Veracity: Oh, okay then. You're way ahead of me. I added that code because some people appeared to be having issues with Mafia's count being off. But if this check is already in place then I will remove my redundant code.

@kiltchdie: ver. 1.3.0 isn't out yet. :) But, you're welcome.

@Bear: Don't know why it's happening, but I can tell you what's happening. Somehow mafia is getting the command "PK". Unless you edited the script and added a "PK" somewhere, that command is not coming from this script. Hopefully someone else can tell you more.
 

fewyn

Administrator
Staff member
This is completely untested but here's a warplan that *should* complete all 1000 kills as a fratboy. (If you don't want to do the Wossname but just complete level 12 asap). It does the first 3 quests as a frat (arena, lighthouse, junkyard), adventures 8 times, then it completes the orchird, then it adventures 59 times again to complete the field since doing the nuns would go way over 59 adventures (Unless you are war over in +meat buffs). I'm going to be testing it soon on a multi, so if anyone else feels like trying it.
 

Attachments

  • Frat-QuickComplete.txt
    232 bytes · Views: 66
[quote author=fewyn link=topic=1395.msg6800#msg6800 date=1201128360]
This is completely untested but here's a warplan that *should* complete all 1000 kills as a fratboy. (If you don't want to do the Wossname but just complete level 12 asap). It does the first 3 quests as a frat (arena, lighthouse, junkyard), adventures 8 times, then it completes the orchird, then it adventures 59 times again to complete the field since doing the nuns would go way over 59 adventures (Unless you are war over in +meat buffs). I'm going to be testing it soon on a multi, so if anyone else feels like trying it.
[/quote]

Much appreciated. I was just going to get a start on designing this for myself. This is probably what I will use for my "casual" HC ascensions (which is pretty much what I will be doing for a while to come as I accumulate lucre and telescopes), and I think it is as near as the Wossname script can take us to "optimality" under the Wossname combat rules (particularly the GMOB/Arena strategy rather than the "true" optimal strategy).
 

poox

New member
First of all, my thanks for this great script! It's really awesome...

I just found something that doesn't seem to work properly.

When the script tries to do the junkyard part of the script, it just stops when it encounters a vegetable gremlin, and I don't have a clue why. The rest of the gremlins go just fine, but with the veggie it just stops.

Anyway, I'm manually doing that part now, which isn't all that bad.

Hope you guys can figure it out.
 

zarqon

Well-known member
1.2.4 changes: As promised, added the functionality to specify different warplans for multiple characters. You can now add plan_for["PLAYER"] = "someplan.txt" to assign a warplan to a specific player. You still specify your default warplan first, so if you only want to use optimal.txt for every character, you don't need to change anything. But if you want to run optimal.txt on two characters and fastest.txt on a third, you'd want something like this:
Code:
string warplan = "optimal.txt";        // filename of your default battle plan

plan_for["Third Character's Name"] = "fastest.txt";

Note that your default warplan applies to all characters unless you specify otherwise using plan_for[].

Also, I included a version check (credit to degrassi for the idea and the code!) so you always know whether you're using the latest version of the script.

@fewyn: Thanks for making/sharing that plan! I've included it in the warplans starting with 1.2.4.

@Xerxes: Yeah, "true optimal" arena questing would involve overlapping steps, something which this algorithm is completely unable to handle, not to mention a huge amount of detection/combat coding. I'm sticking with the GMOB. :)

Hmmm... you made me think about it though. Here's a workaround you could try if you're doing the fratboy-only warplan don't want to go the GMOB route:

1. Remove the arena sidequest from the frat-only warplan.
2. Stick this right before the follow the plan! section (line 579 in v1.2.4):
Code:
dress_apropos(false);
visit_url("bigisland.php?place=concert&pwd=");
3. Stick this at the top of the do_step() function:
Code:
if (step == 2) abort("Time to finish the arena quest!");
4. Edit your ccs to use flyers against lobsterfrogmen/gremlins/etc.

That workaround isn't perfect, but it will get flyers first, use them on monsters until it's ready to hit the battlefield, at which point you'll want the flyer quest finished to increase kills, so instead it aborts and tells you to finish. After finishing the flyers manually, you can undo the edits you made to the script and continue.

@poox: thanks for the heads-up on that. I didn't spot anything in the code, so I'll have another look when I get there next.
 
Sorry, I didn't mean to imply that I was asking you for a major coding change. I understand the purpose of your scripting efforts is Wossname, not optimal completion of the level 12 quest.

The workaround is a nice start for me all the same. It is pretty simple to CLI-script the Ducks and Orchard. So if at the abort-break (1) you adventure on the battlefield until you get the war hippy outfit, (2) run the Ducks and Orchard as a war hippy (but don't turn in for the reward), (3) resume the script with "do Ducks and Orchard as Frat" added to the previous warplan, well, you are pretty much there (assuming you get enough ML through the four sidequests to finish the arena). If I ever attempt to code this up, I'll be sure to post. (I just preped the GMOB today for this run, however).
 

zarqon

Well-known member
Oooh, nice. Or, you could make more use of OCW's sidequest code if you like:
  • Include the hippy sidequests as a hippy in your battle plan
  • in the script, right before the sidequest function collects the rewards, add "return true;" The script will think the step is completed and go on to the next step. Unfortunately that workaround will only work if everything runs continuously. After that (not before), you would have to also add if (step==x) return true; to the check_step() function, since mafia's properties will not be changed.


Just a thought.

I realized the workaround I mentioned earlier is partly flawed: the gremlins combat is managed by the script, not mafia, so adding gremlins to your ccs would make no change. Yet another reason to do the gremlins manually for now. :(

And OCW gets combat outfits before beginning the war so even with the workaround you shouldn't need to get any outfits from the battlefield.

I'd be interested to hear how your efforts to do this work out, because my second priority with this script was flexibility for people to make warplans that suit them best, so it can function as a universal Islewar script.

Another possibility might be a short consult script that throws flyers at the beginning of every combat if you have them, and if your location is not the battlefield. Hmmm... something like:
Code:
if (item_amount($item[jam band flyers]) + item_amount($item[rock band flyers]) > 0) {
   item whichflyer = $item[jam band flyers];
   if (item_amount($item[rock band flyers]) == 1) whichflyer = $item[rock band flyers];
   if (my_location() != $location[battlefield(frat uniform)] &&
      my_location() != $location[battlefield(hippy uniform)])
      throw_item(whichflyer);
}

And then the ccs would look like
Code:
[ default ]
consult flyerscheck.ash
attack
or whatever. Obviously that would need some fleshing out. Anyway, I'm open to ideas.

I might just make OCW always get the flyers at the very beginning of the war now, if the plan specifies (at some point) completing the arena as a fratboy. Any possible drawbacks? I'm not thinking of any yet.
 

falsenames

New member
I just downloaded the Wossname script (v 1.2.4), and I cannot get it to work at all. I'm running KoLmafia-12.0.jar with sun-jdk-1.6 on Gentoo Linux. I unzipped the archive, tried running the script, couldn't get it to work, restarted KoLmafia, still couldn't get it to load the battle plan.
> call scripts/Wossname.ash

Error loading battle plan.

> call scripts/warplans/optimal.txt

No available namespace with function: 0

I did try changing the file_to_map part as per the suggestion to ArtemisDove, but that did not seem to help. I also found that on line 203 instead of line 179, but I'm guessing that was due to changes between 1.2.3 and 1.2.4.

I am looking forward to using this script from everything I have heard about it. I might try it out on my roommate's WinXP computer when she gets home to see if it will work there.
 

zarqon

Well-known member
Dang, I was hoping the slash thing would fix that. You can always do the workaround that seems to have worked for others experiencing this problem. Replace line 203 (the file_to_map line) with lines 55-68 of Plan Maker.ash (in the warplans dir). Unfortunately that workaround limits you to using only the "optimal" warplan, unless you know enough scripting to rewrite the plan.
 
[quote author=zarqon link=topic=1395.msg6821#msg6821 date=1201292723]
Oooh, nice. Or, you could make more use of OCW's sidequest code if you like:
  • Include the hippy sidequests as a hippy in your battle plan
  • in the script, right before the sidequest function collects the rewards, add "return true;" The script will think the step is completed and go on to the next step. Unfortunately that workaround will only work if everything runs continuously. After that (not before), you would have to also add if (step==x) return true; to the check_step() function, since mafia's properties will not be changed.


Just a thought.
[/quote]

Thanks for the ideas. I'll probably try it out my way first, because I just delved into the code and realized that the script only maximizes buffs for the Sonofa Beach sidequest (+combats in that case). My CLI scripts add the +item buffs and +noncom buffs for the Store and Ducks, though only using the buffs/items likely to be available in hardcore.

If you are taking requests for a todo list, you might want to add logic to
  • increase +item for the Store sidequest (buffs like Sonofa Beach and/or a custom outfit like the Gremlins),
  • increase +meat for the Nuns (buffs and outfit, including detection of the semirare),
  • increase noncombats for the Ducks

I almost forgot -- I also add control over which familiar to use on each sidequest. Another long term todo for you -- add a preference for whether this is a 100% run, and if it isn't (the default), use an appropriate familiar on each sidequest (even Sonofa Beach has a "best" familiar :).

I realized the workaround I mentioned earlier is partly flawed: the gremlins combat is managed by the script, not mafia, so adding gremlins to your ccs would make no change. Yet another reason to do the gremlins manually for now. :(
I think I can fix this by adding the flyers to the totem in the throw-item function near the end of the gremlins combat logic. Does that seem right? If you are actually taking things for your "to do" list, you could add flyer detection here, and throw them if the user still has them.

And OCW gets combat outfits before beginning the war so even with the workaround you shouldn't need to get any outfits from the battlefield.
I understand that getting both is a good strategy for Wossname. In no-path hardcore, I've probably gotten the hippy suit (for garnishes), but not the frat outfit. Again, from an IsleWar turn-minimizing perspective, I'm likely to just get the Frat Warrior outfit before starting the war and use the battlefield to get the War Hippy outfit. So the current OCW logic is something that I will eventually want to think about replacing as I go down this path.


I'd be interested to hear how your efforts to do this work out, because my second priority with this script was flexibility for people to make warplans that suit them best, so it can function as a universal Islewar script.
All the above is offered in this spirit. I repeat, this is a great script for its primary purpose. Kudos again!


I might just make OCW always get the flyers at the very beginning of the war now, if the plan specifies (at some point) completing the arena as a fratboy. Any possible drawbacks? I'm not thinking of any yet.
I don't see any either.
 

tebee

Member
In regard to the people having problems running the script under Linux, in the past I've had major problems with Mafia and directories doing this. At one time I had to install scripts in to two different directories as it was looking in one to populate the list of available scripts, but a different one to to actually run the script from.

I still cannot work out where it is saving my custom combats.

The problem seemed to that different bits of Mafia use different code to work out what the Mafia working directory is and how to navigate from there with different results. I though some of these had been fixed, maybe there are some more yet to be found.

Tom
 

Veracity

Developer
Staff member
[quote author=tebee link=topic=1395.msg6886#msg6886 date=1201550194]
In regard to the people having problems running the script under Linux, in the past I've had major problems with Mafia and directories doing this. At one time I had to install scripts in two different directories as it was looking in one to populate the list of available scripts, but a different one to to actually run the script from.[/quote]
Does it still do that? What two directories?

As I understand it, for Linux, all files accessed at runtime - preferences, session logs, ccs files, scripts, etc - should be under ~/.kolmafia

If KoLmafia is finding scripts - or anything else - in a different place, that's a bug. Which we won't know about, unless you tell us.

I still cannot work out where it is saving my custom combats.
~/.kolmafia/ccs/

The problem seemed to that different bits of Mafia use different code to work out what the Mafia working directory is and how to navigate from there with different results.  I though some of these had been fixed, maybe there are some more yet to be found.
We won't find them if people don't report them...
 

rainacake

New member
Hi, I'm not very script savvy, but I can usually make them work.
I've been having the problem just loading wossname.ash
Running OSX, my css file is the way it should be, the directories are in order.
I've removed and reloaded the zip files and I've tried replacing the lines but haven't had any luck.
One thing I noticed is when I tried to say use fastest.txt for my name, a file is created in my main scripts directory named warplans\fastest.txt.
I'm afraid I'm missing something obvious. :(
 

tebee

Member
[quote author=Veracity link=topic=1395.msg6887#msg6887 date=1201554883]



We won't find them if people don't report them...
[/quote]


I did at the time -

http://forums.kingdomofloathing.com:8080/vb/showpost.php?p=2308086&postcount=11094

At least some of this weirdness was fixed by subsequent releases but I was wondering if a little bit was still lurking somewhere.

I hadn't realized they where now all under .kolmafia which of course is hidden. I'd given up using the linux machine as when I updated my scripts it seemed to ignore the changes - I now realize I was updating the wrong ones! Incidentally how did all my scripts come to be in the scripts directory under .kolmafia - I didn't put them there?

Tom
 

Veracity

Developer
Staff member
[quote author=tebee link=topic=1395.msg6897#msg6897 date=1201562952]
http://forums.kingdomofloathing.com:8080/vb/showpost.php?p=2308086&postcount=11094[/quote]
says:
Under Linux, although I had in the java command to invoke Mafia -Dusr.dir=/home/me/mafia , it always used my home directory itself
Here is what KoLmafia's code says:
Code:
	public static final File HOME_LOCATION = new File( System.getProperty( "user.home" ) ).getAbsoluteFile();

	public static final File ROOT_LOCATION =
		UtilityConstants.USE_OSX_STYLE_DIRECTORIES ? new File(
			UtilityConstants.HOME_LOCATION, "Library/Application Support/KoLmafia" ) : UtilityConstants.USE_LINUX_STYLE_DIRECTORIES ? new File(
			UtilityConstants.HOME_LOCATION, ".kolmafia" ) : UtilityConstants.BASE_LOCATION;
...which tells me that on Linux, you can find things under "$(user.home)/.kolmafia"

So, defining $(usr.dir) doesn't seem helpful, since it looks in $(user.home). On OS X - and, I am confident, on Linux - $(user.home) defaults to "~". Perhaps if you used "-Duser.home=/home/me/mafia" then KoLmafia would use that.

At least some of this weirdness was fixed by subsequent releases but I was wondering if a little bit was still lurking somewhere.
I use OS X and run .jar files from where I build them. Near as I can tell, KoLmafia ALWAYS goes to "~/Library/Application\ Support/KoLmafia/" to get preferences, ccs files, etc. It creates no files whatsoever underneath the directory where the .jar file is. Therefore, I don't think there are any "lurking wierdness".

I hadn't realized they where  now all under .kolmafia which of course is hidden. I'd given up using the linux machine as when I updated my scripts it seemed to ignore the changes - I now realize I was updating the wrong ones!  Incidentally how did all my scripts come to be in the scripts directory under .kolmafia - I didn't put them there?
When the change was made for Linux and OS X machines to store all their files underneath the new "one true root location", upgrade code was built in that moved them.

Similarly, when I moved the CCS files out of "data" into "ccs", I supplied upgrade code that moved them from the old place to the new place.
 

tebee

Member
The "-Duser.home=/home/me/mafia" thing was something that was suggested to me when I first reported my problems with directories under Linux - can't find the original post now but it probably just pre-dates the one I gave earlier. I think it's probably redundant now.

I suspect these updates where made in the time I've been away from KOL renovating the new house or at least enough of it for us to live in. I was assuming there was some residual weirdness as I was updating scripts where I was expecting them to run from and trying to puzzle out why it was still using the old version! Now I know where to look I expect it will all work.

I'll try and have a go at trying a few things on the Linux machine before I disappear again into phase 2 of the aforementioned renovations. Incidentally I started using mafia under Linux as I found it much more stable than under windows. Even now things which cause problems under windows seem to work much better under linux. For example I run multiple characters as I like to try out different strategy's, under windows if I log off one character and on to another half the time I get a debug log printed and it fails to load all my character's details - I need to stop mafia and restart. This does not seem to happen with the Linux version.

Tom
 

tebee

Member
[quote author=zarqon link=topic=1395.msg6780#msg6780 date=1201014355]

@ArtemisDove: Just had a thought about this issue.  Might have something to do with the character used to separate directories on mac/linux vs. windows.  Try using the default configuration, but replacing line 179:

file_to_map("warplans\\"+warplan,plan);

with this:

file_to_map("warplans/"+warplan,plan);

I just recalled that from my PHP days.  Don't know if it'll work here, but it might help any mac/linux users with this issue.


[/quote]

I've been looking at this on and of for several days trying to think of things that could cause this and it suddenly hit me it should be -

file_to_map("warplans\\"+warplan.txt,plan);

tested this under Linux and it works!

Tom
 

rainacake

New member
I kept the line change as

file_to_map("warplans/"+warplan,plan);

moved the scripts in the warplans directory to the main scripts directory and it seems to be working good.

Thank you! This is a nice script indeed.
 
Top