Author Topic: General Discussion  (Read 3821600 times)

0 Members and 33 Guests are viewing this topic.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #6570 on: January 04, 2016, 01:44:08 PM »
I'll do this one myself, it's done in the assignment screen but it's a mess at the moment.
Like what we're doing?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #6571 on: January 04, 2016, 08:16:30 PM »
Lmao. I think that spells objects are messed up on reload. Hard to believe I am still making this kind of rookie mistakes... Prolly got that from trying to improve the Jake's Be structure.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #6572 on: January 05, 2016, 05:21:56 AM »
So, does simpy allow clients to visit the same place over and over? Like, drink at bar, visit a whore, watch some striptease, then visit a whore again, then drink at bar again?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #6573 on: January 05, 2016, 05:55:50 AM »
So, does simpy allow clients to visit the same place over and over? Like, drink at bar, visit a whore, watch some striptease, then visit a whore again, then drink at bar again?

Yes, that is not setup to work like that atm, I wanted to allow that with a decent manager running the building to keep the client on a roll but the system is setup to handle that. Right now clients should try to plainly visit every business once.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #6574 on: January 05, 2016, 06:46:54 AM »
According to your old design every job has dice checks that can increase fame and reputation. If we have many clients visiting many places every day, those checks will work too often, quickly increasing building stats.
It should be changed somehow.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #6575 on: January 05, 2016, 07:30:20 AM »
Yeah, I know, there is a process managing the client, we'll do it their once based off some flag set to the client.flags.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #6576 on: January 05, 2016, 06:30:47 PM »
I thought about adding bonuses and penalties (and lines for them) to usual jobs checks based on dice and some traits, like in wm ex.
Do you have plans to add traits based preferences for other existing atm jobs, like the whore job has?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #6577 on: January 05, 2016, 08:13:56 PM »
I thought about adding bonuses and penalties (and lines for them) to usual jobs checks based on dice and some traits, like in wm ex.
Do you have plans to add traits based preferences for other existing atm jobs, like the whore job has?

Sure why not :)

Our system is a bit counter intuitive at the moment, due to SimPy taking care of so many things, it's hard to say what should be handled in it's processes and what in jobs. Perfectly we should really create a log object when the client is entering the building and work with that but it's not how the system was built previously, passing everything around is getting tedious :(

We'll prolly refactor everything at some point in the future.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #6578 on: January 06, 2016, 04:03:42 AM »
One thing that bothers me is how jobs checks are static. You tried to code something about skills comparison in strip job, but it was a pretty weird algorithm.

I mean, different customers have different expectations. Someone is ok with low skill, others would like to see a higher skill level. I suppose either they should have random skill level expectations, or it should be a part of customers own social levels.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #6579 on: January 06, 2016, 04:16:07 AM »
it should be a part of customers own social levels.

This, prolly the only way it'll work well.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #6580 on: January 06, 2016, 08:40:06 AM »
Alright, so the general jobs structure:
- we check which available jobs the character agrees to do, and show only them at the assignment screen.
- traits and some stats may affect the whole turn, and if they do, we show a line about it like in wm ex (it was one of my favorite parts  :) ). I mean stuff when for example nymphomaniac trait with dice(50) gives a small bonus for whore job, like less vitality per act. Or adventurer gives small penalty to cleaning skill for cleaning job. It should be checked only once in the beginning of the turn, and work the whole turn for all checks during it.
- we check general stat/skill level, then check how stratifying they were for every customer based on customers expectations.
- in the very end, after all skills/stats checks, we calculate once fame and reputation changes.

That should be coded by you before I will be able to write actual lines and checks  :)

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #6581 on: January 06, 2016, 10:18:53 AM »
Alright, so the general jobs structure:
- we check which available jobs the character agrees to do, and show only them at the assignment screen.

Fair enough.

- traits and some stats may affect the whole turn, and if they do, we show a line about it like in wm ex (it was one of my favorite parts  :) ). I mean stuff when for example nymphomaniac trait with dice(50) gives a small bonus for whore job, like less vitality per act. Or adventurer gives small penalty to cleaning skill for cleaning job. It should be checked only once in the beginning of the turn, and work the whole turn for all checks during it.

"Whole turn" is what? A single job execution?

- we check general stat/skill level, then check how stratifying they were for every customer based on customers expectations.

I am not sure it's a good idea to handle multi-client jobs on per-client basis. We should do that for "private" jobs, no questions there, for Jobs like Stripclub it may not bean overkill, at least at first.

- in the very end, after all skills/stats checks, we calculate once fame and reputation changes.

Maybe...

