Slasheree Posted April 9, 2013 Author Share Posted April 9, 2013 Could someone help me make a modTypes for a Pokemon engine, I'm kinda having a hard time with the logic of it…I know PokemonRec will have Sprite, Cry, Attack, etc but there are some stuff related to combat and other to the species itself.Really need help with it :\ Link to comment Share on other sites More sharing options...
Matt Posted April 9, 2013 Share Posted April 9, 2013 Its rather simple.In modTypes, at the top, put there something like this.```public Pokemon(1 to MAX_POKEMON) as PokemonRecPrivate Type PokemonRec'values go hereend type```This is the basic structure. If you still don't understand how it works, I'll explain it. Link to comment Share on other sites More sharing options...
Slasheree Posted April 9, 2013 Author Share Posted April 9, 2013 LOL, I know how it works, I just think I'm missing some varibles or doing something I shouldn't```'ConstantsPublic Const MAX_POKEMON_IN_BAG As Long = 6Public Const MAX_POKEMONS As Long = 2Public Const MAX_POKEMONITEMS As Long = 1000Public Const MAX_POKEMonmoveS As Long = 3'TypesPublic Pokemon(1 To MAX_POKEMONS) As PokemonRecPublic PokemonInBag(1 To MAX_POKEMON_IN_BAG) As PokemonInBagRecPublic Bag() As BagRec'Public PokemonPokemonBank(1 To MAX_PLAYERS) As PokemonPokemonBankRec'Public PokemonItemBank(1 To MAX_PLAYERS) As PokemonItemBankRec'Public PokemonItem(1 To MAX_POKEMONITEMS) As PokemonItemRecPublic Pokemonmoves(1 To MAX_POKEMonmoveS) As PokemonmovesRecPublic PokemonDefence As PokemonDefenceRecPublic Type PokemonDefenceRec Normal As Long Fire As Long Water As Long Electric As Long Grass As Long Ice As Long Fighting As Long Poison As Long Ground As Long Flying As Long Psychic As Long Bug As Long Rock As Long Ghost As Long Dragon As Long Dark As Long Steel As LongEnd TypePublic Type PokemonRec ID As Long 'pokedex id Name As String * NAME_LENGTH 'Bulbasaur Sprite As Long PartySprite As Long Type1 As Long 'Grass,Normal,etc... Type2 As Long Description As String 'pokedex desc Cry As Long Footprint As Long EvolutionPokemon As Long 'pokemon to which it envolves EvolutionLevel As Long 'at which level it envolves to that pokemon EXPCurve As Byte 'fast,slow,medium,etc HP As Long Attack As Long Defense As Long SpAttack As Long SpDefense As LongEnd TypePublic Type BagRec Type As Byte 'If 1-Items,2-Pokeballs,3-KeyItems,4-TMs/HMs Name As String * NAME_LENGTH Desc As String Script As LongEnd Type'Public Type PokemonPokemonBankRec' PokemonInBagRec(1 To MAX_BAGPOKEMON) As Long'End Type'Public Type PokemonItemBankRec' PokemonItem'End Type'Public Type PokemonItemRec'End TypePublic Type PokemonmovesRec Name As String * NAME_LENGTH Type As Long CurPP As Long PP As Long Power As Long Accuracy As Long StatusAilment As Byte StatusAmount As Long 'for -Defense -Attack and stuff Animation As Long Script As LongEnd TypePublic Type PokemonInBagRec BagSlot As Integer Data() As PokemonRec Name As String * NAME_LENGTH Level(1 To 100) As Integer Shiny As Boolean Status As Byte 'poisoned etc StatusRounds As Byte 'durations in rounds of the status ailment Moves(1 To 4) As PokemonmovesRec 'hp up,pp up,attack up and that shits XD HP_Up As Long Attack_Up As Long Defense_Up As Long SpAttack_Up As Long SpDefense_Up As Long Consumable_Limit As Long 'don't want pokemons with +100000 attack XD Accuracy As Long 'raised to 3 with Growl or whatever, remember to refresh after battle if finished Wild As Byte ' 1 wild, 2 npc, 3 humanEnd Type``` Link to comment Share on other sites More sharing options...
DeathKnight Posted April 9, 2013 Share Posted April 9, 2013 The great thing about variables, you can always add more later if you realize you don't have enough ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/tongue.png) That being said, I doubt anyone knows enough about what you are planning on doing to actually go through and make sure you have variables for everything. That being said, I don't see anything for current health, just HP. Maybe it is somewhere else in the coding, but I just see an HP (whether that is supposed to be max hp, or just hp idk. Link to comment Share on other sites More sharing options...
Matt Posted April 9, 2013 Share Posted April 9, 2013 > 'Public Type PokemonItemBankRec> > ' PokemonItem> > 'End Type> Public Type BagRec> > Type As Byte 'If 1-Items,2-Pokeballs,3-KeyItems,4-TMs/HMs> > Name As String * NAME_LENGTH> > Desc As String> > Script As Long> > End TypeAll the problems I could find are in these recs. Link to comment Share on other sites More sharing options...
Slasheree Posted April 9, 2013 Author Share Posted April 9, 2013 not working on the items yet, I'm still just trying to create the pokemons and make them have moves, and have them in your party (up to 6), and then I'll work in the battle system Link to comment Share on other sites More sharing options...
Slasheree Posted April 9, 2013 Author Share Posted April 9, 2013 > The great thing about variables, you can always add more later if you realize you don't have enough ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/tongue.png) That being said, I doubt anyone knows enough about what you are planning on doing to actually go through and make sure you have variables for everything. That being said, I don't see anything for current health, just HP. Maybe it is somewhere else in the coding, but I just see an HP (whether that is supposed to be max hp, or just hp idk.Pokemon have an HP formula that it based on their BaseHealth ([http://bulbapedia.bu….net/wiki/Stats](http://bulbapedia.bulbagarden.net/wiki/Stats))That HP is the base health of the pokemon Link to comment Share on other sites More sharing options...
Link Posted April 9, 2013 Share Posted April 9, 2013 > Its rather simple.> > In modTypes, at the top, put there something like this.> > ```> > public Pokemon(1 to MAX_POKEMON) as PokemonRec> > Private Type PokemonRec> > 'values go here> > end type> > ```> > This is the basic structure. If you still don't understand how it works, I'll explain it.Matt, let's not forget where this should be placed in the recs. You should probably have it places under PlayerRec or NpcRec. Depends on if you're defining the npc as a Pokemon Type in the editor or when this Pokemon is on the team of a player…for example>Like Matt said.```Public Pokemon(1 To MAX_POKEMONS) As PokeRec```In Private Type PlayerRec.```' PokemonTeam(1 To 6) As PokeTeamRec``` Link to comment Share on other sites More sharing options...
Matt Posted April 9, 2013 Share Posted April 9, 2013 > Matt, let's not forget where this should be placed in the recs. You should probably have it places under PlayerRec or NpcRec. Depends on if you're defining the npc as a Pokemon Type in the editor or when this Pokemon is on the team of a player…for example>> > Like Matt said.> > ```> > Public Pokemon(1 To MAX_POKEMONS) As PokeRec> > ```> In Private Type PlayerRec.> > ```> > ' Pokemon> > Team(1 To 4) As PokeTeamRec> > ```He asked> Could someone help me make a modTypes for a Pokemon engine, I'm kinda having a hard time with the logic of it…so I tried to make it as simple as possible. Link to comment Share on other sites More sharing options...
Link Posted April 9, 2013 Share Posted April 9, 2013 ```Public Moves(1 To MAX_MOVES) As MoveRec```For an example of the Move code, just a snippet of what I contain in a project of mine.```Public Sub SendSaveMove(ByVal movenum As Long) Dim Buffer As clsBuffer Dim MoveSize As Long Dim MoveData() As Byte Set Buffer = New clsBuffer MoveSize = LenB(Moves(movenum)) ReDim MoveData(MoveSize - 1) CopyMemory MoveData(0), ByVal VarPtr(Moves(movenum)), MoveSize Buffer.WriteLong CSaveMove Buffer.WriteLong movenum Buffer.WriteBytes MoveData SendData Buffer.ToArray() Set Buffer = NothingEnd Sub```You'd have to handle moves via editor unless you wanted them ini based in which would be horrid. Link to comment Share on other sites More sharing options...
Slasheree Posted April 10, 2013 Author Share Posted April 10, 2013 Just to point it out, I'm making a Pokemon Silver kind of game, not a Pokemon Mistery Dungeon XD Link to comment Share on other sites More sharing options...
Link Posted April 11, 2013 Share Posted April 11, 2013 > Just to point it out, I'm making a Pokemon Silver kind of game, not a Pokemon Mistery Dungeon XDHence a team of six, if you didn't notice. You'd have to individually edit each move in an editor, etc.. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now