Utility Script: native taxing assistant

« Back to Developers

2583 days, 3 hours, 24 minutes ago
View big beefer's profile
big beefer
Utility Script: native taxing assistantWrite Reply
Here's an addon to help with some of the tediousness of taxing natives. Safe-tax, growth-tax, crash-tax, etc., there's a bunch of theories on what is best but this tries to capture some of the common settings I use. I'm open to input on other selections as well. Not fully automated yet, but maybe someday. Anyways, it adds this stuff to the planet screen:




It adds a percentage to the population growth item. Also adds the growth limit and how many turns it will take to reach it at the current tax rate.

Below it adds a table of common tax rates. Clicking on a row will set the rate to that value. Current value is shown by the "-+-" indicator.

These are the current rates it currently puts into the table:
- 0% (Max growth)
- 1% (for info mainly, planning starter colonies, etc.)
- "0 happiness change" - whatever taxlevel does not change the native happiness level
- "Growth-tax" - what ever happiness increase you get from setting 0% tax, this sets a tax rate to decrease happiness by the same amount. Basically alternate back and forth between this rate and 0% for good money and growth.
- "Tax to 70" - what ever tax level will reduce the planet happiness to 70
- "Max Incomes" - the most money you can make with the current number of colonists on the planet. Possibly two items, one where the colonist limitation is hit, and one where it is not.

Levels that will have no population growth (possibly all of them) are shown in yellow. If income is limited for a level by having too few colonists to collect it, the possible income is shown in parentheses. This can be of value when figuring out how many colonists you need to drag to a planet.

Hopefully it's all pretty accurate, though I think there's a couple more optimizations left to be sure. Give it a shot, and let me know of any problems, improvements, etc. Also, what sorts of tax schemes do you all use? Does this set capture what people are actually setting turn after turn?

http://userscripts.org/scripts/show/138637

2582 days, 11 hours, 49 minutes ago
Profile Image
kwesy
RE: Utility Script: native taxing assistantWrite Reply
Thank you for this improvement Beefer - it's a helpful instrument.

Here are a few thoughts on it:
the tax part now takes a lot of room on the UI.
Would it be possible to have it as a mouse-over tooltop or something like that?

There are numerous strategies for taxing (like described here).
Most of them imply that you change the tax setting from turn to turn.
Do you see a way to have your userscript automate this?
After thinking a bit about it myself I don't really see a convenient way, but perhaps you have an idea ...


2582 days, 10 hours, 25 minutes ago
View nakor's profile
nakor
RE: Utility Script: native taxing assistantWrite Reply
Brilliant!  Will test it...
2582 days, 9 hours, 15 minutes ago
View lord helmet's profile
lord helmet
RE: Utility Script: native taxing assistantWrite Reply
Great! Once you find your preferred style by a quick look at the table, this is a good time saver, escpecially when combined with the superfilter.
You picked the probably most common used taxing schemes. What could be included is taxing to a happiness of 40 after the pop limit is reached.
Maybe replace the -+- by another background color?
Can't wait 'til tomorrow, when I'll have to do another quick turn :)
2582 days, 6 hours, 26 minutes ago
View big beefer's profile
big beefer
RE: Utility Script: native taxing assistantWrite Reply
Kwesy, it does take up a lot of UI space, I must admit. I play on a pretty big screen, and have always had space left to add more stuff, so I pack it in all over the place. I can see about making it a pop-up menu, but one of my goals is to reduce the need to enter the secondary menus.

A tool-tip  in the traditional sense wouldn't work because I want to keep the ability to click on a row in the table and set that tax level directly (and maybe I should change the cursor so it's more obvious you can do this). Rarely do I ever want to have to open the tax rate window again. Running through my planets and selecting values off the list cut about 2/3 of the time it usually takes.

I am considering adding configurable settings to allow different users to show the different rates they prefer, which could save space.

Helmet, I had tax down to 40 happiness in at first, but commented it out to try and keep the number of settings down. I figure it's rarely used, and only for a brief time after which a safe-tax is used. But if I add configurable settings, I will include it again.

I considered a different background for the current level, but wanted to preserve the "warning" coloration for no growth levels, which sometimes may be true of the current level. What I actually wanted was to slap a border around the row, but found you apparently cannot apply borders to [tr] tags. So I took the lazy way.

Also note, the calculated turns until the growth limit is hit is wrong right now. It doesn't account for compounded growth or the halving of the growth rate after 66,000 clans. I'll fix it at some point. A "nice" feature, but really not that important.

I'm kicking around ideas for automation, since that is obviously the ultimate time-saving goal, and am open to ideas on how that would/could/should work. I've started looking over the old randmax docs too to see how they do things.
2581 days, 18 hours, 55 minutes ago
View vepr's profile
vepr
RE: Utility Script: native taxing assistantWrite Reply
Most excellent and very helpful!!

one minor suggestion for the next version is also to incorporate how many structures (factories/miens) can be build on a planet before the next drop in unhappiness.  the screen doesnt automatically update, so now its a trial and error process to build a few structures, exit the planet screen, reenter and see if the native unhappiness drops, then repeat.  it would be great to know ahead of time for example that you can build  30 factories, but the 31st will cause happiness to drop thus lowering taxation potential. 
2580 days, 6 hours, 18 minutes ago
View vepr's profile
vepr
RE: Utility Script: native taxing assistantWrite Reply
Hey big beefer,
I had a chance to play around with this script and overall i find it incredibly useful. Great work. 

