Programming SmogDex Teambuilder

sandshrewz

POTATO
is a Site Content Manager Alumnusis a Top Artist Alumnusis a Forum Moderator Alumnusis a Top Contributor Alumnusis a Top Smogon Media Contributor Alumnusis a Battle Simulator Moderator Alumnus
It now tells you how many EVs you have left! A lot of help from Toast here though! :) lol this change took quite a while !
 

sandshrewz

POTATO
is a Site Content Manager Alumnusis a Top Artist Alumnusis a Forum Moderator Alumnusis a Top Contributor Alumnusis a Top Smogon Media Contributor Alumnusis a Battle Simulator Moderator Alumnus
Double posta~ You can now pick items not listed in the moveset. Items within the moveset and items outside the moveset are separated by an empty option. Should be easy to implement this for moves as well, but I gotta go study for now xD

Should I let the ability option allow all abilities or only those that the Pokemon has? I'm probably just going to allow any move on the Pokemon since the on-site database can be wrong and I don't wanna extract moves unless there really is a need to haha x) This means you can pick moves are incompatible with the Pokemon though like you can on damage calcs! That should be fine right ??? :O!
 
I would do only the abilities it can have but any move cause of what you said, it would be less of a pain, and could cause incorrect things.
 

sandshrewz

POTATO
is a Site Content Manager Alumnusis a Top Artist Alumnusis a Forum Moderator Alumnusis a Top Contributor Alumnusis a Top Smogon Media Contributor Alumnusis a Battle Simulator Moderator Alumnus
I would do only the abilities it can have but any move cause of what you said, it would be less of a pain, and could cause incorrect things.
Thanks for the input! I've also asked a couple of people so that's what I went with~ You now have the option to pick abilities outside of the set but only those that the Pokemon have; you shouldn't be picking abilities outside the set most of the time anyway lol! You can now pick any move as well. Same goes for nature! edit: oops x_x also thanks to @TalkTakesTime for making the array of moves so I don't have to make one xD

I'll probably move on to getting the relevant stats highlighted as you change natures; eg if you use Admanant, Atk becomes green and SpA becomes red. Don't think I'll be doing it PS style with + and - after the number cos it's harder to programme that lol! After that, I'll probably go on to doing stat calcs.

Feel free to throw me more suggestions! :)

Edit: I've made a GitHub repo some time back here. It contains a file with the SCMS entry for the team builder. It's mainly just for me to keep track of stuff lol! Feel free to add issues there or here. :) You can find what I'm planning to do from there~
 
Last edited:

sandshrewz

POTATO
is a Site Content Manager Alumnusis a Top Artist Alumnusis a Forum Moderator Alumnusis a Top Contributor Alumnusis a Top Smogon Media Contributor Alumnusis a Battle Simulator Moderator Alumnus
Fixed a bug whereby the previous change made the move options put only the first slashed move on top instead of having all slashed moves as the first few options. Sorry for the incovenience caused! >_> The next update will most likely bring a button that links you to the analysis. I personally like reading analysis while building and this is the last feature that the DP Team Builder Cathy made had which I hadn't added yet~ Stay tuned! :)
 

sandshrewz

POTATO
is a Site Content Manager Alumnusis a Top Artist Alumnusis a Forum Moderator Alumnusis a Top Contributor Alumnusis a Top Smogon Media Contributor Alumnusis a Battle Simulator Moderator Alumnus
Not a really important update but I've just added a button that links to the analysis. It brings you directly to the set your chose or the Pokemon in the appropriate tier if you didn't pick a set. It also links to the main Pokedex if you didn't pick a Pokemon! It opens them in a new tab though! :)
 

scorpdestroyer

it's a skorupi egg
is a Tiering Contributor Alumnusis a Top Contributor Alumnus
If everything has been selected for a certain Pokemon, and then the set is changed to empty, the Pokemon doesn't show up in the export at all. In other words if I select a set complete with all the moves, then switch the set back to empty, it doesn't show up
 

sandshrewz

POTATO
is a Site Content Manager Alumnusis a Top Artist Alumnusis a Forum Moderator Alumnusis a Top Contributor Alumnusis a Top Smogon Media Contributor Alumnusis a Battle Simulator Moderator Alumnus
Welllll that was meant to be intentional haha >_>! I made the exporter ignore anything that does not have a chosen Pokemon or set. I should probably make it have a chosen ability and at least one move y/n? It'll probably be better that way I think?
 

