Author Topic: Manual  (Read 54781 times)

0 Members and 2 Guests are viewing this topic.

Offline necno

  • Core Developer
  • ******
  • Posts: 385
Manual
« on: October 16, 2009, 06: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.
Click here to donate
After you do so please pm me the email address you used so I can add you to the donation forum.

Working on:
Whoremaster II (Official)
Birthright (Now a commercial rougelike)

Offline Solo761

  • Administrator
  • *****
  • Posts: 175
Re: Manual
« Reply #1 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

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
HOWTO: Event Scripting
« Reply #2 on: June 14, 2010, 03: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://lua-users.org/wiki/
    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.
  • wm.girl.name           The girl's name
  • wm.girl.real_name   The girl's "real" name.
  • wm.girl.desc             This is the girl's short description
  • wm.girl.pointer         This is a reference to the girl's internal address in c++.
  • wm.add_girl_to_brothel          Adds a girl to the current brothel. Default is the current target girl.
  • wm.menu                  displays a game menu. Call it like this:
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
        }
  • wm.get_sdl_ticks     Get the SDL engine's count in milliseconds since the program started.
  • wm.log(message)    write message to the log file
  • wm.message(text,colour) display text in a popup box. Colour is in the range 0-7
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:

  • local functions need to be declared before the functions that use them
  • I don't think you can declare run and init as locals. Or if you do, I don't think the game will find the correct functions
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...
« Last Edit: June 14, 2010, 07:41:30 AM by DocClox »

Offline Lorde

  • Hero Member
  • *****
  • Posts: 570
  • Accepting requests for girl expansion packs.
Re: HOWTO: Event Scripting
« Reply #3 on: June 14, 2010, 08: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 )
Current Girl Work Schedule            
* Revy  (Black Lagoon)
* Stab at The series He is my Master
* Run Elsie Jewelria and Yuuki Rito (To Love Ru)
* Yukari Takeba (Persona 3)
* Work on the Code Geass girls

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: Manual
« Reply #4 on: June 14, 2010, 09:08:54 AM »
It's in subversion now - so it should be in the next release. :)

Offline necno

  • Core Developer
  • ******
  • Posts: 385
Re: Manual
« Reply #5 on: June 14, 2010, 07: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.
Click here to donate
After you do so please pm me the email address you used so I can add you to the donation forum.

Working on:
Whoremaster II (Official)
Birthright (Now a commercial rougelike)

Offline Mehzerz

  • Hero Member
  • *****
  • Posts: 564
  • Rockin' the after life after party
Re: Manual
« Reply #6 on: July 03, 2010, 01: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.
Starter girls image additions progress:
26 girls, 18 to go

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: Manual
« Reply #7 on: July 03, 2010, 02: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 :)

Offline Lorde

  • Hero Member
  • *****
  • Posts: 570
  • Accepting requests for girl expansion packs.
Re: Manual
« Reply #8 on: July 03, 2010, 09: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.  :'(



 
Current Girl Work Schedule            
* Revy  (Black Lagoon)
* Stab at The series He is my Master
* Run Elsie Jewelria and Yuuki Rito (To Love Ru)
* Yukari Takeba (Persona 3)
* Work on the Code Geass girls

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: Manual
« Reply #9 on: July 03, 2010, 11:26:10 AM »
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.

Offline Jasuke

  • Newbie
  • *
  • Posts: 16
Re: Manual
« Reply #10 on: January 03, 2011, 10:47:56 PM »
Heh
Anyone else tried naming their first brothel "Test"?
That gives you quite a cheat

Offline Jojose

  • Newbie
  • *
  • Posts: 30
Re: Manual
« Reply #11 on: April 09, 2011, 02:10:16 PM »
Haha I read this thread three times and still barely understand anything  :'(

Scripting is hard...  :-[

Offline Mak

  • Donator
  • *****
  • Posts: 165
  • PETA=People Eating Tasty Animals
Re: Manual
« Reply #12 on: April 09, 2011, 09:49:29 PM »
Info for playing full screen or changing screen size found here.
There's a place for all the planet's creatures, it's next to the mashed potatoes.

Offline izumi3457

  • Newbie
  • *
  • Posts: 2
Re: Manual
« Reply #13 on: May 04, 2011, 01:55:44 PM »
how do i take the girls that are in my dungeon and put them in my brothel
« Last Edit: May 04, 2011, 02:00:16 PM by izumi3457 »

Offline GonDra

  • Full Member
  • ***
  • Posts: 154
Re: Manual
« Reply #14 on: May 04, 2011, 02: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.