1
0

music_onlinemusic.qsrc 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403
  1. # music_onlinemusic
  2. if $ARGS[0] = 'set_up_account':
  3. ml_online['account'] = 1
  4. minut += 10
  5. gs 'internet_mobile', 'use_internet', $access['subscription'], 10
  6. gs 'stat'
  7. 'You log into Youtube to set up a channel for your music. You can upload videos or live stream, but you will need to open a bank account if you want to receive any tips from viewers of your stream.'
  8. !! TODO: Ask for a screen name?
  9. act 'Leave': gs 'music_actions', 'start'
  10. end
  11. if $ARGS[0] = 'live_stream':
  12. !! TODO: Much, much better scene needed.
  13. ml_streaming['times_streamed'] += 1
  14. gs 'music_onlinemusic', 'stream_interruptions'
  15. if ml_no_interruption ! 0:
  16. !! TODO: Separate scenes by instrument used, not used
  17. ml_streamtime = 60
  18. gs 'music_onlinemusic', 'streaming_stats'
  19. if mc_inventory['tech_computer'] = 1 and mc_inventory['tech_webcam'] = 1 and $location_type = 'private':
  20. '<center><img <<$set_imgh>> src="images/pc/activities/music/gomixer_hero.jpg"/></center>'
  21. 'You set up your webcamera and start the streaming app on your computer. After settling down comfortably, you start to stream.'
  22. 'Your fans tipped you <<ml_superchats>> <b>₽</b> for your performance.'
  23. else
  24. '<center><img <<$set_imgh>> src="images/pc/activities/music/gomixer_hero.jpg"/></center>'
  25. 'You set up your phone on a little tri-pod and log into your account. After settling down comfortably, you start to stream.'
  26. 'Your fans tipped you <<ml_superchats>> <b>₽</b> for your performance.'
  27. end
  28. else
  29. !! How many minutes did the stream last.
  30. ml_streamtime = rand(1,60)
  31. gs 'music_onlinemusic', 'streaming_stats'
  32. !! TODO: Interruption events and such will come here
  33. end
  34. if bankAccount = 0:
  35. *nl
  36. 'You have earned <b><<ml_streaming[''unclaimed_earnings'']>></b> <b>₽</b> so far, but you need to open a bank account before you can receive the money.'
  37. else
  38. *nl
  39. 'You have <b><<ml_streaming[''unclaimed_earnings'']>></b> <b>₽</b> on your account.'
  40. act 'Stop the stream and transfer the money to your bank account':
  41. karta += ml_streaming['unclaimed_earnings']
  42. ml_streaming['unclaimed_earnings'] = 0
  43. gs 'music_onlinemusic', 'finish', 'streaming'
  44. end
  45. end
  46. act 'Stop the stream':
  47. gs 'music_onlinemusic', 'finish', 'streaming'
  48. end
  49. killvar 'ml_streamtime'
  50. killvar 'ml_no_interruption'
  51. end
  52. if $ARGS[0] = 'record_song':
  53. recording_time = 30
  54. performed_minutes = 15
  55. gs 'music_onlinemusic', 'recording_interruptions'
  56. if ml_no_interruption ! 0:
  57. !! TODO: Write a scene. It should describe that a song is recorded and then edited properly before uploading it to the net.
  58. '<center><img <<$set_imgh>> src="images/pc/activities/music/phonerecording.jpg"/></center>'
  59. 'You set up your phone and settle down comfortably to record a song. After several tries you finally end up with a version you are content with and upload it to your account.'
  60. !! 'As you don''t have a computer you can''t really do much with the songs quality. But then you have seen quite a few people work with only with their phones. Like Ling Ling.'
  61. end
  62. gs 'music_onlinemusic', 'recording_stats'
  63. killvar 'recording_time'
  64. killvar 'ml_no_interruption'
  65. killvar 'performed_minutes'
  66. if ml_online['account'] = 1 and $access ! 'denied':
  67. if pcs_inhib < 30:
  68. if pcs_inhib < 10:
  69. $diff = 'hard'
  70. elseif pcs_inhib < 20:
  71. $diff = 'medium'
  72. else
  73. $diff = 'easy'
  74. end
  75. gs 'willpower', 'skill', 'self', $diff
  76. will_cost = (will_cost * 2) - (pcs_perform)
  77. if will_cost > 0:
  78. if will_cost <= pcs_willpwr:
  79. gs 'willpower', 'pay', 'self'
  80. act 'Upload music (<<will_cost>> Willpower)': gt 'music_onlinemusic', 'uploadmusic', 'recording'
  81. else
  82. 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>'
  83. end
  84. else
  85. act 'Upload music': gt 'music_onlinemusic', 'uploadmusic', 'recording'
  86. end
  87. else
  88. act 'Upload music': gt 'music_onlinemusic', 'uploadmusic', 'recording'
  89. end
  90. end
  91. act 'Leave': gs 'music_onlinemusic', 'finish', 'recording'
  92. end
  93. !! IMPORTANT
  94. !! TODO: Recording and Editing/Mixing needs to be split into two separate activities. So keep ''recrodSong'' as is and make this into purely about editing
  95. if $ARGS[0] = 'edit_song':
  96. !! TODO: Write a scene. It should describe that a song is recorded and then edited properly before uploading it to the net.
  97. !! '<center><img <<$set_imgh>> src="images/pc/activities/music/editmusic.jpg"/></center>'
  98. '<center><video autoplay loop src="images/pc/activities/music/editmusic.mp4"></video></center>'
  99. 'You plug in your home studio kit and start up the recording software. After several tries you finally end up with a version you are content with.'
  100. 'The next hour just flies by as you edit the video and the audio, trying to increate the quality of the recording as much as you can'
  101. minut += 90
  102. gs 'exp_gain', 'vokal', rand(1,3)
  103. if perform_lvl < 35: gs 'exp_gain', 'perform', rand(1,3)
  104. if musicprod_lvl < 35: gs 'exp_gain', 'musicprod', rand(1,3)
  105. ml_performance['performed_minutes'] += 15
  106. ml_performance['total_time_performed'] += 15
  107. ml_onlinesong_hotcat[ml_onlinesongcount] = pcs_hotcat
  108. if ml_guitar['hasguitar'] = 1:
  109. ml_onlinesong_skilllevel[ml_onlinesongcount] = pcs_instrmusic + pcs_vokal + pcs_perform
  110. ml_onlinesong_freshness[ml_onlinesongcount] = pcs_instrmusic + pcs_vokal + pcs_perform + ((pcs_hotcat-4)*10)
  111. gs 'exp_gain', 'instrmusic', rand(1,3)
  112. else
  113. ml_onlinesong_skilllevel[ml_onlinesongcount] = (pcs_vokal * 2) + pcs_perform
  114. ml_onlinesong_freshness[ml_onlinesongcount] = (pcs_vokal * 2) + pcs_perform + ((pcs_hotcat-4)*10)
  115. end
  116. ml_onlinesong_lastcalcday[ml_onlinesongcount] = daystart
  117. ml_onlinesong_uploaded[ml_onlinesongcount] = 0
  118. ml_uploadablemusic += 1
  119. ml_onlinesongcount += 1
  120. if ml_online['account'] = 1 and $access ! 'denied':
  121. if pcs_inhib < 30:
  122. if pcs_inhib < 10:
  123. $diff = 'hard'
  124. elseif pcs_inhib < 20:
  125. $diff = 'medium'
  126. else
  127. $diff = 'easy'
  128. end
  129. gs 'willpower', 'skill', 'self', $diff
  130. will_cost = (will_cost * 2) - (pcs_perform)
  131. if will_cost > 0:
  132. if will_cost <= pcs_willpwr:
  133. gs 'willpower', 'pay', 'self'
  134. act 'Upload music (<<will_cost>> Willpower)': gt 'music_onlinemusic', 'uploadmusic'
  135. else
  136. 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>'
  137. end
  138. else
  139. act 'Upload music': gt 'music_onlinemusic', 'uploadmusic'
  140. end
  141. else
  142. act 'Upload music': gt 'music_onlinemusic', 'uploadmusic'
  143. end
  144. else
  145. act 'Leave': gs 'music_actions', 'finish'
  146. end
  147. end
  148. if $ARGS[0] = 'uploadmusic':
  149. if pcs_inhib < 30:
  150. 'You hesitate for a long moment, but finally take a deep breath and click on the "Upload" button and your newly recorded song moves over to the internet for all to see.'
  151. 'You bite in your lip, then close the screen before you change your mind and delete it.'
  152. else
  153. 'You smile brightly and click on the "Upload" button. Now the whole world can see you play. And if they don''t like it, well... "Haters gonna hate" you shrug mentally and close the screen. They will like it."'
  154. end
  155. gs 'stat'
  156. ml_uploadablemusic -= 1
  157. ml_onlinesong_uploaded[ml_onlinesongcount-1] = 1
  158. killvar 'will_cost'
  159. if $ARGS[1] = 'recording':
  160. act 'Leave': gs 'music_onlinemusic', 'finish', 'recording'
  161. else
  162. act 'Leave': gs 'music_actions', 'start'
  163. end
  164. end
  165. if $ARGS[0] = 'uploadallmusic':
  166. '<center><img src="images/pc/activities/music/uploadmusic.jpg"/></center>'
  167. if will_cost > 0:
  168. 'You go through the songs you recorded and clear out the old ones that you really, really don''t like anymore. Then after a moment of hesitation you take a deep breath and click on the "Upload" button.
  169. The screen changes and one by one, your songs move over to the internet for all to see.'
  170. 'You bite in your lip, then close the screen before you change your mind and delete them.'
  171. else
  172. 'You smile brightly as you browse through your recordings, deleting some old ones, then finally click the "Upload" button. Now the whole world can see you play. And if they don''t like it, well... "Haters gonna hate" you shrug mentally and close the screen, this is how art grows."'
  173. end
  174. gs 'music_onlinemusic', 'deleting'
  175. i = 0
  176. :uploadallmusic
  177. if ml_onlinesong_uploaded[i] = 0 and $access ! 'denied':
  178. minut += 5
  179. gs 'internet_mobile', 'use_internet', $access['subscription'], 5
  180. gs 'stat'
  181. ml_onlinesong_uploaded[i] = 1
  182. ml_uploadablemusic -= 1
  183. end
  184. i += 1
  185. if i < ml_onlinesongcount:jump 'uploadallmusic'
  186. killvar 'will_cost'
  187. act 'Leave': gs 'music_actions', 'start'
  188. end
  189. if $ARGS[0] = 'deleteoldmusic':
  190. 'You go through your recorded musics and delete all the old ones where your playing doesn''t really reflect what you can do these days'
  191. gs 'music_onlinemusic', 'deleting'
  192. act 'Leave': gs 'music_actions', 'start'
  193. end
  194. !!----------------------------------------------------------------------------------------------------------------------------
  195. !!----------------------------------------- GoSub functions all go here --------------------------------------------------
  196. !!----------------------------------------------------------------------------------------------------------------------------
  197. if $ARGS[0] = 'deleting':
  198. ml_threshold_skilllevel = ((pcs_instrmusic + pcs_vokal + pcs_perform)*80)/100
  199. i = 0
  200. j = -1
  201. :deletemusic
  202. if (ml_onlinesong_uploaded[i] = 1) or (ml_onlinesong_uploaded[i] = 0 and ml_onlinesong_skilllevel[i] > ml_threshold_skilllevel):
  203. j += 1
  204. ml_tempsong_freshness[j] = ml_onlinesong_freshness[i]
  205. ml_tempsong_lastcalcday[j] = ml_onlinesong_lastcalcday[i]
  206. ml_tempsong_hotcat[j] = ml_onlinesong_hotcat[i]
  207. ml_tempsong_skilllevel[j] = ml_onlinesong_skilllevel[i]
  208. ml_tempsong_uploaded[j] = ml_onlinesong_uploaded[i]
  209. else
  210. ml_uploadablemusic -= 1
  211. end
  212. i += 1
  213. if i < ml_onlinesongcount:jump 'deletemusic'
  214. killvar 'ml_onlinesong_freshness'
  215. killvar 'ml_onlinesong_lastcalcday'
  216. killvar 'ml_onlinesong_hotcat'
  217. killvar 'ml_onlinesong_skilllevel'
  218. killvar 'ml_onlinesong_uploaded'
  219. killvar 'i'
  220. ml_onlinesongcount = 0
  221. ml_uploadablemusic = 0
  222. if j >= 0:
  223. :looprebuildsongs
  224. ml_onlinesong_freshness[ml_onlinesongcount] = ml_tempsong_freshness[ml_onlinesongcount]
  225. ml_onlinesong_hotcat[ml_onlinesongcount] = ml_tempsong_hotcat[ml_onlinesongcount]
  226. ml_onlinesong_lastcalcday[ml_onlinesongcount] = ml_tempsong_lastcalcday[ml_onlinesongcount]
  227. ml_onlinesong_skilllevel[ml_onlinesongcount] = ml_tempsong_skilllevel[ml_onlinesongcount]
  228. ml_onlinesong_uploaded[ml_onlinesongcount] = ml_tempsong_uploaded[ml_onlinesongcount]
  229. if (ml_onlinesong_uploaded[ml_onlinesongcount] = 0): ml_uploadablemusic += 1
  230. ml_onlinesongcount += 1
  231. if ml_onlinesongcount <= j: jump 'looprebuildsongs'
  232. end
  233. killvar 'ml_tempsong_freshness'
  234. killvar 'ml_tempsong_lastcalcday'
  235. killvar 'ml_tempsong_hotcat'
  236. killvar 'ml_tempsong_skilllevel'
  237. killvar 'ml_tempsong_uploaded'
  238. killvar 'ml_threshold_skilllevel'
  239. end
  240. if $ARGS[0] = 'finish':
  241. if $location_type = 'public_outdoors':
  242. ml_rand_event = rand(0,100)
  243. if ml_rand_event <= 10 and $region = 'pav' and npc_rel['A144'] > 40:
  244. if $ARGS[1] = 'streaming':
  245. gs 'music_onlinemusic', 'anushka_streaming_end'
  246. elseif $ARGS[1] = 'recording':
  247. gs 'music_onlinemusic', 'anushka_recording_end'
  248. end
  249. elseif ml_rand_event <= 30 and $region = 'pav':
  250. gs 'music_gigstarts', 'zariyah_passing_by'
  251. !! elseif ml_rand_event < 15 and $ARGS[1] = 'pav' and ((npc_rel['A20'] < 20 or npc_rel['A21'] < 20):
  252. !! TODO: if the gopniks don''t like the PC and/or her music is awful, there is a chance that Lena and Lera harasses her.
  253. !! gs 'music_buskingevents', 'lena_and_lera', 1
  254. !! elseif ml_rand_event < 15 and $ARGS[1] = 'pav' and ( (npc_rel['A20'] < 40 or npc_rel['A21'] < 40) and (pcs_instrmusic < 30 or pcs_perform < 30 or pcs_vokal < 30) ):
  255. !! gs 'music_buskingevents', 'lena_and_lera', 2
  256. else
  257. gs 'music_actions', 'finish'
  258. end
  259. killvar 'ml_rand_event'
  260. else
  261. gs 'music_actions', 'finish'
  262. end
  263. end
  264. if $ARGS[0] = 'streaming_stats':
  265. minut += ml_streamtime
  266. gs 'internet_mobile', 'use_internet', $access['subscription'], ml_streamtime
  267. ml_maxsuperchats = ( fame['pav_music'] + (fame['city_music'] * 2) + fame['pushkin_music'] + fame['village_music'] + pcs_apprnc )
  268. ml_superchats = (rand( 0, ml_maxsuperchats) * ml_streamtime) / 60
  269. if ml_guitar['hasguitar'] = 1 and (ml_guitar['carried'] = 1 or $ml_guitar['location'] = $loc):
  270. ml_famebase = ( pcs_instrmusic + pcs_vokal + pcs_perform + ( (pcs_hotcat-5) * 20 ) ) / 20
  271. gs 'exp_gain', 'instrmusic', rand(1,3)
  272. else
  273. ml_famebase = ( (pcs_vokal * 2) + pcs_perform + ( (pcs_hotcat-5) * 20 ) ) / 20
  274. end
  275. gs 'fame', 'pav', 'music', rand(0, ml_famebase)
  276. gs 'fame', 'city', 'music', rand(0, ml_famebase)
  277. gs 'exp_gain', 'vokal', rand(1,3)
  278. if perform_lvl < 35: gs 'exp_gain', 'perform', rand(1,3)
  279. ml_streaming['livestreamcount'] += 1
  280. ml_streaming['lastday'] = daystart
  281. ml_performance['performed_minutes'] += ml_streamtime
  282. ml_performance['total_time_performed'] += ml_streamtime
  283. ml_streaming['total_earnings'] += ml_superchats
  284. ml_streaming['unclaimed_earnings'] += ml_superchats
  285. gs 'stat'
  286. end
  287. if $ARGS[0] = 'recording_stats':
  288. minut += recording_time
  289. if performed_minutes > 10:
  290. gs 'exp_gain', 'vokal', rand(1,4)
  291. if perform_lvl < 35: gs 'exp_gain', 'perform', rand(1,3)
  292. ml_performance['performed_minutes'] += performed_minutes
  293. ml_performance['total_time_performed'] += performed_minutes
  294. ml_onlinesong_hotcat[ml_onlinesongcount] = pcs_hotcat
  295. if ml_guitar['hasguitar'] = 1 and (ml_guitar['carried'] = 1 or $ml_guitar['location'] = $loc):
  296. ml_onlinesong_skilllevel[ml_onlinesongcount] = pcs_instrmusic + pcs_vokal + pcs_perform
  297. ml_onlinesong_freshness[ml_onlinesongcount] = pcs_instrmusic + pcs_vokal + pcs_perform + ((pcs_hotcat-4)*10)
  298. gs 'exp_gain', 'instrmusic', rand(1,3)
  299. else
  300. ml_onlinesong_skilllevel[ml_onlinesongcount] = (pcs_vokal * 2) + pcs_perform
  301. ml_onlinesong_freshness[ml_onlinesongcount] = (pcs_vokal * 2) + pcs_perform + ((pcs_hotcat-4)*10)
  302. end
  303. ml_onlinesong_lastcalcday[ml_onlinesongcount] = daystart
  304. ml_onlinesong_uploaded[ml_onlinesongcount] = 0
  305. ml_uploadablemusic += 1
  306. ml_onlinesongcount += 1
  307. end
  308. end
  309. if $ARGS[0] = 'stream_interruptions':
  310. !! TODO: Will depend on chance and fame - the more famous Sveta is, the more likely someone will interrupt. Just like in real life.
  311. !{
  312. Planned scenarios:
  313. 1. Anushka shows up, just like with busking.
  314. If Sveta's skills are good enough for Anushka and they have a good relationship she can join in.
  315. 2. Lena and Lera show up and if they don't like Sveta will mess with the stream - running around,
  316. throwing twigs and leaves at Sveta, mocking her, making loud noises, etc.
  317. 3. Some other stuff.
  318. }
  319. ml_no_interruption = 1
  320. end
  321. if $ARGS[0] = 'recording_interruptions':
  322. !! TODO: Will depend on chance and fame - the more famous Sveta is, the more likely someone will interrupt. Just like in real life.
  323. !{
  324. Planned scenarios:
  325. 1. Anushka shows up, just like with busking.
  326. If Sveta's skills are good enough for Anushka and they have a good relationship she can join in.
  327. 2. Lena and Lera show up and if they don't like Sveta will mess with the recording - running around,
  328. throwing twigs and leaves at Sveta, mocking her, making loud noises, etc.
  329. 3. Some other stuff.
  330. }
  331. ml_no_interruption = 1
  332. end
  333. !!----------------------------------------------------------------------------------------------------------------------------
  334. !!----------------------------------------- Outdoors events all go here --------------------------------------------------
  335. !!----------------------------------------------------------------------------------------------------------------------------
  336. if $ARGS[0] = 'anushka_streaming_end':
  337. gs 'music_actions', 'finish'
  338. end
  339. if $ARGS[0] = 'anushka_recording_end':
  340. gs 'music_actions', 'finish'
  341. end
  342. --- music_onlinemusic ---------------------------------