VaultNetwork.netVault Network Boards
Author Topic: Plugin dev via Visual Basic 6 questions [Locked]
KhaanVrenn  1 star
Posts: 50
Registered:
Hi = )

I'm well aware that Virindi Tank is the overwhelming choice for a combat macro, but I wanted to go into the code of LTx and play around with it.

I used Tortoise to go into Xeon's SVN and downloaded everything he has in there. I will reference this post, where Xeon gives a quick rundown on how to build from the SVN:
http://vnboards.ign.com/ac_utilities/b5432/97321172/p1 (about halfway down page 1).

I realize his post was from '06, and of course there are issues. If you click on the first link he provides, you get the repository with 2 folders, Source and Release. Many of the files he references in his 'build' notes do not exist. There is only one .SLN file, LifeTankX.sln, and no DarksideFilterMM.sln, among some of the differences.

I'm new to Visual Studio 6, so not sure what I'm really doing here... here's what's being done, and not working:
1. Load DarksideFilter.vbp into Visual Basic. Use File -> Build DarkSideFilter.dll - save to a new folder in My Documents called LTxBuild
2. Load Core.vbp, use File -> Build Core.dll - save to same folder as above
3. Load CoreInterface.vbp, use File -> Build CoreInterface.dll - save same place
4. Load LTEngine.vbp, use File -> Build LTEngine.dll

Now, about 3 years ago, I recall doing basically the same steps, and with a working LTx installation, I just renamed all of the installed LTx files in C:\Games\Lifetank X\ to .OLD, moved in the 4 new builds, and it was working. I'm not having the same luck here. If I do that now, I get the LTx icon on the Decal bar, and there's about an 8 second 'hang', then main chat says LTx couldn't initialize, the plugin is unloaded, and the icon is removed. If I took other steps before or after moving the new files to C:\Games a few years ago, I cannot remember, but I know it worked.

Here's a strange one... after deleting the new builds from C:\Games and renaming the .OLD files back to .DLL's, on login, LTx would load up, but not send the MOTD to chat (the author credits and quick shortcut key summary). The interface opens, but everything is blank. I logged out, went into Decal, removed LifeTank X and DarkSideFilter, closed Decal, went into Add/Remove programs, uninstalled Lifetank. I then re-installed Lifetank with the .MSI package, logged back into AC, and everything was working again. I checked the LTx Logs, and it was saying DarkSideFilter could not be found or loaded. Apparently the Core was initializing and making the GUI available in-game, albeit with no data available.

Ok, so with a working LTx in-game again, I logged everything out, loaded up DarkSideFilter.vbp into Visual Studio, and built the .DLL again, saving it to a different folder. I logged into AC, and got the blank interface again. Not sure how this is possible? How could building a new .DLL in VB 6, and saving it nowhere near LTx, cause the existing LTx to nerf? Strange.

Anyhow, I would actually like to be able to build the full installer when making changes, but I cannot get the 4 necessary .DLL builds working in-game, and just building them nerfs a working installation, so I'm a ways from figuring out how to actually build the .MSI installer... I realize this is long, but I figure many of these facts would end up being asked, so I'm just it all out up front. Can a kind soul hold my hand and help me through getting those source files built so that they work in-game? I can't change any of the code until I can do this and test the changes.

I'm on a Win 7 Ultimate 64bit machine... I Googled how the 'pros' are getting Visual Studio 6 to install and run correctly under Win7 64, and their instructions got me up and running without any hitches. I'm not getting any compiling errors, and anything weird whatsoever. Thanks for reading, and thanks in advance if you can offer some help!
Drakier  4 stars
Posts: 1,486
Registered:
I would highly recommend not messing with VB6 ever. It is pretty much a dead language for the most part, and I'm not sure how long things compiled in VB6 will continue to work with Decal long-term. Just a suggestion.
KhaanVrenn  1 star
Posts: 50
Registered:
Thank you, good sir. Understood. This is just for my education and enjoyment. If it stopped working tomorrow, I'd be no worse for the wear. ; D

Awfully good to see you show up on the boards occasionally, Drak! Is there any chance ACDC could be updated quick enough to accommodate more player slots than 7? I can edit the ini file, but they still don't show up.. guess it's hard-coded into the program. I absolutely do not mind hand editing the ini file, so it's not necessary to program the main GUI for input/acceptance of new names, or anything fancy...

Ok... anyways... can any old school plugin programmer please help me here? When I have a VB6 project file open, all I can see to do with it is under the FILE tab, and that's to create a DLL.. is there something I'm missing? Do I need to physically register those new DLL's? Does something go haywire in the registry with the CLSID of the object?
Virindi-Inquisitor  4 stars
Posts: 1,538
Registered: 2001-11-18 22:25:54
>> How could building a new .DLL in VB 6, and saving it nowhere near LTx, cause the existing LTx to nerf? Strange.

It is COM. VB is probably registering the COM objects when it is done with the build, so they now point to the newly built dll instead of the original one.

 

