The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Is it in any way possible to writetooffset a variable?

Notices
For all updates, view the main page.

Binary ROM Hacking Need a helping hand or just want to talk about binary ROM hacks? Get comments and answers to any ROM Hacking-related problems, questions or thoughts you have here.

Ad Content
Reply
 
Thread Tools
  #1   Link to this post, but load the entire thread.  
Old January 29th, 2017 (11:15 PM).
Glaceon69's Avatar
Glaceon69 Glaceon69 is offline
 
Join Date: Jan 2017
Age: 31
Gender: Female
Posts: 20
Scripting for Fire Red with XSE, and I want to write the value currently stored in a variable to an offset, in the same manner as writetooffset. Is this possible, even in a round about way?
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old January 30th, 2017 (9:10 AM).
Blah's Avatar
Blah Blah is offline
Free supporter
 
Join Date: Jan 2013
Location: Unknown Island
Gender: Male
Posts: 1,924
Store it in a 0x8000 series variable, and then use the scripting command copybyte.
__________________
...
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old January 30th, 2017 (8:08 PM). Edited January 30th, 2017 by Glaceon69.
Glaceon69's Avatar
Glaceon69 Glaceon69 is offline
 
Join Date: Jan 2017
Age: 31
Gender: Female
Posts: 20
Thanks, but what offset would I use in the copybyte command for that variable?
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old January 30th, 2017 (8:34 PM).
BluRose BluRose is offline
blu rass
 
Join Date: Apr 2014
Location: michigan tech
Age: 22
Gender: Male
Nature: Timid
Posts: 812
Code:
copyvar 0x800X 0x[yourvar]
copybyte 0x[youraddress] [0x020270B8 + 0x800X * 2] ' so 0x020370B8 if using var 0x8000, 370BA if using var 0x8001, etc.
note that you can't actually write to ROM space
__________________
heyo check out my github:

BluRosie
highlights:
battle engine for heartgold
various feature branches in heart gold (fairy type, odd egg, mud slopes)

i'm a big part of the development team of pokemon firegold! all the code that i develop for that hack is also on my github

also on discord: BluRose#0412
Reply With Quote
  #5   Link to this post, but load the entire thread.  
Old January 30th, 2017 (9:05 PM).
Glaceon69's Avatar
Glaceon69 Glaceon69 is offline
 
Join Date: Jan 2017
Age: 31
Gender: Female
Posts: 20
Quote:
Originally Posted by BluRose View Post
note that you can't actually write to ROM space
Oh, well that certainly throws a wrench in my plans. Is there any other way to overwrite wild and trainer pokemon levels through scripting? Was planning to just directly overwrite them in the trainer/level scripts.
Reply With Quote
  #6   Link to this post, but load the entire thread.  
Old January 30th, 2017 (9:24 PM).
BluRose BluRose is offline
blu rass
 
Join Date: Apr 2014
Location: michigan tech
Age: 22
Gender: Male
Nature: Timid
Posts: 812
Quote:
Originally Posted by Glaceon69 View Post
Oh, well that certainly throws a wrench in my plans. Is there any other way to overwrite wild and trainer pokemon levels through scripting? Was planning to just directly overwrite them in the trainer/level scripts.
um
no, not reallt
if you feel up to the task, you can comb through this and check out his level-loading routine and modify it to your usage

i can check into it a little bit after school maybe sometime assuming i don't do robotics tomorrow or something :P
__________________
heyo check out my github:

BluRosie
highlights:
battle engine for heartgold
various feature branches in heart gold (fairy type, odd egg, mud slopes)

i'm a big part of the development team of pokemon firegold! all the code that i develop for that hack is also on my github

also on discord: BluRose#0412
Reply With Quote
  #7   Link to this post, but load the entire thread.  
Old January 30th, 2017 (9:40 PM). Edited January 30th, 2017 by Glaceon69.
Glaceon69's Avatar
Glaceon69 Glaceon69 is offline
 
Join Date: Jan 2017
Age: 31
Gender: Female
Posts: 20
I have zero experience with ASM, but I'll start looking into it. That link looks a bit out of my league though.

Going in a different direction... I see that enemy pokemon information is stored in RAM.
Could I edit their level there?
Would that data be accurate in the OW at any point, or only during battle?
If only during battle, is there a way I could change it at the start of/during battle?
Reply With Quote
Reply

Quick Reply

Join the conversation!

Create an account to post a reply in this thread, participate in other discussions, and more!

Create a PokéCommunity Account
Ad Content

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 9:23 AM.