That should be coded by you before I will be able to write actual lines and checks  :)

Yeah... ok. I wrote a bit about this before but prolly forgot to post it somehow  ::)

====>>
SimPy is a simulation module that works with a concept of "processes" and sometimes resources. We are mainly using it for processes and automation that it allows in that area. It currently works more or less like this:

Clients list is stored at the moment, save files are larger but Next Day ("ND") is faster this way. If new clients are needed, they are generated at the very start of the ND on per building basis. Buildings have outside and inside space and can be expanded. One building can have a lot of different businesses. Buildings do not communicate with one another (yet), businesses can if so required.

So, what happens is this:

- ND calculations start!
- We iterate over the buildings one by one starting a new SimPy processes.
- Each ND turn is split in 100 logical units of "time".
- We start the MAIN process which will branch out into many dozen (possible hundreds or even thousands processes).

MAIN Process *(actually there are a couple of those but they run is succession without any interruptions are are just split for simpler code):

1) It will throw away all businesses that are not ready for work or are not workable (like living space for example).
2) It will launch a process for all businesses, some businesses will require client. other will not, they will be maintained until closing time (100) or they cannot be worked anymore.
3) After that is done, the MAIN process remains active and generates a stream of clients, right now it is using a fairly plain progression I came up with in a drunk state but in the future I want there to be a "rush hour (time interval)" for some businesses.
4) Several clients can come into the building at the same time.
5) MAIN Process is kept alive until timestamp of 100, unless there are no more businesses that can be active.
6) Each client becomes a process holding the client object.

===>> So now we have Businesses and Client processes running.

CLIENT Process:

1) Decides which business to visit, right now just picks one by one at random until none remain.
2) Checks if there are Resources available and possibly waits for them to become available.
3) Once Business is chosen, may negotiate some things (like checking for a worker with matching traits in Brothel).
4) Starts a new JOB Process (or Business Client Control Process "BCC") that handles the time client spends in a particular business.
5) After JOB process is finished for whatever reason, control is returned here, this will terminate when the client decided to leave.
6) Sends workers to in "public businesses" but it is not supposed to do that, I'll refactor it soon.

===>>
BUSINESS Process:

- This one is a bit tricky because I will prolly merge it Worker Control process. It doesn't do much except reporting to log every now and again and end clients turn which they should prolly be done in Business Client Control process.

===>>
BCC Process:

1) This one is for businesses like Club.
2) Settles cash payments.
3) Adds dirt.
4) Waits until client is ready to leave.

===>>
WORKER Process:

- Also only for the "public" businesses.
1) Handles tips
2) Takes off workers AP
3) Runs the JOB class to create the summary report.

===>>
JOB Process:

1) Mainly this just waits for the client to be done with the whatever he/she wants. This can be prolonged (like in the strip club if the client keeps getting the girls with decent traits/stats).
2) Sometimes this runs the Job CLASS! This what you (Dark) is usually working on. It logs in the final report, data from Processes is passed their through flags of workers and clients (which is not a very good design as I've mentioned earlier).
3) Sometimes this is also where the client pays for the services provided (or all the time, I don't remember atm).
4) There are some other checks here depending on business.


While it's working reasonably well, I am still trying to get the code straight and to split the processes in a logical chain that makes sense. This post was a nice exercise cause I often forget how this stuff works at any particular moment myself because I rewrite it all the time (as it should be) and will keep doing so until code makes sense and is easy to work with/understand/follow it's logic and design.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #6582 on: January 06, 2016, 11:10:07 AM »
"Whole turn" is what? A single job execution?
I mean we don't check it for every customer separately, if there are many customers.

Like, if the character has a cold, we don't check it constantly for every new customer. We check it once, in the very beginning of the turn before customers even appear, with dice. And if the check and dice are successful, we for example take a bit more vitality per customer because the character doesn't feel well.
Or for instance nymphomaniac trait might give a small sex skill bonus for whore job with proper dice, and we'll report about it at the next day screen.

While traits already affect skills, such small events will make the game more interesting.

Of course we can check this stuff per customer. But I'd prefer to do it per turn, otherwise there will be way too many events.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #6583 on: January 06, 2016, 01:27:24 PM »
Oki, I'll try to wrap up spells this weekend (at least the graphics) and switch to jobs again. Too tired to think atm.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #6584 on: January 06, 2016, 01:47:09 PM »
Meanwhile I'm finalizing some packs made by Janmaba half a year ago. I postponed it until new year holidays, since it's a lot of work.

I tried to soften that darkness spell we talked about, but it doesn't look very good either way. I think you should do it full screen.