The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > ROM Hacking > Research & Development
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

Research & Development Got a well-founded knack with ROM hacking? Love reverse-engineering the Pokémon games? Or perhaps you love your assembly language. This is the spot for polling and gathering your ideas, and then implementing them! Share your hypothesis, get ideas from others, and collaborate to create!
Research & Development programs in this forum are subject to moderator approval before they are displayed.


Advertise here

Reply
 
Thread Tools
  #1    
Old July 17th, 2011, 12:07 PM
Giga Universe's Avatar
Giga Universe
Working on a tool.
 
Join Date: Aug 2007
Location: South Africa
Age: 19
Gender: Male
Nature: Calm
Send a message via ICQ to Giga Universe Send a message via AIM to Giga Universe Send a message via Yahoo to Giga Universe Send a message via Skype™ to Giga Universe

Advertise here
Would this be a very bad idea? Would it be feasible to make out own script engine for a game to support a greater variety of commands, such as 'takepokemon', iv checkers, etc. If we did, we wouldn't have to edit the current routine, just make a new routine, and run that from a regular script use 'loadpointer' and such.
It could greatly extend scripting possibilities: functions could have return values, and work with variables properly, etc.
Reply With Quote
  #2    
Old July 17th, 2011, 02:48 PM
knizz's Avatar
knizz
 
Join Date: Aug 2007
The scripting-system is too mixed with the rest of the code to replace it. You can add new commands though. Especially 'special' has lots of free slots. Just add your function to that table. I'll post offsets here later.

(Besides you don't really need return values, etc. (and there is LASTRESULT )If you want proper flow control and variables you can just use ASM. Scripts are just intended for simple things. Extending the scriping system isn't just hard but also not the point.)
__________________
Firered IDA 6.1 DB: https://www.dropbox.com/s/hvvmxxoo1dkmdzc/firered.idb
VBA-M with lua scripting support (no longer in development)
Reply With Quote
  #3    
Old July 17th, 2011, 08:02 PM
Shiny Quagsire's Avatar
Shiny Quagsire
どないやねん, ヤドン
 
Join Date: May 2009
Location: Hoenn Safari Zone
Age: 16
Gender: Male
Nature: Jolly
Nice idea, but hard to implement. Adding command and specials is somewhat easy, but XSE and other editors still won't support these new commands withour #raws.
__________________



Reply With Quote
  #4    
Old July 18th, 2011, 05:54 AM
Giga Universe's Avatar
Giga Universe
Working on a tool.
 
Join Date: Aug 2007
Location: South Africa
Age: 19
Gender: Male
Nature: Calm
Send a message via ICQ to Giga Universe Send a message via AIM to Giga Universe Send a message via Yahoo to Giga Universe Send a message via Skype™ to Giga Universe
Quote:
Originally Posted by knizz View Post
The scripting-system is too mixed with the rest of the code to replace it. You can add new commands though. Especially 'special' has lots of free slots. Just add your function to that table. I'll post offsets here later.

(Besides you don't really need return values, etc. (and there is LASTRESULT )If you want proper flow control and variables you can just use ASM. Scripts are just intended for simple things. Extending the scriping system isn't just hard but also not the point.)
Thanks

Quote:
Originally Posted by shiny quagsire View Post
Nice idea, but hard to implement. Adding command and specials is somewhat easy, but XSE and other editors still won't support these new commands withour #raws.
But couldn't we just create a new loader and call that from a normal script? We could then completely rewrite it, and it probably wouldn't be that hard to create something that reads a custom function table. We could always write another script editor...
__________________
Reply With Quote
  #5    
Old July 18th, 2011, 06:30 AM
Jambo51's Avatar
Jambo51
Glory To Arstotzka
 
Join Date: Jun 2009
Gender: Male
Nature: Quiet
Quote:
Originally Posted by Giga Universe View Post

Thanks



But couldn't we just create a new loader and call that from a normal script? We could then completely rewrite it, and it probably wouldn't be that hard to create something that reads a custom function table. We could always write another script editor...
I've already done this in some ways. I didn't write a custom script caller, I simply extended the table which has all the scripting commands on it, and slightly rewrote the engine to support the extended table.

It wasn't hard to do, and the game worked fine with the new commands. The only real issue was the lack of support from the script editors which obviously didn't recognise my new command, and displayed it as a bunch of #raws.

For the record, the command I made was a nice simple buffermapname command, which buffered the name of the map number you gave it.

Anyway, certainly feasible, and not that difficult to pull off, but I second Knizz's comment. Just use specials instead, as this keeps support for XSE etc.
__________________
Hey guys, please check out my recreations of the gen 1 and 2 music on my custom engine at my SoundCloud! - Here!
Reply With Quote
Reply
Quick Reply

Sponsored Links


Advertise here
Thread Tools

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
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 07:17 PM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 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 - 2014 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.