On the subject of TSC

Mar 3, 2009 at 12:46 AM
Been here way too long...
"Life begins and ends with Nu."
Join Date: Jan 4, 2008
Location: Lingerie, but also, like, fancy curtains
Posts: 3052
fine.
I'll just do the two character thing.
mmm'kay?
 
Mar 3, 2009 at 1:10 AM
Junior Member
"It's dangerous to go alone!"
Join Date: Jan 3, 2009
Location:
Posts: 36
If you mean writing your data to memory in code space, it'll go away as soon as the program closes. You have to explicitly write your data to disk if you want it to come back. What you can do is use some unused code space to insert your own routine that will do the saving explicitly. If you want to do that check out the routines that handle profile.dat or 290.rec; that'll give you the functions you need to call to open and write to a file. If you aren't already familiar with C functions like fopen, fputc, fgetc fclose etc you should become familiar with them first in C so you know what you're coding in asm. I would think it'd probably be easiest to modify the profile.dat routine. Alternatively you could maybe try the Windows API functions WritePrivateProfileString and GetPrivateProfileString, or something similar. That may be a way to save and restore a value in a small amount of asm code. However I don't think CS uses those functions normally, so you may have to modify the import table or something so they're available in the exe.
 
Mar 15, 2009 at 12:18 PM
Been here way too long...
"..."
Join Date: Jan 21, 2006
Location:
Posts: 369
Lace said:
okay, thanks for the help.
I'm working on the save and load functions right now, but her'es an interesting tidbit I found:

basically, this is the underwater movement check. If you are underwater, your movement is slower. the possibilities for this are not quite endless, but are very cool, you could have the mimiga mask make you more agile, to make you seem more like a different character, you could make underwater have less or no gravity (space), utilize the water check for something else, like acid, have a suit of armor that you wear decrease your speed, or even add another check to the code. Another idea that comes to mind is in wtf story, you're never going to get life ups, but you could get agility ups by hacking the ml+ command, making you faster and with an epic jump height. Yes, this is a very nice piece of code. I hope you likes.

Would it be possible to use an eq+ to make your underwater movement exactally the same as your normal movement?

And is there something like this for regular movement? Surely i don't completely comprehend this information, but it looks like it would be fairly easy to simply change your base speed / jump height. If this is true, could someone please explain how?
 
Back
Top