I am doing tons of stuff to every job at the moment.
This is a little TL:DR so I have no problem if you skip to the end.
I have been talking to Crazy about it in PMs but I should probably have been posting it on the forums.
Here is some of what I have been saying:
on: February 05, 2015, 05:17:25 AM
I'm not really adding any new content, I'm just fixing some of the existing stuff.
I removed the preprocessing function from all the jobs that still had them and instead used the DisobeyCheck.
I fixed all the ss<< "" + ""; where ever I found them.
I rearranged some of the code and added some missing things.
I want to make a new function for job performance so they can all be edited in the same place.
I also want to add a random element to job performance.
As it is now any skills required are combined so they total 200.
I want to make the primary skills fixed to 100 and secondary skills random to 100.
on: February 05, 2015, 07:23:41 AM
Update on Job Performance:
I started adding a JP_(jobname) function to the bottom of all the jobs.
As I am writing this, I have gotten to security and am adding them in order.
int cJobManager::JP_Security(sGirl* girl, bool estimate)
{
int SecLev = 0;
if (estimate) // for third detail string
{
SecLev = (g_Girls.GetSkill(girl, SKILL_COMBAT))
+ (g_Girls.GetSkill(girl, SKILL_MAGIC) / 2)
+ (g_Girls.GetStat(girl, STAT_AGILITY) / 2);
}
else // for the actual security check
{
SecLev = g_Dice % (g_Girls.GetSkill(girl, SKILL_COMBAT))
+ g_Dice % (g_Girls.GetSkill(girl, SKILL_MAGIC) / 3)
+ g_Dice % (g_Girls.GetStat(girl, STAT_AGILITY) / 3);
}
// Please excuse the comments. I wrote this soon after all the sex strings.
...
// Good traits
if (g_Girls.HasTrait(girl, "Incorporeal")) SecLev += 100; // I'm fucking Superman!
...
// Bad traits
if (g_Girls.HasTrait(girl, "Blind")) SecLev -= 50; // can't see what people are doing
...
return SecLev;
}
These are paired with the rest of the job functions in cJobManager::Setup()
JobName[JOB_SECURITY] = "Security";
JobDesc[JOB_SECURITY] = "She will patrol the building, stopping mis-deeds.";
JobFunc[JOB_SECURITY] = &WorkSecurity;
JobPerf[JOB_SECURITY] = &JP_Security;
and in cJobManager.h
bool (*JobFunc[NUM_JOBS])(sGirl*, sBrothel*, bool, string&);
int (*JobPerf[NUM_JOBS])(sGirl*, bool estimate); // `J` a replacement for job performance - work in progress
You will be able to call them from anywhere with
JP_Security(girl, bool);
or
cJobManager m_JobManager;
int sec = m_JobManager.JP_Security(girl, bool);
bool is true for estimate and false for actual number.
The estimate is for the job performance list because some jobs use job performance differently.
You will be able to clean out the cGirls::GetThirdDetailsString when all the jobs have this.
It will just be a listing with the functions doing all the work.
Brothel_Data += "Brothel Job Ratings\n";
Brothel_Data += girl->JobRatingLetter(m_JobManager.JP_Security(girl, true)) + " - Security\n";
This may change as I add in other jobs.
on: February 05, 2015, 09:50:29 AM
Job Performance update
I have gotten more of it worked out and adding the rest of the jobs should be much faster.
These jobs are done and working in the third detail list:
Brothel_Data += "Brothel Job Ratings\n";
Brothel_Data += girl->JobRatingLetter(m_JobManager.JP_Security(girl, true)) + " - Security\n";
Brothel_Data += girl->JobRatingLetter(m_JobManager.JP_Advertising(girl, true)) + " - Advertising\n";
Brothel_Data += girl->JobRatingLetter(m_JobManager.JP_CustService(girl, true)) + " - Customer Service\n";
Brothel_Data += girl->JobRatingLetter(m_JobManager.JP_Matron(girl, true)) + " - Matron\n";
Brothel_Data += girl->JobRatingLetter(m_JobManager.JP_ExploreCatacombs(girl, true)) + " - Explore Catacombs\n";
Brothel_Data += girl->JobRatingLetter(m_JobManager.JP_BeastCare(girl, false)) + " - Beast Care\n\n";
The jobs in the constants list up to BeastCare are done though not all use it.
I changed the function from int to double because some of the jobs use double and converting from double to int is cleaner than int to double.
I forgot to include the other part of cJobManager.h that is used in a previous message
static bool WorkBeastCare(sGirl* girl, sBrothel* brothel, bool Day0Night1, string& summary);
static double JP_BeastCare(sGirl* girl, bool estimate);
on: February 06, 2015 at 11:59:43 AM
I finally finished the job performance and job cleanup, 116 files edited.
I am compiling it now and will run a couple of tests on it before pushing it to the svn.
You will need to go through the cGirls::GetThirdDetailsString and at the end, it should have nothing but a set of text outputs.
You will have to create the checks for some of the jobs but that should be much easier with just one place to edit them.
If a job does not use a job rating, you probably don't need to make one for it unless you want to.
I did find several problems, so now I am updating the surgery jobs and therapy jobs.
They will use the new job performance checks to tell you how much the girl needs that treatment:
- Flat chested girls will be rated "I" for breast enlargement while Titanic Tits girls will be rated "x".
- Older girls will be rated higher for face lift.
- Crazy girls will be rated high for therapy.
- Addicts will be rated higher for rehab.
- Health, happiness and tiredness will be checked for healing job.
Breast size surgeries are now 1 size change per turn. (I want to do this for items also, but that will have to wait.)
All Clinic Surgery jobs have been updated.
Now I am working on the Centre Therapy jobs.
- Changed "Drug Centre" to "Counseling Centre"
- Changed "Drug Counselor" to "Counselor"
While there will be little new content, the next update will be big enough to warrant a new number.
Expect WM.06.01.00 to come out this weekend.