The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary ROM Hacking (https://www.pokecommunity.com/forumdisplay.php?f=284)
-   -   Help Thread Quick Questions & Answers (https://www.pokecommunity.com/showthread.php?t=335486)

Desert Stream~ December 13th, 2015 10:23 AM

How do I expand a map? I want to make the city bigger.

Squeetz December 13th, 2015 10:38 AM

Quote:

Originally Posted by MUDKIP!!! (Post 9033424)
How do I expand a map? I want to make the city bigger.

Assuming you're using Advance-Map: click on the Header tab and scroll Down to "Map Dimensions" and choose your size.

NinjaSlayer461 December 13th, 2015 4:00 PM

2 Attachment(s)
been using essentials i been stuck at area i am using version 15.1 i am using the elite battle pack i did a few towns and stuff but i can figure out how to do 2 thing one is make a pokemon follow you like on heart gold or soul silver also how to show animations i made trainer n but i want this to play before battle i atached the gif version and the converted png one i just want that to show like when you fight N on pokemon black and white one more thing does anyone have a team galactic grunt and minor b overworld sprite sheet size 128x192 and team flare trainer sprite 80x80 size aslo how to do the animation for mega evovleution

destinedjagold December 13th, 2015 5:29 PM

Quote:

Originally Posted by NinjaSlayer461 (Post 9033808)
been using essentials

Go here...

Desert Stream~ December 13th, 2015 7:26 PM

How do I edit the beginning sequence (sprites, text ect.)?

chrunch December 13th, 2015 8:42 PM

Quote:

Originally Posted by MUDKIP!!! (Post 9034034)
How do I edit the beginning sequence (sprites, text ect.)?

Text can be edited with a hex editor, although you'll likely need to repoint it. The sprites are more complicated, as far as I'm aware they all use the same 256 color palette and it can be a bit hard to edit them. Here's a tutorial on it, it doesn't exactly cover everything but it should give you a general idea.

Goblin the Cat December 14th, 2015 12:12 AM

How robust are XSE scripts? For example, if I wanted to make a script using the RNG command to produce a value between 1-100, would it be possible to script a unique output for each possible value? Or would this be too much for the ROM?

Squeetz December 14th, 2015 5:30 AM

Quote:

Originally Posted by Goblin the Cat (Post 9034315)
How robust are XSE scripts? For example, if I wanted to make a script using the RNG command to produce a value between 1-100, would it be possible to script a unique output for each possible value? Or would this be too much for the ROM?

Yes you can. It would just take a very long time typing in all of that.

~Pokedude~ December 14th, 2015 7:16 AM

Quote:

Originally Posted by Goblin the Cat (Post 9034315)
How robust are XSE scripts? For example, if I wanted to make a script using the RNG command to produce a value between 1-100, would it be possible to script a unique output for each possible value? Or would this be too much for the ROM?

Are you capable of compiling assembler code?
Why not implementing a global pointer table, then?

Code:

#dynamic 0x800000
#org @main
random 0xMaxValue  ' random value in LASTRESULT
callasm [offset_of_following_code]


Code:

.align 2
.thumb

.equ ptrTable, 0x08[your_offset]
.equ lastResult, 0x020370d2
.equ storage, 0x02[ram_offset_to_store_string|number]

entry:
push {r0-r1, lr}
ldr r0, lastResult
ldrb r0, [r0] @ random value in r0
mov r1, #0x4 @ size of pointer in ROM
mul r1, r0 @ offset of pointer within table
ldr r0, ptrTable
add r0, r1 @ offset of pointer in ROM
ldr r0, [r0] @ pointer in r0
ldr r1, storage
str r0, r1 @ store pointer in custom RAM location
pop {r0-r1, pc}


After this operation, the pointer is at a custom RAM location which you can use in the further script. :-)
This was written fairly spontaneous so I have not tested it yet. This is a better solution than a huge script that eats up much space in your ROM. If you want to have numbers and not strings, you can ask me and I will modify the ASM code for you! :-)

Scarlet D. December 14th, 2015 11:51 AM

Quote:

Originally Posted by NewDenverCity (Post 9032445)
You're using a really outdated version. Use 1.92, that'll do the trick.

Ah, well that did the trick, it is pretty strange although because i think i tried using another version lately and didn't work on that either, anyway thanks again

