Skill system

Show off your mod creations or just a work in progress.
Post Reply
User avatar
AshSlave
Posts: 9
Joined: Sun Mar 22, 2015 10:09 am

Skill system

Post by AshSlave » Thu May 14, 2015 6:00 pm

Hello. I'm quite new to programming and modding communities (and to speaking English or just speaking in general), so I hope I won't be much of a nuisance.
Long before the announcement of DFTU I had an idea of skill system, and not long before announcement I finally decided to try it. It's an experiment and probably won't see much use even when I'll finish it, but I simply can't bear it being only an idea in my head anymore. And it was very good surprise, that the game I wanted to test my ideas in the most, got new life in the engine that I've chosen for my experiment. So thank you for making it possible.

What I've made so far:
  1. Attributes - you check against them whenever you're doing any action. Each time it checks maximum value and current tension, depending on them it returns how much of the attempted action is successful and how much failed, success raises tension and is used to power action, fail is used to make undesirable or just random results from the action. Depending on tension attribute slowly raises or atrophies over time, and if tension raises over the maximum value, it damages attribute. Both damage and atrophy are stored, so it's faster to remember/heal, than it's to learn new. Tension is quickly decreasing, but there's also accumulation, which raises and decreases slowly, and acts like a minimum value for tension, so you cant just catch your breath and be fully restored after hard work.
  2. Binding menu - sort of spellmaking in TES 1-4, but also for any other action. It lets you bind action to the hotkey and set its power/range/etc.
  3. Some sample actions - not much, just some basic movement, fire ball, fire touch and levitation.
What I plan to do:
  1. More actions - more targets for spells (on self, spray, around, aura, like those you can see in TES games), climbing, parkour, marks for distant spells like teleportation, summoning and just channeling of spells, whatever else I'll feel like doing.
  2. Effects - some system to deal with various continuous spell effects and maybe even AI (since effects like fear are closely tied with AI).
  3. Interaction with others - make attributes responsible for character's temper and let them work like other actions: eg. your character interacts with some introvert NPC, you choose something in dialogue that depends on attributes of introvert, first it checks yours, then result is checked against attributes of NPC and if both are successful, NPC likes you more, if you failed NPC thinks that you're insincere, if NPC failed, it triggers response depending on what exactly was attempted.
Image
I'll post the code if someone's interested, but first I'll need to clean it from embarrassing things I've made while learned C# and Unity.

User avatar
LypyL
Posts: 514
Joined: Sun Mar 22, 2015 3:48 am

Re: Skill system

Post by LypyL » Thu May 14, 2015 11:45 pm

Hello Ashslave, that's a great first post! Thanks for sharing. I'd definitely like to see your code when it's ready. :D

User avatar
Interkarma
Posts: 4832
Joined: Sun Mar 22, 2015 1:51 am

Re: Skill system

Post by Interkarma » Fri May 15, 2015 12:01 am

Welcome Ashslave. That's some impressive work! Take all the time you need to clean up your code and share when ready. I look forward to seeing more. :)

User avatar
AshSlave
Posts: 9
Joined: Sun Mar 22, 2015 10:09 am

Re: Skill system

Post by AshSlave » Sun May 24, 2015 3:31 am

Sorry for taking so long, I found unexpectedly many things to be dissatisfying and got carried away. I am still not satisfied, but I'll post it as is right now with some simple placeholders.
https://www.dropbox.com/s/g0b7kjjwz2anm ... ckage?dl=0
Movement.cs and MotionMagic.cs rely on sPlayerMotor.cs that comes with DTFU with some minor modifications. I haven't changed anything other than that, so weapon attacks are not skill based yet.
How to make it work:
  • You need an input axis "Altitude" (with your desired buttons and default settings of vertical and horizoncal), in order for levitation to work, and a "Menu" button for binding and skill menu.
    Add CharacterBody, Effects, PlayerInterface, FireMagic, MotionMagic, Movement and my version of PlayerMotor to the player. Player should be tagged as "Player".
    Add FireBallPrefab inside the FireMagic and everything from Textures folder to the PlayerInterface with respectively to the field name.
    Add CharacterBody and Effects to enemies (though it will only make them damageable with fireballs). I just used [RequireComponent(typeof(ExperimentalAttributes.Effects))] (which in turn pulls CharacterBody) in EnemyDeath in order to put it on all enemies.
Since I don't have much experience, I probably did a lot of things wrong. Critique would be appreciated.
Also, it's the first time I make something public and don't know what to do with licenses. Is it something I should worry about? Can I just say that you're free to do whatever you want with everything I left here?
PS: If you'll find weird indentation, that's because first I used Windows version of MonoDevelop (under wine), then Linux version, and now I'm just using vim.

User avatar
LypyL
Posts: 514
Joined: Sun Mar 22, 2015 3:48 am

Re: Skill system

Post by LypyL » Sun May 24, 2015 8:10 pm

Cool! Thanks for sharing, I look forward to trying it out. :)

User avatar
Interkarma
Posts: 4832
Joined: Sun Mar 22, 2015 1:51 am

Re: Skill system

Post by Interkarma » Mon May 25, 2015 11:24 pm

Great stuff AshSlave! I have downloaded and will try out as soon as I can. :)

For the license, my preference is MIT. It's compatible with most open source licenses and is very simple and permissive. It also doesn't impose any form of copyleft restrictions (like GNU). It's a nice license that devs can easily understand.

Post Reply