themagiman

Well-Known Member
Mar 3, 2018
1,352
408
=>
Tried using this but there is no direct conversion available it says I have to convert from webp to gif then to webm which is a pain but manageable. The problem now is that I get an error saying "data encoding scheme is not supported" when I try to convert from webp to gif and not sure where to go from here.
 

themagiman

Well-Known Member
Mar 3, 2018
1,352
408
Ninoss do we have an eta on the next update? I would like to package up what I have for scripts and dump it here after the update rolls out so I can get my code in line with your refactoring of mods.

Also I am trying to call a planned event either from the classroom or when you return home and this is what I'm using but it never happens. The is_brainwashed is a new variable so I assume I have to reset the game in order for this to work right?
Code:
    DB_plannedEvents.append(Event("brainwashing_complete",0, _condition = "selectedGirl.corruption = 100 and selectedGirl.is_brainwashed = False"))
When restarting I'm getting crashes now and here is a fix for one of them but idk what to do with the other:

code in eventManager.py where on line 32 you should instead have
Code:
except Exception as e:
in eventManager.py on line 33 I got this as an error:
Code:
[code]
I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/scripts/script.rpy", line 18, in script call
    call pickName from _call_pickName
  File "game/scripts/lb_home.rpy", line 24, in script
    $ eventManager.doEvent()
  File "game/scripts/lb_home.rpy", line 24, in <module>
    $ eventManager.doEvent()
  File "game/scripts/main_classes/eventManager.rpy", line 74, in doEvent
    if _event.timeFrame[0] <= timeManager.hour <= _event.timeFrame[1] and _event.checkConditions():
  File "game/scripts/main_classes/eventManager.rpy", line 33, in checkConditions
    renpy.log("[eventManager] Error in condition or girlsNeeded for {} ({})".format(self.label), e)
IndexError: tuple index out of range

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "game/scripts/script.rpy", line 18, in script call
    call pickName from _call_pickName
  File "game/scripts/lb_home.rpy", line 24, in script
    $ eventManager.doEvent()
  File "renpy/ast.py", line 1133, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "renpy/python.py", line 1049, in py_exec_bytecode
    exec(bytecode, globals, locals)
  File "game/scripts/lb_home.rpy", line 24, in <module>
    $ eventManager.doEvent()
  File "game/scripts/main_classes/eventManager.rpy", line 74, in doEvent
    if _event.timeFrame[0] <= timeManager.hour <= _event.timeFrame[1] and _event.checkConditions():
  File "game/scripts/main_classes/eventManager.rpy", line 33, in checkConditions
    renpy.log("[eventManager] Error in condition or girlsNeeded for {} ({})".format(self.label), e)
IndexError: tuple index out of range
[/CODE]
 
Last edited:

Ninoss

Active Member
Donor
Game Developer
Nov 20, 2017
609
1,106
Ninoss do we have an eta on the next update? I would like to package up what I have for scripts and dump it here after the update rolls out so I can get my code in line with your refactoring of mods.

Also I am trying to call a planned event either from the classroom or when you return home and this is what I'm using but it never happens. The is_brainwashed is a new variable so I assume I have to reset the game in order for this to work right?
Code:
    DB_plannedEvents.append(Event("brainwashing_complete",0, _condition = "selectedGirl.corruption = 100 and selectedGirl.is_brainwashed = False"))
When restarting I'm getting crashes now and here is a fix for one of them but idk what to do with the other:

code in eventManager.py where on line 32 you should instead have
Code:
except Exception as e:
in eventManager.py on line 33 I got this as an error:
Code:
[code]
I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/scripts/script.rpy", line 18, in script call
    call pickName from _call_pickName
  File "game/scripts/lb_home.rpy", line 24, in script
    $ eventManager.doEvent()
  File "game/scripts/lb_home.rpy", line 24, in <module>
    $ eventManager.doEvent()
  File "game/scripts/main_classes/eventManager.rpy", line 74, in doEvent
    if _event.timeFrame[0] <= timeManager.hour <= _event.timeFrame[1] and _event.checkConditions():
  File "game/scripts/main_classes/eventManager.rpy", line 33, in checkConditions
    renpy.log("[eventManager] Error in condition or girlsNeeded for {} ({})".format(self.label), e)
IndexError: tuple index out of range

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "game/scripts/script.rpy", line 18, in script call
    call pickName from _call_pickName
  File "game/scripts/lb_home.rpy", line 24, in script
    $ eventManager.doEvent()
  File "renpy/ast.py", line 1133, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "renpy/python.py", line 1049, in py_exec_bytecode
    exec(bytecode, globals, locals)
  File "game/scripts/lb_home.rpy", line 24, in <module>
    $ eventManager.doEvent()
  File "game/scripts/main_classes/eventManager.rpy", line 74, in doEvent
    if _event.timeFrame[0] <= timeManager.hour <= _event.timeFrame[1] and _event.checkConditions():
  File "game/scripts/main_classes/eventManager.rpy", line 33, in checkConditions
    renpy.log("[eventManager] Error in condition or girlsNeeded for {} ({})".format(self.label), e)
IndexError: tuple index out of range
[/CODE]
Can't confirm an ETA, as it's said on the Discord, it's this month. I'm still fixing bugs here and there so I can't really be more precise.

Y, many typos in the error handling...
try:
Code:
except Exception as e:
    renpy.log("[eventManager] Error in condition or girlsNeeded for {} ({})".format(self.label, e))
    renpy.notify("[eventManager] Error in condition or girlsNeeded for {} ({})".format(self.label, e))
    return False
Your evaluations are messed up tho, it would be :
Code:
DB_plannedEvents.append(Event("brainwashing_complete",0, _condition = "selectedGirl.corruption == 100 and not selectedGirl.is_brainwashed"))
 

themagiman

Well-Known Member
Mar 3, 2018
1,352
408
Can't confirm an ETA, as it's said on the Discord, it's this month. I'm still fixing bugs here and there so I can't really be more precise.

Y, many typos in the error handling...
try:
Code:
except Exception as e:
    renpy.log("[eventManager] Error in condition or girlsNeeded for {} ({})".format(self.label, e))
    renpy.notify("[eventManager] Error in condition or girlsNeeded for {} ({})".format(self.label, e))
    return False
Your evaluations are messed up tho, it would be :
Code:
DB_plannedEvents.append(Event("brainwashing_complete",0, _condition = "selectedGirl.corruption == 100 and not selectedGirl.is_brainwashed"))
Followed your suggestions and it got rid of the error but now I get

('NoneType' object has no attribute 'corruption')

as a notification in the log. It sounds like the selectedGirl is set as a NoneType when the game initializes so there is no way to reference it in your code. No idea how to fix that.
 

Ninoss

Active Member
Donor
Game Developer
Nov 20, 2017
609
1,106
Followed your suggestions and it got rid of the error but now I get

('NoneType' object has no attribute 'corruption')

as a notification in the log. It sounds like the selectedGirl is set as a NoneType when the game initializes so there is no way to reference it in your code. No idea how to fix that.
selectedGirl is not defined in the context.
The condition is there to trigger the scheduled event on certain global conditions, not for 'adding' the event.

What I can suggest is to make a silent event every day to check the girl's related logic.
Like:
Code:
DB_plannedEvents.append(Event("brainwashing_logic",2))
In the said brainwashing_logic, loop girls to scheduled them events on whatever conditions you want, then re-schedule brainwashing_logic again for the next x day.
You can use girlsNeeded to carry who is concerned and get her back with event_girls[0] during the event.

Another way would be to call brainwashing_complete every x day and directly do the logic / find the appropriate girl, then also re-schedule it for the next x day.
 
Last edited:

themagiman

Well-Known Member
Mar 3, 2018
1,352
408
selectedGirl is not defined in the context.
The condition is there to trigger the scheduled event on certain global conditions, not for 'adding' the event.

What I can suggest is to make a silent event every day to check the girl's related logic.
Like:
Code:
DB_plannedEvents.append(Event("brainwashing_logic",2))
In the said brainwashing_logic, loop girls to scheduled them events on whatever conditions you want, then re-schedule brainwashing_logic again for the next x day.
You can use girlsNeeded to carry who is concerned and get her back with event_girls[0] during the event.

Another way would be to call brainwashing_complete every x day and directly do the logic / find the appropriate girl, then also re-schedule it for the next x day.
Great advice and I'm going to set it as a daily check after classes so I'm going to use the event call that you used but I don't know how to mix python and renpy commands together in the same function. Here is what I have right now:

Code:
label brainwashing_complete_check:
    python:
        for selectedGirl in girls:
            if selectedGirl.corruption >= 100 and not selectedGirl.is_brainwashed:
                "You get a phone call tonight from a student"
I get an invalid syntax error on the last line there because it is inside a python block. How can I run those renpy text functions inside of a logical python block or run a python for loop inside of the renpy engine?

