Author Topic: The things that aren't saved but should be  (Read 11775 times)

0 Members and 1 Guest are viewing this topic.

Offline betatester

  • Newbie
  • *
  • Posts: 24
The things that aren't saved but should be
« on: January 30, 2010, 06:00:43 AM »
Some things aren't saved but should be

- the slave market
- the shop inventory

With the God of Reload you can buy what you want, save the game, pray the god of reload and buy new things again... ad nauseum or until you've got what you want.


Offline zodiac44

  • Hero Member
  • *****
  • Posts: 560
  • Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn
Re: The things that aren't saved but should be
« Reply #1 on: January 30, 2010, 01:40:46 PM »
Technically, you are correct, that stuff isn't saved and probably should be, but fixing it is going to be back-burnered.  It will probably get fixed along with other saving issues (like the job state for girls taken off duty by the matron) when the save files are converted over to XML format.
Capitalization is the difference between "I had to help my uncle Jack off a horse" and "I had to help my uncle jack off a horse."

Offline delta224

  • Dev Team
  • *****
  • Posts: 577
Re: The things that aren't saved but should be
« Reply #2 on: January 30, 2010, 01:49:20 PM »
It has to be but on the back burner for now, I will need to fiugre out how to track items without using thier names first though.

Offline Graen

  • Full Member
  • ***
  • Posts: 121
Re: The things that aren't saved but should be
« Reply #3 on: January 30, 2010, 02:13:24 PM »
It has to be but on the back burner for now, I will need to fiugre out how to track items without using thier names first though.

Time to assign everything an ID number!  :D

Oh and of course, randomly generator ID numbers for all the expansion girls and items! ::)

Offline zodiac44

  • Hero Member
  • *****
  • Posts: 560
  • Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn
Re: The things that aren't saved but should be
« Reply #4 on: January 30, 2010, 04:01:21 PM »
I have three methods to solve the problem:

1) Use item codes.  Create a format something like: [item type]_[creator]_[id]

so if I created a series of healing potions, the codes would look something like:

Consumable_Zodiac44_Healing1
Consumable_Zodiac44_Healing2
Consumable_Zodiac44_Healing3

Item type should be assigned by the editor, the creator's name and item ID should be entries in the form.  The editor could check the item code against other items in the same file for duplicates, and require the ID to be changed if it matches an existing entry.  This doesn't prevent collision from other item files, so you would still need collision detection and resolution in the code, but it helps a bit.

2) Change the manner in which items are collated.  Each item gets its own file and they are referenced in game by file name.  In this system, the game doesn't need collision detection and resolution, as it is all handled at the time of item creation.  Players could overwrite an item's file, which would change the item in game, but there wouldn't be any collision in game.  As I think about it some more, this system would need a file naming convention similar to the one posed above, to prevent overwriting an item with an incompatible item (ex: overwriting an armor with a necklace) which could present problems in game.

3) Save all items in the save file the same way girls are handled.  Assign a random ID number to each item (or use the system above) to differentiate between items (and girls?) of the same name.

Personally, I favor the second option, implementing a similar scheme with girls to prevent accidental duplication in game.  Break the composite .girlsx files into the individual girls and place each girl's file in her image folder.  This would simplify a number of creation and editing tasks for items and girls, as well as making distribution and pruning somewhat easier.
Capitalization is the difference between "I had to help my uncle Jack off a horse" and "I had to help my uncle jack off a horse."

Offline Graen

  • Full Member
  • ***
  • Posts: 121
Re: The things that aren't saved but should be
« Reply #5 on: January 30, 2010, 04:17:50 PM »
If you're going to do item IDs I would favor the system Bethesda used for Oblivion and Fallout 3.

When the item/girl is created in the editor is is given one unique ID, that does not change unless the item is deleted, based on on the Computer and Time of creation.  Then whenever the game loads, it finds all the items and girls and references those IDs.  This way the item can stay in the game even if it is modified, and than later reloaded.  If however the item/girl is deleted and then recreated, it will have been given a new ID.

