Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 12, 2005 13:44:38 GMT -5
I want my bosses to invoke some fear in the player, so I want to give them each a powerful move that damages all the members for about 1/2 their HP, but I don't want it to be possible for the player to die by bad luck of the boss doing this move 2 or 3 times in a row. How hard would it be to write a trait script for a boss that makes him only allowed to do this move every 4-6 turns, but otherwise just acts like the normal random-%-determines-move-done enemy AI? Would I need a different script for every boss and would their length depend on what else the boss could do?
|
|
|
Post by Dungeon Warden on Jun 12, 2005 15:10:24 GMT -5
Not hard if you understand how traits work and know to use all the variables, flags, and commands used in battle.
Yes. A basic attack is easy to do. The more options you add, the longer the script will get. The only hard part is setting the action variables so that the enemy can randomly attack the party members instead of always attacking the leader (which is the default setting).
Reading about the Trait flag and the Action Variables in my FAQ should help you get started. Good luck.
|
|
|
Post by Rodak on Jun 12, 2005 15:10:43 GMT -5
I think this will work for you:
Make two variables. One called "Will 'e do it?" and one called "Half 'em". Then..
=======================
Put first in trait script:
Data: Variable [Will 'e do it?] = 0 ? 99 Script Branch: Sort Variable: [Half 'em] Apply if #=4 Data: Variable [Will 'e do it?] = 0 ? 99 Script Branch: Condition: Variable [Will 'e do it?] < 33 <do the "Half 'em" Attack> Apply if #=5 Script Branch: Condition: Variable [Will 'e do it?] < 66 <do the "Half 'em" Attack> Apply if #=6 Data: Variable [Half 'em] = 0 + 0 <do the "Half 'em" Attack>
Then put this at the end of the trait script (and before any "Force Script End" commands.
Data: Variable [Half 'em] =[Half 'em] + 1
===========================
As for each individual boss, I suppose you could modify the above and make it a unique script, then call it from the desired trait scripts.
I hope that helps.
EDIT: I swear Dungeon Warden's post was not there when I started typing! Oh well Too many responses are better than too few.
Peace.
|
|
|
Post by The Smurf on Jun 12, 2005 16:11:45 GMT -5
lol
happens to me all the time.
-the smurf
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 12, 2005 18:26:17 GMT -5
Thank you everyone!
So a rough sketch of everything I have to do would be:
randomize a tempvariable randomize var50 'Target Member' from 0 to var18 'Participate Member'
if tempvariable is a certain value set var60 'Action: Action' to 0 (attack) call direct effect for normal attack somehow? variable boss ability = boss ability +1
if tempvariable is a certain value set var60 'Action: Action' to 2 (magic) set var61 'Action Itm/abty' to value for a certain spell if variable boss ability >= 5 call direct effect for that certain spell somehow? variable boss ability = 0 if variable boss ability <5 call this same script again
?
And if the Direct Effects are set to target 'Random Party Member/Random Enemy' do I still need to randomize var50 'Target Member' from 0 to var18 'Participate Member'?
|
|
|
Post by Dungeon Warden on Jun 12, 2005 21:15:26 GMT -5
randomize a temp variable randomize var50 'Target Member' from 0 to var18 'Participate Member' You can't change Var50. This is set when the direct effect target's an enemy. Instead you set var63: Action: Enemy to equal the Database number of the target. Also you have to randomly select one of the party members. Try using Member Order to randomly select a party member.
if temp variable is a certain value set var60 'Action: Action' to 0 (attack) call direct effect for normal attack somehow? Set Action: Itm/Abty to equal the database number of the direct effect or item you want to use. It is safer to use the Database Number For Variable command in case you rearrange your databases. variable boss ability = boss ability +1
if temp variable is a certain value set var60 'Action: Action' to 2 (magic) set var61 'Action Itm/abty' to value for a certain spell see above if variable boss ability >= 5 call direct effect for that certain spell somehow? not needed. All you need is to set Var61 variable boss ability = 0 if variable boss ability <5 call this same script again
All you need is to set the Action variables and the built in battle system will do the rest. Any action you set in the trait script will run when the script ends.
Note: Make sure you use the Trait flag. This is very important. Trait scripts always run twice a round and actions can only occur on an instigator's turn.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 13, 2005 19:49:30 GMT -5
Okay, thank you very much everyone! I think I can do it now. I'll try sometime this week and post my results.
|
|