NewDenverCity December 14th, 2015 12:45 PM

Quote:

Originally Posted by ~Pokedude~ (Post 9034738)
Are you capable of compiling assembler code?
Why not implementing a global pointer table, then?

Code:

#dynamic 0x800000
#org @main
random 0xMaxValue  ' random value in LASTRESULT
callasm [offset_of_following_code]


Code:

.align 2
.thumb

.equ ptrTable, 0x08[your_offset]
.equ lastResult, 0x020370d2
.equ storage, 0x02[ram_offset_to_store_string|number]

entry:
push {r0-r1, lr}
ldr r0, lastResult
ldrb r0, [r0] @ random value in r0
mov r1, #0x4 @ size of pointer in ROM
mul r1, r0 @ offset of pointer within table
ldr r0, ptrTable
add r0, r1 @ offset of pointer in ROM
ldr r0, [r0] @ pointer in r0
ldr r1, storage
str r0, r1 @ store pointer in custom RAM location
pop {r0-r1, pc}


After this operation, the pointer is at a custom RAM location which you can use in the further script. :-)
This was written fairly spontaneous so I have not tested it yet. This is a better solution than a huge script that eats up much space in your ROM. If you want to have numbers and not strings, you can ask me and I will modify the ASM code for you! :-)

Wouldn't this not work without updating the script pointer? Instead of your custom RAM address you'd call storage, you should use the script pointer, otherwise the script won't go where you want it to go. Unfortunately I'm on a mobile as my computer is broken, but when I get back I'll try to find it for you guys. If you know where it is yourself, then even better.

~Pokedude~ December 14th, 2015 12:54 PM

Quote:

Originally Posted by NewDenverCity (Post 9035070)
Wouldn't this not work without updating the script pointer? Instead of your custom RAM address you'd call storage, you should use the script pointer, otherwise the script won't go where you want it to go. Unfortunately I'm on a mobile as my computer is broken, but when I get back I'll try to find it for you guys. If you know where it is yourself, then even better.

I thought that he wanted a specific value or string which is stored in a RAM location and can then be used in the same script by using "readfarbyte" and then reading the byte out of the script bank. If he wishes to have actual script pointers stored in the table and wants them executed, replace the pop call with:

Code:

pop {r1}
pop {r0} // script pointer in r0
ldr r0, storage // access custom RAM location which is needed because of the POP statements
ldr r0, [r0] // but copies it back to r0 which represents the script pointer
pop {pc}


This should work, provided that the script pointer actually IS in r0. :-)

NewDenverCity December 14th, 2015 1:15 PM

Quote:

Originally Posted by ~Pokedude~ (Post 9035076)
I thought that he wanted a specific value or string which is stored in a RAM location and can then be used in the same script by using "readfarbyte" and then reading the byte out of the script bank. If he wishes to have actual script pointers stored in the table and wants them executed, replace the pop call with:

Code:

pop {r1}
pop {r0} // script pointer in r0
ldr r0, storage // access custom RAM location which is needed because of the POP statements
ldr r0, [r0] // but copies it back to r0 which represents the script pointer
pop {pc}


This should work, provided that the script pointer actually IS in r0. :-)

I'm still not sure why you'd need that free RAM space. Storing the offset where you want to go in the script pointer would automatically move the script. So all you'd need to define is the table of pointers, the script pointer, and the lastresult variable. Your original code would work fine if you did that.

~Pokedude~ December 14th, 2015 1:25 PM

Quote:

Originally Posted by NewDenverCity (Post 9035109)
I'm still not sure why you'd need that free RAM space. Storing the offset where you want to go in the script pointer would automatically move the script. So all you'd need to define is the table of pointers, the script pointer, and the lastresult variable. Your original code would work fine if you did that.

The script pointer is not something you can change whenever you want. The script pointer is stored in either r0 or r1.
Code:

push {r0-r1, lr}


This code pushes r0 and r1 on the stack, so they can be used and modified without altering any script-dependent values.
If you pop r0 and r1 from the stack, the retrieved pointer value (in r0 before str r0, [r1]) will be overwritten with the script-dependent values which were previously pushed. So we need to temporarily store the retrieved pointer value.

Code:

pop {r1}
pop {r0}


