Rollover Management

taltamir

Member
I'll look into this, and send an update soon. Thank you.

I've updated the script. Check the first post.
thank you. Did you push it to SVN? I told mafia to update scripts and it is still showing r16 from 1/7/18
I followed the link myself and the website
https://svn.code.sf.net/p/rollover-management/code/scripts/
is still showing r16
 

Pazleysox

Member
thank you. Did you push it to SVN? I told mafia to update scripts and it is still showing r16 from 1/7/18
I followed the link myself and the website
https://svn.code.sf.net/p/rollover-management/code/scripts/
is still showing r16

Try it again. As always, I didn't hit the right button.It's at r17 now.
 

taltamir

Member
Try it again. As always, I didn't hit the right button.It's at r17 now.
got it, thanks.
new fax check works on boris check. fortune teller works too and is very welcome addition, I would have forgotten to use my last 1 today if not for the reminder
 

Pazleysox

Member
Small update.
1.08 - 4/10/17 Will now use genie wishes, if available. Fixed issue with miner.ash script, few small things

Script will now get "more wishes" from genie. This way if you forget to use them, you won't really "loose" them.
 

taltamir

Member
Small update.
1.08 - 4/10/17 Will now use genie wishes, if available. Fixed issue with miner.ash script, few small things

Script will now get "more wishes" from genie. This way if you forget to use them, you won't really "loose" them.
Doing a checkout on mafia gets v1.07

If I manually go to https://svn.code.sf.net/p/rollover-management/code/
it contains 3 things
where rollover manaagement.ash is v1.08
and the third option (Scripts directory) in turn contains

where the above rollover management.ash file is v1.07

It seems that when doing a checkout via mafia it checks out the rollover management.ash file found under scripts instead of the one found at the root.

-----
btw, it would be really nice if there was an option to set it to prioritize overnight pvp fight gains instead of adventures.
 
Last edited:

Pazleysox

Member
Doing a checkout on mafia gets v1.07
It seems that when doing a checkout via mafia it checks out the rollover management.ash file found under scripts instead of the one found at the root.

-----
btw, it would be really nice if there was an option to set it to prioritize overnight pvp fight gains instead of adventures.[/FONT][/COLOR]

I'll look into this. Not sure why it's doing that.

I'll work on setting an option for PVP vs TURNS. That should be easy enough.
 

Pazleysox

Member
I updated the non-working version release 19 is what 18 was supposed to be. I'm going to work on the +PVP this week.
 

taltamir

Member
I updated the non-working version release 19 is what 18 was supposed to be. I'm going to work on the +PVP this week.
r19 still has the same issue as r18
going to
Code:
https://svn.code.sf.net/p/rollover-management/code/
with your browser still shows there are two different rollover_management.ash files on the svn. one of them is v1.07 and one is v1.08
And the v1.07 is the one that gets installed by kolmafia on a pull request
 

Pazleysox

Member
r19 still has the same issue as r18
going to
Code:
https://svn.code.sf.net/p/rollover-management/code/
with your browser still shows there are two different rollover_management.ash files on the svn. one of them is v1.07 and one is v1.08
And the v1.07 is the one that gets installed by kolmafia on a pull request

It's all fixed now in r21. I also added support for PVP fights, and fixed a bug I found.
 

Zheel

New member
I'm running into more case-sensitivity problems like the one you saw earlier invoking Snojo.

Line 249: 'Witchess_solver.ash' should be 'witchess_solver.ash'
Line 267: 'call farfuture mall' should be 'call FarFuture mall'
Line 322: 'call briefcase.ash unlock' should be 'call Briefcase.ash unlock'

Those changes seemed to work for me, YMMV.
 

Pazleysox

Member
I'm running into more case-sensitivity problems like the one you saw earlier invoking Snojo.

Line 249: 'Witchess_solver.ash' should be 'witchess_solver.ash'
Line 267: 'call farfuture mall' should be 'call FarFuture mall'
Line 322: 'call briefcase.ash unlock' should be 'call Briefcase.ash unlock'

Those changes seemed to work for me, YMMV.

Noted, and fixed.
 

taltamir

Member
thanks for the additions and fixes. This is really great. A few things:

1. Is it possible to move the preferences outside of the script itself and into another file which the script creates if doesn't exist, but is not downloaded from the svn? A few scripts already do that like OCD inventory. At the moment every time the script updates it resets settings to default.

