• 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.

[EM] Battle Engine Upgrade (On Halt, Will undergo reboot!)

Status
Not open for further replies.
112
Posts
8
Years
  • Age 27
  • Seen Mar 15, 2024
They have one animation. Some byte in the battle scripting struct decided which one to play.

Hmm, but I managed to find the offset for sky attack's second turn animation which is 1CAE31 in fire red (2CD28E in emerald)which made me believe that Solar beam, fly, bounce and frustration/rollout/return variants have their own animation offsets somewhere.
 
794
Posts
10
Years

As KDS said, new pokemon in this hack could have been replaced instead of repointed. Also all functions that use learnset table are in the 'learsnet.c' file. I haven't played the hack in question, but the only thing that's missing here is Pokemon's index. You just need to find it and put the pointer in the right place in the table.

Also, help would be much appreciated. You can visit this IRC as I'm there most of the time and it would be more convenient talking there instead of PMs or in this thread.
 

Bulbadon

Might or might not come back
106
Posts
9
Years
  • Age 26
  • Seen Aug 26, 2016
The links aren't there in the Installation instructions.

Edit: Its working now.
 
Last edited:
45
Posts
10
Years
  • Age 25
  • Seen Sep 25, 2022
Is mega evolution routine is inserted here? if yes, tell me how to put it in G3T and also i thought that the movesets were updated but i checked in G3T, its not yet updated.
 

BluRose

blu rass
811
Posts
9
Years
Is mega evolution routine is inserted here? if yes, tell me how to put it in G3T and also i thought that the movesets were updated but i checked in G3T, its not yet updated.
a.) no, but it is planned
b.) the movesets are handled differently now, most moveset editors become useless
the best way to go about editing movesets is simply editing them before insertion
 
88
Posts
7
Years
  • Age 37
  • Seen May 10, 2017
Is mega evolution routine is inserted here? if yes, tell me how to put it in G3T and also i thought that the movesets were updated but i checked in G3T, its not yet updated.

