This is a remake I made of the databattle system as found in the little known game
Spybotics: The Nightfall Incident that was on lego.com. It supports all units
and all commands found in that game and replicates the system accurately. The
Nightfall Incident uses a phase-based tactical battle system, that is, a system
where the player moves its units and attacks, and then the enemy does the same.
Here are the necessary script calls. For more information, look at the script
sections DataBattle and Main in the sample project.
Databattle functions
pbDataBattle(name) - Starts a databattle with the layout specified by _name_.
That layout can be edited using the databattle editor and must be placed in the
Data folder. This function returns either 1 if the player won, or 2 if the
player lost.
pbDataBattleEditor - Opens the databattle editor.
Functions that manage the player's programs. The actual list is stored in
$game_system.programlist .
pbGainProgram(name,quantity) - Adds a program to the player's programs. The amount
is specified in _quantity_.
pbLoseProgram(name,quantity) - Removes a program from the player's programs.
The amount is specified in _quantity_.
pbProgramQuantity(name) - Returns how many of a program the player has.
Link to the project:
DataBattle (February 1, 2008)
Spybotics: The Nightfall Incident that was on lego.com. It supports all units
and all commands found in that game and replicates the system accurately. The
Nightfall Incident uses a phase-based tactical battle system, that is, a system
where the player moves its units and attacks, and then the enemy does the same.
Here are the necessary script calls. For more information, look at the script
sections DataBattle and Main in the sample project.
Databattle functions
pbDataBattle(name) - Starts a databattle with the layout specified by _name_.
That layout can be edited using the databattle editor and must be placed in the
Data folder. This function returns either 1 if the player won, or 2 if the
player lost.
pbDataBattleEditor - Opens the databattle editor.
Functions that manage the player's programs. The actual list is stored in
$game_system.programlist .
pbGainProgram(name,quantity) - Adds a program to the player's programs. The amount
is specified in _quantity_.
pbLoseProgram(name,quantity) - Removes a program from the player's programs.
The amount is specified in _quantity_.
pbProgramQuantity(name) - Returns how many of a program the player has.
Link to the project:
DataBattle (February 1, 2008)