Updates and Notes for Crazy's Mod (http://www.pinkpetal.org/index.php?topic=3446.0) | The most recent version of the game. (Primary thread) |
Whore Master Editor (http://www.pinkpetal.org/index.php?topic=3456.0) | The most recent version of the Editor. |
Stats and Skills Explained (http://www.pinkpetal.org/index.php?topic=3594.msg34514#msg34514) | (Separate thread) |
Jobs in each Building (http://www.pinkpetal.org/index.php?topic=3588.0) | (Separate thread) |
Accommodation (http://www.pinkpetal.org/index.php?topic=3579.msg33837#msg33837) | (Second post on this thread) |
House Percent and Ask Price (http://www.pinkpetal.org/index.php?topic=3579.msg33838#msg33838) | (Third post on this thread) |
Config.xml and the Settings page (http://www.pinkpetal.org/index.php?topic=3579.msg33839#msg33839) | (4th post on this thread) |
Building Setup and Special Building Pages (http://www.pinkpetal.org/index.php?topic=3579.msg33840#msg33840) | (5th post on this thread) |
Town Buildings (http://www.pinkpetal.org/index.php?topic=3579.msg33841#msg33841) | (6th post on this thread) |
Objectives and Rewards (http://www.pinkpetal.org/index.php?topic=3579.msg33843#msg33843) | (7th post on this thread) |
Player Stats (http://www.pinkpetal.org/index.php?topic=3579.msg33844#msg33844) | (8th post on this thread) |
Moving the folders (http://www.pinkpetal.org/index.php?topic=3483.msg29905#msg29905) | (Separate thread) |
Gangs (http://www.pinkpetal.org/index.php?topic=3563.msg33326#msg33326) | (Separate thread) |
Items (http://www.pinkpetal.org/index.php?topic=3444.0) | (Separate thread) |
Image Names that the game will recognize (http://www.pinkpetal.org/index.php?topic=3446.msg27877#msg27877) | (Post on primary thread) |
Hotkeys currently in the game (http://www.pinkpetal.org/index.php?topic=3446.msg28000#msg28000) | (Post on primary thread) |
Girls list Column Headers (http://www.pinkpetal.org/index.php?topic=3446.msg32662#msg32662) | (Post on primary thread) |
Accommodation | | | # | | | Slave Girl Cost | | | Free Girl Cost |
Bare Bones * | | | 0 | | | 5 | | | 20 |
Very Poor | | | 1 | | | 10 | | | 40 |
Poor * | | | 2 | | | 15 | | | 60 |
Adequate | | | 3 | | | 20 | | | 80 |
Comfortable * | | | 4 | | | 25 | | | 100 |
Nice | | | 5 | | | 30 | | | 120 |
Good | | | 6 | | | 35 | | | 140 |
Great * | | | 7 | | | 40 | | | 160 |
Wonderful | | | 8 | | | 45 | | | 180 |
High Class | | | 9 | | | 50 | | | 200 |
Trait that raise PA | Modifier | Explanation |
------------------------------------------ | ------------ | ------------------------------ |
Your Wife | +2.0 *a | You married her. |
Your Daughter | +1.0 *a | She is your kid. |
Queen | +3.0 *b | Royalty is accustomed to higher quality stuff. |
Princess | +2.0 *b | Royalty is accustomed to higher quality stuff. |
Noble | +1.0 *b | |
Elegant | +0.5 *b | |
Heroine | +0.5 | A hero would expect to be treated better |
Bimbo | +2.0 | she needs a place to keep all her stuff |
Broodmother | +2.5 | she needs somewhere to raise her kids |
Actress | +2.0 *c | |
Porn Star | +1.0 *c | |
Iron Will | +1.0 | |
Nerd | +0.5 | she probably spends her free time in her room |
------------------------------------------ | ------------ | ------------------------------ |
Traits that lower PA | Modifier | Explanation |
Tomboy | -0.5 | |
Open Minded | -0.5 | 'I can sleep anywhere' |
Dependant | -1.0 | she will take what you give her |
Adventurer | -1.0 | she likes sleeping under the stars |
Farmers Daughter | -1.5 *d | |
Country Gal | -1.5 *d | |
Maid | -1.0 | |
Optimist | -0.8 *e | 'I can make due with what I have' |
Pessimist | -1.0 *e | 'whatever' |
Whore | -1.5 | She works on her back so much, the floor doesn't matter. |
Homeless | -2.0 | used to live outdoors |
Masochist | -2.0 | 'I deserve to sleep on rocks' |
Retarded | -3.0 | |
Zombie | -3.0 | |
Skeleton | -4.0 | |
Mind Fucked | -5.0 | |
------------------------------------------ | ------------ | ------------------------------ |
Items that Adjust PA | Modifier | Explanation (items PA will be editable in the future) |
Chrono Bed | -3.0 *f | She gets a great night sleep so she is happier when she wakes up. |
Rejuvenation Bed | -1.0 *f | She gets a good night sleep so she is happier when she wakes up. |
150 Piece Drum Kit | +0.5 | Though she may annoy her neighbors and it takes a lot of space, it is fun |
Art Easel | -1.0 | She can make her room nicer by herself. |
Computer | -1.5 | Something to do but it takes up a little room |
Free Weights | +0.2 | She may like the workout but it takes up a lot of room |
Stripper Pole | +0.1 | She may like the workout but it takes some room to use |
Television Set | -2.0 | When she stares at this, she doesn't notice anything else |
Room Decorations | -0.5 | They make her like her room more. |
Nightmare Orb | +0.2 | She does not sleep well |
Happy Orb | -0.5 | She has happy dreams |
Lovers Orb | -0.5 | She really enjoys her dreams |
Appreciation Trophy | -0.1 | Something nice to look at |
Safe by Marcus | -0.3 | Somewhere to keep her stuff where ske knows no one can get to it. |
Anger Management Tapes | -0.1 | When she listens to these it takes her mind off other things |
Library Card | -0.5 | She has somewhere else to go and she can bring books back, they keep her mind off other things |
Stick Hockey Game | +0.3 | While fun, it takes a lot of room to not break things |
The Realm of Darthon | -0.1 | She and her friends can have fun together but they need some space to play it |
Weekly Social Therapy Session | -0.1 | She has somewhere to go and get her troubles off her chest. |
Android, Assistance | -0.5 | This little guy cleans up for her |
Black Cat | -0.3 | Small and soft, it mostly cares for itself |
Cat | -0.3 | Small and soft, it mostly cares for itself |
Claptrap | -0.1 | An annoying little guy but he does help a little |
Death Bear | +2.0 | Having a large bear living with her she needs a little more room. |
Deathtrap | +1.0 | Having a large robot guarding her her she needs a little more room. |
Guard Dog | +0.2 | Though she loves having a pet, a large dog takes up some room |
Pet Spider | -0.1 | A little spider, she may be afraid of it but it takes her mind off her room |
Smarty Pants | -0.2 | A little stuffed animal to hug and squeeze |
------------------------------------------ | ------------ | ------------------------------ |
Setting | | | Default | | | Range | | | What it does | ||
------------------------------ | | | ------------ | | | ------------ | | | ------------------------------ | ||
GirlsHousePerc | | | 60 | | | 0 to 100 | | | Sets all Free girl's starting house percent | ||
GirlsKeepTips | | | true | | | true/false | | | If true, free girls keep tips separate from pay. (not all jobs use this yet) | ||
SlaveHousePerc | | | 100 | | | 0 to 100 | | | Sets all Slave girl's starting house percent | ||
SlavePayOutOfPocket | | | true | | | true/false | | | If a job is payed by the Player and not a customer, do you pay Slaves or not? | ||
SlaveKeepTips | | | false | | | true/false | | | If true, free girls keep tips separate from pay. (not all jobs use this yet) | ||
GirlsAccom | | | 5 | | | 0 to 10 | | | Base Accommodation for Free Girls | ||
SlaveAccom | | | 1 | | | 0 to 10 | | | Base Accommodation for Slaves | ||
AutoUseItems | | | false | | | true/false | | | Automatically use items from the Player's inventory on girls (not all items are coded in) | ||
AutoCombatEquip | | | true | | | true/false | | | Put on or take off armor and weapons if the girl is working a job that does or does not require combat |
<Folders | All folder positions are relative to the exe file. |
Characters="..\Characters" | |
Saves="..\Saves" | |
DefaultImages="..\DefaultImages" | |
BackupSaves="true" | If true, a backup is made in the (version)\saves folder as well as the ..\saves folder. |
/> | |
<Resolution | |
Resolution="J_1024x768" | The name of the interface folder you use. |
Width="1024" | The width and... |
Height="768" | ...height of the interface. |
ScaleWidth="800" | Older versions of the game had the interfaces scaled in the code... |
ScaleHeight="600" | ...Scale width and height are here to allow older interfaces to still work. |
FullScreen="true" | ture or flase |
ListScrollAmount="3" | how many lines are scrolled at a time |
TextScrollAmount="3" | how many lines are scrolled at a time |
/> | |
<Initial | |
Gold="4000" | Starting gold |
GirlMeet="30" | % chance to meet a girl when doing walkabout |
GirlsHousePerc="60" | Base free girl house percent |
GirlsKeepTips="true" | Are free girl tips separate from house percent |
SlaveHousePerc="100" | Base slave house percent |
SlavePayOutOfPocket="true" | Wether or not slave girls get paid by the player directly for certain jobs |
SlaveKeepTips="false" | Are slave tips separate from house percent |
GirlsAccom="2" | Base free girl accommodation |
SlaveAccom="2" | Base slave accommodation |
AutoUseItems="false" | whether or not the game will try to automatically use the player's items |
AutoCombatEquip="true" | whether girls will automatically equip/unequip weapon and armor automatically |
TortureTraitWeekMod="1" | How harsh torture is thus how long traits given by torture last (-1 = permanent) |
HoroscopeType="1" | There are 2 types of of horoscopes, 1: Tropical (Western) and 2: Sideral (Hindu) |
/> | |
<Income> | For Income it looks like only "SlaveSales" does anything. |
<Expenses> | "ActressWages", "GirlSupport", "Bribes" and "Fines" do nothing that I can see with just a quick look. "BarSupport", "CasinoSupport", "StaffWages" are not used because that part of the code is no longer used. "MatronWages" affects Matrons' wages. "SlavesBought" works for the other side of the Income "SlaveSales". "Advertising" works as intended. "GoonWages" is used to pay your gangs. "Consumables" is used for the prices of gang healing potions, nets and anti-preg potions. "Items" is only used for gang weapons. "Training" is only used for the Brothel training job. "MovieCost" is in the cTarrif code but is never used. It will eventually be used to pay for the creation of movies in the Studio. "BuyBrothel" is used for buying new buildings and adding rooms to them. "BrothelSupport" affects a 2 gold per empty room cost for buildings. |
<Gambling> | |
<Tax> | |
<Pregnancy> | |
<Prostitution> | |
<Catacombs> | |
<SlaveMarket> | |
<Gangs> | |
<Items> | |
<Fonts> | |
<Debug> |
Building | | | Possible effects |
Brothels | | | (nothing yet) |
Studio | | | Increase in acting related stuff. |
Arena | | | Increase in combat related stuff. |
Centre | | | Increase in Center related stuff. |
Clinic | | | (nothing yet) |
Farm | | | Increase in Farm related stuff. |
House | | | (nothing yet) |
The Dungeon | | | Effects are determined by the Player's Disposition |
>= 100 | | | Saint |
80 to 99 | | | Benevolent |
50 to 79 | | | Nice |
10 to 49 | | | Pleasant |
-10 to 9 | | | Neutral |
-50 to -11 | | | Not nice |
-80 to -51 | | | Mean |
< -80 | | | Evil |
>= 80 | | | Town Scum |
50 to 79 | | | Miscreant |
10 to 49 | | | Suspect |
-10 to 9 | | | Unsuspected |
-50 to -11 | | | Lawful |
-80 to -51 | | | Philanthropist |
< -80 | | | Town Hero |
That's a lot of reserved posts."... and other Variables."
But basically, all the accommodation tier does is influence the regeneration of a girl's happiness? No effect on stamina or anything else?For .06.01.18 I just did happiness, fear, love, hate and a couple of traits.
Some statuses could have an impact on PA too. Controlled girls should not complain much, and pregnant girls should need higher accomodation.Ok, I'll add that.
Giving a girl the accomodation level she expects is going to be +0 to everything (or at least not have any negative impact on her)?A more accurate answer would be there will be little noticeable effect on her at +0 PAmod.
Are we going to be able to adjust SlavePayOutOfPocket and Girls/SlaveKeepTips ingame (and each girl independently)?Eventually yes.
Is someone updating the jobs to support tips? If not I'll do it.Have at it.
Have at it.Sleazy Waitress is done. I've added a modifier to tips that is pretty much a copy of something crazy wrote for the regular barmaid job. I hope it works fine.
Sleazy Waitress is done. I've added a modifier to tips that is pretty much a copy of something crazy wrote for the regular barmaid job. I hope it works fine.Looks fine to me. Even fixed spelling errors so all the better lol
if (!g_Girls.HasTrait(girl, "Straight")) { libido += min(3, g_Brothels.GetNumGirlsOnJob(0, JOB_BARSTRIPPER, false); }Add it?
I found in the nurse job that lesbian nurses get turned on by half the patients (by looking at naked women, I guess). I was thinking about doing something similar for the non-straight barmaid and waitresses that work in the strip club (they spend hours surrounded by half naked sexy women):Add it?Yeah sure add it
I had a lactation scene almost finished for Sleazy Barmaid but crazy wrote a similar one for the barmaid job already. Go for it anyway?As long as it is different then sure add it
So far I've used 10-20% base wages for tips in maid and waitress jobs. Strippers should earn way more and I'm thinking about 5-40%. Should be even more? less?Sound about right.. add it how you think and we can adjust it later if we need to. Jobs pay is way off right now anyway
Sound about right.. add it how you think and we can adjust it later if we need to. Jobs pay is way off right now anywayOk.
As long as it is different then sure add itI'll see if I can make it more different to add it later.
Dealer, Entertainer, Singer and Pianist done. Added a small thing for Idol Singers. Are there other jobs that need to be updated?Sorry for late replay been busy kinda slipped my mind. I think you got them all. But if you want keep going over the jobs fixing the spelling and stuff is a great help as Im awful at that. Feel free to add more events to. Mod can always use help.
Sorry for late replay been busy kinda slipped my mind. I think you got them all. But if you want keep going over the jobs fixing the spelling and stuff is a great help as Im awful at that. Feel free to add more events to. Mod can always use help.I'll see what I can do. I have some event ideas but they need some work.
//Put that shit away, you'll scare off the customers!
bool equipmentremoved = g_Girls.UnequipCombat(girl); //g_Girls.equipCombat(girl) is used instead for combat jobs
if (!equipmentremoved)
message+= "She started this shift wearing combat equipment. \n\n";
int scaredaway = 0
if (!equipmentremoved && g_Dice.percent(40))
g_Customers.AdjustNumCustomers(JOB_BARMAID, -1)
scaredaway++
continue;
if (scaredaway)
message+= ", but her combat equipment scared away " + intstring(scaredaway) + " of your customers";
bool EquipCombat(sGirl* girl); // girl makes sure best armor and weapons are equipped, ready for combat
bool UnequipCombat(sGirl* girl); // girl unequips armor and weapons, ready for brothel work or other non-aggressive jobs
bool cGirls::EquipCombat(sGirl* girl)
{ // girl makes sure best armor and weapons are equipped, ready for combat.
// If this function finishes without the girl having at least an armor and one weapon, it returns false.
// First let's find out what's already equipped.
bool combatequips = false;
bool wearingArmor = false;
bool wearingWeap1 = false;
bool wearingWeap2 = false;
int Armor, Weap1, Weap2, oldArmor, oldWeap1, oldWeap2;
Armor = Weap1 = Weap2 = oldArmor = oldWeap1 = oldWeap2 = -1;
for(int i=0; i<40; i++)
{
if(girl->m_Inventory[i] != 0) // Is there something here?
{
sInventoryItem* curItem = girl->m_Inventory[i];
if((curItem->m_Type == INVWEAPON) || (curItem->m_Type == INVARMOR)) // Is it a weapon or armor?
combatequips = true; // She does have an armor or weapon in her inventory.
if((curItem->m_Type == INVWEAPON) && (girl->m_EquipedItems[i] != 0))
{ // I found a weapon that's already equipped.
if(wearingWeap1) // She's equipped with 2 weapons, and I already found the other.
{ // This is her second weapon.
wearingWeap2 = true;
Weap2 = oldWeap2 = i;
}
else
{ // This is her first weapon.
wearingWeap1 = true;
Weap1 = oldWeap1 = i;
}
}
if((curItem->m_Type == INVARMOR) && (girl->m_EquipedItems[i] != 0))
{ // I found the armor she has equipped.
wearingArmor = true;
Armor = oldArmor = i;
}
}
}
// If she doesn't have any armor or weapons in her inventory at all, nothing to do here.
if(!combatequips)
return false; // She's obviously not wearing an armor and one weapon.
cConfig cfg; // We'll store the config file values for later.
// The next bit assumes the cost of Weap1 is higher than the cost of Weap2. So...
if(wearingWeap1 && wearingWeap2)
{
if(girl->m_Inventory[Weap2]->m_Cost > girl->m_Inventory[Weap1]->m_Cost)
{
int temp;
temp = Weap1;
Weap1 = Weap2;
Weap2 = temp;
oldWeap1 = Weap1;
oldWeap2 = Weap2;
}
}
// Look at each item.
for(int i=0; i<40; i++)
{
if((girl->m_Inventory[i] != 0) && (girl->m_EquipedItems[i] = 0)) // Is it an item that's not equipped?
{
if(girl->m_Inventory[i]->m_Type == INVWEAPON) // Is it a weapon?
{
if(Weap1 != -1) // Does she already have one weapon?
{ //She already has one weapon.
if(girl->m_Inventory[i]->m_Cost > girl->m_Inventory[Weap1]->m_Cost) // Is this weapon better?
{ //This weapon is better. Switch the weapon already here to her second weapon, and use this weapon here.
Weap2 = Weap1;
Weap1 = i;
}
else
{ //The weapon she has here already is better. Look at her second weapon
if(Weap2 != -1) // Does she even have a second weapon?
{ //She already has a second weapon.
if(girl->m_Inventory[i]->m_Cost > girl->m_Inventory[Weap2]->m_Cost) // Is this weapon better?
Weap2 = i; // Yes. Use it.
}
else // She doesn't have a second weapon.
Weap2 = i; // Use this one.
}
}
else // She doesn't have any weapon.
Weap1 = i; // Use this one.
// If we made it here without changing weapons, both weapons she's wearing already are better.
}
if(girl->m_Inventory[i]->m_Type == INVARMOR) // Is it armor?
{
if(Armor != -1) // Is she already wearing any armor?
{ // She is wearing armor.
if(girl->m_Inventory[i]->m_Cost > girl->m_Inventory[Armor]->m_Cost) // Is this better?
Armor = i; // Yes. Use it.
}
else // She is not wearing armor.
Armor = i; // Use this.
// If we made it here without changing armor, the armor she's wearing is better.
}
}
}
// If she's not already wearing an armor and one weapon, and the configuration file doesn't allow autoequipping,
// then we need to end the function here. She isn't wearing an armor and at least one weapon, so returns false.
if(!wearingArmor && !wearingWeap1 && !cfg.items.auto_combat_equip())
return false;
// if she's retarded, she might refuse or forget
int refusal = 0;
int refused = false;
if(girl->has_trait("Retarded"))
refusal += 30;
if(g_Dice.percent(refusal))
refused = true;
// If we're changing her armor
if(Armor != oldArmor)
{
if(cfg.items.auto_combat_equip()) // Are we allowed to do this?
{
if (!refused) // Did the girl refuse?
{
if(wearingArmor) // If she's not wearing armor, there's nothing to unequip.
g_InvManager.Unequip(girl, oldArmor);
g_InvManager.Equip(girl, Armor, false); // Put on her best armor.
wearingArmor = true;
}
}
}
// If we're changing her first weapon
if(Weap1 != oldWeap1)
{
if(cfg.items.auto_combat_equip()) // Are we allowed to do this?
{
if(!refused) // Did the girl refuse?
{
if(wearingWeap1) // If she's not using a first weapon, there's nothing to unequip.
g_InvManager.Unequip(girl, oldWeap1);
g_InvManager.Equip(girl, Weap1, false); // Put on her best weapon.
wearingWeap1 = true;
}
}
}
// If we're changing her second weapon
if(Weap2 != oldWeap2)
{
if(cfg.items.auto_combat_equip()) // Are we allowed to do this?
{
if(!refused) // Did the girl refuse?
{
if(wearingWeap2) // If she's not using a second weapon, there's nothing to unequip.
g_InvManager.Unequip(girl, oldWeap2);
g_InvManager.Equip(girl, Weap2, false); // Put on her second best weapon.
wearingWeap2 = true;
}
}
}
/* We need to check again to see if she's wearing a weapon and armor. I'm not sure if she
* can actually make it here without having an armor and one weapon equipped, so this may
* just be a sanity check.
*/
if(!wearingArmor || !wearingWeap1)
return false;
return true; // If we made it here, she's at least wearing an armor and one weapon.
}
bool cGirls::UnequipCombat(sGirl* girl)
{ // girl unequips armor and weapons, ready for brothel work or other non-aggressive jobs
// First find out if she's wearing any in the first place
bool combatequips = false;
bool hasweaponorarmor = false;
for(int i=0; i<40; i++)
{
if(girl->m_Inventory != 0)
{ // I found an item. What is it?
sInventoryItem* curItem = girl->m_Inventory[i];
if ((curItem->m_Type == INVWEAPON) || (curItem->m_Type == INVARMOR)) // Is it weapon or armor?
{
hasweaponorarmor = true;
if(girl->m_EquipedItems != 0) // Is it equipped?
combatequips = true;
}
}
}
// If she doesn't have any armor or weapons, she's obviously not wearing any. Nothing to do here.
if(!hasweaponorarmor)
return true;
cConfig cfg; // Look at the configuration file, store values for later.
// if she's a really rough or crazy bitch, she might just keep combat gear equipped
int refusal = 0;
if(combatequips) // Is the crazy bitch even wearing anything?
{
if(girl->has_trait("Aggressive"))
refusal += 30;
if(girl->has_trait("Yandere"))
refusal += 30;
if(girl->has_trait("Twisted"))
refusal += 30;
if(girl->has_trait("Retarded"))
refusal += 30;
if(g_Dice.percent(refusal))
return false;
}
for(int i=0; i<40; i++)
{
if((girl->m_Inventory != 0) && (girl->m_EquipedItems[i] != 0))
{ // I found an equipped item.
sInventoryItem* curItem = girl->m_Inventory[i];
if(curItem->m_Type == INVWEAPON || curItem->m_Type == INVARMOR) // Is it armor or weapon?
{ // Yes, it's an equipped armor or weapon.
if(cfg.items.auto_combat_equip()) // Am I allowed to change this?
g_InvManager.Unequip(girl, i); // Yes, take it off.
else
return false; // I can't take it off. She'll be wearing armor or weapon after this function ends.
}
}
}
return true;
}
While looking at the jobs I saw several sex events for nymphos, I was thinking if succubus should be able to trigger them too.Yeah it should. That makes senses
I'll see what I can do. I have some event ideas but they need some work.If you need help feel free to ask.
There was a small mistake in the Sleazy Waitress job (nothing that can crash the game) and I posted a fix in the bug thread, I'm not sure if you've seen it.Okay Ill get them added when I get a chance thanks.
EDIT - I missed the masseuse job. I'll upload both later.
EDIT 2 - Done.
Interesting to see that some of my fingerprints are still on those files, even after so long. Sorry, crazy, for having disappeared for so long, but it looks like you've had things well in hand.Sorry for the late relay been slammed at work. Lots of people been working on the mod since u been gone lol. Maybe a few things you added that I over looked mergeing back when you stopped working on it. I replayed to the PM you sent but it was on my phone so no idea if it sent or not. You can let me know.
I noticed, though, you're not using my modifications to the g_Girls.Unequipcombat(girl) function. I had completely rewritten the code in the function from scratch to equip/unequip a girl before their shift if possible, and give a boolean return based on if the girl started her shift with her equipment on. Here's the code if you want to use it:
In each job (you'll have to figure out where each part goes in your own code, and will probably have to adjust some of this to fit your own coding conventions.)
Yeah it should. That makes sensesOk, done.
Interesting to see that some of my fingerprints are still on those files, even after so long. Sorry, crazy, for having disappeared for so long, but it looks like you've had things well in hand.I like the idea but I'll make it into its own function to return what the girl has equipped.
I noticed, though, you're not using my modifications to the g_Girls.Unequipcombat(girl) function. I had completely rewritten the code in the function from scratch to equip/unequip a girl before their shift if possible, and give a boolean return based on if the girl started her shift with her equipment on. Here's the code if you want to use it:
In each job (you'll have to figure out where each part goes in your own code, and will probably have to adjust some of this to fit your own coding conventions.)
cgirls.cpp starting around line 4100 (Or maybe not, if your cgirls.cpp has had a lot added or removed from it... search for the EquipCombat or UnequipCombat original functions)
/* `J` Updated from Akia's suggestion and expanded return values
returns 0 if she has no weapons or armor equipped
returns 6 if she has one of each: weapon, armor, helmet, boots, shield
returns 5 if she has weapons and armor (others ignored)
returns 4 if she has weapons and no armor but at least one of helmet, boots or shield
returns 3 if she has no weapons or armor but at least one of helmet, boots or shield
returns 2 if she has only armor but no weapon (others ignored)
returns 1 if she has only weapons
returns -1 for errors
*/
int cGirls::CheckEquipment(sGirl* girl)
{
if (girl->m_NumInventory <= 0) return 0; // she has no items
int foundw = 0; int founda = 0; int foundh = 0; int foundc = 0; int founds = 0;
for (int i = 0; i < MAXNUM_GIRL_INVENTORY; i++)
{
if (girl->m_Inventory[i] != 0 && girl->m_EquipedItems[i] == 1)
{
if (girl->m_Inventory[i]->m_Type == INVWEAPON) foundw = 1;
if (girl->m_Inventory[i]->m_Type == INVARMOR) founda = 1;
if (girl->m_Inventory[i]->m_Type == INVHELMET) foundh = 1;
if (girl->m_Inventory[i]->m_Type == INVCOMBATSHOES) foundc = 1;
if (girl->m_Inventory[i]->m_Type == INVSHIELD) founds = 1;
}
}
if (foundw + founda + foundh + foundc + founds <= 0) return 0; // has nothing
if (foundw + founda + foundh + foundc + founds >= 5) return 6; // has everything
if (foundw == 1 && founda == 1) return 5; // has weapon and armor (others ignored)
if (foundw == 1 && founda == 0 && foundh + foundc + founds > 0) return 4; // has weapon, no armor but at least one of helmet, boots or shield
if (foundw == 0 && founda == 0 && foundh + foundc + founds > 0) return 3; // no weapon or armor but at least one of helmet, boots or shield
if (foundw == 0 && founda == 1) return 2; // has armor but no weapons (others ignored)
if (foundw == 1 && founda + foundh + foundc + founds <= 0) return 1; // has weapon only
return -1;
}
bump