PostOutdatedPlanetbase Hack (v1.0.2 stable)

Posts 1630 of 45 · Page 2 of 3
When I compile my new code I get "Planetbase.xxxxxxxxx does not contain a defenition for xxxxx even though the upper part of the code has "namespace Planetbase". What did you do mate?
The code below are the modifications I made to the original dll.
I cba to post a step by step instruction.
Programmers should be able to follow this.

Tools used: ILSpy + Reflexil plugin

Inside the class Planetbase.GuiMenuSystem add the following
Code:
		private GuiMenu mMenuThoramisuEvents;

		private GuiMenu mMenuThoramisuResources;

		private GuiMenu mMenuThoramisuWorkers;

		private void onButtonThoramiResources(object parameter)
		{
			this.mCurrentMenu = this.mMenuThoramisuResources;
		}

		private void onButtonThoramiWorkers(object parameter)
		{
			this.mCurrentMenu = this.mMenuThoramisuWorkers;
		}

		private void onButtonThoramiEvents(object parameter)
		{
			this.mCurrentMenu = this.mMenuThoramisuEvents;
		}

		public void onSpawnThoramisu(object parameter)
		{
			string text = (string)parameter;
			CommandRunner instance = CommandRunner.getInstance();
			string text2;
			if (text == "unlock tech")
			{
				instance.run("unlock TechColossalPanel", out text2);
				instance.run("unlock TechConstructorBot", out text2);
				instance.run("unlock TechDrillerBot", out text2);
				instance.run("unlock TechFarmDome", out text2);
				instance.run("unlock TechGmOnions", out text2);
				instance.run("unlock TechGmTomatoes", out text2);
				instance.run("unlock TechGoliathTurbine", out text2);
				instance.run("unlock TechMassiveStorage", out text2);
				return;
			}
			instance.run(text, out text2);
		}
