devolution

Author Topic: Coding logic Quest. How is the girl called upon and saved during gameplay?  (Read 2338 times)

0 Members and 1 Guest are viewing this topic.

Offline Beracell

  • Newbie
  • *
  • Posts: 25
To anyone that has dealt with the code or aveojoey... I would like to know how apart of the xml system is operated.
Basically after being called from the original girl file in teh characters folder how are the variables saved and called upon during game play.
Rough guess I would have to say that if player does not own them the girl is called from the girl file, but if they have been acquired then they are are saved to the save game file and then called from there and re-saved there and then on. Am I in the right ball park?
If so roughly how does the code look or work at that point to look in the saved game file instead of the girl file.
If I can even be pointed to the file that contains that code ill look at it myself but through my searching I cant seem to find it, means I may have passed over it.  I am guessing I would have to see how the market looks also to know how to call upon un-owned girl.

I am just having a block with some of the logic and it may be and is probably way simpler than it seems.

Offline aevojoey

  • Hero Member
  • *****
  • Posts: 1413
  • Thats ok, I'm used to disappointment.
When you start a new game, it looks over all the .girlsx files and compiles them into the savegame file in the <Girls> section.
The game also marks what .girlsx files have already been loaded in the <Loaded_Files> section.
When you get a girl, she is moved to one of the <(building)_Manager> sections of the savegame.

When a savegame loads, it only loads new.girlsx files that are not in the <Loaded_Files> section.
If you change a .girlsx file, you need to remove that file from the <Loaded_Files> section and the girl form wherever she is in the rest of the sections.

.rgirlsx files are totally different, the game does not store anything about .rgirlsx file.



It has been a while since I looked at some of this code so I may miss a few things.

The majority of the girl handling is in cGirls.cpp

During the game, these are some of the functions that handle girls:
Code: [Select]
LoadGirlsXML   - Loads .girlsx files into the game

LoadRandomGirlXML  - loads .rgirlsx files

AddRandomGirl  -  tracks the type of rgirl?

CreateRandomGirl  -  creates a random girl

GetRandomGirl  - randomly chooses a girl from <Girls>



I could go on but this should be a start for you.
If you need more, ask.

« Last Edit: July 17, 2018, 09:52:46 PM by aevojoey »
Fixing the game is a better game than actually playing it.
Get the Current Version <|> Discuss the Game <|> Report a bug

Offline Beracell

  • Newbie
  • *
  • Posts: 25
I just needed the right concept and you got it in your first 5 lines. I was close on how its operated in its use of the save file and I figured rgirls work differently as they are continuously pulled.
I was just having an odd time with trying to figure it out. I can do items and equipped inventory variables easy but since the girls variables are always changing not including items I was trying to figure out how they were saved and drawn after being loaded. But I got the concept now. And Ill poke around that cGirls.cpp file and see what it shows.
Yea if i have any questions Ill ask.

Offline HuiBui

  • Full Member
  • ***
  • Posts: 148
Could anyone be so kind and explain the script command :
add family to dungeon 0 true kidnaped true true true
in detail for me ?
Kind regardsHuiBui

Offline aevojoey

  • Hero Member
  • *****
  • Posts: 1413
  • Thats ok, I'm used to disappointment.
Could anyone be so kind and explain the script command :
add family to dungeon 0 true kidnaped true true true
in detail for me ?
1: How many daughters: (0-3)
2: Was the mother taken also?
3: Were they kidnaped or captured?
4: Are they slaves?
5: Are they nonhuman? (false for human)
6: Are they arena girls?


The game first creates the daughters one by one.
Then the game creates the mother with her age being the oldest daughters age +18 or more.
Once all the targets are created, it then creates the family relation texts for them all.
Finally it puts them all in the dungeon.

The code for this is in cGameScript.cpp Script_AddFamilyToDungeon starting around line 615.
Fixing the game is a better game than actually playing it.
Get the Current Version <|> Discuss the Game <|> Report a bug