Jump to content


Photo
- - - - -

Cave Story Python save converter


Old topic!
Guest, 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.


  • Please log in to reply
60 replies to this topic

#21 09 July 2009 - 02:22 AM

strtpls3 Offline
Novice Member
"Fresh from the Bakery"
Join Date: 29 Jun 2009
Location:
Posts: 2
 

Hey, thats a good suggestion. It looks like I am running an older version of Python. Luckily I can update and I'll get back to you on if that fixes it.

Thanks for the help!

Strtpls3

#22 09 July 2009 - 01:50 PM

Celtic Minstrel Offline
In front of a computer
"Man, if only I had an apple..."
Join Date: 01 Mar 2008
Location: LocationGrasstown
Posts: 1,448
 

Keep in mind that you can currently only convert on a Mac. Just in case you didn't read the Readme. :p


So it's the Mac that needs a Python upgrade, I presume.

Edited by Celtic Minstrel, 09 July 2009 - 11:02 PM.

Well I've got a solution for you: Think before you type. Sheesh...

Some people really need to take this to heart. Not necessarily just the ones it was originally addressed to, either.

Good thing the internet is made of backups


#23 07 November 2009 - 08:16 AM

vflux Offline
Novice Member
"Officially Worth 1 Rupee"
Join Date: 07 Nov 2009
Location:
Posts: 1
 

I registered just to ask (because for once, Google has failed me) why I can't get your script to work:

Which operation would you like to perform?
E - Extract a save from a Macintosh property list and save it to a file.
S - Store a save in a Macintosh property list, overwriting the existing one.
X - Edit a save file.
Q - Quit the program.
e
Enter the filename to extract the profile to:
Or type Q to cancel.
default.d
[('extract-mac-profile', '/Users/vflux/Library/Preferences/com.nakiwo.Doukutsu.plist', '.pycs_temp'), ('convert-profile', '.pycs_temp', 'default.d'), ('clean-temp-file', '.pycs_temp'), ('interactive',)]
Traceback (most recent call last):
File "cavesaveconv.py", line 188, in <module>
main()
File "cavesaveconv.py", line 23, in main
functions[curTask[0]](*curTask[1:])
File "/Users/vflux/Desktop/cavesaveconv2/csc_convert.py", line 10, in extract
prefs = plist.readPlistFromString(prefs)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plistlib.py", line 103, in readPlistFromString
return readPlist(StringIO(data))
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plistlib.py", line 78, in readPlist
rootObject = p.parse(pathOrFile)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plistlib.py", line 406, in parse
parser.ParseFile(fileobj)
xml.parsers.expat.ExpatError: no element found: line 1, column 0

I updated Python to the latest version, but that didn't work.

Any ideas?

#24 02 January 2010 - 01:28 PM

Merlinoboy Offline
Banned
"This is the greatest handgun ever made! You have to ask yourself, do I feel lucky?"
Join Date: 02 Jan 2010
Location: LocationBehind you, holding a gun, aimed at your head. *boom*
Posts: 101
 

hey celtic minstrel, i m big fan. i can say i am pretty advanced in cavestory, but i have a save file i want to convert in mac save file, so, can yoou type out what you have to insert exactly in terminal? i already know how to activate it, cuz i work much more with terminal, just place all files in the home folder... but that isn't the subject, just i want 2 know how 2 convert a profile.dat into com.nakiwo.doukutsu.plist file. what do i have to type???:)
u already wuz a big help 4 me so already thnx...

#25 02 January 2010 - 01:52 PM

Merlinoboy Offline
Banned
"This is the greatest handgun ever made! You have to ask yourself, do I feel lucky?"
Join Date: 02 Jan 2010
Location: LocationBehind you, holding a gun, aimed at your head. *boom*
Posts: 101
 

i forgotten 2 say: i also want to add the lvl 3 machinegun, the blade lvl3, lvl 1 nemesis and spur lvl max. if i need to add sum other details i want bout the weapons, just tell me... but as you maybe will know... can you also write down how to insert this weapons? Thnx already...

#26 05 January 2010 - 07:37 PM

Celtic Minstrel Offline
In front of a computer
"Man, if only I had an apple..."
Join Date: 01 Mar 2008
Location: LocationGrasstown
Posts: 1,448
 

I registered just to ask (because for once, Google has failed me) why I can't get your script to work:

Eep, I forgot to comment the debug code.

Anyway... I'm not quite sure what your problem could be. Unless... had you run Cave Story before trying to do this? That could cause a problem... or if you haven't saved a game yet. Apart from that, I dunno... if this isn't the problem, I'll look into it at some point.

hey celtic minstrel, i m big fan. i can say i am pretty advanced in cavestory, but i have a save file i want to convert in mac save file, so, can yoou type out what you have to insert exactly in terminal? i already know how to activate it, cuz i work much more with terminal, just place all files in the home folder... but that isn't the subject, just i want 2 know how 2 convert a profile.dat into com.nakiwo.doukutsu.plist file. what do i have to type???


I'm pretty sure your question is answered in the readme. Just cd into the folder containing the program (that means typing "cd" in the terminal followed by a space, then dragging the folder into the terminal window, then pressing return), and then type "./cavesaveconv.py" and press return. (If that doesn't work, you could try "python cavesaveconv.py" instead.)

Once there, you choose what you want to do; "E" saves your current save into a file (converting it to a Windows save in the process), while "S" converts a Windows save to Mac and stores it where Cave Story will find it.

i forgotten 2 say: i also want to add the lvl 3 machinegun, the blade lvl3, lvl 1 nemesis and spur lvl max. if i need to add sum other details i want bout the weapons, just tell me... but as you maybe will know... can you also write down how to insert this weapons? Thnx already...

