[SOLVED][2K3 REQUEST/HELP] WEAPON BLESS CODING WOES...I'M COMPLETELY LOST NOW X_X;
Posts
Pages:
1
So, as ya'll probably know by now, I've been working with this command ability for the past half year now. I just FINALLY finished coding for a dual-wielding character to make it work right for the past 1 1/2 months and well...I don't know what's wrong! Here's some of the scenarios to put it into perspective.
A) I have Youmu equipped with Roukaken and Hakurouken. I use Fire to give the weapons Fire, then attack to make sure the graphics are there. They are, then I run away to check equipment. They revert as they should.
B) I have Youmu equipped with Roukaken and Oblivion. I do the same thing and run away. However, this time for some reason it equips TWO Oblivions...and there's nothing that states to equip 2 at all (for the Fire Roukaken + Fire Oblivion, it's supposed to remove the elemental bless weapons, which it does, and equip the Roukaken and Oblivion).
C) THIS one boggles my mind more. So I decided to give Youmu JUST the Oblivion, and I use Fire and attack with her. Oddly enough, she double attacks, so I escape and look at her inventory. Turns out for some reason, it gave her TWO Oblivions again...
I'm at a complete loss as to why the game's doing this. I am requesting anyone who is willing to take a look at the coding (JUST the coding, no need to get everything) and see what is wrong. No, I'm not going to force anyone to do it, and I certainly don't want anyone to go through each and every line of the coding as that would take forever. I just don't know what the problem is, and if I cannot resolve this issue, then I cannot well...do this correctly for dual-wielders, which means that 1 1/2 months of work spent was for naught. So if anyone can help figure this out, I would GREATLY appreciate it. I would like to actually finish this up for the other 3 dual-wielders and move on to something better than coding my life away >____>;;
A) I have Youmu equipped with Roukaken and Hakurouken. I use Fire to give the weapons Fire, then attack to make sure the graphics are there. They are, then I run away to check equipment. They revert as they should.
B) I have Youmu equipped with Roukaken and Oblivion. I do the same thing and run away. However, this time for some reason it equips TWO Oblivions...and there's nothing that states to equip 2 at all (for the Fire Roukaken + Fire Oblivion, it's supposed to remove the elemental bless weapons, which it does, and equip the Roukaken and Oblivion).
C) THIS one boggles my mind more. So I decided to give Youmu JUST the Oblivion, and I use Fire and attack with her. Oddly enough, she double attacks, so I escape and look at her inventory. Turns out for some reason, it gave her TWO Oblivions again...
I'm at a complete loss as to why the game's doing this. I am requesting anyone who is willing to take a look at the coding (JUST the coding, no need to get everything) and see what is wrong. No, I'm not going to force anyone to do it, and I certainly don't want anyone to go through each and every line of the coding as that would take forever. I just don't know what the problem is, and if I cannot resolve this issue, then I cannot well...do this correctly for dual-wielders, which means that 1 1/2 months of work spent was for naught. So if anyone can help figure this out, I would GREATLY appreciate it. I would like to actually finish this up for the other 3 dual-wielders and move on to something better than coding my life away >____>;;
If you want someone to look at it then post a zip of your game project or something. Your example cases don't mean anything if no one knows remotely how your system works.
That is true. Sometimes I don't think things through. Lemme upload that for you guys.
To find it in the Common Events, simply scroll down to the very end of the large list of common events. That is where the common events are stored for this particular character that I worked on (because the coding was so huge, I had to make 3 separate Common Events just for her). You can test these out quickly by going into New Game, then ???? (just use ghost to remove party members, pick up Youmu in the bottom left room, and then Patchouli/Byakuren for the Weapon Bless skills, then test it on a raft in the main room. This is ONLY if you're going to test it to see what the problem is. You may have to go to the right room in the main room and get all equipment before testing it even moreso).
http://www.mediafire.com/?br9daccr8kk1sq1
Yes, that's with everything that's not the music. Again, just follow the above instructions to find the coding in the database/test it out (I would look for the exact Common Event numbers, but I don't have 2k3 up right now and my computer as it is is dreadfully slow at the moment from other things...).
To find it in the Common Events, simply scroll down to the very end of the large list of common events. That is where the common events are stored for this particular character that I worked on (because the coding was so huge, I had to make 3 separate Common Events just for her). You can test these out quickly by going into New Game, then ???? (just use ghost to remove party members, pick up Youmu in the bottom left room, and then Patchouli/Byakuren for the Weapon Bless skills, then test it on a raft in the main room. This is ONLY if you're going to test it to see what the problem is. You may have to go to the right room in the main room and get all equipment before testing it even moreso).
http://www.mediafire.com/?br9daccr8kk1sq1
Yes, that's with everything that's not the music. Again, just follow the above instructions to find the coding in the database/test it out (I would look for the exact Common Event numbers, but I don't have 2k3 up right now and my computer as it is is dreadfully slow at the moment from other things...).
So nobody knows what the problem may be? : /
(Also, off-topic and all, but you wouldn't happen to be the same psy_wombats that I would know from a certain IRC channel, would you?)
(Also, off-topic and all, but you wouldn't happen to be the same psy_wombats that I would know from a certain IRC channel, would you?)
Normally I wouldn't bump a topic, but going to right now because still really need help on this. Nobody at all? :S
It could be a simple copy-paste duplication for the Oblivion swords. I've used alternate weapon swapping in the past. You have to watch out for left and right handiness. When you put the weapons back on, they might not be in the right order, but that sounds like a separate issue.
My sleep deprivation has me just two clicks up the dial from zombie right now, but I can have a look at things sometime tomorrow, if nobody has figured it out by then.
My sleep deprivation has me just two clicks up the dial from zombie right now, but I can have a look at things sometime tomorrow, if nobody has figured it out by then.
Well...I did try them in separate orders (Oathkeeper in left and Roukaken in right, and then Roukaken in left and Oathkeeper in right), and it did give me the same result with Oathkeeper so...no idea. I'm pretty sure there's no duplication anywhere since I set the coding up in such a way that it would only repeat each instance once (so you'd only ever see Oathkeeper + Oathkeeper coding once in the entire giant block of coding for Fire, and once in every other element as well).
You seem to be sleep deprived a lot now that I think about it. Doesn't seem too good o_o;;
You seem to be sleep deprived a lot now that I think about it. Doesn't seem too good o_o;;
I downloaded the project .rar and will be digging into it this afternoon.
Yeah, I don't get anywhere near as much sleep as I should. Supposedly, it takes one week of good sleep to recoup one night of sleep debt.
I haven't had a full night's sleep since the beginning of April, and I was up for 36+ hours straight the other day (and a half) to help take care of a family emergency.
Yeah, I don't get anywhere near as much sleep as I should. Supposedly, it takes one week of good sleep to recoup one night of sleep debt.
I haven't had a full night's sleep since the beginning of April, and I was up for 36+ hours straight the other day (and a half) to help take care of a family emergency.
Future Advice: Make sure to include the RPG_RT.exe in the folder, I know it was an attempt to stop us from playing with it or something, but you can't take a look at the project without it!
It really seems like you are doing things the hard way here, and you're expecting the engine to make distinctions it just doesn't make. Also, I've had entire custom battle systems that didn't take as long to load as some of your common events do.
By the way, you didn't seem to pack the RTP_RT.exe file with your project. I had to copy one into the folder to get RM to even open the file.
For starters, you do not need to add the Blessed Weapon type to the inventory. The equip command automatically generates the item if it is not already in your inventory.
EDIT - Okay, here's why it happens.
When you check if they have the Oblivion equipped, you have -
If Oblivion Equipped
---If Oblivion Equipped
You're TRYING to check for them having it in both hands. The engine just sees you checking to see if they have it equipped AT ALL.
If they only have one equipped, they will STILL pass both checks.
In that event, you equip the Oblivion TWICE, which is why two of them show up.
EDIT AGAIN-
To fix it, separate the checks into two calls. Just check to see if they have one of SWORD TYPE equipped, then after you swap it out, THEN check to see if they have the same SWORD TYPE still equipped and do your second swap then.
By the way, you didn't seem to pack the RTP_RT.exe file with your project. I had to copy one into the folder to get RM to even open the file.
For starters, you do not need to add the Blessed Weapon type to the inventory. The equip command automatically generates the item if it is not already in your inventory.
EDIT - Okay, here's why it happens.
When you check if they have the Oblivion equipped, you have -
If Oblivion Equipped
---If Oblivion Equipped
You're TRYING to check for them having it in both hands. The engine just sees you checking to see if they have it equipped AT ALL.
If they only have one equipped, they will STILL pass both checks.
In that event, you equip the Oblivion TWICE, which is why two of them show up.
EDIT AGAIN-
To fix it, separate the checks into two calls. Just check to see if they have one of SWORD TYPE equipped, then after you swap it out, THEN check to see if they have the same SWORD TYPE still equipped and do your second swap then.
Oops...well that was silly of me to completely forget that. My bad ^^;;;
Yeah, I didn't know if equipping said item would only equip it from the inventory or just from thin air (since ya know...I want to make sure things work right). Though does that mean if I use the equip command, will I have to remove the original weapon to avoid having it build up in the inventory? For example, with Oblivion, I unequip it with the Weapon Bless, but it's never removed, then when reverting it, it equips it again...this doesn't add 2 extra ones to the inventory...right?
And just so that I'm on the right page, it would look something like this.
If Oblivion Equipped
Youmu Weapon Unequip
Remove: Fire Oblivion 1
Equip Oblivion
End
If Oblivion Equipped
Youmu Weapon Unequip
Remove: Fire Oblivion 1
Equip Oblivion
End
Then repeat that for every other weapon?
Yeah, I'm by no means a master of coding (though I wouldn't think I'm a super slouch at it at this point in the game), so some of these will look pretty bad. I do need to condense some like Weapon Bless, but dear lord is that gonna take forever. It took me about 6 months in total just for all of the Weapon/Armor Bless coding so yeah...
EDIT - Actually, now I'm confused. What if it's not 2 of the same thing, and instead something like this:
If Hakuroukan Equipped
If Oblivion Equipped
Because it does equip 2 Oblivions even if you have something like that equipped. It does not seem to do this if you equip the Hakuroukan and Roukaken at all (regardless of the order they're in, it'll still equip them both).
Yeah, I didn't know if equipping said item would only equip it from the inventory or just from thin air (since ya know...I want to make sure things work right). Though does that mean if I use the equip command, will I have to remove the original weapon to avoid having it build up in the inventory? For example, with Oblivion, I unequip it with the Weapon Bless, but it's never removed, then when reverting it, it equips it again...this doesn't add 2 extra ones to the inventory...right?
And just so that I'm on the right page, it would look something like this.
If Oblivion Equipped
Youmu Weapon Unequip
Remove: Fire Oblivion 1
Equip Oblivion
End
If Oblivion Equipped
Youmu Weapon Unequip
Remove: Fire Oblivion 1
Equip Oblivion
End
Then repeat that for every other weapon?
Yeah, I'm by no means a master of coding (though I wouldn't think I'm a super slouch at it at this point in the game), so some of these will look pretty bad. I do need to condense some like Weapon Bless, but dear lord is that gonna take forever. It took me about 6 months in total just for all of the Weapon/Armor Bless coding so yeah...
EDIT - Actually, now I'm confused. What if it's not 2 of the same thing, and instead something like this:
If Hakuroukan Equipped
If Oblivion Equipped
Because it does equip 2 Oblivions even if you have something like that equipped. It does not seem to do this if you equip the Hakuroukan and Roukaken at all (regardless of the order they're in, it'll still equip them both).
Because it does equip 2 Oblivions even if you have something like that equipped. It does not seem to do this if you equip the Hakuroukan and Roukaken at all (regardless of the order they're in, it'll still equip them both).
As long as you have one Oblivion equipped, the event will trigger the same way. A quick stopgap measure might be to move the condition that checks for two swords of the same type to the end of the series. That way all other weapon combos would be checked first.
So then, at the VERY very end of the entire block, or at the end of the dual-checking block but before the single checking block? I'm assuming the very end...which also reminds me of will that also fix the issue of the game equipping 2 weapons magically when you only have one equipped (this one only applies to the Weapon Bless applying code, which is still the same thing regardless with the reverting code, just backwards engineering).
What confuses me though is that before the Oblivion/Oblivion coding (which is much further down the block), there's the coding for OTHER things (Hakuroukan/Oblivion for instance is like 200 something blocks up from the Oblivion/Oblivion), which I would assume it would read the Hakuroukan/Oblivion coding long before Oblivion/Oblivion, especially since the changes are supposed to happen immediately (in Hakuroukan/Oblivion, it would change the weapons immediately equipped to Fire Hakuroukan/Fire Oblivion, therefore I wouldn't think it'd be able to apply the Oblivion/Oblivion coding anymore since well...Oblivion isn't even equipped at that point and it's much further down the line. Same dealio with reversing it).
EDIT - So apparently, putting it at the very end DOES fix that. That's a bit confusing as to why it does that, but whatever works I suppose. I'll have to keep that in mind for the other 3 dual-wielders (assuming this doesn't take me forever to do in itself. Still don't know about whether or not I need to remove anything if I use "Equip", especially if you already have it in inventory unless it'll grab it from inventory if you already have it...)
What confuses me though is that before the Oblivion/Oblivion coding (which is much further down the block), there's the coding for OTHER things (Hakuroukan/Oblivion for instance is like 200 something blocks up from the Oblivion/Oblivion), which I would assume it would read the Hakuroukan/Oblivion coding long before Oblivion/Oblivion, especially since the changes are supposed to happen immediately (in Hakuroukan/Oblivion, it would change the weapons immediately equipped to Fire Hakuroukan/Fire Oblivion, therefore I wouldn't think it'd be able to apply the Oblivion/Oblivion coding anymore since well...Oblivion isn't even equipped at that point and it's much further down the line. Same dealio with reversing it).
EDIT - So apparently, putting it at the very end DOES fix that. That's a bit confusing as to why it does that, but whatever works I suppose. I'll have to keep that in mind for the other 3 dual-wielders (assuming this doesn't take me forever to do in itself. Still don't know about whether or not I need to remove anything if I use "Equip", especially if you already have it in inventory unless it'll grab it from inventory if you already have it...)
You can make a separate event to clean out any items that should not exist in the inventory, like the Blessed versions of the weapons. Just make another common event that checks to see if you have any of those items in your inventory, and removes them if necessary. Call it from the end of the removal common event(s).
I used this in an old game where the weapon, and by extension the animations and stats, changed based on the player's stats for that weapon type. I had basic versions, Dagger/Sword/Bow/etc, and then the duplicates for different levels of proficiency. At the start of the battle, I checked what weapon was equipped and stored a value into my WeaponUsed variable. (It would be complicated, but possible to do this with dual wield.)
The weapon would swap out for the different versions as needed. At the end of the battle, I removed the weapon and ran an event to put the right basic version back in place by referencing my storage variable. Then, I just did simple "If party has Item X, remove Item X" events at the end to keep the inventory clean.
I used this in an old game where the weapon, and by extension the animations and stats, changed based on the player's stats for that weapon type. I had basic versions, Dagger/Sword/Bow/etc, and then the duplicates for different levels of proficiency. At the start of the battle, I checked what weapon was equipped and stored a value into my WeaponUsed variable. (It would be complicated, but possible to do this with dual wield.)
The weapon would swap out for the different versions as needed. At the end of the battle, I removed the weapon and ran an event to put the right basic version back in place by referencing my storage variable. Then, I just did simple "If party has Item X, remove Item X" events at the end to keep the inventory clean.
Alright, everything FINALLY works as it should after forever. Now all that's left is the last 3 dual-wielders, and those 6-7 months of working on this one ability skillset will be over! OVEEEEEEEEEEEEEER! ;_;
Thank you Killer Wolf. Right now you are my hero (and you've helped me a looooot with the coding issues I've had in the past).
Thank you Killer Wolf. Right now you are my hero (and you've helped me a looooot with the coding issues I've had in the past).
Pages:
1
















