*snowfields*


[x] home





first *basic* attempt for story generator in *snowfields*

december 96 / january 97





10 REM ******************

11 REM *** snowfields ***

12 REM ******************

13 PROB=.9:CLS

14 REM *** read variables ***

15 DIM MOOD$(100):DIM CONTEXT$(100):DIM GENDER$(20):DIM ATTRIBUTE$(100)

16 DIM SUBJECT$(100,2):DIM ACTION$(100):DIM MOTIVATION$(100):DIM MEDIUM$(20):DIM SETTING$(100)

20 X=1:REM *** attributes for mood ***

22 READ A$:IF A$="xxx" THEN GOTO 30

24 MOOD$(X)=A$:X=X+1:GOTO 22

30 MOOD=X-1:X=1:REM *** context ***

32 READ A$:IF A$="xxx" THEN GOTO 40

34 CONTEXT$(X)=A$:X=X+1:GOTO 32

40 CONTEXT=X-1:X=1:REM *** gender ***

42 READ A$:IF A$="xxx" THEN GOTO 50

44 GENDER$(X)=A$:X=X+1:GOTO 42

50 GENDER=X-1:X=1:REM *** attributes ***

52 READ A$:IF A$="xxx" THEN GOTO 60

54 ATTRIBUTE$(X)=A$:X=X+1:GOTO 52

60 ATTRIBUTE=X-1:X=1:REM *** subject ***

62 READ A$:IF A$="xxx" THEN GOTO 70

63 SUBJECT$(X,1)=A$

64 READ A$:SUBJECT$(X,2)=A$:X=X+1:GOTO 62

70 SUBJECT=X-1:X=1:REM *** action ***

72 READ A$:IF A$="xxx" THEN GOTO 80


74 ACTION$(X)=A$:X=X+1:GOTO 72

80 ACTION=X-1:X=1:REM *** motivation ***

82 READ A$:IF A$="xxx" THEN GOTO 90

84 MOTIVATION$(X)=A$:X=X+1:GOTO 82

90 MOTIVATION=X-1:X=1:REM *** medium ***

92 READ A$:IF A$="xxx" THEN GOTO 100

94 MEDIUM$(X)=A$:X=X+1:GOTO 92

100 MEDIUM=X-1:X=1:REM *** setting ***

102 READ A$:IF A$="xxx" THEN GOTO 110

104 SETTING$(X)=A$:X=X+1:GOTO 102

110 SETTING=X-1:REM *** start me up ***

200 REM *** randomize ***

210 RANDOMIZE (INT(TIMER/3))

220 INPUT "How many stories do you want";NUMBER

225 INPUT "what would you like the file to be called";FILE$

227 OPEN "o",#1,FILE$:REM *** open file for writing ***

230 PRINT:PRINT"Off we go...":PRINT:PRINT:PRINT

232 FOR F=1 TO NUMBER

235 OMOOD=INT(RND*MOOD)+1

240 OCONTEXT=INT(RND*CONTEXT)+1

245 OGENDER1=INT(RND*GENDER)+1

247 OGENDER2=INT(RND*GENDER)+1

250 OATTRIBUTEA1=INT(RND*ATTRIBUTE)+1

251 OATTRIBUTEB1=INT(RND*ATTRIBUTE)+1

253 OATTRIBUTEC1=INT(RND*ATTRIBUTE)+1

254 OATTRIBUTEA2=INT(RND*ATTRIBUTE)+1

255 OATTRIBUTEB2=INT(RND*ATTRIBUTE)+1

256 OATTRIBUTEC2=INT(RND*ATTRIBUTE)+1

258 OSUBJECT1=INT(RND*SUBJECT)+1

260 OSUBJECT2=INT(RND*SUBJECT)+1

270 OACTION=INT(RND*ACTION)+1

275 OMOTIVATION1=INT(RND*MOTIVATION)+1

280 OMOTIVATION2=INT(RND*MOTIVATION)+1

285 OMEDIUM=INT(RND*MEDIUM)+1

290 OSETTING1=INT(RND*SETTING)+1

295 OSETTING2=INT(RND*SETTING)+1

300 PRINT"Writing Story number ";F

400 REM *** write story ***

405 PRINT#1,"The mood is ";MOOD$(OMOOD);

410 PRINT#1," and the characters are ";CONTEXT$(OCONTEXT);". "