Now I'm getting this error when I start a new game

Code:
I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/scripts/script.rpy", line 18, in script call
    call pickName from _call_pickName
  File "game/scripts/script.rpy", line 23, in script
    python :
  File "game/scripts/script.rpy", line 32, in <module>
    _rdmIdx = renpy.random.randint(0, len(_examGirlsPoll)-1)
ValueError: empty range for randrange() (0,0, 0)

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "game/scripts/script.rpy", line 18, in script call
    call pickName from _call_pickName
  File "game/scripts/script.rpy", line 23, in script
    python :
  File "renpy/ast.py", line 1133, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "renpy/python.py", line 1049, in py_exec_bytecode
    exec(bytecode, globals, locals)
  File "game/scripts/script.rpy", line 32, in <module>
    _rdmIdx = renpy.random.randint(0, len(_examGirlsPoll)-1)
  File "/home/tom/ab/renpy-build/tmp/install.linux-x86_64/lib/python2.7/random.py", line 244, in randint
  File "/home/tom/ab/renpy-build/tmp/install.linux-x86_64/lib/python2.7/random.py", line 220, in randrange
ValueError: empty range for randrange() (0,0, 0)
It happens not at the start but after I go to class a couple of times or check my computer for the girls list. I know its related to the code I wrote because when I comment out the DB add call it goes away. How do I iterate through a list of all the girls in the school currently while being able to edit the girl's variables while still being able to call renpy commands for dialog Ninoss ?
 
Last edited:

wirox

Newbie
Sep 18, 2017
26
29
1. Rised Naturism of FAE REAGAN to maximum
2. Confiscated all her wardrobe
3. PTA: Enforced uniform rule
4. As a result: FAE always come to class naked and breaks 3 (!) rules at once
5. Student home - discuss with mother - report to academy threat - LET IT SLIDE = Mother Affection +65
6. 13 breaked rules remain. Second home visit. Let it slide again = Mother affection over 100

This game mechanic is not balanced (heavily)

( Kenzie Reeves - all the same - 9 breaked rules - LET IT SLIDE = Mother affection +45 )

Student.JPG
 
Last edited:

themagiman

Well-Known Member
Mar 3, 2018
1,352
408
I like the mothers stuff added to the game and hope that we get to see some hot milf videos in the mix. Not too worried about balance right now I think just a push for content is always better because fun comes first then balance.

Right now I'm designing an end game in my mod where if you brainwash all the girls and mothers with hypnosis then you get some reward content and the game ends. If I release it and the common complaint is that its too easy I'll just adjust the numbers but for me getting the progression system down and content is the most important thing.
 

Ninoss

Active Member
Donor
Game Developer
Nov 20, 2017
609
1,106
Great advice and I'm going to set it as a daily check after classes so I'm going to use the event call that you used but I don't know how to mix python and renpy commands together in the same function. Here is what I have right now:

Code:
label brainwashing_complete_check:
    python:
        for selectedGirl in girls:
            if selectedGirl.corruption >= 100 and not selectedGirl.is_brainwashed:
                "You get a phone call tonight from a student"
I get an invalid syntax error on the last line there because it is inside a python block. How can I run those renpy text functions inside of a logical python block or run a python for loop inside of the renpy engine?

Now I'm getting this error when I start a new game

Code:
I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/scripts/script.rpy", line 18, in script call
    call pickName from _call_pickName
  File "game/scripts/script.rpy", line 23, in script
    python :
  File "game/scripts/script.rpy", line 32, in <module>
    _rdmIdx = renpy.random.randint(0, len(_examGirlsPoll)-1)
ValueError: empty range for randrange() (0,0, 0)

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "game/scripts/script.rpy", line 18, in script call
    call pickName from _call_pickName
  File "game/scripts/script.rpy", line 23, in script
    python :
  File "renpy/ast.py", line 1133, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "renpy/python.py", line 1049, in py_exec_bytecode
    exec(bytecode, globals, locals)
  File "game/scripts/script.rpy", line 32, in <module>
    _rdmIdx = renpy.random.randint(0, len(_examGirlsPoll)-1)
  File "/home/tom/ab/renpy-build/tmp/install.linux-x86_64/lib/python2.7/random.py", line 244, in randint
  File "/home/tom/ab/renpy-build/tmp/install.linux-x86_64/lib/python2.7/random.py", line 220, in randrange
