JToMESpoiler
JToMESpoiler is an experimental re-write of some of my Perl utility/spoiler scripts in Java (since Perl is apparently not nearly as widely available on Windows as I might like…
). So far I've incorporated a skill point allocator, a relic quest finder, an object/monster/artifact information spoiler, and an equipment optimizer.
Version
Latest version: 1.0.1a
Changes since v1.0.1:
- Properly handle "flavor" prefixes like "a Bloodstone Ring of Speed" when parsing character sheets for the equipment optimizer.
Changes since v1.0.0:
- New option on the Skill Allocation tab to simulate relic quests.
Changes since v0.99.6:
Finally added that equipment optimizer tab I kept talking about.
- Assorted fixes and improvements in the spoiler pane:
- Fixed spoiler entries for wands, staffs and Mimicry cloaks.
Implement spoiler info for alchemy recipes, including new specialized search keys ess: and use:.
The tval: and tsval: search keys actually work now…
Finally implemented the set: search key to match artifacts by artifact set membership.
Files:
SVN repository: https://www.killerbunnies.org/svn/jtomespoil/trunk
Using
To use, just download the jar file above. On Windows and Mac, and probably on most Linux/Unix GUIs, you can run the program by double-clicking on the jar file; to run it from the command line on Linux/Unix, type java -jar tomespoiler.jar.
WARNING: THIS PROGRAM ALMOST CERTAINLY CONTAINS BUGS, which you are invited to report below.
Bugs
[Deleted thread, pursuant to the following request: --ZizzoTheInfinite]
PaulMoore: [...] It might be kinder just to delete this whole thread now...
ZizzoTheInfinite: Done and done. No worries…
PaulMoore: Some rendering glitches still there in 0.99.4. If I hold down the "up" arrow on "Point", the "Level" column does not update smoothly - it goes up in occasional jumps, and I need to tab into the level column to get it to refresh to the final value. Sounds like it could be due to updates occurring too fast in the points column, and so the refreshes of "level" are getting lost?
ZizzoTheInfinite: [sound F/X: testing] Not "lost" per se; it apparently simply didn't think it needed to redraw the table to reflect the change. The updates you did see only happened AFAICT when something else convinced it that it needed to redraw everything (in my tests, for instance, it only happened when the "Used" line at the top changed length…
). I've done some quick-n-dirty Swing-fu to forcibly redraw the table on every change, which seems to work so far. PaulMoore: Looks good, thanks.
DanielFishman: When I try load a character sheet I get this error: java.lang.NullPointerException
at jtomespoil.optimizer.CombinedFlags.<init>(CombinedFlags.java:26)
Using Windows Vista (ugh) which may be something to do with it
The rest is brilliant though.
ZizzoTheInfinite: Could you attach the character sheet that gives you the error?
DanielFishman: OK, done --> Fiacred2.txt
ZizzoTheInfinite: Ah, a silly oversight on my part: the character sheet parser was choking on your Bloodstone Ring of Constitution. I have plain descriptions turned on, so none of my test character sheets had those.
I've uploaded a fixed version.
Chatter
ShrikeDeCil: The experimental Java thing downloads & launches fine on Mac OS X (10.4.8). But I have trouble getting a working path. The 'browse' button uses a routine that doesn't look inside 'packages', which is the standard Mac executable. Its a folder with bits in specific spots, a path could be "whatever/whatever/ToME2.3.3/Contents/Resources/edit/" But the 'browse' button treats the folder names "ToME2.3.3" as an individual file. Typing in the path directly into the textfield doesn't seem to work either, and I'm not sure why that might be. Not expecting anything, just reporting on how it works.
Looks cool.
NeilStevens: This is a severe bug on the Mac. Without it, you can't get there. Ideally, in fact, what you ought to do is take the path to ToME.app and add yourself the subpath /Contents/Resources/edit, since that's where it'll be.
ZizzoTheInfinite: Is there a standard place or places I should be looking for ToME.app?
NeilStevens: It should be somewhere under "/Applications", so a standard setup would leave the desired path as "/Applications/ToME.app/Contents/Resources/edit/", but I for example have ToME.app under "/Applications/Games". Some users might also have the game in "$HOME/Applications", too, if they're on a multi-user machine and don't have/want admin access.
PaulMoore: The Java utilities works OK on Windows. It looks really cool
The window size seems a little big (AFAICT it went a long way off the bottom of my screen) but it's easy enough to resize.
ZizzoTheInfinite: Yeah, I fought a pitched battle with the Swing layout manager over that one, and ultimately lost…
This latest version should fix that, I think. PaulMoore: Yes, looks much better now. Thanks.
Otherwise, it works fine. At last I can try the skill calculator (the perl version doesn't work on Windows, because there's no Curses module in Windows perl). Are you planning on adding the equipment optimizer? (Not a big deal, as the perl version of that does work on Windows...)
ZizzoTheInfinite: You mean Perl/Tk works on Windows? [slaps forehead] Had I only known…
I am considering adding the equipment optimizer; I just have to work out how to fit it in. It would need a lot more horizontal room than any of the other tabs.
DarkGod: Hey your spoiler program really rocks now, I love the skill calculator!
ShrikeDeCil: Works on the Mac, I was messing up the path. The 'ToME' bundle needs to have its extension included (ToME2.3.3.app, or whatever). Works well, nice work.
KitaKita: I am loving the spoiler program! Totally awesome! Question though, did my slight comment in Bejik's DiTL prompt this Java program's release?
ZizzoTheInfinite: Well…
I had been working on it off and on for months; but yeah, I'd have to say your comment was the proverbial camel-back-breaking straw to prod me to finish bashing it into more or less presentable shape.
ZizzoTheInfinite: One thing I'd like to put in a future version is some knowledge of likely places to look for the info files. There's probably too much variation on *nices; is there a standard place where these usually end up on Windows and Mac installs?
ZizzoTheInfinite: Another thing I'd like to handle better is the user config file that the program creates to save the path to the game's information files, and more specifically where to put said file. Currently I'm just creating a file jtomespoiler.properties in the user's home directory, which could probably be considered rude. On *nix systems, I could just rename it to .jtomespoilerrc or the like; is there a designated place that this sort of thing is supposed to go on Windows or Mac systems?
NeilStevens: On the Mac, stick your user-specific files that are used by the app, and not the users, in the directory ~/Library/Application Support/JToMESpoiler, creating that directory if necessary, where ~ is the home directory. For MS Windows, you'll probably want to find the home dir and just create a dir under that.
KitaKita: A designated place in Windows? Alas, what a nice dream. :/ The official answer, depending on tho whom you would ask, would either be:
- The registry
- The location of the jtomespoiler java file (or a subfolder)
- The Application Data folder (which is a system variable, usually set to C:\Documents and Settings\USERNAME\Local Settings\Application Data )
- A folder under My Documents (which seems to be the preferred method nowadays; also a system variable)
I personally would just put it in the same location as jtomespoiler. It seems the cleanest place out of the batch.
LordDimwit: Hooray for Mac-compatible goodies! This is really neat. One suggestion: in the skills spoiler, how about a "clear" button that resets all values to zero, in case you decide to start from scratch again. Seems simple / useful perhaps.
RavenRed: Excellent work, Zizz! Only thing I'd query is a few more criteria for pulling up monsters (Symbol, Level, maybe some flags). Absolutely brilliant, in any case!
ZizzoTheInfinite: You mean in the Spoilers tab? Some of that can already be done, if I'm understanding you correctly: 'char:D', for instance, should match ancient dragons, and 'flags:UNIQUE' should match unique monsters. This should be described on the Help tab, I think.
HarryErwin: If you want to draw on my skills, I'll be happy to help. I teach a senior-level two-semester class on object-oriented development (in Java). Topics that may be relevant to what you're doing include patterns, test-driven design, and refactoring.
ZizzoTheInfinite: All suggestions are welcome, of course. My knowledge of design patterns comes basically from reading a book on the subject and working with the existing code base at the office…
PaulMoore: I've just hit something I'd find really useful. Planning a character, I've pumped Weaponmastery and Combat to 50. That costs me 72 and 30 points respectively. Right now, I'm at level 26, and I pumped Weaponmastery to 30. I can now add 21 points to Combat to get to level 30. But the game offers me no way of remembering I've done that (short of doing sums). So when I next bump Combat, how do I remember whether I still have points to add, or whether I'll get the rest of the levels from Weaponmastery updates? I'm not sure what the best UI for this might be, maybe just a way of recording what I've actually spent, to cross-check against. Thinking about it, maybe just an "export to CSV" would be enough - I could then dump the plan into a spreadsheet and keep my actual spend recorded in there, manually.
ZizzoTheInfinite: I do something similar, actually, keeping my skill spending notes in the file generated by the "Output to file" button in a text editor in a separate window. CSV would be easy enough to generate, though. What would you need in it, just a row for each skill with a non-zero point allocation, with columns for skill name, total allocation, and allocation so far?
PaulMoore: That's probably enough, although the sheet I use has a bit more: for each skill with a non-zero allocation, I have initial value, multiplier, "bonus" (which is the contribution the skill makes to its base skill, like weaponmastery contributing 0.5 * points to combat), final allocation, final level, current allocation, current level, total FF bonus, and a "have I overspent" flag. The last 4 are the workspace for keeping track of where I am so far, so they can be ignored. On the other hand, my spreadsheet replicates a lot of the functionality of your skill allocator, so it's more complicated than necessary. The nice one to have, though, is the "bonus", as that's a pig to find in the documentation
ZizzoTheInfinite: Hmm…:
The "bonus" column is ambiguous, since many skills have multiple "bonuses"; Sword-mastery, for instance, affects both Weaponmastery and Combat, and Geomancy affects all of Earth, Air, Fire and Water. If it helps, I've added that information to my skill spoiler.
The initial value and multiplier columns suggest doing math to track the current skill level. Is it possible to put formulas in a CSV file? My spreadsheet-fu is not strong, alas…
- An FF bonus column would play havoc with any computations, since its effect on skill levels is path-dependent. As a simple informational column for note-taking purposes, though, you're right, it's obviously desirable.
PaulMoore: Sorry I haven't got round to looking at this yet - real life, and a hard disk crash resulting in a new PC and disk rebuild, got in the way
I'll get to it sometime soon, I hope.
ZizzoTheInfinite: Okay, v0.99.2 is up, with better config file location and attempted automatic info-file finding. Much of this is guesswork; let me know if it breaks.
ShadUs: Feature idea if you get bored or feel froggy, vault browser that would let you go through the vaults by type and by name... also, thanks for the program, its pretty handy and saves mucho time that I would otherwise spend digging through the game files heh.
ZizzoTheInfinite: What did you have in mind? Just a list of vault names at the top, and below that an area to display the map of the selected vault?
ShadUs: Nod, something like that, the vaults are about the only file I open anymore which is what brought it to mind, have a drop down of the names and something like the viewer for the god quest locations that show the layout of the vault itself... some color coding might be nice, but even just being able to browse them in the spoiler would be good enough
ZizzoTheInfinite: Okay, I've put up a stab at it.
ShadUs: Thanks! That's exactly what I needed. Heh, now I don't have to open any of the games files anymore!
ZizzoTheInfinite: With v0.99.6, I've finally bitten the proverbial bullet and converted the code to Java 1.5, which means it no longer runs on Java 1.4. I've left the old v0.99.5 version up for now on a separate link in case of problems. I'll be interested (and somewhat nervous…
) to find out how much of my user base is running Java 1.4; if it turns out to be a lot, I'll see if I can get Retroweaver working to do a backport.
ZizzoTheInfinite: And with the equipment optimizer and alchemy-recipe spoilers finally implemented, I'm finally bumping up to release version 1.0.0. [And there was much rejoicing. ("Yaaay…")] The character sheet parser in the equipment optimizer, of course, is likely to be chock full of bugs and missed corner cases; as always, problems can be reported in the 'Bugs' section above.
TheremHarth: Hey Zizzo, just a small suggestion... Could you add an option to include boosts from god quests in the skillpoint allocater? Awesome job on this utility, BTW.
ZizzoTheInfinite: What did you have in mind?
TheremHarth: I was thinking of another radio switch (below the "Include Udun realm" and "Include quest rewards" ones), which would allocate an extra 30 points to Prayer (as from 5 god quests) when enabled.
ZizzoTheInfinite: I've added something that I hope will suit.
TheremHarth: Thanks!
JackLohman: I just wanted to pass on a "Well Done!" on this utility. I finally got a chance to try it earlier today when some internet searching revealed that I *could* in fact run Java 1.5 on my machine. Love the Skill point tool, it's the one I've most wanted and haven't been able to run since there isn't a version of the Curses Perl module that works on Windows Perl.
ToME Wiki