devolution

Author Topic: First 2 Bar jobs: Barmaid and Waitress  (Read 5271 times)

0 Members and 1 Guest are viewing this topic.

Offline p373r

  • Newbie
  • *
  • Posts: 18
First 2 Bar jobs: Barmaid and Waitress
« on: February 18, 2011, 03:12:32 PM »
So my first try,
 
I dont know how to test but normally there shouldn't be aything wrong. What i did was take the original Work bar and saved it as Workbarmaid. After that i removed the 4 random jobs and made it a a diceroll of 2 so either she works as a barmaid or a topless barmaid. (topless barmaid has a 15 payout instead of just 5) (is this the pay you have o pay or is it the pay she recieves?)
 
Code: [Select]

 
/*
* Copyright 2009, 2010, The Pink Petal Development Team.
* The Pink Petal Devloment Team are defined as the game's coders
* who meet on http://pinkpetal.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ #include "cJobManager.h" #include "cBrothel.h" #include "cCustomers.h" #include "cRng.h" #include "cInventory.h" #include "sConfig.h" #include "cRival.h" #include <sstream> #include "CLog.h" #include "cTrainable.h" #include "cTariff.h" #include "cGold.h" #include "cGangs.h" #include "cMessageBox.h" extern cRng g_Dice; extern CLog g_LogFile; extern cCustomers g_Customers; extern cInventory g_InvManager; extern cBrothelManager g_Brothels; extern cGangManager g_Gangs; extern cMessageQue g_MessageQue; bool cJobManager::WorkBar(sGirl* girl, sBrothel* brothel, int DayNight, string& summary)
{
/* WD: Added missing SEX_ACTION filter
*
* Add customer happiness
* Fixed income - need to decrement loop counter
* when customer is rejected
*/ string message = "";
int tex = g_Dice%2;

if(Preprocessing(ACTION_WORKBAR, girl, brothel, DayNight, summary, message)) // they refuse to have work in the bar return true;
// put that shit away, you'll scare off the customers! g_Girls.UnequipCombat(girl);
// Barmaid is a easy service skill (set this one up as a double option like the brothelmasseuse except instead of having sex making it about more pay) if(tex == 0)
{
girl->m_Pay += 5;
message += "She worked as a barmaid.";
}
else if(tex == 1)
{
girl->m_Pay += 15;
message += "She worked as a topless barmaid.";
} /*
* Did she enjoy working this job?
*
* Hmmm... with a 95% chance she enjoyed the work, that +3 is going to predominate
*
* I can accept that jobs like barmaid might be cushy numbers, but this applies
* whatever the girl does
*/ int roll = g_Dice%100;
if(roll <= 5)
{
message += " Some of the patrons abused her during the shift.";
g_Girls.UpdateEnjoyment(girl, ACTION_WORKBAR, -3, true);
} /*
* so the bonus is a third of that for a bad experience, but four times more likely
* so on the whole, they'll still like bar work
*/ else if(roll <= 25) {
message += " She had a pleasant time working.";
g_Girls.UpdateEnjoyment(girl, ACTION_WORKBAR, +1, true);
}
else {
message += " Otherwise, the shift passed uneventfully.";
} /*
* work out the pay between the house and the girl
*
* the original calc took the average of beauty and charisma and halved it
*/ int roll_max = girl->beauty() + girl->charisma();
roll_max /= 4;
girl->m_Pay += 10 + g_Dice%roll_max;
// Improve stats int xp = 5, libido = 1, skill = 3;
if (g_Girls.HasTrait(girl, "Quick Learner"))
{
skill += 1;
xp += 3;
}
else if (g_Girls.HasTrait(girl, "Slow Learner"))
{
skill -= 1;
xp -= 3;
}
if (g_Girls.HasTrait(girl, "Nymphomaniac"))
libido += 2;
g_Girls.UpdateStat(girl, STAT_FAME, 1);
g_Girls.UpdateStat(girl, STAT_EXP, xp);
g_Girls.UpdateSkill(girl, SKILL_SERVICE, skill);
g_Girls.UpdateTempStat(girl, STAT_LIBIDO, libido);
return false;
}
« Last Edit: February 18, 2011, 04:07:33 PM by p373r »

