music_actions.qsrc 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351
  1. #music_actions
  2. if $ARGS[0] = 'music_icon':
  3. !! Everywhere
  4. ml_time_left = ml_performance['max_perform_minutes']-ml_performance['performed_minutes']
  5. if alko > 5:
  6. 'You are too drunk to stream or record music without messing up or throwing up into your guitar.'
  7. !! $location_type = ''public_outdoors'' means parks, streets. Some event types can be placed in these locations : playing music, recording music - e.g in front of
  8. !! the library, or at the church, etc.
  9. else
  10. if ($location_type = 'private' or ($location_type = 'public_outdoors' and sunWeather = 1 and temper > 15)) and ml_no_music = 1: gs 'music_actions', 'clear_restrictions'
  11. if ml_no_music = 0:
  12. if hour < 8:
  13. 'It''s too early to do anything noisy like playing the guitar or singing.'
  14. elseif hour > 22:
  15. 'It''s too late to do anything noisy like playing the guitar or singing.'
  16. else
  17. if ml_settings['its_me'] = 1:
  18. if ml_guitar['hasguitar'] = 1 and (ml_guitar['carried'] = 1 or $ml_guitar['location'] = $loc):
  19. pl '<center><a href="exec: gs ''music_actions'', ''start''"><img title="Click to to see available music activities." height = 120 src="images/system/icons/icon_transp_guitaraction01.png"></a></center>'
  20. else
  21. pl '<center><a href="exec: gs ''music_actions'', ''start''"><img title="Click to to see available music activities." height = 120 src="images/system/icons/icon_transp_singeraction01.png"></a></center>'
  22. end
  23. else
  24. act 'Available musical activities': gs 'music_actions', 'start'
  25. end
  26. end
  27. if ml_guitar['hasguitar'] = 1 and $location_type = 'private': gs 'music_actions', 'put_down_pick_up'
  28. end
  29. end
  30. end
  31. if $ARGS[0] = 'start':
  32. cla
  33. ml_time_left = ml_performance['max_perform_minutes']-ml_performance['performed_minutes']
  34. if $location_type = 'public_outdoors':
  35. !! In public, Sveta is never alone
  36. gs 'music_actions', 'not_alone'
  37. !! Clear out accidentally stuck $access if Sveta is outdoors.
  38. killvar 'access'
  39. end
  40. if ml_not_alone ! 0: gs 'music_actions', 'willpower_cost'
  41. if $access = '': gs 'internet_mobile', 'get_access'
  42. !! $location_type = ''private'' = these are usually homes. ''indoors'' usually an office, shop or an NPC''s home. Same for ''public_indoors'' For those locations
  43. !! anything music related should be part of a storyline/quest, or some prewritten scene, like in the room of Anushka
  44. gs 'music_actions', 'play_something'
  45. gs 'music_actions', 'practice_guitar'
  46. if $location_type = 'public_outdoors': gs 'music_actions', 'busking'
  47. gs 'music_actions', 'record_music'
  48. gs 'music_actions', 'stream_music'
  49. !! NOTE: When content gates are added
  50. !!if ml_activities['setlist'] = 1: gs 'music_actions', 'rehearse_gig'
  51. !!if ml_activities['busking'] = 1: gs 'music_actions', 'busking'
  52. !!if ml_activities['streaming'] = 1: gs 'music_actions', 'stream_music'
  53. !! if this is done outdoors, any editing, mixing must be dones at home. So 'Record and edit' is not available outdoors.
  54. !! Although more accurate would be to check whether Sveta is at home or not, and if she is not home then that option won''t be available.
  55. !!if ml_activities['recording'] = 1: gs 'music_actions', 'record_music'
  56. if $access ! 'denied': gs 'music_actions', 'set_up_account'
  57. !! if $access ! 'denied': gs 'music_actions', 'upload_music'
  58. gs 'music_actions', 'delete_music'
  59. act 'Finish': gs 'music_actions', 'finish'
  60. end
  61. if $ARGS[0] = 'put_down_pick_up':
  62. if ml_guitar['carried'] = 1:
  63. act 'Place the guitar next to your desk':
  64. ml_guitar['carried'] = 0
  65. $ml_guitar['location'] = $loc
  66. gt $loc, $loc_arg
  67. end
  68. elseif $ml_guitar['location'] = $loc:
  69. act 'Pick up the guitar':
  70. ml_guitar['carried'] = 1
  71. $ml_guitar['location'] = 'carried'
  72. gt $loc, $loc_arg
  73. end
  74. end
  75. end
  76. if $ARGS[0] = 'play_something':
  77. if ml_guitar['hasguitar'] = 1 and (ml_guitar['carried'] = 1 or $ml_guitar['location'] = $loc):
  78. if ml_not_alone = 0 or will_cost = 0:
  79. !! TODO: This should be a new screen with some video or image or something
  80. act 'Play something on the guitar (10 minutes)':
  81. *clr & cla
  82. pcs_mood += 10
  83. minut += 10
  84. gs 'stat'
  85. '<center><img <<$set_imgh>> src="images/pc/activities/music/guitarpractice_1.jpg"></center>'
  86. 'You pick up your guitar and start to play some songs you know, just for your own entertainment.'
  87. 'You hum along to the tune, relaxing into the music and enjoying it. When you look up, 10 minutes has passed and you are in a much better mood.'
  88. act 'Finish': gs 'music_actions', 'finish'
  89. end
  90. elseif will_cost <= pcs_willpwr:
  91. act 'Play something on the guitar (10 minutes) (<<will_cost>> Willpower - you are not alone)':
  92. *clr & cla
  93. inhib_exp += rand(1,2)
  94. gs 'willpower', 'pay', 'self'
  95. gs 'stat'
  96. pcs_mood += 5
  97. minut += 10
  98. gs 'stat'
  99. '<center><img <<$set_imgh>> src="images/pc/activities/music/guitarpractice_1.jpg"></center>'
  100. 'You pick up your guitar and start to play some songs you know, just for your own entertainment.'
  101. 'You hum along to the tune, relaxing into the music and enjoying it. When you look up, 10 minutes has passed and you are in a much better mood.'
  102. act 'Finish': gs 'music_actions', 'finish'
  103. end
  104. else
  105. act 'Play something on the guitar (<font color="red"><<will_cost>> Willpower - you are not alone</font>)': '<br><font color="red">You feel too embarrassed to pick up your guitar in front of people</font>'
  106. end
  107. end
  108. if ml_not_alone = 0 or will_cost = 0:
  109. act 'Sing something (10 minutes)':
  110. *clr & cla
  111. pcs_mood += 10
  112. minut += 10
  113. gs 'stat'
  114. 'You hum a few notes to warm up your throat and start to some some songs you know, just for your own entertainment.'
  115. 'You sway and move your head to keep the tempo, relaxing into the music and enjoying it. When you look up, 10 minutes has passed and you are in a much better mood.'
  116. act 'Finish': gs 'music_actions', 'finish'
  117. end
  118. elseif will_cost <= pcs_willpwr:
  119. act 'Sing something (10 minutes) (<<will_cost>> Willpower - you are not alone)':
  120. *clr & cla
  121. inhib_exp += rand(1,2)
  122. gs 'willpower', 'pay', 'self'
  123. gs 'stat'
  124. !! TODO: This should be a new screen with some video or image or something
  125. pcs_mood += 5
  126. minut += 10
  127. gs 'stat'
  128. 'You hum a few notes to warm up your throat and start to some some songs you know, just for your own entertainment.'
  129. 'You sway and move your head to keep the tempo, relaxing into the music and enjoying it. When you look up, 10 minutes has passed and you are in a much better mood.'
  130. act 'Finish': gs 'music_actions', 'finish'
  131. end
  132. else
  133. act 'Sing something (<font color="red"><<will_cost>> Willpower - you are not alone</font>)': '<br><font color="red">You feel too embarrassed to sing in front of people</font>'
  134. end
  135. end
  136. !! NOTE: Having a guitar really matters here
  137. if $ARGS[0] = 'practice_guitar':
  138. if ml_guitar['hasguitar'] = 1 and (ml_guitar['carried'] = 1 or $ml_guitar['location'] = $loc) and (ml_guitar['chordbook'] = 1 or ml_guitarlesson['lessoncount'] > 0):
  139. if ml_time_left < 15:
  140. act 'Practice guitar (<font color="red">You are too tired</font>)': '<br><font color="red">You have played so much today that your brain and hands are too tired to practice any more.</font>'
  141. elseif ml_not_alone ! 0 and will_cost ! 0:
  142. if will_cost <= pcs_willpwr:
  143. act 'Practice guitar (15 minutes) (<<will_cost>> Willpower - you are not alone)':
  144. inhib_exp += rand(1,2)
  145. gs 'willpower', 'pay', 'self'
  146. gs 'stat'
  147. gt 'music_bedroomPractice', 'guitar'
  148. end
  149. else
  150. act 'Practice guitar (<font color="red"><<will_cost>> Willpower - you are not alone</font>)': '<br><font color="red">You feel too embarrassed to pick up your guitar in front of people</font>'
  151. end
  152. else
  153. act 'Practice guitar (15 minutes)': gt 'music_bedroomPractice', 'guitar'
  154. end
  155. end
  156. end
  157. if $ARGS[0] = 'busking':
  158. *nl
  159. 'With the weather being pleasant and sunny, there are groups of people moving around the streets. You could play some music, practice performing songs and maybe make some money too.'
  160. if ml_performance['max_perform_minutes'] < 60:
  161. act 'Start busking (<font color="red">You are not able to play for an hour yet.</font>)': '<br><font color="red">You don''t have the endurance yet to play for an hour.</font>'
  162. elseif ml_time_left < 60:
  163. act 'Start busking (<font color="red">You are too tired</font>)': '<br><font color="red">You have played so much today, that your brain and hands are too tired to play a whole stream.</font>'
  164. elseif will_cost ! 0:
  165. if will_cost <= pcs_willpwr:
  166. act 'Start busking (60 minutes) (<<will_cost>> Willpower)':
  167. inhib_exp += rand(1,3)
  168. gs 'willpower', 'pay', 'self'
  169. gs 'stat'
  170. gs 'music_buskingevents', 'busking'
  171. end
  172. else
  173. act 'Start busking (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t feel comfortable enough to play in front of people right now.</font>'
  174. end
  175. else
  176. act 'Start busking (60 minutes)': gs 'music_buskingevents', 'busking'
  177. end
  178. end
  179. if $ARGS[0] = 'stream_music':
  180. !! Streaming music
  181. !! NOTE: The check for guitar is done in the 'live_stream', without a guitar Sveta will sing
  182. if ml_online['account'] = 0:
  183. act 'Live stream (<font color="red">No online account</font>)': '<br><font color="red">You will have to set up an online account first to stream.</font>'
  184. elseif $access = 'denied':
  185. act 'Live stream (<font color="red">No internet access</font>)': '<br><font color="red">You have no internet access.</font>'
  186. elseif ml_streaming['lastday'] = daystart:
  187. act 'Live stream (<font color="red">Already streamed today</font>)': '<br><font color="red">You already streamed today.</font>'
  188. elseif ml_not_alone = 1 and $location_type = 'private' :
  189. act 'Live stream (<font color="red">You are not alone, can''t stream right now</font>)': '<br><font color="red">You are not alone in the room, which makes starting a stream impossible until they leave.</font>'
  190. elseif ml_performance['max_perform_minutes'] < 60:
  191. act 'Live stream (<font color="red">You are not able to play for an hour yet.</font>)': '<br><font color="red">You don''t have the endurance yet to play for an hour.</font>'
  192. elseif ml_time_left < 60:
  193. act 'Live stream (<font color="red">You are too tired</font>)': '<br><font color="red">You have played so much today, that your brain and hands are too tired to play a whole stream.</font>'
  194. else
  195. if will_cost = 0:
  196. act 'Live stream (60 minutes)': gt 'music_onlinemusic', 'live_stream'
  197. elseif will_cost <= pcs_willpwr:
  198. act 'Live stream (60 minutes) (<<will_cost>> Willpower)':
  199. inhib_exp += rand(1,3)
  200. gs 'willpower', 'pay', 'self'
  201. gs 'stat'
  202. gt 'music_onlinemusic', 'live_stream'
  203. end
  204. else
  205. act 'Live stream (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
  206. end
  207. end
  208. end
  209. !! TODO: This needs to be split, editing can happen after the music was recorded. And it can happen to music recorded with a phone too.
  210. !! 1. Record with a computer
  211. !! 2. Edit video/music
  212. !! 3. Mix if there are several recording - this will need some better recroded music management, but something simple, no one wants to
  213. !! click a hundred times to do something. Boring.
  214. !! 4. Computer based recording is removed for now, some changes are needed
  215. if $ARGS[0] = 'record_music':
  216. !! Recording music
  217. if ml_performance['max_perform_minutes'] < 30:
  218. act 'Record a song (<font color="red">You are not able to play for half an hour yet.</font>)': '<br><font color="red">You don''t have the endurance yet to play for half an hour continuously.</font>'
  219. elseif ml_time_left < 30:
  220. act 'Record a song (<font color="red">You are too tired</font>)': '<br><font color="red">You have played so much today, that your brain and hands are too tired to record anything right now.</font>'
  221. elseif will_cost = 0:
  222. act 'Record a song with your phone (30 minutes)': gt 'music_onlinemusic', 'record_song'
  223. elseif will_cost <= pcs_willpwr:
  224. act 'Record a song with your phone (30 minutes) (<<will_cost>> Willpower' + iif(ml_not_alone, ' - you are not alone)', ')'):
  225. inhib_exp += rand(1,2)
  226. gs 'willpower', 'pay', 'self'
  227. gs 'stat'
  228. gt 'music_onlinemusic', 'record_song'
  229. end
  230. else
  231. act 'Record a song (<font color="red"><<will_cost>> Willpower - you are not alone</font>)': '<br><font color="red">You don''t feel comfortable recording in front of other people right now.</font>'
  232. end
  233. end
  234. !! TODO: Split from recording music, editing is a separate thing
  235. if $ARGS[0] = 'edit_recording':
  236. if mc_inventory['tech_computer'] = 1 and mc_inventory['tech_webcam'] = 1 and ml_studio['scarlet-3rd-gen'] = 1:
  237. act 'Edit a song (<<will_cost>> Willpower)':
  238. inhib_exp += rand(1,2)
  239. gs 'willpower', 'pay', 'self'
  240. gs 'stat'
  241. gt 'music_onlinemusic', 'recordAndEditSong'
  242. end
  243. end
  244. end
  245. !! TODO: How to differentiate between guitar based and vocal sets? It is possible to rehearse just the singing part of a set, but obviously has to
  246. !! practice the guitar parts too.
  247. if $ARGS[0] = 'rehearse_sets':
  248. if ml_performance['performed_minutes'] < ml_performance['max_perform_minutes']:
  249. if ml_not_alone = 0 or will_cost = 0:
  250. act 'Rehearse your sets (30 minutes)': gt 'music_bedroompractice', 'rehearse'
  251. elseif will_cost <= pcs_willpwr:
  252. act 'Rehearse your sets (30 minutes) (<<will_cost>> Willpower)':
  253. inhib_exp += rand(1,2)
  254. gs 'willpower', 'pay', 'self'
  255. gs 'stat'
  256. gt 'music_bedroompractice', 'rehearse'
  257. end
  258. else
  259. act 'Rehearse your sets (30 minutes) (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
  260. end
  261. end
  262. end
  263. if $ARGS[0] = 'set_up_account':
  264. if ml_online['account'] = 0 and subscription[$access['subscription']] > 0:
  265. act 'Set up an online music account (0:30)': gt 'music_onlinemusic', 'set_up_account'
  266. end
  267. end
  268. if $ARGS[0] = 'upload_music':
  269. !!Uploading recorded music if there are any not uploaded yet
  270. if ml_uploadablemusic > 0 and subscription[$access['subscription']] > 0 and ml_online['account'] = 1:
  271. if will_cost = 0:
  272. act 'Upload music': gt 'music_onlinemusic', 'uploadallmusic'
  273. elseif will_cost <= pcs_willpwr:
  274. act 'Upload music (<<will_cost>> Willpower)': gt 'music_onlinemusic', 'uploadmusic'
  275. else
  276. act 'Upload music (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
  277. end
  278. end
  279. end
  280. if $ARGS[0] = 'delete_music':
  281. if ml_uploadablemusic > 0:
  282. act 'Delete old recordings': gt 'music_onlinemusic', 'deleteoldmusic'
  283. end
  284. end
  285. !! This is called from the actual location where all the info is present to decide whether someone else is around or not.
  286. if $ARGS[0] = 'not_alone':
  287. ml_not_alone = 1
  288. gs 'music_actions', 'willpower_cost'
  289. end
  290. !! This is called from the actual location where all the info is present to decide whether something actively blocking anything music related.
  291. !! FOr example a drunken husband, or if Sveta and Anya hate each other, or any other temporary block
  292. if $ARGS[0] = 'no_music':
  293. ml_no_music = 1
  294. end
  295. !! TODO: Will modify to ask all three (''easy'', ''medium'' and ''hard'') because local (friends, family), public (strangers) and global (online)
  296. !! will have different inhibition thresholds
  297. !! IMPORTANT: I always try to add a check for skills, but the will_cost already includes Sveta''s performance ability!
  298. if $ARGS[0] = 'willpower_cost':
  299. killvar 'will_cost'
  300. if pcs_inhib < 30:
  301. if pcs_inhib < 10:
  302. $diff = 'hard'
  303. elseif pcs_inhib < 20:
  304. $diff = 'medium'
  305. else
  306. $diff = 'easy'
  307. end
  308. gs 'willpower', 'skill', 'self', pcs_perform, $diff
  309. end
  310. end
  311. if $ARGS[0] = 'clear_restrictions':
  312. killvar 'will_cost'
  313. killvar 'ml_not_alone'
  314. killvar 'ml_no_music'
  315. end
  316. if $ARGS[0] = 'finish':
  317. killvar 'will_cost'
  318. killvar 'ml_not_alone'
  319. killvar 'ml_no_music'
  320. killvar 'ml_time_left'
  321. gt $loc, $loc_arg
  322. end
  323. --- music_actions ---------------------------------