Chinese President Xi Jinping is honoring President Trump with an unusually lavish reception and one-of-a-kind perks in China this week — the latest example of how leaders around the world are using flattery as a diplomatic tool for influencing the American president.

Weeks after Trump’s election, Japanese Prime Minister Shinzo Abe made his way to Trump Tower to gift the president-elect with a $4,000 gold-plated golf club. When Saudi Arabia hosted Trump in May, they projected a five-story image of his face onto the Ritz-Carlton hotel where he stayed. Polish politicians bused adoring fans into Warsaw this summer to ensure that the president felt just like he was at rally of his supporters at home.

It’s common for world leaders to honor one another with big welcomes and thoughtful gifts, but there is something over the top and, well, Trumpian about many of their gestures toward the president.

As heads of state struggle to predict what the leader of the free world is thinking or likely to do at any given moment, they have settled on massaging his ego as a way to nudge his mood in their favor.

Trump is being treated like a king in Asia

During Trump’s tour of Asia this week, the tactic has grown more obvious than ever. In Japan, Abe presented Trump with white hats that say in embroidered gold thread, “Donald & Shinzo, Make Alliance Even Greater” — an awkward play on Trump’s campaign slogan.

And South Korea graced Trump with a special kind of visitor status that meant he received a welcoming delegation packed with high-level officials and a gala dinner hosted by the South Korean president. That status hasn’t been granted to a US president since George H.W. Bush.

Now China is delivering its own special reception for Trump, calling it a “state visit-plus.” Analysts say that China has been carefully monitoring Japan and South Korea’s receptions in order to adjust the tone of its own festivities.

The honors for Trump began the second he stepped out of Air Force One: The president and first lady were greeted with soldiers standing at attention, children waving Chinese and American flags chanting, “Welcome,” a delegation of Chinese and American officials, and a military band. Observers say it was a more elaborate arrival ceremony than heads of state normally receive.

Trump and Xi then dined in the Forbidden City, Beijing’s ancient imperial palace for Chinese emperors. It’s an honor that a US president hasn’t been granted since the founding of modern China. “[Xi’s] going to treat Trump almost like an emperor," Ming Wan, a China expert at George Mason University, told CNN.

World leaders have gotten really good at making Trump feel important

Foreign leaders are acutely aware that Trump craves praise about himself.

It manifests itself in small — and often amusing — ways in foreign leaders’ comments toward him. At a press conference in the US in February, Abe was keen on telling the world that his golf is “not up to the level of Donald at all.”

And when Israeli Prime Minister Benjamin Netanyahu sought to praise Trump for his dark speech to the United Nations in September, he didn’t just choose to endorse it. He said it was one of the greatest things he’s ever seen:

In over 30 years in my experience with the UN, I never heard a bolder or more courageous speech. — Benjamin Netanyahu (@netanyahu) September 19, 2017

And when Trump is received in foreign countries, the displays of deference have become astounding. The best example may be Saudi Arabia, where Trump was received with a dramatic red-carpet entrance and lavish dinners, and had his face projected onto the hotel he stayed at in Riyadh.

Saudi Royal's, in true royal style, project Trump's face on the Ritz Carlton he was staying inhttps://t.co/sMlbXzSsJy pic.twitter.com/wJcYs0YUw2 — DoubleTap (@DoubleTapDaily) May 23, 2017

Sucking up to Trump can pay off

It can be hard to pin down the exact effects of foreign leaders’ praise of Trump, but there are some indications that it can have a concrete impact on his worldview.

Analysts say that it’s probably not a coincidence that Abe was the first foreign leader to make a visit to Trump after his election victory (and bestow him with a golden golf club) and also the first leader to be invited to the president’s Mar-a-Lago resort. “The simple message was that Abe had become Trump’s first true foreign ally,” foreign policy analyst Michael Auslin wrote in Foreign Affairs regarding Abe’s Mar-a-Lago stay.

