Verified:

KoHeartsGPA Game profile

Member
EE Patron
30,497

Feb 6th 2014, 16:12:47

Seriously man, I know your intention is good, but allowing duplicate names is not a good idea IMO.
Mess with me you better kill me, or I'll just take your pride & joy and jack it up
(•_•)

https://youtu.be/...pxFw4?si=mCDXT3t1vmFgn0qn

-=TSO~DKnights~ICD~XI~LaF~SKA=-

S.F. Giants 2010, 2012, 2014 World Series Champions, fluff YEAH!

Xinhuan Game profile

Member
3728

Feb 6th 2014, 17:14:32

They aren't duplicate names.

What happens is an old trick. When you enter a country name, the game removes punctuation marks (basically it only accepts alphabets, numbers and single spaces between words). Unfortunately, the multiple spaces between words are replaced with a single space before the removal of punctuation marks.

In the following examples, I will use <space> to denote 1 space (the character typed by the spacebar)

Example 1:
Country name is "Abcd<space>defg".
This name is valid.

Example 2:
Country name is "Abcd<space><space>defg".
This name contains 2 spaces in a row, it is shortened to the country name in Example 1, and will complain about the country name already being taken.

Example 3:
Country name is "Abcd.defg".
This country name contains a fullstop and is removed. The resulting country name is "Abcddefg".

Example 4:
Country name is "Abcd.<space>defg".
This country name contains a fullstop and is removed. The resulting country name is "Abcd<space>defg", which is already taken by Example 1.

Example 5:
Country name is "Abcd<space>.<space>defg".
This country name doesn't contain more than 1 space next to each other and passes this check.
This country name is then found to contain a fullstop and is removed.
The resulting country name is "Abcd<space><space>defg", and the country is created, because it is different from the country in Example 1.


What happens in Example 5 is that in ALL browsers, under the HTML webpage specifications, when DISPLAYING text that contains multiple contiguous whitespace, all that whitespace is reduced to a single space. If you were to check the HTML received by the browser, you would see that the country in Example 1 will be "Abcd<space>defg" while the one in Example 5 will be "Abcd<space><space>defg". But both country names are DISPLAYED identically due to how HTML/CSS works.

Specifically, "Sequences of whitespace will collapse into a single whitespace. Text will wrap when necessary. This is default." There are ways to change the default, or change it for a specific piece of text to be displayed, but this has to be specified in HTML/CSS.



Edit: To fix the problem, the code should remove punctuation, then collapse sequences of whitespace into a single whitespace, instead of doing this in the reverse order.

blid

Member
EE Patron
9319

Feb 6th 2014, 17:15:39

qz allowed duplicate names this reset. http://www.earthempires.com/forum/post/534209/perm
Originally posted by Mr. Titanium:
Watch your mouth boy, I have never been accused of cheating on any server nor deleted before you just did right there.

KoHeartsGPA Game profile

Member
EE Patron
30,497

Feb 6th 2014, 17:16:49

Originally posted by blid:
qz allowed duplicate names this reset. http://www.earthempires.com/forum/post/534209/perm


I was just about to post that lol
Mess with me you better kill me, or I'll just take your pride & joy and jack it up
(•_•)

https://youtu.be/...pxFw4?si=mCDXT3t1vmFgn0qn

-=TSO~DKnights~ICD~XI~LaF~SKA=-

S.F. Giants 2010, 2012, 2014 World Series Champions, fluff YEAH!

Xinhuan Game profile

Member
3728

Feb 6th 2014, 17:26:12

Earth: 2025 behavior was very specific, it only allowed country names to be 30 characters long, including the country # number and the () brackets, and the space before the "(" left bracket.

This meant that if you made a country with the name 123456789012345678901234567890 which is 30 characters long, if you got assigned a country that is a 1 digit number, your country name would look like this

