{"__v":7,"_id":"550ce8fd6c0b4c0d00fd42fb","category":{"__v":14,"_id":"54890d71c178b40b00aa3086","project":"543b9b0065bf840e00b473d5","version":"543b9b0065bf840e00b473d8","pages":["548a63d41bd6c40b00f77728","548a6fbab77bb70b00ac8bf2","548adcb7b77bb70b00ac8c9d","548add501bd6c40b00f777d2","548ae445b77bb70b00ac8cad","548aef1bb77bb70b00ac8ccb","548af4b41bd6c40b00f777fc","548eb9d5e52d2b0b001b9a28","5508449ba42e812500b711f3","550a8eed42fff40d00ae60e3","550ce8fd6c0b4c0d00fd42fb","550ce9026c0b4c0d00fd42fd","550d840f11e8d00d00b80383","550e7e7f8387ac0d00ed9e1a"],"reference":false,"createdAt":"2014-12-11T03:20:17.529Z","from_sync":false,"order":5,"slug":"game-settings","title":"Game Settings"},"project":"543b9b0065bf840e00b473d5","user":"543b9aa865bf840e00b473d1","version":{"__v":11,"_id":"543b9b0065bf840e00b473d8","project":"543b9b0065bf840e00b473d5","createdAt":"2014-10-13T09:27:28.467Z","releaseDate":"2014-10-13T09:27:28.467Z","categories":["543b9b0065bf840e00b473d9","543b9ef065bf840e00b473e0","54890012f291f61400c02d36","54890902f291f61400c02d3e","54890c43f291f61400c02d44","54890d71c178b40b00aa3086","5508125c0c4d8c19008a5f83","55094050961f17170070abbd","550945111c38c50d006118ad","550a4c2e42fff40d00ae6049","55221c074801a40d00a77610"],"is_hidden":false,"is_beta":false,"is_stable":false,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"createdAt":"2015-03-21T03:43:57.101Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"auth":"required","params":[],"url":""},"order":5,"body":"[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"Available Only in the Pro and Complete Kit\",\n  \"body\": \"The Starter Kit does not come with the message console. [Learn more about Pro/Complete kits here](https://www.citybuildingkit.com/#pricing)\"\n}\n[/block]\nTo make your game development easier, we've developed an in-game console to display notification messages when testing. This can also be used for user gameplay, but the main intention is to help you build games faster with live debugging notifications during testing. \n\nThis feature is available in both the Pro and Complete Kits, although we've further developed the debugging tool in the Complete Kit.\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"Complete Kit\",\n    \"0-1\": \"Has the most advanced in-game message console with a large array of preconfigured messages.\",\n    \"h-0\": \"Packages\",\n    \"h-1\": \"What's Included\",\n    \"1-0\": \"Pro Kit\",\n    \"1-1\": \"Includes a simple message console with a small array of preconfigured messages.\"\n  },\n  \"cols\": 2,\n  \"rows\": 2\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Frontend Game Example\"\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://www.filepicker.io/api/file/VbW6vUX6SI6XjZxTxm8u\",\n        \"messages-in-game-debugging-console.jpg\",\n        \"800\",\n        \"600\",\n        \"#6fad2b\",\n        \"\"\n      ],\n      \"caption\": \"Notifications triggered when gold generation is no longer possible\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Script Example\"\n}\n[/block]\nWe've added gameplay messages for issues such as exceeding storage capacity, limited resources, and unit build queue maxed out. Development related messages include options such as save notification with debugging information regarding the online server software to track your map's delivery or retrieval status.\n\nHere's an example of the use in the Stats.cs script which controls the player's resource statistics:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://www.filepicker.io/api/file/EAE4zpnOQIW9UePaUW87\",\n        \"displaying-a-message.jpg\",\n        \"800\",\n        \"600\",\n        \"#594427\",\n        \"\"\n      ],\n      \"caption\": \"Console example in Stats.cs\"\n    }\n  ]\n}\n[/block]\nTo add your own notification, simply copy-and-paste this line into your script. You can edit the message however you see fit. Build and test to see your new triggered message.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"((Messenger)statusMsg).DisplayMessage(\\\"Your message here.\\\");\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"For More Information\"\n}\n[/block]\n**Please see the Messenger.cs script included in MenuMain. **\n\nThe Messenger class controls adding notifications, the maximum number of notifications, and removing notifications after a time delay or when the message queue fills up.","excerpt":"A short reference guide to the in-game development debugging tool","slug":"message-console","type":"basic","title":"Message Console"}

Message Console

A short reference guide to the in-game development debugging tool

[block:callout] { "type": "success", "title": "Available Only in the Pro and Complete Kit", "body": "The Starter Kit does not come with the message console. [Learn more about Pro/Complete kits here](https://www.citybuildingkit.com/#pricing)" } [/block] To make your game development easier, we've developed an in-game console to display notification messages when testing. This can also be used for user gameplay, but the main intention is to help you build games faster with live debugging notifications during testing. This feature is available in both the Pro and Complete Kits, although we've further developed the debugging tool in the Complete Kit. [block:parameters] { "data": { "0-0": "Complete Kit", "0-1": "Has the most advanced in-game message console with a large array of preconfigured messages.", "h-0": "Packages", "h-1": "What's Included", "1-0": "Pro Kit", "1-1": "Includes a simple message console with a small array of preconfigured messages." }, "cols": 2, "rows": 2 } [/block] [block:api-header] { "type": "basic", "title": "Frontend Game Example" } [/block] [block:image] { "images": [ { "image": [ "https://www.filepicker.io/api/file/VbW6vUX6SI6XjZxTxm8u", "messages-in-game-debugging-console.jpg", "800", "600", "#6fad2b", "" ], "caption": "Notifications triggered when gold generation is no longer possible" } ] } [/block] [block:api-header] { "type": "basic", "title": "Script Example" } [/block] We've added gameplay messages for issues such as exceeding storage capacity, limited resources, and unit build queue maxed out. Development related messages include options such as save notification with debugging information regarding the online server software to track your map's delivery or retrieval status. Here's an example of the use in the Stats.cs script which controls the player's resource statistics: [block:image] { "images": [ { "image": [ "https://www.filepicker.io/api/file/EAE4zpnOQIW9UePaUW87", "displaying-a-message.jpg", "800", "600", "#594427", "" ], "caption": "Console example in Stats.cs" } ] } [/block] To add your own notification, simply copy-and-paste this line into your script. You can edit the message however you see fit. Build and test to see your new triggered message. [block:code] { "codes": [ { "code": "((Messenger)statusMsg).DisplayMessage(\"Your message here.\");", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "For More Information" } [/block] **Please see the Messenger.cs script included in MenuMain. ** The Messenger class controls adding notifications, the maximum number of notifications, and removing notifications after a time delay or when the message queue fills up.