MV YEP Attachable Augments

I attempted to follow the info here, to no avail.

I would like to have a chance of a slot being added to a weapon when found/created.

@ramza, if you want to help a guy out too, would be awesome, but will take help from anywhere, even that guy in the back....yeah, you.

Edit: Formatting
If you can't get it to work, and have the extra space in your weapons section, you could just make 2 instances of the item, then randomize which version of it you get using variables.

This isn't a fix to your issue, but a possible workaround provided you have the room for extra weapons.
I attempted to follow the info here, to no avail.
That thread has a bunch of different things in it to achieve different results - anything from Ramza's posts should work.

What are you currently using for your notetag, and in what way doesn't it work?
I tried to just use what he did

<On Creation Eval> if (Math.random() * 10 >= 9){ item.augmentSlots.push("Orb") item.augmentSlotEnable.push(true) } </On Creation Eval>

But got no result different result.
Sadly, working from office today, rather than home, so cannot screenshot what I am getting.
My next step is to remove all other plugins, or a blank game, and try again.
Mostly wanted to make sure that there wasnt any changes that would alter the way this is done

I did make two identical weapons, one with the code, and one without... nada.
I haven't looked at the code for item augments - if you remove the line with the "if" and the last brace after (true), does it work?

As written, presuming those two item.augment functions work correctly, it will only happen one tenth of the time. Math.random gives a value from 0 - 0.9, so multiplying that by 10 means the highest number you can get will be 9, and that will only happen on 10% of the items you spawn (I'm not sure why he says >= 9 when it can never be higher...).

If you only made two weapons, unless you made it spawn a bunch of times in your game, you would be unlikely to see your notetag have any effect.
I haven't looked at the code for item augments - if you remove the line with the "if" and the last brace after (true), does it work?

As written, presuming those two item.augment functions work correctly, it will only happen one tenth of the time. Math.random gives a value from 0 - 0.9, so multiplying that by 10 means the highest number you can get will be 9, and that will only happen on 10% of the items you spawn (I'm not sure why he says >= 9 when it can never be higher...).

If you only made two weapons, unless you made it spawn a bunch of times in your game, you would be unlikely to see your notetag have any effect.
I got a test area, spawned a BUNCH of them, altered the chance as well, spawned a bunch....nada.
Formatting though, never thought of that, maybe I need to not copy-paste, but type it instead.
I will try that tonight, see whats what. Thanks yo!
Formatting though, never thought of that, maybe I need to not copy-paste, but type it instead.
That's not really what I meant/said. I suggested you take out the random chance so every copy will be guaranteed to have the augment. That will allow you to test that the two lines of code adding the augment slot actually work. If they do, then the original code also works and you just have bad luck.

Typing vs. copying/pasting doesn't make any difference.
My bad, I am remembering last night I misplaced various ; and ) and caused other issues, so when you said to remove the "if" it popped into my head. That is a good call, just cause it to do automatically, will try that.

Edit: Holy smokes, it works WITHOUT the chance....
Ok, time to dial it in and see whats what
@ATT_Turan, thanks for the suggestions and help.

This is what I got, before tweaking further...

JavaScript:
<On Creation Eval>

item.price = baseItem.price
item.boostCount = Math.round(Math.random()*$gameVariables.value(6))
//This is my variable for Bosses slain and other game progressing events
ItemManager.updateItemName(item)//To see the Boost Count
if (Math.random() >= .7-(.01*item.boostCount)){
item.augmentSlots.push("Material")
item.price += baseItem.price*.5
item.boostCount += 1
ItemManager.updateItemName(item)
//Decent chance to get the slot, increases based on Boost Count
//Cost increases by 50% base value
}

if (Math.random() >= .8-(.01*item.boostCount)){
item.augmentSlots.push("Gem")
item.price += baseItem.price
item.boostCount += 1
ItemManager.updateItemName(item)
//Poor chance to get the slot, increases based on Boost Count
//Cost increases by 100% base value
}

if (Math.random() >= .9-(.01*item.boostCount)){
item.augmentSlots.push("Rune")
item.price += baseItem.price*2
item.boostCount += 1
ItemManager.updateItemName(item)
//Rare chance to get the slot, increases based on Boost Count
//Cost increases by 200% base value
}

item.augmentSlotEnable.push(true);//Update the slots on the item
item.price += (baseItem.price*1+(.25*item.boostCount))
</On Creation Eval>

<Custom Parameters>
atk = Math.floor((user.paramBase(2) * (.3+(.1*item.boostCount)))*(item.durability/item.durMax));
//Weapons are good, but only as good as the person using them
//It all tied to the Parameters of the user, I do the same with armor but using Defense or Resist
//Gets weaker the less durable it is
</Custom Parameters>


Moderator, I am satisfied with my care

Original thread: https://forums.rpgmakerweb.com/threads/yep-attachable-augments.141260/