Any item/girl in the save file whose ID can not be found, when the game is loaded, are simply ignored, and their state changed to something that won't cause a conflict should they be reloaded later on after a save.  (Missing girls are flagged as in the Dungeon, Items are set to the player's inventory.)

This still allows for large girl and item indexes to be created in the editor.  However, it would require more programing on the editor side.

Offline delta224

  • Dev Team
  • *****
  • Posts: 577
Re: The things that aren't saved but should be
« Reply #6 on: January 30, 2010, 04:56:41 PM »
That would solve a lot of issues if we gave each girl and item a unique id code and would cut down on the save file size.

Offline zodiac44

  • Hero Member
  • *****
  • Posts: 560
  • Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn
Re: The things that aren't saved but should be
« Reply #7 on: January 30, 2010, 06:28:21 PM »
I was thinking along the lines of the Neverwinter Nights system, but Oblivion/Fallout works as well.  The catch is to determine a method to generate the ID that is unlikely to produce duplicates.  The scheme I proposed puts the onus on the creator, but also makes it unlikely that any duplicates will arise.

I'm not sure how much save space you could cut down, as you will still need to track changes to girls in the file.  I suppose you wouldn't need to track as-yet-unobtained girls in the file, though.
Capitalization is the difference between "I had to help my uncle Jack off a horse" and "I had to help my uncle jack off a horse."

Offline Graen

  • Full Member
  • ***
  • Posts: 121
Re: The things that aren't saved but should be
« Reply #8 on: January 30, 2010, 07:05:16 PM »
A simple 4-byte Hexadecimal code (00000000 - FFFFFFFF) based on the the machine and time of creation should prevent any conflicting items/girls.

The less the user has to do, to make sure his work is compatible and conflict free with the game, the better.

Offline delta224

  • Dev Team
  • *****
  • Posts: 577
Re: The things that aren't saved but should be
« Reply #9 on: January 30, 2010, 07:22:28 PM »
The majority of the save when you start a new game is what unique girls and thier stats were available when the game starts.

Offline zodiac44

  • Hero Member
  • *****
  • Posts: 560
  • Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn
Re: The things that aren't saved but should be
« Reply #10 on: January 30, 2010, 08:27:37 PM »
Yeah, you'd save a huge amount of space in the early game, I was thinking more along the lines of average case for mid- to end-game saves.
Capitalization is the difference between "I had to help my uncle Jack off a horse" and "I had to help my uncle jack off a horse."

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: The things that aren't saved but should be
« Reply #11 on: January 31, 2010, 08:28:08 AM »
Or maybe save the item table, and then use offsets into the table as IDs. We could (and probably should) let modders create a namespace so they can create named things that won't conflict with standard things of the same name, or similarly named things from other modders.

Offline Graen

  • Full Member
  • ***
  • Posts: 121
Re: The things that aren't saved but should be
« Reply #12 on: January 31, 2010, 02:48:30 PM »
If the item has a unique ID it shouldn't matter what you name it.

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: The things that aren't saved but should be
« Reply #13 on: February 01, 2010, 05:28:14 AM »
Yeah. But who allocates the IDs? And when? And if allocated at game start, how do we tell if an item added in between saves is the original, or a new one from an expansion? And if a new one, how do we know if it's intended as a replacement for the existing item, or a new item that just happens to clash.

I don't particularly want to maintain a central registry of IDs, and I don't really want to force players to start a new game for each girl or item pack they add. Namespaces seem like the simplest solution


Offline betatester

  • Newbie
  • *
  • Posts: 24
Re: The things that aren't saved but should be
« Reply #14 on: February 01, 2010, 06:14:02 AM »
you can also save all the items data and then it doesn't matter where it comes from.
If you want an unique ID make an MD5 transformation with a string with the item xml description...