devolution

Author Topic: Heath Care  (Read 10480 times)

0 Members and 1 Guest are viewing this topic.

Offline pnakasone

  • Newbie
  • *
  • Posts: 21
Heath Care
« 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.

Offline Mehzerz

  • Hero Member
  • *****
  • Posts: 564
  • Rockin' the after life after party
Re: Heath Care
« Reply #1 on: April 25, 2010, 07:04:14 PM »
Doesn't the matron do that already?
Starter girls image additions progress:
26 girls, 18 to go

Offline coldheartzero

  • Newbie
  • *
  • Posts: 20
Re: Heath Care
« Reply #2 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)

Offline Sigfried666

  • Jr. Member
  • **
  • Posts: 82
Re: Heath Care
« Reply #3 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...

Offline Shinteo

  • Newbie
  • *
  • Posts: 26
Re: Heath Care
« Reply #4 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.

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: Heath Care
« Reply #5 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.

Offline delta224

  • Dev Team
  • *****
  • Posts: 577
Re: Heath Care
« Reply #6 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.

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: Heath Care
« Reply #7 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.

Offline delta224

  • Dev Team
  • *****
  • Posts: 577
Re: Heath Care
« Reply #8 on: May 19, 2010, 03:35:16 PM »
Don't worry about the performance hit. 

  • “The First Rule of Program Optimization: Don't do it. The Second  Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson copied from Wikipedia

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: Heath Care
« Reply #9 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?
« Last Edit: May 20, 2010, 06:38:04 AM by DocClox »

Offline Shinteo

  • Newbie
  • *
  • Posts: 26
Re: Heath Care
« Reply #10 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...

 
« Last Edit: May 21, 2010, 04:15:12 PM by Shinteo »

Offline Zeus

  • Full Member
  • ***
  • Posts: 108
Re: Heath Care
« Reply #11 on: May 21, 2010, 04:49:23 PM »
Tomboy already exist as "Manly"
Fighter exist as "Assassin" "Adventure" 
Magic Girl exist as "Strong Magic"

why fear 6 7? 7 8 9! (just say it loud and you understand ... mh... jokes you have to explain are crap... Sorry ^^)

Offline Mehzerz

  • Hero Member
  • *****
  • Posts: 564
  • Rockin' the after life after party
Re: Heath Care
« Reply #12 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?
Starter girls image additions progress:
26 girls, 18 to go

Offline fires_flair

  • Sr. Member
  • ****
  • Posts: 411
Re: Heath Care
« Reply #13 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.

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: Heath Care
« Reply #14 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.