Reverting back to that code, the block at line 80 is the main culprit for two reasons:
First, it's an init block positioned during the script itself (a bit of a no-no). all init blocks are executed immediately - before the ren'py window opens. They are also executed every time the game is "reset" (i.e. on new games).
Second, it's an infinite loop due to a small oversight (or misunderstanding of syntax) on your part. You don't check bully for the value of 'm', because there is no key 'm' whatsoever. I am assuming you are checking for a male character, in which case the correct check would be while camper_gender[bully] != 'm' (the equivalent check for a female character, btw, is while camper_gender[bully] != 'f').
Now, after doing that, the next thing you'll hit is ren'py claiming dispo_counter doesn't exist, which is technically true, because you misspelled it in the init python block at the top of the script (you missed the 'n' in "counter").
Another thing to note: I would do any imports inside an init python: block. This means moving the from random import choice line up to the init python: block at around line 14.
Anyways, the corrected script (with my notes), if you feel like copy-pasting it, comes out to this:
Code: Select all
# You can place the script of your game in this file.
# Declare images below this line, using the image statement.
# eg. image eileen happy = "eileen_happy.png"
# Declare characters used by this game.
define pk = Character('Pickett', color="#c8ffc8")
# Python Setup Dicts and other stuff.
init python:
from random import choice # Put this in an init python block. ~KZ
major_npcs = {'bf' : 'Barry Fandling', 'sf' : 'Sherry Fandling',
'ag' : 'Angles Gator', 't' : 'Troid', 'pw' : 'Playton Williams',
'btf' : 'Barret Falster'}
campers = {'pb' : 'Pooder Bennet', 'jf' : 'Jupiter Fargo',
'rb' : 'Randy Buffet', 'bl' : 'Botany Lynn',
'bt' : 'Boris Tortavich', 'tn' : 'Trinda Noober',
'fj' : 'Freetus Jaunders', 'nt' : 'Ninar Tetras',
'gm' : 'Gloobin Marfo', 'nk' : 'Niche Kaguya',
'bd' : 'Brent Drago', 'vt' : 'Volga Toober',
'kt' : 'Kinser Talebearing', 'br' : 'Bnola Rae',
'nb' : 'Nugget Beano', 'yk' : 'Yeldstat Krong',
'gy' : 'Gelliot Yabelor', 'il' : 'Illetia Dorfson',
'ct' : 'Can Tabber', 'tv' : 'Trinoba Vyder'}
camper_gender = {'pb' : 'm', 'jf' : 'f',
'rb' : 'm', 'bl' : 'f',
'bt' : 'm', 'tn' : 'f',
'fj' : 'm', 'nt' : 'f',
'gm' : 'm', 'nk' : 'f',
'bd' : 'm', 'vt' : 'f',
'kt' : 'm', 'br' : 'f',
'nb' : 'm', 'yk' : 'f',
'gy' : 'm', 'il' : 'f',
'ct' : 'm', 'tv' : 'f'}
#Setting Some Disposistion values for characters in a dict
#Fixed typo ~KZ
dispo_counter = {'pb' : 0, 'jf' : 0,
'rb' : 0, 'bl' : 0,
'bt' : 0, 'tn' : 0,
'fj' : 0, 'nt' : 0,
'gm' : 0, 'nk' : 0,
'bd' : 0, 'vt' : 0,
'kt' : 0, 'br' : 0,
'nb' : 0, 'yk' : 0,
'gy' : 0, 'il' : 0,
'ct' : 0, 'tv' : 0}
# The game starts here.
label start:
scene black
with dissolve
show text 'The Year Is 199X' with Pause(3.5)
scene black
with dissolve
show text 'A 10 Year Old Boy Is Leaving For Summer Camp' with Pause(3.5)
scene black
with dissolve
show text 'His Name, Is Pickett, & He Is The Hero Of This Story' with Pause(3.5)
scene black
with dissolve
show text 'His Parents Shove Him On The Bus\nHe Takes A Seat Alone.' with Pause(3.5)
scene black
with dissolve
#bully python code
#
#THIS SHOULD NOT BE AN INIT BLOCK OF ANY KIND ~KZ
python:
bully = choice(campers.keys())
while camper_gender[bully] != 'm': #Check camper_gender[bully], not bully. ~KZ
bully = choice(campers.keys())
dispo_counter[bully] -= 1
'Bully' 'Hey you kid, is that game kid? What is that?'
return
[edit: put those pause(3.5) statements back in, I had taken them out while debugging this]