devolution

Author Topic: General Discussion  (Read 3821623 times)

0 Members and 24 Guests are viewing this topic.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #6345 on: December 12, 2015, 01:42:04 PM »
That's what I mean. I figured simpy also makes checks for multiple events simpler.

No, not that.

As I've said before, custom class for logic might be required if your code gets too long/complex, but that is not SimPy related.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #6346 on: December 12, 2015, 02:01:50 PM »
Ohhkey, every time I try to get rid of the system when you for some reason pass skill for further checks as a string, I get various errors related to "game/library/businesses&buildings/classes - core buildings.rpy", line 553, in run_nd
    self.env.run(until=100). I have no choice but to ignore lines like self.skill = "vaginal" and add a new variable skill = self.worker.get_skill("vaginal"), and then pass it to checks instead of self.skill.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #6347 on: December 12, 2015, 02:10:18 PM »
I have no choice but to ignore lines like self.skill = "vaginal" and add a new variable skill = self.worker.get_skill("vaginal"), and then pass it to checks instead of self.skill.

This is the only correct way of doing it. self.skill is not a good option under new design, it's just something that was there (prolly) from the old code. I am not sure why it is causing you trouble, but it is not even preferable at this point so feel free to get rid of it.
Like what we're doing?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #6348 on: December 12, 2015, 02:25:23 PM »
Oki... I am gonna call it a night. Tomorrow I'll try to improve sprite positioning in BE a little bit and maybe look into adding SimPy to the mix or adding that "Area Attack" we talked about.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #6349 on: December 12, 2015, 02:40:40 PM »
When I removed all references to old system, I got
Quote
  File "game/library/screens/pyt - screens - nextday.rpy", line 41, in script
    $ building.run_nd()
  File "game/library/screens/pyt - screens - nextday.rpy", line 41, in <module>
    $ building.run_nd()
  File "game/library/businesses&buildings/classes - core buildings.rpy", line 553, in run_nd
    self.env.run(until=100)
Exception: (AttributeError("'WhoreJob' object has no attribute 'skill'",), AttributeError("'WhoreJob' object has no attribute 'skill'",))
We have tones of "lower" checks in various places, that's not something I can remove by myself. I'll create an issue for that.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #6350 on: December 12, 2015, 03:05:36 PM »
When I removed all references to old system, I gotWe have tones of "lower" checks in various places, that's not something I can remove by myself. I'll create an issue for that.

Quote
However, deleting any old " self.skill =" lines results in errors during next day.

I don't believe you ;)

Without you pushing the code, I cannot tell where but the error plainly states that you have not deleted all self.skill lines inside of the class. You either need to push the broken code or do a search just over the WhoreJob class for "self.skill", whatever remains is the issue, if nothing remains in some very unlikely event, I need to see your broken code before I can fix it.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #6351 on: December 12, 2015, 03:28:18 PM »
Damn, it's because I copypasted wrong traceback  :D
Quote
While running game code:
  File "game/library/screens/pyt - screens - nextday.rpy", line 41, in script
    $ building.run_nd()
  File "game/library/screens/pyt - screens - nextday.rpy", line 41, in <module>
    $ building.run_nd()
  File "game/library/businesses&buildings/classes - core buildings.rpy", line 553, in run_nd
    self.env.run(until=100)
Exception: (AttributeError("'float' object has no attribute 'lower'",), AttributeError("'float' object has no attribute 'lower'",))
I pushed it. Have fun with debugging lower stuff  8)
« Last Edit: December 12, 2015, 03:32:39 PM by DarkTl »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #6352 on: December 12, 2015, 05:55:25 PM »
I pushed it. Have fun with debugging lower stuff  8)

It's usually clear to me since I am the once who wrote the code :) SimPy has it's own error reporting system that is used for logic and not just to report errors... that's why we cannot get the exact line where the code fails.

This:

Code: [Select]
self.loggs(skill, sexmod)
Since you are binding skill to a float now, logging a change (increase for doing the job) does expect a specification of which skill to increase. skill here needs to be something like "sex" or something align those lines. I'll just add "sex" there for now.
Like what we're doing?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #6353 on: December 13, 2015, 09:53:20 AM »
You generally don't have to copy-paste this:

Code: [Select]
+                        self.loggs("sex", sexmod1)
+                        self.loggs("oral", sexmod2)
+                        self.loggs("anal", sexmod3)

over and over again. You should be able to do something like:

