Skip to content

Instantly share code, notes, and snippets.

@trigger-segfault
Last active August 30, 2022 05:20
Show Gist options
  • Select an option

  • Save trigger-segfault/8e8afa6c72a97fcffddd6e45aab7cafb to your computer and use it in GitHub Desktop.

Select an option

Save trigger-segfault/8e8afa6c72a97fcffddd6e45aab7cafb to your computer and use it in GitHub Desktop.
CatSystem 2 Grisaia Soupstore script: https://youtu.be/vZxEwnjLC8g
///////////////////////////////////////////////////////////////////////////////
//// SOUPSTORE.CST
//// a recreation of Code MENT's iconic "I'm at soup" scene in CatSystem 2,
//// using the Grisaia cast.
//
// Author: Robert Jordan
// Date: 2021-02-12
//
// Supports:
// - The Fruit of Grisaia Unrated Version
// - The Fruit of Grisaia Steam Version (with 18+ patch ONLY)
// - The Labyrinth of Grisaia Unrated Version
// - The Labyrinth of Grisaia Steam Version
//
// Reason for no Steam/fruit support is due to older engine version that lacks
// full support for update archives, not anything to do with 18+ content.
///////////////////////////////////////////////////////////////////////////////
//// HOOKS INTO GAME START
// usage: %hook_soupstore
%hook_soupstore
bg stop
cg stop
fg stop
eg stop
fw stop
pl stop
particle stop
place
wait
bg
cg
fg
eg
fw
pl
wait
bg tone
cg tone
fg tone
eg tone
bg attr_def 401 402 403 404 405
cg attr_def 401 402 403 404 405
fg attr_def 401 402 403 404 405
eg attr_def 401 402 403 404 405
pl attr_def 401 402 403 404 405
wait
autoface on
wait
drawdef
wipedef
wait
next soupstore
///HOOK: Kajitsu/Fruit playback from "From the Beginning"
#op
%hook_soupstore
///HOOK: Meikyuu/Labyrinth playback from "The Cocoon of Caprice"
#yuj_001
%hook_soupstore
///////////////////////////////////////////////////////////////////////////////
//// MACROS TO REDUCE CODE DUPLICATION
//// change positioning, backgrounds, or music track here
// usage: %bgm_play
%bgm_play
bgm 0 bgm08 // TOY BOX
// bgm 0 bgm17 // code: xxxx
// bgm 0 bgm01 // Orange Sunshine
// bgm 0 bgm15 // Jumbo Fruit Parfait DX
bgm 0 fade 0 50 50
// usage: %cg_setup [bank=0]
%cg_setup
#300=%1[0]
if (#300==0) #(950+#300)=512
if (#300==1) #(950+#300)=512-256
if (#300==2) #(950+#300)=512+256
if (#300==3) #(950+#300)=512-192
if (#300==4) #(950+#300)=512+192
#(955+%1[0])=576
#(960+%1[0])=1
cg 0 blend 255
// usage: %eyecatch_home
// configure eyecatch intro "home" background
%bg_eyecatch
// same background as used in %bg_home
str 50 bg08 // School Dormitory - Lobby
// usage: %bg_home
// display "home" background
%bg_home
bg 0 bg08 0 0 0 // School Dormitory - Lobby
// usage: %cg_yum <pose> <face>
// display standard Yumiko sprite (distance=l) and "home" background
%cg_yum
bg 0 bg08 0 0 0 // School Dormitory - Lobby
cg 0 Tyum%1l,1,1,%2,%2 #(950+#300) #(955+0) 1 0
// usage: %fg_yum_angry
// add angry manpu to Yumiko ("_l" is the distance Yumiko is shown at)
%fg_yum_angry
// get attribute positions for Yumiko sprite
cg 0 attr 1 70 80
cg 0 attr 2 75 85
// display manpu "angry" using attribute positions
fg 0 manpu_ikariL_l #(950+0)+#(70+0)-#(75+0)-63+0 #(955+0)+#(80+0)-#(85+0)-44+0 0 0
// usage: %cg_mic <pose> <face> [effect=0]
// display standard Michiru sprite (distance=) and current "soup store" background
%cg_mic
// if (#980==0) bg 0 bg14_mr 0 0 0 // Mishima Cape - Central Shopping Street (mid-right)
if (#980==0) bg 0 bg14_ml 0 0 0 // Mishima Cape - Central Shopping Street (mid-left)
if (#980==1) bg 0 bg14 0 0 0 // Mishima Cape - Central Shopping Street
//if (#980==2) bg 0 bg14_ml 0 0 0 // Mishima Cape - Central Shopping Street (mid-left)
if (#980==2) bg 0 bg14_mr 0 0 0 // Mishima Cape - Central Shopping Street (mid-right)
//if (#980==3) bg 0 bg14_mc 0 0 0 // Mishima Cape - Central Shopping Street (mid-center)
if (#980==3) bg 0 bg35 0 0 0 // Shopping center 2
cg 0 Tmic%1,2,2,%2,%2,0,0,%3[0] #(950+#300) #(955+0) 1 0
// usage: %cg_mic_walk
// move Michiru sprite in a walking animation
%cg_mic_walk
cg 0 mcarc 8 180 0 0 18 // cheesey walking animation
cg 0 move 120 @+750 // move off-screen from current position to the right
// usage: %bg_soup_next <num>
// change the current "soup store" background
%bg_soup_next
#980=%1
///////////////////////////////////////////////////////////////////////////////
//// MAIN SCENE
//// dialogue lines, faces defined here, and general script defined here
#soupstore
///////////////////////////////////////////////////////
//// START / SETUP
scene Soup_Store
str 155 Soup_Store // internal scene name string
#194=68 // unknown value
view 1 meswnd02
auto on 0 0 // autoplay eyecatch intro(?)
mesdraw 0
// release date of "Code MENT Episode 16 - Purple Eyes" (except the year)
// arbitrary time to go shopping
\ \fnMay [2,] [2011,] [12]:30 [-] [School] [Dormitory] [-] [Lobby]\fn
// eyecatch configuration
// str 50 bg08 // School Dormitory - Lobby
%bg_eyecatch
#150=30 // __:30
#151=12 // 12:__
#152=2 // 2nd (____/__/02)
#153=5 // May (____/05/__)
#154=11 // 2011 (2011/__/__)
#155=9 // School Dormitory - Lobby
fesjs eyecatch02
view 1 meswnd // show message window after eyecatch intro
mesdraw 1
\n
if(#1020==1) jumpstop
if(#1020==1) undo
auto off
wait 1
// #155=0 // Mihama Academy
// #155=1 // Mihama Academy - Classroom
// #155=2 // Mihama Academy - Hallway
// #155=3 // Mihama Academy - Schoolyard
// #155=4 // Mihama Academy - School Gate
// #155=5 // Mihama Academy - Principal's Office
// #155=6 // Mihama Academy - Courtyard
// #155=7 // School Dormitory
// #155=8 // School Dormitory - Yuuji's Room
// #155=9 // School Dormitory - Lobby
// #155=10 // School Dormitory - Hallway
// #155=11 // School Dormitory - Rooftop
// #155=12 // School Dormitory - Grand Bathroom
// #155=13 // School Dormitory - Laundry
// #155=14 // Mishima Cape - Station Area
// #155=15 // Mishima Cape - Central Shopping Street
// #155=16 // Mishima Cape Station - Interogation Room
// #155=17 // "Ichiguya"
// #155=18 // East Beach President's Office
// #155=19 // Apartment
// #155=20 // Hospital
// #155=21 // Hospital Room
// #155=22 // Riverbank
// #155=23 // Kanagawa Prefecture - A Certain Place
// #155=24 // School Dormitory - Amane's Room
// #155=25 // Mishima Cape Station
// #155=26 // School Dormitory - Makina's Room
// #155=27 // Metropolitan Area - A Certain Place
// #155=28 // Irisu Global President's Office
// #155=29 // *empty*
// #155=30 // Niigata Prefecture - A Certain Place
// #155=31 // A High Place
// #155=32 // *empty*
// bg06 // School Dormitory - Rooftop
// bg08 // School Dormitory - Lobby
// bg09 // School Dormitory - Hallway
// bg11 // School Dormitory - Yuuji's Room
// bg12 // School Dormitory - Makina's Room
// bg14 // shopping center
// bg15 // Sky/Stars
// bg18 // School Dormitory - Sachi's Room
// bg22 // yumiko apartment
// bg23 // "Ichiguya"
// bg24 // East Beach group conference room
// bg31 // Mihama cape sidewalk
// bg34 // Mihama cape bridge/river
// bg35 // shopping center 2
// bg36 // suburbs
// bg37 // playground
// bg39 // theme park
// bg44 // School Dormitory - Michiru's Room
// bg46 // beach
// bgi_uchuu // space
// bgm01 // Orange Sunshine ***
// bgm02 // Ameagari Ni Hikaru Michi **
// bgm03 // Dog Days ***
// bgm04 // Kimi No Iru Machi
// bgm05 // Tsuki Ga Miteiru
// bgm06 // Binzume No Sora
// bgm07 // Rainy Summer Angel **
// bgm08 // TOY BOX ***
// bgm09 // Shootin'Cat **
// bgm10 // Beautiful Place
// bgm11 // Atarimae No Nukumori Wo
// bgm12 // Hana Saku Toki
// bgm13 // Kutsuzoko
// bgm14 // Waratte Itakute...
// bgm15 // Jumbo Fruit Parfait DX **
// bgm16 // Colorful Seeds ***
// bgm17 // code: xxxx ***
// bgm18 // Kasabuta
// bgm19 // Deadlock
// bgm20 // Jam *
// bgm21 // Apple Clash *
// bgm22 // ROCK YOU
// bgm23 // Lemon Candy "sex scene"
// bgm24 // Strawberry Shower "sex scene"
// bgm25 // Grape Drops
// bgm26 // in the air
// bgm27 // Sugisarishi Hibi -sweet fruit memories-
// bgm28 // little clown "Skip (piano)"
// bgm29 // Yoru Ga Akeru Made
// bgm30 // To Happy
// bgm31 // Shuumatsu No Fractal
// bgm32 // Shuumatsu No Fractal (instrumental)
// bgm32b // Shuumatsu No Fractal (instrumental)
// bgm33 // Tunafish man (unnamed)
// bgm33b // Tunafish man (unnamed)
// bgm34 // Tunafish man (unnamed)
// bgm35 // Holograph
// bgm36 // Home
// bgm37 // Skip
// bgm38 // Mayoi No Mori
// bgm39 // Kono Hi No Mama De
///////////////////////////////////////////////////////
//// I'M AT SOUP
%bgm_play
%bg_home
rdraw 30
wait
se 0 se104f // door shut (slam)
frameoff fade 0
bgm 0 fade 30 50 100
eg
wait
%cg_setup // setup constant positioning numbers
%cg_yum 01 7
rdraw 30 // fade in Yumiko
wait
pcm YUM_soup_001
Yumiko \fnHello?\fn
%bg_soup_next 0
%cg_mic 01 1
pcm MIC_soup_002
Michiru \fnHey, what\'s up?\fn
%cg_yum 01 5
pcm YUM_soup_003
Yumiko \fnI need your help, can you come here?\fn
%cg_mic 01 7
pcm MIC_soup_004
Michiru \fnUh I can\'t, I\'m buying clothes.\fn
%cg_yum 01 4
pcm YUM_soup_005
Yumiko \fnAll right, well hurry up and come over here.\fn
%cg_mic 01 7
pcm MIC_soup_006
Michiru \fnI can\'t find them.\fn
%cg_yum 01 5
pcm YUM_soup_007
Yumiko \fnWhat do you mean “you can\'t find them”?\fn
%cg_mic 01 7
pcm MIC_soup_008
Michiru \fnI can\'t find them, there\'s only soup.\fn
%cg_yum 01 b
%fg_yum_angry
pcm YUM_soup_009
Yumiko \fnWhat do you mean “there\'s only soup”??\fn
fg 0 // turn off Yumiko manpu
%cg_mic 01 a 1
pcm MIC_soup_010
Michiru \fnIt means there\'s only soup.\fn
%cg_yum 01 3
pcm YUM_soup_011
Yumiko \fnWell then get out of the soup aisle!\fn
%cg_mic 03 3 1
pcm MIC_soup_012
Michiru \fnAll right, you don\'t have to shout at me!\fn
%bg_soup_next 1
// 01 /w no blush, medium distance
%cg_mic 04m 7
%cg_mic_walk
se se_soup_013
wait 130
// \ \fn*stepping*\fn
%bg_soup_next 2
%cg_mic 01 o
pcm MIC_soup_014
Michiru \fnThere\'s more soup.\fn
// %cg_yum 01 5
// %cg_yum 01 f
%cg_yum 01 b
pcm YUM_soup_015
Yumiko \fnWhat do you mean “there\'s more soup”!?\fn
%cg_mic 01 b
pcm MIC_soup_016
Michiru \fnThere\'s just more soup.\fn
%cg_yum 01 a
pcm YUM_soup_017
Yumiko \fnGo in to the next aisle!\fn
%bg_soup_next 3
%cg_mic 01 o
// %cg_mic 01 b
pcm MIC_soup_018
Michiru \fnThere\'s still soup!\fn
%cg_yum 01 g
pcm YUM_soup_019
Yumiko \fnWhere are you right now!?\fn
%cg_mic 01 n
pcm MIC_soup_020
Michiru \fnI\'m at soup!\fn
%cg_yum 01 3
pcm YUM_soup_021
Yumiko \fnWhat do you mean “you\'re at soup”!?\fn
%cg_mic 01 n 1
pcm MIC_soup_022
Michiru \fnI mean I\'m at soup!\fn
%cg_yum 01 3
pcm YUM_soup_023
Yumiko \fnWhat store are you in!?\fn
%cg_mic 03 m
pcm MIC_soup_024
Michiru \fnI\'m at the soup store!\fn
// 02 /w no blush
%cg_yum 05 3
pcm YUM_soup_025
Yumiko \fnWhy are you buying clothes at the soup store!!?\fn
// %cg_mic 02 l 1
// %cg_mic 02 k 1
// %cg_mic 02 o 1
%cg_mic 03 k
pcm MIC_soup_026
Michiru \fnFuck you!!\fn
///////////////////////////////////////////////////////
//// FINISH
// wait 60 frames then exit with no fade-out
wait 60
se 0
bgm 0
frameoff fade 0
cg
pl
bg 0 0 0 0
wait
title
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment