Jump to content

Shakyr

Members
  • Posts

    464
  • Joined

  • Days Won

    1

Everything posted by Shakyr

  1. I've pointed out a similar nation before, that had link bleed (see here). In that case, the nation had a '-' in their name.
  2. Browsers do support multiple tabs. Right click, open in new tab, buy military, close tab, repeat.
  3. https://politicsandwar.com/forums/index.php?/topic/8900-copy-city/ Linking to acknowledge similar suggestion, that was posted a few months ago.
  4. If you're not going to search for previous suggestions that are similar, at least have the decency to look at the topics that are on the current page. https://politicsandwar.com/forums/index.php?/topic/10737-max-buy-decommission-improvements/ https://politicsandwar.com/forums/index.php?/topic/10769-city-improvement-templates/
  5. I'd be surprised if the number of open slots is being stored directly. More than likely, it's an SQL count of the war data (well that is how I'd do it) and there is little difference (in difficulty) between counting SQL rows to print out a count and printing out those rows instead. That, combined with the fact that an API should not be too narrow (otherwise Sheepy will be forever adding in bits and pieces), meant I decided to extend your request
  6. Inclusion of another page, called "City Improvement Templates", with a layout similar to the "Improvements" section of a city page and the ability to assign it a custom name. I'd possibly add a button to https://politicsandwar.com/cities/next to "Create New City", for "Improvement Templates" or something like that. On the city page, underneath "Improvements (xx/yy)", a new dropdown with a list of defined templates (if any are defined) and a button called "Apply Template" When they choose a template, it checks through what improvements are already built and they get warned "This template will cost $x and y resources to apply. You will gain $a and b resources. Do you wish to continue?". Clicking Yes to that will then sell off excess improvements and buy missing improvements. Couple of things to note: - If a template is defined for 30 improvements and you have a maximum of 32 improvements, you will end up with 30 improvements afterwards (even if you previously had 32 purchased). - If a template is defined for 30 improvements and you have a maximum of 29 improvements, you will not be able to apply the template. - If your current military is over the capacity for a template, you will not be able to apply the template (you will have to sell off the military units first). - When a template is used to change a city's improvements, the template is not assigned to that city. Therefore, when you change the template, it will not update any cities that template was previously applied to. - Therefore, you will still have to visit every single city, one by one, to switch templates (from peac Hopefully makes sense. Thoughts I had in my head for a while, but decided I should post my ramblings, when I saw a similar topic (link).
  7. That was why I only had the bare minimum listed, for inclusion in the nation API. The actual war API could contain more details (referenced by <warid>).
  8. /api/nations/ already has vacation mode, it is the number of turns left of vacation. You can find out that information there. Though yes, it is missing from /api/nation/id=<nationid> and I agree that it should be available there. As for including defensive slot count, too narrow. A better solution would be to include all wars for a nation in the individual nation api (see below for mock layout). Means you might have to do a bit of work to get aggressive/defensive counts. But at least you then also know other things like who is at war with whom (useful for tracking whether someone has attacked the proper target, for example). nationdata{ ..., wars: { { id: <warid>, attacker: <nationid>, defender: <nationid> }, { id: <warid>, attacker: <nationid>, defender: <nationid> }, ... } }EDIT: Also, linking similar request https://politicsandwar.com/forums/index.php?/topic/10522-nation-api-enhancement/
  9. Personally I reckon it should go "new flag = existing flag, no change, therefore ok". Either that, or when they leave an alliance, check if flag is specific to that alliance. If it's specific, force a flag change at that point in time (due to the flag being specific to that alliance). Having to force people to change flag, just because they're no longer in that alliance (when they don't want to change the flag), is not exactly good for the user.
  10. Pollution doesn't seem to cover radioactive substances, which is why Nuclear Power Plants have no pollution. If anything, I'd add another nation stat, called "Radiation Background Level", which would also reduce population slightly. Lower the pollution for Hospitals and have it increase background radiation slightly instead (as hospitals use radioactive isotopes and such). Give Nuclear Power Plants a big boost to background radiation, to drop population enough to discourage it being built sub 1k infra, but not as noticeable once up around 1.5k infra. I'd also have Missiles and Nuclear Weapons, raise the background radiation for every city (small amount for missiles, larger for nukes), as they are not specifically built in any one city.
  11. If you do change the name, can you please leave the old one in there for a couple of days at least, to give people time to alter scripts? Thanks PHP is horrible with variable types. It's perfectly happy keeping an integer as a string, right up until you use it in a calculation. At which point, it will think of it as an integer and the result will be an integer. //PHP a='5'; //string b=5; //integer c=a+b; //c is now 10At least it's slightly better than Javascript. JS uses + to concatenate strings, which causes all sorts of fun. //Javascript var a='5'; //string var b=5; //integer var c=a+b; //c is now '55' If I get a chance later this week, I'll do a post in suggestions for nations, like I did with alliances.
  12. Ah, you mean for defensive battles. Still like my idea for offensive battles. Could be useful to have limited ability to repurchase lost military, if you're attacked. The only condition that I'd place (ontop of what you've defined above), is that the player must have been active in the past 12 hours (maybe longer, but not too long). Put it down to the nation needing the "presence" of their esteemed leader, in order to retrain military. With the activity limit, it adds to the incentive to stay active (something that is throughout the game). It also means that it's still possible to target inactive nations for raiding, without the nation automatically retraining troops.
  13. Similar, but alternate suggestion. When you have units destroyed in battle, have on the battle summary page, underneath the summary, a prompt that says "Do you wish to retrain lost units? You lost x y in the battle, which will cost z to retrain.", where x is the number of units lost, if you have the capacity (building capacity limits, daily purchase limits, etc), y is one of Soldiers, Tanks, Aircraft, Navy and z is the cost in money and resources. If you can't buy any more of that unit for the day, the prompt doesn't appear. If you don't have enough resources/money, the prompt appears, but whatever resource/money you're deficit in, is coloured red. Still means the player has to do something and means Sheepy doesn't have to keep track of whether or not you want that particular unit retrained.
  14. Revamped my suggestion after some research and talking to a few people. Suggestion for the Alliance API endpoints, that introduces a bit of consistency and groups a few related values. api/alliances/ - two options - summary of basic stats, good for the stat junkies to quickly update { allianceid, name, color, memberCount, vacationCount, applicantCount, score, avgscore }api/alliances/<allianceid>/- specific lookup for an alliance { allianceid, name, acronym, color, rank, memberCount, /* includes those on vacation */ vacationCount, applicantCount, /* includes those on vacation */ canjoinalliance, score, avgscore, datefounded, continent, flagurl, forumurl, ircchan, stats { gdp, cities, infrastructure, landarea, population, treasures }, military { soldiers, tanks, aircraft, ships, missiles, nukes } }I've deliberately left actual members out (officerids, leaderids, heirids), because they really need their own lookup API. api/alliances/<allianceid>/members/ - list of members in the alliance - includes those on vacation - excludes applicants { { alliancerank, /* by score */ nationid, leader=0/1, heir=0/1, officer=0/1 }, { ... } }api/alliances/<allianceid>/leaders/- list of leaders in the alliance - includes those on vacation { <nationid>, <nationid>, ... }api/alliances/<allianceid>/heirs/- list of heirs in the alliance - includes those on vacation { <nationid>, <nationid>, ... }api/alliances/<allianceid>/officers/- list of officers in the alliance - includes those on vacation { <nationid>, <nationid>, ... }api/alliances/<allianceid>/applicants/- list of applicants in the alliance - includes those on vacation { <nationid>, <nationid>, ... }
  15. I like your table for Alliance Growth If you're after a nice graph, look at highcharts.com. I've been using them for displaying graphs on webpages and found them to be pretty good, highly customisable.
  16. Trade Prices API not currently working for me, says page not found.
  17. I had to rewrite my stuff barely a week after I'd finished it, because he added those icons *shakes fist* Having it in the API would make it alot easier
  18. Sheepy, could I have some clarification as to what you mean by highest/lowest buy? It seems to me that it's running off 'totalvalue' as opposed to 'price', with the latter actually being more useful (as it would then give you a min/max to go with the average). { "resource": "steel", "avgprice": "2868", "marketindex": "18,323", "highestbuy": { "date": "2016-01-11 16:23:16", "nationid": "21386", "amount": "4910", "price": "2694", "totalvalue": 13227540 }, "lowestbuy": { "date": "2016-01-11 18:36:54", "nationid": "28939", "amount": "34", "price": "2750", "totalvalue": 93500 } }Also, with all APIs, is the API data generated at that point in time, or is it cached and only updated once an hour or something like that?
  19. If you're using PHP, compile it all in an array and then use the following, to get it to display nicely. $json_string = json_encode($data, JSON_PRETTY_PRINT);
  20. Related to this, the city API no longer matches the other APIs. { "cityid": "23583", "url": "https:\/\/politicsandwar.com\/city\/id=23583", "nationid": "14511", "name": "Mauritius", "nation": "The Lost Isles", "leader": "Shakyr", "continent": "Australia", "founded": "2015-03-09", "age": 305, "powered": "Yes", "infrastructure": "1500.00", "land": "2000.00", "population": 165250, "popdensity": 82.63, "crime": 0, "disease": 0, "commerce": 100, "avgincome": 4.665, "pollution": 0, "nuclearpollution": 0, "basepop": 150000, "basepopdensity": 74.999962500019, "minimumwage": 1.5549597855228, "poplostdisease": 0, "poplostcrime": 0, "coalpower": "0", "oilpower": "0", "nuclearpower": "1", "windpower": "0", "coalmine": "0", "oilwell": "0", "ironmine": "0", "bauxitemine": "3", "leadmine": "0", "uraniummine": "0", "farm": "5", "oilrefinery": "0", "steelmill": "0", "aluminumrefinery": "3", "munitionsfactory": "0", "policestation": "1", "hospital": "1", "recyclingcenter": "1", "subway": "1", "supermarket": "0", "bank": "3", "shoppingmall": "3", "stadium": "2", "barracks": "2", "factory": "1", "airforcebase": "3", "drydock": "0" }Instead of before, where it had. { "kind": "city", "data": { "citydata": { ... } "stats": { ... } } }Just want to check that this is how the city API will be from now on, before I go and spend a few hours rewriting how I handle the city API (and add exceptions because it's different to the others).
  21. Drop Sheepy a PM on this forum, with your friend's email address (as that's private information, that you probably shouldn't post here) and a link to this topic. Sheepy's Forum Profile That should make it easier for him to investigate the issue.
  22. ohai R&R Welcome to Orbis I remember you from lands afar, though I haven't really visited there in a fair few years!
  23. Just tested it myself. If you enter in a comma (for example "1,000") as the value, it will only transfer what is to the left of the comma (in this case "1"). Basically, the numbers aren't being cleaned up properly. Though they are being error checked, as "1,0" was coming back with an error There was a similar bug that I reported the other day (see here).
×
×
  • Create New...

Important Information

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