I've tried it out with
virgin="1" together with the trait virgin. It works fine with the script and also a remove later on works fine. Thanks for clarification.
This week has been busy at work so I have had little time to code but I should have all weekend to code.
This morning, I finally finished the Check Virginity test so it works properly.
The girlsx files are loaded into the game either:
- at the beginning of a new game or
- when a new girlsx file is added and an existing game is loaded.
At the time the the girlsx file is loaded is when the virginity test is done.
*** If you edit a girlsx file and you continue playing a game that has already loaded that file,
*** it will not be updated unless you remove the <File Filename="name.girlsx" /> line from the <Loaded_Files>
<Loaded_Files>
<Girls_Files>
<File Filename="name.girlsx" />
</Girls_Files>
</Loaded_Files>
*** If you don't remove the girl from the <Girls> list, the reloaded girlsx will clone her with the changes.
For rgirlsx files, they are loaded when a rgirl is needed. (so the <File ... > does not need to be cleared)
The virginity test is done just before the girl is finished and added to the game.
If the Virgin="#" and the trait are the same, that is how it gets set.
If (Virgin="1" and the trait IS NOT in) or (Virgin="0" and the trait IS in) then the virginity test is run.
If age is 17 or less, virgin=true and age gets set to 18
If age is 18 or higher, average (all sex skills plus age):
- If the average is less than 20 then virgin=true
- If the average is greater than 40 then virgin=false
- If the average is between 20 and 40, it is set to what the trait is (because the trait has been used in the (r)girlsx longer than the status)
*** most older (r)girlsx files do not have the 5 newest skills: oral, titty, performance, medicine and handjob
*** if not listed, they are set to 0, so the "average of skills" part of the virginity test will average
*** (((the 7 old sex skills) plus (the 3 new sex skills at 0) plus (age)) divided by 11)
If there is for example virgin="0" and you add an item which contains the trait virgin your code check Age/skill could cause a mistake?
No, Items do not check virginity, they just change it.
I have gone over the item use/equip/unequip sections of the code.
I have added the m_Virgin status so any item that uses the virgin trait should handle it properly.
I believe I may have corrected a few problems as well.
for Virgin="Yes" Capital V and Y are needed