|
Hyperion character editor
I know this tool is about done, but I just can't seem to find the error that occurs when I try to save the player.
Loading player data works though.
Just posting this if anyone needed it. (if you also need saving you might be able to fix it in a sec)
Instructions
Put the contents of the .zip file inside the root folder of hyperion source and configure it to your build path on eclipse then press the run button in eclipse, that's it.
Download (source files)
Download tools.zip @ UppIT
gross af at least make a proper editor
thanks for this.
his editor is perfectly convenient especially if there were more similar tools and the editor had tabs to select between them.
all you really need is a textfield and a bufferReader/Writer to edit the file. works fine.
and its a pretty unique idea that could turn into something cool, unlike yours.
but if this was me I'd make an ingame interface.
its still faster to open files yourself and ill tell you why.
hes harding everything, if he did this correctly and listed all files in the directory so you could search the file and select it from a list it would load all of that information into the textArea which is "convenient" this is far from convenient.Code:System.out.println("Running player editor..."); new LoadPlayer("mopar");
all of the conventions used above are horrible, use try with resources. you also don't need to do this crapCode:public boolean loadPlayer(String name) { try { File f = new File("data/savedGames/" + name + ".dat.gz"); InputStream is = new GZIPInputStream(new FileInputStream(f)); IoBuffer buf = IoBuffer.allocate(1024); buf.setAutoExpand(true); while(true) { byte[] temp = new byte[1024]; int read = is.read(temp, 0, temp.length); if(read == -1) { break; } else { buf.put(temp, 0, read); } } buf.flip(); deserialize(buf); is.close(); return true; } catch(IOException ex) { return false; } }
can be replaced with Files #readAllBytesCode:while(true) { byte[] temp = new byte[1024]; int read = is.read(temp, 0, temp.length); if(read == -1) { break; } else { buf.put(temp, 0, read); } }
using a textarea is perfectly fine, but at least do it right by not harding the file names.
mine would be far better, but i wouldn't ever release it to this community
pointless and waste of time
you realize back when Graham wrote most of Hyperion it was considered "good" conventions and reasonably up-to-date? now the conventions he used is old af and in his predecessor (Apollo) he changed all his code to newer conventions. just because it was written by Graham doesn't mean its good code.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |