Saturday, July 12, 2014

How to get EVE Mentat fully functional in Wine

I thought it would be best to write one more quick post on this subject, this time consolidating my previous two guides into one, complete writeup on how to get this thing working.

1. Install Wine: I personally used the MacPorts install of Wine which includes winetricks, but if you decide to get it right off the official Wine site or from another source, make sure you install winetricks as well.

2. Install .NET 4.0: After you've installed Wine with winetricks, open up a terminal window and type:
winetricks dotnet40
This will install .NET 4.0 into your new Wine prefix, which is a dependency of EVE Mentat. If you already had Wine installed before starting this guide, make sure to run this on a fresh prefix with only dotnet40 installed to minimize the chances of something else interfering with its functionality.

3. Configure the D: Drive: To allow EVE Mentat access to the game client, we need to point it in the direction of the EVE install. Do this by opening up a terminal window and typing:
In the winecfg window, open the "Drives" tab and make a new drive, D: (any letter you choose will work here, just remember to adjust the future folder name accordingly). Select this new drive and in the text field for "drive mapping," enter the path to your game folder (this might be different for Linux users, but this is the default path in Mac OS):
Apply the setting and close out of winecfg.

4. Add a symlink for cache scraping: This can be done through the GUI, but terminal commands can also be used to simplify the process:

cd ~/.wine/drive_c/users/[USERNAME]/Local Settings/Application Data
mkdir CCP && cd CCP
mkdir EVE && cd EVE
ln -s "/Users/[USERNAME]/Library/Application Support/EVE Online/p_drive/Local Settings/Application Data/CCP/EVE/c_program_files_ccp_eve_tranquility" ~/.wine/drive_c/users/[USERNAME]/Local\ Settings/Application\ Data/CCP/EVE/
mv c_program_files_ccp_eve_tranquility d_program_files_ccp_eve_tranquility
This will create a symlink between your cache folders and the Wine prefix, placing these files in the directory that EVE Mentat will be looking for them in.

5. Configure EVE Mentat: Finally, navigate to the directory you have EVE Mentat in and run:
wine EVEMentat.exe
If you aren't importing an existing database, create a new one and set up your API. Once that's all done, go to File -> Preferences and select "Market orders and favorites." Set the path to the EVE client to be:
 D:\Program Files\CCP\EVE 
6. Profit: EVE Mentat should now be fully set up and ready to go, so go ahead and keep trading! Hope you enjoyed the guide and trade safe o7

EVE Mentat FULLY FUNCTIONAL In Wine (Mac OS X + Linux)

Another night of intense troubleshooting has finally yielded results: EVE Mentat's cache scraping feature is functional under wine! I've been up for quite a while, so I will spare you the more gory details and quickly summarize my findings, followed by a quick tutorial on how to set the cache scraping feature up.

After much searching, trial, and error with no positive results, I remembered that I actually know some Python and figured with the amount of time I've sunk in, it couldn't hurt to take a look at the code for Reverence, the Python library written by the famous Entity for cache scraping EVE. I realized that the way Reverence scrapes the cache is by determining the name of the folder through the directory of the application, as the cache folder's name is generated by EVE based on its install location. However, EVE running on Unix runs through Cider, generating its own file structure where its install directory is always:
C:/Program Files/CCP/EVE
Making the folder's name:
The path we specified earlier for EVE's install directory is long and convoluted, on the Z drive:
Z:\Applications\EVE\Contents\Resources\EVE\Contents\Resources\transgaming\c_drive\Program Files\CCP\EVE
Reverence was generating the folder name using this path, coming up with the name:
As you can see, this is a far cry from the short name of the actual folder. In the previous guide, I symlinked this cache folder into Wine, so I figured I would try to change its name to the name generated by Reverence; alas, the solution was not so simple, as the rename operation was denied by the system citing an inappropriately long name.

What to do? The solution turned out quite simple.

First, I opened up a terminal window and ran:
In the "Drives" tab, I made a new drive, D, and I set its Drive Mapping to:
Now, we have a drive D, contains the faux Windows folder structure that houses EVE. Within EVE Mentat, I set the path to my EVE client to:
D:\Program Files\CCP\EVE
EVE Mentat now has a valid client location. Now I need to set up the new folder structure. I navigated to
~/.wine/drive_c/users/[USERNAME]/Local Settings/Application Data
and deleted the symlink I made earlier. I made a new folder called CCP, opened it up and made another new folder called EVE. Next, I ran this command in terminal:
ln -s "/Users/[USERNAME]/Library/Application Support/EVE Online/p_drive/Local Settings/Application Data/CCP/EVE/c_program_files_ccp_eve_tranquility" ~/.wine/drive_c/users/[USERNAME]/Local\ Settings/Application\ Data/CCP/EVE/
Following that command, I renamed the newly created "c_program_files_ccp_eve_tranquility" folder to:
 Simple, right? Opened up EVE, looked some stuff up on the market, imported cache from EVE Mentat and everything was silky smooth.

Hopefully I'll make another post tomorrow on getting this process set up from scratch, but in the mean time, every step you need to make this work is present here.

Good luck everyone, trade safe o7

Friday, July 11, 2014

EVE Mentat ALMOST in Mac OS X (And Probably Linux)


I am now beginning to kick myself over how simple this was. I have been trying for quite a while to run EVE Mentat in OS X so I wouldn't have to switch to my windows partition just to station trade. After much trial and error, I've nearly figured it out.

This was done on OS X Mavericks 10.9.4 with Wine 1.6.2 and EVE Mentat