Code: [Select]
if "sexmod" in locals():
    self.loggs("sex", sexmod)
if "oralmod" in locals():
    self.loggs("oral", oralmod)
if "analmod" in locals():
    self.loggs("anal", analmod)

at the end of the method (and naming vars appropriately). It's better and clearer code, you don't have to change the method but on refactoring and when handling other stuff this is something to keep in mind.

===
I am going to take a look at BE today, I wanna see what can be done there with SimPy and how difficult it would be to restructure the code to run logically (without graphics).
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #6354 on: December 13, 2015, 11:50:35 AM »
What's the difference between bartenders and waitresses jobs? We discussed its logic once a long time ago, but I don't remember that conversation well enough.
I mean, they both distribute food and drinks, so there should be a major difference in mechanics.

Also, I see you still use both reputation and fame in some new jobs like bartender. Can you clarify the difference between them? I recall you even wanted to remove one of them because of their meaningless for the game logic.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #6355 on: December 13, 2015, 12:06:12 PM »
What's the difference between bartenders and waitresses jobs? We discussed its logic once a long time ago, but I don't remember that conversation well enough.
I mean, they both distribute food and drinks, so there should be a major difference in mechanics.

I don't think those are ready yet but logic for those will be more or less the same. I guess that for bartender charisma is more important and for waiter refinement. Also different skill if we have them. If we ever go with more complex business management, restaurant would also have more jobs (like cook) and not just the waiters. Right now only club and bar are active and they momentarily work off the same logic. I'll write more as time permits overwriting default methods and making them more unique, jobs are obviously different.

Also, I see you still use both reputation and fame in some new jobs like bartender. Can you clarify the difference between them? I recall you even wanted to remove one of them because of their meaningless for the game logic.

For building or workers? We wanted to remove those for workers because it would be weird if those remained when changing jobs... so it would either have to be tacked on per job basic (in which case it is prolly smarter to plainly count days a worker spent doing any specific job and use that as modifiers) or be removed all together.

For buildings, I've started a detailed thread for discussing that but didn't get much feedback, for now I haven't even decided if each business within a building should track frame/rep or just the building itself... but in my design, difference is this:

Fame: Plainly attracts more costumers.
Rep: Attacks better customers + in the future will help to create returning customers.

===
I'd like to keep the design as simple as possible, without a lot of vars that would make it harder to keep track of. It's not a sound design to make sh!t needlessly complex.
Like what we're doing?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #6356 on: December 13, 2015, 12:59:07 PM »
===
I'd like to keep the design as simple as possible, without a lot of vars that would make it harder to keep track of. It's not a sound design to make sh!t needlessly complex.

BE can now be execute logically (without GFX/SFX)!

I'll try to do something else but after a couple of beers I may not be good for anything except adding if checks :D
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #6357 on: December 13, 2015, 01:39:13 PM »
I don't think those are ready yet but logic for those will be more or less the same. I guess that for bartender charisma is more important and for waiter refinement. Also different skill if we have them.
In theory, one bartender can serve much more customers than one waitress, but multiple waitresses provide better service. So it should be more profitable to hire bartenders in the beginning, and then gradually add waitresses as you get more demanding customers (but without firing bartenders, since they will stay useful).

For building or workers? We wanted to remove those for workers because it would be weird if those remained when changing jobs...
Dunno, I'm looking at them in classes-jobs.rpy. Since you use them, I thought maybe I should too.

For buildings, I've started a detailed thread for discussing that but didn't get much feedback, for now I haven't even decided if each business within a building should track frame/rep or just the building itself... but in my design, difference is this

Fame: Plainly attracts more costumers.
Rep: Attacks better customers + in the future will help to create returning customers.
Makes sense. Stuff like brawling will decrease reputation, but not necessary fame.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #6358 on: December 13, 2015, 01:48:14 PM »
In theory, one bartender can serve much more customers than one waitress, but multiple waitresses provide better service. So it should be more profitable to hire bartenders in the beginning, and then gradually add waitresses as you get more demanding customers (but without firing bartenders, since they will stay useful).

They work in different businesses so they don't interlap (at least not right now).

Dunno, I'm looking at them in classes-jobs.rpy. Since you use them, I thought maybe I should too.

I am not sure, I'd skip that for now. loggs logs for workers, logloc logs for building, we need the latter no matter what... regardless what form the system will take.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #6359 on: December 13, 2015, 02:03:24 PM »
Yeah, there are loggs for fame and reputation everywhere. Maybe I just will delete them all?