The PokéCommunity Forums  

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

Notices

ROM Hacking Hub General discussions about ROM Hacking and Emulation. Not sure where to start? This is the place for you.
Posting links to ROMs is illegal and is not tolerated anywhere on the forum.


Closed Thread
Click here to go to the first staff post in this thread.  
Thread Tools
  #26    
Old January 10th, 2012, 11:19 AM
IIMarckus's Avatar
IIMarckus
J946@5488AA97464
 
Join Date: Oct 2007
Gender:
Providing a GUI editor is fine, but please provide at least a basic command‐line option for people who like to use other text editors like vi.

Also, making it open source would be a great idea.
__________________
iimarck.us / hax.iimarck.us

If you want me, please contact me by email. [email protected]

If you want to hack Pokémon RBY or GSC, read, read, and read some more. This has tons of valuable information.

Pokémon Red disassembly project

Rules that should be rethought: 25charlimit, bumping.
Bad posts are bad posts, regardless of how many words are in them or how old the thread is.
Good posts are good posts, regardless of how old the thread is—and brevity is underrated.
  #27    
Old January 10th, 2012, 11:47 AM
Stash
Togepi
 
Join Date: Aug 2010
Gender: Male
Nature: Adamant
Adding a looping feature is very good idea:

Code:
loop(@i ; 10)
{
      message("Message " + i);
}
OR

Code:
loop(@i ; 10) :
message("Message " + i);
@i declares an integer variable and 10 represents how many times the loop will iterate. Using for or while might be a little confusing to some so using a keyword like loop explains what will happen upon usage better. I also am fond of using brackets since they organize the script, but not really needed. This is regards for a loop. I haven't seen something similar to this in other languages, so this will be great if it is to be implemented. Having a script editor that have a close syntax to an actual programming language would be great, at least in my opinion.
  #28    
Old January 10th, 2012, 12:00 PM
tinix's Avatar
tinix
PearlShipper & C Programmer
 
Join Date: Feb 2010
Location: Bratislava, Slovakia
Age: 17
Gender: Male
Quote:
Originally Posted by Stash View Post
Adding a looping feature is very good idea:

Code:
loop(@i ; 10)
Code:
{
      message("Message " + i);
}
OR

Code:
loop(@i ; 10) :
Code:
message("Message " + i);
@i declares an integer variable and 10 represents how many times the loop will iterate. Using for or while might be a little confusing to some so using a keyword like loop explains what will happen upon usage better. I also am fond of using brackets since they organize the script, but not really needed. This is regards for a loop. I haven't seen something similar to this in other languages, so this will be great if it is to be implemented. Having a script editor that have a close syntax to an actual programming language would be great, at least in my opinion.
Well you can already do this in XSE by doing something like this:
Code:
#dynamic 0x80000
 
#org @main
lock
setvar 0x8000 0x0
goto @loop
end
 
#org @loop
compare 0x8000 0xA
if 0x1 goto @cont
//Code Here
addvar 0x8000 0x1
goto @loop
end
 
#org @cont
release
end
Anyway I think it is great idea to have loops implemented with less annoying syntax.
EDIT: This is very similar to Assembler loops and I think that if we will be implementing some other dialect for scripting whit some advanced freatures like loops or objects, we should treat XSE like "assembly". By that I mean like C on computers which is compiled into assembly and the machine code. We could make the compiler compile the new dialect into machine code BUT any freature of the new dialect must be implementable somehow through the "assembly" (XSE in our case).
Quote:
Also, making it open source would be a great idea.
I also support this.
__________________
Pokémon games i own:
Pokémon Diamond
Pokémon Platinum
Pokémon Ranger: Shadows of Almia
Pokémon HeartGold Version

75% of Pokemon gamers use cheats and specially made codes to make their pokemon battle-worthy. If you are one of the 25% percent that level their Pokemon up legally, put this in your signature.
-Started by SkittyLover77



Last edited by tinix; January 10th, 2012 at 12:15 PM.
  #29    
Old January 10th, 2012, 05:05 PM
DavidJCobb
RESIDENT RAAAAAAAAAAAAGEMASTER
 
Join Date: Jul 2010
Gender: Male
Nature: Lonely
Quote:
Originally Posted by Lawrenсe View Post
I find applymovement too lengthy of a command; how about reducing it to just move? If you want to move that player, then we use move(player, movement commands)
It's my understanding that there actually are other move-related commands, which teleport a sprite instead of having it execute a movement sequence. Ergo "move" as a command name would be too ambiguous.
__________________
  #30    
Old January 10th, 2012, 05:40 PM
link12552's Avatar
link12552
just tired, that's all
 
Join Date: Dec 2007
Location: The not so distant future
Age: 18
Gender: Male
Nature: Calm
Someone mentioned a smart intellisense type dialog, I think that would be wonderful!
(no more having to guess what variable goes where)

And on second thought, I don't know if all these colors are necessary for the highlighting.
Just blue and black, with maybe red for defined terms, would be very easy on the eyes.

