music_actions.qsrc 17 KB

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