Location template actual game places that can be visited - toolkitxx/Girl-life-QOL-quality-of-life-mod GitHub Wiki

Below you can see the location template as it can be found in the current qsp. Most of it has been commented to enable you to create your own new locations but here is some extra info to make it even easier.

*P 'This is an empty template to be used for a new location. Please follow the given structure to enable everyone to easily add/change content. make sure to delete this part in your newly created location'
!Make sure to empty the 'Description' area before saving

!Preamble - this section is reserved for general variables that need to be set here and cant be set otherwsie in a module
CLOSE ALL
!Preamble end

!Name - please dont change the formatting only replace the actual name
!This name should also be the parameter for any function calls with this location as a destination
!add a section for this location to module 'navigation' when creating new locations
'<center><b><font color="maroon">LOCATIONNAMEHERE</font></b></center>'
!Name end

!Picture - this should be a jpg. Please dont change the formatting just replace path and name with the actual full   path to the picture
'<center><img src="PATH/PICTURENAMEHERE"></center>'
!Picture end

!Desciption self
!This contains the description of the location and only the location
!Keep the blockquote and use html formatting to structure and format your text after it
!Use $_str += and build a description by adding elements including conditional parts. This ensures real dynamic text
'<blockquote>'
!Description self end

!Description other
!everything else visible in the location goes here. Objects and other persons as well as descriptions of possible exits
!Use $_str += and build a description by adding elements including conditional parts. This ensures real dynamic text
!The provided 2 lines produce the actual output and reset the string to blank afterwards - dont delete pls
'<<$_str>>'
$_str=''
!Description other end

!Actions
!The first action should always be the exit or leave action. If there is more than one exit make a proper menu like this:
!gs'Menu.Create','MENUNAME'
!	gs'Menu.Add','MENUNAME','actual name in the menu','icon graphic (fullpath)','navigation','PARAMETER FOR CHOSING THE CORRECT DESTINATION'
!every proper made location should keep the call to the wait module to allow the player to control the flow

act 'Leave': gs'Menu.Call','MENUNAME'
gs 'MOD_default_activities','wait'
!Actions end

The preamble lets you add mosts flag/tags that are needed to make your place work properly with standard commands and functions. There are 2 basic informations that are almost essential to provide:

  • public or private
  • indoors or outdoors

Both options are currently used as a string in the variable $location_type at the very beginning of each location. Combined they look like this: $location_type = 'public_indoors'

This implementation will be changed slightly as the clean-up moves on and will then use simple flags for each sub-type - that's 2 flags. It will change the usage of $location_type to define what the place actually is to take advantage of the modular commands and functions to fill a place and make it work.

Example:

!! 2 possible values to be read from left to right - 0 for first option, 1 for second option

loc_in_or_out = 0 &!This is now defined as a indoors location

loc_public_or_private = 1 &!This location is now defined as an private location

$Location_type = 'bathroom'

Why this split? Simply to make the location_type behave very unique and enable it to utilize to be filled with standard activities without coding too much. Standard activities like waiting, taking a shower , putting on make-up, cooking food or eating a meal, using a desk or bed are currently moved and cleaned to be part of modules because in their core they all behave completely identically. Single code calls with a single extra parameter will allow the user to chose standard activities with adjusted behaviour or a single code call without any extra parameters will use the default activity.

Example:

A standard wait code looks like this:

act 'Wait':
	cla
	waiting = input ("How long would you like to wait? (Not more than 120 minutes)")

	if waiting <= 0 or waiting > 120:
		minut += 15
	elseif waiting > 0 and waiting <= 120:
		minut += waiting
	end

	act 'Take a look at the clock':gt curloc
end

Waiting on a bench only adds a single line of code - an extra picture before asking for the users input. This can be controlled via the extra parameter - lets call it 'bench' for our example. The actual calls for both look like this:

gs 'MOD_standard_activities','wait'

or

gs 'MOD_standard_activities','Wait', 'bench'

The extra work is now done by the module and not the person that wants a special implementation of wait for specific things. Modules generally will have a coder taking care of it to free writers and event creators from dealing with too much code. The 'bench' change will now be available for any future work as a standard activity.

By having a unique identifier what kind of location we are dealing with the modules can prevent user mistakes in the code by calling the wrong parameter for example. The base versions of those activities will check themselves what kind of location we are dealing with and sends the proper version back to where it was called from. This ensures exact same behaviours across the game for same activities!

⚠️ **GitHub.com Fallback** ⚠️