SirCumferance

Veteran
Veteran
Joined
Jul 17, 2012
Messages
71
Reaction score
16
First Language
English
Primarily Uses
RMMV
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
 

Zerothedarklord

Veteran
Veteran
Joined
Jun 25, 2013
Messages
346
Reaction score
111
First Language
English
Primarily Uses
RMMV
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.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
2,169
Reaction score
1,160
First Language
English
Primarily Uses
RMMV
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?
 

SirCumferance

Veteran
Veteran
Joined
Jul 17, 2012
Messages
71
Reaction score
16
First Language
English
Primarily Uses
RMMV
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.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
2,169
Reaction score
1,160
First Language
English
Primarily Uses
RMMV
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.
 

SirCumferance

Veteran
Veteran
Joined
Jul 17, 2012
Messages
71
Reaction score
16
First Language
English
Primarily Uses
RMMV
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!
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
2,169
Reaction score
1,160
First Language
English
Primarily Uses
RMMV
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.
 

SirCumferance

Veteran
Veteran
Joined
Jul 17, 2012
Messages
71
Reaction score
16
First Language
English
Primarily Uses
RMMV
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 = 1+Math.floor(user.paramBase(2) * (.5+(.02*item.boostCount)));
//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
</Custom Parameters>


Moderator, I am satisfied with my care
 
Last edited:

Latest Threads

Latest Profile Posts

I'm having toooo much fun designing the new MP (Mental Psyche) system. I've only worked it out for enemies so far, but it's fun to stun them, then go after their MP and delete them instead to farm for better item drops.
anyone know of a place I can promote my game? sorta like game awards but for indie devs, like a place where I can drop a trailer and like stir up some hype
Doing RPG Maker News for 17th October 2021

That moment when you came up with a very good game title, but when you searched it, it has already been used... T.T
Crazy week. My anxiety decides to go nutz. Worse thing about it is that it causes me to lose focus on my work. I was able to leave early one day and take a nap. Seemed to help. How is everyone? Boosters coming soon here. Get my life back on track again.

Forum statistics

Threads
115,874
Messages
1,093,661
Members
151,120
Latest member
ekizdehd
Top