-----signature-----
Virindi
---
****Virindi Plugins FAQ**** http://www.virindi.net/wiki/index.php/Virindi_Plugins_FAQ
http://www.virindi.net - Virindi Tank, Follower, Integrator, Reporter, VCS5, XPHelper, Item Tool, HUDs, etc...
Decal Core Dev - http://www.decaldev.com
KhaanVrenn  1 star
Posts: 50
Registered:
Thanks VI! A hint! Is this done inside the registry? Where would I peek at to see what's being changed? Is there a setting inside VB you can use to turn off that behavior? Seems you wouldn't necessarily want that while testing under some circumstances. Thanks again! Would be thrilled to move beyond this problem!
Virindi-Inquisitor  4 stars
Posts: 1,538
Registered: 2001-11-18 22:25:54
It goes in several places in the registry. For instance, on a 64-bit windows machine, VVS's dll location will be stored here:

HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{DBAC9286-B38D-4570-961F-D4D9349AE3D4}\InprocServer32

 

-----signature-----
Virindi
---
****Virindi Plugins FAQ**** http://www.virindi.net/wiki/index.php/Virindi_Plugins_FAQ
http://www.virindi.net - Virindi Tank, Follower, Integrator, Reporter, VCS5, XPHelper, Item Tool, HUDs, etc...
Decal Core Dev - http://www.decaldev.com
KhaanVrenn  1 star
Posts: 50
Registered:
Thank you again! Taking baby steps here, but VB was changing the CLSID... I exported the good one with regedit, built the new DLL, imported back the good one, and I'm in-game with LTx initialized and working. Of course, we're not using the newly built file yet, but at least the current install didn't quit. I'll test some more after dinner. Your help is most appreciated!
KhaanVrenn  1 star
Posts: 50
Registered:
Well VI, the answer to why the current working LT became unusable became the answer to the whole issue. Everytime VB 6 builds a DLL, it registers that DLL.

The short story is here, the LTx source is now compiling correctly, and seems to be running fine... and I'm already making changes. I'm starting with how it works with Items (ID'ing, stats, and looting). For a really quick fix, Xeon just lumped Epics in with Majors, so I pulled those out and properly separated them. This helped fix the problem where if an Epic item was ID'd, it just said Epic Detected, and no other stats were displayed. Right now, I'm working on ID'ing weapon skills, which is going to require me to wade in chin-deep into that DarksideFilter. I have found where the old skill is pulled, and apparently that is still being sent by Turbine's server, so in LTx, a bow is ID'd as needing bow skill rather than Missile Weapon skill (Decal hook &H9E&. So... long road ahead... really really long road...
joeblow8579  2 stars
Posts: 257
Registered:
I applaud your effort, but is there any particular reason you are trying to get lifetank working (a humongous job), versus spending time fixing one of the many essential plugins that no longer work and that we don't have duplicate functionality for? I could come up with a list of six or eight plugins that could really use some development time before lifetank.

Ammogimp
Target Info
Quest Timer
Botshopper
Mule Trade It
Logwiz

Even my least favorite of all plugins, Alinco, would be a better bet with your time.
KhaanVrenn  1 star
Posts: 50
Registered:
My response might seem selfish, but I want to fix some of LT's stuff for -me-. I'm not a power player, and what it does, it still does great (at least for me). It's just annoying to me that some of the features I've come to rely on (like ID'ing weaps and armor) are broken that badly. I already enjoy what little I've fixed so far. I'm also intimately familiar with almost every little thing LT does, which brings me to your list of plugins that could use updating... I haven't used any on that list besides Mule TradeIt!, so I have no idea what they're supposed to do, versus what needs fixed/updated. While I'd be all for spending my time and energy doing something that might benefit a wider audience, it also ultimately needs to serve me as well. I'm fixing LT to serve me for right now. If there was another plugin I wish I had the source to, in order to make 100% functional again, it'd be Imp Inventory.

I do realize that over the last year or two, LT has really fallen in grace, even to some of its most loyal users. When installed and configured correctly, it really does still work quite well, and this is also installed on a Win 7 64bit Ult machine. The extra memory I'm running has reduced the amount of crashes down to like maybe 1 or 2 a month, and this is also using ACDC with several accounts. I'm just calling myself lucky that I have everything installed and working as it ever was on any of my XP machines over the years. Knock on wood? I do that after reading the numerous stories of frustration back here..

Let me play with this.. learn some things... I might take on some other plugins soon. I really enjoy programming, but honestly, working with Decal is brand new for me. I'm gonna make a ton of rookie mistakes, and I'm thankful to have a community to ask questions.

VaultNetwork.net is an independently operated community forum and is not affiliated with, endorsed by, or technically based on IGN, GameSpy, FilePlanet, GameStats, or the former IGN/GameSpy Vault Network.
References to VaultNetwork.net mean this site/domain. VNBoards-style presentation is a visual homage only. By using this site, you agree to the forum rules.