One minor thing which usually throws me for a loop though is the growth limit number which is the same color as the population number, same font, and located just below.  whenever i click on a planet, my eye tends to focus on that number as it is larger and about 10 times each turn my heart skips a beat as i think i suddenly have 15 million or some huge number of natives on a planet, which is invariably followed by disappointment as I see the actual population.  My heart can not take such punishment :)

Can you please recolor the growth limit number to something else like plain black or better yet make it that faint grey color which is used for some of the other displayed data such as credits collected, happiness change, etc.

Thanks!

Vepr
2580 days, 5 hours, 18 minutes ago
Profile Image
cb1
RE: Utility Script: native taxing assistantWrite Reply
Nice! (Looks fondly at the separate report I spent so long programming and never quite finished. It was a good learning project. Actually on the screen is much nicer.)

A few things:

Maybe shrink the image of the planet? Most of the time, that would work, but it might cause problems when there are several ships at the planet.

Colonists. A few planets (very few) have enough colonists to be worth taxing. It would be nice to see the same information.

Maybe shrink the font size? You might be able to fit in the three columns for the colonists.

2580 days, 5 hours, 9 minutes ago
View lord helmet's profile
lord helmet
RE: Utility Script: native taxing assistantWrite Reply
Actually the pictures are resized according to the window height. But there is a hard-coded value that of course doesn't take into account beefer's tax table. I had the same problem in the starbase build screen.
If I'm not mistaken it should be possible somehow like so:

(in vgap.planetScreen)
picSize: function (mainPic, numItems) {
        var picHeight = $(window).height() - 500 -beeferstableheight;
...
}
2580 days, 4 hours, 57 minutes ago
Profile Image
cb1
RE: Utility Script: native taxing assistantWrite Reply
Just realized -- I can now see quickly how many colonists to drop off. Nice!
2580 days, 4 hours, 40 minutes ago
View big beefer's profile
big beefer
RE: Utility Script: native taxing assistantWrite Reply
Cb1, that was actually the main reason I wrote this. It was getting very tiresome having to go through all the screens and calculations to figure that out (and remembering to reset the tax rate afterwards). The addition of the "possible" MCs to the tax screen helped quite a bit, but it was still a chore.

Vepr, I agree on changing the max growth format, my eyes keep getting drawn to it too. I'll put it in gray or maybe just shrink the font size or something. Regarding the happiness change for mines/factories, would you want the happiness effect for population size too? If you build your structures up to the max (without affecting happiness) for the current population, you've likely screwed yourself, since as the population grows it will continue to negatively affect happiness, more and more so. So in a couple turns you're prob over the threshold you tried to creep up to with your carefully calculated structure settings. If I do include this stuff, it will probably go into the build screen.

2577 days, 5 hours, 59 minutes ago
View big beefer's profile
big beefer
RE: Utility Script: native taxing assistantWrite Reply
New version 0.4 w/ minor updates. Turns until growth limit is fixed now (I think). And the growth limit is shown in a smaller font to more easily separate it visually from the actual planet population.
2551 days, 20 hours, 22 minutes ago
View big beefer's profile
big beefer
RE: Utility Script: native taxing assistantWrite Reply
Automation attempt #1. I've only tested it in my small game so hopefully can get some feedback from larger empires. In new version 0.5, there are 2 additions to the interface:




The first is on the home screen and looks similar to the pic on the left. This shows how many planets have an autotax model set, and notes if autotax has been run this turn or not. If at least one planet set to to autotax, there will be a button to run it as well. When you run it, it should show as running while it works, but note that if not many planets or it doesn't need to change much it will go very quickly. I wouldn't try changing anything else while it's going though, I don't really know what would happen then.

To set a planet to use auto tax, look at the pic on the right. You can pick an AutoTax model from the dropdown. This will be applied when autotax is run, or you can click "Apply" to set the tax rate according to the model immediately (nice if you want to see what it will change to).

Right now there are only 2 options for the model, but more will be added and improved once I'm sure the mechanics are working correctly:
1. None - nothing changes, planet is ignored by autotax obviously
2. Beefer Tax - Not that great, but a crude version of what I typically use in games:
 - Tax as much as I can without being limited by the number of clans (this means sometimes not taxing at all) until happiness is at 70. If happiness is down to 70, set tax to 0 for growth.

There's a lot of situations where it is not the best, but it's good enough for testing this out I think. Let me know what other kinds of tax strategies you use and I'll try to include them. And actually, the models aren't too hard to write for those other scripters out there. I can give more information on that if anyone is interested in making their own. I would gladly include those with the tool as well.

Give it a shot if you're interested and let me know what problems you find.
2551 days, 1 hours, 34 minutes ago
View spiper's profile
spiper
RE: Utility Script: native taxing assistantWrite Reply
So we're making the leap into game automation.  Cool!

Stephen