ValueError: empty range for randrange() (0,0, 0)
It happens not at the start but after I go to class a couple of times or check my computer for the girls list. I know its related to the code I wrote because when I comment out the DB add call it goes away. How do I iterate through a list of all the girls in the school currently while being able to edit the girl's variables while still being able to call renpy commands for dialog Ninoss ?
You can go like this in your themagiman_mod.rpy:
Code:
init -1 python:
    DB_plannedEvents.append(Event("brainwashing_complete_check",1,_timeFrame = [11,23]))
label brainwashing_complete_check:
    python:
        for _girl in girls:
            if _girl.corruption >= 95 and not _girl.modValues.get("isBrainwashed",False):
                _str = "You'll soon get a phone call from {}".format(_girl.name)
                renpy.say("",_str)
                eventManager.addEvent(Event("brainwashing_complete",0, _condition = "True", _girlsNeeded = [_girl.girlConfig.directoryPath], _chance = 0.7))
        eventManager.addEvent(Event("brainwashing_complete_check",1,_timeFrame = [11,23]))
    $ renpy.jump(store.locationFrom)
    return
I've added .modValues to the girl class as a dictionnairy, will be simpler for modders to store variables without tampering with the base girl class.
No idea what makes you crash, 'ValueError: empty range for randrange() (0,0, 0)' happened bc _examGirlsPoll only had 1 girl (should have same number as girls in base game), can't tell you why tho-
 
Last edited:

themagiman

Well-Known Member
Mar 3, 2018
1,352
408
Ninoss thanks for the help! Here are some follow up questions

Is the _timeFrame = [12,23] the time at home after classes?

Is the renpy.say command going to show the girl's picture? Is there some way to get it to show in the python block?

What is the _chance = 0.7 supposed to do in the call?

I noticed that you have two different event calls here. Should I do a seperate event for the girl and then readd the event again for tomorrow or am I not understanding?
 

Ninoss

Active Member
Donor
Game Developer
Nov 20, 2017
609
1,106
Ninoss thanks for the help! Here are some follow up questions

Is the _timeFrame = [12,23] the time at home after classes?

Is the renpy.say command going to show the girl's picture? Is there some way to get it to show in the python block?

What is the _chance = 0.7 supposed to do in the call?

I noticed that you have two different event calls here. Should I do a seperate event for the girl and then readd the event again for tomorrow or am I not understanding?
Y, 12,23 is the in-game time interval, it avoids you to hardcode a call after the exam bc it will just be handled after the exam anyways.
renpy.say has the character as first argument, renpy.say(whateverGirl.char,"Something to say") will display the whateverGirl's portrait.
0.7 means it will have 70% chance to trigger, you can delete it tho- but it feels more "natural" to don't have the girl instantly calling you I think.

You can do both, this also works if you want to directly go to your brainwashing_complete event:
Code:
label brainwashing_complete_check:
    python:
        for _girl in girls:
            if _girl.corruption >= 5 and not _girl.modValues.get("isBrainwashed",False):
                _str = "You'll soon get a phone call from {}".format(_girl.name)
                renpy.say("",_str)
                selectedGirl = _girl
                renpy.jump("brainwashing_complete")
                break
    $ renpy.jump(store.locationFrom)
    return
 
  • Like
Reactions: themagiman

Ninoss

Active Member
Donor
Game Developer
Nov 20, 2017
609
1,106
Y, 12,23 is the in-game time interval, it avoids you to hardcode a call after the exam bc it will just be handled after the exam anyways.
renpy.say has the character as first argument, renpy.say(whateverGirl.char,"Something to say") will display the whateverGirl's portrait.
0.7 means it will have 70% chance to trigger, you can delete it tho- but it feels more "natural" to don't have the girl instantly calling you I think.