Yep, just to expand a bit more (as I've done it), if you want to edit the learnsets simply go into the src folder and edit the learnset file using notepad.

I recommend searching for the move name elsewhere before you add it though, so you can type it in the correct format. No biggy if you don't though as it will tell you where the error is when you attempt to build.

Keep a backup of that learnset doc too for future updates.
 
88
Posts
7
Years
  • Age 37
  • Seen May 10, 2017
Sorry, I was just expanding on the second part. Probably should have made it a little clearer. BluRose was right about megas. It's a planned feature.
 
91
Posts
14
Years
  • Seen Feb 22, 2023
I just checked out your code and thought its truly amazing. I also copied some of your structures and tried to implement your features into my own hack (Working on FR though otherwise I would just contribute to your engine :T) - Hope you don't mind that, making sure to give you the respective credit once my hack is finally released... (https://github.com/SBird1337/source_of_the_sovereign/tree/master/src/battle_engine for sake of reference)

I am unsure about one thing: On your initiative calc routine you don't seem to take weather conditions into account, when looking at the original routine I saw that it does (of course) - as far as I understand your hooking scripts you just override the whole routine with your own there so no normal code is executed and therefore weather is ignored completely. Am I missing something or is this just a thing not yet implemented.

~SBird

Edit: Another thing I don't quite get is why you need a hook for the animation of power trick etc. Is there anything special I don't get about those types of moves, sure you need to hardcoded the effect but the animation?
 
Last edited:

Trainer 781

Guest
0
Posts
Left this a few days just in case I found anything else in the meantime. Gyro ball seems to be pretty wonky. I mean, it works, but it seems to make the enemy sprites go all dodgy. Sometimes it makes the sprite disappear, sometimes it just makes it look funny.

https://www.youtube.com/watch?v=YCwhZ2B1Ngc
I think I'll put back the old animation. Because it looked more cooler.

Can I apply this to a modified Theta Emerald game?
Of course, if you have free space.

I just checked out your code and thought its truly amazing. I also copied some of your structures and tried to implement your features into my own hack (Working on FR though otherwise I would just contribute to your engine :T) - Hope you don't mind that, making sure to give you the respective credit once my hack is finally released... (https://github.com/SBird1337/source_of_the_sovereign/tree/master/src/battle_engine for sake of reference)

I am unsure about one thing: On your initiative calc routine you don't seem to take weather conditions into account, when looking at the original routine I saw that it does (of course) - as far as I understand your hooking scripts you just override the whole routine with your own there so no normal code is executed and therefore weather is ignored completely. Am I missing something or is this just a thing not yet implemented.

~SBird

Edit: Another thing I don't quite get is why you need a hook for the animation of power trick etc. Is there anything special I don't get about those types of moves, sure you need to hardcoded the effect but the animation?

No problem. I actually, will be more than happy if someone decides to port this to FR. Not sure about how Dizzy will feel xD.
Also, what do you mean by the initial calc routine? Loading weather in a battle if the overworld has a weather condition or weather ball or anything else.
The hook is for pallet swap of a particle during the animation. I don't know too much about it. MrDollsteak made it so maybe he can elaborate it further.

So what do i do to Enable mega evolution? pardon me for being noob

Sorry, I was just expanding on the second part. Probably should have made it a little clearer. BluRose was right about megas. It's a planned feature.

Mega Evolution system isn't done in this engine yet.

You can try to implement it yourself though.
http://www.pokecommunity.com/showthread.php?t=348182

Megas are nearly fully functional now, except for 2-3 graphical handlers, Rayquaza's mega evolution, knock off, trick handling for mega stone and a multi battle check.
Actually, the part except the mega icons and triggers on the HUD was already implemented a week ago. It took a week to understand Touched's code and then port it in Emerald with some variations, additions, adjustments and tweaking.

To enable Megas:
1. Before building the code, open the defines.h files in the src folder. In line 35, change the keystone index to the item index of your liking. After that build it.
2. In G3T, open the 'pokemon editor.ini' file in the Customization folder.
3. Paste this:
Code:
FB=Mega Evolution
FF=Revert Megas
in the evolution conditions section.
4. Now, open the items editor. Choose an item of your choice to be used as a mega stone. Set its Special Value 1/2 (or Held Item Effect) to 139 (in decimal) or 0x8B (in hex).
5. In the extra section of item, put the index of the target Mega Pokemon (e.g index of Mega Scizor if want your item to behave like Scizorite).
6. Now, open the pokemon editor, chose the mon you want to mega evolve. Then go to the evolution tab and add an entry there by setting 'Condition To Evolve' as 'Mega evolution' and
'Evolve To' to the Mega Species (e.g Mega Scizor in case of Scizor).
7. Make sure to set back the original species as Revert Megas evolution of mega species.
(e.g Scizor as Revert Megas evolution of Mega Scizor).

To activate it. Press the start button while choosing a move, you will hear a sound.
 
Last edited:
11
Posts
7
Years
  • Age 34
  • Seen Dec 3, 2016
I already tested it to the Modified Rom, but it freezes every pokemon battle..

:(

i'm sorry but maybe I just can't handle scripting yet.. >.<
but i'll still try I might get right after trying again and again.. :D
 
Last edited:
91
Posts
14
Years
  • Seen Feb 22, 2023
@KDS: Initiative, I meant Initiative :P

To be precice: The routine that compares two pokémon and decides who is to act first (I guess this is also used if more than two pokémon participate in a battle and it is just called multiple times)

You check for priority moves, trick room etc. but not for weather conditions.

~SBird
 

Trainer 781

Guest
0
Posts
I already tested it to the Modified Rom, but it freezes every pokemon battle..

:(

i'm sorry but maybe I just can't handle scripting yet.. >.<
but i'll still try I might get right after trying again and again.. :D

Try inserting this where is there is enough free space available. And make sure to change both the offsets as per the instructions.

@KDS: Initiative, I meant Initiative :P

To be precice: The routine that compares two pokémon and decides who is to act first (I guess this is also used if more than two pokémon participate in a battle and it is just called multiple times)

You check for priority moves, trick room etc. but not for weather conditions.

~SBird

It is calculated in the get_speed function that takes bank as a parameter.
 
11
Posts
7
Years
  • Age 34
  • Seen Dec 3, 2016
If I install this to a unmodified Rombase, there wouldnt be any problem right? i mean installing this to the 1.0 emerald rom...
 
130
Posts
8
Years
  • Age 28
  • Seen Jun 14, 2023
Hey KDS, Lava Plume is missing it's description bytes so it and every move after it uses the move description that comes after it. Also, PGE keeps throwing out errors when certain moves from gen 4-6 are selected. DizzyEgg told me to ask you about it.

Spoiler:
 

odoodo

School Kid
32
Posts
13
Years
  • Age 29
  • Seen Jan 7, 2017
i dont know what i'm doing wrong but i tried to do mega-evolution in a vanilla rom and set the keystone to be potion(0x0D),blue shard as the mega stone and set 1/2 to 139 and extra to kyogre(404), and set mega for mudkip to kyogre and revert kyogre to mudkip, but nothing seems to be happening in battle when i let mudkip hold the blue shard and press the start button . i even made potion a key item but it still doesnt work.
 
35
Posts
8
Years
Just an appreciation post.
Thank you.

I'll help this project tangentially by starting to contribute to the emerald Sprite base with Mr Ds and I will try to do some animations if I have time.

Thank you
 
Status
Not open for further replies.
Back
Top