devolution

Author Topic: various changes I'm working on  (Read 12414 times)

0 Members and 1 Guest are viewing this topic.

Offline THE FUTURE

  • Full Member
  • ***
  • Posts: 189
various changes I'm working on
« on: July 19, 2011, 01:23:48 PM »
(title changed)

First:

Makes a blue warning whenever a girl gains a new trait, to make those changes more obvious.

cGirls.cpp:

new trait from leveling up:
Code: [Select]
    if(GetStat(girl, STAT_LEVEL)%5 == 0)
    {
        //while(1)
        //{
            int chance = g_Dice%100;
            if(chance <= 10 && !HasTrait(girl, "Good Kisser"))
            {
                AddTrait(girl, "Good Kisser");
                ss << " She has gained the Good Kisser trait.";
                girl->m_Events.AddMessage(ss.str(), IMGTYPE_PROFILE, EVENT_WARNING);
                //break;
            }
            else if(chance <= 20 && !HasTrait(girl, "Nymphomaniac"))
            {
                AddTrait(girl, "Nymphomaniac");
                ss << " She has gained the Nymphomaniac trait.";
                girl->m_Events.AddMessage(ss.str(), IMGTYPE_PROFILE, EVENT_WARNING);
                //break;
            }
            else if(chance <= 30 && !HasTrait(girl, "Fake orgasm expert"))
            {
                AddTrait(girl, "Fake orgasm expert");
                ss << " She has gained the Fake Orgasm Expert trait.";
                girl->m_Events.AddMessage(ss.str(), IMGTYPE_PROFILE, EVENT_WARNING);
                //break;
            }
            else if(chance <= 40 && !HasTrait(girl, "Sexy Air"))
            {
                AddTrait(girl, "Sexy Air");
                ss << " She has gained the Sexy Air trait.";
                girl->m_Events.AddMessage(ss.str(), IMGTYPE_PROFILE, EVENT_WARNING);
                //break;
            }
            else if(chance <= 50 && !HasTrait(girl, "Fleet of Foot"))
            {
                AddTrait(girl, "Fleet of Foot");
                ss << " She has gained the Fleet of Foot trait.";
                girl->m_Events.AddMessage(ss.str(), IMGTYPE_PROFILE, EVENT_WARNING);
                //break;
            }
            else if(chance <= 60 && !HasTrait(girl, "Charismatic"))
            {
                AddTrait(girl, "Charismatic");
                ss << " She has gained the Charismatic trait.";
                girl->m_Events.AddMessage(ss.str(), IMGTYPE_PROFILE, EVENT_WARNING);
                //break;
            }
            else if(chance <= 70 && !HasTrait(girl, "Charming"))
            {
                AddTrait(girl, "Charming");
                ss << " She has gained the Charming trait.";
                girl->m_Events.AddMessage(ss.str(), IMGTYPE_PROFILE, EVENT_WARNING);
                //break;
            }
            else
            {
                girl->m_Events.AddMessage(ss.str(), IMGTYPE_PROFILE, EVENT_SUMMARY);
            }
            //else
            //    break;

            // A bug appeared to supress this message. Instead of making it global it now appears
            // on the girl's regular message list.
            //g_MessageQue.AddToQue(ss.str(), 0);
           
        //}
    }
    else
    {
        girl->m_Events.AddMessage(ss.str(), IMGTYPE_PROFILE, EVENT_SUMMARY);
    }
}

and also new traits from getting good at a job:

Code: [Select]
// If a girl enjoys a job enough, she has a chance of gaining traits associated with it
// (Made a FN out of code appearing in WorkExploreCatacombs etc...)

bool cGirls::PossiblyGainNewTrait(sGirl* girl, string Trait, int Threshold, int ActionType, string Message, bool DayNight)
{
    if(girl->m_Enjoyment[ActionType] > Threshold && !girl->has_trait(Trait))
    {
        int chance = (girl->m_Enjoyment[ActionType] - Threshold);
        if(g_Dice.percent(chance))
        {
            girl->add_trait(Trait, false);
            girl->m_Events.AddMessage(Message, IMGTYPE_PROFILE, EVENT_WARNING);
            return true;
        }
    }
    return false;
}
« Last Edit: July 21, 2011, 02:03:45 PM by THE FUTURE »
This is the last week of bug fixes. Barring anything catastrophic, development of a "sequel" to WM EX begins next week. If there is a major bug that hasn't been addressed, say so now or you're going to have to wait quite a long time for it to be fixed.

