Not sure if this is a bug or not, problem with CCS

Braska

Member
I have a very simple custom combat script for basement diving, but hadn't used it in over 7 months. Now, using build 8793, custom combat doesn't work at all. No matter what I set my script to do, it says Round 1: Braska executes a macro!, and then it does nothing but attack for the rest of the fight. No skills are being used, none of my consult scripts are being called... it just attacks. I've been on a pretty long hiatus, and don't know if something changed that I need to know for my CCS.

It's really killing my ability to automate the basement... anyone have any ideas on what could be causing this? Should it be reported as a bug?
 

Theraze

Active member
Verify that you've made your CCS active, that your combat setting is set to use custom combat?
 

Braska

Member
My CCS looks like so:

[ basement ]
1: skill entangling noodles
2: skill spectral snapper

[ default ]
1: consult SmartStasis.ash
2: attack with weapon

My combat setting is set to use my CCS, but I am not aware of what you mean by it being active. Over a year using mafia and I've not run into that phrasing before. :p
Please, forgive my slowness, it's really been a long time since I've done anything on-line, including use mafia. :(
 

lostcalpolydude

Developer
Staff member
In the Adventure window, next to the section where you pick a location to adventure in, there is a field labeled Action. You want it to say "custom combat script". It's a big drop-down list of stuff you can do.
 

slyz

Developer
It's strange that it simply attacks. Maybe your Action isn't set to "cutom combat script"
.
If it is, try typing "set macroDebug = true" in the gCLI before adventuring in the basement, to see what KoL Macro your CCS is turned into?

Btw, are you using Rinn's autobasement.ash?
 

Braska

Member
Yes, I am using Rinn's script for the basement. The only reason I posted here rather than in the thread for his script, is that my CCS isn't even working when I do my bounty for the day, SmartStasis doesn't activate at all. I will update this post with the results of the macroDebug after I try it. As of right now though, all I can say is that my Action SAYS it is set to custom combat script.
 

StDoodle

Minion
What does the gCLI say when you type "get battleAction"?

This can (at least should) be viewable as well by looking at the adventuring tab, in the upper-right drop-down. It's entirely possible that some or another script set it to something other than "custom combat script" and never put it back.
 

slyz

Developer
I thought that, if the Mafia property was set to something else by a script or in the CLI, the Action field in the Adventure pane wouldn't be updated. Simply trying it in the gCLI showed that it is not the case, though ^^
 

Braska

Member
get battleAction shows custom combat script

The macroDebug printed some weird stuff that had me lost, but it doesn't show up in my session log. When trying to bounty, rather than basement, it printed something about the line consult SmartStasis.ash being invalid... but again, it didn't show up in my session data. Is there something I need to do to make this print in the session log, so that I can actually copy and paste it?
 

slyz

Developer
In windows XP, I can copy/paste text from the gCLI window without any problem, but I think people have had issues with that (I don't remember with which OS).

What was printed was probably: "(unable to macrofy due to combat filter)". That is fine, it just means that Mafia will do the combat round by round instead of creating a KoL Macro on the fly, since it doesn't know yet what SmartStasis will tell it to do.

Try to copy/paste the macro that was printed before the combat started in the basement, or, if you can't, look at it to see if it sounds normal. Mafia will create a few subs, to restore MP for example, and convert the relevant CCS section into the KoL Macro at the end.
 

Braska

Member
I can't get it to copy and paste, and unfortunately, as annoying as this is for those trying to help, I have no idea what is normal. All of the end around, and restore mp stuff is there, but I don't know what would be considered normal or not.

One thing I have noticed though, I am using an .exe version of mafia that I created using a free trial of a .jar converter. This is the first time I've tried something like this, and my setting are not saving at all. Everytime I close mafia and restart it, my CCS disappears. I have to retype it, and it stays put until the next restart. Is it possible that this is a side effect of my inexperienced tweakage? (and preference for .exe)
 

Theraze

Active member
I'd avoid using weird hacks, especially freebie trials of weird hacks. If you're going to use an EXE, use one... either the one on the Daily Build page (Which may or may not update), or build your own. In Windows, following the directions from the wiki on how to setup your system, that would be by running "ant jsmooth" after you've done your setup.
 

fronobulax

Developer
Staff member
One thing I have noticed though, I am using an .exe version of mafia that I created using a free trial of a .jar converter. This is the first time I've tried something like this, and my setting are not saving at all. Everytime I close mafia and restart it, my CCS disappears. I have to retype it, and it stays put until the next restart. Is it possible that this is a side effect of my inexperienced tweakage? (and preference for .exe)

Where does your exe version think it is running from? I.e. what does the program think is the default directory? Any chance that the user you are running as cannot write to that directory or that it is a temp directory that is auto-cleared? With all respect to Theraze, if the problem is solved by "avoiding weird freebie hacks" I might suggest there is operator error involved rather than something fundamentally flawed with the hack.
 

Braska

Member
I honestly have no idea, while I can do many things with a computer, I know nothing of programming anything. The exe build on this site, last time I checked, was over a month out of date, and doesn't work properly with any of the scripts I use. I tried using jsmooth, but was completely lost, and reading the instructions from the site didn't help me at all. So I found that weird freebie hack, that all I had to do was type in kolmafia.jar, and it did all the rest. I won't be doing that again, and as long as I avoid the basement, I can set my action to just attack, and it'll automate just fine. I do apologize for my lack of understanding, my main use of mafia is as a time saver, I should probably find the time to learn more before bothering with questions. It does me no good if I can't understand the answers, and it only wastes the time of those kind enough to try and help. So again, I am sorry.
 

Theraze

Active member
Don't be sorry for not understanding. Only be sorry if you ask questions and don't try to understand. :)

If there's a reason why you use EXE besides having problems with JAR files, then that's just the way it has to be. You can't use CCS files, which is sad, but they won't work for you.

If there's no real reason besides JAR files not working when you double click on them, try Spiny's help from here: http://kolmafia.us/showthread.php?3187-jar-file-issues-with-windows-7&p=21662&viewfull=1#post21662
Specifically, you want to check where your Java folder is, and do this part:
Open a command prompt window using "Run as administrator”, and then type: -

C:\>assoc .jar=jarfile

C:\>ftype jarfile="C:\path\to\your\javaw.exe" -jar "%1" %*
replacing the "C:\path\to\your\javaw.exe" with the proper location for your javaw file... In my case, "C:\Program Files\Java\jre6\bin\javaw.exe" or "C:\Program Files (x86)\Java\jre6\bin\javaw.exe" because I have 64-bit Windows with both 32 and 64-bit Java installed.

After you finish up, you should be able to double-click on JAR files and have them run just like EXEs, except that the data files actually work... :D
 

Braska

Member
honestly, the only reason I haven't given up on the .exe, is because I'm too lazy to want to re-download ALL of my scripts, and then have to go and redo my entire vars file, as well as all the minor tweaks I have made for my play style. Then there is setting up my breakfast and everything else. I remember when I switched to exe from jar, having to set up everything all over again, because the files associated with the jar didn't work with the exe. I assume that it works the same in reverse, though if I am incorrect, please, let me know. It seems like it would be much easier if I just used the jar files, not to mention I wouldn't have to wait for updates.. :p
 

fronobulax

Developer
Staff member
In theory the exe and the jar have identical functionality. If that is not the case then the dev team (and a whole lot of other Java developers) would like to know. When you run KoLmafia, it needs a place to store the files it uses for things like scripts and preferences. Where that place is depends upon several factors including which operating system you are using, how, or if, you have configured any Java options and how you launch the program. The way you describe your problem it sounds as if a) you do not know where those things are stored on your system and b) running a jar and running an exe on your system results in two different places being used.

So what we probably need to do is find out what your operating system is and how you start KoLmafia and then we can probably hone in on specifics that should allow you to run with a jar and use the same settings.
 

Camber

Member
honestly, the only reason I haven't given up on the .exe, is because I'm too lazy to want to re-download ALL of my scripts, and then have to go and redo my entire vars file, as well as all the minor tweaks I have made for my play style. Then there is setting up my breakfast and everything else. I remember when I switched to exe from jar, having to set up everything all over again, because the files associated with the jar didn't work with the exe. I assume that it works the same in reverse, though if I am incorrect, please, let me know. It seems like it would be much easier if I just used the jar files, not to mention I wouldn't have to wait for updates.. :p

I may be wrong, but it seems to me that you want everything to work just the way it worked last time you played KoL. Unfortunately for you, but for the betterment of KoL, there have been many changes to KoL and to mafia. So you will have to update all your scripts and then just use the daily .jar files. At this rapidly changing Crimbo time, you can't be current and use the .exe's. There is no functional difference between the jar and exe files. They use the same files. I use XP, and just download the daily jar file into my mafia folder and double click it to run it. None of my preferences change from day to day.
 
Top