- 55
- Posts
- 11
- Years
- Seen Oct 8, 2019
Hey guys,
slowly but surely I am finishing my game. There are only a few things to fix/edit. The last three years I learned a lot about scripting and ruby itself, but not enough to solve the following questions.
1. Pickup-Ability:
2. Increase Catchrate of a Rocketball
3. Change startitem on the PC:
I hope there is anybody can answer my questions!
Thank you very much in advance!
Cheers Hargatio
slowly but surely I am finishing my game. There are only a few things to fix/edit. The last three years I learned a lot about scripting and ruby itself, but not enough to solve the following questions.
1. Pickup-Ability:
Spoiler:
How does this ability works? Is there a chance every step, that the Pokémon finds an item? Can I modify the chance for finding an item? I found the following code in the script "PField_Field", but I'm not sure, what it does and how it works.
Besides, I changed the number of items, both normal ones (20) and rare items (21). Do I have to change anything else in the code above, perhaps these lines?
Because I played for 4 hours (no debug mode) and Meowth Lv.5 with Pickup didn't find a single item, that's weird...
Code:
return if pickupList.length!=18
return if pickupListRare.length!=11
randlist=[30,10,10,10,10,10,10,4,4,1,1]
items=[]
plevel=[100,pokemon.level].min
itemstart=(plevel-1)/10
itemstart=0 if itemstart<0
for i in 0...9
items.push(pickupList[itemstart+i])
end
items.push(pickupListRare[itemstart])
items.push(pickupListRare[itemstart+1])
rnd=rand(100)
cumnumber=0
for i in 0...11
cumnumber+=randlist[i]
if rnd<cumnumber
pokemon.setItem(items[i])
break
end
end
end
Code:
return if pickupListRare.length!=11
randlist=[30,10,10,10,10,10,10,4,4,1,1]
2. Increase Catchrate of a Rocketball
Spoiler:
I made a Rocketball that makes it possible to steal other trainers Pokemon. It seems the catchrate is equal to a normal Pokeball, it's nearly impossible to catch a stronger Pokemon. To create that ball, I modified the Snagball/Shadowball. The code in script section to define the ball is the following:
How can I increase the catchrate? Does the Rocketball still makes a Pokemon to a Shadowpokemon? Because actually that should not happen. I would like to disallow this function, I'm the old generation and don't even know what a Shadowpokemon is.
At this point another questions occurs. What is the exact catchrate of a Pokeball?
E.g. for a Greatball, we have the following calculation
"*3/2" seems pretty clear, but what does "catchRate" means in detail or what value has it?
Code:
BallHandlers::OnCatch.add(:SNAGBALL,proc{|ball,battle,pokemon|
pokemon.makeShadow
})
At this point another questions occurs. What is the exact catchrate of a Pokeball?
E.g. for a Greatball, we have the following calculation
Code:
BallHandlers::ModifyCatchRate.add(:GREATBALL,proc{|ball,catchRate,battle,battler|
next (catchRate*3/2).floor
3. Change startitem on the PC:
Spoiler:
When the player opens his own PC, there is already a Potion deposited. I want to change it into a Nugget, but couldn't find the right code line. I checked the script section "PScreen_Storage", but wasn't lucky.
EDIT:
At least I could solve this problem thanks the wikia. I accidentely skipped a few lines. For those with the same issues, go to the script section "PScreen_Bag" around line 3031 and search for
Change POTION in whatever you want.
EDIT:
At least I could solve this problem thanks the wikia. I accidentely skipped a few lines. For those with the same issues, go to the script section "PScreen_Bag" around line 3031 and search for
Code:
if hasConst?(PBItems,:POTION)
I hope there is anybody can answer my questions!
Thank you very much in advance!
Cheers Hargatio
Last edited by a moderator: