Ammunition System & Add-on (Crafting System)

Discussion in 'JS Plugin Releases (RMMV)' started by Unconnected42, Oct 30, 2015.

  1. Unconnected42

    Unconnected42 Veteran Veteran

    Messages:
    108
    Likes Received:
    36
    First Language:
    French
    Ho, so you are using something replacing the 'normal' attack command?

    Just renaming it, or is it something more elaborated?

    What is the line you put in the actor/class/whatever's notebox to do that?

    This might be a serious hint!

    Also, have you tested the 'normal' ammo window?
     
  2. DarkSlayerEX

    DarkSlayerEX Veteran Veteran

    Messages:
    95
    Likes Received:
    9
    First Language:
    English
    "normal" ammo window?

    My weapon is what swaps out my skill

    On my class:

    <Battle Commands>

    WeaponCmd

    ActorCmd

    Items

    Guard

    </Battle Commands>

    on my weapon

    Bow:

    <Battle Commands>

    Skill:16

    </Battle Commands>

    on skill 16: "Shoot"

    <Ammo 9 Equip: 1>

    <Ammo 10 Equip: 1>
     
  3. Unconnected42

    Unconnected42 Veteran Veteran

    Messages:
    108
    Likes Received:
    36
    First Language:
    French
    By 'normal' ammo window, I mean the thing highlighted in this screenshot:

    ammunition_1b.png

    And actually, I did not even know that when you do something like that with Bobstah's Battle Command List, ammo is actually supposed to be displayed somewhere in the command window... I am learning things about my own plug-in here.  :guffaw:

    (EDIT: I just remember that quite early when I proposed the plug-in here, someone asked me to make this feature available for individual skills and not only attack command... so it is normal behavior that it gets displayed... I am suffering from amnesia, it seems)

    I will try that and see if I can make it work.

    EDIT: I tried to do more or less the same thing, and... well, sorry, but it actually works for me. Ammo is displayed correctly just next to the skill command.

    Which is really amazing, because it was really not even supposed to happen!

    Also, it seems that when you put an individual skill in attack command window (which is indirectly the case here) Bobstah's plug-in shows the skill description in a help window just above:

    ammunition3_1.png

    Did you try to display ammo in the help window to see if it worked better?

    (personnally, I don't like displaying in attack command, I don't find it 'pretty'...)
     
    Last edited by a moderator: Nov 22, 2015
  4. DarkSlayerEX

    DarkSlayerEX Veteran Veteran

    Messages:
    95
    Likes Received:
    9
    First Language:
    English
    Yes, that was me that asked for that =)

    I know what you mean though about using the help window. I tried using that before, and it didn't always fit in well. I was mainly bringing this up because if other people prefer to use the command menu ammo count like I am, they would run into my issue.
     
  5. DarkSlayerEX

    DarkSlayerEX Veteran Veteran

    Messages:
    95
    Likes Received:
    9
    First Language:
    English
    Sorry for double posting, but I didn't want to edit my post after basically 2 days. I ran into that issue where the ammo doesn't update until I defend. Even using the skill in a subcommand window instead of on the main command window. It's as if your mod isn't removing the ammo properly because of something in the ATB code. It does update once I have that character defend.. I don't know what's up with that, but it is still happening. It is happening to me even without Bobstah's command list mod even running...
     
  6. Unconnected42

    Unconnected42 Veteran Veteran

    Messages:
    108
    Likes Received:
    36
    First Language:
    French
    This is strange, I don't experience this... If you have some time, try to upload your project at some place where I can have a look at it.
     
  7. DarkSlayerEX

    DarkSlayerEX Veteran Veteran

    Messages:
    95
    Likes Received:
    9
    First Language:
    English
    Sorry, I've gotten super busy lately.. Barely enough time to get on my computer. I'll upload it for you as soon as I can.
     
    Last edited by a moderator: Nov 25, 2015
  8. Unconnected42

    Unconnected42 Veteran Veteran

    Messages:
    108
    Likes Received:
    36
    First Language:
    French
    I am double-posting myself, now, because I think I have good news : I (finally!) succeeded in replicating the bug!

    (our posts crossed each other... lol)

    The thing is, sometimes it happens, and sometimes not (which is why I did not see it at first)...

    After a bit of testing, I think I identified the factor that makes it happen: I only had the bug in situations where two characters had their ATB bars filled, and thus acted, at the exact same time. As soon as the two actors are desynchronized (typically one one of them guards instead of attack, or use a skill, etc), the problem disappear.

    I investigated a bit and discovered that when the two actors act at the same time, the system calls the JS function BattleManager.endAction (something called, as the name implies, at the end of any action) twice for the second actor to act instead of once for each actor.

    That function just happens to be the one where I placed the unequip/requip part of the skill cost management of my Ammunition system..

    I could certainly write a workaround for that (I just need to find another place for my piece of code, that should be feasible), but I should let Yanfly know about this anyway, because this is clearly a bug in his ATB plug-in!

    EDIT

    Tried fixing it. Please download the latest release and see if it still happens!
     
    Last edited by a moderator: Nov 25, 2015
  9. Unconnected42

    Unconnected42 Veteran Veteran

    Messages:
    108
    Likes Received:
    36
    First Language:
    French
    Moreover, the problem seems solved with the latest ATB version (1.10). You should be fine too if you update your ATB plug-in to that version.
     
    Last edited by a moderator: Nov 25, 2015
  10. DarkSlayerEX

    DarkSlayerEX Veteran Veteran

    Messages:
    95
    Likes Received:
    9
    First Language:
    English
    good news everyone! your plugin update seems to have fixed it. I tried Yan's first, but that didn't help on it's own. Hurray! (i'll have to do more bugtesting to see if i run into other issues now.. lol)

    It is also now working properly again with Bobstah's command list plugin! (Main command window)
     
    Last edited by a moderator: Nov 25, 2015
  11. Unconnected42

    Unconnected42 Veteran Veteran

    Messages:
    108
    Likes Received:
    36
    First Language:
    French
    Hello everyone!

    The plug-in was just updated (ver1.0.0 now).

    I ended up implementing something very close to what Roguedeus suggested in the previous pages. Equipped ammunition now have the possibility to possess charges, in which case charges will be reduced instead of the ammo item being consumed. the ammo is unequipped and destroyed when charges hit zero.

    This will work only for items that are independent ; therefore, you must be using ItemCore, and, of course, not having troubles having it work together with Ammunition System like some unfortunate people here...

    In the future, I will probably think about giving the possibility to have the item refilled (in which case it won't be destroyed when ammo hits zero), or having other ways to treat zero-charges items.
     
    Roguedeus likes this.
  12. Roguedeus

    Roguedeus It's never too late to procrastinate... Veteran

    Messages:
    527
    Likes Received:
    106
    First Language:
    English
    Primarily Uses:
    N/A
    Finely got around to trying out the charges option and it's not going so well... Test game, never fired a shot. Seems my ammo is empty right off.

    Did I do something wrong? I think I've followed your instructions. :)

    edit:

    All I did was take an existing non-charged ammo that was working fine, make it independent, add the charges note tag, start the game, equip the arrows, and fight.
     
    Last edited by a moderator: Jan 19, 2016
  13. Unconnected42

    Unconnected42 Veteran Veteran

    Messages:
    108
    Likes Received:
    36
    First Language:
    French
    I suspect that before testing the charges, you had several sorts of equip ammunition available for your weapon.

    The problem is that charged ammo is treated as a different kind of ammo than the normal equip ones: if a weapon has requirements for charged ammo and normal equip at the same time, then one of each sort must be equipped for the weapon to work... That means each type (charged and non-charged) should be associated to a different equip slot so that both requirements can be met and you can fire your weapon. This is actually the same as how it worked already with weapons and armors (weapon and armor requirements were treated separately).

    Of course, this is not how it is really intended to be used: rather, users are expected to choose one of the two paradigms (charges or normal) and stick to it - if you consider a gun, for example, there is no reason why it should work both with chargers and individual ammo depending on the case...

    In other words: try converting ALL your arrows to charged ammo and see what happens!
     
    Roguedeus likes this.
  14. Roguedeus

    Roguedeus It's never too late to procrastinate... Veteran

    Messages:
    527
    Likes Received:
    106
    First Language:
    English
    Primarily Uses:
    N/A
    Thanks for clearing that up! I had left reference to what was non-charge ammo, but had been deleted, thinking it would still be ignored. ;)

    All working so far!
     
  15. Unconnected42

    Unconnected42 Veteran Veteran

    Messages:
    108
    Likes Received:
    36
    First Language:
    French
    I begin to think I should clear that in the main post of the topic, too. Ever since I added weapons, charged equips, etc, things have gotten a bit more complicated than they were at the beginning.
     
    Last edited by a moderator: Dec 3, 2015
  16. Black Noise

    Black Noise Veteran Veteran

    Messages:
    94
    Likes Received:
    18
    First Language:
    English
    Primarily Uses:
    RMMV
    Hey.

    I'm liking the Charged Ammo feature so far - that way, I could store ammunition as magazines and create multiple types like High-Cap mags.

    Although is there a way to display how much ammo is in a particular "mag" by adding a tiny number on the icon?

    That way, when choosing between mags, you can easily prioritise magazines with the most bullets.

    In fact, it would be awesome if you could choose which mag to load with the Reload Skill or in your Battle Equip plug-in.

    Last of all, I had an idea for Item Crafting plug-ins that you could create full magazines by combining bullets with empty mags...

    So could it also be possible for expended "Charged Ammo" items to create new items to replace them in a future update?

    Thanks.

    Anyway, I wanna share something. 

    I was testing out different ammo types - basically Hollow Point bullets that are most effective against non-armored targets (like most monsters)

    and Armor Piercing rounds that deal more damage against... armored foes.

    Just so you know, I'm also using the Weapon Skill plug-in so each gun in my game uses a different "skill" with its own base damage and the damage formula

    is calculated with a Perception stat I made with Bobstah's Custom Stats plug-in instead of the Attack stat.

    In testing the ammo types out, I had them set the Attack Element to their respective types (HP and AP) and I had set the skill, which the weapon I'm testing uses, to have no attack element at all. Now I had my actor equipped with a pistol and HP ammo to battle against a monster. Afterwards, I tweaked the monster, adding an HP element rate of 200% so it should, in theory, be weak against the HP bullets.

    I ran another test battle, but found that the weapon dealt just as much damage as it did before I tweaked the monster.

    It showed that, again because I'm using the Weapon Skill plug-in, that the HP ammo didn't confer its element to the skill the weapon uses and I made very sure

    that skill was a Physical Attack (Not a Magical or Certain Hit!).

    Does anybody follow?
     
    Last edited by a moderator: Dec 7, 2015
  17. Unconnected42

    Unconnected42 Veteran Veteran

    Messages:
    108
    Likes Received:
    36
    First Language:
    French
    Hi!

    Having the ammo define correctly the actor's actual attack element gave me a bit of trouble too.

    In my case, when doing more or less the same thing as you do (weapon skill, etc), I needed to delete any attack element information for the weapon in the database (I also designed the skill to have normal attack), because it seems that the weapon element always take precedence over armor element. So the weapon must have no element at all.

    As for the possibility of charged ammo becoming some special other item when empty, it will certainly be implemented in the future - like, most probably in the next update !

    EDIT :

    Plug-in updated, and the addition discussed here has been implemented.
     
    Last edited by a moderator: Dec 10, 2015
  18. Roguedeus

    Roguedeus It's never too late to procrastinate... Veteran

    Messages:
    527
    Likes Received:
    106
    First Language:
    English
    Primarily Uses:
    N/A
    I can confirm that so far, this plugin plays nicely with Yanfly's new Skill Cost Items plugin... :) FYI
     
  19. Unconnected42

    Unconnected42 Veteran Veteran

    Messages:
    108
    Likes Received:
    36
    First Language:
    French
    Thanks for testing it out.  :)

    I have yet to test that new Yanfly plug-in. I dunno know if and when I'll test it, actually, from the little I know it seems it is just doing essentially the same thing as Ammunition, except for equip cost?
     
  20. Roguedeus

    Roguedeus It's never too late to procrastinate... Veteran

    Messages:
    527
    Likes Received:
    106
    First Language:
    English
    Primarily Uses:
    N/A
    There are several significant 'visual' differences, such as the way ammo is displayed, replacing TP/MP with item counts, etc... And a very useful lunatic option.

    There is also the ability to substitute ammo for a skill with another ammo, if an equip has the right note tag.

    While I am thinking about it, are you at all interested in adding new features to your plugin? I've thought of at least one maybe more that might complement existing options. :)
     

Share This Page