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

Development: New Battle System

1,344
Posts
14
Years
  • Seen Dec 10, 2021
First post ~

I'm a bit new to any kind of higher level coding, so a lot of that still hurts my head right now. lol

I've been attempting projects for a little over a year and constantly failed, but I think I've finally acquired enough knowledge to make a hack.

So will this be something I'll have to implement at the start of my hack? Or am I able to begin right now? If so, is there anything that I should avoid messing with and editing?

Thank you :)

It shouldn't be an issue, as long as you're not making any big changes to battles yourself.
 

Pheonix x

Hello!!
7
Posts
8
Years
  • Age 27
  • Seen Sep 1, 2017
hello! as u said u will completely rewrite the battle engine code so will u be putting mega evolution with its particles or will still has to be done manually.
 

Blah

Free supporter
1,924
Posts
11
Years
I'm just wondering about the attacks. How are they going to work now?

Are they going to be the same as now with the BSP and ASM routines or are you going to re-write them too in order to work different with the new system?

You wouldn't be using BSP or ASM routines for them. I'm trying to keep compatibility with how the original game's core is working. So it'll be extremely similar using callback1 to execute code sequences fast.

Actual attackscripts will be designed further in the future. I'm still not at that point yet, I've been actively thinking about it though, rest assured!

i think something like this would be really cool!
GqmYZnO.png


for the font, if you would style it like this one so it would still be of the same size and attach it to the hp bar background, it would look just fine!!!
YNPvNEZ.png

Thanks, that looks really nice. I'm so sorry to say this after you went through the trouble of making this, but I've decided to show one HP Box at a time in triple and horde battles with a scrolling feature. If we dump that concept I'll use these!!


First post ~

I'm a bit new to any kind of higher level coding, so a lot of that still hurts my head right now. lol

I've been attempting projects for a little over a year and constantly failed, but I think I've finally acquired enough knowledge to make a hack.

So will this be something I'll have to implement at the start of my hack? Or am I able to begin right now? If so, is there anything that I should avoid messing with and editing?

Thank you :)

You should be fine as long as you document which tables you repoint, and when you modify game functions, you keep their output and inputs equivalent.

Recall that this uses a lot of game functions, as well as the tables in the game. So if you modify those, then you must make sure they're working for the intended cases.

It shouldn't be an issue, as long as you're not making any big changes to battles yourself.

almost

hello! as u said u will completely rewrite the battle engine code so will u be putting mega evolution with its particles or will still has to be done manually.

Not even that far yet :c

---

I made a lot of updates to this project while working in the dark. Now if you have devkitarm, python 3.5, you can compile and run this yourself. Right now it's just the battle intro sequence, but we're almost at the fun part of the project. If you're interested:

http://pastebin.com/R8XXQzrP
 

Criminon

Forever Spriting
265
Posts
11
Years
Glad to see this is what you've been up to, FBI! Hopefully there is still some good progress being made.
 

Blah

Free supporter
1,924
Posts
11
Years
Glad to see this is what you've been up to, FBI! Hopefully there is still some good progress being made.

Yeah, I updated on Git a couple of days ago. The send out animations are all finished and I was working on the main Battle Script engine.

There will be some drastic changes to this project in the near future, so keep an eye out :)
 

Criminon

Forever Spriting
265
Posts
11
Years
Scooting back in here to see how progress is going. Looks like last commit was in March. You still working on this?
 
28
Posts
8
Years
hey man this is a great implementation to the pokemon hacking community! keep up the good work will definitely be using this. You said you needed help.. Where could I help you? Also, how's the progress coming?
 

Blah