1234567890123456789012345 (#1)

Of if it was a 2 digit country number, and likewise 3 digits:
123456789012345678901234 (#11)
12345678901234567890123 (#111)

I don't know if this behavior was copied to EE. Because of the truncation of country names, it was possible to have 2 identical country names in E:2025, even though the original pre-truncated name was not identical.

This meant that to create
133tz (#124)
133tz (#55)

It could be possible that the first country was created with the name "133tz" and the second country was created with the name "133tz<space>.<space>." The second fullstop is necessary because the original country name is first left and right trimmed of whitespace before being checked.


Edit:
....
...
..

Or Blid is right and duplicate names are now allowed, and I shouldn't have bothered to type anything! But "duplicate" country names were already "possible" anyway, though only by using "unorthodox" means.

tellarion Game profile

Member
3906

Feb 6th 2014, 17:28:06

Cause people fluff nonstop about 'cheaters' stealing names in express? LOOK HOW MUCH WE LOVE YOU!

KoHeartsGPA Game profile

Member
EE Patron
30,497

Feb 6th 2014, 17:29:06

He did.allow :-(
Mess with me you better kill me, or I'll just take your pride & joy and jack it up
(•_•)

https://youtu.be/...pxFw4?si=mCDXT3t1vmFgn0qn

-=TSO~DKnights~ICD~XI~LaF~SKA=-

S.F. Giants 2010, 2012, 2014 World Series Champions, fluff YEAH!

Xinhuan Game profile

Member
3728

Feb 6th 2014, 17:29:28

As you can see, I do all sorts of nonsense stuff, and make sure any code I write doesn't break like this on unexpected user input. :P

blid

Member
EE Patron
9319

Feb 6th 2014, 17:31:16

Can you write an extension for eestats that puts up new DR

Bore ain't gonna update for this crazy formula
Originally posted by Mr. Titanium:
Watch your mouth boy, I have never been accused of cheating on any server nor deleted before you just did right there.

Xinhuan Game profile

Member
3728

Feb 6th 2014, 17:35:45

Maybe, but I suspect using Excel would be far faster than actually writing a GreaseMonkey script, or browser extension. Oh and I use Firefox, because it offers Tab Groups, something Chrome doesn't have. Chrome is horrible at tab management.

blid

Member
EE Patron
9319

Feb 6th 2014, 17:48:54

Using Excel how? You mean something that you paste in the country news page and it puts out the DR? I thought about trying something like that but decided not to bother rather than trying to figure out how to "subtract" times + dates. Because really, when you scan down the country list looking for targets, don't you look at DR *first* before you go on to any next step? It really helps most to be able to see all the DRs at once next to the country names and their land/net.
Originally posted by Mr. Titanium:
Watch your mouth boy, I have never been accused of cheating on any server nor deleted before you just did right there.

tellarion Game profile

Member
3906

Feb 6th 2014, 17:55:46

You will never be able to figure out the 'exact' DR unless you know how much the attacker sent.

qzjul Game profile

Administrator
Game Development
10,270

Feb 6th 2014, 18:01:01

Well the plan is/was to jam it in a spyop; maybe I'll hotfix that in, I was busy yesterday
Finally did the signature thing.

KoHeartsGPA Game profile

Member
EE Patron
30,497

Feb 6th 2014, 18:12:11

Originally posted by qzjul:
Well the plan is/was to jam it in a spyop; maybe I'll hotfix that in, I was busy yesterday


Awesome :-)
Mess with me you better kill me, or I'll just take your pride & joy and jack it up
(•_•)

https://youtu.be/...pxFw4?si=mCDXT3t1vmFgn0qn

-=TSO~DKnights~ICD~XI~LaF~SKA=-

S.F. Giants 2010, 2012, 2014 World Series Champions, fluff YEAH!

Xinhuan Game profile

Member
3728

Feb 6th 2014, 18:26:14

I honestly don't think people would spend turns to spy and find out the DR. Especially not a techer.

KoHeartsGPA Game profile

Member
EE Patron
30,497

Feb 6th 2014, 18:30:31

Originally posted by Xinhuan:
I honestly don't think people would spend turns to spy and find out the DR. Especially not a techer.


They can do the math, I'll spy, I'm always on the go, no time for more calculations.
Mess with me you better kill me, or I'll just take your pride & joy and jack it up
(•_•)

https://youtu.be/...pxFw4?si=mCDXT3t1vmFgn0qn

-=TSO~DKnights~ICD~XI~LaF~SKA=-

S.F. Giants 2010, 2012, 2014 World Series Champions, fluff YEAH!

blid

Member
EE Patron
9319

Feb 6th 2014, 18:34:56

Originally posted by tellarion:
You will never be able to figure out the 'exact' DR unless you know how much the attacker sent.
Who cares though. The estimated DR is good enough to start with.

Originally posted by Xinhuan:
I honestly don't think people would spend turns to spy and find out the DR. Especially not a techer.
Yeah, I posted same in my Sug thread in B&S. I won't spy to see that. I'll decide with or without math that I'm going to attack a guy, *then* spy.
Originally posted by Mr. Titanium:
Watch your mouth boy, I have never been accused of cheating on any server nor deleted before you just did right there.

KoHeartsGPA Game profile

Member
EE Patron
30,497

Feb 6th 2014, 18:37:31

Originally posted by blid:
Originally posted by tellarion:
You will never be able to figure out the 'exact' DR unless you know how much the attacker sent.
Who cares though. The estimated DR is good enough to start with.

Originally posted by Xinhuan:
I honestly don't think people would spend turns to spy and find out the DR. Especially not a techer.
Yeah, I posted same in my Sug thread in B&S. I won't spy to see that. I'll decide with or without math that I'm going to attack a guy, *then* spy.


What if you are tired, it's late, make a slight error that leads you to only getting 50 acres?
Mess with me you better kill me, or I'll just take your pride & joy and jack it up
(•_•)

https://youtu.be/...pxFw4?si=mCDXT3t1vmFgn0qn

-=TSO~DKnights~ICD~XI~LaF~SKA=-

S.F. Giants 2010, 2012, 2014 World Series Champions, fluff YEAH!

blid

Member
EE Patron
9319

Feb 6th 2014, 18:39:50

That's not how DR works
Originally posted by Mr. Titanium:
Watch your mouth boy, I have never been accused of cheating on any server nor deleted before you just did right there.