[HELP] NO ENCOUNTERS ACCESSORY [2K3]
Posts
Pages:
1
So, I have this accessory in my game (called Demon Charm, which could be used by two separate characters) that's meant to mimic the Moogle Charm from FFVI (essentially, giving you No Encounters). However, this does not seem to work at all even though I followed a tutorial ages ago on it (it wasn't hard to do anyways, but ya know, just to be safe back then 3 years ago when I first started!). Can anyone confirm if it is possible to do such an accessory, and whether or not it works properly at all? And if so, if I couldn't get the coding from someone on that bit? Twould make debugging the game a lot quicker too x_x;;
For an accessory you need to have a common event running paralell like I just suggested and use conditional branches to determine if the accessory is equipped. If it is equipped turn off enemy encounters and not equipped it turns on.
These aren't the most efficient ways.
I think the most efficient way for game processing but not your processing... to make it so each and every door or staircase or map you enter to turn on a switch and then for every single map make an auto run event that would call a common event to check if you have the accessory equipped and turn off enemy encounters and then turn off the switch or else the autorun event would loop forever. The only downside is if someone unequips the accessory they'll still have no enemies until they go to a different map.
Then just copy and paste the autorun event for each map. Sounds tedious... but copy and paste.
These aren't the most efficient ways.
I think the most efficient way for game processing but not your processing... to make it so each and every door or staircase or map you enter to turn on a switch and then for every single map make an auto run event that would call a common event to check if you have the accessory equipped and turn off enemy encounters and then turn off the switch or else the autorun event would loop forever. The only downside is if someone unequips the accessory they'll still have no enemies until they go to a different map.
Then just copy and paste the autorun event for each map. Sounds tedious... but copy and paste.
Why would you c+p? Have a universal switch turn on at the start of the game that runs a common parallel process event. Encounters -> off if anybody has the equip, and the opposite. Easy.
If you don't get what I mean, look at the top of the common event screen. =P
If you don't get what I mean, look at the top of the common event screen. =P
What Craze said.
And that is totally a hat.
And that is totally a hat.
Well, here's the thing. This is what I have for my Common Event coding (I guess I narrowed it down to one character only for some reason...).
Common Event: Demon Charm
Trigger: Parallel Process
Switch:
Branch if Reimu Demon Charm Equipped
Encounter Rate: 0
Else Handler:
Encounter Rate: 80 (generally the default encounter rate in all areas)
End
Wait: 0.0 Sec
The problem is, I HAVE tested this, and I've still ended up getting random encounters with it on on the very same map that I equipped the accessory on. Unless it was something with 2k3 bugging up on me or something, which it's been known to do recently on random things...
Common Event: Demon Charm
Trigger: Parallel Process
Switch:
Branch if Reimu Demon Charm Equipped
Encounter Rate: 0
Else Handler:
Encounter Rate: 80 (generally the default encounter rate in all areas)
End
Wait: 0.0 Sec
The problem is, I HAVE tested this, and I've still ended up getting random encounters with it on on the very same map that I equipped the accessory on. Unless it was something with 2k3 bugging up on me or something, which it's been known to do recently on random things...
The problem I'm seeing with that Common Event is that... it's not being called. Well, unless you specifically call it in the contents of a map event, anyway!
I think Craze hit the solution on the nose, frankly.
I think Craze hit the solution on the nose, frankly.
Oh, forgot that this site doesn't like brackets. The Switch is supposed to be Switch 5000: Start of Game. >_>;;
Not quite sure what's wrong, I did it myself in 2k3 and it worked fine. No encounters with the accessory on.
I'm not insulting your intelligence or anything, but switch 5000 has been turned on, right?
I'm not insulting your intelligence or anything, but switch 5000 has been turned on, right?
Yes, it turns on at the start of the game. Unless I somehow forgot to turn it on (which could be a possibility since I've forgotten to turn things on/off before...)...
EDIT - Nope, it does turn on at the start of the game, so I dunno. Unless something else is interfering with it, which I'm not seeing anything else that would (only other thing that deals with random encounters is my Enemy Repel item, and that uses a switch itself so that shouldn't affect anything).
Although...looking at something, I'm noticing that I have 2 Common Events that are Parallel Processes and aren't triggered by any switches, and are meant for the Half-Encounter armors. Coding is as follows:
Common Event: Avoidance Aya/Momiji (these are 2 separate common events for some reason or another)
Trigger: Parallel Process
Trigger Switch: None
Branch if Aya (Momiji) Avoidance Equipped
Encounter Rate: 160
Else Handler
Encounter Rate: 80
End
Could that perhaps be what's causing it to not work correctly?
EDIT - Nope, it does turn on at the start of the game, so I dunno. Unless something else is interfering with it, which I'm not seeing anything else that would (only other thing that deals with random encounters is my Enemy Repel item, and that uses a switch itself so that shouldn't affect anything).
Although...looking at something, I'm noticing that I have 2 Common Events that are Parallel Processes and aren't triggered by any switches, and are meant for the Half-Encounter armors. Coding is as follows:
Common Event: Avoidance Aya/Momiji (these are 2 separate common events for some reason or another)
Trigger: Parallel Process
Trigger Switch: None
Branch if Aya (Momiji) Avoidance Equipped
Encounter Rate: 160
Else Handler
Encounter Rate: 80
End
Could that perhaps be what's causing it to not work correctly?
That's probably it actually. You've got one parallel process event checking for a no-encounter accessory and setting it to 0, then one checking for an avoidance accessory and setting it to -something-. They won't be compatible.
I would probably consolidate all equipment checks that affect encounter rate into a single parallel process and prioritise the check for no-encounter accessories before branching for others.
I would probably consolidate all equipment checks that affect encounter rate into a single parallel process and prioritise the check for no-encounter accessories before branching for others.
I'll have to think on how I'd want to set that up actually. Probably by using a variable to check for what you have equipped, and depending on what the variable is, having it read that process? For instance:
Branch if Reimu Demon Charm Equipped
Var. Encounter Set, 1
End
Branch if Aya (Momiji) Avoidance Equipped
Var. Encounter Set, 2
End
If Var. Encounter is 1
(Run script for Demon Charm here)
Else Handler
If Var. Encounter is 2
(Run Script for Avoidance here)
End
I'm assuming this is the best way to handle this, no?
Branch if Reimu Demon Charm Equipped
Var. Encounter Set, 1
End
Branch if Aya (Momiji) Avoidance Equipped
Var. Encounter Set, 2
End
If Var. Encounter is 1
(Run script for Demon Charm here)
Else Handler
If Var. Encounter is 2
(Run Script for Avoidance here)
End
I'm assuming this is the best way to handle this, no?
The problem with that is that your branch for any accessory that will definitely result in an encounter rate would have to be in an "else" branch for a conditional that checks for accessories that nix the encounter rate entirely, but if you do that your approach would work.
Well, the Demon Charm is the only accessory to deal with encounter rates so I don't think that would hurt too much with any other accessories? Avoidance is an armor and it's also the only armor that deals with encounter rates (there's a couple items that uses their own switches so those I don't have to worry about).
If Avoidance is the only armour that deals with encounter rates that's fine. For future reference though, if you ever do have multiple items that affect encounter rate you should branch them in order from 0 upwards to make sure you're always setting the appropriate rate.
So, how does this look then?
Common Event: Encounter Stuff
Trigger: Parallel Process
Trigger Switch: 5000: Start of Game
Branch if Reimu Demon Charm Equipped
Variable Oper: 1334 Encounter Set, 1
Else Handler
Branch if Aya Avoidance Equipped
Variable Oper: 1334 Encounter Set, 2
Else Handler
Branch if Momiji Avoidance Equipped
Variable Oper: 1334 Encounter Set, 2
Else Handler
Variable Oper: 1334 Encounter Set, 0
End
End
Branch if Var: 1334 Encounter is 1
Encounter Rate: 0
Else Handler
Encounter Rate: 80
End
Branch if Var: 1334 Encounter is 2
Encounter Rate: 160
Else Handler
Encounter Rate: 80
End
Wait: 0.00 Sec
That should work....right?
Common Event: Encounter Stuff
Trigger: Parallel Process
Trigger Switch: 5000: Start of Game
Branch if Reimu Demon Charm Equipped
Variable Oper: 1334 Encounter Set, 1
Else Handler
Branch if Aya Avoidance Equipped
Variable Oper: 1334 Encounter Set, 2
Else Handler
Branch if Momiji Avoidance Equipped
Variable Oper: 1334 Encounter Set, 2
Else Handler
Variable Oper: 1334 Encounter Set, 0
End
End
Branch if Var: 1334 Encounter is 1
Encounter Rate: 0
Else Handler
Encounter Rate: 80
End
Branch if Var: 1334 Encounter is 2
Encounter Rate: 160
Else Handler
Encounter Rate: 80
End
Wait: 0.00 Sec
That should work....right?
Actually, I think I need something for when the Encounter variable is 0, so that it doesn't get stuck on any of the others methinks...that's easy enough to fix, but yeah...thanks for the help! At least now that'll take care of that...I hope.
EDIT - Actually, looking at that, I think I need to do it like so:
Branch if Var: 1334 Encounter is 0
Encounter Rate: 80
Else Handler
Branch if Var: 1334 Encounter is 1
Encounter Rate: 0
Else Handler
Branch if Var: 1334 Encounter is 2
Encounter Rate: 160
End
Wait: 0.00 Sec
I think that's the best way of doing it? But then the problem arises if both the Demon Charm and the Avoidance is equipped...I want Demon Charm to override Avoidance so that the No Encounters takes precedence over the Half Encounters. @_@
EDIT - Actually, looking at that, I think I need to do it like so:
Branch if Var: 1334 Encounter is 0
Encounter Rate: 80
Else Handler
Branch if Var: 1334 Encounter is 1
Encounter Rate: 0
Else Handler
Branch if Var: 1334 Encounter is 2
Encounter Rate: 160
End
Wait: 0.00 Sec
I think that's the best way of doing it? But then the problem arises if both the Demon Charm and the Avoidance is equipped...I want Demon Charm to override Avoidance so that the No Encounters takes precedence over the Half Encounters. @_@
I'd do something like this to avoid a nasty chain of if/else statements:
var encounter = 0
if hero1 has 1/2 encounter accessory {
encounter = 2
}
if hero2 has 1/2 encounter accessory {
encounter = 2
}
...
if hero1 has 0 encounter accessory {
encounter = 1
}
if hero2 has 0 encounter accessory {
encounter = 1
}
...
if encounter = 0{
encounter rate = 80
}
if encounter = 1{
encounter rate = 0
}
if encounter = 2{
encounter rate = 160
}
wait 1.0s
OK, got that set up as such. Haven't tested it out due to mass coding of an ability, though now I have to make sure to modify my Encounter Up/Down items to fit with this I think, since they act as 2X Encounters/Half Encounters and don't take the accessories/armor into account...I'm assuming I can modify the Parallel Process to work with the Switches that the items turn on right? I'm not sure how exactly it would work...this is the coding for the 2X Encounters Item, if you're curious:
Common Event: Enemy Up
Trigger: Parallel Process
Trigger Switch: 0129: Encounter Up (Provided by the Demon Lure item)
Encounter Rate: 40
Wait: 30.0 Seconds (how long it's SUPPOSED to last)
Encounter Rate: 80
Switch Operation: 0129: Encounter Up OFF
How would I go about making this not screw with the above? @_@
EDIT - Enemy Repel is the same thing, but with Encounter Rate: 0 instead of Encounter Rate: 40.
Common Event: Enemy Up
Trigger: Parallel Process
Trigger Switch: 0129: Encounter Up (Provided by the Demon Lure item)
Encounter Rate: 40
Wait: 30.0 Seconds (how long it's SUPPOSED to last)
Encounter Rate: 80
Switch Operation: 0129: Encounter Up OFF
How would I go about making this not screw with the above? @_@
EDIT - Enemy Repel is the same thing, but with Encounter Rate: 0 instead of Encounter Rate: 40.
Pages:
1



















