NATION

PASSWORD

Managing embassies from outside of a region

Bug reports, general help, ideas for improvements, and questions about how things are meant to work.
User avatar
The Cosmic Mainframe
Ambassador
 
Posts: 1104
Founded: Jan 26, 2020
Psychotic Dictatorship

Managing embassies from outside of a region

Postby The Cosmic Mainframe » Wed Sep 23, 2020 4:20 pm

Of the ROs in my puppet storage region Bytes, four of them currently reside in other regions - this nation, NPO Supercomputer 00, Tycho Monolith, and A Long Time Ago In A Galaxy Far Far Away. From those nations I can set up polls, use communications authority, edit the WFE and flag, and even ban/eject nations. However, I can't request embassies with other regions, despite being able to close or promote embassies. When I go to the Region Control page, there is a "New Embassy" button that opens a prompt to visit a region's Admin page, and then on the admin page there is no way to request embassies.

It would be rather convenient to be able to request embassies as an absent RO, though I suspect this might be intentional or impossible due to technical limitations.
Last edited by The Cosmic Mainframe on Wed Sep 23, 2020 4:23 pm, edited 2 times in total.
== BEGIN POSTSCRIPT ==
The Mainframe requires more processing power and storage.
Donate your computing devices or they will be taken by force.
== END POSTSCRIPT ==

UPDATES (earth-year 3345): International Subsystem scales up operations in 42E5 "New York," Earth, now the largest known concentration of androids.

Factbooks | About Me | NationStates Flag Bracket II | Bytes (card farming region) | MAINFRAMEWAVE
Feel free to telegram me about anything. I'll do my best to respond.
Canon is relative to the observer. Not using NS stats.
This nation does not represent my real views, and if it represents yours, I question your sanity.

User avatar
The Unified Missourtama States
Diplomat
 
Posts: 670
Founded: Jul 30, 2019
Ex-Nation

Postby The Unified Missourtama States » Wed Sep 23, 2020 6:38 pm

Are you saying it is possible to make a non-native nation a regional officer?
I didn't know that, but it seems wrong...
"The best lack all conviction, while the worst
Are full of passionate intensity.
" (W. B. Yeats)

User avatar
The Cosmic Mainframe
Ambassador
 
Posts: 1104
Founded: Jan 26, 2020
Psychotic Dictatorship

Postby The Cosmic Mainframe » Wed Sep 23, 2020 8:45 pm

The Unified Missourtama States wrote:Are you saying it is possible to make a non-native nation a regional officer?
I didn't know that, but it seems wrong...

You can move nations to a region and when they leave they remain regional officers. All of the nations I listed were in Bytes at one point - in the case of this nation and Tycho Monolith, they were moved there temporarily so I could give them RO status.
== BEGIN POSTSCRIPT ==
The Mainframe requires more processing power and storage.
Donate your computing devices or they will be taken by force.
== END POSTSCRIPT ==

UPDATES (earth-year 3345): International Subsystem scales up operations in 42E5 "New York," Earth, now the largest known concentration of androids.

Factbooks | About Me | NationStates Flag Bracket II | Bytes (card farming region) | MAINFRAMEWAVE
Feel free to telegram me about anything. I'll do my best to respond.
Canon is relative to the observer. Not using NS stats.
This nation does not represent my real views, and if it represents yours, I question your sanity.

User avatar
The Cosmic Mainframe
Ambassador
 
Posts: 1104
Founded: Jan 26, 2020
Psychotic Dictatorship

Postby The Cosmic Mainframe » Sun Oct 04, 2020 5:43 pm

Well, it's been over a week and no official response, so I guess I'll give this a bump.

To be clear, what I'm asking is: is it intentional that absent ROs can't request embassies, and if not can that be changed?
== BEGIN POSTSCRIPT ==
The Mainframe requires more processing power and storage.
Donate your computing devices or they will be taken by force.
== END POSTSCRIPT ==

UPDATES (earth-year 3345): International Subsystem scales up operations in 42E5 "New York," Earth, now the largest known concentration of androids.

Factbooks | About Me | NationStates Flag Bracket II | Bytes (card farming region) | MAINFRAMEWAVE
Feel free to telegram me about anything. I'll do my best to respond.
Canon is relative to the observer. Not using NS stats.
This nation does not represent my real views, and if it represents yours, I question your sanity.