Blue = things like "if" and all the functions,
Red = defined terms, from the custom definitions and the predefined ones, they might begin with the #,
Green = commented lines,
Black = everything else.

It can be hard to see the orange font if you have, say a dim laptop screen, or there is a source of light/glare.

I was also wondering if you were going to use c# or c/c++ style naming convention.

c/c++ contains more all caps and all lowercase terms, where as in c# most terms begin with a capital letter, and are lowercase except if the term, is a combination of multiple words.
(ex: applymovement vs ApplyMovement)
__________________
  #31    
Old January 12th, 2012, 03:26 AM
Darthatron's Avatar
Darthatron
巨大なトロール。
Community Supporter Tier 2
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 22
Gender: Male
Nature: Modest
Quote:
Originally Posted by tinix View Post
Another idea ive got is some kind of plugin system, so people can extend the editor without messing with original source code. So for example I want the editor to be able to compile ASM, I make an DLL that can have pre-defined entry point for program to find. Then I open the editor open some kind of dialog for adding extensions and it would load the assembly and add it to the menu (or another dialog with extensions) from which I can invoke the extension.
Ugh. That would take so much effort to implement. It's going to be open source. People can just edit it.
Quote:
Originally Posted by hinkage View Post
I think you should treat Person Events as objects, and things like applymovement as methods. (Java style)

Eg,

#org mainorg
player.lock(); // lock
player.move1(up, down, left, end); // applymovement move1 PLAYER
msgbox.talk1("Hello there, " + \v\h01 + "!"; noclose); // msgbox talk1 callstd msg_noclose
mainorg.call(suborg); // call suborg
player.release(); // release
end;

#org suborg
var4001 = 1; // setvar 0x4001 0x1
if (var4001 == 0x1); // compare 0x4001 0x1, if ==
var4001 = 2; // setvar 0x4001 0x2
return;

// #org move1
m walk_up walk_down walk_left end

// #org talk1
= Hello there, \v\h01!



As you can see, this is all just aesthetics (the comments are PKSV style).

In addition, please use black font for normal syntax. Also give some syntax, like msgbox or if, bold, dark blue font like PKSV does. I find that really helpful. I think being able to add comments to the script would also be very useful. Everything else you've done so far is good. I especially like being able to put movements/text on the same line as the command.

This would help beginners program in a more realistic way.
I don't like Java. But... I guess. Maybe.
Quote:
Originally Posted by Sawakita View Post
Looks good. I personally like the C syntax better (might just be because of consuetude).

About suggestions, I don't know how much it would be worth it, but what about implementing a VisualStudio-like "intellisense" (sorry for using that word since I know many persons can't stand it, but it explains the idea)? So when you open a parenthesis after the function name, a tool-tip-text pops up showing possible arguments for that function.
I was already planning on including something like this. I have the base coded already.
Quote:
Originally Posted by Sande View Post
I'm really new to hacking etc but I am actually studying IT. I just had a class with some assembler coding this semester.
I don't know how many possibilities are available for hacking but maybe you can do one of these things:
1) for/while cycle.
2)Or something like this:
[insert command here] * 6; // do something 6 times no matter what it is. Would be easier than a for cycle and better to code. Also, no-one can possibly create an endless for cycle this way. Then again if your stupidity reaches a critical mass it might happen anyway.
Nope. I think for loops are easy enough anyway.
Quote:
Originally Posted by Sande View Post
Also, working slowly on a hack that will have a lot of puns/jokes and hidden easter eggs in it. I have designed a map and a rough storyline, but as I'm still learning to script it will take a lot of time until I'm ready to come out with it.
k
Quote:
Originally Posted by DavidJCobb View Post
Now that I look at the specific example you've given, the differences are minimal. XSE (as I usually see it posted here) just looks cleaner because it's lowercase. :\

I've seen other examples of PokeScript and PKSV on the boards, though, and those usually look quite a bit messier. Dollar signs, weird command names...
Haha, indeed.
Quote:
Originally Posted by Spherical Ice View Post
I agree with DavidJCobb's idea for the layout purely because I'm more used to that kind of style.
Though the colours - the orange in particular - tend to hurt my eyes. I'd suggest making ordinary commands (which are in blue) plain black, and then the text using the orange to become the blue. Though I guess then non-commands won't be noticeable...eh, idk. This looks great though, good luck (not that you need luck).
Hmm, you may be right. Colors will be customizable anyway, but it's probably better to make make them basic colors for now.
Quote:
Originally Posted by Truality View Post
The inline thing is a good feature indeed. I'm fine with both layouts, but I wonder if you're going to include something like what XSE has on its friendly user interface; a built-in guide/command list and/or a text adjuster.

Overall, best of luck with the project!
Of course. Both of those things.
Quote:
Originally Posted by droomph View Post
Also, maybe an x-code thing where it guesses which function you're going to do?

For example I type in "p" and xcode guesses that I'm going to do "printf", so it prints out in gray, "printf ("message");", and if I decide to keep it...

Something like that.
Er... Maybe. It's a good idea, but may be difficult to implement.
Quote:
Originally Posted by droomph View Post
How about making a loop thing?

I mean,
Code:
@for
for (variable = number, variableoperate, variable condition number)
	loop statement
…
	return '}

next
Code:
	@for
	setvar variable number
	compare variable number
	if1 condition @loop
	jump @next

	@loop
	variableoperate
	statement
	compare variable number
	if1 condition @loop
	jump @next

	@next
It's totally possible.
I really don't see For Loop shorthand as necessary.
Quote:
Originally Posted by droomph View Post
AND YES PRETTY PLEASE INLINE
KAY!
Quote:
Originally Posted by droomph View Post
aww no mac

best of luck!
Yeah. I might code a compiler in C, and build it for Mac and PC, but Mac won't get a GUI. I don't have a mac to test on.
Quote:
Originally Posted by Lawrenсe View Post
I prefer the C-style, but lowercased commands and keywords. Also, coming from a programming (Java) background and wanting to take up scripting, I like to see the print command: message.print("this is a message!"); or msgbox.print("this is a message!");.
Er... That's just a longer name. Seems silly to me.
Quote:
Originally Posted by Lawrenсe View Post
I'm not all that familiar with other scripting formats, but I find applymovement too lengthy of a command; how about reducing it to just move? If you want to move that player, then we use move(player, movement commands) or if any other NPC, we use move(var, commands) where var is the players number or whatever.. I'm just blabbering, lol.

The in-line feature is actually pretty great to implement.

