Ammunition System & Add-on (Crafting System)

Black Noise

Veteran
Veteran
Joined
Aug 23, 2012
Messages
94
Reaction score
18
First Language
English
Primarily Uses
RMMV
Being able to dismantle charged ammo items and receive bullets based on how many charges are left? :D
 

Unconnected42

Veteran
Veteran
Joined
Oct 24, 2015
Messages
108
Reaction score
36
First Language
French
Primarily Uses
I am open to suggestions for the plug-in evolution.  :)

However, it is probable that updates will come a bit slower now, since my hype over MV has started lowering a bit and I am also beginning to remember I also have a game or two left on Ace that I'd like to finish one day.  :guffaw:
 

Roguedeus

It's never too late to procrastinate...
Veteran
Joined
Mar 19, 2013
Messages
527
Reaction score
106
First Language
English
Primarily Uses
N/A
This may not be what you expected, but it reminds me of those movies where the guns never seem to run out of ammo as fast as they should... Or in my case, the the archers always seem to find arrows to shoot. ;)

I was going to suggest the ability to assign note tags to trait objects that can grant the ammo user 'free' uses of the item. Perhaps they can have a ratio and/or a chance.

Example: Every 5 uses 1 will be free and/or 20% chance of a free use.

I can imagine the option being truly random, or guaranteed minimum. Such that you are guaranteed to get ONE free shot within every 5 shots. When that free shot occurs is random, but if you've gone 4 shots without a free shot, then the 5th shot will be guaranteed free... etc...

For those that wish to have LUCK factor in, you may even allow for the player to set the chance via a formula. (Which a flag that makes is a true random, or guaranteed minimum)
 
Joined
Jan 23, 2014
Messages
159
Reaction score
19
First Language
English
Hello Unconnected,

I ran into a serious bug, updating your script. Whenever I try to use a bow that is tagged with the "Ammo i Equip: c" tag for my arrows it would make my arrow (armor) disappear and not be able to be equip the arrows at all. o_O;

here are some screenshots.

Truthseeker (Weapon): http://i.imgur.com/mxX794l.png

Artemis Arrow(Armor):  http://i.imgur.com/k8o2mrd.png

Initial Equip: http://i.imgur.com/CsEoE3K.png

After loadup, checking equips (Not there!): http://i.imgur.com/yZXj0Vl.png

Checking inventory... (Spoiler: Not there) http://i.imgur.com/TtueECO.png

After talking to guy to give items...: http://i.imgur.com/oLIM1Fa.png

Trying to equip Artemis Arrow again (Still not able to appear): http://i.imgur.com/nv34lh6.png

Also I made sure to give Aquarius the ability to equip ammo, as well as the Truthseeker having that ability innately.

Is anyone else having this issue?
 
Last edited by a moderator:

Roguedeus

It's never too late to procrastinate...
Veteran
Joined
Mar 19, 2013
Messages
527
Reaction score
106
First Language
English
Primarily Uses
N/A
Another detail I forgot to mention... The ammo free shot chance would take into consideration the type of ammo being used. It would apply only to the ammo type it notes.

The note tag, would be for trait objects like states, classes, etc... That way an actor can use an ability that temporarily grants them ammo free shots (no ammo loss) for the next 5 actions or something.
 

Unconnected42

Veteran
Veteran
Joined
Oct 24, 2015
Messages
108
Reaction score
36
First Language
French
Primarily Uses
@MrPurpleDreadlocks :

That was because your ammo cost was zero. The functions verifying armor/weapon equippability basically asked the cost to be more than zero to allow armor/weapon to be equippable, which was wrong. Try the latest update, that should correct it.

Thanks for reporting the bug.  :)

@Roguedeus :

Suggestion noted.

To sum it up, the basic idea is to have states/whatever affecting ammo consumption...  I don't know if and when I will implement it, but I will definitely give it some thought.
 
Last edited by a moderator:

IL RASTA

Villager
Member
Joined
Dec 16, 2015
Messages
8
Reaction score
1
Primarily Uses
Hello to all

PLEASE ... I tried and tried ... but i can not understand the know are stupid but I can not understand so please a working demo .... thanks
 

Unconnected42

