So actually I want to have a spell start with low success rate and as you level up it increases (or when some events occur in the game). I have a spell called Ice breath that calls the powers of dragons and then releases a breath of ice to your opponents. However at the beginning the dragon's don't lend you their powers so easily and as you get stronger (level up) or if you befriend an ice dragon the spell success rate increases.
Also I have a Ice spike spell. You create spikes of ice piercing your opponent, however I want as you level up to increase the number of spikes that appear - meaning the repeats of the skill.
So is there any way on making the invocation's of skills improve (or become worse) according to player's behaviour and level? (mainly level )
Is there any script for something like this ?
(note: I know I can create the spell many times and just change its invocation and have it removed from the player when he gets the next level of the move, but I am looking for a better solution)
Spell
Ice Breath
(Apply State to user - State Ice Breath)
State
State Ice Breath
(Does nothing)
Variable
Variable Chance
Variable Roll
Common Event
Ice Breath
1 Set Variable Chance - Level*X (Where X is your base chance in your game)
2 Set Variable Roll - Random (X to N) make the gap between them based on difficulty to cast spell (small gap = easy || large gap = hard)
3 Conditional Branch - If Variable Chance is Equal to or Greater Than Roll then (Deal Damage of spell) Else (Nothing)
Troop Menu
(set this on all troops!)
New Page X (X can be any number)
every turn
conditional branch - if (Character) has state (State Ice Breath) then call Common Event (Ice Breath)
Remove state (State Ice Breath) from (Character)
If you want me to make a video I will :3
also I LOVE YOUR AVATAR
Well,there are probably better ways of doing this, but this will do the trick.
below this line on Game_Battler script:
rate *= user.hit if item.physical?paste this:
rate += user.level * 0.01 if user.actor? && item.damage.element_id == 1This will increase success rate by 1% for each level, only when the skill has the element 1 (in this case, physical, but i recommend you to create a new element for your skill)
For the Ice spike spell, i think you'll have to create several skills, using a evented or scripted system, don't know if there is another way...
Thanks for the help. I will try your solutions and tell you if they are working for me.
Thanks for the avatar (its from No game no life , my favourite anime so far)
pretty sure that will affect all skills which might cause conflict with other skills.
You'll probably want to make a conditional branch that makes it so only skill's with certain id's are affected.
screw it .. I will do this :
rate = 1 if game_switches[switch_id] == true && item.damage.element_id == 11 and have all the skills that get 100% success by this switch in one element ...
I don't know the exact code off the top of my head but you can make an if/else condition that points to the skill_id's in question and still use the same element. The way you're going about it is somewhat inefficient and puts more work on you in the long run if you intend to have enemies week to Ice (ID 1) and Ice (ID 11).
I think it's something like...
if skill_id.include(x) return rate += user.level * 0.01 if user.actor? && item.damage.element_id == 1elsif skill_id.include(x) && game_switches[switch_id] == true return rate = 1endIt's psuedo code so it won't plug and play into the game. The actual terms for all that escape me at the moment.
Yes I know that It would require me to have enemies interact with both elements.
I just don't know how to call the skill_id...
For the skill I was making I think it is okay the way I did it ( since its an Ice breath spell , so I made it Dragon element, and so I will also have more spells in this category I would like to get 100% success rate with the same switch.
I am sure I will need it for other skills, however so . I will keep seaching and asking...
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.