Pink Petal Games

Game Discussion => General Discussion & Download => Topic started by: necno on October 16, 2009, 07:42:54 PM

Title: Manual
Post by: necno on October 16, 2009, 07:42:54 PM
The following information will be slowly expanded as I find a little time to do so. Eventually it will be save into a PDF and distributed with the program. Note that i will periodically delete posts from here once they become irrelevant.



Overview: In this game you play the son of a man who was a powerful crime lord in the city of Crossgate  which is located in the fantasy realm of Mundiga, this realm that crosses over through time and space with other realms and dimensions. Your father died recently from an assassination and his assets looted by his rivals. All you have left is an old building that used to be a major brothel and center of operations for your fathers work. However this building has some interesting secrets such as the endless catacombs that extend below the building which are highly active with distortions in time and space, this makes their layout constantly change and also brings in all sorts of monsters, people and treasure from other worlds. Just above the catacombs is an old dungeon were the place where your father used to carry out all sorts of deeds that were best kept away from prying eyes. Your job now is to try to turn the brothel back into a thriving place of exotic women and pleasures and eventually destroy or overcome your fathers old rivals. It is up to you if you will be as evil as your father or not, but in any case you start with very little gold and your first order of business should be to purchase some slave girls from the slave market in town and hire some goons to guard your place.

Main Menu

1.      New Game – Clicking this button will start a new game and take to a box that allows you to name your first brothel. From this next screen clicking ok will accept the currently entered name while clicking cancel will go back to the main menu.

2.      Load Game- This will load a previously saved game. Games are saved automatically and only 1 save is available at a time.

3.      Quit Game – Exits the game back to windows

Game Messages

Messages in the game are shown in as text in a box down the bottom of the screen. Clicking left mouse button will move through these messages.

Choices in the game

During the game you may be required to make decisions. Simply select what you wish your decision to be from the box in the center of the screen.

Building Management Screen

This is the first screen you see after starting a new game (or loading a save game). At the top of this screen is the name of the brothel you are currently at and the date in the game.

The buttons do the following:

Prev/Next: Cycle though the buildings you currently own.

Quit: Quits the game back to the main menu.

Turn Summary: Takes you to the turn summary where you can view events that have occurred in the last day.

Next Day: Ends the current day, auto saves the game and takes you to the turn summary.

Save Game: Self explanatory.

Visit Town: takes you to the town screen where you can perform many other actions.

Visit Dungeon: visits your dungeon where you can view and interact with its occupants.

Supplies & Upgrades: You can buy building supplies and upgrades here.

Staff Management: You can hire staff and purchase upgrades for them here.

Girl Management: Where you tell your girls what to do for the following day.

The text down the bottom left displays the current brothels stats as follows:

Customer Happiness - The average happiness of the clients.

Fame - The average fame of the girls in this building.

Rooms - How many free rooms (for girls to live in) the building has.

Strip bar - Weather this place has a strip bar or not.

Gambling hall - Weather this place has a gambling hall or not.

Profit  - This buildings profit in the last day.

Your gold - Your total gold.

Gambling pool - the amount of money in circulation at your gambling hall.

Disposition - shows if you are a good or evil player.

Suspicion - Shows the suspicion level of the player from the local law enforement.

Game Stats

CHARISMA - This is they type of beauty that can be increased through makeup, training and such. It mostly represents a persons inner beauty and how they carry themselves. As such it is something that can change as people learn and improve themselves. The higher a girls charisma the more they can charge for services, also it will attract more customers.

HAPPINESS - Self explanatory. It is how happy a girl is. Happy girls are more obedient and will pass their happiness onto customers.

LIBIDO - How much the girl enjoys sexual acts. A high libido will increase the girls happiness after sex.

CONSTITUTION -  How much pain and physical strain the body can withstand. The higher it is the less tired girls get.

INTELLIGENCE - How smart a girl is. Smart girls know how to get a little more money from customers, they also make better decisions.

CONFIDENCE - How much a girl believes in herself.

MANA - This is constantly replenished. It is how much magical energy they have. Used when using magic in either combat or sex.

AGILITY - Agile girls make customers happier.

FAME - Famous girls attract more customers to the brothel.

LEVEL - Level of experience. The higher it is the more skilled the girl is (and the more money they can make). The highest value for this is 20.

ASKPRICE - How much a girl will ask for from a customer. Changes per customer based on her intelligence vs customers. This can go up to a maximum of 70.

HOUSE - Percentage of money the player keeps. Currently cannot be change but for now slave girls default to 100% and other girls 60%.

EXP - Experience is gained constantly through work, when it reaches 255 it will increase the girls level (and her skills and be set back to 0.

AGE - Self explanatory, doesn't have effect on game play.

OBEDIENCE - How much the girl will listen to your orders.

SPIRIT - How strongly she believes in her convictions. High spirit will increase disobedience with certain things she doesn't enjoy.

BEAUTY - Natural physical beauty. This is how she was born and is unlikely to change. Combined with charisma to produce the "looks" value in game. A girls looks can increase though charisma but are limited by beauty.

TIREDNESS - value from 0 - 100, the higher it is the sleepier the girl is, the more unhappy she is and the sloppier her work. At 100 a girl will also start to injure herself from sleep deprivation.

HEALTH - How healthy she is. if it reaches 0 she dies.

PCFEAR - How much they fear the player.It will increase obedience only when it is greater than hate.

PCLOVE - How much they love (have feelings for) the player. It will increase obedience.

PCHATE - How much they despise the player. It will decrease obedience only when it is greater than fear.

REBELLIOUSNESS - This is a calculation based on health, tiredness, spirit, confidence, hate, love, fear and obediance. It is used to calculate if a girl will disobey you or not.

ITEMS

There are many items in whoremaster. You can get an idea of what they do by looking at their description. Other then that it is trial and error. There is also limits on how many of a item you may equip on a girl. All equippable items maintain their effects so long as the item is equipped.

RINGS - Max of 8 equipped at a time.

DRESSES - max of 1 equipped.SHOES - max of 1 equipped.

NECKLACE - max of 1 equipped.

WEAPONS -  max of 2.

ARMOUR - max of 1

ARMBAND - max of 2

The above dresses, necklaces are only brought by girls who have a nature towards making themselves look pretty. Armour and weapons are mostly brought by girls who are tough and like to fight. This doesn't prevent them from buying other items but their preference is towards items their personality bases (i.e. tough girl or pretty girl) prefer. Girls will automatically wear these items based on their value meaning girls base the value of a item on its cost, the more expensive the item the nicer the item is considered.

3 more item types exist they are misc, food and makeup. Food and makeup are pretty much the same and will automatically be used by the girls. When used they will apply their effects and then disappear. Misc items on the other hand will remain and apply effects for so long as they are in the inventory.

Girls will automatically use up to 3 food/makeup items each turn. Also they will sell old unequipped items of the other types.
Title: Re: Manual
Post by: Solo761 on December 17, 2009, 07:44:01 AM
If someone wants to manually create XML files for girls, rgirls and items, or try making better editor I've written some info on what values are accepted for attributes.

In this rar file is one pdf and one rtf so use one you prefer, plus rtf is editable.

http://www.mediafire.com/file/f0rg3lvdynj/XMLFiles.rar
Title: HOWTO: Event Scripting
Post by: DocClox on June 14, 2010, 04:40:00 AM
HOWTO:  Event Scripting With  Lua

Preamble

The aim of this post is to document how to write game events in Lua. I'm going  to give a short introduction to lua, describe how to write a Lua event for WM, list the "wm" package functions, and talk about possible "gotchas"

Introducing Lua

Lua is a scripting language designed to be embedded in larger programs. It's small and fast, and the syntax is simple and straightforward. Because of this, Lua is popular as a games scripting language. World of Warcraft, for instance, uses Lua.

There are a lot of Lua resources available online. Some good starting points are:

    http://www.lua.org/ (http://www.lua.org/)
    http://lua-users.org/wiki/ (http://lua-users.org/wiki/)
    http://www.lua.org/manual/5.1/ (http://www.lua.org/manual/5.1/)

Writing Lua events for WhoreMaster

To create a new event in WM you need two things. A script and a trigger to fire it. Let's look at the script, first.

A simple Lua script might look like his

Code: [Select]
-- double minus sign starts a comment in lua - it lasts to the end of the line

local event_state    -- local variable

function init()
    -- stuff to initialise the event goes here
    wm.log("event init")
    event_state = "starting"
    return true           
end

function run()
    wm.log("run function called")

    if event_state = "starting" then
        wm.log("starting stage")
        event_state = "stage 2"
        return true
    end

    if event_state = "stage 2" then
        wm.log("stage 2")
        event_state = "ending"
        return true
    end

    if event_state = "ending" then
        wm.log("event ending")
        return false
    end

    wm.log("how did I get here")
    return false
end

The two functions, run() and init() are the key. The init() function gets called when your event is fired. Events may be triggered more than once,  so this function is used to set all the local variables back to their start state.

The init function should normally return true - if it returns false (or nothing at all) then the game will take that as a sign that the event couldn't be properly initialised and should not be run.

The run() function is the one that gets called when the event actually  executes. This too is probably going to get called more than once. For some  things you need to leave the script before they can happen. Menus for instance
can be set up from inside a script, but they won't display until the script exits. This means that your run() method may need to be called several times in order to do what you want.

The game uses the value returned by  run to determine if the function needs to be called again. if it returns  false, (or nil, or no value at all), that means "this event is finished, remove it from the event queue". Returning true means "this event has more to do, please run it again".

Managing State

The other thing the run method needs is a way to make sure that different things happens when run() is called at different times. The way to do that is with a state variable - that's what event_state is for in the example above. The run function tests the variable to find out where it was up to in the sequence of occurences that make up the event.

The wm.log() function writes to the log file, so we can see what the script is doing. The output from this script should be

Quote
LuaScript: event init
LuaScript: run function called
LuaScript: starting stage
LuaScript: run function called
LuaScript: stage 2
LuaScript: run function called
LuaScript: event ending

You can see that the run function gets called three times; once for
each of the events three stages. The first two stages return true, so
the game knows to keep running the script. The third one returns false
to end exectuion.

Looking at the event_state variable again, you'll see it's declared
local. That's because all the events in the game run in a shared
namespace. This means that any global variables may be overwritten by
other scripts. Local ones are private, and much safer.


The "wm" package

To keep from polluting the namespace, all the game interface functions
are packaged into the "wm" namespace. These functions and data structures
are how the game engine communicates with the scripts.

Currently, the following functions are defined:

wm.girl: This is the target girl of the event. If the script is attached to a girl, her details will be in here. If there is no girl for this event, then wm.girl will be nil. Note that the wm namespace is shared among scripts, which means that although wm.girl will be correct when init() runs, it could potentially change if other scripts are running. So it's good practice to copy the object to a local variable.

Currently wm.girl doesn't hold very much information, although more will be added soon.
Code: [Select]
        wm.menu {
                -- each caption line is a menu choice
                captions = {
                        "Strike the begger for his impertinence",
                        "Take a closer look"
                },
                -- the callback function gets called when the user makes a menu choice
                -- best practice here is to set a state varaible and return
                callback = function(choice)
                        if choice == 1 then
                                event_stage = "violence"
                        elseif choice == 2 then
                                event_stage = "brains"
                        else
                                wm.log("unexpected choice in menu callback")
                        end
                end
        }
The "real name" is only significant for random girls, where the real name is the random name generated for the particular girl in question. the pointer field is for internal use. Please don't change it or things will stop working and the game may crash.

Caveats

There is one potential pitfall to be aware of. As mentioned earlier, local variables are a good idea. By the same token, if you break your script down into functions, then local functions are likewise good. However:

For those interested - this is why it happens. If you're not interested then feel free to skip the next bit. tl;dnr and all that.

Anyway, the local functions problem is all to do with the way lua handles function calls. if you say foo() in a lua script, it assumes that there's goign to be a name "foo" in the global namespace table. If you then declare "local function foo()" then all subsequent invocations will use the local foo, but the ones prior to that point will still be pointing at the global namespace, which will be undefined.

You can't get around it by forward declarations either. If you try

Code: [Select]
local foo

function run()
    foo()
end

foo = function()
   wm.log("boo")
end

then run gets treated as a closure, and is called with the value of local foo as an upvalue - in other words it embeds nil as the value of foo in the fun function, even though the value is subsequently updated.

OK, that's everythign I can think of right now. I'll add some examples in a bit...
Title: Re: HOWTO: Event Scripting
Post by: Lorde on June 14, 2010, 09:13:15 AM
HOWTO:  Event Scripting With  Lua

Sweet, is it up and running? (Asking this before actually checking the developers board) gg DocClox

I'll be happy to bang out a few example scripts for the community when it is. (Will help me learn the ins and outs as well  :D )
Title: Re: Manual
Post by: DocClox on June 14, 2010, 10:08:54 AM
It's in subversion now - so it should be in the next release. :)
Title: Re: Manual
Post by: necno on June 14, 2010, 08:47:48 PM
scripting is by far the biggest leap for modding whoremaster. Although it was already existing the scripting system i wrote was very primitive.
Title: Re: Manual
Post by: Mehzerz on July 03, 2010, 02:55:17 AM
It's in subversion now - so it should be in the next release. :)


Very cool, the description went a little over my head, but I'll play with it later. I'm interested to see the additional functions. Events that add items to your inventory, items that call up events once obtained, when a gang is defeated, ect. ect.
I guess I can't get too complicated with it, I don't even totally understand how it works yet lol.
Title: Re: Manual
Post by: DocClox on July 03, 2010, 03:07:12 AM
mmm... good point. Inventory control is something Ill need to do.

I still need to discuss triggers too, now you mention it. Maybe if I get a chance this weekend. Murray lost yesterday, so I may have some unexpected free time :)
Title: Re: Manual
Post by: Lorde on July 03, 2010, 10:41:45 AM
I'm gonna wait until you get this more complete Doc till I crack into this. I went over the source code for the Chun Li Script and I think I understand the concept. The fact that it's in plain text is a big step forward.  (Easier to edit.)

Like I said though I'm gonna wait or this conversation will happen like twice a week.

<Me>Doc, how do you do this?
<You> Not implemented yet sorry.
<Me>Oh ok.  :'(



 
Title: Re: Manual
Post by: DocClox on July 03, 2010, 12:26:10 PM
mmm... the trouble is that there isn't an API to duplicate as such, so it's hard to tell if I've got everything.

That said, things are going to be distinctly WIP for a week or two yet, so probably holding off a bit is sensible.
Title: Re: Manual
Post by: Jasuke on January 03, 2011, 10:47:56 PM
Heh
Anyone else tried naming their first brothel "Test"?
That gives you quite a cheat
Title: Re: Manual
Post by: Jojose on April 09, 2011, 03:10:16 PM
Haha I read this thread three times and still barely understand anything  :'(

Scripting is hard...  :-[
Title: Re: Manual
Post by: Mak on April 09, 2011, 10:49:29 PM
Info for playing full screen or changing screen size found here (http://pinkpetal.org/index.php?PHPSESSID=cpmfg85ii1eg5iuaqo0o17ci41&topic=515.0).
Title: Re: Manual
Post by: izumi3457 on May 04, 2011, 02:55:44 PM
how do i take the girls that are in my dungeon and put them in my brothel
Title: Re: Manual
Post by: GonDra on May 04, 2011, 03:42:22 PM
how do i take the girls that are in my dungeon and put them in my brothel

"Release" them if you have them selected in the dungeon menu.
Title: Re: Manual
Post by: nomad1984 on July 18, 2012, 11:20:04 PM
I know this is an old post, and I'm hoping since it is locked to the top that it will be ok if I comment on it.

I wanted to say thank you Necno for the information towards a manual. and since i could not find a manual in the current downloads i am going to guess one was never finished?  If that is the case I am currently compiling the information into a manual of my own, although i am using Crazy's mod, a lot of the basic items are still there, i think...

Before i get too far into the glammer of it *trying to make it look as good as possible, Despite never making one before* I would like to ask Necno's permission to use his information in it as well, of course a link to his profile and his name will be cited for the information, and a lot of other information will need to be added/removed to update it to this more current config.

I also have a few other questions towards credit being due.. for example. who was the original creator for WM?

What links can be used to find the more up to date on the big 4 mods? Aika/Crazy/Future/Anon

And of course, can I get their permissions to link them to this manual?

Unfortunately ive never actually used forums other than a "Hi, Im new" and never return kinda thing. *more of a chatroom guy when i was younger* so I am not exactly sure on formalities of these things, so if i seem a little rude, or ignorant, forgive me please, cause the intention is surely not there.


Title: Re: Manual
Post by: Xela on July 19, 2012, 03:48:44 AM
I also have a few other questions towards credit being due.. for example. who was the original creator for WM?

What links can be used to find the more up to date on the big 4 mods? Aika/Crazy/Future/Anon

And of course, can I get their permissions to link them to this manual?

1) Necro is the original WM creator.

2) Search forums but Anon's mod may be lost, rest are on the front page of mod's section.

