Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Level up moves script+data #4

Merged
merged 1 commit into from
Nov 28, 2012
Merged

Conversation

CrystalMoogle
Copy link
Member

I used the info file you mentioned in #1 and cut it down to just B/W2 level up moves (or so I hope!)

The script itself converts the CSV file into a javascript object which really is quite easy to use :x. Advantage of doing it this way is if you ever make a way to edit the moves from within the scripts, you can easily save it as JSON file instead. Just to note, the JSON version of the CSV is about ~105kb compared to the CSV which is ~160 (though a little more compression could probably fix that), but I wasn't sure if using JSON for the data would be better than CSV. I find JSON easier to read/edit than CSV, but well it's up to you I guess, I kept it as CSV for the time being.

levelupMovesAt returns either a string (No moves or 1 move) or an array (multiple moves), I guess it's possible to convert the array into a string into that function, or make the function requesting the data sort it there. levelupMoves returns an array of moves the pokemon learns through level up, though the order is off, so we could either add a sort there or make the function requesting the data sort it as it receives it, I dunno which would be better of the two (I guess the former if a lot of functions are going to be request it).

Order was kind of a tricky part (moves that share a level), but I think I managed it well enough. I've tested this already and it -seemed- to work fine, but I miss obvious things a lot so verification might be needed :x. Feel free to decline, say it sucks etc!
I would have done the other stuff, but I didn't want to start them unless you were happy with this format first, I find it easy enough, but you might have something better in mind :x

I think that's everything I wanted to say about it :x

@coyotte508
Copy link
Member

Awesome... really awesome :)

I think CSV is better for the simple fact that we can rerip from veekun easily whenever needed.

coyotte508 pushed a commit that referenced this pull request Nov 28, 2012
Level up moves script+data
@coyotte508 coyotte508 merged commit 9e52287 into po-devs:master Nov 28, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants