{"__v":34,"_id":"550bfa9022ccb01700a79466","category":{"__v":8,"_id":"543b9ef065bf840e00b473e0","project":"543b9b0065bf840e00b473d5","version":"543b9b0065bf840e00b473d8","pages":["543b9f11b1479b1400c42f58","548a78adb77bb70b00ac8c10","55082e75c79a211900a8de1b","55083e4e31eeba2d00d66a2d","550bfa9022ccb01700a79466","550c312a5fdefb19003d1201","554f015d1bc7d20d00458588","554f03de1bc7d20d0045858c"],"reference":false,"createdAt":"2014-10-13T09:44:16.284Z","from_sync":false,"order":4,"slug":"pvp-battles","title":"PvP Battles"},"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-20T10:46:40.148Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"order":0,"body":"[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"PvP is Only Available in the Pro and Complete Kits\",\n  \"body\": \"- Pro includes a basic PvP demo, without the server software.\\n- Complete includes the server software to host maps, an advanced PvP gameplay experience, high-frame character animations, developer cheats, and an in-game AI and debugging console.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Getting a \\\"Downloaded file corrupted\\\" error message?\"\n}\n[/block]\nIf you haven't added your license code yet, you'll receive this error when attempting to play the PvP component. Please see the license section of the Installation page in the documentation here for instructions.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://www.filepicker.io/api/file/JPRbpsJSK29NSPYns9Qp\",\n        \"license.jpg\",\n        \"800\",\n        \"600\",\n        \"#67ac38\",\n        \"\"\n      ],\n      \"caption\": \"Unlicensed Error, see the License step in the Installation page\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PvP Menus and Battle Screenshots\"\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://www.filepicker.io/api/file/o5CD2ZLwTAScZX5HQYOz\",\n        \"game-features.jpg\",\n        \"800\",\n        \"600\",\n        \"#5f7527\",\n        \"\"\n      ],\n      \"caption\": \"Complete Kit Menus\"\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://www.filepicker.io/api/file/ARTUMt74Q1iDEljroXkH\",\n        \"pick-units.jpg\",\n        \"800\",\n        \"600\",\n        \"#5c869e\",\n        \"\"\n      ],\n      \"caption\": \"Select Units and pick a corner of the map to deploy\"\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://www.filepicker.io/api/file/OPd3b1QVRiqpL3VlOpgK\",\n        \"control-units.jpg\",\n        \"800\",\n        \"600\",\n        \"#6c85a0\",\n        \"\"\n      ],\n      \"caption\": \"Control up to 4 groups\"\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://www.filepicker.io/api/file/y0nc8Zo0QfSc7PN99yvF\",\n        \"game-sync.jpg\",\n        \"800\",\n        \"600\",\n        \"#5e85c1\",\n        \"\"\n      ],\n      \"caption\": \"For info about data transfer, see the Online Game Sync™ section\"\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"caption\": \"Completed battle results show with resources and troops gained\",\n      \"image\": [\n        \"https://www.filepicker.io/api/file/li5e0pavT5SDMvcRvQsW\",\n        \"results.jpg\",\n        \"800\",\n        \"600\",\n        \"#7da23e\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Gameplay Demo\"\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<iframe width=\\\"560\\\" height=\\\"315\\\" src=\\\"https://www.youtube.com/embed/KuMGZxpSasY?rel=0&amp;showinfo=0\\\" frameborder=\\\"0\\\" allowfullscreen></iframe>\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Deploying Units\"\n}\n[/block]\nTo deploy a group of units in PvP:\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"1. First open the **Unit** panel and select which units you want to deploy\",\n    \"1-0\": \"2. Then click a block on the edge of the map. The grid point will become highlighted with a glow.\",\n    \"2-0\": \"3.  Then press **Deploy** to deploy the group.\"\n  },\n  \"cols\": 1,\n  \"rows\": 3\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://www.filepicker.io/api/file/tfoFP58PTOmEYwK3Lmwp\",\n        \"deployment-areas.jpg\",\n        \"800\",\n        \"600\",\n        \"#76b133\",\n        \"\"\n      ],\n      \"caption\": \"Tap any corner square to highlight and then deploy units.\"\n    }\n  ]\n}\n[/block]\nRecordSpawnPoint is a function called when you click the margin of the battle map, and a star appears there to spawn a soldier when you hit deploy. You can see the pad in the Map01 scene Hierarchy, under UIAnchor > Anchor - Center > UnitsBattle > DeployPad. There are four pads, one for each corner: NE (northeast), SE (southeast), SW (southwest), NW (northwest)\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://www.filepicker.io/api/file/LeUgzomLSjK0xHVkGnQX\",\n        \"deploy_pad.jpg\",\n        \"1344\",\n        \"761\",\n        \"#2961b2\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Unit Group Controls\"\n}\n[/block]\nBy default, the characters attack automatically like popular mobile strategy games such as Game of War, Boom Beach or Clash of Clans.\n\nBut a unique feature we've introduced into the Pro and Complete Kits is group controls. You can deploy the units in 4 waves, then control each group separately. \n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"Auto\",\n    \"0-1\": \"Click on a building - the closest group attacks it.\",\n    \"1-0\": \"Manual\",\n    \"1-1\": \"You choose one group, make them attack a building. After a building is destroyed, the group automatically selects a nearby building.\",\n    \"h-0\": \"Method\",\n    \"h-1\": \"Description\"\n  },\n  \"cols\": 2,\n  \"rows\": 2\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"caption\": \"Control up to four groups\",\n      \"image\": [\n        \"https://www.filepicker.io/api/file/jZtU4YETSIKHOW2yfGSq\",\n        \"unity-control.jpg\",\n        \"800\",\n        \"600\",\n        \"#73a34c\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"What type of pathfinding is used?\"\n}\n[/block]\nThe City Building Kit uses the A* pathfinder and can handle as many units as you put inside.\n[block:image]\n{\n  \"images\": [\n    {\n      \"caption\": \"Pathfinding\",\n      \"image\": [\n        \"https://www.filepicker.io/api/file/bGkUijwpSIaSWpImsrip\",\n        \"pathfinding-demo.jpg\",\n        \"800\",\n        \"600\",\n        \"#70ac33\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://www.filepicker.io/api/file/x2msKpHRR3KibDrNArDK\",\n        \"lots-of-units.jpg\",\n        \"800\",\n        \"600\",\n        \"#67a32e\",\n        \"\"\n      ],\n      \"caption\": \"Example with 100+ units\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Characters only attack buildings, how would you set it to attack other units?\"\n}\n[/block]\nIn order to have characters attacking other characters you need to modify the Helios AI (Helios.cs), possibly the characters themselves to be able to launch projectiles (this may or may not be necessary since Helios centralizes/fakes some operations, like launching the star-like projectiles towards buildings, which does not create collision based damage - only the fact that the units are attacking a certain building and they have reached their destination - already in attack mode, is used to calculate damage). The basic information is already in the kit to create proper turrets and shooting characters - as you will become familiar with it, these tasks will become if not trivial, very easy to put into practice. Hopefully we will be able to do this for you - build some examples for each over time as we expand the kit.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Development Controls and Cheats\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"success\",\n  \"body\": \"Advanced features like development admin controls, camera effects, and improved PvP dynamics are only available in the Complete Kit. \\n\\nGet the [Complete Kit](https://www.citybuildingkit.com/#pricing) or if you've already purchased, check your purchase download instructions email for upgrade information.\",\n  \"title\": \"Only Available in the Complete Kit\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"All Units Stop\",\n    \"1-0\": \"All Units Immortal\",\n    \"2-0\": \"Selected Immortal\",\n    \"3-0\": \"Selected Mortal\",\n    \"4-0\": \"All Buildings Indestructable\",\n    \"5-0\": \"Selected Indestructable\",\n    \"6-0\": \"Selected Destructable\",\n    \"0-1\": \"Stops all movement and fighting. Replaced by All Units Start to enable movement.\",\n    \"1-1\": \"Increases the HP bar for every unit to 100% permanently.\",\n    \"2-1\": \"Makes the selected group (1-4) immortal. Perfect for testing entire map playthroughs without worrying about running out of units.\",\n    \"3-1\": \"Reverses immortality.\",\n    \"4-1\": \"Immortality for buildings, 100% HP bars.\",\n    \"5-1\": \"Makes the selected building you've last clicked immortal.\",\n    \"6-1\": \"Makes the selected building you last clicked normal again.\"\n  },\n  \"cols\": 2,\n  \"rows\": 7\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://www.filepicker.io/api/file/4S76QSM4TGeYO1zuIEYg\",\n        \"template.jpg\",\n        \"800\",\n        \"600\",\n        \"#c8775f\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"TransData 1000 Units Hack\"\n}\n[/block]\nSave time and avoid going through all the steps of training units before launching a battle with this extremely useful hack to automatically start with 1000 units.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://www.filepicker.io/api/file/FvRaqGkyTLKdCjvmZxSa\",\n        \"1000units.jpg\",\n        \"800\",\n        \"600\",\n        \"#bd8e46\",\n        \"\"\n      ],\n      \"caption\": \"Demo of 1000 units for testing\"\n    }\n  ]\n}\n[/block]\nFor the 1000 unit hack, open the Map01 directly, activate the TransData object and launch the game. Assuming server connectivity is fine, it will download a random map and you can play. \n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://www.filepicker.io/api/file/AUh8uTwQTeB3suWznVgz\",\n        \"4bMhO5OK4Ftf_doIQc-h6px4mS5SXAzXSJK9rbdvMlo.png\",\n        \"1024\",\n        \"562\",\n        \"#72ae34\",\n        \"\"\n      ],\n      \"caption\": \"Trans Data object\"\n    }\n  ]\n}\n[/block]\nThe object holds all battle-related variables - number of units, buildings gold and mana based (for looting), sound options, etc. TransData is a duplicate of an indestructible object you bring from HomeTown with you, to pass variables back and forth between your level and the random battle map. Once the battle is finished, you don't go back to home town - just close the Unity Editor player.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Chimera In-Game Debug Console\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"success\",\n  \"body\": \"Advanced features like development admin controls, camera effects, and improved PvP dynamics are only available in the Complete Kit. \\n\\nGet the [Complete Kit](https://www.citybuildingkit.com/#pricing) or if you've already purchased, check your purchase download instructions email for upgrade information.\",\n  \"title\": \"Only Available in the Complete Kit\"\n}\n[/block]\nChimera is a special feature for Complete Kit purchasers that can be used as an in-game guide for players and also as a live debugger console when playing.\n[block:html]\n{\n  \"html\": \"\"\n}\n[/block]\nIn the Helios.cs script, you'll find every debugging message included with the demo game. You can add your own by using **Talk(\"Your text here.\");** to create additional notifications for debugging or gameplay. \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"// Helios.cs Demo Script\\n// Example Chimera Debug Messages\\n\\nif (((Relay)relay).deploying) // Deploying first troop set\\n{\\n\\tTalk (\\\"Deploying Squad 1.\\\"); \\n}\\nelse\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// If a troop set is already deployed\\n\\tTalk (\\\"Chimera to Squad 1.\\\");\\n\\nif(battleOver)\\t\\t\\t\\t\\t\\t\\t// Otherwise, if game over\\n\\tTalk (\\\"Return to base.\\\");\\t\\t\\n\\nif(GroupO.Count<1)\\t\\t\\t\\t\\t// If all troops in a group die.\\n{\\n\\tTalk (\\\"Sorry, sir. Squad 1 has been lost. Disabling controls.\\\");\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://www.filepicker.io/api/file/REXR2AhCRbKvqtCNnOhQ\",\n        \"chimera-in-game-consult.jpg\",\n        \"800\",\n        \"600\",\n        \"#7db114\",\n        \"\"\n      ],\n      \"caption\": \"Chimera debug message example\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"What about battling other characters?\"\n}\n[/block]\nFor batting other characters instead of buildings, that would require some changes to the code -- you would first need to alter the Helios.cs battle processor to target other units, instead of just structures. First, understand how Helios.cs works, because once you understand how buildings are attacked, you can attack anything.\n\nMy advice to anyone using the kit - start inserting your own assets and the existing code targeting buildings, putting everything together, and this will give you time to gradually understand the entire system. Usually requests that change the core gameplay are at least a few weeks work and not exactly something we can document in enough detail other than a brief suggestion of starting with the Helios.cs file and understanding how buildings are targeted in it.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"What about anti-hacking?\"\n}\n[/block]\nYou'll want to encrypt the data between the application and the server. For a simple proof-of-concept example, see [http://forum.unity3d.com/threads/encryption-in-unity-programs.114688/](http://forum.unity3d.com/threads/encryption-in-unity-programs.114688/","excerpt":"Development instructions for how to control battles","slug":"pvp-summary","type":"basic","title":"PvP Summary"}

PvP Summary

Development instructions for how to control battles

[block:callout] { "type": "success", "title": "PvP is Only Available in the Pro and Complete Kits", "body": "- Pro includes a basic PvP demo, without the server software.\n- Complete includes the server software to host maps, an advanced PvP gameplay experience, high-frame character animations, developer cheats, and an in-game AI and debugging console." } [/block] [block:api-header] { "type": "basic", "title": "Getting a \"Downloaded file corrupted\" error message?" } [/block] If you haven't added your license code yet, you'll receive this error when attempting to play the PvP component. Please see the license section of the Installation page in the documentation here for instructions. [block:image] { "images": [ { "image": [ "https://www.filepicker.io/api/file/JPRbpsJSK29NSPYns9Qp", "license.jpg", "800", "600", "#67ac38", "" ], "caption": "Unlicensed Error, see the License step in the Installation page" } ] } [/block] [block:api-header] { "type": "basic", "title": "PvP Menus and Battle Screenshots" } [/block] [block:image] { "images": [ { "image": [ "https://www.filepicker.io/api/file/o5CD2ZLwTAScZX5HQYOz", "game-features.jpg", "800", "600", "#5f7527", "" ], "caption": "Complete Kit Menus" } ] } [/block] [block:image] { "images": [ { "image": [ "https://www.filepicker.io/api/file/ARTUMt74Q1iDEljroXkH", "pick-units.jpg", "800", "600", "#5c869e", "" ], "caption": "Select Units and pick a corner of the map to deploy" } ] } [/block] [block:image] { "images": [ { "image": [ "https://www.filepicker.io/api/file/OPd3b1QVRiqpL3VlOpgK", "control-units.jpg", "800", "600", "#6c85a0", "" ], "caption": "Control up to 4 groups" } ] } [/block] [block:image] { "images": [ { "image": [ "https://www.filepicker.io/api/file/y0nc8Zo0QfSc7PN99yvF", "game-sync.jpg", "800", "600", "#5e85c1", "" ], "caption": "For info about data transfer, see the Online Game Sync™ section" } ] } [/block] [block:image] { "images": [ { "caption": "Completed battle results show with resources and troops gained", "image": [ "https://www.filepicker.io/api/file/li5e0pavT5SDMvcRvQsW", "results.jpg", "800", "600", "#7da23e", "" ] } ] } [/block] [block:api-header] { "type": "basic", "title": "Gameplay Demo" } [/block] [block:html] { "html": "<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/KuMGZxpSasY?rel=0&amp;showinfo=0\" frameborder=\"0\" allowfullscreen></iframe>" } [/block] [block:api-header] { "type": "basic", "title": "Deploying Units" } [/block] To deploy a group of units in PvP: [block:parameters] { "data": { "0-0": "1. First open the **Unit** panel and select which units you want to deploy", "1-0": "2. Then click a block on the edge of the map. The grid point will become highlighted with a glow.", "2-0": "3. Then press **Deploy** to deploy the group." }, "cols": 1, "rows": 3 } [/block] [block:image] { "images": [ { "image": [ "https://www.filepicker.io/api/file/tfoFP58PTOmEYwK3Lmwp", "deployment-areas.jpg", "800", "600", "#76b133", "" ], "caption": "Tap any corner square to highlight and then deploy units." } ] } [/block] RecordSpawnPoint is a function called when you click the margin of the battle map, and a star appears there to spawn a soldier when you hit deploy. You can see the pad in the Map01 scene Hierarchy, under UIAnchor > Anchor - Center > UnitsBattle > DeployPad. There are four pads, one for each corner: NE (northeast), SE (southeast), SW (southwest), NW (northwest) [block:image] { "images": [ { "image": [ "https://www.filepicker.io/api/file/LeUgzomLSjK0xHVkGnQX", "deploy_pad.jpg", "1344", "761", "#2961b2", "" ] } ] } [/block] [block:api-header] { "type": "basic", "title": "Unit Group Controls" } [/block] By default, the characters attack automatically like popular mobile strategy games such as Game of War, Boom Beach or Clash of Clans. But a unique feature we've introduced into the Pro and Complete Kits is group controls. You can deploy the units in 4 waves, then control each group separately. [block:parameters] { "data": { "0-0": "Auto", "0-1": "Click on a building - the closest group attacks it.", "1-0": "Manual", "1-1": "You choose one group, make them attack a building. After a building is destroyed, the group automatically selects a nearby building.", "h-0": "Method", "h-1": "Description" }, "cols": 2, "rows": 2 } [/block] [block:image] { "images": [ { "caption": "Control up to four groups", "image": [ "https://www.filepicker.io/api/file/jZtU4YETSIKHOW2yfGSq", "unity-control.jpg", "800", "600", "#73a34c", "" ] } ] } [/block] [block:api-header] { "type": "basic", "title": "What type of pathfinding is used?" } [/block] The City Building Kit uses the A* pathfinder and can handle as many units as you put inside. [block:image] { "images": [ { "caption": "Pathfinding", "image": [ "https://www.filepicker.io/api/file/bGkUijwpSIaSWpImsrip", "pathfinding-demo.jpg", "800", "600", "#70ac33", "" ] } ] } [/block] [block:image] { "images": [ { "image": [ "https://www.filepicker.io/api/file/x2msKpHRR3KibDrNArDK", "lots-of-units.jpg", "800", "600", "#67a32e", "" ], "caption": "Example with 100+ units" } ] } [/block] [block:api-header] { "type": "basic", "title": "Characters only attack buildings, how would you set it to attack other units?" } [/block] In order to have characters attacking other characters you need to modify the Helios AI (Helios.cs), possibly the characters themselves to be able to launch projectiles (this may or may not be necessary since Helios centralizes/fakes some operations, like launching the star-like projectiles towards buildings, which does not create collision based damage - only the fact that the units are attacking a certain building and they have reached their destination - already in attack mode, is used to calculate damage). The basic information is already in the kit to create proper turrets and shooting characters - as you will become familiar with it, these tasks will become if not trivial, very easy to put into practice. Hopefully we will be able to do this for you - build some examples for each over time as we expand the kit. [block:api-header] { "type": "basic", "title": "Development Controls and Cheats" } [/block] [block:callout] { "type": "success", "body": "Advanced features like development admin controls, camera effects, and improved PvP dynamics are only available in the Complete Kit. \n\nGet the [Complete Kit](https://www.citybuildingkit.com/#pricing) or if you've already purchased, check your purchase download instructions email for upgrade information.", "title": "Only Available in the Complete Kit" } [/block] [block:parameters] { "data": { "0-0": "All Units Stop", "1-0": "All Units Immortal", "2-0": "Selected Immortal", "3-0": "Selected Mortal", "4-0": "All Buildings Indestructable", "5-0": "Selected Indestructable", "6-0": "Selected Destructable", "0-1": "Stops all movement and fighting. Replaced by All Units Start to enable movement.", "1-1": "Increases the HP bar for every unit to 100% permanently.", "2-1": "Makes the selected group (1-4) immortal. Perfect for testing entire map playthroughs without worrying about running out of units.", "3-1": "Reverses immortality.", "4-1": "Immortality for buildings, 100% HP bars.", "5-1": "Makes the selected building you've last clicked immortal.", "6-1": "Makes the selected building you last clicked normal again." }, "cols": 2, "rows": 7 } [/block] [block:image] { "images": [ { "image": [ "https://www.filepicker.io/api/file/4S76QSM4TGeYO1zuIEYg", "template.jpg", "800", "600", "#c8775f", "" ] } ] } [/block] [block:api-header] { "type": "basic", "title": "TransData 1000 Units Hack" } [/block] Save time and avoid going through all the steps of training units before launching a battle with this extremely useful hack to automatically start with 1000 units. [block:image] { "images": [ { "image": [ "https://www.filepicker.io/api/file/FvRaqGkyTLKdCjvmZxSa", "1000units.jpg", "800", "600", "#bd8e46", "" ], "caption": "Demo of 1000 units for testing" } ] } [/block] For the 1000 unit hack, open the Map01 directly, activate the TransData object and launch the game. Assuming server connectivity is fine, it will download a random map and you can play. [block:image] { "images": [ { "image": [ "https://www.filepicker.io/api/file/AUh8uTwQTeB3suWznVgz", "4bMhO5OK4Ftf_doIQc-h6px4mS5SXAzXSJK9rbdvMlo.png", "1024", "562", "#72ae34", "" ], "caption": "Trans Data object" } ] } [/block] The object holds all battle-related variables - number of units, buildings gold and mana based (for looting), sound options, etc. TransData is a duplicate of an indestructible object you bring from HomeTown with you, to pass variables back and forth between your level and the random battle map. Once the battle is finished, you don't go back to home town - just close the Unity Editor player. [block:api-header] { "type": "basic", "title": "Chimera In-Game Debug Console" } [/block] [block:callout] { "type": "success", "body": "Advanced features like development admin controls, camera effects, and improved PvP dynamics are only available in the Complete Kit. \n\nGet the [Complete Kit](https://www.citybuildingkit.com/#pricing) or if you've already purchased, check your purchase download instructions email for upgrade information.", "title": "Only Available in the Complete Kit" } [/block] Chimera is a special feature for Complete Kit purchasers that can be used as an in-game guide for players and also as a live debugger console when playing. [block:html] { } [/block] In the Helios.cs script, you'll find every debugging message included with the demo game. You can add your own by using **Talk("Your text here.");** to create additional notifications for debugging or gameplay. [block:code] { "codes": [ { "code": "// Helios.cs Demo Script\n// Example Chimera Debug Messages\n\nif (((Relay)relay).deploying) // Deploying first troop set\n{\n\tTalk (\"Deploying Squad 1.\"); \n}\nelse\t\t\t\t\t\t\t\t\t\t\t\t// If a troop set is already deployed\n\tTalk (\"Chimera to Squad 1.\");\n\nif(battleOver)\t\t\t\t\t\t\t// Otherwise, if game over\n\tTalk (\"Return to base.\");\t\t\n\nif(GroupO.Count<1)\t\t\t\t\t// If all troops in a group die.\n{\n\tTalk (\"Sorry, sir. Squad 1 has been lost. Disabling controls.\");\n}", "language": "csharp" } ] } [/block] [block:image] { "images": [ { "image": [ "https://www.filepicker.io/api/file/REXR2AhCRbKvqtCNnOhQ", "chimera-in-game-consult.jpg", "800", "600", "#7db114", "" ], "caption": "Chimera debug message example" } ] } [/block] [block:api-header] { "type": "basic", "title": "What about battling other characters?" } [/block] For batting other characters instead of buildings, that would require some changes to the code -- you would first need to alter the Helios.cs battle processor to target other units, instead of just structures. First, understand how Helios.cs works, because once you understand how buildings are attacked, you can attack anything. My advice to anyone using the kit - start inserting your own assets and the existing code targeting buildings, putting everything together, and this will give you time to gradually understand the entire system. Usually requests that change the core gameplay are at least a few weeks work and not exactly something we can document in enough detail other than a brief suggestion of starting with the Helios.cs file and understanding how buildings are targeted in it. [block:api-header] { "type": "basic", "title": "What about anti-hacking?" } [/block] You'll want to encrypt the data between the application and the server. For a simple proof-of-concept example, see [http://forum.unity3d.com/threads/encryption-in-unity-programs.114688/](http://forum.unity3d.com/threads/encryption-in-unity-programs.114688/