msgbox @1 0x5
compare LASTRESULT 0x1
if 0x1 call @name
#org @name
call 0x1A74EB
return
#org @1
= Name the Pokémon?
namepokemon
givepokemon GALLADE 0x5 0x0 0x0
[B]namepokemon[/B]
waitstate
release
end
Users of Ubuntu-based distros will need to install these packages:Install PyGObject, GtkSourceView and GtkSpell using your packaged manager.
I have a suggestion. This tool uses custom commands correct? So let's say we have a script like
(I'm writing in XSE, to show an example)
Code:msgbox @1 0x5 compare LASTRESULT 0x1 if 0x1 call @name #org @name call 0x1A74EB return #org @1 = Name the Pokémon?
So instead of using that. In another tab somewhere, we can register this script, and compress it as its own command. Therefore that short script for the naming pokemon, is one line. So this will be the result:
Code:namepokemon
So when the engine runs by our new command, namepokemon, now it will run the compressed script, cutting off alot of time. So a script to give a pokemon is now this:
Code:givepokemon GALLADE 0x5 0x0 0x0 [B]namepokemon[/B] waitstate release end
Also, having the ability to go back to where you registered the script, and edit it, to debug it, and perhaps even delete it, will be nice.
EDIT: Just thought of this, but what if, your newly created commands, made from compressed scripts, can be put in one single ini. file, so that we can share our commands with everyone, like a large file, containing new commands, for all the items or for all the Pokemon or something. :)
Users of Ubuntu-based distros will need to install these packages:
- python3-gi
- gir1.2-gtksource-3.0
- gir1.2-gtkspell3-3.0
- gir1.2-clutter-1.0
You might want to include this info in the original post, because the package names that Ubuntu uses aren't quite obvious.
Ubuntu
Open a terminal and run:
Code:$ sudo apt-get install python3 git python3-gi gir1.2-gtksource-3.0 gir1.2-gtkspell3-3.0 gir1.2-clutter-1.0 $ git clone https://github.com/Touched/subscript.git $ python3 subscript/gui.py
$ cd subscript
$ python3 gui.py
Thanks, and by the way, running it from any directory other than the project's root causes a FileNotFoundError. So more like:
Code:$ cd subscript $ python3 gui.py
gvfs-open: _build/html/index.html: error opening location: Error when getting information for file '/home/usernamegoeshere/subscript/_build/html/index.html': No such file or directory
I used the Ubuntu download instructions, but then I noticed that it doesn't include adding the test.gba ROM. Was able to do it in a graphic interface myself and get Subscript started.
The first thing I did when I opened it up was click "View Script Command Help". Nothing happened except for this in the command line:
Guessing this is some old code, kinda sucks that I can't start playing around with it. Would love to do a bit of testing to aid development, this sounds great. Cross platform + easy syntax!Code:gvfs-open: _build/html/index.html: error opening location: Error when getting information for file '/home/usernamegoeshere/subscript/_build/html/index.html': No such file or directory
Traceback (most recent call last):
File "/home/username/subscript/interface/xse.py", line 93, in new_file
self.window.new()
File "gui.py", line 48, in new
self.tabs.new('subscript')
File "/home/username/subscript/interface/tabs.py", line 44, in new
index = self.add_page(name, child)
File "/home/username/subscript/interface/tabs.py", line 99, in add_page
close = Gtk.Button.new_from_icon_name('window-close', Gtk.IconSize.MENU)
AttributeError: type object 'Button' has no attribute 'new_from_icon_name'
One more thingy with getting it up and running; the make html command requires Sphnix. Didn't have it myself but thankfully I was provided a link to download it. Too bad I ended up having to download it in my package manager. Got everything up and running anyway eventually so it's all good.
So I got it up and running. I open up the documentation without a hitch, get an idea for a basic script to try out, load up a FireRed ROM, click on the "New Script File" button, and...
Code:Traceback (most recent call last): File "/home/username/subscript/interface/xse.py", line 93, in new_file self.window.new() File "gui.py", line 48, in new self.tabs.new('subscript') File "/home/username/subscript/interface/tabs.py", line 44, in new index = self.add_page(name, child) File "/home/username/subscript/interface/tabs.py", line 99, in add_page close = Gtk.Button.new_from_icon_name('window-close', Gtk.IconSize.MENU) AttributeError: type object 'Button' has no attribute 'new_from_icon_name'
Whout Whout Whooooooooooh :(
And that means Ubuntu package python3-sphinx, @Touched.the make html command requires Sphinx.
Might be Precise. Trusty has it. (Just FYI.)vanilla Ubuntu doesn't have that in the main ppa.
And that means Ubuntu package python3-sphinx, @Touched.
Might be Precise. Trusty has it. (Just FYI.)
movedown
move-down
XSE replacement? Already? I just switched to XSE like a month ago! xD
Ah well, what I've read so far in these 3 pages of replies has my eyebrows raised and my mind racing. I'm really looking forward to a 'final' release!
Question/suggestion: Will we still need to know the 'raw' values for movement? Like when you approach the Cinnibar Gym door without having the key and it moves you a step down. If not, I'd like to be able to typeorCode:movedown
or something like that. Not sure if it's really a big deal, but those raw commands scared me off pretty quickly last time I tried to make a really complex script.Code:move-down
applymovement(['lookdown', 'lookup', 'lookleft', 'lookright', 'exclamation']
Thank you very much for explaining things. Sorry that you have to tackle such an ambitious project alone. If I had any experience with programming I would try to help a bit, but I doubt I would be of any use. (Not to mention, I'm quite busy IRL at the moment, and will be in the coming weeks/months..)There will be a "movement helper", which will work similarly to XSE's text inserter. Right now, it uses a pathfinding algorithm to determine the shortest path between two coordinates, if you give it a map and bank name. I plan, however, to have a full blown path creator, so you can just click waypoints on the map and it will calculate the path, then you can select speeds and whatnot for each leg of the path. Otherwise, you can type movements in manually by saying something like:
However, this is not functional as of yet - I haven't found the time to write a movement parser. With the current mechanism, I cannot do what you suggest (I explained in an earlier post) - but this will be changed shortly. But right now, no one is helping me and I cannot devote all my spare time to one project; therefore I cannot give you an exact time-frame.Code:applymovement(['lookdown', 'lookup', 'lookleft', 'lookright', 'exclamation']
Thank you very much for explaining things. Sorry that you have to tackle such an ambitious project alone. If I had any experience with programming I would try to help a bit, but I doubt I would be of any use. (Not to mention, I'm quite busy IRL at the moment, and will be in the coming weeks/months..)
This sounds like it will be an incredible feature, and one that I never realized I wanted. Being able to click way points will make it extremely easy for even a novice like myself to make a great movement based script that would normally require looking up a bunch of raw values and/or typing out each movement command in XSE. (which was way too confusing lol. Repeated test phases for one event really bugged me lol.)
Oh, and I don't like to rush developers, be they hackers or programmers, rushing developers is a terrible idea. If you are lucky, rushing a developer will create buggy and poor content quality. If you aren't lucky, the developer will simply drop the project. I learned that one the hard way. :/ So please, take all the time you need! Real life has to come before hobbies, after all. :)
Someday soon, I hope to make a full revival of my projects, and right now I'm really looking forward to using this program.
Quick question: When the Linux version is in full release, will the Windows version be the same, or will it have to be re-coded and ported before it matches the latest version of Linux? I'm assuming you are a Linux user, based on previous posts. (I tried Linux Mint 17 a while ago, but the learning curve scared me off. Right now, I don't need speed. I just need a usable computer.) Being a Windows user, multiport programs are a bit out there for me, though I love the fact that so many can enjoy the use of a single program with no programming experience required.
Ah, and will we see a script generator? Sorry if this has already been asked. It's 7:32 AM here and I've been up all night wasting time looking for some tools for Yellow hacking. To no avail, I might add.
Thanks and keep up the great work!
EDIT: Just realized I hadn't commented on the biggest thing here: The name! I actually like Subscript. It's simple and easy to remember, not to mention I'm 100% sure that it's never been used lol. It also embodies the simplicity of this program, and it's compatibility! I'd actually suggest keeping that name after final release. Just wanted to add that! Thanks for reading!
Taking the time to learn to script might have been a step too far for me to go with XSE or PKSV, but with Subscript, it might just be possible.I doubt I'll make a script generator: I'm of the opinion that code should never be generated for anything other than time saving reasons, and I know that a script generator will only be used to ease the process of scripting. A generator will probably cause more problems than it fixes anyway. Take the time to learn how to script and you'll be better off for it.
The Windows port (and hopefully Mac port when I get someone to do that for me), will be parallel to the Linux version when I do a first proper release. I'll create a script that automatically does the packaging for me. However, don't rely on them being the same now. If you want to be up-to-date, just download the Github repo as a zip and copy the contents over the old files in the package. That should work.
Thanks for the feedback :)
Traceback (most recent call last):
File "/home/ahmylegs/subscript/interface/xse.py", line 96, in compile
self.window.compile()
File "gui.py", line 64, in compile
script = subscript.compile.Compile(text, 0xDEADBEEF, self.rom)
TypeError: __init__() takes 3 positional arguments but 4 were given
def ziggy():
givepokemon(zigzagoon, 2, 0)
message("There you go! If your/nZigzagoon faints you will be/nreturned here.")
getplayerpos(x,y)
countparty()
if LASTRESULT == 1:
question("You only have one Pokemon!/nWould you like a Zigzagoon?")
if LASTRESULT == 1:
ziggy()
else:
question("Try again.")
if LASTRESULT == 1:
ziggy()
else:
question("Okay punk, you wanna be/nsmart? You're messing with the/nGAME. You think you're gonna",
"win? I'll ask you again./nYou want a Zigzagoon?")
if LASTRESULT == 1:
ziggy()
else:
message("Oh man, you're screwed now.")
wildbattle(rayquaza, 100, 0)
while true:
message("Wow! I never expected you/nto do that!")
wildbattle(rayquaza, 100, 0)
else:
pass
Ello! I did it! I think. I'm able to run pretty much everything in the program. I'm not that familiar with Python3 so most of my syntax is 2, hopefully that won't screw too much up.
I got this error when compiling this script to a previously unhacked FireRed ROM loaded into subscript:
Spoiler:Code:Traceback (most recent call last): File "/home/ahmylegs/subscript/interface/xse.py", line 96, in compile self.window.compile() File "gui.py", line 64, in compile script = subscript.compile.Compile(text, 0xDEADBEEF, self.rom) TypeError: __init__() takes 3 positional arguments but 4 were given
This was the script I was trying to compile (it's my first script so I'm not exactly confident I got everything right):
Spoiler:Code:def ziggy(): givepokemon(zigzagoon, 2, 0) message("There you go! If your/nZigzagoon faints you will be/nreturned here.") getplayerpos(x,y) countparty() if LASTRESULT == 1: question("You only have one Pokemon!/nWould you like a Zigzagoon?") if LASTRESULT == 1: ziggy() else: question("Try again.") if LASTRESULT == 1: ziggy() else: question("Okay punk, you wanna be/nsmart? You're messing with the/nGAME. You think you're gonna", "win? I'll ask you again./nYou want a Zigzagoon?") if LASTRESULT == 1: ziggy() else: message("Oh man, you're screwed now.") wildbattle(rayquaza, 100, 0) while true: message("Wow! I never expected you/nto do that!") wildbattle(rayquaza, 100, 0) else: pass
Let me know if you need more info.
def ziggy():
# Default parameter here. 0 not needed
# Pokemon are looked up using the Pokemon type, with a string lookup. Otherwise you must use numbers
givepokemon(Pokemon('zigzagoon'), 2)
# Indentation can only occur at the start of a block
message("There you go! If your\nZigzagoon faints you will be\nreturned here.")
# Don't know what you wanted to do here. But x and y are undefined. Use the Var type if needed
#getplayerpos(x,y)
countparty()
if LASTRESULT == 1:
# Escape chars use backslash, not forward slash
question("You only have one Pokemon!\nWould you like a Zigzagoon?")
if LASTRESULT == 1:
ziggy()
else:
question("Try again.")
if LASTRESULT == 1:
ziggy()
else:
# You can't have multiple parameters for the question command
question("Okay punk, you wanna be/nsmart? You're messing with the\nGAME. You think you're gonna win? I'll ask you again.\nYou want a Zigzagoon?")
if LASTRESULT == 1:
ziggy()
else:
message("Oh man, you're screwed now.")
wildbattle(Pokemon('rayquaza'), 100, 0)
# Why is there an infinite loop here? I've not added support for it, but you do it hackily like so.
# I don't think inifinite loops are needed, and there is no break statement yet
while LASTRESULT:
message("Wow! I never expected you\nto do that!")
wildbattle(Pokemon('rayquaza'), 100, 0)
# pass is undefined. Use nop() instead. I'll change pass to nop shortly.
# Escape chars use backslash, not forward slash