Author Topic: WhoreMaster: Abby's Crossing  (Read 139865 times)

0 Members and 1 Guest are viewing this topic.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: I've been messing around with pygame
« Reply #45 on: November 06, 2013, 08:29:09 AM »
@girl descriptions
You could make the poster a bit broader / bigger and go with short descriptions like
Sally, fiery redhead
Justine,  brunette cutie
Lilly, blonde bombshell

Not possible with default WM resources I am afraid...

@Xela
How were you able the read DocCloxs code?

I wasn't, Doc offered to post the code, I stated that while I'd love to read it, it's not likely to be useful to my PyTFall design.
Like what we're doing?

Offline rudistoned

  • Full Member
  • ***
  • Posts: 229
Re: I've been messing around with pygame
« Reply #46 on: November 06, 2013, 08:45:12 AM »
Thanks for the clarification.

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: I've been messing around with pygame
« Reply #47 on: November 06, 2013, 04:04:34 PM »
OK, let's see if this attaches ok.

One slave-poster script, with resources and stand-alone test mode. Would have done this earlier, but we had a power cut this evening.
« Last Edit: November 06, 2013, 04:09:03 PM by DocClox »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: I've been messing around with pygame
« Reply #48 on: November 06, 2013, 05:08:27 PM »
with resources and stand-alone test mode

Should be noted that Qt and Python are required to run this.
Like what we're doing?

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: I've been messing around with pygame
« Reply #49 on: November 06, 2013, 05:38:11 PM »
Should be noted that Qt and Python are required to run this.

... and furthermore, it only makes a poster table like the one already screenshotted - so it's of little interest apart from python types.

Just in case that wasn't clear :)

Offline rudistoned

  • Full Member
  • ***
  • Posts: 229
Re: I've been messing around with pygame
« Reply #50 on: November 06, 2013, 06:24:22 PM »
Thanks for sharing, interesting code :)

I have confirmed that PySide and PyQt4 are quite similar. Just replacing the import statement let me run it :)

Here is a version using layout management. For this particular widget you don't gain anything because the poster demands a fixed size anyway. It could probably be changed though by splitting the poster into a fixed-size header, fixed-size footer and resizable middle part.


Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: I've been messing around with pygame
« Reply #51 on: November 07, 2013, 01:57:36 AM »
Cool. I'll have a look at that tonight. :)

What I'd like to achieve with layouts is have a game window that can be maximised or just resized without looking rubbish. Currently I'm working on a fixed size 1024x768 window, but I'd like it all to scale gracefully.

That said, getting a game is more important than making it all resize properly :)

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: I've been messing around with pygame
« Reply #52 on: November 07, 2013, 02:09:11 AM »
What I'd like to achieve with layouts is have a game window that can be maximised or just resized without looking rubbish. Currently I'm working on a fixed size 1024x768 window, but I'd like it all to scale gracefully.

That said, getting a game is more important than making it all resize properly :)

Ren'Py would do that for you without to much fuss  ::)

I am doing some screen realignments myself right now, cannot believe how awful my code was 8 month ago, prolly will not believe how awful it is right now in another 8 month...
Like what we're doing?

Offline rudistoned

  • Full Member
  • ***
  • Posts: 229
Re: I've been messing around with pygame
« Reply #53 on: November 07, 2013, 02:41:44 AM »
Ren'Py would do that for you without to much fuss  ::)
So does Qt, if you tell it to  ::)
Except if Ren'Py does it by reading your mind and writing the code for you, that would indeed be better  :D

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: I've been messing around with pygame
« Reply #54 on: November 09, 2013, 04:57:12 PM »
Not much done on account of work and all that, but I got some time in today.

Spent a lot of it splitting the code into packages and modules so it'll be easier to maintain in the long run. I did get time to put the slave market screen together though. This is (mostly) in-game and working



Sorry about the camel. I just thought it would be more fun than a blank frame if there were no girls available :D

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: I've been messing around with pygame
« Reply #55 on: November 13, 2013, 12:53:18 PM »
OK, so no camel fans in the audience, huh? ;)

