Page 1 of 1
[DLL] loadtags and addbytes *example proj*
Posted: Fri Dec 30, 2005 9:28 am
by modder4321
well this dll is my first and it works. i releasing this because its my first and because alot of people have trouble with loading tags in vb.net2005 so i compiled a .dll, i hope this helps and heres a vb.net2005 code snippet of how to use
1. add refrence to .dll(project>add refrence...) then choose browse and select the .dll then the app will look for the dll there but if it cant find it it will look for it at the applications startup path. so just include this with the project if u release
2. code
Code: Select all
Public Class Form1
Dim open As New OpenFileDialog
Dim loadtag As New loadtags.Class1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If (open.ShowDialog = Windows.Forms.DialogResult.Cancel) Then Exit Sub
loadtag.loadarray(open.FileName)
loadtag.loadtags(open.FileName)
For i As Long = 0 To loadtag.realtagcount - 1
ListBox1.Items.Add(loadtag.tagnames(i))
Next
End Sub
End Class
there is more it can do and to findout all the functions type in "loadtag." and it will show them all.
u might be wondering y loadarray first well loadarray first because it will save time if u decide to add bytes because it will have it in an array when u use "loadtag.addbytes" and add instantly
http://www.teamdefiance.la/forum/index. ... ost&id=140
post feedback on how u feel or how i could make this better.
heres an example projet on how to use.
http://kayuni.com/H2Dll.rar
Posted: Fri Dec 30, 2005 10:32 am
by r4nd0m
Pretty nifty
Posted: Tue Jan 03, 2006 3:23 pm
by Klaz0r
Great dll, but I'm having a problem. Every time I try to compare a string to one in the array, it never finds it. The only way I can get it to match is if I load them up into 2 separate listboxes and compare them from there, but that isn't going to work for the program I'm making.
Posted: Tue Jan 03, 2006 5:22 pm
by Kurroda
can i just ask a question(i am not very adavanced at coding) what would this do ?
Posted: Tue Jan 03, 2006 6:04 pm
by Klaz0r
You can use this dll to load a mapfile and work with tags, like finding offsets and stuff. BTW I am still having the problem from above^
Posted: Tue Jan 03, 2006 6:10 pm
by Kurroda
oh really some one should rite a tut for this i would like to use it but dont no how
Posted: Wed Jan 04, 2006 9:16 am
by modder4321
wat are u trying to compare? or find in the array?
Posted: Wed Jan 04, 2006 1:35 pm
by Klaz0r
Say I'm trying to find a tag's ID. I search through the array in a for loop looking for the tag "objects\characters\marine\marine". When I find it, I will use the same index from the loop to locate the ID. But, the for loop never matched the tags. When I'm viewing the array in debug mode during a break, all the tags are listed as something like: "globals\globals without the ending quotation mark, if that has anything to do with it.
And royal, I have a program (that R4ND0M made and I modified) that can show you the code to use the dll(It's written in VB2005). Download it at:
http://kayuni.com/H2Dll.rar
Posted: Thu Jan 05, 2006 10:53 am
by modder4321
Klaz0r wrote:Say I'm trying to find a tag's ID. I search through the array in a for loop looking for the tag "objects\characters\marine\marine". When I find it, I will use the same index from the loop to locate the ID. But, the for loop never matched the tags. When I'm viewing the array in debug mode during a break, all the tags are listed as something like: "globals\globals without the ending quotation mark, if that has anything to do with it.
And royal, I have a program (that R4ND0M made and I modified) that can show you the code to use the dll(It's written in VB2005). Download it at:
http://kayuni.com/H2Dll.rar
in the loop u should have something like.
Code: Select all
dim w as long = 0
do until w = realtagcount - 1
if loadtag.tagnames(w) = "objects\characters\marine\marine" then
do something
endif
w += 1
loop
btw i added that example proj to the main post
Posted: Thu Jan 05, 2006 12:21 pm
by superaison
yay, Kayuni, i think we can finally finish!!
Posted: Thu Jan 05, 2006 1:42 pm
by Kurroda
thanks i use vb2005 i like it much more than 6 i have both versions
Posted: Fri Jan 06, 2006 1:07 pm
by Klaz0r
Still not working, here is the code I am using:
Code: Select all
For i As Long = 0 To loadtag.realtagcount - 1
If loadtag.TagTag(i) = "hlmt" Then
If loadtag.tagnames(i) = replacedtag Then
bipdoffset = loadtag.TagOffset(i)
bipdid = loadtag.TagID(i)
End If
End If
Next
I put in the "If loadtag.TagTag(i) = "hlmt" Then" line to help speed things up, that way only hlmt's are checked.
But anyway, I think my VB may be buggy. Cause when I use a breakpoint at the spot, and then check the contents of the array, they are all listed as something like: "objects\characters\marine\marine (notice the last quotation is missing). When I make my own array, there is a quotation on each side. Sorry for bugging you, but if I can get this to work, then I can finish my program. Also, your code gave me the same problem.
Posted: Sat Jan 07, 2006 10:37 am
by modder4321
debug it and c wat if it doesnt go into(does it not find hlmt or the tagname?)
then i can help its possible that i accidently did something so the tagtag's are reversed...
Posted: Sat Jan 07, 2006 11:26 am
by superaison
mmmmk, it like here ill take a pic 4 ye:

Posted: Sat Jan 07, 2006 11:40 am
by modder4321
well tagid should be dimmed as
0 to realtagcount - 1
that error means ur trying to do something like
dim some(0 to 9) as string
some(100) = "this will have an error because its not a valid number in th array"
Posted: Sat Jan 07, 2006 12:21 pm
by Klaz0r
Ok, i fixed the problem, the string is fixed when it is loaded into a text box and then re-extracted. Thanks anyway for your help. And btw, the hlmt part works fine, I can get it to parse through all the tags and only load up hlmts or bipds.