Available playersTop players Chat Forum External sites: Wiki

«

Wombat317

Heavy Trooper

Offline

(for lack of a better name...)

Hi all,
Here is the first version a my GM script.

Screenshot: http://picasaweb.google.com/wombat317/WeeWar/photo#5229108327102237410
Script: http://userscripts.org/scripts/show/30875

The script does the following:
- sets background to grey to avoid those white map 'holes' distracting from the game.
- implements InspectorNG. This is updated with the latest stats and is a copy of (homage to) Blub's stats page. I find it very useful for bonus in attack and defense as well as remember what can hurt a sub (not much..). It is no battle simulator, I know.
- implements army stats. Nothing new..
- implements unit stats. Split from the above, otherwise nothing new..
- all of the above is collapsible/expansible.

NOTE: this will mostly not work with the Suite. Although I am looking into it.

Credits and thanks go to Blub's Weewar stats, Pluto's Suite and Tracy's script which is found in the Suite for inspiring me to do this.
Sorry to spadequack for the timing of this...

Feel free to send feedback/request to: wombat317@gmail.com
I've made the code as clean as I could so feel free to hack, re-use, rewrite, expand the script - if you do, just let me know, it's always nice to see one's work going places...

Stagolee

Heavy Trooper

Offline

nice

spadequack

Heavy Tank

Offline

it looks very nice indeed. no need to apologize. i like to refresh my beginner javascript from time to time i like your inspector, the middle-cropped images to save space, and the expand/collapse functionality you set up. i was planning to change mine to expand/collapse like that eventually.

Tracy

Trooper

Offline

Wow ... that's very nice. You and Spadequack have both gone far beyond what I thought was possible with the greasemonkey scripts.

Very nice.

Lucian

Berserker

Offline

Yeah. Wombat here is a great coder and also very fun to beat in WeeWar from time to time.

Once you manage to get the range aspect of the code fixed and add an instant finish/auto repair function, this'll be the script of choice. Right now I'm shuffling back and forth between this one Pluto's script. You guys should really get in touch and just create one kick ass script together with all the options and tidbits in one.

kersplat

Raider

Offline

Great work Wombat! I love the Weewar GM scripts and this has been added to my personal favorites list. I've already tweaked Pluto and JasonBunting's Weewar Suite script to allow it to show your inspector. I haven't been able to figure out how to start the stats hidden in that script though. I would like to use the Suite for the Battlesim, Banker, and Auto-repair and yours for the Inspector and Stats. Not quite there yet. I agree with Lucian - team up with Pluto and JasonBunting and you guys would have an amazing tool.

spadequack

Heavy Tank

Offline

I just looked through the code and it is very very clean indeed. Great work! =)

An aesthetic suggestion: for the inspector, add some space (a couple pixels) between the image of the terrain you're hovering over and the left border of the inspector box. Same thing for the headers "Inspector," "Army Stats," and "Unit Stats." They're right at the edge and it looks a little odd to me. Also I think you should have some default text for the inspector before the mouse has hovered over the map like the original inspector has (The original says: "Inspect terrains and units by moving your mouse over the map.")

This message was edited 2 times. Last update was at 03/08/2008 00:52:12

Wombat317

Heavy Trooper

Offline

kersplat wrote:I haven't been able to figure out how to start the stats hidden in that script though


Kersplat - the way I collapse (hide?) is by setting the inline style of the tables to display: none; - inline style is not the cleanest, but if you want to start the Army stats collapse, simply add 'display: none' without the quote after a semi-column line 879 of the original script (function renderStats - second line of the aStats string). I hope this is what you meant...

Spadequack - thanks for the feedback, will have version 1.1 (or whatever if I ever start a version system) out on the weekend.

This message was edited 1 time. Last update was at 05/08/2008 12:38:43

Wombat317

Heavy Trooper

Offline

Version updated with Spadequack's suggestions.

NickDanger

Raider

Offline

Great script Wombat! I've actually had good luck running this along with the WW Suite script. My only beef would be I wish I could remove the stats function from the suite script as I like yours much better. I tried removing (disclaimer: I know dick about JS programming) what I thought was the stats functionality from the suite script but that just resulted in none of it working.

Oh, just for clarification, I did previously take out the remove inspector portion of the suite script so that allows your inspector to work along with the suite.

Thanks for your work!

Wombat317

Heavy Trooper

Offline

Setting Weewar Suite to play nice with WWUI :

- Install WWUI
- Install the Suite
- Right click on the Monkey -> Manage your script... -> Select the Suite in the left hand side -> Edit

* Comment out line 124 *
Original line:
$("inspector").style.display = "none";
Commented out line:
// $("inspector").style.display = "none";

* Comment out line 6713 *
Original line:
showStatsToggle();
Commented out line:
// showStatsToggle();

* Delete from line 1620 to line 2153 *

Et voila..

PS: The forum's code quoting system is really bad...
Edited: Sorry, was missing a major bit - full process is: comment out, comment out, delete stats section.

This message was edited 4 times. Last update was at 16/08/2008 11:19:52

NickDanger

Raider

Offline

Beautiful! Thanks for that "fix".

Mattie

Raider

Offline

I'm a huge fan instantly. These interfaces absolutely should be provided by Weewar already. Great stuff!

-Mattie

mattwell22

Trooper

Offline

Does anyone know if there's a way to get these scripts on Opera 9.62?