This script allows you to create a tree with three independent branches of custom skills.
Skills can be active and passive, as well as have consistent access or be available for learning at all times. Skills are learned for skill points, you can add the issue of skill points to your script, or use the script of the skill point as a collectable item included in this product.
The skill tree can save progress between levels, as well as work with the standard GameGuru save system.
This product also includes 15 ready-made skills.
The script interface has high visual customization. You can easily change all used colors and images in the script settings.
List of skills included in the product
Gatherer
Gives a 25% chance to find additional ammo for weapons in hand.
Fires no more than once every 60 seconds.
Last chance
Adds one ammo to the weapon clip if it runs out.
Two for the price of one
Gives a 30% chance to save ammo after firing.
Fires no more than once every 45 seconds
Lull
Automatically loads the weapon in hand without spending ammunition.
Fires no more than once every 120 seconds.
The counter is interrupted by a shot.
Bloodhound
Gives a 40% chance to find additional ammo for weapons in hand
and 10% chance to find 10 ammo for weapons inhand.
Fires no more than once every 30 seconds.
Replaces the"Gatherer" skill.
Spare clip
Loads an additional clip if the weapon is out of ammo.
Replaces the "Last Chance" skill
Lead rain
Allows you to shoot without reloading for 30 seconds.
Cooldown - 360 seconds.
Press G to activate.
Respite
Restores 0.5% health per second
if no damage was taken for 60 seconds.
First aid kit
Instantly restores 25% of health.
Cooldown - 60 seconds.
Press H to activate.
Second wind
Restores 50% health if its level is below 5%.
Cooldown - 360 seconds.
Always ready
Recovers 10% health over 5 seconds after taking damage.
Cooldown - 120 seconds.
Halt
Restores 2% health per second
if no damage was taken for 60 seconds.
Replaces the "Respite" skill.
Combat stimulant
Instantly restores 45% of health.
Cooldown - 60 seconds.
Replaces the "First Aid Kit" skill.
Press H to activate.
Inspiration
Restores health, grants unlimited regeneration for 10 seconds.
Cooldown - 240 seconds.
Press J to activate.
Reflex
Automatically reloads empty weapons.
Abbreviated Usage Documentation
Adding a skill tree to a level
To add skill tree to a level, place any entity on it. Change the properties of this entity:
·
StaticMode on
No
·
AlwaysActive on
Yes
·
Main on
stv233\skill tree\skilltree.lua
Specify "Load" in the "Name"property if you want the skill tree to be loaded from the previous level.
Done, now the skill tree is added to the level, use Y (default) to open the interface.
Saving the skill tree between levels
To save skill tree between levels, you must create conditions at both levels. At the level from which we transfer (hereinafter referred to as level 1) and at the level to which we are
transferred (hereinafter referred to as level 2).
At level 1, place the Win Zone, in the
Main property of this zone specify"stv233 \ skill tree\ Markers \ winzone_save.lua".
In the
IfUsed property of this zone, specify the name of level 2.
At level 2, create an skill tree according tothe item 'Adding a skilltree to a level'. Inthe Name property, specify "Load".
Skill creation
Usethe following template to create your skill tree
Tree =
{
{
['Name'] = "SkillName",
['Price'] = 1,
['Image'] = "imagePath",
['Description'] =
{
"Description line 1",
"Description line 2"
},
['Type'] = "SkillType",
['Access'] = "Access",
['Active'] = false,
['Timer'] = 0,
['Variables'] = {['Savable'] = {}, ['Unsavable'] = {}},
['Init'] = function(e)
Tree[i]['Timer'] =GetTimer(e)
end,
['Main'] = function(e)
if ((Tree[i]['Active']))then
--Skill function here
end
end
},
}
Wherethe name of the skill is specified in the ['Name'] field,
The['Price'] field indicates the required number of skillpoints,
The['Image'] field contains the path to the skill icon,
The['Description'] field contains an array of strings describing the skill,
['Type']indicates the type of skill, specify "Active" if you want the skill
icon to be displayed during the game as a skill available for use.
The['Access'] field indicates the type of access to the skill, specify
"Consistent" if you want the skill to be available for learning only
after studying the previous skill in the tree. For the first skill in the tree,
specify "Always".
The['Init'] field specifies the function that is triggered when the script is
initialized.
The['Main'] field indicates the main function of the script.
Where iis the ordinal number of the script in the tree.
To storecustom values, use the ['Variables'] field: ['Variables'] ['Savable'] - for
stored values, ['Variables'] ['Unsavable'] - for unsaved values.
Fields that are savable:
['Price'],
['Access'],
['Active'],
['Variables'] ['Savable']