Veteran
Veteran
Joined
Oct 24, 2015
Messages
108
Reaction score
36
First Language
French
Primarily Uses
I was too lazy until now to make a demo, but I will maybe make one if that can be useful... It might take a bit of time, I hope you are not too much in a hurry!

EDIT: By the way, what is it that does not work exactly?
 
Last edited by a moderator:

SoulOfRock

Veteran
Veteran
Joined
Mar 19, 2014
Messages
38
Reaction score
6
First Language
Spanish
Primarily Uses
When i enter in a combat this happend (And yes,is above all the scripts)
 

TypeError: Cannot read property '_itemId' of undefined

    at Game_Enemy.Game_BattlerBase.canPaySkillAmmoCost (unco_ammunitionsystem.js:691)

    at Game_Enemy.Game_BattlerBase.canPaySkillCost (unco_ammunitionsystem.js:626)

    at Game_Enemy.Game_BattlerBase.canPaySkillCost (YEP_SkillCore.js:702)

    at Game_Enemy.Game_BattlerBase.meetsSkillConditions (rpg_objects.js:2776)

    at Game_Enemy.Game_BattlerBase.meetsSkillConditions (YEP_SkillCore.js:618)

    at Game_Enemy.Game_BattlerBase.meetsSkillConditions (jay_dualtechs.js:316)

    at Game_Enemy.Game_BattlerBase.canUse (rpg_objects.js:2788)

    at Game_Enemy.Game_BattlerBase.canUse (YEP_X_Subclass.js:617)

    at Game_Enemy.isActionValid (rpg_objects.js:4493)

    at Game_Enemy.<anonymous> (rpg_objects.js:4531)
 
Last edited by a moderator:

Unconnected42

Veteran
Veteran
Joined
Oct 24, 2015
Messages
108
Reaction score
36
First Language
French
Primarily Uses
When i enter in a combat this happend (And yes,is above all the scripts)

TypeError: Cannot read property '_itemId' of undefined

    at Game_Enemy.Game_BattlerBase.canPaySkillAmmoCost (unco_ammunitionsystem.js:691)

    at Game_Enemy.Game_BattlerBase.canPaySkillCost (unco_ammunitionsystem.js:626)

    at Game_Enemy.Game_BattlerBase.canPaySkillCost (YEP_SkillCore.js:702)

    at Game_Enemy.Game_BattlerBase.meetsSkillConditions (rpg_objects.js:2776)

    at Game_Enemy.Game_BattlerBase.meetsSkillConditions (YEP_SkillCore.js:618)

    at Game_Enemy.Game_BattlerBase.meetsSkillConditions (jay_dualtechs.js:316)

    at Game_Enemy.Game_BattlerBase.canUse (rpg_objects.js:2788)

    at Game_Enemy.Game_BattlerBase.canUse (YEP_X_Subclass.js:617)

    at Game_Enemy.isActionValid (rpg_objects.js:4493)

    at Game_Enemy.<anonymous> (rpg_objects.js:4531)
Strange. Is your actor equipped with a weapon or not ?

I just noticed that the function is actually used on an enemy and not an actor when that bug happens... Since enemies normally have no weapons, that should definitely not happen. Could you give a list of the plug-ins you are using?
 
Last edited by a moderator:

SoulOfRock

Veteran
Veteran
Joined
Mar 19, 2014
Messages
38
Reaction score
6
First Language
Spanish
Primarily Uses

Unconnected42

Veteran
Veteran
Joined
Oct 24, 2015
Messages
108
Reaction score
36
First Language
French
Primarily Uses
Normally, Ammunition should be placed below anything else, except for a few (known) plug-ins. See first post for details.


However, I am not sure at all that the problem you encounter is due to this.


If moving the plug-in below is not enough, please test the following version instead of the one you currently have :


http://pastebin.com/4f4meYMW
 

SoulOfRock

Veteran
Veteran
Joined
Mar 19, 2014
Messages
38
Reaction score
6
First Language
Spanish
Primarily Uses
Normally, Ammunition should be placed below anything else, except for a few (known) plug-ins. See first post for details.

However, I am not sure at all that the problem you encounter is due to this.

