Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Editing Things  (Read 4446 times)

rockhard556

  • Bay Watcher
    • View Profile
Editing Things
« on: September 24, 2011, 02:04:23 am »

I was wondering if there was a way to edit things like a charachters stats and skills in the save file if this is in the wrong place please delete it and i apologize if such turns out to be the case any answers would be appreciated thank you.
Logged

klingon13524

  • Bay Watcher
  • The Mongols are cool!
    • View Profile
Re: Editing Things
« Reply #1 on: September 24, 2011, 03:08:14 am »

I assume you mean in LCS, right? This is the only forum you're supposed to post about it in! Also, try to be as specific as possible about what you want to edit.
Logged
By creating a gobstopper that never loses its flavor he broke thermodynamics
Maybe it's parasitic. It never loses its flavor because you eventually die from having your nutrients stolen by it.

rockhard556

  • Bay Watcher
    • View Profile
Re: Editing Things
« Reply #2 on: September 24, 2011, 09:45:58 am »

i would specifically like to know how to edit attributes and skills to charachters i have saved
Logged

Carlos Gustavos

  • Bay Watcher
    • View Profile
Re: Editing Things
« Reply #3 on: September 27, 2011, 09:07:23 am »

Yes, you can edit the save file. Characters are stored as xml with all their properties (mostly) easy to edit. Attributes and skills don't have their names stored with them though so if you want to edit a specific one you're going to have to check the source to know which one's which or compare their values with what you see in the game. You also should know that before every blob of xml in the otherwise binary file are four (I think) bytes counting how many bytes the following blob of xml is. So if you insert or remove characters, eg changing 0 to 20 adds one extra character, rather than just change them you have to change the preceding count as well.
Logged

rockhard556

  • Bay Watcher
    • View Profile
Re: Editing Things
« Reply #4 on: September 27, 2011, 03:53:05 pm »

thank you very helpful i will now  proceed to make the super liberal with your help
if a mod could lock this form it would be great as the question has been resolved
Logged

Stargrasper

  • Bay Watcher
    • View Profile
Re: Editing Things
« Reply #5 on: September 27, 2011, 07:37:02 pm »

First of all, can't you lock your own threads?  Second, there's really no particular reason to lock the thread.  It might be useful to be able to post in it later if you or someone else has further questions or comments.

Also, good luck.
Logged

ryan5050

  • Bay Watcher
    • View Profile
Re: Editing Things
« Reply #6 on: October 12, 2011, 06:14:53 am »

thank you very helpful i will now  proceed to make the super liberal with your help
if a mod could lock this form it would be great as the question has been resolved
By the way we like to write with capitals and punctuation.
It's no biggie though. :)
Logged

s1rVr15

  • Escaped Lunatic
  • I am the most badass sentient cat in the universe.
    • View Profile
Re: Editing Things
« Reply #7 on: August 26, 2013, 12:34:57 am »

I know this is probably hopeless, but i have absolutely no experience besides BASIC so many years ago, so I have no idea what the preceding count is or how I edit it, or what to edit it to. I can find the values, and edit them, but I encounter the same problem. If this is fruitless, I'll start a new topic.
EDIT: I cannot find the values if they are over 10, and the -8whatever value before it remains the same all throughout.
« Last Edit: August 26, 2013, 02:29:49 am by s1rVr15 »
Logged
"Be quite careful with dark humor. It isn't everybody's cup of liquefied puppy." - s1rvr15

Liberal Elitist

  • Bay Watcher
  • I'm more liberal than you are!
    • View Profile
    • The Liberal Crime Squad wiki
Re: Editing Things
« Reply #8 on: August 26, 2013, 10:29:13 pm »

Yes, you can edit the save file. Characters are stored as xml with all their properties (mostly) easy to edit. Attributes and skills don't have their names stored with them though so if you want to edit a specific one you're going to have to check the source to know which one's which or compare their values with what you see in the game. You also should know that before every blob of xml in the otherwise binary file are four (I think) bytes counting how many bytes the following blob of xml is. So if you insert or remove characters, eg changing 0 to 20 adds one extra character, rather than just change them you have to change the preceding count as well.
I know this is probably hopeless, but i have absolutely no experience besides BASIC so many years ago, so I have no idea what the preceding count is or how I edit it, or what to edit it to. I can find the values, and edit them, but I encounter the same problem. If this is fruitless, I'll start a new topic.
EDIT: I cannot find the values if they are over 10, and the -8whatever value before it remains the same all throughout.

Sounds like maybe having the entire savegame file be pure XML so that it could be easily edited in a text editor would be a good idea. Then folks trying to edit it would have a lot less trouble. Then again, I don't know whether it would be good or bad to make it really easy to edit savegame files. I have mixed feelings on it.
Logged
The Liberal Crime Squad wiki is your friend.

Quote from: Lielac
Edit: Figured it out via a little bit of trial and error and oH MY GOD WHAT IS THIS MUSIC WHAT IS THIS MUSIC WHAT THE HECK IS IT SPACEBALLS MUSIC? WHATEVER IT IS IT IS MAGICAL

The Cheshire Cat

  • Bay Watcher
    • View Profile
Re: Editing Things
« Reply #9 on: September 02, 2013, 06:34:11 pm »

Yes, you can edit the save file. Characters are stored as xml with all their properties (mostly) easy to edit. Attributes and skills don't have their names stored with them though so if you want to edit a specific one you're going to have to check the source to know which one's which or compare their values with what you see in the game. You also should know that before every blob of xml in the otherwise binary file are four (I think) bytes counting how many bytes the following blob of xml is. So if you insert or remove characters, eg changing 0 to 20 adds one extra character, rather than just change them you have to change the preceding count as well.
I know this is probably hopeless, but i have absolutely no experience besides BASIC so many years ago, so I have no idea what the preceding count is or how I edit it, or what to edit it to. I can find the values, and edit them, but I encounter the same problem. If this is fruitless, I'll start a new topic.
EDIT: I cannot find the values if they are over 10, and the -8whatever value before it remains the same all throughout.

Sounds like maybe having the entire savegame file be pure XML so that it could be easily edited in a text editor would be a good idea. Then folks trying to edit it would have a lot less trouble. Then again, I don't know whether it would be good or bad to make it really easy to edit savegame files. I have mixed feelings on it.

It's a single player game, if people want to cheat I don't see why anyone should care. Plus having saved games in a consistent, easily readable format seems like it would be useful for bug prevention down the line.
Logged
LCS Graphical Remake:

https://the-cheshire-cat.itch.io/lcs
Current progress: ~100%

Liberal Elitist

  • Bay Watcher
  • I'm more liberal than you are!
    • View Profile
    • The Liberal Crime Squad wiki
Re: Editing Things
« Reply #10 on: September 13, 2013, 01:45:06 pm »

That is true. We should make having saved games be in XML be on the TODO list. If there even is an official TODO list. I'm not sure if there is one anymore, there's a file in the source code with a TODO list but it's very out of date (one of the things on the TODO list is adding Desert Eagles to the game, and they've been part of the game for quite some time).
Logged
The Liberal Crime Squad wiki is your friend.

Quote from: Lielac
Edit: Figured it out via a little bit of trial and error and oH MY GOD WHAT IS THIS MUSIC WHAT IS THIS MUSIC WHAT THE HECK IS IT SPACEBALLS MUSIC? WHATEVER IT IS IT IS MAGICAL