Custom Game Help

You can create a custom game file using your PSP then edit it later to add scripting or you can
create your own custom game file from scratch and add scripting all at once.  Make sure there is
a CR LF after each life.  For Unix/Linux a LF only should be okay. (haven't tested though)

Be careful, there isn't any error checking right now with scripting so if you mispell a command
or setting the game will not import the line correctly and will probably shut your PSP off after
a few seconds if you try playing it.  If this happens check your file carefully for errors or 
lines without a LF after it.  You can usually view the file in-game to see if there is a problem without playing the game. It will only freeze if you play the game usually.  So viewing the 
compiled script screen will show what Squarez actually understood.  So if you see a parameter 
missing such as ADDENEMY(), then you know there was a problem so you can fix it.


*** Custom Game Settings ***

Below is a complete list of all of the settings necessary to create a custom game

Complete Settings List

NAME= (use to to aprox 35 chars to describe the name)
AUTHOR= (use to to aprox 35 chars to describe the author)
DESCRIPTION= (use to to aprox 35 chars for a description)
ALLOWTURBO=0 (0=no/1=yes) Allow player to press X for turbo
ALLOWSLOW=0  (0=no/1=yes) Allow player to press O for slow
ALLOWRAGE=0  (0=no/1=yes) Allow player to build and use rage (triangle)
POWERUPSPAWNSTART=5 (1-?) nextspawn = POWERUPSPAWNSTART+(score/POWERUPSPAWNSLIDE)
POWERUPSPAWNSLIDE=10 (0=don't spawn powerups,1-?) see above formula
ENEMYSPAWN=x (0=don't spawn/1-?) Spawn an enemy every x pills collected.
BLOCKERSPAWN=12 (...same...) Blockers
SMARTBLOCKERSPAWN=20 (...same...) Smart Blockers
GENBLOCKERSPAWN=0 (...same...) Generator Blockers
GENBABYSPAWN=24 (...same...) Baby Generators
BOMBSPAWN=0 (...same...) Bomb Blockers
HIVESPAWN=0 (..same..) Enemy Hives
GRENADESPAWN=15 (0=don't spawn/1-?) When to spawn grenade powerups
GRENADESTART=6	(0-?) # of grendes player starts with
GRENADESUPPLIES=6 (0-?) # of grenades player acquires from powerup
GRENADEPILL=0 (0=no/1=yes) Bomber type pill counters which awards grenades
GRENADEHURT=1 (0=no/1=yes) Does grenade shrapnal kill player
GRENADEBONUS=2 (0-?) # of bonus grenades for collecting a grenade pill very quickly
GRENADEPILLQTY=1 (0-?) # of grenades to acquire collecting pill before time runs out
BONUSLIFESPAWN=80 (0-?) when to spawn the bonus life powerup
BOMBNUKE=0 (0=off/1=on) Spawn nukes
BOMBFREEZE=0 (0=off/1=on) Freeze Bombs
BOMBSCATTER=0 (0=off/1=on)Scatter Bombs
BOMBCLUSTER=0 (0=off/1=on) Cluster Bombs
BOMBCLUSTERSTORM=1 (0=off/1=on) Cluster Storm Bombs
BOMBRAGE=1 (0=off/1=on) Rage Powerup


*** Scripting Engine Reference Manual **

Default Structure:

SCRIPT=spawn#,cmd,param1,param2,...

spawn# is the score necessary to activate the script line. This can be set to 0 for GAMETIMER and ADDENEMY to setup the screen before hand.
cmd is the script command (See Scripting Commands)
params is where necessary params for cmd are used

Scripting Commands: (more to be added later)
ADDENEMY
MODSETTING
WINGAME
GAMETIMER

Command Usage:

ADDENEMY - Adds an enemy to the screen

Usage:
SCRIPT=spawn#,ADDENEMY,enemy type

Example: (Includes all possible enemy types)
SCRIPT=1,ADDENEMY,ENEMYDEFAULT
SCRIPT=2,ADDENEMY,ENEMYGENBABY
SCRIPT=3,ADDENEMY,ENEMYBLOCKER
SCRIPT=4,ADDENEMY,ENEMYSMARTBLOCKER
SCRIPT=5,ADDENEMY,ENEMYGENERATOR

Line #1 = Generate a default enemy at score 1
Line #2 = Generate a generator baby at score 2
Line #3 = Generate a blocker at score 3
...

etc


MODSETTING - Modify a custom game setting

Usage:
SCRIPT=spawn#,MODSETTING,setting to mod,value

Example:
SCRIPT=10,MODSETTING,GENBLOCKERSPAWN,10

Same effect as saying GENBLOCKERSPAWN=10 in your usual game file, but this setting is set when the player hits score 10.

See the Complete Settings list above for the names of all of settings which you can use MODSETTING
with.

This will allow you to create a new sliding scale of difficulty based on score. A simple example:

Your usual custom game settings: (partial list)
ENEMYSPAWN=1
BLOCKERSPAWN=12
SMARTBLOCKERSPAWN=18
GENBLOCKERSPAWN=0
BOMBSPAWN=10

Settings explained:
Typical game when normal enemies spawn after each pill, blockers don't come out till every 12 points, smart-blockers every 18 points, and no gen blockers early on in the game with a std bomb timer.

Let's say you want to create about 3 different levels of difficulty:
(1st diffculty, increase blocker spawn rate and decrease bomb spawn rate at score 24)
SCRIPT=24,MODSETTING,BLOCKERSPAWN,8
SCRIPT=24,MODSETTING,BOMBSPAWN,12

(2nd difficulty, introduct generators at score 40, and make them appear every 10 points now and decrease bomb spawn even more)
SCRIPT=40,MODSETTING,GENBLOCKERSPAWN,10
SCRIPT=40,MODSETTING,BOMBSPAWN,16

(3rd difficulty, increase blocker spawn rate, gen spawn rate and further reduce bomb spawns)
SCRIPT=70,MODSETTING,BLOCKERSPAWN,4
SCRIPT=70,MODSETTING,GENBLOCKERSPAWN,8
SCRIPT=80,MODSETTING,BOMBSPAWN,20

WINGAME Usage:
SCRIPT=80,WINGAME

The player receives a msg that he won the game when he reaches a score of 80, and the game ends allowing for a high score. Everyone who won would have the same score.

GAMETIMER Usage:
SCRIPT=30,GAMETIMER,60

When the player reaches a score of 30 this sets off a game timer of 60 seconds (enter up to a max of 999 seconds). You would either want to introduce a WINGAME after a cetrain mark that the user needs to get to, or just make it a mad dash to collect as much as possible before the game is forced over.

I haven't tried this, but you would also be able to set a mark and add another GAMETIMER command to refresh the game, forcing the user to make it to certain markers, one after another! sounds interesting...

EDIT: I have tried above and it works. I tried linking 10 sec timers every 10 points with a std arcade setup and it was pretty damn hard.

See my game TURBOTHRILLS in the custom folder for a demo of GAMETIMER and WINGAME.



Example Script code from TURBOTHRILLS.TXT
SCRIPT=0,GAMETIMER,30
SCRIPT=15,MODSETTING,ENEMYSPAWN,0
SCRIPT=15,MODSETTING,GENBABYSPAWN,1
SCRIPT=16,ADDENEMY,ENEMYGENBABY
SCRIPT=17,ADDENEMY,ENEMYGENBABY
SCRIPT=17,ADDENEMY,ENEMYGENBABY
SCRIPT=18,ADDENEMY,ENEMYGENBABY
SCRIPT=18,ADDENEMY,ENEMYGENBABY
SCRIPT=18,ADDENEMY,ENEMYGENBABY
SCRIPT=19,ADDENEMY,ENEMYGENBABY
SCRIPT=19,ADDENEMY,ENEMYGENBABY
SCRIPT=19,ADDENEMY,ENEMYGENBABY
SCRIPT=19,ADDENEMY,ENEMYGENBABY
SCRIPT=20,MODSETTING,BOMBSPAWN,10
SCRIPT=20,MODSETTING,BOMBCLUSTERSTORM,1
SCRIPT=21,MODSETTING,BOMBSPAWN,0
SCRIPT=21,MODSETTING,BOMBCLUSTERSTORM,0
SCRIPT=25,WINGAME

As you can see I force the game to end afer 30 seconds, but if the Player can reach a score
of 25 before 30 seconds then he wins the game.  Scripts for score 15-19 is forcing more
enemies to spawn than usual.  I then force the next bomb to appear to be a cluster storm.
The forced cluster storm could have been done through the normal settings, but this was
done for demonstration purposes.
