Author Topic: General Discussion  (Read 3821323 times)

0 Members and 42 Guests are viewing this topic.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #5085 on: July 09, 2015, 05:46:53 PM »
LoL

4th post in a row...

EOL (weird End of line error in rtc function is also due to a missing trait ("Magic Gift")). I have no idea why the f*ck it counts as end of the the line error (which is it clearly is NOT by any sensible definition) and it'll take another half an hour to investigate why Ren'Py or Python are BSing us (I am sure it's some form of a legitimate reason if you get deep (like colonoscopy deep) enough into the issue) but I am falling asleep and killing off all mentions of dead traits in the game is a good  and honorable goal, no matter who wrote the code that included them >:(
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #5086 on: July 10, 2015, 04:38:04 AM »
What
Quote
if dice(int(round(hero.charisma*0.5)))
string means?
Are strings like
Quote
if chr.status != "slave"
still correct?

- Since we use permanent traits as occupations, that interaction #8 in GM - chat.rpy where you ask a girl to change occupation cannot be used anymore in its current condition. If you want to rewrite it somehow to work with non permanent classes traits, go ahead. Otherwise I'll delete it (probably the best option, it's too simple to change even non permanent class via one dialogue).

- GM - go out.rpy contains Cherry's basic developments for dates in real time. I'm not sure how to build dates system (there are many ways), but that file is not enough to make something based on it. Just ignore it for now.

- In GM - proposition.rpy the label #3 handles hiring heavily based on occupations, giving an error for unknown ones. I fixed it for now based on existing occupations types, but it will give us more headache in the future. It should be changed to be based on level and social status (I don't know how  :D ).

- GM - shopping.rpy is a tough one. It handles shopping together with girl based on her occupation again, and I don't understand some parts there. I'm not sure also that we need it in its current super complex condition. We should allow autobuying system to select an item that the girl wants, and then buy it for her or not.

- Finally, I can't test stuff because
Quote
While running game code:
  File "game/script.rpy", line 243, in script call
    call testing
  File "game/library/testing.rpy", line 2, in script
    python:
  File "game/library/testing.rpy", line 16, in <module>
    testBrothel.upgrades['stripclub']['1']['active'] = True
KeyError: 'stripclub'

Offline Gismo

  • Jr. Member
  • **
  • Posts: 88
Re: General Discussion
« Reply #5087 on: July 10, 2015, 05:26:26 AM »
- Finally, I can't test stuff because

I just exclude this line of code and so far everything works )

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #5088 on: July 10, 2015, 08:03:45 AM »
What  string means?

It's a line of code, I didn't find one declared as string (str(), "", '') but all it does is dividing mcs charisma by 2 and running dice function with a result (which is our case is not widely accepted dice x out of y but a kind of percentage where dice(100 and above are always true), dice(0 or below are always false), dice(10) means 10% chance of occurring, dice(0.1) means 1 in a 1000 chance of occurring and etc.)

Are strings like  still correct?

Yeap, these lines are still valid.


- Since we use permanent traits as occupations, that interaction #8 in GM - chat.rpy where you ask a girl to change occupation cannot be used anymore in its current condition. If you want to rewrite it somehow to work with non permanent classes traits, go ahead. Otherwise I'll delete it (probably the best option, it's too simple to change even non permanent class via one dialogue).

I'll rewrite this one myself, removing class traits is not a good idea but talking a girl into accepting a new one shouldn't be a big deal but that would require a good amount of changes and code.

- GM - go out.rpy contains Cherry's basic developments for dates in real time. I'm not sure how to build dates system (there are many ways), but that file is not enough to make something based on it. Just ignore it for now.

As you like, we'll stick a pin in it :) I am still in favor of AA2 type of dates btw, maybe with exceptions if someone likes coding them, because the last date scenario I've coded was a disaster (imo, I recall someone saying they liked it) and just changing background, fading to black and displaying a quick result would have been faster/smarter.

- In GM - proposition.rpy the label #3 handles hiring heavily based on occupations, giving an error for unknown ones. I fixed it for now based on existing occupations types, but it will give us more headache in the future. It should be changed to be based on level and social status (I don't know how  :D ).

I half expected that. Occupations have generalization fields like "SIW", "Warrior", "Servicer". I'll make check occupation work with them in the future in some smart way where we check these generalizations only for one or two base class traits and exact match for rest.

- Finally, I can't test stuff because

That file is up to you to maintain, so one developer does not mess up testing for everybody else but as a result, when core code is adjusted, some thing may no longer be valid...

Like Gismo said, just comment our all of those lines. I'll attach my own testing file just in case.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #5089 on: July 10, 2015, 10:25:44 AM »
It's a line of code, I didn't find one declared as string (str(), "", '') but all it does is dividing mcs charisma by 2 and running dice function with a result
I know what dice is. And I figured that round rounds it. I don't know what int part does.