2548 days, 20 hours, 18 minutes ago
View vepr's profile
vepr
RE: Utility Script: native taxing assistantWrite Reply
great add on.  just tried out the latest version and it rocks.  really shaves off 20 minutes or so from every turn which is huge.  will the beefer tax remain active and self adjusting for all subsequent turns or do I have to apply it manually each turn?
2548 days, 19 hours, 48 minutes ago
View big beefer's profile
big beefer
RE: Utility Script: native taxing assistantWrite Reply
You will have to use the "RUN NOW" button on the home screen each turn. It tells you if it has been run or not (though running mulitple times shouldn't cause a problem. Planets that have been marked as "Beefer Tax" will retain that setting across turns, and will all adjust tax rates when the "RUN NOW" button is clicked. Unless you want to change the model or turn off autotaxing, you don't need to mess with the planet. Originally I wrote it to run autotax the first time a new turn was loaded, but I realized that taxing is something I typically do late in a turn, (after shuffling colonists on/off ships, building ships and seeing what I need for next turn, etc), so I made it a button instead. Also that way it can be rerun as well if you make further adjustments.

Not a bad idea to pop open the planets list and give it a quick scan before and after running the autotax to see what it changes.
2548 days, 8 hours, 46 minutes ago
Profile Image
ryndieum
RE: Utility Script: native taxing assistantWrite Reply
This is probably a very stupid question, but is there a "stupid user" guide to installing and using custom scripts?  I looked around, and even the "guides" are not all that basic.

Thanks
2546 days, 8 hours, 0 minutes ago
Profile Image
cb1
RE: Utility Script: native taxing assistantWrite Reply
Hy Ryndieum,

I've only done it from scratch once, so I'm no expert, but it's pretty easy, at least for Firefox. The computer guides you through it.

First, you need to install GreaseMonkey. Assuming Firefox, it's under Tools - Add-ons. Search for GreaseMonkey and install it. It will probably warn you about the risk of viruses (acceptable -- it's a popular add-on) and it may ask you to restart Firefox.

Once that's installed, follow the link from this page to the userscripts.org page. The install button on the upper right will take it from there. Again, it will warn you about only installing scripts you trust. Userscripts are easy to inspect (if you read JavaScript), so it's rare for people to sneak in anything nasty, at least in short scripts.

After that, you can install any other script you like. You only need to install GreaseMonkey once.

Hope this helps!

2544 days, 11 hours, 28 minutes ago
Profile Image
ryndieum
RE: Utility Script: native taxing assistantWrite Reply
Thanks.  This is exactly what I was looking for.
2525 days, 6 hours, 4 minutes ago
View mycroft's profile
mycroft
RE: Utility Script: native taxing assistantWrite Reply
Hey Beefer, could you run a similar diagram on owned colonists as well? Especially the Turns till max population and max pop estimates. 

Showing the tax rates for them would also be helpful, 

This is a great tool btw, a lot of saved math and shorter notes!
2520 days, 20 hours, 25 minutes ago
View big beefer's profile
big beefer
RE: Utility Script: native taxing assistantWrite Reply
version 0.6 includes the growth info for colonists (population limit and turns until it hits, growth %). No tax info yet. Maybe sometime, likely once I start a game as the borg. Just not something I'd really use now. Do other players tax colonists often?
2520 days, 19 hours, 28 minutes ago
View mycroft's profile
mycroft
RE: Utility Script: native taxing assistantWrite Reply
I personally growth tax a lot of my colonies after 500 clans to keep funds growing. But as the birds money is very tight till the ship limit. So every MC counts. So really only a maximum tax possible, and tax till 70 is required for me. Anything else is a waste of time for colonists.
2485 days, 5 hours, 34 minutes ago
View eeon's profile
eeon
RE: Utility Script: native taxing assistantWrite Reply
this script is no longer working as of 10-23-12
2406 days, 19 hours, 15 minutes ago
Profile Image
josh redfield
RE: Utility Script: native taxing assistantWrite Reply
CB1,

Thanks for posting how to run the script in Firefox.  I was able to follow your instructions and get the script to work.

Can anyone post how to get this to work in chrome?  

Josh
2406 days, 5 hours, 26 minutes ago
View mycroft's profile
mycroft
RE: Utility Script: native taxing assistantWrite Reply
Beefer is it possible to include an option for the growth tax scheme tax to 70 when at 100?
2404 days, 7 hours, 40 minutes ago
Profile Image
ext
RE: Utility Script: native taxing assistantWrite Reply
@Josh:

1. Download the script.
2. Open up Chrome and navigate to: chrome://extensions/
3. Drag the script file on the extensions page.
4. Enable it.

Works for me!
2404 days, 4 hours, 14 minutes ago
Profile Image
josh redfield
RE: Utility Script: native taxing assistantWrite Reply
@Ext Thanks!  That worked like a charm!
2392 days, 6 hours, 52 minutes ago
View mycroft's profile
mycroft
RE: Utility Script: native taxing assistantWrite Reply
I figure Beefer is getting annoyed at all my suggestions. But I'll ask for yet another ^_^

Is it possible to add a visual aid for supplies required for unfavorable climates under the colonists somewhere? As in if your population is 13,000/2,900 it will show that you require X supplies to equal the amount of colonists that are currently planet-side.
2392 days, 5 hours, 42 minutes ago
Profile Image
ext
RE: Utility Script: native taxing assistantWrite Reply
+1!
2391 days, 23 hours, 37 minutes ago
View big beefer's profile
big beefer
RE: Utility Script: native taxing assistantWrite Reply
Mycroft, I do appreciate the feedback, and will put in as much as I can, should I ever update this. I have some other tax schemes players have sent me and some nice changes from Lord Helmet I never managed to include as well. Hard to say when I'll get to it though, I've been working on other projects. Also, with v3 now I have to look at a couple options:

1. Just update the v2 code - not too difficult, but at the same time I don't want to put in effort for an "obsolete" platform.

2. Update for v3 - Much more work from what I've seen, and I don't find rewriting code to be nearly as much fun as the initial development. Plus, since I use a large number of scripts, including many excellent ones from other authors, there's not much value to me personally in updating to v3, because I'll still be using the old version (for the addons) until most all of those are updated as well. Selfish perhaps, but I do primarily write these for my own usage.

