Pink Petal Games

Feedback => New Features => Topic started by: pnakasone on April 25, 2010, 06:42:41 PM

Title: Heath Care
Post by: pnakasone on April 25, 2010, 06:42:41 PM
Being able to hire a doctor for the brothels would be good. Doctor would help keep the girls healthy. Pulling the girls from service when health gets to low and quicker recovery of health.
Title: Re: Heath Care
Post by: Mehzerz on April 25, 2010, 07:04:14 PM
Doesn't the matron do that already?
Title: Re: Heath Care
Post by: coldheartzero on May 18, 2010, 06:53:46 PM
Matron does already do that, but maybe a skill that would make a matron better at her job. Not all your typical whores are cut out for that kind of responsibility, so maybe you'd want to find one that has a medical skill or something to that extent.

Or maybe a whore without the skill can still be a matron, but one with the skill means she can keep the girls working longer before they have to be taken off duty.  (skill being first aid, doctor, whatever, could also be used during catacombs exploration to keep your girl up longer, exploring deeper and finding more loot)
Title: Re: Heath Care
Post by: Sigfried666 on May 18, 2010, 07:37:51 PM
Biggest problem was my Matron getting tired. Then I put a "tough" gitl on the role, and she never got tired of her job again.

Still, having girls better suited for the role seems a real nice idea...
Title: Re: Heath Care
Post by: Shinteo on May 19, 2010, 12:05:55 PM
Is it possible to make traits editable? I understand that some(most) of it is hard code, but is it possible to pull them out into an editable format? If so, then we can add a trait for medical to certain girls who should have them, such as Tsunade from Naruto, who is a medic-nin and damn good at it.
Title: Re: Heath Care
Post by: DocClox on May 19, 2010, 12:16:29 PM
Is it possible to make traits editable? I understand that some(most) of it is hard code, but is it possible to pull them out into an editable format? If so, then we can add a trait for medical to certain girls who should have them, such as Tsunade from Naruto, who is a medic-nin and damn good at it.

Well, they're already editable to an extent - look in ./Resources/Data/CoreTraits.traits

But if you want to add code to them, that's harder. I can do an XML format trait file, and let you define Lua handlers for the traits, so you could have traits that acted as more than mere descriptions. But there's still the problem of what trait-events we would need define, and when they were fired. That's the sticking point, really.

Also, I'd need to write the XML trait file and integrate the lua scripting code into the trunk. But that's no good without a clear idea of when the code gets called.
Title: Re: Heath Care
Post by: delta224 on May 19, 2010, 03:12:27 PM
From what I remember all that is done is, in certain parts, their is a trait exist check and works from their depending on the situation.
Title: Re: Heath Care
Post by: DocClox on May 19, 2010, 03:23:02 PM
Yeah, yeah. What I mean is: if we're going to add a generalised user definable trait mechanism, where should it be called and how? As opposed to adding a special case for a medic trait, in which case we might as well hard code the trait

I suppose we could a trait check to each girl at the end of the turn, and it would then be up to the trait to check and see it needed to take action. So maybe Tsunade's medic trait would first need to check to see if she was busy, and then to see if there was anyone who needed medical attention in the same place.

Of course, with a hundred girls, all loading lua to loop over all the other girls every frame ... that's quite a performance hit. So ideally I'd like something a little less general, or at least easier to filter.
Title: Re: Heath Care
Post by: delta224 on May 19, 2010, 03:35:16 PM
Don't worry about the performance hit. 

Title: Re: Heath Care
Post by: DocClox on May 19, 2010, 04:22:20 PM
Also "Premature optimization is the root of all evil" -- Don Knuth

Fair enough, I'll give a bit more thought to user defined traits.

[edit]

OK, I had a bit think. We could do something like this:

Code: [Select]
<traits>
        <trait name="Pretty">
<!--
 !              let's look at some simple cases:
 !
 !              events define lua functions that get called when certain things
 !              happen.
 !
 !              the "on_gain" event is called when a girl gains a trait.
 !              so if an item gives a girl the "Pretty" trait, the following
 !              function would be run, with the girl passed as a parameter
 !-->
                <event name=on_gain>
                        function(girl)
                                girl.change_stat("beauty", 5)
                        end
                </event>
<!--
 !              similarly we can define this to happen if she loses the trait
 !-->
                <event name=on_loss>
                        function(girl)
                                girl.change_stat("beauty", -5)
                        end
                </event>
        </trait>
<!--
 !      now let's try and design a "Medic" trait
 !-->
        <trait name="Medic">
<!--
 !              let's have Medic boost confidence a little bit
 !              The stat change code is probably going to be commonplace
 !              enough to be worth automating:
 !-->
                <stat name="confidence" change="5" />
<!--
 !              now then, check to see if she can help anyone
 !-->
                <event name=on_turn_end>
                        function(girl)
                                local i
                                local poorly_girl = nil

                                -- what was she doing this turn?
                                -- if it wasn't either matron duty
                                -- (or else nothing at all)
                                -- then she's probably too busy to be much help

                                local action = girl.current_action
                                if action ~= "free time" and action ~= "matron"
                                then
                                        return
                                end

                                -- OK: is there anyone in her location
                                -- who needs help?

                                local brothel = girl.get_brothel()

                                -- loop over the girls in the brothel
                                -- looking for a sick one. This could be better:
                                -- logically you'd look for the sickest girl
                                -- I'd also want to stop her treating herself
                                --
                                -- but this'll do for our purposes

                                for i = 1, i < brothel.num_girls() do
                                        poorly_girl = brothel.girl_at(i)

                                        if poorly_girl.get_stat("health") < 30
                                        then
                                                break
                                        end
                                end

                                -- if we didn't find one, we're done
                                if poorly_girl == nil then
                                        return
                                end

                                -- otherwise, treatment
                                poorly_girl.change_stat("health", 30)

                                -- medical crises are tiring.
                                girl.change_stat("tiredness", 10)
                        end
                </event>
        </trait>
</traits>

The work there of course, is in writing the girl and brothel objects to make the game data available to the scripts. Specific things are easy enough to do, but in general, there's a hell of a lot of data that needs publishing.

Which was the primary idea behind the clonemaster branch, of course. If we have a game where the game data and game logic lives in XML and Lua by default, then we don't need to keep converting it to and from C format, and the C++ code is just responsible for the graphics and a few O/S integration functions.

Thoughts?
Title: Re: Heath Care
Post by: Shinteo on May 21, 2010, 04:09:10 PM
I think you could run a poll of some sort, and ask people to list down the traits that they think is lacking, and then work to add them in slowly. The girls file can then be updated with the traits as they become avaliable.

For me, I'd like to see these traits added in...

-------------------------------------------------------------------------------

Royality - This girl is part of the royal family.

Tomboy - This girl is boylish and rough, but some people like that.

Angelic     - This girl has divine origins.

Innocent - Has a sweet and innocent look. Some men go for that.

Alien - This girl is not from this world...

Fighter - This girl has had martial arts training. Trained to fight with her fists.

Magic Girl - She gets her ablilty from some item or another.

Noblilty - Part of some noble family. Fun to break...

Emotionless - This girl does not show emotions easily. Never play poker with them.

Modified genes - This girl is subjected to modifications. Strange things might happen to those who play with them...

Soft bones - Good god, the positions this girl can get into...

Cursed - She is affected by a curse of some sort...

Medic - Trained in detecting and curing injuries.

Gunner - Trained in the use and maintaince of firearms (guns as items?)

Swordswoman - Trained in the art of fighting with weapons.

---------------------------------------------------------------------------

Just some of which I can think off-handed. I'm sure there are many more that others can add.

As a complete noob in the art of coding, I'm not sure how hard is it to impliment all of these. Please ignore this post if it can't be done...

 
Title: Re: Heath Care
Post by: Zeus on May 21, 2010, 04:49:23 PM
Tomboy already exist as "Manly"
Fighter exist as "Assassin" "Adventure" 
Magic Girl exist as "Strong Magic"

Title: Re: Heath Care
Post by: Mehzerz on May 22, 2010, 02:28:31 AM
What's wrong with the existing traits? Aren't there enough there to describe a girl pretty easily? Or am I the only one happy with them?
Title: Re: Heath Care
Post by: fires_flair on May 22, 2010, 11:29:09 AM
I am mostly happy with them myself, and they were basically perfect before we got the job update.
personally to me all we need is a leader trait, for girls who will make good matrons or gang workers (would give a slight bonus to the working involved, constitution boost at least),  and one for beast workers (for care and capture). we already have the traits we need for security and catacombs. and charisma and the look traits work for advertising.
Title: Re: Heath Care
Post by: DocClox on May 22, 2010, 11:42:11 AM
What's wrong with the existing traits? Aren't there enough there to describe a girl pretty easily? Or am I the only one happy with them?