3) Aika/crazy are not done yet... Future/Anon are not around anymore but I if you are making a manual for WM, make it for vanilla version and point to Mod's section somewhere in it. That might be better solution.
Title: Re: Manual
Post by: fires_flair on July 19, 2012, 11:57:19 AM
If some one wants to host Anon's version, I still have the files uploaded for it.
Title: Re: Manual
Post by: Xela on July 19, 2012, 12:11:29 PM
If some one wants to host Anon's version, I still have the files uploaded for it.

I can throw it on my mediafire account, but your link in his thread is dead.
Title: Re: Manual
Post by: fires_flair on July 19, 2012, 12:52:57 PM
I can throw it on my mediafire account, but your link in his thread is dead.
not anymore. only have them set to private, until I decided completely what I wanted to do with them.
http://www.mediafire.com/file/qefembtnsb2kf5q/uproda343193.zip
http://www.mediafire.com/file/8683nt1btpe28vt/www.dotup.org2042843.zip

don't remember which was the last update.
Title: Re: Manual
Post by: Xela on July 19, 2012, 03:28:58 PM
not anymore. only have them set to private, until I decided completely what I wanted to do with them.
http://www.mediafire.com/file/qefembtnsb2kf5q/uproda343193.zip (http://www.mediafire.com/file/qefembtnsb2kf5q/uproda343193.zip)
http://www.mediafire.com/file/8683nt1btpe28vt/www.dotup.org2042843.zip (http://www.mediafire.com/file/8683nt1btpe28vt/www.dotup.org2042843.zip)

don't remember which was the last update.

Neither is compiled, I'll try to figure it out when I have time, thanks :)