User avatar
Liberty
Lobbyist
 
Posts: 16
Founded: Jun 07, 2018
Corporate Bordello

Postby Liberty » Sun Oct 04, 2020 8:32 pm

The Cosmic Mainframe wrote:Well, it's been over a week and no official response, so I guess I'll give this a bump.

To be clear, what I'm asking is: is it intentional that absent ROs can't request embassies, and if not can that be changed?

If you are an RO of many regions, which region’s embassy request button should show up? Or should all of them?

I’m guessing that is why.
Last edited by Liberty on Sun Oct 04, 2020 8:32 pm, edited 1 time in total.

User avatar
Refuge Isle
Technical Moderator
 
Posts: 1884
Founded: Dec 14, 2018
Left-wing Utopia

Postby Refuge Isle » Sun Oct 04, 2020 8:39 pm

The Cosmic Mainframe wrote:Of the ROs in my puppet storage region Bytes, four of them currently reside in other regions - this nation, NPO Supercomputer 00, Tycho Monolith, and A Long Time Ago In A Galaxy Far Far Away. From those nations I can set up polls, use communications authority, edit the WFE and flag, and even ban/eject nations. However, I can't request embassies with other regions, despite being able to close or promote embassies. When I go to the Region Control page, there is a "New Embassy" button that opens a prompt to visit a region's Admin page, and then on the admin page there is no way to request embassies.

It would be rather convenient to be able to request embassies as an absent RO, though I suspect this might be intentional or impossible due to technical limitations.

I would recommend getting whatever region you are interested in to send an embassy request to your puppet storage region. You can accept those requests even if your puppets are not in the region, just not make any new ones.

User avatar
The Cosmic Mainframe
Ambassador
 
Posts: 1104
Founded: Jan 26, 2020
Psychotic Dictatorship

Postby The Cosmic Mainframe » Sun Oct 04, 2020 8:49 pm

Refuge Isle wrote:
The Cosmic Mainframe wrote:Of the ROs in my puppet storage region Bytes, four of them currently reside in other regions - this nation, NPO Supercomputer 00, Tycho Monolith, and A Long Time Ago In A Galaxy Far Far Away. From those nations I can set up polls, use communications authority, edit the WFE and flag, and even ban/eject nations. However, I can't request embassies with other regions, despite being able to close or promote embassies. When I go to the Region Control page, there is a "New Embassy" button that opens a prompt to visit a region's Admin page, and then on the admin page there is no way to request embassies.

It would be rather convenient to be able to request embassies as an absent RO, though I suspect this might be intentional or impossible due to technical limitations.

I would recommend getting whatever region you are interested in to send an embassy request to your puppet storage region. You can accept those requests even if your puppets are not in the region, just not make any new ones.

This is really just a problem of convenience to me. If I want to request embassies I can just log in to my founder account 0x00 and request from there, and that is more convenient than asking other ROs to send requests to me. But most convenient would be to request from this nation.
Liberty wrote:
The Cosmic Mainframe wrote:Well, it's been over a week and no official response, so I guess I'll give this a bump.

To be clear, what I'm asking is: is it intentional that absent ROs can't request embassies, and if not can that be changed?

If you are an RO of many regions, which region’s embassy request button should show up? Or should all of them?

I’m guessing that is why.

In my case, since I am RO in only one region, that shouldn't be a problem. And if it's a problem for embassies it should be a problem for Border Control, but I can easily ban/eject nations as an absent RO.
== BEGIN POSTSCRIPT ==
The Mainframe requires more processing power and storage.
Donate your computing devices or they will be taken by force.
== END POSTSCRIPT ==

UPDATES (earth-year 3345): International Subsystem scales up operations in 42E5 "New York," Earth, now the largest known concentration of androids.

Factbooks | About Me | NationStates Flag Bracket II | Bytes (card farming region) | MAINFRAMEWAVE
Feel free to telegram me about anything. I'll do my best to respond.
Canon is relative to the observer. Not using NS stats.
This nation does not represent my real views, and if it represents yours, I question your sanity.

User avatar
Liberty
Lobbyist
 
Posts: 16
Founded: Jun 07, 2018
Corporate Bordello

Postby Liberty » Sun Oct 04, 2020 11:52 pm

