Go Back   Forums > Community Chatterbox > Tech Corner > Programming
Memberlist Forum Rules Today's Posts
Search Forums:
Click here to use Advanced Search

Reply
 
Thread Tools Display Modes
Old 24-07-2009, 09:05 PM   #1
yoni0505
Forum hobbit

 
Join Date: Dec 2007
Location: Ramat Gan, Israel
Posts: 39
Cool X-COM elerium editor

im a new programmer, and i've made a program that can edit a x-com saved game's amount of elerium, its kinda lame, cause its hard to tell how much elerium you will get, but its working just fine, after all, as long we got loads of elerium who cares about how much, right?

*removed pic*

*removed download*

maybe later when i'll get more experienced with C++, and ill know how to edit the bytes by entering a decimal number, and how to make interface, ill make bigger editor, after all you can edit all the data the same way

*EDIT*
well im keeping the original post so ppl will understand whats going on...
SO, im releasing v1.1, here you just need to enter the amount of elerium you want, can't be more simple...

pic:


download:
http://yoni0505.blogspot.com/2009/07...m-155-v11.html

Last edited by yoni0505; 25-07-2009 at 12:48 AM. Reason: new version
yoni0505 is offline                         Send a private message to yoni0505
Reply With Quote
Old 24-07-2009, 09:23 PM   #2
_r.u.s.s.
I'm not Russ
but an ex-alektorophobic
 
_r.u.s.s.'s Avatar


 
Join Date: May 2005
Location: Nitra, Slovakia
Posts: 6,533
Default

so you basically don't know how to convert from dec to hex or you don't know what all these values in hex mean?

hey why don't you post the code here, i'm sure there'd be a plenty of people who'd like to help you to improve
__________________
_r.u.s.s. is offline                         Send a private message to _r.u.s.s.
Reply With Quote
Old 24-07-2009, 09:42 PM   #3
yoni0505
Forum hobbit

 
Join Date: Dec 2007
Location: Ramat Gan, Israel
Posts: 39
Default

i understand what is hex and i know how to translate it into decimal, the problem is that i need to separate the decimal value into 2 bytes in two different variables, its pretty simple but i still dont know how to do it with C++
example:
lets say i got the decimal number 30,000
in hex its 7530
means the first byte is 75 and the second is 30
now i need to save each of the bytes on different vars

btw i cant just write 7530 to the file, it will only save the first byte, this why i need 2 different vars
yoni0505 is offline                         Send a private message to yoni0505
Reply With Quote
Old 24-07-2009, 10:09 PM   #4
_r.u.s.s.
I'm not Russ
but an ex-alektorophobic
 
_r.u.s.s.'s Avatar


 
Join Date: May 2005
Location: Nitra, Slovakia
Posts: 6,533
Default

edit: nvm, now i understnad what you mean

well, if you put that hex number into string, then you can break it by substr. don't forget to #include <string>
__________________

Last edited by _r.u.s.s.; 24-07-2009 at 10:19 PM.
_r.u.s.s. is offline                         Send a private message to _r.u.s.s.
Reply With Quote
Old 24-07-2009, 10:15 PM   #5
yoni0505
Forum hobbit

 
Join Date: Dec 2007
Location: Ramat Gan, Israel
Posts: 39
Default

7530 is an example for hex value, i dont think it will work if the decimal number will be 65535, cause then the hex is FFFF and it wont work, will it?
i need a way to "cut" it to two pieces...
yoni0505 is offline                         Send a private message to yoni0505
Reply With Quote
Old 24-07-2009, 10:18 PM   #6
_r.u.s.s.
I'm not Russ
but an ex-alektorophobic
 
_r.u.s.s.'s Avatar


 
Join Date: May 2005
Location: Nitra, Slovakia
Posts: 6,533
Default

edited that post, sorry i didn't realize letters
__________________
_r.u.s.s. is offline                         Send a private message to _r.u.s.s.
Reply With Quote
Old 25-07-2009, 12:24 AM   #7
yoni0505
Forum hobbit

 
Join Date: Dec 2007
Location: Ramat Gan, Israel
Posts: 39
Default

i've solved this problem! there is a way to remove each of the bytes using bitwise AND and Logical shift operators, now you can just put in a number and you got it! i will finish it and will upload it soon
yoni0505 is offline                         Send a private message to yoni0505
Reply With Quote
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Extra] several Editor Rogerwilco Documentation / Extras 2 20-11-2008 05:29 PM
Editor's Ratings UFO Old Suggestions 6 05-09-2007 02:01 PM
I Need Midi Editor Nick Music, Art, Movies 0 01-11-2006 10:04 AM
Uge Editor & M&m 3 rss Tech Corner 2 30-09-2005 06:36 PM


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump
 


The current time is 05:25 AM (GMT)

 
Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.