Offline Anon21

  • Full Member
  • ***
  • Posts: 244
Re: Add warning when new traits are added
« Reply #1 on: July 19, 2011, 02:58:28 PM »
Sounds good to me - I'll try it. :-)

Offline THE FUTURE

  • Full Member
  • ***
  • Posts: 189
Re: Add warning when new traits are added
« Reply #2 on: July 20, 2011, 04:33:59 PM »
This is a change to make automatic use of items display the profile pic instead of death. Death pics usually look way too graphic for auto item use.

cBrothel.cpp

Code: [Select]
bool cBrothelManager::AutomaticItemUse(sGirl * girl, int InvNum, string message)
{
    int EquipSlot = -1;

    EquipSlot = g_Girls.AddInv(girl, m_Inventory[InvNum]);
    if (EquipSlot != -1)
    {
        if (g_InvManager.equip_singleton_ok(girl, EquipSlot, false))  // Don't force equipment
        {
            RemoveItemFromInventoryByNumber(InvNum);  // Remove from general inventory
            g_InvManager.Equip(girl, EquipSlot, false);
            girl->m_Events.AddMessage(message, IMGTYPE_PROFILE, EVENT_WARNING);
            return true;

        }   
        else
        {
            g_Girls.RemoveInvByNumber(girl, EquipSlot);    // Remove it from the girl's inventory if they can't equip       
            return false;
        }
    }
    else
        return false;
}

bool cBrothelManager::AutomaticSlotlessItemUse(sGirl * girl, int InvNum, string message)
{
    // Slotless items include manuals, stripper poles, free weights, etc...
    int EquipSlot = -1;

    EquipSlot = g_Girls.AddInv(girl, m_Inventory[InvNum]);
    if (EquipSlot != -1)
    {
        RemoveItemFromInventoryByNumber(InvNum);  // Remove from general inventory
        g_InvManager.Equip(girl, EquipSlot, false);
        girl->m_Events.AddMessage(message, IMGTYPE_PROFILE, EVENT_WARNING);
        return true;
    }
    else
        return false;
}

bool cBrothelManager::AutomaticFoodItemUse(sGirl * girl, int InvNum, string message)
{
    int EquipSlot = -1;

    EquipSlot = g_Girls.AddInv(girl, m_Inventory[InvNum]);
    if (EquipSlot != -1)
    {
      RemoveItemFromInventoryByNumber(InvNum);
      g_InvManager.Equip(girl, EquipSlot, true);
      girl->m_Events.AddMessage(message, IMGTYPE_PROFILE, EVENT_WARNING);
      return true;
    }   
    else
      return false;
}
This is the last week of bug fixes. Barring anything catastrophic, development of a "sequel" to WM EX begins next week. If there is a major bug that hasn't been addressed, say so now or you're going to have to wait quite a long time for it to be fixed.

Offline THE FUTURE

  • Full Member
  • ***
  • Posts: 189
Re: Add warning when new traits are added
« Reply #3 on: July 21, 2011, 02:02:58 PM »
(I'm keeping it to one thread or else I'll end up spamming the forum with minor changes)