The Cosmic Mainframe wrote:In my case, since I am RO in only one region, that shouldn't be a problem. And if it's a problem for embassies it should be a problem for Border Control, but I can easily ban/eject nations as an absent RO.
In your case. And you can’t eject a nation from any region, only from the region he’s in. So that is not an example of a page needing one button for each region a nation is an RO in. That’s more similar to being able to accept embassy requests while outside the region.

By the way, I’m not saying it wouldn’t be nice, I have had the same thing happen to me. I’m just not sure how it should look.

User avatar
SherpDaWerp
Technical Moderator
 
Posts: 1896
Founded: Mar 02, 2016
Benevolent Dictatorship

Postby SherpDaWerp » Mon Oct 05, 2020 2:33 am

Through some clever website manipulation, I just (EDIT: well, 2 hours ago...) requested embassies with Bytes from this nation (residing in Glass Gallows) for my other puppet storage region - Imperial Stronghold. You can see the request here and you can see that I haven't left Glass Gallows at all in the last few months.

This suggests that it's extremely possible to implement this as basic functionality of the NS site.

EDIT: I've mocked up a quick userscript that provides this functionality in a rudimentary manner. Because I don't have easy access to a list of all regions where the user has Embassies authority, I instead ask the user what to change the region to and then change it.

I've made it available here. It's quite rudimentary but I've tested it successfully, so if you find any bugs lemme know.

EDIT 2: NS handles the problems if you put in a non-existent region or a region you don't have embassy authority in, which is nice.
Last edited by SherpDaWerp on Mon Oct 05, 2020 2:44 am, edited 3 times in total.
Became an editor on 18/01/23 techie on 29/01/24

Rampant statistical speculation from before then is entirely unofficial

User avatar
Racoda
Technical Moderator
 
Posts: 579
Founded: Aug 12, 2014
Democratic Socialists

Postby Racoda » Mon Oct 05, 2020 7:02 am

SherpDaWerp wrote:Through some clever website manipulation, I just (EDIT: well, 2 hours ago...) requested embassies with Bytes from this nation (residing in Glass Gallows) for my other puppet storage region - Imperial Stronghold. You can see the request here and you can see that I haven't left Glass Gallows at all in the last few months.

This suggests that it's extremely possible to implement this as basic functionality of the NS site.

EDIT: I've mocked up a quick userscript that provides this functionality in a rudimentary manner. Because I don't have easy access to a list of all regions where the user has Embassies authority, I instead ask the user what to change the region to and then change it.

I've made it available here. It's quite rudimentary but I've tested it successfully, so if you find any bugs lemme know.

EDIT 2: NS handles the problems if you put in a non-existent region or a region you don't have embassy authority in, which is nice.

Note that your script doesn't work unless the nation you're using has embassy RO permissions in the region in which it resides, otherwise the "request embassy" form just doesn't appear (but I found another, similar way to do it).
Code: Select all
embassy button adder.user.js:29:52: Uncaught TypeError: emb_form is null

If you don't have RO permissions in your current region, you won't be able to send embassy requests through existing NS forms. It's also not as simple as just adding a form on the destination region either, because an embassy request requires a security check. The code used for the check doesn't appear on other region's pages unless you're an embassy RO in your current region.
It does however appear on the `region_control` page (the admin page of the region where you're RO'd).
So I just added the form there! Also saves you the trouble of going to the destination region's page :P
6 minutes ago: Racoda proposed constructing embassies between RSCA and Big Farma.


Code: Select all
// ==UserScript==
// @name         Remote Embassies
// @namespace    dithpri.RCES
// @version      0.1
// @description  Go to the regional admin page of the region in which you have embassy RO permissions. You'll be able to request embassies, even if you're outside of the region.
// @author       dithpri
// @match        https://www.nationstates.net/*page=region_control/region=*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    document.getElementById("OpenEmbassyBox").insertAdjacentHTML("beforebegin",
`
<form action="${window.location.pathname}" method="post">
<p>
  <label>Request embassies with:
    <input type="text" name="embassyregion" placeholder="Destination region...">
  </label>
  <input type="hidden" name="chk" value="${document.querySelector('input[name="chk"]').value}">
  <button type="submit" name="embassyrequest" value="1" class="button icon approve primary big">Request embassies</button>
</p>
`);
})();


Edit: words
Edit2: removed hardcoded path *facepalm*
Last edited by Racoda on Mon Oct 05, 2020 5:46 pm, edited 3 times in total.

