じ☆ve冰风 发表于 4 天前

Ads (Admob) in RPG Maker MV

All credits to waffs702 + his tutorial (https://github.com/waffs702/mv_to_android/wiki/インタースティシャル広告)

Hi everyone, I wanted to share a way that you can add admob to your games.

First of all, download the Android Studio project to turn your RPGMV project into an android application.



GitHub - waffs702/mv_to_android: RPGツクールMV/ツクールMZプロジェクトをAndroidアプリ化

RPGツクールMV/ツクールMZプロジェクトをAndroidアプリ化. Contribute to waffs702/mv_to_android development by creating an account on GitHub.

                                        github.com                               




In this case I will use an example with an interstitial ad.

Go to the following link and download the following plugins:


waffs702/mvz_plugins

Contribute to waffs702/mvz_plugins development by creating an account on GitHub.

                                        github.com                               




-MZxNativeCore.js
-MVxNativeInterstitialAd.js

Install the plugins.





Go to the common events of your project.





You can optionally add two messages to check if the ads work if simply creating the common events without instructions is not enough.





Create an event and add the following statement: MVxNativeInterstitialAd X Y, X = Common event for success and Y = Common event for failure.





Deploy your project.





Go to the mv_to_android-master folder, open app folder and create a folder called htmlSource.





Move the files from your game's www folder to the htmlSource folder.





Open mv_to_android-master in Android Studio.





Use the view in "project" and go to app\src\main\res\values\strings.xml








Inside string.xml you will find:

The name of your game: <string name="app_name">game name</string>
The id of your application in admob: <string name="ad_application_id">id app</string>
The id of your ads:
<string name="ad_rewarded_unit_id">id rewarded ad</string>
<string name="ad_interstitial_id">id insterstitial ad</string>






You can try test ads in https://developers.google.com/admob/android/test-ads#sample_ad_units or head over to admob and test your own ads.








>Build apk

If you do not see any ads wait at least half an hour, they usually do not appear instantly.
That would be all.

https://forums.rpgmakerweb.com/attachments/1618605576033-png.186370/



https://forums.rpgmakerweb.com/attachments/1618605604179-png.186372/



本贴来自国际rpgmaker官方论坛作者:DoeXav处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/ads-admob-in-rpg-maker-mv.135551/
页: [1]
查看完整版本: Ads (Admob) in RPG Maker MV