Offline p373r

  • Newbie
  • *
  • Posts: 18
Re: First Job: WorkBarmaid.cpp
« Reply #1 on: February 18, 2011, 03:13:15 PM »
Second Job: Waitress
 
Basicly a copy paste from the Barmaid job with modifications:
 
She makes more pay
However she has more chance to not like the work.
 
Code: [Select]

 
/*
* Copyright 2009, 2010, The Pink Petal Development Team.
* The Pink Petal Devloment Team are defined as the game's coders
* who meet on http://pinkpetal.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ #include "cJobManager.h" #include "cBrothel.h" #include "cCustomers.h" #include "cRng.h" #include "cInventory.h" #include "sConfig.h" #include "cRival.h" #include <sstream> #include "CLog.h" #include "cTrainable.h" #include "cTariff.h" #include "cGold.h" #include "cGangs.h" #include "cMessageBox.h" extern cRng g_Dice; extern CLog g_LogFile; extern cCustomers g_Customers; extern cInventory g_InvManager; extern cBrothelManager g_Brothels; extern cGangManager g_Gangs; extern cMessageQue g_MessageQue; bool cJobManager::WorkWaitress(sGirl* girl, sBrothel* brothel, int DayNight, string& summary)
{
/* WD: Added missing SEX_ACTION filter
*
* Add customer happiness
* Fixed income - need to decrement loop counter
* when customer is rejected
*/ string message = "";
int tex = g_Dice%2;

if(Preprocessing(ACTION_WORKBAR, girl, brothel, DayNight, summary, message)) // they refuse to have work in the bar return true;
// put that shit away, you'll scare off the customers! g_Girls.UnequipCombat(girl);
// Waitress is a easy service skill (set this one up as a double option like the brothelmasseuse except instead of having sex making it about more pay) if(tex == 0)
{
girl->m_Pay += 15;
message += "She worked as a waitress.";
}
else if(tex == 1)
{
girl->m_Pay += 45;
message += "She worked as a topless waitress.";
} /*
* Did she enjoy working this job?
*
* I doubled the chance to have something happen to her to 10% because waitresses have more chance to be in contact with customers
* Then i gave her a 20% chance to like the work. I don't know if this will result in the girl never liking the work or not ...
*
*/ int roll = g_Dice%100;
if(roll <= 10)
{
message += " A lot of customers groped her ass while she whas working.";
g_Girls.UpdateEnjoyment(girl, ACTION_WORKBAR, -3, true);
} /*
* so the bonus is a third of that for a bad experience, but four times more likely
* so on the whole, they'll still like bar work
*/ else if(roll <= 30) {
message += " She had a pleasant time working.";
g_Girls.UpdateEnjoyment(girl, ACTION_WORKBAR, +1, true);
}
else {
message += " Otherwise, the shift passed uneventfully.";
} /*
* work out the pay between the house and the girl
*
* the original calc took the average of beauty and charisma and halved it
*/ int roll_max = girl->beauty() + girl->charisma();
roll_max /= 4;
girl->m_Pay += 10 + g_Dice%roll_max;
// Improve stats int xp = 5, libido = 1, skill = 3;
if (g_Girls.HasTrait(girl, "Quick Learner"))
{
skill += 1;
xp += 3;
}
else if (g_Girls.HasTrait(girl, "Slow Learner"))
{
skill -= 1;
xp -= 3;
}
if (g_Girls.HasTrait(girl, "Nymphomaniac"))
libido += 2;
g_Girls.UpdateStat(girl, STAT_FAME, 1);
g_Girls.UpdateStat(girl, STAT_EXP, xp);
g_Girls.UpdateSkill(girl, SKILL_SERVICE, skill);
g_Girls.UpdateTempStat(girl, STAT_LIBIDO, libido);
return false;
}
« Last Edit: February 18, 2011, 04:10:30 PM by p373r »

Offline p373r

  • Newbie
  • *
  • Posts: 18