Well, I'm more interested in solving the general case than any specific instance. I'm keen to make it possible to roll your own traits, and to move the trait definitions from hard coded C++ into XML and Lua.

Then if in three months time the community decides that "what this game needs is a Tentacle Wrangler" trait, then it is not only possible to create the trait by editing the game's files, but it's also possible to have one that affects the gameplay, and to do it without having to get your hear around C++ Visual Studio, SDL and Uncle Tom Cobbley and all.

That aside, I tend to agree; we have a pretty comprehensive set of traits at the moment.
Title: Re: Heath Care
Post by: Shinteo on May 22, 2010, 11:46:52 AM
Seems it's only just me that finds the current traits very limiting...

Oh well. If the edit traits thing works, then I'll be able to do them on my own, without having to bother anyone else here...
Title: Re: Heath Care
Post by: DocClox on May 23, 2010, 03:16:55 AM
Oh well. If the edit traits thing works, then I'll be able to do them on my own, without having to bother anyone else here...

Aww, don't do that. Just because people are content with the current arrangement, that doesn't mean it can't be greatly improved.  It's just that sometimes we need to see the change in action before we understand.

That said, I'm making no promises about timescales for this.
Title: Re: Heath Care
Post by: Mehzerz on May 23, 2010, 04:04:38 AM
My main concern is when making girls, how would girls work when someone with a bunch of user-created traits releases them to someone with the predefined traits? Would that girl have no traits when downloaded?
I just think... it's better for everyone if the traits are unalterable and predefined from the get go.
Title: Re: Heath Care
Post by: DocClox on May 23, 2010, 05:06:28 AM
My main concern is when making girls, how would girls work when someone with a bunch of user-created traits releases them to someone with the predefined traits? Would that girl have no traits when downloaded?
I just think... it's better for everyone if the traits are unalterable and predefined from the get go.


I think we can make things a bit more fault tolerant than that.
Title: Re: Heath Care
Post by: Zeus on May 23, 2010, 06:28:50 AM
  • So the worst that ever happens is that if you d/l a girl pack, and some of those girls use traits from a trait addon you don't have, you only see the vanilla traits. Which is what would happen if the add-on traits didn't exist in the first place
or you put this Addon within like the .grilx files...
Title: Re: Heath Care
Post by: DocClox on May 23, 2010, 07:13:45 AM
or you put this Addon within like the .grilx files...

You mean zipping  the (say) .traitsx file with the .girlsx file? that would work, certainly. The other option would be to embed trait definitions in the girlsx file itself, or even in the girl definition. But that opens the door to the same trait meaning different things when applied to different girls. Or to the meaning of the trait depending on the order the girl files are loaded in.

But yeah, include a trait file with the girls, and that should be fairly robust.
Title: Re: Heath Care
Post by: dalmedya on May 27, 2010, 04:50:42 AM
Modify the trait editor so that it can merge new trait files into the master file, and pop up a warning if you try to use an existing name?
Ideally there should be some sort of installer for girls so that all this file modification business goes away.
Title: Re: Heath Care
Post by: killjoy57us on July 10, 2010, 04:19:33 PM
This interoperability problem is common among modding communities. The best way (that I know of) around it is corroboration between modders. If two girl makers have worked out the bugs between each others girls and core traits, then the download lists will say so. If, say, a mod becomes so popular that almost everyone uses it, then the best modders will work around that one if they want to get their stufff out there. The human system kinda works out the kinks itself.

As far as mechanics go, I'm gonna keep my mouth shut and leave that to people whose business it is to figure that out; I'm programming retarded.
Title: Re: Heath Care
Post by: Lorde on July 10, 2010, 04:34:28 PM
This is one of the reasons why I did expansion packs for girls. It's a simple way to add more images and you don't get swamped with multiple girlsx files of the same girls. Also sidesteps the dick move of uploading someone else's work.

Though I agree that girl creators are gonna eventually have a sit down and figure out what to do going forward. That, I believe, can be held off until there is some tweeking done with the difficulty. As it stands now, there really isn't much of a difference between a girl with all 0's and all 100's when all is said and done and you have around 20 girls to begin with. (Items can increase a girls stats anyway you see fit from the word go and the dungeon works well with high rebellion girls.)