415 PRINT#1,"A ";:Z1=RND:IF Z1>PROB THEN PRINT#1,"group of ";

420 PRINT#1,GENDER$(OGENDER1);", ";

425 PRINT#1,ATTRIBUTE$(OATTRIBUTEA1);", ";

426 IF OATTRIBUTEA1<>OATTRIBUTEB1 THEN PRINT#1,ATTRIBUTE$(OATTRIBUTEB1);", ";

427 IF OATTRIBUTEA1<>OATTRIBUTEC1 AND OATTRIBUTEB1<>OATTRIBUTEC1 THEN PRINT#1,ATTRIBUTE$(OATTRIBUTEC1);" ";

428 IF Z1>PROB THEN PRINT#1,SUBJECT$(OSUBJECT1,2); ELSE PRINT#1,SUBJECT$(OSUBJECT1,1);

430 PRINT#1," ";:PRINT#1,ACTION$(OACTION);" a ";

435 Z2=RND:IF Z2>PROB THEN PRINT#1,"group of ";

440 PRINT#1,GENDER$(OGENDER2);", ";

445 PRINT#1,ATTRIBUTE$(OATTRIBUTEA2);", ";

446 IF OATTRIBUTEA2<>OATTRIBUTEB2 THEN PRINT#1,ATTRIBUTE$(OATTRIBUTEB2);", ";

447 IF OATTRIBUTEA2<>OATTRIBUTEC2 AND OATTRIBUTEB2<>OATTRIBUTEC2 THEN PRINT#1,ATTRIBUTE$(OATTRIBUTEC2);" ";

448 IF Z2>PROB THEN PRINT#1,SUBJECT$(OSUBJECT2,2); ELSE PRINT#1,SUBJECT$(OSUBJECT2,1);

450 PRINT#1,"."

455 PRINT#1,"The ";:IF Z1>PROB THEN PRINT#1,"group of ";

460 IF Z1>PROB THEN PRINT#1,SUBJECT$(OSUBJECT1,2); ELSE PRINT#1,SUBJECT$(OSUBJECT1,1);

465 PRINT#1," is driven by ";MOTIVATION$(OMOTIVATION1);" whereas the ";

470 IF Z2>PROB THEN PRINT#1,"group of ";

475 IF Z2>PROB THEN PRINT#1,SUBJECT$(OSUBJECT2,2); ELSE PRINT#1,SUBJECT$(OSUBJECT2,1);

480 PRINT#1," is well known for ";

482 IF Z2>PROB THEN PRINT#1,"their";:GOTO 488

483 IF GENDER$(OGENDER2)="male" THEN PRINT#1,"his";:GOTO 488

484 IF GENDER$(OGENDER2)="female" THEN PRINT#1,"her";:GOTO 488

485 PRINT#1,"its";

488 PRINT#1," desire for ";MOTIVATION$(OMOTIVATION2);"."

490 PRINT#1,"The ";:IF Z1>PROB THEN PRINT#1,"group of ";

495 IF Z1>PROB THEN PRINT#1,SUBJECT$(OSUBJECT1,2); ELSE PRINT#1,SUBJECT$(OSUBJECT1,1);

500 PRINT#1," addresses the ";:IF OSUBJECT1=OSUBJECT2 THEN PRINT#1,"other ";

503 IF Z2>PROB THEN PRINT#1,"group of ";

505 IF Z2>PROB THEN PRINT#1,SUBJECT$(OSUBJECT2,2); ELSE PRINT#1,SUBJECT$(OSUBJECT2,1);

510 PRINT#1," ";MEDIUM$(OMEDIUM);"."

515 Y1=RND:IF Y1>.5 THEN PRINT#1,"It is widely known that the "; ELSE PRINT#1,"Hardly anybody knows that the ";

520 PRINT#1,ATTRIBUTE$(OATTRIBUTEA1);", ";

521 IF OATTRIBUTEA1<>OATTRIBUTEB1 THEN PRINT#1,ATTRIBUTE$(OATTRIBUTEB1);", ";

522 IF OATTRIBUTEA1<>OATTRIBUTEC1 AND OATTRIBUTEB1<>OATTRIBUTEC1 THEN PRINT#1,ATTRIBUTE$(OATTRIBUTEC1);" ";