scorpdestroyer

it's a skorupi egg
is a Tiering Contributor Alumnusis a Top Contributor Alumnus
I meant that when I finish making all my moves, abilities, etc., and I switch the set to an empty one (the moves, abilities still remain), the thing doesn't show up in exportable. Maybe I didn't understand you correctly?
 

sandshrewz

POTATO
is a Site Content Manager Alumnusis a Top Artist Alumnusis a Forum Moderator Alumnusis a Top Contributor Alumnusis a Top Smogon Media Contributor Alumnusis a Battle Simulator Moderator Alumnus
Yeaaa I know what you mean. I made the exporter not export if the set is left blank, even if you've filled in the other stuff. I should probably remove that and make the export only require at least one move and a chosen ability instead of having a set chosen.
 

sandshrewz

POTATO
is a Site Content Manager Alumnusis a Top Artist Alumnusis a Forum Moderator Alumnusis a Top Contributor Alumnusis a Top Smogon Media Contributor Alumnusis a Battle Simulator Moderator Alumnus
Okay, updated the exporter with the new validation. It'll no longer ignore the Pokemon if there's no set chosen. It'll export Pokemon with at least one move and ability. I didn't think anyone would set the set back to blank after building lol >_>! Thanks for raising this up @scorpdestroyer :)!
 

sandshrewz

POTATO
is a Site Content Manager Alumnusis a Top Artist Alumnusis a Forum Moderator Alumnusis a Top Contributor Alumnusis a Top Smogon Media Contributor Alumnusis a Battle Simulator Moderator Alumnus
Relatively big update as compared to the recent ones ? Natures now show which stats are boosted / reduced by highlighting the stat name with green / red respectively. Thanks to @V4Victini for teaching me some object-oriented programming stuff that I couldn't really Google. :) Also as per his suggestion, you can now pick options even when you don't have an option selected. A Pokemon must be selected though! In this case, the level is defaulted to 100; I'll make it go according to tier soon. Abilities as usual only let you pick those of that Pokemon.

Also thanks to @The Immortal and @Toast++ for helping with bug fixing :)
 

sandshrewz

POTATO
is a Site Content Manager Alumnusis a Top Artist Alumnusis a Forum Moderator Alumnusis a Top Contributor Alumnusis a Top Smogon Media Contributor Alumnusis a Battle Simulator Moderator Alumnus
Major update???? Base stats and stat calucation is now implemented! This took quite a while lol >_>! That's probably one of the most important part of a teambuilder? With this, the SmogDex Teambuilder is officially done :)

I'll probably look into some code optimization soon-ish but it won't really make a noticeable difference for users though! Enjoy~! Do feel free to continue making suggestions etc! :)
 
This is excellent! I'm going to be using it a ton =p. Just one nitpick: can the IVs change in the teambuilder or vice-versa depending on which Hidden Power is chosen (like on PO)?
 

sandshrewz

POTATO
is a Site Content Manager Alumnusis a Top Artist Alumnusis a Forum Moderator Alumnusis a Top Contributor Alumnusis a Top Smogon Media Contributor Alumnusis a Battle Simulator Moderator Alumnus
This is excellent! I'm going to be using it a ton =p. Just one nitpick: can the IVs change in the teambuilder or vice-versa depending on which Hidden Power is chosen (like on PO)?
Not atm. This is something I might look into though! I've always used DJD's damage calc to tweak IVs for Hidden Power since PS doesn't tell you what Hidden Power you get from those IVs although it does set the default IVs for Hidden Power. If I were to implement it I'll probably do it both ways. Thanks for pointing that out or I might forget xD
 

sandshrewz

POTATO
is a Site Content Manager Alumnusis a Top Artist Alumnusis a Forum Moderator Alumnusis a Top Contributor Alumnusis a Top Smogon Media Contributor Alumnusis a Battle Simulator Moderator Alumnus
Adding a new to-do: Calculate Hidden Power based on IVs and change IVs according to Hidden Power. Automatically lower Speed IVs if using Trick Room / Gyro Ball and still maintain the same Hidden Power BP and type. Thanks to people in #showdown for suggesting this! :)
 