After this code snippet, the registers with script-dependent values are restored again. Now you just load the pointer from the temporary space and put it into register r0. After pop {pc}, processor returns to the script-handler which now uses the modified r0 register!

Why not directly modify r0 and then pop?
That's probably what you intended to do. You should be aware of that you completely corrupt the stack by poping less values than you've pushed!

Another possibility
Code:

push {r1-r2, lr} @ leave the r0 register
//--- modify the r0 register to your wishes
pop {r1-r2, pc}


Now the r0 register is not even pushed and can therefore be directly modified.

Help from someone experienced
  • It is not assured whether only r0 and r1 are used in the script handler.
    To be on the save way, just push every register => "push {r0-r7, lr}"
  • It is not assured whether r0 contains the current script pointer!

Goblin the Cat December 14th, 2015 6:00 PM

I've been looking into ASM all night (literally lol) and it's pretty fascinating stuff. I'm going to be tinkering around with it for a bit, I'll be back if I have any followup questions.

Thanks for the help fellas :D

Aethestode December 14th, 2015 8:10 PM

Sorry, I have two questions for FireRed (Jpan engine and saveblock is inserted).

1) Is it possible to add more Map Names (like not replacing the pre-existing one, but add more) into the game?

2) Is it possible to add more in game map? So far, there's only two maps in Firered, Kanto and Sevii Island. Is it possible to add more?

azurile13 December 14th, 2015 8:21 PM

Quote:

Originally Posted by Aethestode (Post 9035530)
Sorry, I have two questions for FireRed (Jpan engine and saveblock is inserted).

1) Is it possible to add more Map Names (like not replacing the pre-existing one, but add more) into the game?

2) Is it possible to add more in game map? So far, there's only two maps in Firered, Kanto and Sevii Island. Is it possible to add more?

Jambo posted a method http://www.pokecommunity.com/showthread.php?t=212492 though I've never done it myself.

As for the world map, no clue. But aren't there normally four? Sevii Islands has three different world maps.

Aethestode December 15th, 2015 12:32 AM

Quote:

Originally Posted by azurile13 (Post 9035539)
Jambo posted a method http://www.pokecommunity.com/showthread.php?t=212492 though I've never done it myself.

As for the world map, no clue. But aren't there normally four? Sevii Islands has three different world maps.

Ty.
Is there a way to add more than 4 maps? So far the only guides I found only say how to edit pre-existing one.

azurile13 December 15th, 2015 12:49 AM

Quote:

Originally Posted by Aethestode (Post 9035782)
Ty.
Is there a way to add more than 4 maps? So far the only guides I found only say how to edit pre-existing one.

Sorry, but I really have no clue. I'm sure it is possible, but I'm not even sure that anyone has attempted it in BPRE because not many people would even need more than four world maps :/ I can tell you that according to knizz, the pointer to worldmap data is at 0x020399E4 (ram), but at a glance, his idb doesn't appear to explicitly write out the structure for that data. A number of worldmap routines start at ROM 0x0C3AC8, so you could start there if some kind soul does not already have an answer for you.

Goblin the Cat December 15th, 2015 3:28 AM

Is there a way to predetermine the nature and IV's of a Pokemon generated through the givepokemon command?

esperance December 15th, 2015 6:21 AM

Quote:

Originally Posted by Goblin the Cat (Post 9035858)
Is there a way to predetermine the nature and IV's of a Pokemon generated through the givepokemon command?

Although it's a bit much, maybe this is what you're looking for?
http://www.pokecommunity.com/showpost.php?p=8942634&postcount=739

RomanFlare December 15th, 2015 2:42 PM

Does anyone know the palette location for the Status Screen at 0xE9A460 in FireRed?

Andrewjessica December 16th, 2015 7:18 AM

I am wondering how i can add the Iv grades that i have seen in some hacks like: 31Iv would be S and 0 Iv would be E-.
Want to implement it into my own hack.

Andrewjessica December 16th, 2015 11:30 AM

How do i add a new pokemon into the pokedex? Or would it be better to replace? Only looking for 1,going to be Shadow Lugia

Leòmhann teine December 16th, 2015 1:20 PM

Anyone know where I can get a virus free download for NTME+ cause the link in the forum isn't working and I really need NTME+ to change the title screen of my fire red rom hack.


All times are GMT -8. The time now is 2:33 AM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.