523 IF OATTRIBUTEA2<>OATTRIBUTEC2 AND OATTRIBUTEB2<>OATTRIBUTEC2 THEN PRINT#1,ATTRIBUTE$(OATTRIBUTEC2);" ";

524 IF Z1>PROB THEN PRINT#1,"group of ";

525 IF Z1>PROB THEN PRINT#1,SUBJECT$(OSUBJECT1,2); ELSE PRINT#1,SUBJECT$(OSUBJECT1,1);

530 PRINT#1," ";SETTING$(OSETTING1);". And ";

535 Y2=RND:IF Y2>.5 THEN PRINT#1,"only a few know that the "; ELSE PRINT#1,"almost everybody has heard that the ";

540 PRINT#1,ATTRIBUTE$(OATTRIBUTEA2);", ";

541 IF OATTRIBUTEA2<>OATTRIBUTEB2 THEN PRINT#1,ATTRIBUTE$(OATTRIBUTEB2);", ";

542 IF OATTRIBUTEA2<>OATTRIBUTEC2 AND OATTRIBUTEB2<>OATTRIBUTEC2 THEN PRINT#1,ATTRIBUTE$(OATTRIBUTEC2);" ";

543 IF Z2>PROB THEN PRINT#1,"group of ";

545 IF Z2>PROB THEN PRINT#1,SUBJECT$(OSUBJECT2,2); ELSE PRINT#1,SUBJECT$(OSUBJECT2,1);

550 PRINT#1," ";SETTING$(OSETTING2);"."

560 PRINT#1,"-----------------------------------------------":PRINT#1,"":PRINT#1,""

565 NEXT F

600 CLOSE #1

800 REM *** here comes the content ***

805 REM *** mood ***

810 DATA Spanish,hysterical - i.e. after a terrorist action,euphoric,snowy - it is Christmas time,bleak and institutional,desperate and under pressure,mysterious,enlightening,very urban

815 DATA pastoral,virtual,banal,reassuring,commercial,dislocated - i.e. characters had been transposed to an unusual situation,romantic,late and sleepy,exhausted after much hard work,posh - e.g. in a restaurant

820 DATA frolicking,characterised by the strains of musical instruments,unresolved,convivial,Polish,Mediterranean,hostile,crowded,puzzling,tense

849 DATA xxx

850 REM *** context ***

855 DATA at the airport,at the market,at a garden party,at a party,in the pub,on a bus,in the tube,at a swimming pool,at home,in a chat group,at the office party,sitting in the caf

860 DATA at a football stadium,in the country side,in the park,in bed,in the attic,in the cellar,on a train,at a gig,at a traffic light,on a door step,in the supermarket,on the highstreet

865 DATA at a fireworks display,working on a computer network,on the internet,watching telly,on a ferry,in therapy group,buying car parts,painting the kitchen

870 DATA visiting in a hospital,making love,fixing up,rolling in snow,in a sauna,at a plane crash,at the abortion clinic,in the planetarium,in the villa,by the pool,at a bamizzwha,in New York,in London,in Tokyo

875 DATA in Istanbul,in Berlin,in Barcelona,in Little Higglebottom,at the airport during a bomb scare,in the middle of a drought,at a camp fire,counselling a shaman,at a satanic mass,self assertion therapy group

899 DATA xxx

900 REM *** gender ***

905 DATA male,female,male,female,male,female,male,female,male,female,male,female,male,female,androgynous,ungendered,genderless,genderly illdefined,xxx

910 REM *** attributes ***

915 DATA manic,giggly,gay,trendy,skinny,intellectual,druggy,piggy,beautiful,ugly,nervous,repulsive,attractive,slick,scruffy,mean,generous,patient,shy,intelligent,neurotic,depressive,psychotic,criminal

920 DATA hairy,gardening obsessed,communist,vegan,musical,blood thirsty,ambitious,well mannered,whiny,obscurely humorous,flirtatious,sexy,pompous,distracted,bitchy

925 DATA passive-aggressive,blind,sincere,logical,loyal,horny,thick skinned,talented,inventive,loud,brash,bold,motherly,fatherly,bad taste,seductive,menopausal,menstruating

930 DATA sexually frustrated,hormone ridden,cunning,intriguing,pneumatic,blonde,lecherous

949 DATA xxx

950 REM *** subjects ***

955 DATA dog,dogs,early 20s schizo,early 20s schizos,baby,babies,French teacher,French teachers,adult,adults,shop mannequin,shop mannequins,granny,grannies,granddad,granddads