Not a lot to show at the moment, since I've been working on the girl loading and slave market logic.  If anyone's interested i could post some code ('m quite pleased with the way some of this is turning out) but no new pics for a while.

I'm still employed (yayyy) and almost having fun. Clearly something, somewhere has gone horribly wrong :)

Offline hewhocumsbynight

  • Hero Member
  • *****
  • Posts: 683
  • All Hail the Crimson King!
Re: I've been messing around with pygame
« Reply #56 on: November 13, 2013, 01:09:08 PM »
OK, so no camel fans in the audience, huh? ;)

Not a lot to show at the moment, since I've been working on the girl loading and slave market logic.  If anyone's interested i could post some code ('m quite pleased with the way some of this is turning out) but no new pics for a while.

I'm still employed (yayyy) and almost having fun. Clearly something, somewhere has gone horribly wrong :)

Horribly wrong! Congratulations regardless. 

I'd be interested in seeing the code you've spawned.  Postage, please?
My MEGA folder can be found at:  https://mega.co.nz/#F!EYhAgTyI!keiMX47NrnGOEozwNb2Vfg

Torrent link of my version, effective September, 2016:  magnet:?xt=urn:btih:4606F11A1C216337D7F3DFD6716307F48CFB996A&dn=WhoreMaster.06.02.29&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: I've been messing around with pygame
« Reply #57 on: November 13, 2013, 02:46:15 PM »
Horribly wrong! Congratulations regardless. 

Thank you! We may not have to send the kittens out to sweep chimneys this Christmas
after all :)

I'd be interested in seeing the code you've spawned.  Postage, please?

OK, you talked me into it :D

The motivation for this is best summed up in a comment from the slave_market data module

Code: [Select]
#
# this is the data underlying a slave market
#
# the intention is to have more than one,
# although the auction block in the Souk is the
# only one the initially accessible
#
# different markets are going to have different
# characteristics. The souk has mainly low quality girls
# and refreshes every 4 to 7 days. it never holds more
# than six girls and one or two are sold daily,
# starting with those of highest quality
#
# The J.Pettow and Son are toymakers in the Air Quarter
# who occasionally tinker with gynoids. Sometimes there are
# working models for sale, one, sometimes two,
# never more than three and frequently zero.
# Their stock has a low chance of changing daily.
# Only robot girls are traded at the Toyshop.
#
# Similarly, the Water Quarter has a house of Courtesans
# all highly trained, and capable healers and entertainers.
# None are for sale, although if the PC is of good repute
# and the girl is willing, delicate negotiations may be
# conducted. Similarly, the  fire quarter will sell
# gladiators and janissaries, while the Earth Quarter
# houses the richest slave traders (with the highest chance
# of finding exotics or unique girls) and the Warrens
# Bazaar where the cities poorest are often sold into slavery
#

So I want highly configurable slave markets with specialised stock and some fine control over what goes into them. To that end, I've decided that markets are made up of "slots" where each slot can hold a girl. So a market with three slots can hold no more than
three girls at a time

Code: [Select]
#
# Each market has a number of "slots" that can contain a girl
# Each slot has
#
#       * a chance to contain a unique girl
#       * failing that a chance for a generic.
#       * a chance that a girl will remain unchanged on refresh
#       * a scaling factor applied to all a girl's stats
#       * a list of required traits (eg "robot girls only")
#       * a list of excluded traits (eg "no demons or undead")
#
class Slot(object):
        def __init__(self, *args, **kw):
                object.__init__(self)
#
#               we'll default this to the souk
#               so we have a slot with no chance at all of a unique
#               70% chance of a generic, and an 80% chance that
#               a girl already in the slot will remain rather than
#               be removed and possibly replaced
#
                self.unique     = kw.get("unique",  0.0)
                self.generic    = kw.get("generic", 0.7)
                self.persist    = kw.get("persist", 0.8)
#
#               I'd like a bit of variability in the quality.
#               this is a tad redundant, since the random girls all
#               (obviously) have random elements. Still, it'd be
#               nice to have a bit of range of quality beyond that/
#               so scaling takes a function. In this case a
#               lambda expression that averages out at about .4
#               but trails away in a normal distribution so that
#               in rare case the scaling can go as high as 1
#               or drop as low as zero.
#
#               (values <= 0 are capped at 0.05. Values > 1 can
#               stand, but the resulting stats still cap at 100.
#               so occasionally some higher than average girls
#               will come through)
#
                func = lambda : .2 + random.normalvariate(1,1) / 5
                self.scaling = kw.get("scaling", func)