Inside the same class Planetbase.GuiMenuSystem modify the init function
Code:
public void init(GameStateGame gameStateGame)
{
	this.mMenus.Clear();
	this.mGameStateGame = gameStateGame;
	ResourceList instance = ResourceList.getInstance();
	this.mMenuMain = this.addMenu(string.Empty, 2147483647, 0);
	this.mItemBuild = new GuiMenuItem(instance.Icons.Build, StringList.get("build"), new GuiDefinitions.Callback(this.onButtonBuild), 1);
	this.mMenuMain.addItem(this.mItemBuild);
	this.mMenuMain.addItem(new GuiMenuItem(instance.Icons.BaseManagement, StringList.get("menu_base_management"), new GuiDefinitions.Callback(this.onButtonBaseManagement), 1));
	this.mItemSpeed = new GuiMenuItem(instance.Icons.Speed, StringList.get("menu_speed"), new GuiDefinitions.Callback(this.onButtonSpeed), 1);
	this.mMenuMain.addItem(this.mItemSpeed);
	this.mItemRenderTops = new GuiMenuItem(instance.Icons.RenderTopsOn, StringList.get("tooltip_render_tops"), UnityEngine.KeyCode.Tab, new GuiDefinitions.Callback(this.onButtonRenderTops), null, 0);
	this.mMenuMain.addItem(this.mItemRenderTops);
	this.mItemQuicksave = new GuiMenuItem(instance.Icons.Quicksave, StringList.get("quicksave"), UnityEngine.KeyCode.F9, new GuiDefinitions.Callback(this.mGameStateGame.onQuickSave), null, 0);
	this.mItemQuicksave.setEnabled(!this.mGameStateGame.inTutorial());
	this.mMenuMain.addItem(this.mItemQuicksave);
	this.mItemGameMenu = new GuiMenuItem(instance.Icons.Menu, StringList.get("game_menu"), UnityEngine.KeyCode.F10, new GuiDefinitions.Callback(this.mGameStateGame.onGameMenu), null, 0);
	this.mMenuMain.addItem(this.mItemGameMenu);
	this.mItemHelp = new GuiMenuItem(instance.Icons.Help, StringList.get("help"), UnityEngine.KeyCode.F1, new GuiDefinitions.Callback(this.mGameStateGame.onHelp), null, 2);
	this.mMenuMain.addItem(this.mItemHelp);

	//My changes begin here

	this.mMenuMain.addItem(new GuiMenuItem(instance.Icons.Debug, "Thorami Resources", UnityEngine.KeyCode.Keypad0, new GuiDefinitions.Callback(this.onButtonThoramiResources), null, 1));
	this.mMenuThoramisuResources = this.addMenu("Thorami Resources", 5, 0);
	this.mMenuThoramisuResources.addItem(new GuiMenuItem(instance.Icons.PriorityUp, "Drop BioPlastic", UnityEngine.KeyCode.Keypad1, new GuiDefinitions.Callback(this.onSpawnThoramisu), "spawn BioPlastic", 2));
	this.mMenuThoramisuResources.addItem(new GuiMenuItem(instance.Icons.PriorityUp, "Drop Gun", UnityEngine.KeyCode.Keypad2, new GuiDefinitions.Callback(this.onSpawnThoramisu), "spawn Gun", 2));
	this.mMenuThoramisuResources.addItem(new GuiMenuItem(instance.Icons.PriorityUp, "Drop Meal", UnityEngine.KeyCode.Keypad3, new GuiDefinitions.Callback(this.onSpawnThoramisu), "spawn Meal", 2));
	this.mMenuThoramisuResources.addItem(new GuiMenuItem(instance.Icons.PriorityUp, "Drop MedicalSupplies", UnityEngine.KeyCode.Keypad4, new GuiDefinitions.Callback(this.onSpawnThoramisu), "spawn MedicalSupplies", 2));
	this.mMenuThoramisuResources.addItem(new GuiMenuItem(instance.Icons.PriorityUp, "Drop Metal", UnityEngine.KeyCode.Keypad5, new GuiDefinitions.Callback(this.onSpawnThoramisu), "spawn Metal", 2));
	this.mMenuThoramisuResources.addItem(new GuiMenuItem(instance.Icons.PriorityUp, "Drop Semiconductors", UnityEngine.KeyCode.Keypad6, new GuiDefinitions.Callback(this.onSpawnThoramisu), "spawn Semiconductors", 2));
	this.mMenuThoramisuResources.addItem(new GuiMenuItem(instance.Icons.PriorityUp, "Drop Spares", UnityEngine.KeyCode.Keypad7, new GuiDefinitions.Callback(this.onSpawnThoramisu), "spawn Spares", 2));
	this.mMenuThoramisuResources.addBackItem(new GuiDefinitions.Callback(this.onButtonMainMenu));
	this.mMenuMain.addItem(new GuiMenuItem(instance.Icons.Debug, "Thorami Workers", UnityEngine.KeyCode.None, new GuiDefinitions.Callback(this.onButtonThoramiWorkers), null, 1));
	this.mMenuThoramisuWorkers = this.addMenu("Thorami Workers", 5, 0);
	this.mMenuThoramisuWorkers.addItem(new GuiMenuItem(instance.Icons.Bot, "Spawn Carrier Bot", UnityEngine.KeyCode.None, new GuiDefinitions.Callback(this.onSpawnThoramisu), "spawn Carrier", 2));
	this.mMenuThoramisuWorkers.addItem(new GuiMenuItem(instance.Icons.Bot, "Spawn Constructor Bot", UnityEngine.KeyCode.None, new GuiDefinitions.Callback(this.onSpawnThoramisu), "spawn Constructor", 2));
	this.mMenuThoramisuWorkers.addItem(new GuiMenuItem(instance.Icons.Bot, "Spawn Driller Bot", UnityEngine.KeyCode.None, new GuiDefinitions.Callback(this.onSpawnThoramisu), "spawn Driller", 2));
	this.mMenuThoramisuWorkers.addItem(new GuiMenuItem(instance.Icons.Bot, "Spawn Biologist", UnityEngine.KeyCode.None, new GuiDefinitions.Callback(this.onSpawnThoramisu), "spawn Biologist", 2));
	this.mMenuThoramisuWorkers.addItem(new GuiMenuItem(instance.Icons.Bot, "Spawn Engineer", UnityEngine.KeyCode.None, new GuiDefinitions.Callback(this.onSpawnThoramisu), "spawn Engineer", 2));
	this.mMenuThoramisuWorkers.addItem(new GuiMenuItem(instance.Icons.Bot, "Spawn Guard", UnityEngine.KeyCode.None, new GuiDefinitions.Callback(this.onSpawnThoramisu), "spawn Guard", 2));
	this.mMenuThoramisuWorkers.addItem(new GuiMenuItem(instance.Icons.Bot, "Spawn Medic", UnityEngine.KeyCode.None, new GuiDefinitions.Callback(this.onSpawnThoramisu), "spawn Medic", 2));
	this.mMenuThoramisuWorkers.addItem(new GuiMenuItem(instance.Icons.Bot, "Spawn Worker", UnityEngine.KeyCode.None, new GuiDefinitions.Callback(this.onSpawnThoramisu), "spawn Worker", 2));
	this.mMenuThoramisuWorkers.addBackItem(new GuiDefinitions.Callback(this.onButtonMainMenu));
	this.mMenuMain.addItem(new GuiMenuItem(instance.Icons.Debug, "Thorami Events", UnityEngine.KeyCode.None, new GuiDefinitions.Callback(this.onButtonThoramiEvents), null, 1));
	this.mMenuThoramisuEvents = this.addMenu("Thorami Events", 5, 0);
	this.mMenuThoramisuEvents.addItem(new GuiMenuItem(instance.Icons.DeadEnd, "Create Sandstorm", UnityEngine.KeyCode.None, new GuiDefinitions.Callback(this.onSpawnThoramisu), "trigger sandstorm", 2));
	this.mMenuThoramisuEvents.addItem(new GuiMenuItem(instance.Icons.DeadEnd, "Create Solarflare", UnityEngine.KeyCode.None, new GuiDefinitions.Callback(this.onSpawnThoramisu), "trigger solarflare", 2));
	this.mMenuThoramisuEvents.addItem(new GuiMenuItem(instance.Icons.DeadEnd, "Create Meteor", UnityEngine.KeyCode.None, new GuiDefinitions.Callback(this.onSpawnThoramisu), "trigger meteorhere", 2));
	this.mMenuThoramisuEvents.addItem(new GuiMenuItem(instance.Icons.DeadEnd, "Create Meteor Shower", UnityEngine.KeyCode.None, new GuiDefinitions.Callback(this.onSpawnThoramisu), "trigger meteorshower", 2));
	this.mMenuThoramisuEvents.addItem(new GuiMenuItem(instance.Icons.Enable, "Unlock All Tech", UnityEngine.KeyCode.None, new GuiDefinitions.Callback(this.onSpawnThoramisu), "unlock tech", 2));
	this.mMenuThoramisuEvents.addItem(new GuiMenuItem(instance.Icons.Enable, "Unlock Milestones", UnityEngine.KeyCode.None, new GuiDefinitions.Callback(this.onSpawnThoramisu), "unlock allMilestones", 2));
	this.mMenuThoramisuEvents.addBackItem(new GuiDefinitions.Callback(this.onButtonMainMenu));

	//My changes end here

	this.mMenuBaseManagement = this.addMenu(StringList.get("menu_base_management"), 5, 0);
	this.mMenuBaseManagement.addItem(new GuiMenuItem(instance.Icons.Stats, StringList.get("stats"), UnityEngine.KeyCode.F2, new GuiDefinitions.Callback(this.mGameStateGame.toggleWindow<GuiStatsWindow>), null, 2));
	this.mMenuBaseManagement.addItem(new GuiMenuItem(instance.Icons.Charts, StringList.get("charts"), UnityEngine.KeyCode.F3, new GuiDefinitions.Callback(this.mGameStateGame.toggleWindow<GuiChartsWindow>), null, 2));
	this.mMenuBaseManagement.addItem(new GuiMenuItem(instance.Icons.Grids, StringList.get("grid"), UnityEngine.KeyCode.F4, new GuiDefinitions.Callback(this.mGameStateGame.toggleWindow<GuiGridWindow>), null, 2));
	GuiMenuItem guiMenuItem = new GuiMenuItem(instance.Icons.LandingPermissions, StringList.get("landing_permissions"), UnityEngine.KeyCode.F5, new GuiDefinitions.Callback(this.mGameStateGame.toggleWindow<GuiLandingPermissions>), null, 2);
	guiMenuItem.setRequiredModuleType(TypeList<ModuleType, ModuleTypeList>.find<ModuleTypeLandingPad>());
	this.mMenuBaseManagement.addItem(guiMenuItem);
	GuiMenuItem guiMenuItem2 = new GuiMenuItem(instance.Icons.Security, StringList.get("security_controls"), UnityEngine.KeyCode.F6, new GuiDefinitions.Callback(this.mGameStateGame.toggleWindow<GuiSecurityWindow>), null, 2);
	guiMenuItem2.setRequiredModuleType(TypeList<ModuleType, ModuleTypeList>.find<ModuleTypeControlCenter>());
	this.mMenuBaseManagement.addItem(guiMenuItem2);
	GuiMenuItem guiMenuItem3 = new GuiMenuItem(TypeList<ModuleType, ModuleTypeList>.find<ModuleTypeFactory>().getIcon(), StringList.get("manufacture_limits"), UnityEngine.KeyCode.F7, new GuiDefinitions.Callback(this.mGameStateGame.toggleWindow<GuiManufactureLimitsWindow>), null, 2);
	guiMenuItem3.setRequiredModuleType(TypeList<ModuleType, ModuleTypeList>.find<ModuleTypeFactory>());
	this.mMenuBaseManagement.addItem(guiMenuItem3);
	this.mMenuBaseManagement.addItem(new GuiMenuItem(instance.Icons.Tech, StringList.get("techs"), UnityEngine.KeyCode.F8, new GuiDefinitions.Callback(this.mGameStateGame.toggleWindow<GuiTechsWindow>), null, 2));
	this.mMenuBaseManagement.addItem(new GuiMenuItem(instance.Icons.Milestone, StringList.get("milestones"), new GuiDefinitions.Callback(this.mGameStateGame.toggleWindow<GuiMilestonesWindow>), null, 2));
	this.mMenuBaseManagement.addBackItem(new GuiDefinitions.Callback(this.onButtonMainMenu));
	this.mMenuBuild = this.addMenu(StringList.get("build"), 5, 0);
	this.mItemBuildInterior = new GuiMenuItem(instance.Icons.BuildInterior, StringList.get("build_interior"), UnityEngine.KeyCode.N, new GuiDefinitions.Callback(this.onButtonBuildInterior), 1, 0);
	this.mItemBuildExterior = new GuiMenuItem(instance.Icons.BuildExterior, StringList.get("build_exterior"), UnityEngine.KeyCode.X, new GuiDefinitions.Callback(this.onButtonBuildExterior), 1, 0);
	this.mMenuBuild.addItem(this.mItemBuildInterior);
	this.mMenuBuild.addItem(this.mItemBuildExterior);
	this.mMenuBuild.addBackItem(new GuiDefinitions.Callback(this.onButtonMainMenu));
	this.mMenuSpeed = this.addMenu(StringList.get("menu_speed"), 5, 0);
	this.mItemSpeedFaster = new GuiMenuItem(instance.Icons.Faster, StringList.get("menu_faster"), UnityEngine.KeyCode.Plus, new GuiDefinitions.Callback(this.mGameStateGame.onButtonFaster), null, 0);
	this.mItemSpeedSlower = new GuiMenuItem(instance.Icons.Slower, StringList.get("menu_slower"), UnityEngine.KeyCode.Minus, new GuiDefinitions.Callback(this.mGameStateGame.onButtonSlower), null, 0);
	Singleton<ShortcutManager>.getInstance().addShortcut(UnityEngine.KeyCode.Equals, new GuiDefinitions.Callback(this.mGameStateGame.onButtonFaster));
	Singleton<ShortcutManager>.getInstance().addShortcut(UnityEngine.KeyCode.KeypadPlus, new GuiDefinitions.Callback(this.mGameStateGame.onButtonFaster));
	Singleton<ShortcutManager>.getInstance().addShortcut(UnityEngine.KeyCode.KeypadMinus, new GuiDefinitions.Callback(this.mGameStateGame.onButtonSlower));
	this.mMenuSpeed.addItem(this.mItemSpeedSlower);
	this.mMenuSpeed.addItem(this.mItemSpeedFaster);
	this.mMenuSpeed.addBackItem(new GuiDefinitions.Callback(this.onButtonMainMenu));
	this.mMenuBuildInterior = this.addMenu(StringList.get("build_interior"), 5, 0);
	foreach (ModuleType current in TypeList<ModuleType, ModuleTypeList>.get())
	{
		if (!current.isExterior())
		{
			GuiMenuItem menuItem = new GuiMenuItem(current.getIcon(), "(Build)" + current.GetType().Name, new GuiDefinitions.Callback(this.mGameStateGame.onButtonBuildModule), current, 0);
			this.mMenuBuildInterior.addItem(menuItem);
		}
	}
	this.mMenuBuildInterior.addBackItem(new GuiDefinitions.Callback(this.onButtonBuild));
	this.mMenuBuildExterior = this.addMenu(StringList.get("build_exterior"), 5, 0);
	foreach (ModuleType current2 in TypeList<ModuleType, ModuleTypeList>.get())
	{
		if (current2.isExterior())
		{
			GuiMenuItem guiMenuItem4 = new GuiMenuItem(current2.getIcon(), "(Build)" + current2.GetType().Name, new GuiDefinitions.Callback(this.mGameStateGame.onButtonBuildModule), current2, 0);
			if (current2.hasFlag(64) && PlanetManager.getCurrentPlanet().getAtmosphereDensity() == Planet.Quantity.None)
			{
				guiMenuItem4.setEnabled(false);
				guiMenuItem4.setTooltip(StringList.get("tooltip_no_atmosphere"));
			}
			this.mMenuBuildExterior.addItem(guiMenuItem4);
		}
	}
	this.mMenuBuildExterior.addBackItem(new GuiDefinitions.Callback(this.onButtonBuild));
	this.mMenuAction = this.addMenu(StringList.get("action"), 5, 0);
	this.mMenuEdit = this.addMenu(StringList.get("edit"), 5, 0);
	this.mCurrentMenu = this.mMenuMain;
	this.updateTutorialHighlight();
	this.updateBuidItem();
}
EDIT: Optimized the code a bit.
Stop begging for approval, its a big file and it takes time to make sure the file is not viral...
File is safe, Approved.
I love you Yamiez, sorry if i was so boring, but i could not wait to use this hack
Another game update!
I've added the new version to the first post.
Approved new file
Quote Originally Posted by Yemiez View Post
Approved new file
For some reason I am unable to update the first post in this thread.
Could you please see what is going on? Thanks
Quote Originally Posted by abduhl View Post
For some reason I am unable to update the first post in this thread.
Could you please see what is going on? Thanks
After 24 hours you no longer have the permission to edit your own thread, PM me changes and I can edit your thread!
Thank you for the fast approval
Awesome hack keep up the good work! Thank you for this nifty little hack you made!
Game has been updated to v1.0.4.
Will update the hack later today when I have time.
Alright, I have attached the updated version to this post.
I have added a few new features that I didn't really test so it might blow up your computer.

  • Map size is increased by 4 times.
  • Building limit is increased from 200 to 20000.
  • You can now build without the need of a link to another construction.


These new features are not optional.
I had some problems with that part of the code so that will have to wait for another time.
I did already add the buttons to enable or disable these features however they do very little :P

Virusscans:
Assembly-CSharp 1.0.4_mpgh.net.zip262 KB · 56 downloads Clean
Can you add smthing like a console?

This might work (didn't test)
public void onConsole(object parameter)
{
string stringToEdit = "spawn ";
CommandRunner instance = CommandRunner.getInstance();
string text2;
stringToEdit = GUI.TextField(new Rect(10, 10, 200, 20), stringToEdit, 25);
instance.run(stringToEdit, out text2);
}
Posts 1630 of 45 · Page 2 of 3
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?