Jump to content

Parapet

Members
  • Posts

    13
  • Joined

  • Last visited

  • Days Won

    1

Parapet last won the day on February 16 2023

Parapet had the most liked content!

Profile Information

  • Gender
    Male
  • Leader Name
    Parapet
  • Nation Name
    Belka
  • Nation ID
    476756
  • Alliance Name
    The Sword Coast

Contact Methods

  • Discord Name: Parapet#6573

Recent Profile Visitors

538 profile views

Parapet's Achievements

Casual Member

Casual Member (2/8)

80

Reputation

  1. Very excited to see where this goes fellas.
  2. For legal reasons this is a joke and everything I say is alleged
  3. For legal reasons this is a joke.
  4. I am going through all the stages of grief simultaneously. I had something to look forward to and now its gone. See yall in May I guess.
  5. I do not speak for anyone or anything but myself. But the general consensus I had while playing this game was that a war dodger is someone that leaves the alliance during an active war. Now in Carthago’s defense, that definition can be heavily stretched to include people both leaving the alliance and people who become inactive. However to me, people who go inactive are not really war dodgers. War dodgers usually have self interested reasons to leave an alliance. For example, if I left my alliance to save my infrastructure, that would be textbook war dodging. But going inactive and not playing is a different situation to me. But I also have a few questions for you. Can I have a source or at least some credibility to this claim? Like a statement from CTO or a given definition from their training guides? It is not exactly clear to me what triggered this response from you in the first place. Also on an unrelated note: How did your spies get caught in a gather intelligence spy op? That’s some serious bad luck.
  6. Quite a dangerous argument that can be applied and used against us all don't ya think?
  7. Screw a follow up post lets do it now. After less than a half an hours work I present yet another breakthrough. I now bring the ability for all to be able to collect publicly information of alliances on mass. Thanks to ChatGPT and my testing, I now present a functional example by which ChatGPT can create a script that uses PNW API to create a detailed sheet of every nation in a particular alliance. Have fun. Simply put in the alliance ID you want then put in your API key. Easy as pie. import requests import pandas as pd # Enter your alliance ID and API key below alliance_id = "8900" api_key = "API_KEY_HERE" # Define a function to return a value or "N/A" if the value is missing def get_value_or_na(data, key): value = data.get(key) if value is None: return "N/A" else: return value # Fetch the list of nations in the alliance url = f"https://politicsandwar.com/api/nations/?alliance_id={alliance_id}&key={api_key}" response = requests.get(url) if response.status_code == 200: nations = response.json() if isinstance(nations, str): print("Error fetching nations:", nations) exit() nation_ids = [nation["nationid"] for nation in nations["nations"]] else: print("Error fetching nations:", response.text) exit() # Fetch the nation data for each nation nation_data = [] for nation_id in nation_ids: url = f"https://politicsandwar.com/api/nation/id={nation_id}&key={api_key}" response = requests.get(url) if response.status_code == 200: nation = response.json() nation_info = { "name": get_value_or_na(nation, "name"), "nationid": get_value_or_na(nation, "nationid"), "cities": get_value_or_na(nation, "cities"), "score": get_value_or_na(nation, "score"), "war_policy": get_value_or_na(nation, "war_policy"), "projects": get_value_or_na(nation, "projects"), "soldiers": get_value_or_na(nation, "soldiers"), "tanks": get_value_or_na(nation, "tanks"), "aircraft": get_value_or_na(nation, "aircraft"), "ships": get_value_or_na(nation, "ships"), "missiles": get_value_or_na(nation, "missiles"), "nukes": get_value_or_na(nation, "nukes"), "missilelpad": get_value_or_na(nation, "missilelpad"), "nuclearresfac": get_value_or_na(nation, "nuclearresfac"), "iron_dome": get_value_or_na(nation, "iron_dome"), "vitaldefsys": get_value_or_na(nation, "vitaldefsys"), "prop_bureau": get_value_or_na(nation, "prop_bureau"), "spy_satellite": get_value_or_na(nation, "spy_satellite"), "pirate_economy": get_value_or_na(nation, "pirate_economy") } nation_data.append(nation_info) else: print("Error fetching nation data:", response.text) # Create a Pandas DataFrame with the nation data df = pd.DataFrame(nation_data, columns=["name", "nationid", "cities", "score", "war_policy", "projects", "soldiers", "tanks", "aircraft", "ships", "missiles", "nukes", "missilelpad", "nuclearresfac", "iron_dome", "vitaldefsys", "prop_bureau", "spy_satellite", "pirate_economy"]) # Write the DataFrame to a spreadsheet filename = f"{alliance_id}_nation_data.xlsx" df.to_excel(filename, index=False) print(f"Nation data written to {filename}") The above prompt made the code below and created the output below. This is yet another example of how ChatGPT can help micros close the gap in terms of technology when compared to the larger macros they have to compete with. I post this here to show you while there are some funky things with this, wither either changes to the prompt or a half decent coder, one can make this into a very functional sheet.
  8. Good morning/afternoon/whatever, I have come to announce perhaps the creation of the first Discord bot that specifically uses the Politics and War API that was created entirely using ChatGPT. For those of you who are unaware, ChatGPT is an online free to use AI that can do various things when prompted with instructions. A few weeks ago, I became interested in ChatGPT after seeing its extensive usage by people online who are a lot smarter than me. So, I started to wonder if this technology could potentially bridge the technological gap between those who can code and those who cannot. After creating such an account, I quickly discovered that the bot was aware of the Politics and War API and it seemed to vaguely understand it. That is when I embarked on a personal project to see if somehow or someway, I could get ChatGPT to create a basic discord bot that functions with the API and most importantly, that bot had to function without the need for any amount debugging. To get to the point, the results are very promising to say the least. While ChatGPT struggled extensively with it trying to use old imports for Discord bots, I eventually figured out a prompt for it to create a bot for a primitive discord bot that grabbed basic nation information. There are no other features. This is the culmination of just under 8 hours of tinkering and playing around with various prompts. The following is the exact prompt that was used for this proof-of-concept bot. This prompt created the following code output, I have of course omitted my API key and the token. Should work as so: /nation (Nation ID here) import discord import requests client = discord.Client(intents=discord.Intents.all()) @client.event async def on_ready(): print('Logged in as {0.user}'.format(client.user)) @client.event async def on_message(message): if message.author == client.user: return if message.content.startswith('/nation'): nation_id = message.content.split(' ')[1] response = requests.get(f'https://politicsandwar.com/api/nation/id={nation_id}&key=API_KEY') if response.status_code == 200: nation = response.json() nation_info = ( f'**Nation:** {nation["name"]}\n' f'**City count:** {nation["cities"]}\n' f'**Score:** {nation["score"]}\n' f'**War policy:** {nation["war_policy"]}\n' f'**Soldiers:** {nation["soldiers"]}\n' f'**Tanks:** {nation["tanks"]}\n' f'**Aircraft:** {nation["aircraft"]}\n' f'**Ships:** {nation["ships"]}\n' f'**Missiles:** {nation["missiles"]}\n' f'**Nukes:** {nation["nukes"]}' ) embed = discord.Embed(title="Nation Info", description=nation_info, color=0x00ff00) await message.channel.send(embed=embed) else: await message.channel.send('Error retrieving nation information.') client.run('TOKEN') This code output when assuming the token and API key is done correctly of course does the following: While compared to the behemoth of Locutus or any other half respectable Discord bot with more than an ounce of work, it is not that impressive. However, what is impressive is the fact that not a single human developed the code for this PNW Discord bot to work. Is it a milestone? I don't know. Nor do I know the road ahead for this technology. I don't even know if I am the first one to do this with the PNW API and ChatGPT specifically. But I present it wide open to the world of PNW to get the message out there that this is possible now. I see the gap in technology that exists in PNW as a major filter that alliances must overcome. I commend Borg and other various players for doing such fantastic work on making technology as accessible as possible to address this gap in capability. But despite this, there still exists a development gap between macro alliance technology and micro alliance technology generally speaking (Not true however for all macros or micros, just broadly speaking here). But I also acknowledge the limitations that such AI currently has as well as it was a struggle to put it lightly just getting this very basic script to pop out and successfully to run all in one go without any debugging. However, I am also a firm believer that this technology will only get better given enough time. As such, the question remains of what happens here? Well, I suspect knowing this community that many of you will range from being skeptical to calling me an outright moron for even posting these findings here. While I say true, this isn't exactly revolutionary, I do think this is something that is worth reporting on and publishing for the public eye to see. While I think we are far ways away from ChatGPT replacing all of PNW coders, I do think it is something that is worth investigating and/or keeping an eye on. I also know for a fact that knowing how many smart people there are in this community, I have no doubts that someone else will make better use of it than I have. But this does make me excited to see what is coming and to see what clever ways people use this for. Go wild. Cheers.
×
×
  • Create New...

Important Information

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