• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Archive] Pokemon Essentials: Starter Kit for RPG Maker XP

Status
Not open for further replies.

KitsuneKouta

狐 康太
442
Posts
14
Years
  • Age 33
  • Seen Nov 20, 2017
Hi!

THXs for the answer, but I did not mean that a shop has a rare card.
I did mean that your triple-triad opponent has a rare card.

For Example:
You opponent is RED and ONLY he and no one else has a ARCEUS-Card.
You can only get this card if he use this card in the game and if you beat him.

The same way you can get an ARBOK or any other PKMN-Card, if you beat the guy in the demo.

~ Kareth
Sorry, I should have clarified. In a trainer event, put the $PokemonGlobal.triads.pbStoreItem(PBSpecies::ARCEUS,2) inside of the conditional branch (it's the part that determines what happens if you win, and usually says Control Self Switch A = ON). But as I said, if the player hasn't already used the shop (buy or sell, it doesn't matter), you get an error for whatever reason. Also, you will have to add a message of some kind to tell the player that they received that card, since it is added silently.

EDIT: I tried a few more things and figured out how to add a specific card if you beat an opponent at a triad duel. It didn't work like trainers (with a conditional branch), but using a variable works just as well. In the PokemonTriad script, find elsif playerCount>opponentCount (should be line 810) and add $game_variables[30]=1 below it. This will set the variable to one on victory. Then, in an event after the pbTriadDuel(opponent,#,#), make a conditional branch that checks the value of the variable. If it is equal to one, add the card (you will receive two cards, one upon victory and one after the match). After that, reset the variable to 0 so that if you challenge them again and lose, you won't end up winning anyways. Note that the 30 in $game_variables is arbitrary, you may use whatever variable you like. Also, to add a card for the first time without requiring the use of the Triad shop, use this in a script command:
$PokemonGlobal.triads=TriadStorage.new
$PokemonGlobal.triads.pbStoreItem(
PBSpecies::ARCEUS,2)

I'd recommend supplying the player with a few weak cards in this way at the start, so that you don't have to worry about it when adding cards later.
 
Last edited:
9
Posts
14
Years
  • Seen Apr 21, 2011
Hi!

(you will receive two cards, one upon victory and one after the match)

THXs a lot for that!
But I meant that the card you get upon victory is the rare card.
Sorry my fault!

Example:
Opponents Cards: Arceus; Charizard; Alakazam; Onix; Magmar

You beat him and you win his Arceus Card.

I hope I have explained it better now.

I hope somebody could help me with the Cards-in-Bag-Menu, too.

~ Kareth
 

KitsuneKouta

狐 康太
442
Posts
14
Years
  • Age 33
  • Seen Nov 20, 2017
Hi!
THXs a lot for that!
But I meant that the card you get upon victory is the rare card.
Sorry my fault!
Example:
Opponents Cards: Arceus; Charizard; Alakazam; Onix; Magmar
You beat him and you win his Arceus Card.
I hope I have explained it better now.
I hope somebody could help me with the Cards-in-Bag-Menu, too.
~ Kareth
Look for card=originalOpponentCards[rand(originalOpponentCards.length)] on line 816. Make it look like this:
Code:
if $game_switches[500]
  card=493
else
  card=originalOpponentCards[rand(originalOpponentCards.length)]
end
In this case, when switch 500 is on, then you will receive only the Arceus card on victory. So, you would turn on the switch right before the match, then turn it back off afterwards. The switch can be any number you want, as long as it's the same in the script. One other thing, have you figured a way to determine what specific cards an opponent has? From what I've seen of the script, it randomly generates the opponents cards, meaning that you will have to script it in a similar way to this example. To do that, change the array on line 714 (opponentCards=[]) to include specific species when a certain switch is on, and use the default otherwise.
 
9
Posts
14
Years
  • Seen Apr 21, 2011
Hi!

It works!
Thanks a lot, KitsuneKouta!

Now I hope somebody can help me how I can check the cards the player has.

~ Kareth
 

KitsuneKouta

狐 康太
442
Posts
14
Years
  • Age 33
  • Seen Nov 20, 2017
Hi!
It works!
Thanks a lot, KitsuneKouta!
Now I hope somebody can help me how I can check the cards the player has.
~ Kareth
I pieced something together to do that, however I'm not sure where you're wanting to display it from. Will it be a separate menu option? Or possibly a Key Item in the bag, such as a card case?
 

zingzags

PokemonGDX creator
536
Posts
15
Years
Its not the only problem, the bag storage has a problem

Message: undefined method `<' for nil:NilClass
PokemonBag:761:in `pbStoreItem'
PokemonDebug:388:in `pbDebugMenu'
PokemonDebug:387:in `each'
PokemonDebug:387:in `pbDebugMenu'
PokemonDebug:276:in `loop'
PokemonDebug:495:in `pbDebugMenu'
PokemonMenu:224:in `pbStartPokemonMenu'
PokemonMenu:223:in `pbFadeOutIn'
PokemonMenu:223:in `pbStartPokemonMenu'
PokemonMenu:139:in `loop'

sorry needed help so i bumped my post
 
9
Posts
14
Years
  • Seen Apr 21, 2011
I pieced something together to do that, however I'm not sure where you're wanting to display it from. Will it be a separate menu option? Or possibly a Key Item in the bag, such as a card case?

Hi!

Yes! I meant a new Key Item in the bag, such as a card case.

~ Kareth
 

KitsuneKouta

狐 康太
442
Posts
14
Years
  • Age 33
  • Seen Nov 20, 2017
Hi!
Yes! I meant a new Key Item in the bag, such as a card case.
~ Kareth
First you need to make the key item, and you can use the Town Map or something as a base to make it easier. Then, go to PokemonDefaultItems and look for
Code:
ItemHandlers::UseFromBag.add(:TOWNMAP,proc{|item|
   pbShowMap
   next 1 # Continue
})
and add this right below it
Code:
ItemHandlers::UseFromBag.add(:CARDCASE,proc{|item|
   pbShowTriads
   next 1
})
It's at the top, so it's easy to find. The next one is on line 649. Find
Code:
ItemHandlers::UseInField.add(:TOWNMAP,proc{|item|
   pbShowMap
})
and put this below it
Code:
ItemHandlers::UseInField.add(:CARDCASE,proc{|item|
   pbShowTriads
})
Then, add this script somewhere (PokemonUtilities, or even a new script section).
Code:
def pbShowTriads
  commands=[]
  if !$PokemonGlobal.triads
    $PokemonGlobal.triads=TriadStorage.new
  end
  for i in 0...$PokemonGlobal.triads.length
    item=$PokemonGlobal.triads[i]
    speciesname=PBSpecies.getName(item[0])
    commands.push(_INTL("{1} x{2}",speciesname,item[1]))
  end
  if commands.length==1
    Kernel.pbMessage(_INTL("You have no cards."))
    return
  end
  cmdwindow=Window_CommandPokemonEx.newWithSize(commands,0,0,256,Graphics.height)
  cmdwindow.z=99999
  cmdwindow.commands=commands
  done=false
  Graphics.frame_reset
  while !done
    loop do
      Graphics.update
      Input.update
      cmdwindow.active=true
      cmdwindow.update
      if Input.trigger?(Input::B)
        done=true
        cmdwindow.active=false
        break
      end
    end
  end
end
The window doesn't always close immediately when pressing b, but other than that it should work fine.
 
9
Posts
14
Years
  • Seen Apr 21, 2011
Hi!

THX a lot again, KitsuneKouta.

One little question if I want to add the pictures with the states of the card, I have to use the script from "PokemonTriad"
Because it would be better, if you can also check what states the card have.

That would be a good extension to the Card-Shop too.

~ Kareth
 

Peeky Chew

Master of Palettes
829
Posts
14
Years
@Maruno: I needed it i more detail, that's why I asked again...
Anyway, Luka told me how to do it.

---------------------------
png-6.png

It's not supposed to look like that is it?
 

KitsuneKouta

狐 康太
442
Posts
14
Years
  • Age 33
  • Seen Nov 20, 2017
Hi!

THX a lot again, KitsuneKouta.

One little question if I want to add the pictures with the states of the card, I have to use the script from "PokemonTriad"
Because it would be better, if you can also check what states the card have.

That would be a good extension to the Card-Shop too.

~ Kareth
You may want to ask someone else for that one, since it's a little beyond me. I could probably figure it out, but it would take a while, and I'm still working on other stuff too. If no one else does, I'll get around to it eventually.
 
9
Posts
14
Years
  • Seen Apr 21, 2011
You may want to ask someone else for that one, since it's a little beyond me. I could probably figure it out, but it would take a while, and I'm still working on other stuff too. If no one else does, I'll get around to it eventually.

Hi!

THX anyway!

I figured out that the following functions create the cards:

initialize(species):
Code:
  def initialize(species)
   dexdata=pbOpenDexData
   @species=species
   pbDexDataOffset(dexdata,species,10)
   dexdata.fgetb # HP
   @west=baseStatToValue(dexdata.fgetb) # Attack
   @east=baseStatToValue(dexdata.fgetb) # Defense
   dexdata.fgetb # Speed
   @north=baseStatToValue(dexdata.fgetb) # Special Attack
   @south=baseStatToValue(dexdata.fgetb) # Special Defense
   pbDexDataOffset(dexdata,species,8)
   @type=dexdata.fgetb # Type
   dexdata.close
  end
createBitmap(owner):
Code:
def createBitmap(owner)
   if owner==0
    return TriadCard.createBack
   end
   bitmap=BitmapWrapper.new(84,84)
   iconfile=sprintf("Graphics/Icons/icon%03d",@species)
   typebitmap=AnimatedBitmap.new(_INTL("Graphics/Pictures/types"))
   icon=AnimatedBitmap.new(iconfile)
   typerect=Rect.new(0,@type*28,64,28)
   if owner==2
    # opponent
    bitmap.fill_rect(0,0,84,84,Color.new(255,128,128))
   else
    # player
    bitmap.fill_rect(0,0,84,84,Color.new(128,128,255))
   end
   bitmap.blt(10,28,typebitmap.bitmap,typerect,192)
   bitmap.blt(10,2,icon.bitmap,Rect.new(0,0,64,64))
   bitmap.fill_rect(0,0,84,2,Color.new(0,0,0))
   bitmap.fill_rect(0,0,2,84,Color.new(0,0,0))
   bitmap.fill_rect(0,82,84,2,Color.new(0,0,0))
   bitmap.fill_rect(82,0,2,84,Color.new(0,0,0))
   pbSetSmallFont(bitmap)
   pbDrawTextPositions(bitmap,[
     ["0123456789A"[@north,1],84/2,2,2,Color.new(248,248,248),Color.new(18*8,18*8,18*8)],
     ["0123456789A"[@south,1],84/2,82-25,2,Color.new(248,248,248),Color.new(18*8,18*8,18*8)],
     ["0123456789A"[@west,1],2,(84/2)-12,0,Color.new(248,248,248),Color.new(18*8,18*8,18*8)],
     ["0123456789A"[@east,1],82,(84/2)-12,1,Color.new(248,248,248),Color.new(18*8,18*8,18*8)]
   ])
   icon.dispose
   typebitmap.dispose
   return bitmap
  end
end
Maybe that could help a bit.

I hope someone else could help me with this.
Maybe it is easier if a new pocket is add to the bag.

~ Kareth
 

Cilerba

the hearts of lonely people
1,162
Posts
14
Years
How can I edit the maximum level of Pokemon? I edited the line "MAXLEVEL={number}"
but, how am I able to edit the growth rate of the Pokemon so that it is easier to level them up. So that they are easier but once they start getting to like 120+ it gets harder to level.
 
19
Posts
14
Years
  • Seen Mar 24, 2016
I want information on the data file

for example

How do you edit? and why would a servant?
 

KitsuneKouta

狐 康太
442
Posts
14
Years
  • Age 33
  • Seen Nov 20, 2017
Hi!
THX anyway!
I figured out that the following functions create the cards:
Spoiler:
Maybe that could help a bit.
I hope someone else could help me with this.
Maybe it is easier if a new pocket is add to the bag.
~ Kareth
Yes, I already looked at that, since it was the logical first step. However, it has to be inserted properly into the script that displays the list, showing the right image depending on the card you have selected. Also, terms like "owner" aren't defined in that segment, but in a different class in PokemonTriad. I'm not saying it's hard, but it takes time, or patience.

@Cilerba: You could modify the values in PBExperience. There are several entries in the @PBExpTable array, divided into "blocks" that all start with zero. These use different equations (some are linear, some fluctuating, etc). You would have to do some math to see how the increments are calculated (you could probably look it up somewhere too), and alter it according to the same pattern.
 
Last edited:

Cilerba

the hearts of lonely people
1,162
Posts
14
Years
@Cilerba: You could modify the values in PBExperience. There are several entries in the @PBExpTable array, divided into "blocks" that all start with zero. These use different equations (some are linear, some fluctuating, etc). You would have to do some math to see how the increments are calculated (you could probably look it up somewhere too), and alter it according to the same pattern.

O_O...Pssh, I knew that. lol, just kidding. Thanks for the help ^_^
 

np7261

Exceeding Excpectations
57
Posts
15
Years
I was wondering if it were possible to make a clock event.

eg. An event in which there is text saying the time of day and date. Much like the clock in the hero's home in r/s/e. I'm sure it could be done using a variable containing the time, just not sure how.

Also how would one go about making television event. Random shows pop up like in d/p sometimes showing swarm (many pokemon of same type on one route) pokemon.
 
Last edited:

Colbex

Cobalt Black Creator
169
Posts
14
Years
For the television event you would need to use random processing and have a certain amounts of different outcomes. I'm not sure if swarming is supported (I doubt it), but you could probably throw a couple of hidden events on the map you want to be swarmed. When a switch is activated, stepping on the tile will start a wild PokéMon battle with the selected species. You might wanna make the battle be randomly processed too, so it doesn't look like overkill. Then, on the television, when the event for swarming is randomly selected, you could turn the switch on, but have it be a timed event, so those Snubbull's won't be bothering you for the rest of your life. o.o

Note: I haven't tried this, and it's all hypothetically speaking. It should work, though.
 

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
Yeah, swarming shouldn't be too difficult to implement (although as with Burmy's alternate forms, it will vary from game to game which species swarm and where they do so).

Define a variable (e.g. 42 - "Swarmers"), where a value of 0 for that variable means "nothing swarming", a "1" means Rattata are swarming on Route 17, a "2" means Nidoran male are swarming on Route 3, etc. Plan all that out first.

Then go into PokemonEncounters and edit the def pbEncounteredPokemon to add a line like:

Code:
return [PBSpecies::RATTATA,15] if rnd[9]<3 && $game_variables[42]==1 && $game_map.map_id==17 && enctype==0
Put that near the top, just after the "return nil if etc." line, and put similar lines like it there as well for each of the other swarming species/locations. (You can expand on this to give the swarmer a range of levels to choose from.)

The example line there gives a 30% chance of encountering a Level 15 Rattata, and a 70% chance of "choose a random Pokémon native to the current map as usual" otherwise. It will only do this if game variable 42 equals 1, the player is currently on map number 17 and it's looking for a tall grass encounter.

All that's left after that is to change game variable 42 to a different number depending on whatever (whether it's random each day, triggered by an event, etc.). I'll leave that to you to figure out.

After that, you can use the game variable value to decide what's swarming, and to generate a relevant TV broadcast.
 
Status
Not open for further replies.
Back
Top