2.
Code:
set_property("ps_rollover", "turns");             // set this to TURNS for rollover turns or PVP for pvp fights
it says TURNS but looking at the default it is actually turns, all lower case. does case matter on this one? I tested lower case pvp and it worked but I haven't tested all upper case.

3. this is a really minor thing, but the in script versioning history is now missing v1.08 and higher changelog. (it used to actually have a v1.08 in r19).

4.
Code:
You haven't used all of your [COLOR=#FF0000]free disco rests[/COLOR]
my free rests are not from disco. at the moment my free rests only come from http://kol.coldfront.net/thekolwiki/index.php/Dog_Tired

5. when doing pvp OR adventure optimizing, it would be great if afterwards it tried to fill in the empty slots with the other option. that is, lets say I am doing pvp optimization. It equips my +3 pvp pants, +2 pvp shirt, and 3 bonus PVP accessories. This leaves the hat, back, and weapon slots empty. I actually have a +3 adventures item for the hat slot, which would have been nice to equip since said slot is open.
If you are using mafia's built in maximizer (since it does show recent searches for stuff I never put down, I am assuming the script called it) than the way to do it is to first run the one you don't want to focus on. That is, if you set it to turns then do
a. maximizer equip all: adventures -tie
b. maximizer equip all: pvp -tie
With the -tie it will (barring a bug) not unequip the prior items which gave bonus. So the end result of the above is that pvp is prioritized while adventures used for the otherwise empty slots
 
Last edited:

Pazleysox

Member
thanks for the additions and fixes. This is really great. A few things:

1. Is it possible to move the preferences outside of the script itself and into another file which the script creates if doesn't exist, but is not downloaded from the svn? A few scripts already do that like OCD inventory. At the moment every time the script updates it resets settings to default.

I fixed this in v1.09 I noticed it wouldn't change to +pvp gear when I set it, and the settings were changing back to +turns. It should be working properly now. If it's not let me know, and I'll look further into it.

2.
Code:
set_property("ps_rollover", "turns");             // set this to TURNS for rollover turns or PVP for pvp fights
it says TURNS but looking at the default it is actually turns, all lower case. does case matter on this one? I tested lower case pvp and it worked but I haven't tested all upper case.
I fixed the wording to show all lower case, to avoid any confusion.

3. this is a really minor thing, but the in script versioning history is now missing v1.08 and higher changelog. (it used to actually have a v1.08 in r19).
fixed. I thought I had fixed this yesterday, not sure what happened. lol

4.
Code:
You haven't used all of your [COLOR=#FF0000]free disco rests[/COLOR]
my free rests are not from disco. at the moment my free rests only come from http://kol.coldfront.net/thekolwiki/index.php/Dog_Tired

Strange, because Mafia looks at your campground to find if you have disco rests.
Code:
[line 423]
body = visit_url("campground.php");
[line 435]
if(contains_text(body,"_free.gif")) { print_html("You haven't used all of your <font color=FF0000>free disco rests</font>"); }

5. when doing pvp OR adventure optimizing, it would be great if afterwards it tried to fill in the empty slots with the other option. that is, lets say I am doing pvp optimization. It equips my +3 pvp pants, +2 pvp shirt, and 3 bonus PVP accessories. This leaves the hat, back, and weapon slots empty. I actually have a +3 adventures item for the hat slot, which would have been nice to equip since said slot is open.
If you are using mafia's built in maximizer (since it does show recent searches for stuff I never put down, I am assuming the script called it) than the way to do it is to first run the one you don't want to focus on. That is, if you set it to turns then do
a. maximizer equip all: adventures -tie
b. maximizer equip all: pvp -tie
With the -tie it will (barring a bug) not unequip the prior items which gave bonus. So the end result of the above is that pvp is prioritized while adventures used for the otherwise empty slots

Done. I'll upload it as v1.10
 

taltamir

Member
I fixed this in v1.09 I noticed it wouldn't change to +pvp gear when I set it, and the settings were changing back to +turns. It should be working properly now. If it's not let me know, and I'll look further into it.
Thank you, but what I meant is that when v1.11 (and v1.12 and v1.13... etc) will come out it will reset the settings because the settings are located within the script file itself. Instead of being kept in a separate file entirely.
Some scripts like OCD inventory management keep their settings in a separate file entirely (it creates one on first run, named after the account being used to login).

Strange, because Mafia looks at your campground to find if you have disco rests.
then it is mislabeled in mafia or in baseline kol, no reason it has to be mislabeled in rollover adventures too. I am not saying to change how it looks it up, just changing the wording of rollover management script to say "free rests" instead of "free disco rests" since not all free rests come from disco.
although honestly it doesn't really matter since its just me being OCD.