Free supporter
1,924
Posts
11
Years
Ahh, sorry guys I'm personally not working on this anymore. I've since quit ROM hacking and probably not looking to get back into it. Maybe in some distant future I'll consider finishing this, but I'm sort of bored with gen III ROM hacking for now :(

Right now there's just nothing really motivating me to do this.
 
28
Posts
8
Years
Ahh, sorry guys I'm personally not working on this anymore. I've since quit ROM hacking and probably not looking to get back into it. Maybe in some distant future I'll consider finishing this, but I'm sort of bored with gen III ROM hacking for now :(

Right now there's just nothing really motivating me to do this.
bruh
 
5
Posts
8
Years
  • Age 26
  • Seen Jun 8, 2019
Got this Error While Compiling....

raceback (most recent call last):
File "./src/Defines/generation/stringsToCharArray.py", line 15, in <module>
lines = f.read().splitlines()
File "/usr/lib/python3.5/codecs.py", line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc0 in position 8: invalid start byte
./src/damage_calculator.c: In function 'get_base_attack':
./src/damage_calculator.c:1350:29: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
if (!attack->is_special == 1) {
^
./src/damage_calculator.c:1364:27: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
if (!attack->is_special == 1) {
^
Where is: 8388608<class 'int'>
data is: <class 'bytes'>
CSWTCH.14: 08808DF0
CSWTCH.15: 08808E1C
CSWTCH.17: 08808D78
CSWTCH.18: 08808DA4
CSWTCH.34: 08808CE0
CSWTCH.39: 08808CE8
CSWTCH.5: 08807AB4
CSWTCH.6: 08807AE0
CSWTCH.60: 08807C48
CSWTCH.61: 08807C74
__bss_end__: 08808E74
__bss_start__: 08808E74
__end__: 08808E74
__text_end: 08808E74
__text_start: 08800000
_end: 08808E74
ability_present: 0880307C
ability_present_ally: 088030C8
alloc_alt_resources: 08800BE8
apply_dmg_mod: 08803200
apply_mold_breaker: 08803100
ball_capture_anim: 08800194
ball_open_and_spark: 0880016C
ball_release: 08800198
ball_shake: 08800140
ball_throw: 088001A0
battle_end: 08802758
battle_init: 088027BC
battle_intro: 08801E08
battle_malloc_resources: 08802978
battle_prep: 088005C0
battle_prep_second_stage: 08800520
battle_slidein_bg: 088029F0
battler_init: 088026EC
berry_reduction: 08804CD4
c1_battle_prep: 08800574
cb_follow_sprite: 08800200
create_alt_object: 08800BB8
create_battle_box: 088006C8
create_curved_box: 08800738
create_oam: 08800AC8
damage_calculator: 08804DD4
decoder: 0880124C
del_oam: 08800F90
display_ball: 08800038
display_oam: 08800F78
display_textbox: 088006A4
do_anim: 088009EC
draw_hp_bar: 088014F4
draw_hp_nums: 08801A6C
draw_level: 08801B7C
draw_name_gender: 08801ADC
fade_in_obj: 0880021C
flush_string_buffer: 0880106C
gen_string: 088010C8
get_STAB: 08804C70
get_ability: 08803058
get_ability_from_bit: 08802650
get_base_attack: 088042B4
get_base_defense: 08804874
get_base_power: 0880347C
get_crit_dmg: 08804BA8
get_def: 088031E8
get_item: 08803180
get_item_modifier: 08803280
get_species: 088031F4
get_weather: 088031F8
 

LilBueno

Boy Wonder
243
Posts
10
Years
Ahh, sorry guys I'm personally not working on this anymore. I've since quit ROM hacking and probably not looking to get back into it. Maybe in some distant future I'll consider finishing this, but I'm sort of bored with gen III ROM hacking for now :(

Right now there's just nothing really motivating me to do this.

That's a shame. I was looking forward to learning how to use this. Still, hopefully this inspires others to think outside the box with their projects
 

Trev

[span="font-size: 8px; color: white;"][font="Monts
1,505
Posts
11
Years
  • Age 27
  • Seen Nov 15, 2023
What graphics do you need? I could try my hand at some custom ones if they're needed. Unfortunately I can't program but if I can help out this way, I'd be glad to!
 

Froosty

The_Learner
535
Posts
9
Years
Hmm, recently rebooted this and rewrote it completely.
Current progress:
https://streamable.com/lg6cn
Src:
https://github.com/EternalCode/battle_engine
I'll be working on this slowly myself, but help is always welcomed.

Would really love to help out though I am just learning the C-hacking as of now.
And thats preety much the reason I have lately been disturbing you around the DM,
and asking if we could have some talks on discord,

anyways what are you plans up next,
and is there anything that can be done ??
 

Blah

Free supporter
1,924
Posts
11
Years
What graphics do you need? I could try my hand at some custom ones if they're needed. Unfortunately I can't program but if I can help out this way, I'd be glad to!
I'm able to work on graphical stuff if needed.

Thanks. Right now I don't need graphic work yet. I'll need graphic work when doing move animations (maybe I'll just rip the graphic resources from the EM project?).

What I need mostly right now is for move researchers. It's not a programming thing, it's just for you to figure out what moves behave in what way exactly. I need to know how certain abilities and move combinations work like together currently.


Would really love to help out though I am just learning the C-hacking as of now.
And thats preety much the reason I have lately been disturbing you around the DM,
and asking if we could have some talks on discord,

anyways what are you plans up next,
and is there anything that can be done ??

Hmm, if you're just starting out this project's source code may be intimidating (particularly the graphics code).

I think you should start by getting the project to build, though this is currently not possible without the deps folder I have https://www.dropbox.com/s/acjs8d5z8ma8cvp/deps.rar?dl=0
Extract that to the working directory of the project and follow the build instructions. From there, you can try to implement the "run" feature. It's the classic, "Got away Safely!" part and returning to the overworld (Careful of memory leaks!).

Personally, right now I'm working on the main battle loop.
 

Trev

[span="font-size: 8px; color: white;"][font="Monts
1,505
Posts
11
Years
  • Age 27
  • Seen Nov 15, 2023
I can totally do move research for you. If you want, you can add me on Discord or something and just send me the stuff you need to know, and I can look it up for you in my free time.
 

Blah

Free supporter
1,924
Posts
11
Years
I can totally do move research for you. If you want, you can add me on Discord or something and just send me the stuff you need to know, and I can look it up for you in my free time.

Awesome I have something that actually needs to be done atm. It's move flags.

These are the flags that are used currently:
FLAG_CHARGEUP
FLAG_RECHARGE
FLAG_CONTACT
FLAG_DEFROST
FLAG_GRAVITY_DISABLED
FLAG_HEAL_BLOCK_DISABLED
FLAG_MIRRORABLE
FLAG_POWDER
FLAG_PROTECTABLE
FLAG_IGNORE_SUBSTITUTE
FLAG_IRON_FIST
FLAG_REFLECTABLE
FLAG_SNATCH
FLAG_SOUND_BASED
FLAG_STRONG_JAW
FLAG_BULLET_PROOF
FLAG_ONSELF
FLAG_TARGET
FLAG_HITS_ALL
FLAG_TRIAGE_AFFECTED

Here is an example of pound:
Code:
/*POUND_FLAGS*/	FLAG_CONTACT | FLAG_TARGET,

Code:
/* THIS IS A COMMENT */

Code:
FLAGS_CONTACT | FLAG_TARGET

the above means the move makes contact and hits a single target. For hitting all targets use FLAG_HITS_ALL. For hitting only opponent targets use both FLAG_HITS_ALL and FLAG_HITS_TARGET.

Don't worry you don't have to do it all from scratch. I generated something, though some moves have flags missing in them

https://pastebin.com/wx5yzqQh


If you have any questions, please ask!
 
Back
Top