• Most people probably don't realise this, but this forum has had two editors for a number of years. One is the xenForo default editor, and the other is a custom editor I made years back I called BBCEd.

    All the settings for which editor you use was lost during the upgrade. You can find the setting under Account Settings > Preferences > Editor.

Programming General

Old topic!
The last post in this thread is over 60 days old. Posting in this thread will be considered a bump, so please make an attempt to be courteous if you go ahead with it.

If the last post is over 6 months old, it may instead be a better idea to start a new topic. If you aren't sure about what to do, feel free to ask a staff member for help, or try to locate a 'general questions'-type thread if it exists in this (sub-)forum.
Jun 13, 2015 at 8:01 AM
Senior Member
"Fly, Fly, Fly!"
Join Date: Sep 19, 2013
Location: C:\Users\Shinigami\Dirty_Videos
Posts: 125
Age: 21
#1
Hey there! I know there are quite a few programmers here, so I thought we could make a thread to discuss such matters! Talk about your new non-game programs, ask questions, whatever as long as it's programming related! I'll kick things off with 2 things:

1. My image glitching program "Glitch It!". Program and source available at http://shinigamimachine.com/projects.html

2. Does anybody know how to edit hex in VB2012? I know how to read the data from a file, but not how to read it as hex. I want to be able to make a CS profile editor (it won't be anything special or different really, just a test to see if I know what I'm doing)
 
Jun 13, 2015 at 1:59 PM
Senior Member
"This is the greatest handgun ever made! You have to ask yourself, do I feel lucky?"
Join Date: Jul 11, 2009
Location: Texas, USA
Posts: 90
#2
Jun 13, 2015 at 2:55 PM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 6003
#3
imo you should just use a dedicated hex editor, XVI32 has never done me wrong
 
Jun 13, 2015 at 3:28 PM
Just some person
"Life begins and ends with Nu."
Join Date: Dec 30, 2005
Location: Germany
Posts: 3214
Age: 27
#4
ShinigamiMachine said:
Does anybody know how to edit hex in VB2012? I know how to read the data from a file, but not how to read it as hex. I want to be able to make a CS profile editor (it won't be anything special or different really, just a test to see if I know what I'm doing)
I'm not sure what you mean, are you asking for a way to display an integer as a hex string? Because then it's just:
Code:
Dim i As Integer
i.ToString("X")
There is no way to read something as "Hex", you can either read a file as a text or binary file but nothing else. What you're asking about is probably how to encode/decode your input/output.
 
Jun 13, 2015 at 4:39 PM
Senior Member
"Wahoo! Upgrade!"
Join Date: Aug 11, 2014
Location:
Posts: 58
#5
things aren't stored in hex. As far as I'm aware hex was just a notation for programmers because it's more convenient than binary or base 10.

you would need to read the file in as binary, convert it to hex, let the programmer edit that, then convert back to binary and store it in the file.
 
Jun 13, 2015 at 5:44 PM
Professional Whatever
"Life begins and ends with Nu."
Join Date: Jan 13, 2011
Location: Lasagna
Posts: 4494
#6
What I did was read the .dat file into a byte array, then access specific parts of the array to convert the values back into integers or chars or whatever. I don't remember if there was a different syntax for reading bytes, but I'm pretty sure it was really simple. Once I'm back at home I can find my code for you.
 
Jun 13, 2015 at 7:41 PM
Senior Member
"Fly, Fly, Fly!"
Join Date: Sep 19, 2013
Location: C:\Users\Shinigami\Dirty_Videos
Posts: 125
Age: 21
#7
Thanks for all the help guys!


Noxid said:
imo you should just use a dedicated hex editor, XVI32 has never done me wrong
But I want to make a program that edits specific values so that it could do something like a CS profile editor.
 
Jun 13, 2015 at 8:55 PM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 6003
#8
Lots of those already exist though
 
Jun 13, 2015 at 10:08 PM
Senior Member
"Fly, Fly, Fly!"
Join Date: Sep 19, 2013
Location: C:\Users\Shinigami\Dirty_Videos
Posts: 125
Age: 21
#9
Noxid said:
Lots of those already exist though
I know, there are other things I want to do with hex editing. That was just an example so people could understand what I was trying to achieve
 