If moving the plug-in below is not enough, please test the following version instead of the one you currently have :

http://pastebin.com/4f4meYMW
Thank you so much,i use the version you give me, and now works :D
 
Last edited by a moderator:

PTS

Member Title? :D
Veteran
Joined
Jan 6, 2016
Messages
35
Reaction score
3
First Language
ru
Primarily Uses
my mistake - inattention. the problem is solved. thanks for the plugin!
 
Last edited by a moderator:

Prescott

argggghhh
Veteran
Joined
Aug 28, 2014
Messages
467
Reaction score
356
First Language
English
Primarily Uses
RMMV
Using this script, I am getting the error


"cannot read property 'item_id' of undefined"


I have it at the bottom of the plugin list and when I turn it off this is not an issue.


It only happens when the enemy is going to use the skill Attack. Doesn't happen when the player is going to use it.


None of my skills or weapons currently have notetags.


Here's my log:

Code:
TypeError: Cannot read property '_itemId' of undefined
    at Game_Enemy.Game_BattlerBase.paySkillAmmoCost (UNCO_AmmunitionSystem.js:837)
    at Game_Enemy.Game_BattlerBase.paySkillCost (UNCO_AmmunitionSystem.js:831)
    at Game_Enemy.Game_Battler.useItem (rpg_objects.js:3175)
    at Function.BattleManager.startAction (YEP_BattleEngineCore.js:1247)
    at Function.BattleManager.processTurn (rpg_managers.js:2076)
    at Function.BattleManager.processTurn (Ellye's_ATB.js:1830)
    at Function.BattleManager.updateTurn (rpg_managers.js:2064)
    at Function.BattleManager.update (YEP_BattleEngineCore.js:1033)
    at Function.BattleManager.update (Ellye's_ATB.js:1598)
    at Scene_Battle.updateBattleProcess (rpg_scenes.js:2049)rpg_managers.js:1618 SceneManager.catchExceptionTDDP_FluidTimestep.js:89 SceneManager.update
 

Unconnected42

Veteran
Veteran
Joined
Oct 24, 2015
Messages
108
Reaction score
36
First Language
French
Primarily Uses
Please try the latest version, I did a thing that should make that bug stop happening.


However, I was not able to reproduce it and I don't really understand how it happens in the first place, since normally just before the line where the bug happens there is a condition that the _equips property of the battler must not be 'undefined'.


I don't know how you get a Game_Enemy to have an _equips property actually not undefined while its elements still are undefined (which causes the bug - when checking the code at that place it tries to read the _itemId property of _equips[0]) ?
 

Prescott

argggghhh
Veteran
Joined
Aug 28, 2014
Messages
467
Reaction score
356
First Language
English
Primarily Uses
RMMV
Well, it worked, that's all that matters x)


Thanks a bunch!!
 

HyperionVIGA

Warper
Member
Joined
Feb 25, 2016
Messages
2
Reaction score
0
First Language
Portuguese
Primarily Uses
Amazing plugin! Works well with the project i'm working with.

I'm running into a problem with the charged ammo, though! Maybe you know the answer?

I'm using, for now, only your plugin and ItemCore. I have 3 kinds of ammo for the pistol in the armor tab, and they are correctly equipped and every time I use one of the three skills that the weapon concedes, the ammo goes down. My problem is that, even though I used the <Ammo Charges: 15> tab, it works as it had only one charge! The ammo also has the <Not an Independent Item> tag, which solved my issue about it not being equippable. 

In short: The Ammo gives out the kind of damage and the charges, the weapon concedes stats and available skills, and the skills themselves cost ammo (using the <Ammo 1 Equip: 1>, for costing the ID 1 equipment a single charge). Have any of you guys run into this trouble? 
 
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Trauma, drama, llamas--sadly the only one of those things I'm not experiencing RN is the camelids.
Do you ever just write or say nonsense? String together words to make a sentence that sounds pretty but is meaningless?
Writing down my ideas for my next game during break times at work XD I need to finish my current one very soon.
I survived Baudelaire and Bukowski, but I can't face C. Lispector. :kaoswt:

Forum statistics

Threads
93,654
Messages
914,345
Members
123,240
Latest member
Mumu1324
Top