I think a change in askprice in cGirls.cpp is in order:
Code: [Select]
void cGirls::CalculateAskPrice(sGirl* girl, bool vari)
{
    girl->m_Stats[STAT_ASKPRICE] = 0;
    SetStat(girl, STAT_ASKPRICE, 0);
    int askPrice = (int)(((GetStat(girl, STAT_BEAUTY)+GetStat(girl, STAT_CHARISMA))/10)*0.6f);    // Initial price
    askPrice += GetStat(girl, STAT_CONFIDENCE)/10;    // their confidence will make them think they are worth more
    askPrice += GetStat(girl, STAT_INTELLIGENCE)/10;    // if they are smart they know they can get away with a little more
    askPrice += GetStat(girl, STAT_FAME)/4;    // And lastly their fame can be quite useful too
    if(GetStat(girl, STAT_LEVEL) > 0)
        askPrice += GetStat(girl, STAT_LEVEL) * 1;

The reason why is because girls cap themselves at 100 way too easily, whereas with this change it's nearly or even not possible to cap at 100. However, this also decreases all girls' worth stat, so a change in starting gold is probably also in order.

sConfig.cpp

Code: [Select]
void sConfigData::set_defaults()
{
    initial.gold                = 1000;

(you need to go into /resources/data/config.xml and manually change starting gold to 1000)

In my limited testing, this change *doesn't* seem to increase the difficulty perceptibly at all. Girls are less expensive but they also ask for less gold until they reach high levels. If you start the game with this change, expect to be able to buy a girl for 500-750 gold instead of over 1000 as you normally do.

The ONLY reason for making this change is because girls cap at 100 too easily. It's a change designed to defeat in-game inflation, but of course other changes are needed to fight the inflation of other aspects of the game.
« Last Edit: July 21, 2011, 02:04:59 PM by THE FUTURE »
This is the last week of bug fixes. Barring anything catastrophic, development of a "sequel" to WM EX begins next week. If there is a major bug that hasn't been addressed, say so now or you're going to have to wait quite a long time for it to be fixed.

Offline Anon21

  • Full Member
  • ***
  • Posts: 244
Re: various changes I'm working on
« Reply #4 on: July 22, 2011, 02:51:28 PM »
I've used your reply #2 stuff, but I'm not sure about the reply #3 changes.  It appears that I don't play the game the same way as many do, but women charging too much has never been an issue.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: various changes I'm working on
« Reply #5 on: July 22, 2011, 08:04:39 PM »
I've used your reply #2 stuff, but I'm not sure about the reply #3 changes.  It appears that I don't play the game the same way as many do, but women charging too much has never been an issue.

Agreed, I play in a way that seems to be an opposite of yours but I never had problems with that either because I make different levels of Items and have upperlevel items to be priced in 80 000 - 120 000 range. That way you have stuff to spend your money on even after you have two or three brothels making 100 000+ per week. A game is probably easier to balance that way.
Like what we're doing?

Offline THE FUTURE

  • Full Member
  • ***
  • Posts: 189
Re: various changes I'm working on
« Reply #6 on: July 24, 2011, 10:00:41 PM »
I've used your reply #2 stuff, but I'm not sure about the reply #3 changes.  It appears that I don't play the game the same way as many do, but women charging too much has never been an issue.

You misunderstand, then. It isn't that women are charging too much, it's that they hit the cap too easily. It's a pointless stat when any character over maybe level 10 has a 100 cost guaranteed. No problem if you're not going to use it, though.
This is the last week of bug fixes. Barring anything catastrophic, development of a "sequel" to WM EX begins next week. If there is a major bug that hasn't been addressed, say so now or you're going to have to wait quite a long time for it to be fixed.

Offline Anon21

  • Full Member
  • ***
  • Posts: 244
Re: various changes I'm working on
« Reply #7 on: July 24, 2011, 11:14:15 PM »
any character over maybe level 10 has a 100 cost guaranteed.

Yeah, but I 3/4 finish the game before any character has go to level 3.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: various changes I'm working on
« Reply #8 on: July 24, 2011, 11:24:52 PM »
Yeah, but I 3/4 finish the game before any character has go to level 3.

Actually while testing some mods I tried your approach, it's a lot of fun as well!
Like what we're doing?

Offline THE FUTURE

  • Full Member
  • ***
  • Posts: 189
Re: various changes I'm working on
« Reply #9 on: August 09, 2011, 01:10:15 AM »
With this change, when a girl refuses to work, the blue warning message is also pushed to the top of the list.

cEvents.cpp :

Code: [Select]
bool CEvent::IsUrgent()
{
    if(m_Event == EVENT_DANGER || m_Event == EVENT_WARNING || m_Event == EVENT_NOWORK)
        return true;
    return false;
}

bool CEvent::IsDanger()
{
    if(m_Event == EVENT_DANGER)
        return true;
    return false;
}

bool CEvent::IsWarning()
{
    if(m_Event == EVENT_WARNING || m_Event == EVENT_NOWORK)
        return true;
    return false;
}

It isn't really important, but EVENT_NOWORK is possibly the only blue message that doesn't get pushed to the top in the Turn Summary.
This is the last week of bug fixes. Barring anything catastrophic, development of a "sequel" to WM EX begins next week. If there is a major bug that hasn't been addressed, say so now or you're going to have to wait quite a long time for it to be fixed.

Offline Anon21

  • Full Member
  • ***
  • Posts: 244
Re: various changes I'm working on
« Reply #10 on: August 09, 2011, 09:40:50 AM »
With this change, when a girl refuses to work, the blue warning message is also pushed to the top of the list.

It isn't really important, but EVENT_NOWORK is possibly the only blue message that doesn't get pushed to the top in the Turn Summary.

This reminds me that someone wanted the option of _not_ having events with warnings sort to the top.  I've added that, and your chance, to my latest patch. :-)

Offline sgb

  • Sr. Member
  • ****
  • Posts: 380
Re: various changes I'm working on
« Reply #11 on: August 14, 2011, 07:26:30 PM »
Yeah, but I 3/4 finish the game before any character has go to level 3.
Yeah, most girls max out their income long before they even hit level 2.  There would need to be a major overhauls to core gameplay to fix the game's difficulty issues, something probably too ambitious for a mod.  Which is likely why the original devs dropped it, since you might as well just make a new game.

Offline THE FUTURE

  • Full Member
  • ***
  • Posts: 189
Re: various changes I'm working on
« Reply #12 on: August 15, 2011, 09:16:48 AM »
There would need to be a major overhauls to core gameplay to fix the game's difficulty issues, something probably too ambitious for a mod.  Which is likely why the original devs dropped it, since you might as well just make a new game.

I'm attempting exactly that with my own custom version of the game, and Anon can too but he's been holding off on doing so. I don't post my changes unless they're not controversial anymore so as to avoid possible drama/confusion/conflicts of interest. I might post my version some day when I feel like it's worth releasing, but I don't personally like posting small changes as downloadable mods. I'm nowhere near a worthwhile release atm because the start of my changes requires a lot of pruning and I haven't had too much free time.
This is the last week of bug fixes. Barring anything catastrophic, development of a "sequel" to WM EX begins next week. If there is a major bug that hasn't been addressed, say so now or you're going to have to wait quite a long time for it to be fixed.

Offline Anon21

  • Full Member
  • ***
  • Posts: 244
Re: various changes I'm working on
« Reply #13 on: August 15, 2011, 09:42:19 AM »
and Anon can too but he's been holding off on doing so.
I have? :-P

No, seriously, there's not much point in my working on game balance until I've actually played it enough to know what the game balance is like now.  For example I've only just got to having over 200 girls (unique + random) in my character folder. Before now it was pretty much impossible for me to fill up all the brothels with girls so I would have no idea of how important it is to be able to build extensions on the brothels.

I do know that you can win the game without putting a girl to work in a brothel once. Just keep sending the gangs down the catacombs to bring back treasure.  I've been toying with the idea of adding 'danger levels' to the catacombs and putting more valuable objects further down.

I don't really think it is that important that the game be possible to 'lose', but it could certainly stand to be a bit more challenging.

Offline THE FUTURE

  • Full Member
  • ***
  • Posts: 189
Re: various changes I'm working on
« Reply #14 on: September 19, 2011, 03:53:05 PM »
Did anyone mod out the Torturer bug yet? The one where the Torturer gets too tired so the Maton pulls her off duty, but the game crashes every time. Here's the fix I put in to avoid the problem completely:

WorkTorturer.cpp
Code: [Select]
bool cJobManager::WorkTorturer(sGirl* girl, sBrothel* brothel, int DayNight, string& summary)
{
    if(DayNight == SHIFT_NIGHT)  // Do this only once a day
        return false;

    string message = "";
    if(g_Girls.GetStat(girl, STAT_TIREDNESS) > 79)
        {
        girl->m_Events.AddMessage("She refused to work because she was too tired.", IMGTYPE_PROFILE, EVENT_WARNING);
        return true;
        }
    if(Preprocessing(ACTION_WORKTORTURER, girl, brothel, DayNight, summary, message))
        return true;

It's not really a fix to the problem so much as a workaround, but messing with this also makes what is causing the problem a little more obvious for anyone who knows a little more about the game code than I do.

The events change to do this:
/She refused to work because she was too tired.
/Matron pulls her off duty

or

/She refused to work because she was too tired.
/this girl desperately needs rest! message <-if no Matron

The custom overhaul of WM's gameplay I'm working on is over 50% done.
This is the last week of bug fixes. Barring anything catastrophic, development of a "sequel" to WM EX begins next week. If there is a major bug that hasn't been addressed, say so now or you're going to have to wait quite a long time for it to be fixed.