960 DATA actor,actors,builder,builders,salesman,salesmen,schoolgirl,schoolgirls,schoolboy,schoolboys,lad,lads,bloke,blokes,chap,chaps,blonde,blondes,babe,babes,lass,lasses

965 DATA run-away,run-aways,waster,wasters,slacker,slackers,loser,losers,professor,professors,raver,ravers,cleaner,cleaners,waiter,waiters,tennis teacher,tennis teachers,house wife,house wives,emotions chip,emotions chips,long term unemployed plumber

970 DATA long term unemployed plumbers,sex maniac,sex maniacs,prison warden,prison wardens,gynaecologist,gynaecologists,used car salesman,used car salesmen,bike courier,bike couriers,retired athlete

972 DATA retired athletes,singer-songwriter,singer-songwriters,performance artist,performance artists

975 DATA beautician,beauticians,bar maid,bar maids,punk,punks,goth,goths,fashion victim,fashion victims,masseur,masseurs,dentist,dentists,GP,GPs,MP,MPs,psychologist,psychologists,film maker,film makers,academic,academics,journalist,journalists

980 DATA computer geek,computer geeks,cyberpunk,cyberpunks,outdoors type,outdoors type,very un-pc jerk,very un-pc jerks

982 DATA racist friend,racist friends,con artist,con artists,Asian techno artist,Asian techno artists,shop owner,shop owners,chef,chefs,cyborg,cyborgs

999 DATA xxx

1000 REM *** action ***

1005 DATA flatters,offers a lift in their car to,accidentally meets,takes LSD with,rendezvous with,meets at an aerobics class,writes an expose for the local paper about,paints the portrait of

1010 DATA by eye contact,in a strange dance,in many written notes,straight out,up front,in a kind of seductive low voice,dressed up in a rabbit costume,very sincerely,jokingly,abruptly,gruffly,with empty hands

1011 DATA unexpectedly encounters,takes aside and whispers lewd and shocking things in the ear of,illegally gives their low blood pressure prescription pills to,explains the facts of life to,attempts to psychoanalyse

1012 DATA is desperately bored by,reveals that they are the true parent of,leaves their long term partner for,composes a symphony for,goes to the job centre with,discovers the true gender of

1013 DATA plots a murder with,insists on making friends with an unknown,witnesses the infidelity of their fiancee,lies to,takes hostage,totally insults,deeply confuses,abandons,rescues,proposes marriage to,hides a bugging device on

1014 DATA poisons,has a shower with,goes for dinner with,buys presents for,goes for a drink with,gets wasted with,every week meets in a laundrette with,sells their HiFi to,sells all their belongings to,responds to a classified add in the local paper from

1015 DATA exchanges recipes with,met for the first time since childhood with,completely fell out with

1016 DATA goes on a Polish holiday with,gets completely drunk and reveals all their secrets to

1040 DATA xxx

1050 REM *** motivation ***

1055 DATA achievement,obedience,order,exhibitionism,autonomy,sociability,empathy,acceptance,dominance,self-degradation,altruism,curiosity,endurance,heterosexuality,aggression,homosexuality

1099 DATA xxx

1100 REM *** medium ***

1105 DATA in person,telepathically,non-verbally but in person,on the telephone,in an e-mail,by fax,as a vision,as a hallucination,in a letter,in morse code

1120 DATA xxx

1200 REM *** setting ***

1205 DATA is pregnant,is recently divorced,just moved to the area from Newcastle,received a threatening letter at the office,lost all their money in a failed business venture,is building a bomb in their garden shed

1210 DATA just inherited five thousand from a distant relative in the Caribbean,wants to lie low for a while because they recently robbed a bank,has temporarily lost their memory,was a beauty in the youth but drank their looks away

1211 DATA is secretly engaged to the bank manager,manufactures prosthetic limbs for a living,drives a Harley Davidson but still cannot get laid,works in the butchers,just quit their job at KwikSave,is an aristocrat,has a fetish for mushrooms

1212 DATA is a drug addict,is an amateur dog pedigree enthusiast,is an amateur psychologist,loves soap operas,is a TV addict,has been promoted to executive manager,has really bad breath

1249 DATA xxx

9998 END

9999 SAVE "c:\dat\art-bag\snowflds\snowflds.bas",A