Jun 14, 2015 at 1:23 AM
Senior Member
"Ha! Ha! Ha! Mega Man is no match for my Mimiga Man!"
Join Date: Jan 22, 2015
Location:
Posts: 249
#10
As the only programmer here, I think we need a thread for translators, not for programmers ;)
 
Jun 14, 2015 at 1:52 AM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 6003
#11
q3hardcore said:
As the only programmer here
I guess I better just fade away...........
 
Jun 14, 2015 at 1:55 AM
Senior Member
"Ha! Ha! Ha! Mega Man is no match for my Mimiga Man!"
Join Date: Jan 22, 2015
Location:
Posts: 249
#12
Noxid said:
Excuse me?
How did you come to that conclusion
Can't you take a joke?
EDIT: :)
 
Jun 14, 2015 at 6:29 AM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3714
Age: 27
#13
q3hardcore said:
As the only programmer here, I think we need a thread for translators, not for programmers ;)
You're a programmer?!?
 
Jun 15, 2015 at 4:11 AM
Senior Member
"I, Ikachan. The Life and Documentary of the OrigiNAL SQuiD."
Join Date: Mar 14, 2015
Location:
Posts: 172
#15
Well, I can make a smiley face using Javascript.
 
Jun 15, 2015 at 4:09 PM
Senior Member
"This is the greatest handgun ever made! You have to ask yourself, do I feel lucky?"
Join Date: Aug 2, 2014
Location: In a world full of people who want every piece of
Posts: 112
#16
ShinigamiMachine said:
Thanks for all the help guys!


But I want to make a program that edits specific values so that it could do something like a CS profile editor.
Getting to the point: It seems you want to manipulate byte values.
That's simple in VB.Net: Use "File.ReadAllBytes" to get a byte array, get bytes out of it, modify bytes, etc, and use "File.WriteAllBytes" to write back to the file. (To make a new file, create a new byte array, put whatever data into it and use File.WriteAllBytes)

Note to those who would prefer using FileStream: I'm assuming I should keep it simple, and that he's working with fixed-size files with known layouts(like a CS profile editor).
 
Jun 18, 2015 at 6:11 PM
Senior Member
"Fly, Fly, Fly!"
Join Date: Sep 19, 2013
Location: C:\Users\Shinigami\Dirty_Videos
Posts: 125
Age: 21
#17
gamemanj said:
Getting to the point: It seems you want to manipulate byte values.
That's simple in VB.Net: Use "File.ReadAllBytes" to get a byte array, get bytes out of it, modify bytes, etc, and use "File.WriteAllBytes" to write back to the file. (To make a new file, create a new byte array, put whatever data into it and use File.WriteAllBytes)

Note to those who would prefer using FileStream: I'm assuming I should keep it simple, and that he's working with fixed-size files with known layouts(like a CS profile editor).
Thank you for your help, and I much prefer ReadAllBytes to FileStream. Now let's change this thread's topic from my little question to programming stuff in general (as the title suggests!)
 
Jun 19, 2015 at 4:17 AM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 6003
#18
ok but uhhh
what do you want to talk about
 
Jun 19, 2015 at 4:20 AM
Senior Member
"Fly, Fly, Fly!"
Join Date: Sep 19, 2013
Location: C:\Users\Shinigami\Dirty_Videos
Posts: 125
Age: 21
#19
Well, I don't know. Are any programmers here working on non-game projects? Those could be fun to discuss!
 
Jun 19, 2015 at 6:03 AM
Senior Member
"Ha! Ha! Ha! Mega Man is no match for my Mimiga Man!"
Join Date: Jan 22, 2015
Location:
Posts: 249
#20
ShinigamiMachine said:
Well, I don't know. Are any programmers here working on non-game projects? Those could be fun to discuss!
Sure, I'm trying to re-write OrgView's org-loading code, so I can load external orgs.
 
Top