1
0

beta_journal_quests.qsrc 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  1. # beta_journal_quests
  2. !! 12/09/22 - Hooded Silence
  3. !! Game Character Quest section. This is the container file for all quest roles in game. Used to provide player feedback on how to proceed in quests.
  4. !! All quest information should be in a guidance or hint style fashion to encourage exploration.
  5. !! Beta 1 - New module design template for integration
  6. !! Section icons
  7. !! 🧭 Quest
  8. !! 💕 Relationship
  9. !! 📌 Location
  10. !! ✨ Magic
  11. !! 🔎 Hints
  12. !! Quest progress icons:
  13. !! <font color = "green">✓</font> - green tick
  14. !! <font color = "red">🗴</font> Red cross
  15. if $ARGS[0] = 'init':
  16. *clr & cla
  17. $loc_id = 'beta_journal_quests'
  18. act 'Put your journal down': gt $menu_loc, $menu_arg
  19. act 'Return to top journal page': gt 'journal', 'records'
  20. $jumploc = 'questtab'
  21. !! gs 'journal', 'journalmenu'
  22. '<center><h2>Quests and Relationships</h2></center>'
  23. if $debug['journal'] ! '':
  24. '<h2><font color = "red">Error with:</font> <<$debug[''journal'']>></h2>'
  25. $debug['journal'] = ''
  26. end
  27. !! TEST
  28. act 'Test vcard': gs $loc_id, 'vcard', 274
  29. act 'Test Glossary': gs $loc_id, 'rel_pavlovsk'
  30. !!TEST
  31. if journal['alert'] = 1:
  32. '<div>'
  33. '<center><h3><font color = "orange">⚠ Todays Quests and Tasks</font></h3></center>'
  34. '<ul style="margin:0; padding:0;">🧭 You have to attend starlets</ul>'
  35. '<ul style="margin:0; padding:0;">💕 You have a date with {npc} today at {time}, {location}</ul>'
  36. '</div>'
  37. else
  38. !! Pull randomly from a journal[''gametips''] array
  39. '<div>'
  40. '<center><h3>Todays Random Tips</h3></center>'
  41. '<ul style="margin:0; padding:0;">🧭 Visit the school sports field to meet your brother, and maybe other jocks.</ul>'
  42. '</div>'
  43. end
  44. end
  45. !! Friends and Relations
  46. if $ARGS[0] = 'rel_pavlovsk':
  47. gs $loc_id, 'pavlovsk_array'
  48. $table_gen_max = loc_gen
  49. gs $loc_id, 'table_gen'
  50. end
  51. if $ARGS[0] = 'rel_city':
  52. end
  53. if $ARGS[0] = 'rel_gad':
  54. end
  55. if $ARGS[0] = 'rel_pushkin':
  56. !! Ballet Maya
  57. end
  58. !! Game locations - quests
  59. if $ARGS[0] = 'geo_pavlovsk':
  60. !!5/8 Estate
  61. !!Commercial
  62. !!Industrial
  63. !!Market
  64. !!Park
  65. !!Train Station
  66. if $ARGS[1] = '58_estate':
  67. !!Parents apartment
  68. !!Garages
  69. !1Luda''s apartment
  70. !!Shulgin''s Apartment
  71. elseif $ARGS[1]= 'commercial':
  72. elseif $ARGS[1]= 'industrial':
  73. elseif $ARGS[1] = 'market':
  74. elseif $ARGS[1] = 'park':
  75. elseif $ARGS[1] = 'train_station':
  76. end
  77. end
  78. if $ARGS[0] = 'geo_city':
  79. end
  80. if $ARGS[0] = 'geo_pushkin':
  81. !! Ballet school content
  82. !! Ballet Secrets content
  83. end
  84. if $ARGS[0] = 'geo_gad':
  85. end
  86. if $ARGS[0] = 'geo_village':
  87. end
  88. if $ARGS[0] = 'vcard':
  89. *clr & cla
  90. $quest_id = 'A' + ARGS[1]
  91. $loc_id = 'beta_journal_quests'
  92. !! Debug Section
  93. if ARGS[1] = 0:
  94. gt $loc_id, 'failure', 'id'
  95. end
  96. !! Initiate NPC data.
  97. if $npc_quest['q_next'] = '':
  98. !! qstage = current stage index
  99. qstage = 1
  100. end
  101. gs 'quest_data_<<$quest_id>>', 'init'
  102. !! Reset to correct location
  103. $loc_id = 'beta_journal_quests'
  104. !! Ensure quest data fields are populated
  105. if $npc_quest['body'] ='':
  106. gt $loc_id, 'failure', 'quest_body'
  107. end
  108. if $npc_quest['q_next'] = '':
  109. gt $loc_id, 'failure', 'nav_forward'
  110. end
  111. if $npc_quest['q_back'] = '':
  112. gt $loc_id, 'failure', 'nav_back'
  113. end
  114. !! Section used to generate the user quests and other pertinent information
  115. !! Start vcard construction
  116. $vcard += '<center><h3>Ballet Quests - Characters</h3></center>'
  117. $vcard += '<br>'
  118. $vcard += '<div width="80%">'
  119. $vcard += '<div style="width: 120px; padding: 0; float:left"><img style="height:100px;" src="<<$npc_img_path[''<<$quest_id>>'']>>/<<ARGS[1]>>_profile.jpg"></div>'
  120. $vcard += '<div style="padding: 0;">'
  121. $vcard += '<p><ul style="margin:0; padding:0;">Name: <<$npc_firstname[''<<quest_id>>'']>> "<<$npc_nickname[''<<$quest_id>>'']>>" <<$npc_lastname[''<<$quest_id>>'']>></ul>'
  122. $vcard += '<ul style="margin:0; padding:0;">Date of Birth: ' + func('shortgs', 'convert_dob', ARGS[1]) + ' </ul>'
  123. $vcard += '<ul style="margin:0; padding:0;">Home: <<$npc_home[''<<$quest_id>>'']>></ul>'
  124. $vcard += '<ul style="margin:0; padding:0;">Location: Unknown</ul>'
  125. !! if debug is enabled show pop up msg:
  126. if debug['code'] = 1:
  127. gs 'quest_data_a<<ARGS[1]>>', 'debug'
  128. $vcard += '<ul style="margin:0; padding:0;">Debug Vars:<a href="exec:msg <<$npc_quest[''debug_data'']>>">Quest Vars (pop up)</a></ul>'
  129. end
  130. $vcard += '</p></div>'
  131. $vcard += '</div>'
  132. $vcard += '<br>'
  133. !! Output
  134. $vcard
  135. !! Start quest body construction
  136. $qsteps += '<div width = "80%">'
  137. $qsteps += '<div style="padding: 10px;">'
  138. $qsteps += '<h4>🔎 Quest hints:</h4>'
  139. if journal_hints = 0:
  140. $qsteps += '<a href="exec: journal_hints = 1 & gt ''<<$loc_id>>'', ''vcard'', <<ARGS[1]>>" >Enable hints</a><font color = "red"><b> Spoilers!</b></font> '
  141. else
  142. $qsteps += $npc_quest['hints']
  143. $qsteps += '<br> <br>'
  144. $qsteps += '<a href="exec: journal_hints = 0 & gt ''<<$loc_id>>'', ''vcard'', <<ARGS[1]>>">Disable hints</a> '
  145. end
  146. $qsteps += '<br>'
  147. $qsteps += '<h4>🧭 Quest requisites:</h4>'
  148. $qsteps += '<p><<$npc_quest[''body'']>></p>'
  149. $qsteps += '<br>'
  150. $qsteps += '</div>'
  151. $qsteps += '<div style="padding:5px; align: center;">'
  152. $qsteps += '<center><h5>Quest History</h5></center>'
  153. if $npc_quest['q_next'] = 'null':
  154. $next_nav = 'Current Stage'
  155. else
  156. $next_nav = '<a href="gs ''<<$loc_id>>'', ''navigation'', ''next'' "" >Next Stage</a> <b>→</b>'
  157. gs
  158. end
  159. if $npc_quest['q_back'] = 'null':
  160. $back_nav = 'Quest Start'
  161. else
  162. $back_nav = '<b>←</b> <a href="gs ''<<$loc_id>>'', ''navigation'', ''back'' " >Previous Stage</a> '
  163. end
  164. $qsteps += '<center><<$back_nav>> | <<$next_nav>></center>'
  165. $qsteps += '</div>'
  166. $qsteps += '</div>'
  167. $qsteps += '<br>'
  168. $qsteps += '<br>'
  169. !! Output
  170. $qsteps
  171. !! Clean up
  172. killvar '$vcard'
  173. killvar '$qsteps'
  174. killvar 'quest_id'
  175. killvar '$evt_suffix'
  176. end
  177. !! Navigation
  178. if $ARGS[0] = 'navigation':
  179. $nav_click = $ARGS[1]
  180. if $ARGS[1] ! '' and qstage = 1:
  181. $npc_quest['q_back'] = 'null'
  182. elseif qstage > 1 and $nav_click = 'next':
  183. qstage += 1
  184. elseif qstage >= 2 and $nav_click ='back':
  185. qstage -= 1
  186. else
  187. $debug['journal'] = 'Navigation failed to be set.'
  188. end
  189. killvar '$nav_click'
  190. gs 'quest_data_<<$quest_id>>', 'init'
  191. gs 'beta_journal_quests', 'init'
  192. end
  193. if $ARGS[0] = 'failure':
  194. !! Debug sections
  195. if $ARGS[1] = 'id':
  196. $debug['journal'] = 'NPC ID not set, vcard not generated.'
  197. elseif $ARGS[1] = 'quest_body':
  198. $debug['journal'] = 'Quest body not set, quests details was not set.'
  199. elseif $ARGS[1] = 'nav_forward':
  200. $debug['journal'] = 'No forward navigation set - please ensure you have set the var in quest_data'
  201. elseif $ARGS[1] = 'nav_back':
  202. $debug['journal'] = 'No back navigation set - please ensure you have set the var in quest_data'
  203. end
  204. 'vcard failed to initialise: ' + $debug['journal']
  205. end
  206. if $ARGS[0] = 'gametips':
  207. if $ARGS[1] = '1':
  208. 'If you have 50 skill in modern dance and Albina likes you might get a chance to join Starlets.'
  209. elseif $ARGS[1] = '2':
  210. 'Mon Cheri is the most prestigious clothing store in St. Petersburg, with a price tag to match.'
  211. elseif $ARGS[1] = '3':
  212. 'There is some parts of the game restricted to over-18s such as doing driving lessons, gambling at the casino and other areas. There is rumours that there is studios who are less fussy about sticking to the law.'
  213. elseif $ARGS[1] = '4':
  214. elseif $ARGS[1] = '5':
  215. elseif $ARGS[1] = '6':
  216. elseif $ARGS[1] = '7':
  217. elseif $ARGS[1] = '8':
  218. elseif $ARGS[1] = '9':
  219. end
  220. end
  221. !! Table Generator for npcs and locations
  222. if $ARGS[0] = 'table_gen':
  223. !! Original code by Anjuna
  224. entry_counter_i = 1
  225. entry_counter_j = 1
  226. table_counter = 0
  227. if ARGS[1] = 0:
  228. table_columns = 3
  229. else
  230. table_columns = ARGS[1]
  231. end
  232. $bjq_temp_table = '<center><table cellspacing="3" bgcolor="<<$theme[''table_bg_alt'']>>" width="80%" align="center">'
  233. :jmp_table_gen
  234. !! CREATE ROW
  235. $bjq_temp_table += '<tr width="100px">'
  236. :jmp_table_gen2
  237. !! CREATE CELL
  238. $bjq_temp_table += '<td align="left">'
  239. $bjq_temp_table += '<a href="exec: gt ''<<$loc_id>>'' ,''<<$loc_shortname[entry_counter_i]>>''">'
  240. $bjq_temp_table += '<img height="100" src="<<$loc_path[entry_counter_i]>>">'
  241. $bjq_temp_table += '</a>'
  242. $bjq_temp_table += '</td>'
  243. !! END CELL
  244. entry_counter_i += 1
  245. if entry_counter_i <= table_gen_max and (entry_counter_i mod table_columns) ! 0: jump 'jmp_table_gen2'
  246. $bjq_temp_table += '</tr>'
  247. !! END ROW
  248. !! CREATE ROW
  249. $bjq_temp_table += '<tr width="100px">'
  250. :jmp_table_gen3
  251. !! CREATE CELL
  252. $bjq_temp_table += '<td align="left">'
  253. $bjq_temp_table += $loc_name[entry_counter_j]
  254. $bjq_temp_table += '</td>'
  255. !! END CELL
  256. entry_counter_j += 1
  257. if entry_counter_j <= table_gen_max and (entry_counter_j mod table_columns) ! 0: jump 'jmp_table_gen3'
  258. $bjq_temp_table += '</tr>'
  259. !! END ROW
  260. table_counter += 1
  261. if table_counter = 5:
  262. !! ADD BLANK ROW
  263. $bjq_temp_table += '<tr></tr>'
  264. table_counter = 0
  265. end
  266. if entry_counter_i < table_gen_max: jump 'jmp_table_gen'
  267. $bjq_temp_table += '</table></center>'
  268. '<<$bjq_temp_table>>'
  269. killvar '$bjq_temp_table'
  270. killvar 'entry_counter_i'
  271. killvar 'entry_counter_j'
  272. killvar 'table_columns'
  273. killvar 'table_counter'
  274. killvar 'table_gen_max'
  275. end
  276. !! Set up locations for image paths for the loop
  277. if $ARGS[0] = 'pavlovsk_array':
  278. !! Set up locations for image paths for the loop
  279. loc_gen = 1
  280. !! Display Name
  281. $loc_name[loc_gen] = 'Five Eight Estate'
  282. !! $args[1] function name to show data
  283. $loc_shortname[loc_gen] = '58_estate'
  284. !! default game image file path
  285. $loc_path[loc_gen] = 'images/locations/pavlovsk/resident/apartment/complex.jpg'
  286. !! Area description to indicate what is in this area.
  287. $loc_description[loc_gen] = 'Five Eight Estate where your parents and aunt Luda live. There is also the garage that your father hires to fix his car.'
  288. !$loc_path[loc_gen] =
  289. loc_gen += 1
  290. $loc_name[loc_gen] = 'Commercial Area'
  291. $loc_shortname[loc_gen] = 'commercial'
  292. $loc_path[loc_gen] = 'images/locations/pavlovsk/gorodok.jpg'
  293. $loc_description[loc_gen] = ''
  294. loc_gen += 1
  295. $loc_name[loc_gen] = 'Industrial Area'
  296. $loc_shortname[loc_gen] = 'industrial'
  297. $loc_path[loc_gen] = 'images/locations/pavlovsk/factory/pav_factory.jpg'
  298. loc_gen += 1
  299. $loc_name[loc_gen] = 'Pavlovsk Market'
  300. $loc_shortname[loc_gen] = 'market'
  301. $loc_path[loc_gen] = 'images/locations/pavlovsk/pav_market_day.jpg'
  302. loc_gen += 1
  303. $loc_name[loc_gen] = 'Pavlovsk Park'
  304. $loc_shortname[loc_gen] = 'park'
  305. $loc_path[loc_gen] = 'images/locations/pavlovsk/park/skver.jpg'
  306. loc_gen += 1
  307. $loc_name[loc_gen] = 'Train Station'
  308. $loc_shortname[loc_gen] = 'train_station'
  309. $loc_path[loc_gen] = 'images/locations/pavlovsk/trainstation/vokzal.jpg'
  310. end
  311. --- beta_journal_quests ---------------------------------