Need to event 1 time use weapons sort of

Sacrifyx

Veteran
Veteran
Joined
Oct 16, 2012
Messages
55
Reaction score
4
First Language
english
Primarily Uses
So I'm working on a space project at the moment. In it you can add parts to your ship to increase capabilities. In particular, I'm trying to figure out how to work fighter wings. On your main ship, you can add a fighter bay which will give you one wing of fighters. You can add a hangar bay to get another wing. Larger ships can add a flight deck to give 3 more wings and the largest carriers can equip 2 flight decks for a max total of 8 fighter wings with all pieces equipped. I want the fighter wings to only be usable once per battle - after you've launched all 8 wings, you're out of fighter cover for the remainder of the fight. The fighter wings themselves are (at least at this point) just a skill attack. You fire them off, they do their damage and then they're done. Is there a better way to set these up? Would I be better off looking into one of the ammunition systems available? I'm currently using Lecode TBS and the Yanfly plugins that come with the demo (CoreEngine, BattleEngineCore, BuffsStatesCore, SkillCore, SkillCooldowns, EventMiniLabel, EquipCore), Hime equip slots and enemy equips and Anima Shield States (present but not currently in use). Yanfly's SkillCooldowns doesn't seem to offer what I'm looking for, but it may be a matter of configuration I'm not familiar with.
 

Oddball

Veteran
Veteran
Joined
Sep 4, 2014
Messages
1,683
Reaction score
454
First Language
English
Primarily Uses
N/A
You could have the fighter wings add a state to themselves after they're used that seals them. If it's all one skill, just run a common event that increases a variable each time its used, and when it reaches 8, it adds a state that seals the skill (Using a conditinal branch. No else branch is needed)

The variable will need to be reset after combat
 

Sacrifyx

Veteran
Veteran
Joined
Oct 16, 2012
Messages
55
Reaction score
4
First Language
english
Primarily Uses
How would I account for the various pieces? Some ships might have only the fighter bay (1 wing), or that plus the hangar bay (2 wings total), or those plus a flight deck or just a single flight deck by itself (+3 wings for each flight deck). As I have it currently set up in a non-working state, each of those pieces is considered an armor piece, and each has traits that add the number of wings it would supply. While I'm at it, I suppose I should ask if you could show me an example of how you'd set up that common event...
 

Oddball

Veteran
Veteran
Joined
Sep 4, 2014
Messages
1,683
Reaction score
454
First Language
English
Primarily Uses
N/A
Edit: As for how, you might want to instead of increasing a global variable, use a self variables script, and have conditinal branches based on your upgrades. I'd say have two self variables. One for upgrades, and another for use of the skill

Fighterwings 1.png Fighterwings 2.png

Edit: Heres a self variables script
http://www.yanfly.moe/wiki/Self_Switches_&_Variables_(YEP)
 
Last edited:

Sacrifyx

Veteran
Veteran
Joined
Oct 16, 2012
Messages
55
Reaction score
4
First Language
english
Primarily Uses
Question about sealing skills - if I add the fighter wing skill to the flight deck, I'd add 3 copies of it and it should give me 3 options to launch the fighters. If each launch results in the sealing of the skill, will one launch seal the other two at well, or just the individual skill I used, thus enabling me to launch the other two wings?
 

Oddball

Veteran
Veteran
Joined
Sep 4, 2014
Messages
1,683
Reaction score
454
First Language
English
Primarily Uses
N/A
Do the flight decks use all the same copy of the skill? Are they different actors?
 

Sacrifyx

Veteran
Veteran
Joined
Oct 16, 2012
Messages
55
Reaction score
4
First Language
english
Primarily Uses
It would be copies of the same skill with my current setup, but now that you mention it, it does make sense to have fighter wing 1 through 8 as separate skills with each sealing individually on use. I also think I'll have to assign them individually to the various armor pieces, like Wing Alpha to the fighter bay, Bravo to the hangar, Charlie through Echo on flight deck 1 and Foxtrot through Hotel to flight deck 2.
 

Oddball

Veteran
Veteran
Joined
Sep 4, 2014
Messages
1,683
Reaction score
454
First Language
English
Primarily Uses
N/A
Wow, I think i solved this without intending to. Lol
 

Sacrifyx

Veteran
Veteran
Joined
Oct 16, 2012
Messages
55
Reaction score
4
First Language
english
Primarily Uses
You did, and you have my thanks! But, as is the case with these things, I walked into another wall.

So I created the individual skills, applied them to the individual armors, and I can now launch fighter wings and that's all groovy. But the seal isn't happening when I launch them, I'm able to repeatedly launch the same wings over and over.

Under skills, each wing has in the Effects box 'Add State Fighter Wing repair', which is the name of the state. I also created individual states for the wings, not sure that was necessary but that's where we are. In the Traits box for the states, I just have 'Seal Skill Fighter Wing Alpha' or Bravo or what have you, all set up just like your screenshot above. Am I missing something to get those skills to seal on use? I feel like this is something really stupid and simple I'm overlooking here.
 

Oddball

Veteran
Veteran
Joined
Sep 4, 2014
Messages
1,683
Reaction score
454
First Language
English
Primarily Uses
N/A
Put this in the damage formula
if (!a.isStateAffected(N)) a.addState(N); Damage formula

N = the state ID number
 

Sacrifyx

Veteran
Veteran
Joined
Oct 16, 2012
Messages
55
Reaction score
4
First Language
english
Primarily Uses
I put that in there and I still get no state applied to the actor, the fighter wing is still available for multiple uses.
 

Oddball

Veteran
Veteran
Joined
Sep 4, 2014
Messages
1,683
Reaction score
454
First Language
English
Primarily Uses
N/A
Did you put the state ID that seals it? For example, if you replace N with 1, it adds the death state to the actor. replacing N with 2 would add gaurd and so on

Edit: Damage formula would be replaced with something like ((a.atk*2.5))/((b.def/2.5)). If the skill doesn't do damage it wont work
 

Sacrifyx

Veteran
Veteran
Joined
Oct 16, 2012
Messages
55
Reaction score
4
First Language
english
Primarily Uses
Adding the actual damage formula at the end seemed to do the trick, that's all that was missing. Thanks a bunch for the ton of assistance on this, I'll keep you in mind for the next irritating problem I come across!
 

Oddball

Veteran
Veteran
Joined
Sep 4, 2014
Messages
1,683
Reaction score
454
First Language
English
Primarily Uses
N/A
Adding the actual damage formula at the end seemed to do the trick, that's all that was missing. Thanks a bunch for the ton of assistance on this, I'll keep you in mind for the next irritating problem I come across!
Ok. Glad i can help. I'm only skilled with the engine though, not a master. So no garuntee i can solve the next one
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

my profile has gotten so inaccurate.
I wrote this years ago, only now I posted an english version. How about we talk about procrastination?
I just noticed the minigame challenge. Now considering...
My project just started lagging during battletest and I haven't been able to figure out why...

Forum statistics

Threads
94,472
Messages
921,171
Members
124,311
Latest member
cadenm1223
Top