Anyways, just a little note as to why I haven't updated anything in a while. I don't want to abandon these (though anyone inclined to help update them is more than welcome), but it's a big time investment I'm not willing to make right now to get everything updated properly. Someday hopefully, but in the meantime I've found v2 w/ scripts to be a playable enough platform that I'm just enjoying playing the game right now. But feel free to add all the suggestions you like!
2391 days, 17 hours, 29 minutes ago
View mycroft's profile
mycroft
RE: Utility Script: native taxing assistantWrite Reply
In all honesty, I only use the v2 platform still if that is any motivation. My 10 year old (Desperately needing updated) PC cannot run V3. My iPhone can. Maybe I need to switch my technological focus ^_^
2279 days, 3 hours, 22 minutes ago
Profile Image
ghostwriter
RE: Utility Script: native taxing assistantWrite Reply
big beefer: 2. Update for v3 - Much more work from what I've seen...

i really appreciate this app big beefer. any possibility of updating this app to Nu v4? i did not have a good feeling about v3, but this v4 is much better. i have stayed with v2only because of this app. nothing in v4 comes close to the utility of your app, which is why i am asking for an upgrade from you. thank you for your efforts regarding this app.

tia, GhostWriter
2272 days, 9 hours, 52 minutes ago
View big beefer's profile
big beefer
RE: Utility Script: native taxing assistantWrite Reply
Well, after a healthy length of procrastination, I believe I have an update for this that works with the new version (are we calling it V4?). It should also still work with the old version, so let me know if you have problems using it in either.

Note that I did very little testing, especially of the automation, so it might be wise to try it with a small number of planets and verify it's working before you put your full faith in it.

Here's the link to the userscript page: http://userscripts.org/scripts/show/138637
2272 days, 8 hours, 59 minutes ago
View lord helmet's profile
lord helmet
RE: Utility Script: native taxing assistantWrite Reply
So great it's here! I haven't been using v2 for a long time now, but I missed this feature so much that I copy/pasted the code to the console in a modified way because it crashed in v4. Bet doing the modifications right once would have done the trick, but here you come ;) Thanks again.
2272 days, 5 hours, 44 minutes ago
View big beefer's profile
big beefer
RE: Utility Script: native taxing assistantWrite Reply
OK, version 0.9 is out with a fix for hanging the client when exiting (in the new version) and since I was in there anways, some new/improved autotax models.

First, let me thank Lord Helmet for all his help with this. He sent me some code with improvements to this a long time ago, and I've only now put most of them in. Also, he pointed out my code sloppiness that was causing the new client hang!

The improvements you'll find:

- All of the autotax models will now tax down to 40 happiness if the natives are at their growth limit. Generally, this is what you want to do, but you might not if you are planning on terrforming the planet later, so keep this in mind.

- Calculated max incomes for borg should now correctly limit themselves to 20% (have done no testing, so someone playing a borg game can let me know if this works or not)

- The tax table now always includes the current tax rate, and adds a line for "chunk" taxing

The autotax models:

- Beefer Tax: This is the same as before, only now includes handling of natives at growth limit as mentioned above.

- Helmet Tax: This is the same as Beefer Tax, only in situations where income is limited by colonist population, it rounds the tax up for a little more cash, where Beefer Tax rounds down for a little more growth. Greedy Helmet!

- Growth Tax: If using 0% tax would put native happiness over 100, instead set tax level to get as much money as you can, or down to 70 happiness. Otherwise, don't tax to allow maximum growth and happiness gain.

- Chunk Tax: I don't remember who called it this in the forums, but I haven't heard it called anything else, so that's the term I'm using. It works the same as Growth Tax, except it will tax to below 70 happiness, by one's turn worth of non-taxing. ie. If the happiness grows at +5 a turn when not taxing, this will tax down to 65, so that the turn after (with no taxing) happiness will be back at 70. My thought is that this is most effective on planets where higher tax rates can be set (such as avians), since the growth in such cases is almost negligible.

Anyways, enjoy! And let me know of any problems with it, or other ideas.
2272 days, 1 hours, 48 minutes ago
View azzazzello's profile
azzazzello
RE: Utility Script: native taxing assistantWrite Reply
Chuck Tax is most efficient because you only lose growth for the turn your are taxing which is negligible anyway.  Due to host order, you get growth the next turn as happiness is before growth - that is what I use and I am overjoyed for it being added.

Now if this can work for colonist populations with population over 1mil..that would be awesome.
2271 days, 22 hours, 23 minutes ago
View halion's profile
halion
RE: Utility Script: native taxing assistantWrite Reply

Thanks for the update and conversion for the V4 I have moved over but was really missing this add-on.

As Azzazzello mentioned adding capability to have this manage native populations as well would be great!

2271 days, 19 hours, 6 minutes ago
Profile Image
caladian2
RE: Utility Script: native taxing assistantWrite Reply
Not sure how this works, there seems to be something on the dashboard about auto tax status, and the planets shows me some extra information, but nothing about help setting the different tax states. Using firefox.
2271 days, 19 hours, 6 minutes ago
Profile Image
caladian2
RE: Utility Script: native taxing assistantWrite Reply
Not sure how this works, there seems to be something on the dashboard about auto tax status, and the planets shows me some extra information, but nothing about help setting the different tax states. Using firefox.
2271 days, 19 hours, 1 minutes ago
View big beefer's profile
big beefer
RE: Utility Script: native taxing assistantWrite Reply
Most of the info should be in this thread. If you're looking at it in the new "activity feed", try using this link instead for better formatting (and some pictures):