sandshrewz

POTATO
is a Site Content Manager Alumnusis a Top Artist Alumnusis a Forum Moderator Alumnusis a Top Contributor Alumnusis a Top Smogon Media Contributor Alumnusis a Battle Simulator Moderator Alumnus
Added a Help tab for those new to the teambuilder. Should have all the info there I think. I'll tackle Hidden Power tomorrow, not tonight though haha! :p
 

scorpdestroyer

it's a skorupi egg
is a Tiering Contributor Alumnusis a Top Contributor Alumnus
The export doesn't export out specific IV numbers. For example, SubSalac Scolipede doesnt have 30 HP IVs in the export, even though it is stated in the teambuilder
 

sandshrewz

POTATO
is a Site Content Manager Alumnusis a Top Artist Alumnusis a Forum Moderator Alumnusis a Top Contributor Alumnusis a Top Smogon Media Contributor Alumnusis a Battle Simulator Moderator Alumnus
The export doesn't export out specific IV numbers. For example, SubSalac Scolipede doesnt have 30 HP IVs in the export, even though it is stated in the teambuilder
Erm it works for me? Haha. Can you screenshot me what you have on the teambuilder and what the export text had? I'll double check the code later haha.
 

sandshrewz

POTATO
is a Site Content Manager Alumnusis a Top Artist Alumnusis a Forum Moderator Alumnusis a Top Contributor Alumnusis a Top Smogon Media Contributor Alumnusis a Battle Simulator Moderator Alumnus
If anyone does experience weird bugs with the export, do paste me the export or screenshot what your team has that might be causing the problem haha. It was probably just an accident in the above case I guessss. I don't find any bug in the code atm. So it shouldn't have any problems xD if it does, oops haha!

Anyway, the teambuilder now tells you the Hidden Power type and Base Power at the bottom right. :D Next step: if you have Hidden Power [Type] as one of your moves, it'll automatically change the IVs if the moveset does not specify IVs. Also @V4Victini is a ninja and fixed Hidden Power on PS's teambuilder roflol. u_u! haha :p
 

sandshrewz

POTATO
is a Site Content Manager Alumnusis a Top Artist Alumnusis a Forum Moderator Alumnusis a Top Contributor Alumnusis a Top Smogon Media Contributor Alumnusis a Battle Simulator Moderator Alumnus
Actually @scorpdestroyer was right. I managed to find the annoying bug by accident. If you picked a set that has unchanged IVs, it'll reset all IVs back to 31 for all Pokemon due to a bad code from v long ago >_>! I've fixed that now. Also, when you pick sets that uses Hidden Power and has unspecified IVs, eg Shell Smash Gorebyss, it now alters the IV automatically for you. If it has altered IVs, eg Venusaur Chlorophyll Sweeper, it retains the set's IVs.

I'll work on changing IVs when you pick another Hidden Power next~

EDIT: Hidden Power will give you the IV spread with the highest possible Speed like on PS even though it might result in poorer overall IVs. PO on the other hand gives you the max IVs possible and gives you 30 Spe IVs sometimes when 31 Spe is possible. This probably only affects like HP Flying, Water, and Ice iirc. But yea I'm following PS on this one. Thanks to everyone who helped me make this decision~! :)
 
Last edited:

sandshrewz

POTATO
is a Site Content Manager Alumnusis a Top Artist Alumnusis a Forum Moderator Alumnusis a Top Contributor Alumnusis a Top Smogon Media Contributor Alumnusis a Battle Simulator Moderator Alumnus
Updated Hidden Power. Choosing Gyro Ball / Trick Room now lowers your Speed IV to 0, or to match your Hidden Power type and give a BP of 70. Similarly, if you pick Hidden Power while having either Gyro Ball or Trick Room, your Speed IV will lower to match the Hidden Power type and give 70 BP. Also thanks to @V4Victini for letting me know that SpeedIV%4 is the one to hit haha :) sorry for tagging you so many times >_>!

Feel free to bring up more suggestions! :)
 
This is a wonderful tool sandshrewz, thank you for making it. I can't seem to get it to work for Darmanitan though. Otherwise it's incredibly useful for expediting the teambuilding process. Should be on the front page.
 

Users Who Are Viewing This Thread (Users: 1, Guests: 0)

Top