You can do both, this also works if you want to directly go to your brainwashing_complete event: (might need testing I'm not sure)
Code:
label brainwashing_complete_check:
    python:
        for _girl in girls:
            if _girl.corruption >= 5 and not _girl.modValues.get("isBrainwashed",False):
                _str = "You'll soon get a phone call from {}".format(_girl.name)
                renpy.say("",_str)
                selectedGirl = _girl
                renpy.jump("brainwashing_complete")
                break
    $ renpy.jump(store.locationFrom)
    return
 

themagiman

Well-Known Member
Mar 3, 2018
1,352
408
I also find that if I skip everything at the first it doesn't load any of my webms is that normal? Right now if I skip everything holding the skip button down and go to class and skip the tutorial it shows the 404 webm.

I tried the renpy.say code as below but didn't get a portrait.

Code:
renpy.say(_girl.char,"blah blah")
I also tried _girl.name too but no luck.
 

Ninoss

Active Member
Donor
Game Developer
Nov 20, 2017
609
1,106
I also find that if I skip everything at the first it doesn't load any of my webms is that normal? Right now if I skip everything holding the skip button down and go to class and skip the tutorial it shows the 404 webm.

I tried the renpy.say code as below but didn't get a portrait.

Code:
renpy.say(_girl.char,"blah blah")
I also tried _girl.name too but no luck.
No ideas for 404.
Yeah the portrait issue is basically bc RenPy sucks :)
Code:
init -1 python:
    DB_plannedEvents.append(Event("brainwashing_complete_check",1,_timeFrame = [11,23]))
label brainwashing_complete_check:
    $ var = False
    python:
        for _girl in girls:
            if _girl.corruption >= 95 and not _girl.modValues.get("isBrainwashed",False):
                var = True
                selectedGirl = _girl
                break
    $ eventManager.addEvent(Event("brainwashing_complete_check",1,_timeFrame = [11,23]))
    if var:
        selectedGirl.char "I'm saying things"
        $ eventManager.addEvent(Event("brainwashing_complete",0, _condition = "True", _girlsNeeded = [selectedGirl.girlConfig.directoryPath], _chance = 0.7))
    $ renpy.jump(store.locationFrom)
    return
Same thing, you can alternativly directly jump to your even too.
 

themagiman

Well-Known Member
Mar 3, 2018
1,352
408
Ninoss If I wanted to call an event that happens randomly if the conditions are met during class, would I use something like


Code:
DB_plannedEvents.append(Event("random_class_event", 1, _timeFrame = [8,12]))
Is the timeframe wrong or am I missing something? I want the event to be possible to happen multiple times in class.
 

Ninoss

Active Member
Donor
Game Developer
Nov 20, 2017
609
1,106
Ninoss If I wanted to call an event that happens randomly if the conditions are met during class, would I use something like


Code:
DB_plannedEvents.append(Event("random_class_event", 1, _timeFrame = [8,12]))
Is the timeframe wrong or am I missing something? I want the event to be possible to happen multiple times in class.
During it will be janky tbh but you can still do it. Plz read the HOW_TO_MOD.txt, You'll see how to schedule events at specific locations.
 
  • Like
Reactions: themagiman

themagiman

Well-Known Member
Mar 3, 2018
1,352
408
During it will be janky tbh but you can still do it. Plz read the HOW_TO_MOD.txt, You'll see how to schedule events at specific locations.
I broke things pretty good. For some reason now when I call $ renpy.movie_start_displayable() for anything outside of an exam it goes full screen and blocks further interaction. Not sure what to do about that. It happens when the player is home after school and I try to play a webm.

So far I got a few new events in this mod and I'm wondering where to post it and when. I would like to wait until the next update comes out and change whatever I need to then in order to keep my code clean and in a single file if possible then just upload it here if that's fine with everyone.
 
Last edited:

themagiman

Well-Known Member
Mar 3, 2018
1,352
408
Morning all. Great update.

Yearbook's still not available right? Making sure I'm not blind.
I've never seen a yearbook but who knows.

This is what I have planned for the hypnosis mod and where I may want to take it in the future. Looking for feedback from everyone.

What I have now
- trancing a student in class/home to increase corruption arousal and affection. If fails increase pressue and fear.
- brain draining to make a student edge in class/home to set their int=0 and greatly increase arousal
- exam action to play hypnotic music to increase arousal and affection slightly for and one student either reacts positive or negative to it given their corruption with alt text for fully brainwashed students
- check if a student is fully corrupted to have a chance encounter to finish their brainwashing with some fun
- an event where you finish the brainwashing of a student into being your sex slave
- brainwash mothers to so they fully cooperate
- convince brainwashed girls to "help" their classmates by using your hypnosis on them further increasing corruption

What I would like in the future
- Random hypnosis events happening during and after class
- Random masturbation events happening during class
- girls brainwashing mothers
- girls brining hypnotized friends to you
- tiers of hypnosis events
- buying items that help with hypnosis/brainwashing
- webm library for the events (I don't have any pictures because I can't find conversion software to run on my computer)
- some kind of ending

This should be able to be run with the base game and you don't have to do any of these actions if you choose not to. If you think I'm missing something just let me know.
 
4.10 star(s) 19 Votes