http://planets.nu/discussion/utility-script-native-taxing-assistant
2270 days, 16 hours, 45 minutes ago
View ecatoncheires's profile
ecatoncheires
RE: Utility Script: native taxing assistantWrite Reply
Installed today in Chrome, but it doesn't appear to be working. I can see an "auto tax status" writing on the dashboard, but the taxing section on the planet screen is blank.

My Firefox (latest version) doesn't open play.planets.nu since ages (a problem with Kaspersky Internet Security I believe), this is why I switched to Chrome some time ago.

Anybody using this tool with Chrome currently?

Updated: I see the script versione says version 0.7, not 0.9, and freezes the client on exit... looks like it's an old version? I downloaded it from a screen where 0.9 was the version.

Updated: it looks like I had an old copy of the utility in my DOWNLOADS folder... and it was the copy I clicked on! I installed the correct version 0.9 now.

Still, the client shows me just the maximum growth for colonists and natives, but I have no tools available on screen to set the tax rate... looking at the image at the beginning of this post, I miss the bottom half of the screen, where you can actually choose the tax rate... is it normal for not working on Chrome, maybe? Or, is my Kaspersky antivirus messing with it also?
2270 days, 11 hours, 55 minutes ago
View azzazzello's profile
azzazzello
RE: Utility Script: native taxing assistantWrite Reply
Eca, if you open the script and copy one of the include lines and add planets.nu in should work.  On a tablet now, will post exact line when I get to PC. 
2270 days, 6 hours, 3 minutes ago
View azzazzello's profile
azzazzello
RE: Utility Script: native taxing assistantWrite Reply
BB,

When I run this script to tax all planets it says **RUNNING** and never moves past first planet in Chrome and new interface.  No other addons are enabled
2270 days, 5 hours, 33 minutes ago
View big beefer's profile
big beefer
RE: Utility Script: native taxing assistantWrite Reply
Hmmm... I'll have to take a look when I get a chance. I *think* it worked in firefox with the new version, but I didn't test it very thoroughly (only with one small test game). Thanks for pointing this out, I may ask you all for some troubleshooting info if I can't see the problem on my side.
2270 days, 4 hours, 46 minutes ago
View eeon's profile
eeon
RE: Utility Script: native taxing assistantWrite Reply
i can confirm the new script works with firefox on ver2 client, have yet to try ver3 client.
2270 days, 4 hours, 2 minutes ago
Profile Image
caladian2
RE: Utility Script: native taxing assistantWrite Reply
BB, this is what I was talking about. I have the same exact issues in both firefox and Chrome. Ver4
2269 days, 21 hours, 23 minutes ago
View azzazzello's profile
azzazzello
RE: Utility Script: native taxing assistantWrite Reply
Here is what Chrome complains about every time you run the addon.

  1. Uncaught TypeError: Cannot read property 'id' of null play.planets.nu/:627
    1. vgaPlanets.getMaxIncomeScenarioplay.planets.nu/:627
    2. vgaPlanets.addOns.vgapTaxAssistant.taxModels.beefertaxplay.planets.nu/:651
    3. vgaPlanets.addOns.vgapTaxAssistant.applyAutoTaxModelplay.planets.nu/:487
    4. vgaPlanets.addOns.vgapTaxAssistant.runNextAutoTaxplay.planets.nu/:467
    5. vgaPlanets.addOns.vgapTaxAssistant.runAutoTaxplay.planets.nu/:444
    6. onclickplay.planets.nu/:1