Code:
#org @main
lock; faceplayer;
move(PLAYER, 0x1 0x2);
move(10, 0x1 0x2);
move(10, @movement);
waitmovement();
message.print("a message!", #6); // in-line
message.print(@msg, #6); // or without the hash-tag.
release; end;

#text @msg
= this is a message!

#raw @movement
= 0x1 0x2 0xFF
Something like this. Or not.
Command names will be customizable, so you can change them to whatever you like.
Quote:
Originally Posted by Lawrenсe View Post
Also, the colors are fine except the orange; what about just simple dark gray or something close to black?
Suggestion noted.
Quote:
Originally Posted by IIMarckus View Post
Providing a GUI editor is fine, but please provide at least a basic command‐line option for people who like to use other text editors like vi.

Also, making it open source would be a great idea.
Deal. To both suggestions.
Quote:
Originally Posted by Stash View Post
Adding a looping feature is very good idea:

Code:
loop(@i ; 10)
{
      message("Message " + i);
}
OR

Code:
loop(@i ; 10) :
message("Message " + i);
@i declares an integer variable and 10 represents how many times the loop will iterate. Using for or while might be a little confusing to some so using a keyword like loop explains what will happen upon usage better. I also am fond of using brackets since they organize the script, but not really needed. This is regards for a loop. I haven't seen something similar to this in other languages, so this will be great if it is to be implemented. Having a script editor that have a close syntax to an actual programming language would be great, at least in my opinion.
Ugh. I guess everyone wants a loop. Can someone give me an example of why this would be needed. Any script example would be great. Thanks.
Quote:
Originally Posted by tinix View Post
Well you can already do this in XSE by doing something like this:
Code:
#dynamic 0x80000
 
#org @main
lock
setvar 0x8000 0x0
goto @loop
end
 
#org @loop
compare 0x8000 0xA
if 0x1 goto @cont
//Code Here
addvar 0x8000 0x1
goto @loop
end
 
#org @cont
release
end
Anyway I think it is great idea to have loops implemented with less annoying syntax.
EDIT: This is very similar to Assembler loops and I think that if we will be implementing some other dialect for scripting whit some advanced freatures like loops or objects, we should treat XSE like "assembly". By that I mean like C on computers which is compiled into assembly and the machine code. We could make the compiler compile the new dialect into machine code BUT any freature of the new dialect must be implementable somehow through the "assembly" (XSE in our case).

I also support this.
Radicle.
Quote:
Originally Posted by DavidJCobb View Post
It's my understanding that there actually are other move-related commands, which teleport a sprite instead of having it execute a movement sequence. Ergo "move" as a command name would be too ambiguous.
Yep.
Quote:
Originally Posted by link12552 View Post
Someone mentioned a smart intellisense type dialog, I think that would be wonderful!
(no more having to guess what variable goes where)
WOO!
Quote:
Originally Posted by link12552 View Post
And on second thought, I don't know if all these colors are necessary for the highlighting.
Just blue and black, with maybe red for defined terms, would be very easy on the eyes.

Blue = things like "if" and all the functions,
Red = defined terms, from the custom definitions and the predefined ones, they might begin with the #,
Green = commented lines,
Black = everything else.

It can be hard to see the orange font if you have, say a dim laptop screen, or there is a source of light/glare.
That could work.
Quote:
Originally Posted by link12552 View Post
I was also wondering if you were going to use c# or c/c++ style naming convention.

c/c++ contains more all caps and all lowercase terms, where as in c# most terms begin with a capital letter, and are lowercase except if the term, is a combination of multiple words.
(ex: applymovement vs ApplyMovement)
Well... I'm undecided. I was just going to allow both. But I could add something to change the case if everyone would prefer. Right now it allows for either.


*Sorry if I seem blunt, but there was a lot to reply to.
__________________
あなた は しきしゃ です
わたし は ばか です
  #32    
Old January 12th, 2012, 04:14 AM
hinkage's Avatar
hinkage
Go make some new disaster
Community Supporter
 
Join Date: Aug 2010
Age: 18
Don't bother incorporating loops. I can't imagine any scripts that would use them other than to spam msgbox's or something, and technically loops are already possible using the "jump" or "goto" commands. Although those are bad programming style, they work, and you can do loops just fine.
__________________
(ღ˘⌣˘ღ)
  #33    
Old January 12th, 2012, 06:06 AM
tinix's Avatar
tinix
PearlShipper & C Programmer
 
Join Date: Feb 2010
Location: Bratislava, Slovakia
Age: 17
Gender: Male
Quote:
Originally Posted by Darthatron View Post
Ugh. That would take so much effort to implement. It's going to be open source. People can just edit it.
Well I dont really think it would be painful at all. Before I posted that idea Ive tried to throw together a little program in C# that would load an assembly that has specified entry point and invoke the entry point of assembly. (Essentialy the idea of plugin system was an DLL written in .NET language with specified entry point that would get invoked from the main program) The code for loading the DLL is 6 lines long:
Spoiler:

Code:
 
 
string path = Assembly.GetEntryAssembly().Location;
string[] s = path.Split('\\');
path = path.Remove(path.Length - s[s.Length - 1].Length, s[s.Length - 1].Length);
Assembly a = Assembly.LoadFile(path + "test.dll");
MethodInfo m = a.EntryPoint;
m.Invoke(null, null/*Here could go pointer to main form, or exposable data structure or whatever*/);


This would need little modifications to work in the editor but it is the essential part of it.
And to your response that it will be opensource. That is a good thing, but plugin manager is useful anyway, because if you will release a new version with lets say important bugfix in compiler code, some people could be using modified branch of editor with ASM compiler and syntax highlithing for example. If the modification would be plugin the person that is using it just needs to load it in new version. But if it would be a fork of the source, then they would need to wait for a day or two for new modified version or give up their modification and upgrade instantly. So you need to consider this fact.
__________________
Pokémon games i own:
Pokémon Diamond
Pokémon Platinum
Pokémon Ranger: Shadows of Almia
Pokémon HeartGold Version

75% of Pokemon gamers use cheats and specially made codes to make their pokemon battle-worthy. If you are one of the 25% percent that level their Pokemon up legally, put this in your signature.
-Started by SkittyLover77


  #34    
Old January 12th, 2012, 06:11 PM
droomph's Avatar
droomph
mmm gurl that 90s
Community Supporter
 
Join Date: Sep 2011
Location: bar'jách
Age: 17
Gender: Male
Nature: Impish
Well mainly I wouldn't need loops, I was bored one day and thought "maybe me could implements something like C into it! durr" And this is what exploded out of that.

And #include, #define, and such were out of the question, so I thought maybe...bleh

Anyways, whatever not important

The only C elements we'll (as in noobs like me) need, if at all, are these...
Spoiler:
A simple shorthand for if...then, else (as in no compare crap in front of if1s and if2s)
Spoiler:
Code:
@if
if variable condition number
	then statement
	else statement2

next
Code:
@if
	compare variable number
	if1 condition @then
	jump @else

	@then
	statement
	jump @return

	@else
	statement2
	jump @next

	@next


A neater switch, case n, default
Spoiler:
Code:
@switch
switch variable condition number
	case condition:
		statementcase condition2:
		statement2
…
…
…
…
	default:
		statement3	return '}

next
Code:
	@swtich
	compare variable number
	if1 condition @case
	if1 condition2 @case2
…
	call @default
	jump @next

	@case
	statement
	jump @statement2

	@case2
	statement2
	jump @…

…
	jump @default

	@default
	statement3
	jump @next

	@next
possibly break;

Code:
breaknext
Code:
	goto @next
	…
	@next


variable++ (just easier to read, nothing much)
Spoiler:
Code:
…
variable++

or

…
variable increment
Code:
addvar variable 0x1
Code:
variable operate variable2++
Code:
	operate variable
	addvar variable2
Code:
variable operate ++variable2


And if only absolutely necessary (I can't think of a place where we'll use this):

A neater if...continue
Spoiler:
Code:
@continue
while variable condition number
	statement
	if variable2 condition2 number2
		then continue
	statement2
	return

next
Code:
	@while
	compare variable number
	if1 condition @loop
	jump @next

	@loop
	statement
	compare variable2 number2
	if1 condition2 @loop2
	jump @next

	@loop2
	statement2
	compare variable number
	if1 condition @loop
	jump @next

	@next


And maybe some popular combination instructions (derp)...

condensed lock and faceplayer instructions, as we use them together 90% of the time anyways
Spoiler:
Code:
lockf ;or similar codename
Code:
	lock
	faceplayer
oh right lockall exists too but you know what I mean don't you


And maybe do...while but that's just me.


But just a few ideas from a guy who likes to keep stuff easy.

Anyone can do this on their own, I thought it might be nice.

Apparently I'm wrong. *oh well* *shrugs*

I guess I'll shut up right about now

From the Noobs,
ME SIND IDIOT

FOOTNOTE: I KNOW I suck.

Last edited by droomph; January 12th, 2012 at 06:20 PM.
  #35    
Old January 12th, 2012, 10:50 PM
Darthatron's Avatar
Darthatron
巨大なトロール。
Community Supporter Tier 2
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 22
Gender: Male
Nature: Modest
Quote:
Originally Posted by hinkage View Post
Don't bother incorporating loops. I can't imagine any scripts that would use them other than to spam msgbox's or something, and technically loops are already possible using the "jump" or "goto" commands. Although those are bad programming style, they work, and you can do loops just fine.
It's all compiled into jump's and call's anyway. It's just considered ugly and hard to read.
Quote:
Originally Posted by tinix View Post
Well I dont really think it would be painful at all. Before I posted that idea Ive tried to throw together a little program in C# that would load an assembly that has specified entry point and invoke the entry point of assembly. (Essentialy the idea of plugin system was an DLL written in .NET language with specified entry point that would get invoked from the main program) The code for loading the DLL is 6 lines long:
Spoiler:

Code:
 
 
string path = Assembly.GetEntryAssembly().Location;
string[] s = path.Split('\\');
path = path.Remove(path.Length - s[s.Length - 1].Length, s[s.Length - 1].Length);
Assembly a = Assembly.LoadFile(path + "test.dll");
MethodInfo m = a.EntryPoint;
m.Invoke(null, null/*Here could go pointer to main form, or exposable data structure or whatever*/);


This would need little modifications to work in the editor but it is the essential part of it.
And to your response that it will be opensource. That is a good thing, but plugin manager is useful anyway, because if you will release a new version with lets say important bugfix in compiler code, some people could be using modified branch of editor with ASM compiler and syntax highlithing for example. If the modification would be plugin the person that is using it just needs to load it in new version. But if it would be a fork of the source, then they would need to wait for a day or two for new modified version or give up their modification and upgrade instantly. So you need to consider this fact.
Well... You make valid points. Maybe I shouldn't assume something is difficult just because I've never tried it before. Thanks.
Quote:
Originally Posted by droomph View Post
Well mainly I wouldn't need loops, I was bored one day and thought "maybe me could implements something like C into it! durr" And this is what exploded out of that.

And #include, #define, and such were out of the question, so I thought maybe...bleh

Anyways, whatever not important

The only C elements we'll (as in noobs like me) need, if at all, are these...
Spoiler:
A simple shorthand for if...then, else (as in no compare crap in front of if1s and if2s)
Spoiler:
Code:
@if
if variable condition number
	then statement
	else statement2

next
Code:
@if
	compare variable number
	if1 condition @then
	jump @else

	@then
	statement
	jump @return

	@else
	statement2
	jump @next

	@next


A neater switch, case n, default
Spoiler:
Code:
@switch
switch variable condition number
	case condition:
		statementcase condition2:
		statement2
…
…
…
…
	default:
		statement3	return '}

next
Code:
	@swtich
	compare variable number
	if1 condition @case
	if1 condition2 @case2
…
	call @default
	jump @next

	@case
	statement
	jump @statement2

	@case2
	statement2
	jump @…

…
	jump @default

	@default
	statement3
	jump @next

	@next
possibly break;

Code:
breaknext
Code:
	goto @next
	…
	@next


variable++ (just easier to read, nothing much)
Spoiler:
Code:
…
variable++

or

…
variable increment
Code:
addvar variable 0x1
Code:
variable operate variable2++
Code:
	operate variable
	addvar variable2
Code:
variable operate ++variable2


And if only absolutely necessary (I can't think of a place where we'll use this):

A neater if...continue
Spoiler:
Code:
@continue
while variable condition number
	statement
	if variable2 condition2 number2
		then continue
	statement2
	return

next
Code:
	@while
	compare variable number
	if1 condition @loop
	jump @next

	@loop
	statement
	compare variable2 number2
	if1 condition2 @loop2
	jump @next

	@loop2
	statement2
	compare variable number
	if1 condition @loop
	jump @next

	@next


And maybe some popular combination instructions (derp)...

condensed lock and faceplayer instructions, as we use them together 90% of the time anyways
Spoiler:
Code:
lockf ;or similar codename
Code:
	lock
	faceplayer
oh right lockall exists too but you know what I mean don't you


And maybe do...while but that's just me.


But just a few ideas from a guy who likes to keep stuff easy.

Anyone can do this on their own, I thought it might be nice.

Apparently I'm wrong. *oh well* *shrugs*

I guess I'll shut up right about now
This post was incredibly helpful, actually. You've made me reconsider how I'm going to implement this. Screw conforming to the current scripting styles, I should just make a logical, flowing scripting language.

You've impressed me.
__________________
あなた は しきしゃ です
わたし は ばか です
  #36    
Old January 13th, 2012, 10:27 AM
droomph's Avatar
droomph
mmm gurl that 90s
Community Supporter
 
Join Date: Sep 2011
Location: bar'jách
Age: 17
Gender: Male
Nature: Impish
Oh...

Spoiler:
Anywho I also wanted to say that adding a couple idiv and div (possibly mod) pseudo-commands for the ARM/THUMB thing would be nice also.

Spoiler:
Spoiler:
Code:
 div*	r0, r2 [r1, r3]
Code:
	cmp	r1, #0
	beq	divide_end
	mov	r0, #0
	mov	r3, #1
.start	cmp	r1, r2
	movls	r1, r1, lsl #1
	movls	r3, r3, lsl #1
	bls	start
.next	cmp	r2, r2    
	subcs	r2, r2, r2
	addcs	r0, r0, r3
	movs	r3, r3, lsr #1    
	movcc	r1, r1, lsr #1
	bcc	next
Code:
		cmp	r1, #0
		beq	divide_end
		mov	r0, #0
		mov	r3, #1
	.start	cmp	r1, r2
		bhi	[pc, #4]
		mov	r1, r1, lsl #1
		bhi	[pc, #4]
		mov	r3, r3, lsl #1
		bls	start
	.next	cmp	r2, r2
		bcc	[pc, #4]
		sub	r2, r2, r2
		bcc	[pc, #4]
		add	r0, r0, r3
		mov	r3, r3, lsr #1
		bcs	[pc, #4]
		mov	r1, r1, lsr #1
		bcc	next

MEAHHH probably doesn't work


This would make some parts, like scanning the Poké for its species (e.g. you need a Rayquaza to pass into Sky Mountain or something)

I'm just saying this because that's what got me when I tried to get the Species from the first Pokémon.

It shouldn't be that hard either, just something like the computer "go regurgitate these five numbers for me repeatedly in this order".


Ahhhhhhhhhhhhhhhhhh I think I'm demanding too much. If you could instead make a small pre-packaged plugin for people like me (nubcakes) that takes certain code words and turns them into real code (we define them ourselves). That would be nice, and the "purists" can also go do whatever they do in a dark room all day that way. And you wouldn't have to deal with the crap that we want! Loops, and everything.

And not only that, if you provide syntax coloring personalization like Notepad++ (which should take like five minutes) it wouldn't have to be case sensitive! Just a side bonus.


AHAHAHA yeah I don't know either. Might be nice, though, if you wanted.

Ehhhh you decide. I'm just glad that you would think of the *twenty* people here who use Mac/Linux. (Because sometimes X11/Wine sucks.)

Anyways...best of luck!
__________________
did u no there r 21 letters in the alphabet
o i forgot 5
uraqt


  #37    
Old January 13th, 2012, 01:26 PM
link12552's Avatar
link12552
just tired, that's all
 
Join Date: Dec 2007
Location: The not so distant future
Age: 18
Gender: Male
Nature: Calm
If or when you get around to plugins, feel free to contact me.
I've worked out some interesting tricks for implementing plugins in c# and would be overjoyed to help.
You can even JUST HAVE the code NSE 2.X uses if you want it.
-I think I'll go the open-source route soon as-well, lol

Edit: There. NSE [classic] is open source. I'll post 2.X's source as soon as it's out of beta.

I'm hearing a lot of good ideas come out of this thread...

good luck!
__________________

Last edited by link12552; January 13th, 2012 at 02:12 PM.
  #38    
Old January 13th, 2012, 11:17 PM
Darthatron's Avatar
Darthatron
巨大なトロール。
Community Supporter Tier 2
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 22
Gender: Male
Nature: Modest
Quote:
Originally Posted by droomph View Post
Oh...

Spoiler:
Anywho I also wanted to say that adding a couple idiv and div (possibly mod) pseudo-commands for the ARM/THUMB thing would be nice also.

Spoiler:
Spoiler:
Code:
 div*	r0, r2 [r1, r3]
Code:
	cmp	r1, #0
	beq	divide_end
	mov	r0, #0
	mov	r3, #1
.start	cmp	r1, r2
	movls	r1, r1, lsl #1
	movls	r3, r3, lsl #1
	bls	start
.next	cmp	r2, r2    
	subcs	r2, r2, r2
	addcs	r0, r0, r3
	movs	r3, r3, lsr #1    
	movcc	r1, r1, lsr #1
	bcc	next
Code:
		cmp	r1, #0
		beq	divide_end
		mov	r0, #0
		mov	r3, #1
	.start	cmp	r1, r2
		bhi	[pc, #4]
		mov	r1, r1, lsl #1
		bhi	[pc, #4]
		mov	r3, r3, lsl #1
		bls	start
	.next	cmp	r2, r2
		bcc	[pc, #4]
		sub	r2, r2, r2
		bcc	[pc, #4]
		add	r0, r0, r3
		mov	r3, r3, lsr #1
		bcs	[pc, #4]
		mov	r1, r1, lsr #1
		bcc	next

MEAHHH probably doesn't work


This would make some parts, like scanning the Poké for its species (e.g. you need a Rayquaza to pass into Sky Mountain or something)

I'm just saying this because that's what got me when I tried to get the Species from the first Pokémon.

It shouldn't be that hard either, just something like the computer "go regurgitate these five numbers for me repeatedly in this order".


Ahhhhhhhhhhhhhhhhhh I think I'm demanding too much. If you could instead make a small pre-packaged plugin for people like me (nubcakes) that takes certain code words and turns them into real code (we define them ourselves). That would be nice, and the "purists" can also go do whatever they do in a dark room all day that way. And you wouldn't have to deal with the crap that we want! Loops, and everything.

And not only that, if you provide syntax coloring personalization like Notepad++ (which should take like five minutes) it wouldn't have to be case sensitive! Just a side bonus.


AHAHAHA yeah I don't know either. Might be nice, though, if you wanted.

Ehhhh you decide. I'm just glad that you would think of the *twenty* people here who use Mac/Linux. (Because sometimes X11/Wine sucks.)

Anyways...best of luck!
I don't see that happening. I think people need to go the hard way for learning ASM. All the GBA games have functions for dividing/modulo anyway, you can just call them.
Quote:
Originally Posted by link12552 View Post
If or when you get around to plugins, feel free to contact me.
I've worked out some interesting tricks for implementing plugins in c# and would be overjoyed to help.
You can even JUST HAVE the code NSE 2.X uses if you want it.
-I think I'll go the open-source route soon as-well, lol

Edit: There. NSE [classic] is open source. I'll post 2.X's source as soon as it's out of beta.

I'm hearing a lot of good ideas come out of this thread...

good luck!
Thanks, I'll keep that in mind.
__________________
あなた は しきしゃ です
わたし は ばか です
  #39    
Old January 14th, 2012, 12:41 AM
tinix's Avatar
tinix
PearlShipper & C Programmer
 
Join Date: Feb 2010
Location: Bratislava, Slovakia
Age: 17
Gender: Male
I'd also be very grateful if I could help you with development of this project. I've already made my pathetic attempt at it(http://www.pokecommunity.com/showthread.php?t=268776) and there is some good code that could be reused.
__________________
Pokémon games i own:
Pokémon Diamond
Pokémon Platinum
Pokémon Ranger: Shadows of Almia
Pokémon HeartGold Version

75% of Pokemon gamers use cheats and specially made codes to make their pokemon battle-worthy. If you are one of the 25% percent that level their Pokemon up legally, put this in your signature.
-Started by SkittyLover77


  #40    
Old January 14th, 2012, 10:32 AM
Sawakita's Avatar
Sawakita
Not Invented Here
 
Join Date: May 2010
Gender: Male
How come strings don't have quotation marks? I think they should, it makes things more solid.

Also, I don't know if you already added this, but what about implementing the support for macros?
__________________



| 1st Gen Hacking: Useful Links | A good example of REAL ROM Hacking |
  #41    
Old January 14th, 2012, 06:26 PM
Darthatron's Avatar
Darthatron
巨大なトロール。
Community Supporter Tier 2
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 22
Gender: Male
Nature: Modest
Quote:
Originally Posted by Sawakita View Post
How come strings don't have quotation marks? I think they should, it makes things more solid.

Also, I don't know if you already added this, but what about implementing the support for macros?
Because strings can contain quotation marks. It seemed easier to use {" and "} are string prefix and suffix. If you can think of a better way, please do tell.

I wasn't going to... But I guess I could. I never really used macros, so I don't really understand their benefit.
__________________
あなた は しきしゃ です
わたし は ばか です
  #42    
Old January 16th, 2012, 02:56 PM
war rock exe's Avatar
war rock exe
Pokemon Colosseum Remaker!!
 
Join Date: Dec 2009
Location: wouldn't you like to know?
Age: 17
Gender: Male
Nature: Hardy
i have a suggestion: maybe you should put built in scripts for your editor so you dont have to constantly write out a new script every time (especially for really long hacks) and a built in free space editor

I'm just a n00b, but i hope you will consider
__________________
POKÈMON COLOSSEUM TRILOGY FOR RMXP!! COMING THIS SUMMER!
STATUS; BETA 1 70%
  #43    
Old January 16th, 2012, 03:10 PM
Eelektross's Avatar
Eelektross
Unhatched Egg
 
Join Date: Jun 2011
Gender: Male
oooooooh
A Darthatron tool!
I don't really have anything to fault here other than a lack of quotation marks around the strings :/
  #44    
Old January 16th, 2012, 11:29 PM
Darthatron's Avatar
Darthatron
巨大なトロール。
Community Supporter Tier 2
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 22
Gender: Male
Nature: Modest
Quote:
Originally Posted by war rock exe View Post
i have a suggestion: maybe you should put built in scripts for your editor so you dont have to constantly write out a new script every time (especially for really long hacks) and a built in free space editor

I'm just a n00b, but i hope you will consider
No to the built in scripts. People won't learn with those. Perhaps some kind of templates, but not a generator.
Quote:
Originally Posted by Eelektross View Post
oooooooh
A Darthatron tool!
I don't really have anything to fault here other than a lack of quotation marks around the strings :/
It will be very difficult to parse strings just using quotation marks. Either quotations in the script will need to be changed from " and ["], or strings will need to be contained within something else. So please. Give me an idea.
__________________
あなた は しきしゃ です
わたし は ばか です
  #45    
Old January 17th, 2012, 04:07 AM
Quickster's Avatar
Quickster
Dream or Drop?
 
Join Date: Oct 2007
Gender: Male
Nature: Quiet
Quote:
Originally Posted by Darthatron View Post
No to the built in scripts. People won't learn with those. Perhaps some kind of templates, but not a generator.
I agree with no built in scripts, but I also dont think you should use templates either. At least none that you have put in. What if you make it so the user can buil there own template and save it, because I know it can get annoying creating dozens of simple message scripts and the likes over and over.
__________________
I laugh looking at this.

But sometimes I want to come back to it...

  #46    
Old January 17th, 2012, 04:26 AM
Speedster's Avatar
Speedster
The Unknown
 
Join Date: Dec 2011
Location: In the depths of space...
Gender: Male
Nature: Jolly
Quote:
Originally Posted by Quickster View Post
I agree with no built in scripts, but I also dont think you should use templates either. At least none that you have put in. What if you make it so the user can buil there own template and save it, because I know it can get annoying creating dozens of simple message scripts and the likes over and over.
I very much agree with this idea. It would help people learn while making it simpler to those who script a lot to have to rewrite an entire script.
__________________

.:Aegis:.
~coming soon~
  #47    
Old January 17th, 2012, 01:06 PM
droomph's Avatar
droomph
mmm gurl that 90s
Community Supporter
 
Join Date: Sep 2011
Location: bar'jách
Age: 17
Gender: Male
Nature: Impish
Quote:
Originally Posted by Darthatron View Post
It will be very difficult to parse strings just using quotation marks. Either quotations in the script will need to be changed from " and ["], or strings will need to be contained within something else. So please. Give me an idea.
Well, if I'm not mistaken, in C (Xcode specifically) " is contained in the string as "\"", \ is contained in the string as "\\", and such things like that.
__________________
did u no there r 21 letters in the alphabet
o i forgot 5
uraqt


  #48    
Old January 17th, 2012, 01:42 PM
itari's Avatar
itari
普通の魔法使い
Community Supporter
 
Join Date: Mar 2010
Location: 幻想郷
Age: 17
Gender: Female
Nature: Quirky
Yeah, you just need to do what droomph said for the parsing. Use a \ as an escape character. It would definitely make the syntax for strings simpler and more appealing. Plus, it appears you already have it implemented, so nothing to big, right?
__________________
  #49    
Old January 18th, 2012, 03:25 AM
Darthatron's Avatar
Darthatron
巨大なトロール。
Community Supporter Tier 2
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 22
Gender: Male
Nature: Modest
Quote:
Originally Posted by Quickster View Post
I agree with no built in scripts, but I also dont think you should use templates either. At least none that you have put in. What if you make it so the user can buil there own template and save it, because I know it can get annoying creating dozens of simple message scripts and the likes over and over.
That could work. Thanks for the suggestion.
Quote:
Originally Posted by Speedster View Post
I very much agree with this idea. It would help people learn while making it simpler to those who script a lot to have to rewrite an entire script.
Indeed.
Quote:
Originally Posted by droomph View Post
Well, if I'm not mistaken, in C (Xcode specifically) " is contained in the string as "\"", \ is contained in the string as "\\", and such things like that.
Right. I dunno how I missed that. Wow. :\ Thank you! " will be \" and ["] will be [\"]
Quote:
Originally Posted by agentgeo View Post
Yeah, you just need to do what droomph said for the parsing. Use a \ as an escape character. It would definitely make the syntax for strings simpler and more appealing. Plus, it appears you already have it implemented, so nothing to big, right?
Yeah! :D

Alright. Good progress guise. I'm just doing some syntax changes, and will post my ideas in the next few days.
__________________
あなた は しきしゃ です
わたし は ばか です
  #50    
Old January 18th, 2012, 10:42 AM
droomph's Avatar
droomph
mmm gurl that 90s
Community Supporter
 
Join Date: Sep 2011
Location: bar'jách
Age: 17
Gender: Male
Nature: Impish
Quote:
Originally Posted by Darthatron View Post
Alright. Good progress guise. I'm just doing some syntax changes, and will post my ideas in the next few days.
On the idea of "templates", you should definitely do something like this:



I know for a fact that I could use something like
trainerbattle battle type trainer id reserved 0 seen msg ptr win msg ptr after msg ptr
most of the time...

(And for the ASM...if you're going to do that, PLEASE make the bl instructions accurate...I cannot tell you how annoying PKSV is with that.)

Wait, you said you were doing a plugin system, right?
__________________
did u no there r 21 letters in the alphabet
o i forgot 5
uraqt



Last edited by droomph; January 18th, 2012 at 10:48 AM.
Closed Thread
Quick Reply

Sponsored Links
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 06:15 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.