Acting as a player unless accompagnied by mod action or reddish text
Any pronouns

User avatar
The Cosmic Mainframe
Ambassador
 
Posts: 1104
Founded: Jan 26, 2020
Psychotic Dictatorship

Postby The Cosmic Mainframe » Mon Oct 05, 2020 3:19 pm

Racoda wrote:
SherpDaWerp wrote:Through some clever website manipulation, I just (EDIT: well, 2 hours ago...) requested embassies with Bytes from this nation (residing in Glass Gallows) for my other puppet storage region - Imperial Stronghold. You can see the request here and you can see that I haven't left Glass Gallows at all in the last few months.

This suggests that it's extremely possible to implement this as basic functionality of the NS site.

EDIT: I've mocked up a quick userscript that provides this functionality in a rudimentary manner. Because I don't have easy access to a list of all regions where the user has Embassies authority, I instead ask the user what to change the region to and then change it.

I've made it available here. It's quite rudimentary but I've tested it successfully, so if you find any bugs lemme know.

EDIT 2: NS handles the problems if you put in a non-existent region or a region you don't have embassy authority in, which is nice.

Note that your script doesn't work unless the nation you're using has embassy RO permissions in the region in which it resides, otherwise the "request embassy" form just doesn't appear (but I found another, similar way to do it).
Code: Select all
embassy button adder.user.js:29:52: Uncaught TypeError: emb_form is null

If you don't have RO permissions in your current region, you won't be able to send embassy requests through existing NS forms. It's also not as simple as just adding a form on the destination region either, because an embassy request requires a security check. The code used for the check doesn't appear on other region's pages unless you're an embassy RO in your current region.
It does however appear on the `region_control` page (the admin page of the region where you're RO'd).
So I just added the form there! Also saves you the trouble of going to the destination region's page :P
6 minutes ago: Racoda proposed constructing embassies between RSCA and Big Farma.


Code: Select all
// ==UserScript==
// @name         Remote Embassies
// @namespace    dithpri.RCES
// @version      0.1
// @description  Go to the regional admin page of the region in which you have embassy RO permissions. You'll be able to request embassies, even if you're outside of the region.
// @author       dithpri
// @match        https://www.nationstates.net/*page=region_control/region=*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    document.getElementById("OpenEmbassyBox").insertAdjacentHTML("beforebegin",
`
<form action="/page=region_control/region=rsca" method="post">
<p>
  <label>Request embassies with:
    <input type="text" name="embassyregion" placeholder="Destination region...">
  </label>
  <input type="hidden" name="chk" value="${document.querySelector('input[name="chk"]').value}">
  <button type="submit" name="embassyrequest" value="1" class="button icon approve primary big">Request embassies</button>
</p>
`);
})();


Edit: words

Noticed that the script has a hardcoded "region=rsca" in it, might be better if it worked with any region (or even multiple regions in which one is RO)
Last edited by The Cosmic Mainframe on Mon Oct 05, 2020 3:20 pm, edited 1 time in total.
== BEGIN POSTSCRIPT ==
The Mainframe requires more processing power and storage.
Donate your computing devices or they will be taken by force.
== END POSTSCRIPT ==

UPDATES (earth-year 3345): International Subsystem scales up operations in 42E5 "New York," Earth, now the largest known concentration of androids.

Factbooks | About Me | NationStates Flag Bracket II | Bytes (card farming region) | MAINFRAMEWAVE
Feel free to telegram me about anything. I'll do my best to respond.
Canon is relative to the observer. Not using NS stats.
This nation does not represent my real views, and if it represents yours, I question your sanity.

User avatar
Racoda
Technical Moderator
 
Posts: 579
Founded: Aug 12, 2014
Democratic Socialists

Postby Racoda » Mon Oct 05, 2020 5:48 pm

The Cosmic Mainframe wrote:Noticed that the script has a hardcoded "region=rsca" in it, might be better if it worked with any region (or even multiple regions in which one is RO)

Gah!! Can't believe I missed that when proofreading. Fixed.

Acting as a player unless accompagnied by mod action or reddish text
Any pronouns


Advertisement

Remove ads

Return to Technical

Who is online

Users browsing this forum: Caffeinated, Chenzorian Viatrok, Countriopia, Dytarma, Lower Antegria, Man Im Dead Ong, Tamocordia, The Plough Islands

Advertisement

Remove ads