2269 days, 20 hours, 45 minutes ago
View azzazzello's profile
azzazzello
RE: Utility Script: native taxing assistantWrite Reply
Ok, fine I could not live without this mod...so I read up on javascript debugging and found the problem.

        if (vgap.getRace(planet.ownerid).id == 6 && maxincome.taxrate > 20) {

Above line fails with null exception - I think it is because the game is supermelee.

I changed it to this and it works fine and I think it captures the intent of detecting Borg player.
        if (vgap.race.id == 6 && maxincome.taxrate > 20) {
2269 days, 8 hours, 16 minutes ago
View big beefer's profile
big beefer
RE: Utility Script: native taxing assistantWrite Reply
Yeah, Azz pretty much nailed it. This would not have worked well for games using other than the standard 11 players. The actual line I was looking for was:

        if (vgap.getPlayer(planet.ownerid).raceid == 6 && maxincome.taxrate > 20) {
but in most cases you will get the same result. Regardless, it should be fixed in ver 0.10 I just posted. Thanks all for the feedback!
2269 days, 7 hours, 52 minutes ago
View starwarriorguild's profile
starwarriorguild
RE: Utility Script: native taxing assistantWrite Reply
ive been encountering a problem with a game, "a script has stopped running" with 2 checkbox options continue or stop script. the on;y change i have made in the past 2 weeks is this native tax assistant. but the problem only arises when i hit the Z key and begin moving the map around in the zoomed in mode. biw thuis perticular game i havent set up the planets yet for the native tax assistant to work yet, was planning on doing it after i had finished my fleet movements. it seems odd that it would be this script,  but its the first time i have encountered it. the error path is shortened by a bunch of "...." but it does indicate javascript problem from play.planets. nu
 could this be the native tax assistant?

client ver2
browser firefox
windows XP
script 0.9

2269 days, 7 hours, 45 minutes ago
View starwarriorguild's profile
starwarriorguild
RE: Utility Script: native taxing assistantWrite Reply
confirmed it happens eveytime i zoom and move the map. the exact error message is:

A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete.

Script: http://play.planets.nu/vgap2.2.js?ver=1.97:1
2269 days, 7 hours, 19 minutes ago
View big beefer's profile
big beefer
RE: Utility Script: native taxing assistantWrite Reply
This script shouldn't touch any functions that are called when zooming or moving the map. Nor should it be running anything then. I run a similar setup, only windows 7 instead, and moving in full zoom mode has always been really, really slow for me, but never slow enough to trigger the "unresponsive" message. If you disable the script, you don't see the problem anymore?
2269 days, 7 hours, 1 minutes ago
View starwarriorguild's profile
starwarriorguild
RE: Utility Script: native taxing assistantWrite Reply
well pressing stop or continue was having the same result, nothing happens, just locked up. and yes im really slow to respond when zoomed as well, but with this error message im literally locked up, and have to reboot to get anything done. so i just moments ago installed your new version 0.10 and now everything is free and clear, im back to my slow zoom but at least no more error messages. so im guessing you shouldnt need to worry about it either way. not sure why it was occuring, but since the new version i was able to move 5 different ships while zoomed.

PS: Great script Beefer, keep up the good work. Chunk TAX FTW!
2269 days, 5 hours, 52 minutes ago
View starwarriorguild's profile
starwarriorguild
RE: Utility Script: native taxing assistantWrite Reply
"Slice5" taxing proposition
Tax to a point where happiness can be recovered to 100 over 5 turns.

program takes the planets max happiness potential and dvides that into multiple turns of taxing.that will allow happiness to return to 100 after 5 turns of max happiness exactly
program will consider max effective taxing as that of planets that can gain no more due to lack of population. but never to drop below 70 happinessbasically tax to a point where 5 turns of max happiness will recover the happiness 100 while still generating taxes every turn.

Example
effective max tax of -5, max positive tax rate is +3  3 turns of taxing at -3 happiness(-9), then 5 turns at+2(+10)
effective max tax of -3, max positive tax rate is +-6: 8 turns of taxing at -3(-24) happiness, then 5 turns at +5(+25)
effective max tax of -3: max positive tax rate is +-5, 6 turns of taxing at -3 happiness(-18), then 5 turns at +4(+20)

"Slice4" taxing Same as above but only uses four turns to bring Happines back to 100
"slice3" taxing Same as above but only uses three turns to bring happiness back to 100
and so on. for slice 1 and slice 2

this is the tax formula ive used because im gauranteed income every turn even during the rise of happiness for growth. just not as much during the rise as i do the fall. but the fall of happiness is generally longer than the rise.

2268 days, 15 hours, 33 minutes ago
View halion's profile
halion
RE: Utility Script: native taxing assistantWrite Reply

I have been using this on the new play site with chrome (and zoom) and it is working well thanks!

I have discovered one possible bug.

on planets that already had a less than 40 happiness, when I implemented the tax assistant addon and selected the 'beefer' tax it caused a bug by making the tax a negative amount like -7 tax  which inflated the happiness increase.. this caused an error on the chrome session and I needed to reload the page.

it was reproducible at the time but not sure if it was just that one game or a common issue...

2268 days, 11 hours, 50 minutes ago
Profile Image
caladian2
RE: Utility Script: native taxing assistantWrite Reply
BB, zooming was either slow, or stopped completely. Win 7 firefox and chrome
2267 days, 5 hours, 24 minutes ago
View starwarriorguild's profile
starwarriorguild
RE: Utility Script: native taxing assistantWrite Reply
ok beefer, this script error occured when zooming again today, this time however i selected stop script,  and all apeared lockedup or stuck, so i went to lunch ( 1 hour ) came back and it was freed up for me to finsh my turns. but when i went into my next game the native tax assistant was no longer present. so i checked my greasemonkey settings to find it was turned off ( unchecked ). so i am assuming the script the error was referring to is in fact your native tax assistant. since that was the only way it wouldve been disabled. im not a programmer so the ball is in your court.
2267 days, 5 hours, 21 minutes ago
View starwarriorguild's profile
starwarriorguild
RE: Utility Script: native taxing assistantWrite Reply
P.s. i have been running the " run now " button first thing in every game. could it possibly be that it continues to run while im doing my turns? and now im thinking if i hit " run now" last thing in my turns, i might be able to get by. im going try this for the next time and see what happens.
2267 days, 3 hours, 49 minutes ago
View big beefer's profile
big beefer
RE: Utility Script: native taxing assistantWrite Reply
When you click the "run now" button, it should change it's status to show that it's running and the planets it's going through. You should probably not do anything else in the game while it is running, it will be busy because it makes a "save" call to the server for every planet it changes, and things could get weird if you start changing other things while it's going.

If it's not showing status, or hanging while setting a certain planet, let me know. Note that if you've already successfully run it this turn, you won't really see it change status when it runs unless you've manually changed some of the planet tax rates. It's smart enough not to contact the server if it's not actually changing anything.
2267 days, 3 hours, 36 minutes ago
View starwarriorguild's profile
starwarriorguild
RE: Utility Script: native taxing assistantWrite Reply
no,  the run now function i always wait for it to complete and respond with has run this turn. before i do anything else which is normally view my vcrs for the turn.then read reports. then go thru planets then go thru ships this is when i do the zooming and when the script error occurs.

what im considering doing next turn to see if it changes anything is to not hit the run now button til the very last thing in my turn. which since im still doing my turn on this perticular game i havent run accross any script errors yet, but that may be due to the fact that havent had to zoom just yet. but ill go check now.........everything seems ok at the moment. ill check a few ships later and post if something still pops up
2267 days, 0 hours, 24 minutes ago
Profile Image
caladian2
RE: Utility Script: native taxing assistantWrite Reply
On v4, firefox/chrome on win 7, the assistant still doesn't work. I only ever see the extra info about max pop. And it makes it stop the ability to zoom to the next planet, when switching planets.
2266 days, 23 hours, 24 minutes ago
View azzazzello's profile
azzazzello
RE: Utility Script: native taxing assistantWrite Reply
Works fine for me, except 2 minor issues.  
First you have to add an include for planets.nu since *.planets.nu does not cover that - until that is done addon won't load on default site for me.

Second, if you do anything to the planet like build / adjust tax, it hides Tax Assistant information and restores the screen to default view.  Leaving and coming back to the planet returns Tax Assistant information
2266 days, 20 hours, 23 minutes ago
View snork's profile
snork
RE: Utility Script: native taxing assistantWrite Reply
I see the growth rates, but no table with tax rates. I'd love to get this working... :(
2234 days, 10 hours, 1 minutes ago
View tom n's profile
tom n
RE: Utility Script: native taxing assistantWrite Reply
Looks like this great utility is now working for me on the new site! Thanks again Big Beefer!
2234 days, 9 hours, 56 minutes ago
Profile Image
furey
RE: Utility Script: native taxing assistantWrite Reply
I can make it work on each planet, but the main button on my "home" screen doesn't work. Any thoughts?
2234 days, 9 hours, 56 minutes ago
Profile Image
furey
RE: Utility Script: native taxing assistantWrite Reply
I can make it work on each planet, but the main button on my "home" screen doesn't work. Any thoughts?
2234 days, 9 hours, 44 minutes ago
View lord helmet's profile
lord helmet
RE: Utility Script: native taxing assistantWrite Reply
I have the same problem with new games, but I thought this was because I use a (modified) old version of the script...
@big+beefer: I had a debug message like "vgap.addOns.vgapTaxAssistant.config is undefined" or something... it was okay after I initialized it like in your processload function - is that one even called?
2233 days, 21 hours, 39 minutes ago
View big beefer's profile
big beefer
RE: Utility Script: native taxing assistantWrite Reply
I may have found the issue here. I *think* it was an initialization problem, only happening in games that had never been opened in the old version with the script going. I still use the old version, so all of my games had been, and thus I never saw this error. Nor can I really tell if it is fixed so someone let me know if it works better now.

To get slightly technical for a minute:
There seems to have been a change to the getNote function in the new version. It now always returns an object, even if there is no note set for that id/type combo (it used to return null). So I updated the getObjectFromNote function to accommodate this. I mention this because I know some other userscripts out there use that function as well, and they might want to copy the fix over.
2233 days, 21 hours, 17 minutes ago
Profile Image
caladian2
RE: Utility Script: native taxing assistantWrite Reply
Okay, I updated and now on the home page I at least see the auto tax status but on the planets themselves, I can't do any auto tax settings.
2233 days, 20 hours, 49 minutes ago
View big beefer's profile
big beefer
RE: Utility Script: native taxing assistantWrite Reply
A few questions:

What are you seeing on the planet page? Any new info at all?
What browser (I use FireFox)?
If you open the web console (or equivalent for your browser), are you getting any errors?
If you type vgap.addOns.vgapTaxAssistant.config into the web console, what do you get back?
Can you try disabling any other scripts to make sure it's not a bad interaction?

I'm really just not sure what's going on here. I haven't seen any problem with it here.
2233 days, 20 hours, 27 minutes ago
Profile Image
caladian2
RE: Utility Script: native taxing assistantWrite Reply
before I do more tests, is the auto tax supposed to be only for natives and not colonists?
2233 days, 19 hours, 46 minutes ago
View big beefer's profile
big beefer
RE: Utility Script: native taxing assistantWrite Reply
Yeah, it's currently only for natives. Someday I'll add colonist taxing as well, but since I almost never tax them, it hasn't been high on my priority list. Playing in these low native level games might change that though!
2233 days, 16 hours, 30 minutes ago
Profile Image
caladian2
RE: Utility Script: native taxing assistantWrite Reply
Well then, it works just fine then.
2233 days, 16 hours, 24 minutes ago
Profile Image
caladian2
RE: Utility Script: native taxing assistantWrite Reply
The one planet that I like to chunk tax is usually my homeworld.
2233 days, 0 hours, 57 minutes ago
Profile Image
caladian2
RE: Utility Script: native taxing assistantWrite Reply
On the tax models like beefer or chunk tax, will it leave the tax at 0% till 100 happiness or at 0% till 100 - min happiness?
2232 days, 23 hours, 5 minutes ago
Profile Image
furey
RE: Utility Script: native taxing assistantWrite Reply
Beefer will tax to 70, then back off a round, then tax to 70, then back off a round, etc.

Growth tax will tax to 70, then zero tax to 100%, then tax to 70, repeat.

I'm not sure what chunk tax does, haven't used it.
2232 days, 21 hours, 50 minutes ago
Profile Image
caladian2
RE: Utility Script: native taxing assistantWrite Reply
I usually do the growth tax on my planets where I will tax them to 70%-min happiness. Then set to 0% till it reaches the happiness of >= 100% - min happiness. Then tax again.
2232 days, 21 hours, 50 minutes ago
Profile Image
caladian2
RE: Utility Script: native taxing assistantWrite Reply
I usually do the growth tax on my planets where I will tax them to 70%-min happiness. Then set to 0% till it reaches the happiness of >= 100% - min happiness. Then tax again.
2232 days, 19 hours, 55 minutes ago
Profile Image
~stone~
RE: Utility Script: native taxing assistantWrite Reply
I think Caladian2 meant
> 100% - min happiness

rather than

>= 100% - min happiness

because you would not want to tax them at "= 100% - min happiness" because that wastes a turn of growth since you would not waste happiness generation by leaving the population untaxed for another turn.
2175 days, 20 hours, 18 minutes ago
Profile Image
caladian2
RE: Utility Script: native taxing assistantWrite Reply
Beefer, would it be possible for the tax table to be a slide out instead of being at the bottom? The reason is even on my 1600x900 monitor, I still can't see most of the table.
2175 days, 20 hours, 4 minutes ago
Profile Image
mule
RE: Utility Script: native taxing assistantWrite Reply
I also have problems viewing many scripts/addons that appear ay the bottom of the monitor. Usually I have to kill all my browser tool bars and sometimes that doesn't even work.
2175 days, 13 hours, 0 minutes ago
View lord helmet's profile
lord helmet
RE: Utility Script: native taxing assistantWrite Reply
There is a function picSize that reduces the size of the picture in the top left corner (i.e. Hull/Planet/Starbase) according to screen size and thus using the space more efficiently.
But by default it doesn't account for the size of additional items being set on the screens. I had a working patch for the old version tax assistant, but it got lost somewhere on my pc. And it wouldn't work for the v3 interface.
2175 days, 2 hours, 27 minutes ago
View big beefer's profile
big beefer
RE: Utility Script: native taxing assistantWrite Reply
I'll have to look into this I guess... in the meantime, may I suggest using your browser's zoom function (in firefox: ctrl-- (zoom out) and ctrl-+ (zoom in), I assume other browsers have similar functions). I was playing recently on my old tiny screen netbook while traveling, and using this I was able to get the important info on-screen while going through my planets. It's also good for using more of the screen to show the map on smaller displays where the sidebar can take up half the screen.
2174 days, 21 hours, 24 minutes ago
Profile Image
caladian2
RE: Utility Script: native taxing assistantWrite Reply
Well by the time I zoom out far enough, the font size gets to about 6pt font. While I can read it, I prefer not to and the map gets so tiny, I can't always click where I want to.
1915 days, 21 hours, 37 minutes ago
Profile Image
kedalion
RE: Utility Script: native taxing assistantWrite Reply
http://planets.nu/discussion/utility-script-native-taxing-assistant

Still one of the best scripts. Ever thought about extending it to

1) Colonist (for Borgs)
2) to include ships with HISS mission in orbit



1914 days, 16 hours, 6 minutes ago
Profile Image
kwesy
RE: Utility Script: native taxing assistantWrite Reply
Including hissing ships wouldn't be so easy (unless you are the Lizard so the addon knows that you're hissing).
1914 days, 13 hours, 59 minutes ago
Profile Image
kwesy
RE: Utility Script: native taxing assistantWrite Reply
I like the idea though.
1840 days, 13 hours, 4 minutes ago
Profile Image
mcbr501
RE: Utility Script: native taxing assistantWrite Reply
Big Beefer: question for you - I have noticed that Beefer tax goes down to 40 happiness - okay - but now it wants to -10 (to 30) - is that by design?
1840 days, 10 hours, 23 minutes ago
Profile Image
kedalion
RE: Utility Script: native taxing assistantWrite Reply
I used the script for some Borg planet (yes, no real long term viability here... ) and I forgot to remove the setting before the natives were completely assimilated. Now I have 3 planets without natives still being counted on the main screen. There doesn't seem to be a way to get rid of it...
1838 days, 20 hours, 24 minutes ago
View marklein's profile
marklein
RE: Utility Script: native taxing assistantWrite Reply
I just started to get disconnects when running the utility today. Anybody else having trouble?
1838 days, 18 hours, 41 minutes ago
View tom n's profile
tom n
RE: Utility Script: native taxing assistantWrite Reply
Me too. The last week or so. 
1838 days, 17 hours, 17 minutes ago
View jason bremen's profile
jason bremen
RE: Utility Script: native taxing assistantWrite Reply
Not sure if this will help -
http://userscripts-mirror.org/

The search function is disabled though... burden!
1706 days, 16 hours, 8 minutes ago
View ecatoncheires's profile
ecatoncheires
RE: Utility Script: native taxing assistantWrite Reply
... I'm using this script (Thanks BB!), but in one of my games its data must have been corrupted, because now I have a DATA ERROR from planets.nu every time I launch it, and the window goes READ ONLY until I exit the game without saving. Other games are totally fine.

Is there a place where I can reset the data stored from this script, and let it start again from scratch...?
1706 days, 5 hours, 39 minutes ago
View tom n's profile
tom n
RE: Utility Script: native taxing assistantWrite Reply
@Ecatoncheires, I had the same issue and isolated the problem to an over-built Bovi planet (too many factories and mines, hence the Natives were perpetually pissed off). Once I removed that planet from BB's tax assistant the issue went away.