French President Emmanuel Macron was able to bridge a Franco-American rift when he made Trump a guest of honor at the Bastille Day parade in Paris marking the 100th anniversary of the US involvement in World War I this summer. As my colleague Sarah Wildman has written, Macron invited Trump to a display of military strength and nostalgia for a golden era of American power as a way to help smooth over the earlier bumps in their relationship.

At the end of his stay in France, Trump seemed to soften slightly on his position on the Paris climate accord — a key priority for Macron and the European community. “Something could happen with respect to the Paris accord; we’ll see what happens,” Trump said during his joint press conference with Macron.

Of course, the opposite is also true. Just as Trump is unusually fond of praise that makes him feel powerful, he’s also particularly riled up by behavior that challenges his power. While previous US administrations have not taken North Korea’s fiery rhetoric extremely seriously or literally, Trump seems inclined to do both. Instead of responding dispassionately to North Korea’s taunts, he has pledged to rain “fire and fury” down on the North. The result: The odds of war between North Korea and the US have skyrocketed.

In other words, Trump’s sensitivity to rhetoric from foreign leaders can matter a lot for how the real world functions.

China, in particular, seems to have a good sense of this.

China is savvy at the optics game with Trump

In order to understand why Xi is making special arrangements to honor Trump and have as much face time as possible during this trip, you have to look back at what happened when Xi first visited Trump at Mar-a-Lago in April.

Xi quickly established a warm rapport with Trump during that summit — Trump spoke later of the “good chemistry” between them and predicted that “lots of very potentially bad problems will be going away.”

But here’s a key detail: Trump admitted that Xi had managed to radically reshape his views on how to rein in North Korea’s nuclear program in a matter of minutes while meeting.

“After listening for 10 minutes, I realized it’s not so easy,” he told the Wall Street Journal in April. “I felt pretty strongly that they had a tremendous power [over] North Korea. ... But it’s not what you would think.”

Let that sink in: Xi was able to singlehandedly convince Trump to move much closer to the Chinese perspective on how to handle Pyongyang’s rogue nuclear program, even though the US and China have sharply differing strategic interests in their approach to the issue.

That’s essential for understanding why the Chinese view this upcoming meeting as such a big opportunity. On questions like fixing the trade imbalance between the US and China and how to pressure North Korea, it would only make sense for Xi to isolate Trump as much as possible and woo him with talk that makes Trump feel important but subtly advances China’s interests.

“The Chinese believe that playing to Trump’s ego effectively will create breathing room on issues where they would otherwise expect to come under pressure,” Andrew Small, a China expert at the German Marshall Fund of the United States, told me.

One way they could play to his ego is to sign deals to buy American goods, like a fleet of Boeing aircraft. It’s the kind of symbolic gesture that would make Trump feel respected and allow him to score a much-needed political win at home. Yet it would do little to solve the big structural problems that plague US-Chinese economic relations, like China’s huge barriers to foreign investment.

Small says that Trump has a capable staff of Asia experts who can beef up Trump’s ability to manage negotiations, but the ease with which the president can be coaxed into believing things is an asset for the Chinese.

The more distracted Trump is, the weaker he’ll be as a leader

We could be witnessing the dawn of a flattery arms race. And while the phenomenon is a reliable source of funny photos, it’s also a troubling development for the US. Foreign leaders are keen on exploiting Trump’s unrelenting hunger for validation and susceptibility to distraction.

As they grew more skilled at sweet-talking the president, they’re also subtly tilting power in their favor during talks where their interests diverge from those of the US. As they cultivate personal chemistry with Trump, they can tug his worldview closer to theirs or convince him they’re making bigger concessions to the US than they are.

“Trump risks mistaking personal flattery for geopolitical realities,” Richard Gowan, an expert on diplomacy at the European Council on Foreign Relations, told me. “Everyone will be nice to the US president — but behind the scenes, they will adjust their political calculations to reflect real-world politics.”