I will go through the (needless) steps I took as I tried to make this work, so if you want just the results, feel free to skip to the end.

At first, some quick google-fu led me to this post on the EVE-O forums suggesting the Macports install of wine with:
winetricks dotnet20winetricks dotnet30winetricks gdiplus 
I tried it and - surprise - the application quit. The window complained of a settings file, and sure enough, a quick look at the log yielded:
[1] DEBUG MentatException – Creating exception: Failed to load settings file C:\Program Files\EVEMentat\Storage\EVEMentat.settings
Turns out EVE Mentat had been ported to .NET 4.0 since that post was made, so it was completely useless for my purposes. So I tried the first thing that came to mind:
winetricks dotnet40
Who would've guessed:
[1] DEBUG MentatException – Creating exception: Failed to load settings file C:\Program Files\EVEMentat\Storage\EVEMentat.settings
Next I tried making a new 32 bit Wine prefix, this time resulting in an error that .NET 4.0 had not been installed, even though I ran winetricks with the new prefix specified. Not one to be deterred, I continued my search. I stumbled upon an old post I had made on the EVE Mentat website when I tried doing this back in December 2013. I posted the log file (with the same problem regarding the settings file) and received this response from the man himself, Thart:
@JCMD Looks like EVE Mentat unable to load one of its libraries.Please reinstall your .NET, download fresh copy of EVE Mentat and unzip it WITH PRESERVING folder structure.
I must have read this reply a thousand times before the solution occurred to me: what if one of the other modules I was installing was interfering with the .NET 4.0 libraries required my EVE Mentat? Being the daring and adventurous man I am, I deleted my Wine prefixes and started anew. This time, I only ran one command through winetricks:
winetricks dotnet40
Running EVE Mentat in this new prefix succeeded! Next, some final operations to make sure importing orders and market details works properly. Open up a Terminal window and enter the following:
ln -s ~/Library/Application\ Support/EVE\ Online/p_drive/User/My\ Documents/EVE/logs/Marketlogs ~/EVE/logs
After running this command, your Marketlogs should be available for EVE Mentat to use. Next, we need to get the cache scraping feature operational. To do this is simple: in the EVE Mentat preferences, set the path of your game correctly. It should be similar, if not identical, to mine, but make sure that the drive letter in your wine is correct:
Z:\Applications\EVE\Contents\Resources\EVE\Contents\Resources\transgaming\c_drive\Program Files\CCP\EVE
Next up, we need to make another symlink between the cache folders of the Wine install and the Mac one:
ln -s /Users/[USERNAME]/Library/Application\ Support/EVE\ Online/p_drive/Local\ Settings/Application\ Data/CCP "/Users/[USERNAME]/.wine/drive_c/users/[USERNAME]/Local Settings/Application Data/CCP"
Remember to replace [USERNAME] with your actual username. Now, in the preferences for EVE Mentat, make sure you specify the temp folder as well as the game path (the temp folder is called something like "c_program_files_ccp_eve_tranquility").

Now, only one issue remains: every time I try to import orders from the cache, I get an error code -1 that the cache import failed. This appears to be an ongoing issue with EVE Mentat that should be fixed in version 2.0, according to Thart. However, this entire setup doesn't take very long to implement so long as you're not trying to troubleshoot as you do it, so there might not be too much harm in trying out the above steps and seeing if it works for you.

If any of you brave souls manage to get the cache import feature working, be sure to comment! Until next time, fly safe o7

Thursday, July 10, 2014

The State of Industrial POSes in Crius

With the upcoming release of the Crius update, industrial POSes in EVE will be receiving a few sorely needed changes. Among these changes is the transition from a slot system to an activity system: this means that in Crius, rather than needing to install multiple modules to increase the number of slots available for industrial jobs, only one module is necessary, with job cost increasing as more jobs are created.

This leads to the question: "Why install multiple modules if they no longer provide more slots? Why not install just one?" CCP initially answered this question by stating that in Crius, multiple modules of the same type would provide a bonus to jobs running off that module, meaning a POS with several of a type of module would still maintain some sort of advantage over a POS with just one such module. 

However, in a recent forum post, CCP Greyscale confirmed that the stacking bonuses feature was being given the axe. Greyscale cites "the technical challenges involved in implementing it in a fully user-friendly way, and the somewhat limited upsides of the feature" as the reasons such a feature will not be implemented. 

Based on the extremely negative responses of the community thus far, it isn't difficult to see that these "limited upsides" aren't so limited at all, and that this was a feature highly desired by the majority of the industrial community. Why then, is CCP not implementing this change in Crius?

The "technical challenges" CCP Greyscale mentions stem from the train wreck that is the code for POSes in EVE. Many an update has gone by where the community has cried out for changes to the POS system, and CCP has regularly shot down these requests, citing "technical challenges."

CCP's reluctance to add new features to the already existing POS code is understandable: messy code means features become more difficult to implement, bugs are more likely to be present/significant, and all the features will need to be redone once new POS code is written.

But CCP refuses to tackle the bigger problem: many features are shelved because of "technical challenges" arising from this messy code, but the messy code is never redone. The only way to move forward from here, a course of action that has been a long time coming and is, in my opinion, many years overdue, is to completely rewrite the POS code and overhaul the system.

I don't believe we will see any major improvements to the POS system until this course of action is taken, and while the features included in Crius are certainly desirable for industrialists, the effects that these changes will cause remain obvious: it is pointless to install more than one module to run jobs, so industrial towers will be switched to small towers running one single industrial module and possibly several weapon modules, cutting fuel costs and making the game much more boring.