Jump to content

Shakyr

Members
  • Posts

    483
  • Joined

  • Days Won

    2

Everything posted by Shakyr

  1. Tampermonkey Script has been posted on the forums.
  2. I figured I would make the script public. Use at your own risk, etc. // ==UserScript== // @name Politics & War - Resource Highlight // @namespace http://tampermonkey.net/ // @version 0.2 // @description try to take over the world! // @author The Snowman // @match https://politicsandwar.com/* // @grant none // ==/UserScript== (function() { 'use strict'; var xpathNodeList = document.evaluate("//div[contains(concat(' ', normalize-space(@class), ' '), ' informationbar ')]/span", document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); if (xpathNodeList.snapshotLength > 0) { var resourceToolbar = xpathNodeList.snapshotItem(0).childNodes; var resource = null; var resourceName = null; for(var node of resourceToolbar) { if(resource === null && node.nodeType === 1 && node.nodeName === 'A') { resource = node; resourceName = node.getAttribute('aria-label'); } else if(resource !== null && node.nodeType === 3) { var resourceAmount = Number(String(node.nodeValue).trim().replace(/\,/g,'')); var thresholds = getResourceThreshold(resourceName); if(Array.isArray(thresholds) && thresholds.length === 3) { var bgColor = 'green'; var textColor = 'white'; var title = 'GOOD'; var dailyLimit = thresholds[2]; var middleLimit = thresholds[1]; var maximumLimit = thresholds[0]; //1 day limit if(resourceAmount <= dailyLimit) { bgColor = 'red'; title = "DANGER!\nBuy " + Intl.NumberFormat().format(maximumLimit - resourceAmount); } //3 day limit else if(resourceAmount <= middleLimit) { bgColor = 'orange'; title = "WARNING!\nBuy " + Intl.NumberFormat().format(maximumLimit - resourceAmount); } //10 day limit else if(resourceAmount < maximumLimit) { bgColor = 'yellow'; textColor = 'black'; title = 'Buy ' + Intl.NumberFormat().format(maximumLimit - resourceAmount); } //warchest stockpile only else if(resourceAmount >= maximumLimit && dailyLimit === 0) { bgColor = 'none'; if(resourceAmount > (maximumLimit + 500)) { title += "\nBank " + Intl.NumberFormat().format(resourceAmount - maximumLimit); } } //don't calculate daily consumption of manufactured goods or money if(!['Gasoline', 'Munitions', 'Steel', 'Aluminum', 'Money'].includes(resourceName) && dailyLimit > 0) { title += "\nDays Left " + Math.ceil(resourceAmount / dailyLimit); } var span = document.createElement('span') span.innerHTML = node.nodeValue; span.setAttribute('style','background-color: ' + bgColor + '; color: ' + textColor + ';'); span.setAttribute('title',title); node.replaceWith(span); resource.setAttribute('style','background-color: ' + bgColor + '; color: ' + textColor + ';'); } resource = null; } } } function getResourceThreshold(resourceName) { var threshold_Peace = { 'Credits': [3, 2, 1], 'Coal': [10000, 0, 0], 'Oil': [23850, 7155, 2385], 'Uranium': [10000, 3000, 1000], 'Lead': [10000, 0, 0], 'Iron': [10000, 0, 0], 'Bauxite': [10000, 0, 0], 'Gasoline': [50000, 20000, 10000], 'Munitions': [50000, 20000, 10000], 'Steel': [50000, 20000, 10000], 'Aluminum': [50000, 20000, 10000], 'Food': [500000, 0, 0], 'Money': [200000000, 0, 0], } var threshold_War = { 'Credits': [3, 2, 1], 'Coal': null, 'Oil': null, 'Uranium': [3820, 1146, 382], 'Lead': null, 'Iron': null, 'Bauxite': null, 'Gasoline': [50000, 20000, 10000], 'Munitions': [50000, 20000, 10000], 'Steel': [50000, 20000, 10000], 'Aluminum': [50000, 20000, 10000], 'Food': [500000, 0, 0], 'Money': [200000000, 0, 0], } return threshold_Peace.hasOwnProperty(resourceName)?threshold_Peace[resourceName]:null; } })(); You'll need to adjust the values under getResourceThreshold to suit your own nation. The arrays are set at 10/3/1 days or null to disable that resource. Change threshold_Peace for threshold_War in the return statement, to switch between peace and war builds. Also added is that if you hover over any coloured resource amount it will tell you either "OK" or "Buy x", as well as "Days Left" until it runs out. Update 15/July/2025 Can set resource thresholds to x/0/0, when you just want to set a "warchest limit" of x. Tooltip will now display "Bank x", once you are 500 units over the warchest limit.
  3. I've never once said that war is bad. Also if you want to discuss politics, go post elsewhere. I want to improve the war system, so that it is not simply a month of nuke turreting, 3-4 times a year. Constructive feedback is always welcome.
  4. Nation Score only limits who you can declare war upon. It does not limit you from declaring even when you're not in a state to conduct war (zero military). It's to stop abuse and players able to exit and enter Beige at will, by selling all their military and "surrendering". It does not change the normal mechanics, where if you are actually defeated, you are sent to Beige. It was actually a part of my original point, that players do not seem to be using Beige to rebuild. They simply exit Beige with zero military and declare war again. It's the only tactic I've seen in global wars, so it's more "we got hit bad, we turret". I rarely see anyone double buy military, coordinate targets, etc from the opposing alliances. I farm during peace and war, ask my alliance. The inflated food market is the only thing I enjoy about global wars. The reason for my comment was more a jab at global radiation solely targeting food (but that's a discussion for another topic).
  5. See this is why I don't like posting in Game Suggestions and what will likely kill the game. If you can't post anything constructive, then don't post. You say it would kill all possible counters, then list every single possible counter that I am killing. The way things currently are with wars, it's not even worth trying to Beige cycle nations. Just pile up the Beige time and they'll be back attacking you within a week. No attempt to even rebuild military during their Beige time, it's just declare, throw a nuke or missile, get Beiged again and repeat. There is nothing fun about that, on either side of the war. Instead of just saying "No I don't like this", how about actually understanding where I'm coming from and coming up with alternate suggestions to better improve the game. The game already restricts down declares. It's actually smaller nations who have been given more freedom to declare war on larger nations. How would it destroy profitable raiding? Outline the gameplay and how it would be affected. Then maybe try to understand where I'm coming from and offer suggestions.
  6. Can we please change it so that nations cannot declare wars if they do not have a significant amount of miltiary units (Soldiers, Tanks, Ships, Navy). Preferably greater than 50%, as they should be able to rebuild that much during Beige Protection. Additionally, if they sell off all the above military units at any point during a war, that is taken to mean they have given up and victory is declared immediately for the other nation(s), preferably without sending them into Beige Protection. It seems counter to the entire war mechanic that nations can sit around in Beige, not using the time to actually rebuild their miltary, only to declare war again when they leave Beige and maybe have enough resources to fund a nuke or missile. The entire war mechanic has become a joke and gameplay is now just nuking other nations, while inflating the food market.
  7. The entire espionage system needs a rework, I've posted about it before over the years (and nothing has really changed). You lose spies too quickly to assassination, even 60 vs 60 spies, you should be losing maybe 5-6 at most. Espionage attacks do way too much damage. They should be limited to blowing up single improvements (and associated military units), not taking out thousands of military units. The "damage" of an espionage attack and the chance of success should scale with your number of spies, and with the number of their spies. If they only have 3 spies and you have 60, it should be near impossible for them to operate (and they should be instantly discovered and killed). In addition, any nation who has been hit by an espionage attack, should have an increasing defensive bonus for the rest of that day (elevated threat levels). After 3 attacks, any further attacks will 100% fail. Nations beige should be able to do sweet f all, not even gather intelligence. They can leave beige protection, if they want to trigger espionage attacks. They should also be protected while on beige. Exception to both above points, for nations they are currently at war with. The biggest thing that would fix the espionage system though is to make it a minigame of sorts. When you make an espionage attack, you have to choose how many spies to send out. Those spies are then "busy" until your military reset time and cannot be counted towards other espionage attacks or used to defend against epsionage attacks. This would help balance the espionage system, because if you send out 60 spies on a single espionage attack, you would be wide open to incoming espionage attacks. You also become unable to make any further esionage attacks for that day, as you have none left to send out. If that's too harsh, you could have them "return to rest" after the next turn instead and be active for defense only, until military reset.
  8. Just did a little bit of investigating and it looks like Sheepy has rounding on for the timezone offset. I tried setting my timezone offset to "0.5" in the background and sadly it got set to "1". Otherwise I would have written a little customisation script to handle it.
  9. Shakyr

    Mr

    Please post in https://forum.politicsandwar.com/index.php?/forum/48-tech-support/ Or login to Discord and open a ticket. This is for Game Suggestions.
  10. I've been asking for years, to the point where I gave up. So I'm happy that someone else is posting about it. Sheepy actually posted in this one, yet nothing has been done in the past year and a half. This one has links to my previous topics.
  11. Additionally, anyone in Beige should not be able to conduct espionage operations.
  12. Something I coded for myself, because I regularly ran out of raw resources, but I thought might be useful. Basically each resource has a Good, Ok, Bad threshold (or is disabled) and is coloured appropriately. At a glance I tell what resources I need to buy now and what I might need to buy soon.
  13. Something I thought about posting a few years ago, but ongoing radiation should affect more than just Farms. All Raw Resource and Manufacturing Improvements should have reduced production. Background "pollution" should be raised for all nations. This will impact various things if they do not have Recycling Centers, etc to offset. This would provide some measure of impact to a nuke war, which the game currently lacks.
  14. Requested 8 years ago (though without the pretty graphics). I would love to see saved templates in the game.
  15. 2. Numbers as always, can change. The whole point was to make it a restriction per city. 1000/1500 infra is cheap, I wouldn't call it whale territory. 3-5. The whole point of this topic is to render nuke turrets unfeasible, or am I missing something? Also, no military means no miltary. If you're lucky enough to still have 1 soldier at turn change (or when you are attacked), you're totally fine. Actually I want to add to my previous list. 5. Amend this to being "instantly beiged on the next Immense Triumph after 12 turns". This would give them the chance to at least double buy and maybe stop the attacker getting IT. 6. If you sell off all your military, this counts as admitting defeat and you will be instantly beiged on the next Immense Triumph, with no counter from (5). Bonus damage will be applied as per (4).
  16. Wouldn't change a thing, except make it slower for them to build their stockpiles. They don't rely on buying nukes during the war, they just use massive stockpiles. Instead, consider all or some of the following: Remove nukes and missles from the Nation Strength calculations. Require at least 1000 infra per city to build missiles and 1500 infra per city, in order to build nukes. If you have no military (soldiers, tanks, navy), you cannot declare wars. If you have no military, you take extra infra damage, increased chance of destroying improvements, plus a chance to destroy missiles and nukes. If you have no military (or less than x%) for 12 turns (1 day), you are instantly beiged.
  17. Lower the odds, but I see no issues with the basic premise. There is a fundamental issue with the current war system, that you can have no military and still declare wars, fighting with nukes and missiles. I'd actually propose three changes: 1. Add the option airplanes to target nuke/missile silos. Does less infrastructure damage, with the chance to destroy a nuke or missile. 2. If a nation has no military, ground attacks have a small chance of finding and destroying a nuke or missile silo. 3. Add options to naval battles to target various things (infrastructure, etc).
  18. Currently when there is not enough Power in a City, it outright disables everything. A relatively simple change would be to instead have it keep Improvements working on a priority list with it only disabling improvements once it reaches the limit. The priority list being for example, Military -> Commerce -> Civil -> Manufacturing. This would allow for cities to still partially function when Power Plants are destroyed or when you don't build enough.
  19. So currently, when we enlist military units, they're created out of thin air and when we discharge them, they disappear. The amount we can buy is based on a nation's population, but that is all. What I propose is that military units become a part of the population (with Tanks, Aircraft and Ships being worth x population). When you lose military units in a war, your maximum population is temporarily reduced. This would then reduce a nation's income and also reduce the amount of military you can enlist (as you have less citizens to draw from). The nation's population would then be slowly restored over x turns or days (and potentially be a good way to integrate Approval Rating). If you're at war, this would be further reduced (as there would be less migration to a country at war). I would also assign x population to relevant Improvements and if you enlist too many military units, this potentially means they are pulled from your "workforce" and Improvements are disabled (much like they are now, if you don't have enough Power) or run at a reduced capacity. When you discharge military units, they are then restored to the population and either the next turn or the next day, they are then restored back to any Improvements. Discharging military units (if it doesn't already), should also reduce your Approval Rating.
  20. Do you ever get tired of making negative posts to changes? You should try and post something constructive, more inline with the ideals of this forum. Not that I've ever noticed. Happy to be proven wrong though, if someone can show me a changelog.
  21. There is no point to espionage, it's a headless chicken, running around the yard making a mess (see other topics for a discussion around espionage). The point of beige though, is to be a safe zone for you to recover (or to be protected if you are new). You can't recover if you're constantly harrassed by espionage attacks. Additionally, does it make sense that it's possible to have a low score nation, harrass new nations with espionage attacks, who are in their initial "safe" beige period? I know that would drive me to quit a game before I started.
  22. Can we both remove the ability to unleash espionage attacks against beige nations and also in turn remove the ability for beige nations to unleash espionage attacks (as this makes things fair) It's meant to be a safe zone to recover from wars and warlike activity, but currently it is not.
  23. Truthfully at this point, any change would be welcome, for a feature that's underdeveloped and mostly ignored.
  24. My regular post about spies, as they are are horribly unbalanced. Decided I wouldn't bother this year, with making a post in Game Suggestions. The usual points: It's possible to lose upwards of 30+ spies in a day, while you're only able to recruit 3-4 per day. Having maximum spies and Arcane, seems to do little to reduce your chances of losing spies. Once you lose spies and are not maxed out, they're basically useless and you may as well not waste your money, til the global war is over. Some of my previous posts on spies, over the years: The oldest post is from almost 7 years ago, yet spies have not really seen much improvement over the years.
  25. Military attacks should be able to target specific improvements, with a % chance to disable (say 0% for Pyrrhic Victory, 1% for Moderate Success, 3% for Immense Triumph), based on the success of the attack. The disabled improvement would be restored after x turns, based on the success of the attack (say 1 turn for Pyrrhic Victory, 2 for Moderate Success, 4 for Immense Triumph). This could then also be extended to the espionage system and replace the current attacks vs Soldiers/Tanks/Aircraft.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and the Guidelines of the game and community.