#
#               required and excluded traits
#
                self.required = kw.get("required", [])
                self.excluded = kw.get("excluded", [])
#
#               last but not least, a variable to hold the
#               girl instance in question
#
                self.girl = None

So, we can check first to see if the girl remains after the slot is refreshed, and then we can check to see if a unique girl is there, and if that fails we look for a generic one. We can set quality modifiers to change the likely quality of the girls,  and we can require or exclude any number of traits. So we can exclude demon girls from the souk, or make sure that only robots appear in the Toyshop.

And of course we can configure these on a slot by slot basis...

Code: [Select]
class SlaveMarket_Souk(SlaveMarketBase):
        def __init__(self, *args, **kw):
                SlaveMarketBase.__init__(self, *args, **kw)
#
#               array of slots to hold the girls
#
                self.slots = [
#
#                       first slot - 1 in 20 chance of a unique
#                       100% chance of generic if no unique
#                       100% scaling - this one is in good shape
#
                        self.mk_slot(   unique  = 0.05,
                                        generic = 1.0,
                                        scaling = 1.0,
                        ),
#
#                       second slot - 1% chance of unique
#                       100% generic, 70% scaling
#
                        self.mk_slot(   unique  = 0.01,
                                        generic = 1.0,
                                        scaling = 0.7,
                        ),
#
#                       remaining slots, no chance of unique
#                       diminishing chance of generics
#
                        self.mk_slot(   generic = 0.8),
                        self.mk_slot(   generic = 0.5),
                        self.mk_slot(   generic = 0.3,
                                        scaling = 0.2
                        ),
                        self.mk_slot(   generic = 0.1,
                                        scaling = 0.05
                        ),
                ]
                self.refresh()

#
#       little func to make sure the exclusions get passed
#       to all slots
#
        def mk_slot(self, **kw):
                xs = [
                        "Demon", "Gynoid", "Undead",
                        "Not Human", "Construct",
                        "No Souk"
                ]
                return Slot(excluded=xs, **kw)


There's some more marginally interesting stuff in the girl manager and how this lot are looked up and filtered, but this post is going on forever and I've posted the essence of it all.

Anyway, that's what I've been up to :)


Offline hewhocumsbynight

  • Hero Member
  • *****
  • Posts: 683
  • All Hail the Crimson King!
Re: I've been messing around with pygame
« Reply #58 on: November 13, 2013, 05:49:59 PM »
Ooh, I like!  I like, very much.  It's an excellent idea!

Only one question:  Would the scaling (bazaar<souk<Earth) apply to and read unique girls in the same fashion as generics, or would we need to make different sets for different markets?
My MEGA folder can be found at:  https://mega.co.nz/#F!EYhAgTyI!keiMX47NrnGOEozwNb2Vfg

Torrent link of my version, effective September, 2016:  magnet:?xt=urn:btih:4606F11A1C216337D7F3DFD6716307F48CFB996A&dn=WhoreMaster.06.02.29&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: I've been messing around with pygame
« Reply #59 on: November 13, 2013, 06:04:25 PM »
Only one question:  Would the scaling (bazaar<souk<Earth) apply to and read unique girls in the same fashion as generics, or would we need to make different sets for different markets?

Well, I'm thinking of implementing the penalties as a stat adjustment that decays over time. So if you buy some nearly dead wretch from the Souk and nurse her back to health, you may end up with an excellent girl for comparatively little money. (And one with a loyalty boost if there's any justice in the world. Which there may not be, of course :)) Mind, the souk prices are going to be high, reflecting this. But probably not so high that you can't buy 'em broken down, heal them up and make a profit selling them healthy. So in that case, the penalties would apply to random and unique equally.

For girls that have a scaling factor > 1, I'd probably make that a permanent boost to the stats, reflecting hours of work by some trainer before you get to see her. I probably won't let scaling factors go too far over 1 anyway, maybe 1.5 max, and I'd still cap stats at 100. So it shouldn't be too unbalancing.

Again, this can probably be applied  to both unique and generic without problems :)