You should consider joining our Discord to ask for support.

We created a support channel using the new Discord Forum feature!

You can also visit our new website, it has a help section in English and French

0 like 0 dislike
407 views
in Script help by (550 points)
closed by
Hey! So I created a new field terrain by using grassy terrain as a base, and I'd like to know the correct way to summon it via a new ability and an in game switch (game switch on=terrain is set in next battle). The terrain seems to work when summoned by other abilities, like misty surge, but nothing happens with its own. I'll put here my scripts in case that helps. Thanks!

https://docs.google.com/document/d/12yjdbLwNVPU_j3v9ngOHSt4s5nTjE7m8xW1HqunF-YU/edit?usp=sharing
closed with the note: Someone already helped me find the solution

1 Answer

0 like 0 dislike
by (17.1k points)
Hey! So right now, I can only answer the part for setting a new Terrain Field. For the part "I want it to be set for next battle also", right now it's not easily feasible, unless you had some things to the Battle Info. In any case, your code lacks some things:

- First, you don't need the rewrite ElectricSurge's code in your custom code, only do that if you have to modify something.

- Second, you have defined the Ability RadiationSurge, but you don't seem to have created the proper Effect. Check this file to see how it's done : scripts\01600 Alpha 25 Battle Engine\04000 Effects\01200 Field Terrain Effects\00100 Electric.rb
This link should help you too : https://gitlab.com/pokemonsdk/pokemonsdk/-/blob/development/%23%20PSDK%20.25%20BE.md#how-to-register-a-field-terrain-effect
by (550 points)
Ok, I changed that electric surge thing. The radiation terrain effect script is on the same document I linked now, I just forgot to paste it before, but it was already done. Sorry for that
by (550 points)
Hi again! I finally decided to not use that ability and instead set the terfain with a scripted battle , but I keep getting a "no implicit conversion from nim to integer" error when trying to start the battle. Removing the field terrain setting command or changing it to another terrain works. Is that a problem of the terrain not getting registered in the database? PS: I already tried using the util to update the database and still nothing.
...