isample.txt 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. # mod_isample_options
  2. *clr&cla
  3. ! This is where you place the configuration options for your mod.
  4. 'There are currently no options available for this mod.'
  5. act 'return': gt 'mod_setting'
  6. --- mod_isample_options ---------------------------------
  7. # mod_isample_setup
  8. !input basic mod information here.
  9. !this location must be the first one
  10. $mod_info[0] = 'isample'
  11. !0=mod name, saved to $mod_name[i] array
  12. $mod_info[1] = '10203'
  13. !1=mod version
  14. !this will be displayed as version 1.2, fix3.
  15. !if you input 40500, will be showen as version 4.5
  16. $mod_info[2] = 'illume'
  17. !2=mod author
  18. $mod_info[3] = 'This is a sample for new mod system, please fill your own mod in this form'
  19. !3=mod description, input a short brief here.
  20. $mod_info[4] = 'Options'
  21. !4=mod options/settings link name.
  22. if curloc = 'mod_<<$mod_info[0]>>_setup':
  23. usehtml = 1
  24. !this will be only showed if you exec mod file. This location should be only called by gs, so this line will not trigger on normal mod playing
  25. '<center><h1><font color=red>ACCESS DENIED</font></h1></center>'
  26. '<<$mod_info[0]>> is a mod for <b>Girl Life - English Community Version</b>, and can not be played individually.'
  27. ''
  28. 'You can find the main game in <a href="https://www.tfgamessite.com/index.php?module=viewgame&id=597">Tfgames site</a> (external link)'
  29. ''
  30. 'Our forum: <a href="https://tfgamessite.com/phpbb3/viewforum.php?f=70">Tfgames site</a> (external link)'
  31. end
  32. --- mod_isample_setup ---------------------------------
  33. # mod_isample_readme
  34. !input your mod detail readme here. you can use msg or detailed structure, just make sure to create act 'return': gt 'mod_setting'
  35. *clr&cla
  36. act 'return': gt 'mod_setting'
  37. '<center>Mod <b>isample</b></center>'
  38. 'This is a sample for new mod system, please fill your own mod in this form
  39. 1. Since QSP can not load location with same name, and there are no warning about this during adding new qsp files, please name ALL YOUR LOCATION NAME with <B>mod_name_xxx</B> to avoid duplication bug.
  40. 2. please DO NOT use space or non-ascii character in location name. you can use use _ instead. -- this may cause bug on txtsplit function for git
  41. 3. The first location MUST be named as "mod_name_setup", this system will call it and load necessary information from it.
  42. $mod_info[0] = mod name
  43. $mod_info[1] = mod version
  44. 10203 will be displayed as version 1.2, fix3.
  45. 40500 will be showen as version 4.5
  46. $mod_info[2] = author name
  47. $mod_info[3] = short description for this mod
  48. 4. please create "mod_name_readme" location for mod detail readme (just like this location)
  49. If you really have only one line for this, you can use a simple msg instead a long text.
  50. 5. put all your entry point in location "mod_name"
  51. You can use lots of condition check there, check this sample file yourself.
  52. Frequency used condition:'
  53. '<table>'
  54. *p "<tr><td>current location"
  55. "<td>if $curloc = '...'</td></tr>"
  56. *p "<tr><td>current stage"
  57. "<td>if $ARGS[0] = '...'</td></tr>"
  58. *p "<tr><td>variable value"
  59. "<td>if aaa > 10 </td></tr>"
  60. '</table>
  61. Please note that strings are case sensitive, you can use lcase() or ucase() to shft them before check.
  62. 6. Due to techinque issue, this mod system CAN NOT recognition locations use value in ARGS (luckly, only system functions use this, so you shall not worry about this.)
  63. for example, gs ''indik'', ''2'', 100
  64. Have a nice day, and Welcome to join this Community!
  65. --- illume, 2018/1/25'
  66. --- mod_isample_readme ---------------------------------
  67. # mod_isample
  68. !input mod entry point here. this will be checked on every location, please keep it clean and brief to avoid game lag
  69. !entry point 1: if player is on bed, create a new link to make her sleepy
  70. if $curloc = 'bed2' and $args[0] = '':
  71. if pcs_sleep > 80:
  72. '[mod]... But You can make yourself <a href="exec:pcs_sleep=0&gt $curloc">sleepy!</a>'
  73. else
  74. '[mod]... And you are already sleepy.'
  75. end
  76. end
  77. !entry point 2: goto school directly from room
  78. !Note that location name are case sensetive. you can use lcase() or ucase() to prevent bug
  79. if lcase($curloc) = 'bedrpar' or ucase($curloc) = 'KORRPAR':
  80. act '[mod]<font color = green><b>Go to school</b></font>': minut += 1 & gt 'gschool_grounds', 'main'
  81. end
  82. !entry point 3: replace exit room act in apartment
  83. if $curloc = 'bedrPar':
  84. delact 'Exit the room'
  85. act 'Exit the room':
  86. msg 'Now mod isample will send you to school directly'
  87. minut += 1 & gt 'gschool_grounds', 'main'
  88. end
  89. end
  90. !entry point 4: access in-mod location
  91. if $curloc = 'pavResidential':
  92. act '[mod]Chase the rabbit':
  93. gt 'mod_isample_pavResidential'
  94. end
  95. end
  96. if $curloc = 'street':
  97. act '[mod]Jump into rabit hole':
  98. *clr & cla
  99. '[mod]Suddenly, everything blank out'
  100. gs 'mod_isample_street'
  101. end
  102. end
  103. --- mod_isample ---------------------------------
  104. # mod_isample_pavResidential
  105. !mod event. remember to add a act to exit
  106. '[mod-isample]'
  107. 'You try to chase the rabbit in town, sadly, this is only a sample mod, so there are no rabbit in sight.'
  108. act 'Back to town': gt 'pavResidential'
  109. --- mod_isample_pavResidential ---------------------------------
  110. # mod_isample_street
  111. !mod event. remember to add a act to exit
  112. '[mod-isample]'
  113. 'You try to jump into rabbit hole, sadly, this is only a sample mod, so you can not even find a hole to jump.'
  114. act 'Back to street': gt 'street'
  115. --- mod_isample_street ---------------------------------