Pink Petal Games

Game Discussion => General Discussion & Download => Topic started by: myrikhan on March 25, 2010, 09:51:43 PM

Title: Code submission #2 (DIFF file again)
Post by: myrikhan on March 25, 2010, 09:51:43 PM
Hello Everyone:

Ok, did some more hacking and fixed a bunch of stuff.  The game is feeling
really good now.   First, the bugfix list:

Fixes:
-----
- Girl transfer screen working again
- There was a bug where a combattant would be killed and the game wouldn't notice.
    - One side benefit of this is there should be less girl deaths caused by transferring them
      to your dungeon
- Fixed 2 hangs in girl catacomb exploration
    - Damage was being added to health, not subtracted
    - Exit condition of the girl being reduced to 20 or less health hang.  (If she beats all the
      monsters and has > 20 health, the game hanged) 
- Girl fighting monster/monster girls code rewritten and working.  There was a damage-
  gives-you-health bug and worn equipment was being ignored
  - Looting items code fixed and working
- Catacombs are now open for exploration!!! Yay!!!
- Gang mission messages made much more explicit.
- It is now possible to destroy enemy factions!  Woot! If all enemy factions are destroyed,
  peace breaks out.  BUT!  New enemies will move in to menace you.  (All this has been tested
  and works.)
    - Faction destroy condition is: Two or more of {gold, businesses, gangs, brothels}
      reduced to zero or less
- Fixed inventory equip bug (My girls can now wear clothes, a necklace, a ring and shoes all
  at the same time for example)
- Removed ability for girls to take off items they don't like. (Hey!  How'd you get that
  necklace of control off?)  This means when you load a game, they're still wearing all the
  stuff you bought them.
- Wrote some code to try and eliminate contradictory traits
    eg: quick learner and slow learner becomes quick learner
- Fixed a "* -1" in the "does the girl obey?" equation
- Wrote some code to enable the training code in the jobs class
  - Fixed a vector error in the training code and a bug in one of the .h files
- Removed a few redundant messages from the next turn summary screen
- Made many of the messages on the next turn screen more explicit:
  - Security level increase shown
  - Advertising level and cost shown
  - Total number of customers visiting during the day and night shown
  - Girl work and work refusal messages are more specific
- Other things I don't remember

A number of things I did were to make the game more fun for me.  (Ie, this part is a matter
of opinion):
-------------------------------------------------------------------------------------------
- Matrons don't have a loyalty check and they don't get tired.  (They are required to be on
  duty for 24h and if they spaz, manually dealing with 70+ girls in a house is a pain!)
- Cleaning rate increased by a factor of 10! Loyalty check and fatigue removed for girls
  who are cleaning.  (For a house of ~50 girls, I need 20 cleaners working both shifts to
  keep the filthiness level down.  It's far too much hassle having to deal with them
  refusing to work and getting tired.)
- Modified the UI to show the actual filthiness level.  (What are my girls doing?  My filthiness
  level was up to 13,000ish at one point.)
- Increased whoring xp by a factor of 3.  (Levelling for characters with less than 100
  constitution - especially when 50 are in a building - is slow.)
- Changed tiredness for 100 constitution to 0 (was 2)
- Girl doesn't go off duty after being attacked
- Advertising 20% more effective in number of customers calculation
- Changed filthiness sub-calculation in number of customers calculation (Tops out at -50 customers)
- Gang recruiting is faster (3 per turn, instead of 2)
- Combat skill now factors into catacomb exploration (It's too easy this way?)
- Cleaned up jobs and made them more consistent in terms of messages and skill increases
  (I know the devs are changing this so I didn't do much here)
- Dramatically increased the prices of brothels: 100 K, 300 K, 700 K, 1.5 M, 3 M
  There aren't any money sinks in the game, so the prices are set high.  (When I needed to buy my
  third brothel I thought, "300K?  Damn, that's a lot!" - So I'm on the right track.)
- Other stuff I don't remember anymore :)

The SVN DIFF file (From rev 255 again) is attached.

The item file is one created by a user here on the boards.  I modified it by adding my own items
and decreased the frequency of appearance of low-end items.  Hopefully you'll find your own
True Rattle of Entropy and rule like a true tyrant!

Finally there is a two-part zip containing a compiled executable.  There's a readme inside the
archive with installation instructions.  (And warnings about this being a branch build.)
EDIT 1: The executable was built with Visual Studio 2010.  As one user pointed out in this thread,
it may not work.  Right now I'm not sure how to fix this.
EDIT 2: GonDra made an executable using Visual Studio 2008.  See:
http://pinkpetal.org/index.php?topic=307.msg5752#msg5752 (http://pinkpetal.org/index.php?topic=307.msg5752#msg5752)

Man, I'm tired. 

Myrikhan 

    :D
Title: Re: Code submission #2 (DIFF file again)
Post by: Mehzerz on March 26, 2010, 12:54:10 AM
Wow. You did a number on the code that's for sure... I'll continue to wait for the "official" release before I try the game again. :o


SOUNDS GOOD THOUGH. I can't wait to try all the new stuff. :o
Title: Re: Code submission #2 (DIFF file again)
Post by: fixet on March 26, 2010, 10:50:38 AM
I'm sorry for asking what is probably a stupid question, but what does this fix?

the new, unreleased code? or does it just add stuff?
half of the features this fixes I wasn't even aware of

was all that already in the game, but just disabled? what the hell was I playing?
Title: Re: Code submission #2 (DIFF file again)
Post by: dcb42 on March 26, 2010, 11:17:47 AM
When I try using the new executable, I first get a couple of messages telling me that .dll files can't be found (msvcp100.dll and msvcr100.dll).

I find those online and put them into the directory, and then get "The procedure entry point _invalid_parameter_noinfo_noreturn could not be located in the dynamic link library MSVCR100.dll."
Title: Re: Code submission #2 (DIFF file again)
Post by: delta224 on March 26, 2010, 11:27:09 AM
What did you build this with.
Title: Re: Code submission #2 (DIFF file again)
Post by: myrikhan on March 26, 2010, 12:00:34 PM
What did you build this with.

Visual Studio 2010 beta.  Damn, I didn't think about that.

I've modified my original post with this info.
Title: Re: Code submission #2 (DIFF file again)
Post by: myrikhan on March 26, 2010, 12:11:06 PM
I'm sorry for asking what is probably a stupid question, but what does this fix?

the new, unreleased code? or does it just add stuff?
half of the features this fixes I wasn't even aware of

was all that already in the game, but just disabled? what the hell was I playing?

Hi.  WM uses a version control management system (VCMS) to manage the source
code for the game:

http://pinkpetal.org/index.php?topic=191.0

The most recent code in the VCMS is 1.30 beta.  It hasn't been built and released
to the public yet.  My changes and bugfixes are for this code.

Myrikhan
Title: Re: Code submission #2 (DIFF file again)
Post by: Samu on March 26, 2010, 12:18:30 PM
If it was compiled with visual studio 2010, you need ".NET framework 4 BETA 2" to run this branch.
http://www.microsoft.com/downloads/details.aspx?familyid=DED875C8-FE5E-4CC9-B973-2171B61FE982&displaylang=en

edit even with .NET 4 I had an error: "failed to find the entry point from procedure ?_Xruntime_error@std@@YAXPBD@Z in MSVCP100.dll"
Title: Re: Code submission #2 (DIFF file again)
Post by: fixet on March 26, 2010, 12:31:17 PM
@Myrikhan
thanks for answering, that clears things up

@samu
I have .net 4b2 and I still get the same error as dcb42
Title: Re: Code submission #2 (DIFF file again)
Post by: delta224 on March 26, 2010, 01:11:36 PM
One other thing is this the exe from the debug build or the release build.
Title: Re: Code submission #2 (DIFF file again)
Post by: myrikhan on March 26, 2010, 01:31:18 PM
One other thing is this the exe from the debug build or the release build.

Release.
Title: Re: Code submission #2 (DIFF file again)
Post by: delta224 on March 26, 2010, 02:13:53 PM
I wish I knew how to fix the issue.
Title: Re: Code submission #2 (DIFF file again)
Post by: myrikhan on March 26, 2010, 02:23:17 PM
I wish I knew how to fix the issue.

Same here.  I have the flu right now so I'm not thinking straight.  Can you apply the
diff to a branch and produce an executable using your compiler?  (I don't have any
earlier versions of Visual Studio or any other compiler.)

Myrikhan
Title: Re: Code submission #2 (DIFF file again)
Post by: GonDra on March 26, 2010, 04:36:57 PM
I applied your patch to rev 255 with tortoise-merge, after a bid of fiddling around i was able to open the project (couldn't open the .sln for some reason) with Visual Studio 2008.
To compile i needed to remove some string conversions that were in at least some file open function calls.

attached is the compiled .exe and a new .diff file that i created with TortoiseSVN from the patched trunk with those files excluded:

BrothelMaster.suo
Whore Master.exe
Items.itemsx
everything in the Resources\Characters\ folder

its quite possible that I screwed up somewhere in the process, as this was the first time i did something like that.
I only made a quick test if the .exe runs, what i did test was if the normal whoring job functioned (it did).

.zip was made with 7-Zip
Title: Re: Code submission #2 (DIFF file again)
Post by: myrikhan on March 26, 2010, 05:29:12 PM
I applied your patch to rev 255 with tortoise-merge, after a bid of fiddling around i was able to open the project (couldn't open the .sln for some reason) with Visual Studio 2008 ...

Sweet, thanks.  Mentioned in opening message now.
Title: Re: Code submission #2 (DIFF file again)
Post by: necno on March 26, 2010, 05:47:00 PM
I've noticed you created a branch in the SVN. Are you changes committed to that branch? If so I will merge anything relevant into the trunk. The reason I say relevant is that some things may be changed by the new jobs.
Title: Re: Code submission #2 (DIFF file again)
Post by: Dagoth on March 26, 2010, 05:57:27 PM
DocClox created that branch, but had trouble applying the patch (http://pinkpetal.org/index.php?topic=305.msg5719#msg5719). So the branch is currently empty, though he said he should be able to set it up by this weekend.
Title: Re: Code submission #2 (DIFF file again)
Post by: myrikhan on March 26, 2010, 06:10:52 PM
I've noticed you created a branch in the SVN. Are you changes committed to that branch? If so I will merge anything relevant into the trunk. The reason I say relevant is that some things may be changed by the new jobs.

I'm not on the dev team so I don't have write access to SVN.  The best I can do is submit a diff file here on the
boards.  If it helps, I can upload the source files (*.h *.cpp) here too. 

All of my changes are on revision 255 in the SVN repository.  I didn't do much in the job code as I knew you, the dev team, want to change it a lot.  (Catacomb exploration excepted.  It was rewritten and works now.)

Myrikhan
Title: Re: Code submission #2 (DIFF file again)
Post by: GonDra on March 26, 2010, 09:56:32 PM
Ah before I forget it: if you get an error with sdl_gfx.dll or something when using my exe you will have to rename it to what he wants to have.
As I first got my hands on the Sourcecode I decided for some Armok-forsaken reason to compile that library myself...
Title: Re: Code submission #2 (DIFF file again)
Post by: Dagoth on March 27, 2010, 12:25:36 AM
I went ahead and updated myrikhan's branch on SVN with his diff 2 patch.
Title: Re: Code submission #2 (DIFF file again)
Post by: fixet on March 27, 2010, 07:09:59 AM
Ah before I forget it: if u get an error with sdl_gfx.dll or something when using my exe you will have to rename it to what he wants to have.
As I first got my hands on the Sourcecode I decided for some Armok-forsaken reason to compile that library myself...
can you please attach your sdl_gfx.dll?
I must have downloaded a dozen builds and it always causes the .exe to crash, and I couldn't build my own to save my life
Title: Re: Code submission #2 (DIFF file again)
Post by: GonDra on March 27, 2010, 08:42:50 AM
can you please attach your sdl_gfx.dll?
I must have downloaded a dozen builds and it always causes the .exe to crash, and I couldn't build my own to save my life
ok here it goes.
if the exe wants the sdl_gfx.dll just add the underscore yourself.
Title: Re: Code submission #2 (DIFF file again)
Post by: fixet on March 27, 2010, 11:35:10 AM
thanks, man
Title: Re: Code submission #2 (DIFF file again)
Post by: Uriel on March 27, 2010, 03:25:36 PM
How can i play with this patch? We got this compiled exe and all, what else i need to have?
Can't wait anymore, especially since i rad all the changes made by myrikhan.

And yep, i'm a newbie, you can see it in my status to the left of this message  ::)
Title: Re: Code submission #2 (DIFF file again)
Post by: sgb on March 28, 2010, 03:47:58 PM
I'm sure if they had a mostly stable release ready for the public, they'd have put it out a long time ago.  Be patient, it's been months since the devs have made such progress on the game so let them keep going while they're on a role.
Title: Re: Code submission #2 (DIFF file again)
Post by: deimosmasque on March 29, 2010, 12:51:17 AM
Okay I feel a little silly here as I've tried a couple times to make this work using the both provided exe files and I can't seem to get it working.  It loads up and crashes right away.

I'm using Windows Vista if that matters.
Title: Re: Code submission #2 (DIFF file again)
Post by: LordJerle on March 29, 2010, 08:37:35 PM
Okay I feel a little silly here as I've tried a couple times to make this work using the both provided exe files and I can't seem to get it working.  It loads up and crashes right away.

I'm using Windows Vista if that matters.
Yes, use 7 or XP.  Vista sucks >.>
Title: Re: Code submission #2 (DIFF file again)
Post by: delta224 on March 29, 2010, 11:51:29 PM
This is not a problem with vista, but most likely a dll issue.
Title: Re: Code submission #2 (DIFF file again)
Post by: deimosmasque on March 30, 2010, 03:12:46 PM
I did get some DLL errors at first but I found the missing dlls online and then registered them but the game is still crashing right after execution.
Title: Re: Code submission #2 (DIFF file again)
Post by: z-master on March 30, 2010, 03:43:26 PM
I had a crash too, but I found that it was caused by the .girlsx-files - they were 0 kb big. After I replaced them all worked properly. Maybe its the same problem with your version?
Title: Re: Code submission #2 (DIFF file again)
Post by: fixet on March 30, 2010, 05:10:04 PM
the game starts for me, but freezes after entering the brothel name and clicking "ok"
replacing  .girlsx files doesn't work, that's the first thing I tried

the game log just says
"Initializing Graphics
Loading master file"

it creates a 0kb save that it doesn't recognize in-game

feelsbadman
Title: Re: Code submission #2 (DIFF file again)
Post by: z-master on March 30, 2010, 05:48:50 PM
And the graphics are okay too? Hm ...
Title: Re: Code submission #2 (DIFF file again)
Post by: GonDra on March 30, 2010, 08:00:12 PM
Ok a short explanation how you should get a working patched revision 255:
Download the BrothelMaster folder of myrikhan's Branch, replace the .exe, eventually rename the sdl_gfx.dll, put some actual girl files in the correct folder, done.

Keep in mind that a lot of stuff probably doesn't work and that the config in place, has values in it to make testing easier. It's just a patched revision, not a release version.
I prefer waiting for the next official release myself, and will just poke at the code here and there trying to learn a bit more about C++.
Title: Re: Code submission #2 (DIFF file again)
Post by: Mehzerz on March 31, 2010, 12:49:57 AM
Yeah, I'm just going to wait as well. I'm really anxious to test out the new stuff, but if it's not ready, it's not ready.
Title: Re: Code submission #2 (DIFF file again)
Post by: DocClox on March 31, 2010, 07:55:06 AM
I went ahead and updated myrikhan's branch on SVN with his diff 2 patch.
Incidentally, thanks for that. I meant to say that earlier.