# mod_isample_options

*clr&cla
! This is where you place the configuration options for your mod.
'There are currently no options available for this mod.'

act 'return': gt 'mod_setting'

--- mod_isample_options ---------------------------------

# mod_isample_setup
!input basic mod information here. 
!this location must be the first one

$mod_info[0] = 'isample'
!0=mod name, saved to $mod_name[i] array 

$mod_info[1] = '10203'
!1=mod version
!this will be displayed as version 1.2, fix3.
!if you input 40500, will be showen as version 4.5

$mod_info[2] = 'illume'
!2=mod author

$mod_info[3] = 'This is a sample for new mod system, please fill your own mod in this form'
!3=mod description, input a short brief here.

$mod_info[4] = 'Options'
!4=mod options/settings link name.


if curloc = 'mod_<<$mod_info[0]>>_setup':
	usehtml = 1
	!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
	'<center><h1><font color=red>ACCESS DENIED</font></h1></center>'
	'<<$mod_info[0]>> is a mod for <b>Girl Life - English Community Version</b>, and can not be played individually.'
	''
	'You can find the main game in <a href="https://www.tfgamessite.com/index.php?module=viewgame&id=597">Tfgames site</a> (external link)'
	''
	'Our forum: <a href="https://tfgamessite.com/phpbb3/viewforum.php?f=70">Tfgames site</a> (external link)'
end

--- mod_isample_setup ---------------------------------

# mod_isample_readme
!input your mod detail readme here. you can use msg or detailed structure, just make sure to create act 'return': gt 'mod_setting'
*clr&cla
act 'return': gt 'mod_setting'

'<center>Mod <b>isample</b></center>'
'This is a sample for new mod system, please fill your own mod in this form
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.

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

3. The first location MUST be named as "mod_name_setup", this system will call it and load necessary information from it.
$mod_info[0] = mod name
$mod_info[1] = mod version
10203 will be displayed as version 1.2, fix3.
40500 will be showen as version 4.5
$mod_info[2] = author name
$mod_info[3] = short description for this mod

4. please create "mod_name_readme" location for mod detail readme (just like this location)
  If you really have only one line for this, you can use a simple msg instead a long text.
  
5. put all your entry point in location "mod_name"
You can use lots of condition check there, check this sample file yourself.
Frequency used condition:'
'<table>'
*p "<tr><td>current location"
"<td>if $curloc = '...'</td></tr>"
*p "<tr><td>current stage"
"<td>if $ARGS[0] = '...'</td></tr>"
*p "<tr><td>variable value"
"<td>if aaa > 10 </td></tr>"
'</table>
Please note that strings are case sensitive, you can use lcase() or ucase() to shft them before check.


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.)
for example, gs ''indik'', ''2'', 100

Have a nice day, and Welcome to join this Community!

--- illume, 2018/1/25'
--- mod_isample_readme ---------------------------------

# mod_isample
!input mod entry point here. this will be checked on every location, please keep it clean and brief to avoid game lag


!entry point 1: if player is on bed, create a new link to make her sleepy
if $curloc = 'bed2' and $args[0] = '':
	if pcs_sleep > 80:
		'[mod]... But You can make yourself <a href="exec:pcs_sleep=0&gt $curloc">sleepy!</a>'
	else
		'[mod]... And you are already sleepy.'
	end
end


!entry point 2: goto school directly from room
!Note that location name are case sensetive. you can use lcase() or ucase() to prevent bug
if lcase($curloc) = 'bedrpar' or ucase($curloc) = 'KORRPAR':
		act '[mod]<font color = green><b>Go to school</b></font>': minut += 1 & gt 'gschool_grounds', 'main'
end


!entry point 3: replace exit room act in apartment

if $curloc = 'bedrPar':
	delact 'Exit the room'
	act 'Exit the room':
		msg 'Now mod isample will send you to school directly'
		minut += 1 & gt 'gschool_grounds', 'main'
	end
end

!entry point 4: access in-mod location
if $curloc = 'pavResidential':
	act '[mod]Chase the rabbit':
		gt 'mod_isample_pavResidential'
	end
end

if $curloc = 'street':
	act '[mod]Jump into rabit hole':
		*clr & cla
		'[mod]Suddenly, everything blank out'
		gs 'mod_isample_street'
	end
end
--- mod_isample ---------------------------------

# mod_isample_pavResidential
!mod event. remember to add a act to exit
'[mod-isample]'
'You try to chase the rabbit in town, sadly, this is only a sample mod, so there are no rabbit in sight.'
act 'Back to town': gt 'pavResidential'
--- mod_isample_pavResidential ---------------------------------

# mod_isample_street
!mod event. remember to add a act to exit
'[mod-isample]'
'You try to jump into rabbit hole, sadly, this is only a sample mod, so you can not even find a hole to jump.'
act 'Back to street': gt 'street'
--- mod_isample_street ---------------------------------

