From ba317f1a403f3f02d2de3a7f80ee03ad0eced917 Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Wed, 20 Mar 2024 10:59:37 -0400 Subject: add readme --- README.md | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ srb.py | 14 ++++++++---- srb_lib.py | 2 ++ 3 files changed, 86 insertions(+), 4 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..44c2d90 --- /dev/null +++ b/README.md @@ -0,0 +1,74 @@ + + +# README for Savegame Editor for Snoopy vs. the Red Baron +Modify an existing savegame file for the PC game [Snoopy vs. the Red Baron (2006)](https://en.wikipedia.org/wiki/Snoopy_vs._the_Red_Baron_(video_game). + +# tl;dr + + ./srb.py --profile 1 --unlock-everything --buy-everything ~/"Documents/Snoopy vs. the Red Baron/Profile 1/Profile 1.sav" + +## Upstream +This project's upstream is at . + +## Alternatives +None found. + +## Reason for existence +The author was unable to find any trainer or savegame editor for this game, and I wanted to be able to reset certain elements or cheat and give myself everything. Mostly I wanted "Octo-gun" and I was concerned I wasn't good enough to beat every level (mostly boss levels) with rank General. I did actually beat the game with 100% completion before I finished this tool. + +## Using +Most capabilities have "set" and "get" parameters. Some have "set" and "add/remove" parameters. To see a full list of commands, run `./srb.py --help`. + +Some common examples. + + ./srb.py --profile 1 --set-name "newname" --file "Profile 1.sav" + ./srb.py --profile 1 --set-money 10000 --file "Profile 1.sav" + ./srb.py --profile 1 --set-level 5,done --file "Profile 1.sav" + ./srb.py --profile 1 --set-health 4 --file "Profile 1.sav" + +Note that `--set-level 5,done` operates three separate parameters that could be done individually: + + --set-level-status 5,general + --set-level-balloons 5,all + --set-level-letters 5,all + +Individual letter/balloon control is not implemented at this time. + +## Dependencies +Just python3. + +## Building +N/A + +## Design notes +The checksum used is this crc32: + + crc width=32 poly=0x4c11db7 init=0x0 xorout=0x235b4b9c refin=false refout=false out_endian=little + +Which I only learned through the reverse-engineering efforts of . + +Before I learned this, none of this savegame editing was possible. + +The binary contents are stored in little-endian, which makes visual inspection of the file in a hexeditor slower. + +## References + +1. +2. +3. +4. +5. +6. [Walkthrough for Snoopy vs. the Red Baron](https://gamefaqs.gamespot.com/pc/930591-snoopy-vs-the-red-baron/faqs/46161) diff --git a/srb.py b/srb.py index 8fe12bf..4b72330 100755 --- a/srb.py +++ b/srb.py @@ -1,15 +1,21 @@ #!/usr/bin/env python3 +# File: srb.py +# Location: https://bgstack15.ddns.net/cgit/srb_lib +# Author: bgstack15 +# SPDX-License-Identifier: GPL-3.0-only # Startdate: 2024-03-08-6 15:28 -# File: srb_lib.py +# Title: Frontend for savegame editor for Snoopy vs. the Red Baron +# Project: srb_lib # Purpose: frontend for srb_lib # History: # Usage: # tl;dr: ./srb.py --profile 1 --unlock-everything --buy-everything "Profile 1.sav" # Reference: -# blog posts 2024-03 -# delsum from github # bgconf.py -# WORKHERE: still some confusion around the --unlock-everything --lock-everything and the levelset available levels. +# Improve: +# still some confusion around the --unlock-everything --lock-everything and the levelset available levels. +# Documentation: README.md +# Dependencies: import srb_lib, argparse, sys from srb_lib import ferror, debuglev diff --git a/srb_lib.py b/srb_lib.py index 874c287..a361c16 100644 --- a/srb_lib.py +++ b/srb_lib.py @@ -19,6 +19,8 @@ # Fuctions that worked: Author: Lauszus # # +# Improve: +# test all functions after trying '<1I' for unsigned int # Documentation: # winetricks vd=1024x768 # winetricks vd=off -- cgit