changelog said:
1.10 - 4/18/18 Added rollover turns to +PVP fights if you don't have enough gear to fill all slots with +PVP. Fixed some wording.
I am assuming the inverse is also true? where if you selected turns optimization, if you don't have enough gear to fill all slots with turns it fills the remaining slots with pvp items?

oh also, it occurs to me that the method of using maximizer for turns then pvp with -tie will work for all slots except for accessory slots.
For accessory slots you have 3 different slots, so for example if you have 1 pvp item and 1 turns item, using the maximizer twice could first replace accessory number 3 with turns, then replace accessory number 3 with pvp...

For some scenarios (eg, having 2 pvp and 1 turns, or 1 pvp and 2 turns) first removing all 3 accessories (not all items, just accessories) might solve the problem (unless mafia maximizer decides to fill in those extra slots with random equipment which it sometimes does).

but for a scenario where you have 2 pvp items and 2 turns items it would have a problem because it will have to replace one of two items with another, and it will just randomly select it instead of selecting the worse one to remove.
To be more specific, lets say a person has:
PVP +1 overnight accessory
PVP +7 overnight accessory
Turns +1 overnight accessory
Turns +7 overnight accessory
And it is set to maximize turns.

First pass with pvp optimization
Accessory slot 1: heart of volcano (giving +MP/HP per adventure)
Accessory slot 2: PVP +1 overnight
Accessory slot 3: PVP +7 overnight

Second pass with turns optimzation
Accessory slot 1: heart of volcano (giving +MP/HP per adventure)
Accessory slot 2: turns +1 overnight
Accessory slot 3: turns +7 overnight

If you first remove all 3 accessories and you happen to get lucky and it decides to not fill empty slots with random junk then you get.
First pass with pvp optimization
Accessory slot 1: PVP +1 overnight
Accessory slot 2: PVP +7 overnight
Accessory slot 3: empty

Second pass with turns optimzation will randomly be either:
Accessory slot 1: PVP +1 overnight
Accessory slot 2: turns +1 overnight
Accessory slot 3: turns +7 overnight

or:
Accessory slot 1: turns +1 overnight
Accessory slot 2: PVP +7 overnight
Accessory slot 3: turns +7 overnight

where obviously the latter is preferred. Fixing it though would be a real pain to program though... so maybe just document it and say "hey, you should make sure you have enough accessories for all 3 slots"
 
Last edited:

Crowther

Active member
You can just let the maximizer handle all the for you: "maximize 100 adv, 1 pvp fights"

Or whatever balance you think is right.
 

Pazleysox

Member
Thank you, but what I meant is that when v1.11 (and v1.12 and v1.13... etc) will come out it will reset the settings because the settings are located within the script file itself. Instead of being kept in a separate file entirely.

I'll look into the things you've mentioned. The disco rests is a very easy fix. I'm looking into scripts that have their own settings. I don't want to have to add a file to the scripts directory. I might have it end up somewhere else. As far the PVP/ADV issue, I'll have to do some research to figure it out.
 

fronobulax

Developer
Staff member
I don't want to have to add a file to the scripts directory.

You could roll your own and read and write a file using map_to_file and file_to_map which would end up in the data directory.

You could annoy people like me who don't like clutter and use KoLmafia properties.

You could use zlib variables. The example below will set a variable named DCQuest_checkAll to have a default of true and then set the variable CHECK_ALL to the value of DCQuest_checkAll chosen by the current user.

Code:
setvar("DCQuest_checkAll",true);
boolean CHECK_ALL = to_boolean(getvar("DCQuest_checkAll"));

Note that I use something other than my script (gCLI commands, usually) to set a non-default value for a user.

You could use vprops, which is what I would use for a new project or anything that doesn't need zlib for something else.
 

taltamir

Member
I am running my first avatar of sneaky pete run and it says I still have fax uses remaining, even though pete can't use it at all.
v1.07 fixed boris, but apparently not sneaky pete.

You can just let the maximizer handle all the for you: "maximize 100 adv, 1 pvp fights"

Or whatever balance you think is right.
I didn't realize that maximizer could already do that. What does the syntax above mean? is it a ratio?
 

Darzil

Developer
It means it gives a weight of 100 to adventures and 1 to pvp. So +5 adv and =1 pvp fight would score 501. It is basically what I have in my logout script. Essentially resulting in maximising for adventures first, then pvp fights.
 
Top