For this, you would need to choose "X" in the menu, but I can't remember if I implemented it yet.

EDIT: I just checked, and it is implemented; however, you need to know the number of the weapon you're adding. Each weapon has its own number. There's a list somewhere of which weapon is which number, but I'm not quite sure where it is.



...I really need to get back to this and make it more user-friendly.

Well I've got a solution for you: Think before you type. Sheesh...

Some people really need to take this to heart. Not necessarily just the ones it was originally addressed to, either.

Good thing the internet is made of backups


#27 06 January 2010 - 02:27 PM

Merlinoboy Offline
Banned
"This is the greatest handgun ever made! You have to ask yourself, do I feel lucky?"
Join Date: 02 Jan 2010
Location: LocationBehind you, holding a gun, aimed at your head. *boom*
Posts: 101
 

thnx, i now know how 2 change save files from .dat 2 .nakiwo.doukutsu.plist, and i am very happy:D. u r the best. and already thnx 4 the weaponadd part. hope u later have the change 2 find out what you precisely have 2 type 4 the weapons, cuz that should really help, but already thnx and u rule. bye
I do not care if you try to bother me.
I do not care if you flame me.
I do not care if you kill me.
I will kill you if you do one of the things above with sonic or one of his friends. :mad:

My current activity is working on my sonic movie.
You may ask me what it is like.
You may ask me to get the script.

I wish i was sonic...
[SIGPIC][/SIGPIC]
reason why...

Also if you like to, if you want to bother me, you may try with VM-ing me, but just know: I. Can't. Be. Bothered.

#28 09 January 2010 - 03:35 AM

Celtic Minstrel Offline
In front of a computer
"Man, if only I had an apple..."
Join Date: 01 Mar 2008
Location: LocationGrasstown
Posts: 1,448
 

I have several format questions, if anyone knowledgeable is listening watching.

  • What is the format of the Equipped Items section (offset 0x2C-0x2F)? Is it a bit field? (I did find a cavestory-profile.txt that tries to explain this, but it's not clear enough.) The best way to explain this to me would probably be to tell me the full 4-byte value (in hex) for every possibility in which exactly one item is equipped.
  • Also, is it possible to have an item equipped that you do not possess, and if so does it have any odd effects? Should it be allowed with this editor? Are the equip slots even each associated with a specific item, or are they independent of the items?
  • Are the flags stored as a bit field? The cavestory-flags.txt file I have suggests that they are, but I'm not quite sure how to interpret it. (It's by "kapow".)
  • Are skip flags stored in the save file? If so, where?
  • Weapon level depends directly on weapon energy, right? What is the weapon energy needed for each level on each weapon?
  • What happens if you set the Spur to have weapon energy greater than 0? Does it reset immediately, or last for one shot?

I think that's all my questions for now...

I do also have one request though. Could someone on Windows try using the command-line argument "-x star=1 -" on a save-game where the whimsical star is not active, and tell me what happens? Because I have a sneaking suspicion that the advanced edits, as currently coded, will only work on Mac. (This should give you one star only, not two or three.)

For the record, this means you would type the following at the command-line after cd-ing into the proper directory:
python cavesaveconv.py -edit profile.dat -x star=1 -
But replace "profile.dat" with the name of the save you're working on.

Well I've got a solution for you: Think before you type. Sheesh...

Some people really need to take this to heart. Not necessarily just the ones it was originally addressed to, either.

Good thing the internet is made of backups


#29 09 January 2010 - 03:46 AM

DragonBoots Offline
My scales bring all the bears to the yard~
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: 01 Jan 2008
Location: LocationAbandoned Mine Shaft, -1455, 4, 525
Posts: 1,993
Age: 23
 

  • Also, is it possible to have an item equipped that you do not possess, and if so does it have any odd effects? Should it be allowed with this editor? Are the equip slots even each associated with a specific item, or are they independent of the items?
  • Are skip flags stored in the save file? If so, where?
  • Weapon level depends directly on weapon energy, right? What is the weapon energy needed for each level on each weapon?
  • What happens if you set the Spur to have weapon energy greater than 0? Does it reset immediately, or last for one shot?


1.) Yes. Equip flags are independant of items.
2.) No, skip flags aren't stored anywhere. They reset when the game is exited (RAM-based, I think is the term). To manipulate skipflags you'd have to do some TSC edits or some major EXE haxx.
3.) Open Cave Story up in CS (if possible) and check under the edit weapons thing.
4.) Why not just experiment? :S

Good news everypony!

i r liek totes bcak lol!!!!11

An yea, thou shouldst not fear.

For I am, as the French say, a silly English ki-niggit.

Or summat, iunno.

\/\/()|\||)3|2 |-|()\/\/ /\/\4|\|`/ ()|= `/()|_| (4|\| |234|) +|-|!5...

Spoiler

 


#30 09 January 2010 - 03:50 AM

Celtic Minstrel Offline
In front of a computer
"Man, if only I had an apple..."
Join Date: 01 Mar 2008
Location: LocationGrasstown
Posts: 1,448
 

3.) Open Cave Story up in CS (if possible) and check under the edit weapons thing.

...CS? Do you mean CaveEditor? I could do that, but I'd have to go down two flights of stairs and turn on the computer; while I might do it sometime, it's easier to let people who use Windows anyway answer the question.

Also, I might have seen the answer somewhere on this forum.

4.) Why not just experiment? :S

See above.

Well I've got a solution for you: Think before you type. Sheesh...

Some people really need to take this to heart. Not necessarily just the ones it was originally addressed to, either.

Good thing the internet is made of backups




Old topic!
Guest, 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.



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users