Re: First 2 Bar jobs: Barmaid and Waitress
« Reply #2 on: February 18, 2011, 04:11:07 PM »
Update added waitress

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: First 2 Bar jobs: Barmaid and Waitress
« Reply #3 on: February 19, 2011, 03:16:18 AM »
Well, the first thing you really need to do is get them to build on your own machine. If you've got Visual Studio install, double click on the BrothelMaster.sln file and build the game. You can test it by copying the .exe it creates into your wm folder. (Back up the original first!)

Once you know the game builds without your mods, add your files into the solution's file list and build it again. You're going to find a couple of problems. Nothing major, but you're going to need to be able to find these things by yourself.

So that's the next exercise - build the game, then build the game with your new files included :)

Offline p373r

  • Newbie
  • *
  • Posts: 18
Re: First 2 Bar jobs: Barmaid and Waitress
« Reply #4 on: February 19, 2011, 05:33:07 AM »
I adjusted the jobmanager for these jobs to so we will see ;)
I'll try tomorrow evening if i can create an exe file ;)

Offline p373r

  • Newbie
  • *
  • Posts: 18
Re: First 2 Bar jobs: Barmaid and Waitress
« Reply #5 on: February 19, 2011, 05:40:04 AM »
I'm trying to build it but i allways get something like:
Code: [Select]

 
1>------ Build started: Project: Whore Master, Configuration: Debug Win32 ------
1> SubWCRev : 'D:\01. Games\WM prog\trunk\BrothelMaster' is not a working copy
1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(103,5): error MSB3073: The command ""SubWCRev.exe" "D:\01. Games\WM prog\trunk\BrothelMaster\." "D:\01. Games\WM prog\trunk\BrothelMaster\Revision.wcrev" "D:\01. Games\WM prog\trunk\BrothelMaster\Revision.h" -f
1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(103,5): error MSB3073: :VCEnd" exited with code 6.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

So euhm ... i don't know but i'll try to find out ;)

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: First 2 Bar jobs: Barmaid and Waitress
« Reply #6 on: February 19, 2011, 06:36:57 AM »
OK - I think that's the dodad that Dagoth introduced to create a Revision.h file so we'd get the subversion checkout number in the title bar. I don't use VS myself, so I'm not sure why you don't have it or how to fix it. Maybe because you didn't to a formal checkout. I suppose if it's not checked out, there won't be a revision number for it to get. One of the other devs can probably help there.

What you can try is to create a file called "Revision.h" in the source directory and have it say

Code: [Select]
#pragma once

static char svn_revision[] = "p373's version";

and that might sidestep the problem.

Offline p373r

  • Newbie
  • *
  • Posts: 18
Re: First 2 Bar jobs: Barmaid and Waitress
« Reply #7 on: February 19, 2011, 05:32:55 PM »
i'll try tomorrow evening ;)
 
nn all

Offline p373r

  • Newbie
  • *
  • Posts: 18
Re: First 2 Bar jobs: Barmaid and Waitress
« Reply #8 on: February 20, 2011, 05:41:08 PM »
Well tried almost everything now and getting kind-off hopeless at the moment ...
 
I downloaded the project from the SVN first page (a zip file on page ... source ...)
NExt i clicked the first brothelmaster sln file to load it in VC2010 express
I couldn't load a new project because there allready whas a vcproject file
 
So i started working on that project file ...
 
Now i cant build a solution as it seems it isnt my project or something like that ;)
 
 
So i tried everything to get the project working on my name ... and reloading it without having errors ...
Doesnt work ...
 
So maybe something from necno or others who use the VC express ... ;)
 
Kind regards,

Offline Dagoth

  • Administrator
  • *****
  • Posts: 617
Re: First 2 Bar jobs: Barmaid and Waitress
« Reply #9 on: February 20, 2011, 07:24:22 PM »
You need to install TortoiseSVN. Alternately, if you can't or won't do that, just change the build setup to remove the "SubWCRev.exe" bit and make sure you have "Revision.h" like DocClox indicated.
« Last Edit: February 20, 2011, 07:26:37 PM by Dagoth »