PDA

View Full Version : X-COM elerium editor


yoni0505
24-07-2009, 09:05 PM
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:
http://i204.photobucket.com/albums/bb106/yoni0593/Elerium-115editorpic-2.jpg

download:
http://yoni0505.blogspot.com/2009/07/x-com-ufo-defense-elerium-155-v11.html

_r.u.s.s.
24-07-2009, 09:23 PM
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

yoni0505
24-07-2009, 09:42 PM
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

_r.u.s.s.
24-07-2009, 10:09 PM
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>

yoni0505
24-07-2009, 10:15 PM
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...

_r.u.s.s.
24-07-2009, 10:18 PM
edited that post, sorry i didn't realize letters

yoni0505
25-07-2009, 12:24 AM
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