Btw can you actually use dice x out of y somehow?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #5090 on: July 10, 2015, 10:54:44 AM »
I don't know what int part does.

It useless in this case I guess... int() is python buildin function that tries to turn something into integer, like int("1") will return 1, even though "1" is a string. But it does not round up as you expect it too if you know basic math (0.5 and above to the next integer and anything else to the one below, round does that better, even if still not perfect).

Btw can you actually use dice x out of y somehow?

No... at least not directly. You obviously can do something like: dice(50) (d1/2) or dice(100.0/6) (d1/6) but it will not return a number as you'd expect from a conventional dice function, just True/False.

But you can always just use:

Code: [Select]
randint(1, 6)
to get a number.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #5091 on: July 10, 2015, 03:00:41 PM »
Girl_meets_abouther label made by Cherry in GM-chat creates a list of lines based on all available traits and occupations. I changed old occupations checks to "if co("Warrior"):", but now it gives me 
Quote
File "game/library/interactions/GM - chat.rpy", line 267, in script
    if co('Warrior'):
  File "game/library/interactions/GM - chat.rpy", line 267, in <module>
    if co('Warrior'):
  File "game/library/interactions/function - interactions (GM).rpy", line 66, in co
    return ct(list(args))
  File "game/library/interactions/function - interactions (GM).rpy", line 58, in ct
    l = list(traits for i in list(args))
  File "game/library/interactions/function - interactions (GM).rpy", line 58, in <genexpr>
    l = list(traits for i in list(args))
TypeError: unhashable type: 'list'

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #5092 on: July 10, 2015, 03:59:19 PM »
That is my bad, it was 3am when I wrote that code, I'll fix it soon.
Like what we're doing?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #5093 on: July 10, 2015, 05:10:17 PM »
Holy crap... one of the tracks we used was copyrighted (prolly all/most of them) but they already managed to block youtube video in Germany because if it  ???
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #5094 on: July 10, 2015, 05:39:00 PM »
All ingame music is from various games, and intro music is from upcoming Infinity War movie. Most girls pictures belong to minor artists, but music belongs to large corporations. Nothing we can do, music and sounds are even harder to create than pictures.

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #5095 on: July 11, 2015, 06:51:12 AM »
Alright, I have some progress. I noticed that now traits cannot change disposition directly giving an error instead (and in code it said that this is on purpose to not mess with GM), so I added a new effect (that will work together with other disposition effects) for Half-Sister trait.

Girl_meets_abouther label works now,  but I have a problem with rts function.
Quote
While running game code:
  File "game/library/interactions/GM - chat.rpy", line 374, in script
    $ line = rts(chr, {"Dandere": ["I sleep on my days off. ...Is that bad?"], "Athletic": ["Working out.", "Exercising", "Running laps"], "Dawdler": ["I spend my days just lying around. Isn't there anything to do around here?", "I like beach sports, y'know? Just watching, though."],
  File "game/library/interactions/GM - chat.rpy", line 379, in <module>
    "co('Server')": ["Best way to get the wine stains out. Do you know any?", "Chatting with strange customers at the bar.", "Keeping the bar running."], "default": ["Nothing special, really."]})
  File "game/library/interactions/function - interactions (GM).rpy", line 23, in rts
    if eval(trait, globals(), locals()): available.append(options[trait])
  File "game/library/interactions/function - interactions (GM).rpy", line 66, in co
    return ct(*args)
  File "game/library/interactions/function - interactions (GM).rpy", line 58, in ct
    l = list(traits for i in list(args))
  File "game/library/interactions/function - interactions (GM).rpy", line 58, in <genexpr>
    l = list(traits for i in list(args))
KeyError: 'SIW'

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #5096 on: July 11, 2015, 07:00:40 AM »
Are you using SIW as a trait? System does not expect that yet...
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #5097 on: July 11, 2015, 07:03:44 AM »
I use slightly changed construction you told me to use when we got rts function. While traits checked like "Dandere":[...], occupations checked like "co('Warrior')":[...].
It used to work before we switched to new co function.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #5098 on: July 11, 2015, 07:09:18 AM »
But it says: KeyError: 'SIW'... I'll take a look a bit later, push and tell me how to replicate the error. co() is kinda useless now as well, since class traits are traits, co just calls the the ct function.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #5099 on: July 11, 2015, 07:46:42 AM »
Wait a sec. We cannot check all existing class traits every time when we need to find out if the girl can fight or willing to have sex with anyone. Or rather we could, but it's stupid and time consuming.
That's why all class traits have "occupations" field which might have SIW, server, warrior, etc. occupations.

I figured co function checks occupation field, so I write lines like "co('SIW')":[...].

Cases when you need to check one specific class trait are very rare, and should be handled like ct("trait").
« Last Edit: July 11, 2015, 08:20:31 AM by DarkTl »