Adding a New Attack Skill
Last updated
Last updated
Navigate to:
Assets/RGame/RoguelikeKit/ScriptableObjects/DataSO/Skill/AttackSkill/BothSideSkill.asset
Right-click an existing skill → Duplicate
Rename (e.g., FireWhirlwind_Skill.asset
)
Right-click in folder → Create → RGame → RoguelikeKit → Skill → BothSideSkill
Name it with clear convention (e.g., IceSpear_Skill.asset
)
Open the new skill config in Inspector and modify:
SkillType
Attack/Attribute
SkillIcon
UI display icon
Key
Unique identifier
MixAttributeSkillKey
Required attribute skill for super-weapon upgrade
SkillPrefab
Velocity
Movement speed
Duration
Active time (seconds)
CD
Cooldown time
Damage
Base damage value
Amount
Initial projectiles
Area
Effect size/scale
UpgradeAttribute
Enhanced stat per level
Since it's difficult to modify the attack mode of the skill without writing code. Then, I will teach you how to quickly write different attack modes with the help of AI. I believe that even if you have no coding experience, you can quickly create the motion effects you want.
All you need to do is copy the following paragraph and specify the motion effect you want to write. As well as the names of the two scripts, it is best to name one ending in SkillCast and the other in Skill.
You will then get two scripts, one with SkillCast named at the end and the other with Skill named at the end.
Copy the provided CircularAttackSkillCast
and CircularAttackSkill
scripts
Ask your AI assistant to:
"Modify these scripts to create a [describe your desired motion effect] pattern"
Example requests:
"Make projectiles spiral outward"
"Create a boomerang return effect"
"Make skills orbit around the player"
Create New Components:
In Unity, navigate to:
Create two new C# scripts named:
[YourEffectName]SkillCast.cs
(e.g. SpiralSkillCast.cs
)
[YourEffectName]Skill.cs
(e.g. SpiralSkill.cs
)
Paste AI-Generated Code:
Replace all content in both files with the AI-modified versions RGame.RoguelikeKit
(e.g. SpiralSkillCast.cs SpiralSkill.cs
)
Open the gameplay scene:
Set up Skill Manager:
Right-click SkillManager
→ Create Empty
Name it (e.g. "SpiralAttack_Manager")
Drag your [YourEffectName]SkillCast
script onto it
Key is the logo name of your customized skill Other configurations are the same as the picture below
Configure Prefab:
Locate your skill prefab
Remove any existing skill script
Add your [YourEffectName]Skill
component
Link components:
Assign your prefab to the SkillPrefab
field in your SkillConfigSO
Add the SkillConfigSO to SkillManager
's SkillData
array
Set identifiers:
Ensure the Key
field matches in:
SkillConfigSO
SkillCast component
ObjectPool settings
Enter Play Mode to test
Common adjustments via AI:
"Increase projectile spread by 30%"
"Add gradual size scaling"
"Make projectiles accelerate over time"
Troubleshooting Tips:
If skills don't appear:
Verify all Key
fields match exactly
Check SkillManager's SkillData
array has your config
If movement behaves oddly:
Ask AI to "debug velocity calculation in [script name]"
Pro Tip: Use these exact phrases for AI modifications:
"Make the projectiles home toward enemies"
"Add wave pattern to movement"
"Create 8-way directional attack"