devolution

Author Topic: General Discussion  (Read 3812884 times)

0 Members and 3 Guests are viewing this topic.

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #7380 on: May 06, 2016, 12:35:49 AM »
But we have multiple managers.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #7381 on: May 06, 2016, 12:40:05 AM »
Just the one for now, I am not 100% sure it's worth to add more for beta.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #7382 on: May 06, 2016, 03:17:01 AM »
When we do stuff like
Quote
        $ tags = ({"tags": ["beach", "swimsuit"], "exclude": ["sex", "sleeping", "angry", "in pain", "sad", "scared", "bathing"]}, {"tags": ["simple bg", "swimsuit"], "exclude": ["sex", "sleeping", "angry", "in pain", "sad", "scared", "bathing"]}, {"tags": ["no bg", "swimsuit"], "exclude": ["sex", "sleeping", "angry", "in pain", "sad", "scared", "bathing"]})
to send it into a function, isn't there a way to make it work like
Quote
excluded = ["sex", "sleeping", "angry", "in pain", "sad", "scared", "bathing"]
and
Quote
        $ tags = ({"tags": ["beach", "swimsuit"], "exclude": excluded}, {"tags": ["simple bg", "swimsuit"], "exclude": excluded}, {"tags": ["no bg", "swimsuit"], "exclude": excluded})

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #7383 on: May 06, 2016, 03:27:37 AM »
Sure, that will work.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #7384 on: May 06, 2016, 03:34:13 AM »
Well, that actually gave me a syntax error, so I wonder what's wrong  :)

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #7385 on: May 06, 2016, 03:53:28 AM »
$ excluded = ["sex", "sleeping", "angry", "in pain", "sad", "scared", "bathing"] ?

Maybe the above? I am not sure, it should have worked...

===>>
Edit: You should not get a syntax error but it might not be safe, I don't remember what we do in the function but if you pass an object around through references like that and it is modified, all references pointing would still point to that (now) modified object. So it depends on what we do with in in the function.

You way is cleaner in either case, if we modify that list somehow, we can just make a copy of it making sure it's safe {"exclude": excluded[:]} for example.
« Last Edit: May 06, 2016, 07:27:00 AM by Xela »
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #7386 on: May 06, 2016, 07:54:30 AM »
More or less, there was an excess $ since I write the function in init python  :)

Teams probably could use levels aka ranks which increase as the team explodes SE, giving bonuses to teammates inside SE and maybe providing access to a few areas which require a certain team rank.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #7387 on: May 06, 2016, 09:59:40 AM »
Nah, teams are subject to chage, I am not even sure about locking leaders anymore. Might make sense for the arena...
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #7388 on: May 06, 2016, 10:32:46 AM »
Not sure what to show at that pergament part of the frame with circles. I think it's too small for the team name anyway. Perhaps some team statistics... I'll remove the pergament part if it will be useless.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #7389 on: May 06, 2016, 11:31:37 AM »
Not sure what to show at that pergament part of the frame with circles. I think it's too small for the team name anyway. Perhaps some team statistics... I'll remove the pergament part if it will be useless.

We prolly can fit both in small font size. I am spent again, gonna try writing more gui code until headache knocks me out :D Maybe some minor code refactoring if it does.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #7390 on: May 06, 2016, 12:40:33 PM »
I asked about screens on lemma to find out if my attempt at improvement is sound and how best to do it, I'd like a response before updating any major screens
Your question might be a bit too advanced to expect an answer other than "try and find out"  :D

I move some parts of interactions logic to python functions, global ones. Can it create issues? Maybe it's better, for example, include them into the char class?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #7391 on: May 06, 2016, 12:48:33 PM »
Your question might be a bit too advanced to expect an answer other than "try and find out"  :D

Then someone could have suggested "how" to find out (I don't know how SL2 screens are marked at runtime)... even with old SL, our screens worked but after SL2 was introduced, all predicted screens started to work perfectly... so even more interface/logic could be added there even before optimization I plan for next code refactoring... maybe I can catch PyTom in chat tomorrow and find out, I feel than the answer is more likely to be yes than no...

I move some parts of interactions logic to python functions, global ones. Can it create issues? Maybe it's better, for example, include them into the char class?

It would not matter, functions are a lot smarter for this case cause the class is already huge.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #7392 on: May 06, 2016, 02:34:28 PM »
If I do weighted random choice with skills values as weights (and they all can and will go beyond 100), will it still work? Or they have to be normalized?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #7393 on: May 06, 2016, 02:47:28 PM »
If I do weighted random choice with skills values as weights (and they all can and will go beyond 100), will it still work? Or they have to be normalized?

Come again? Mind the skill values... they are not capped by the level in the same level as stats are.

Drag&Drop system is coming along marvelously! I got done in half-alive state tonight what took me two days to setup before. Although Drag&Drop system implementation for screens was shit back then, new renpy version had to be delayed cause PyTom wanted to fix all the cr@p I dug up in it :D

I will prolly move it to PyTFall from lab soon.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #7394 on: May 06, 2016, 02:59:45 PM »
Weight choice, when the more the weight, the more the chance to select the element. An example from one website
Quote
elements = ['one', 'two', 'three']
weights = [0.2, 0.3, 0.5]

from numpy.random import choice
print choice(elements, p=weights)
As you can see, weights are 100% in total.