Jump to content

[MODS] Rainbowdesign's Mods


Recommended Posts

Here i collect some of the mods and feedback for them.

Super Building extension with a load of new buildings and some balances

https://steamcommunity.com/sharedfiles/filedetails/?id=1828749978

High Pressure mod to transport and store big amounts of liquids.

https://steamcommunity.com/sharedfiles/filedetails/?id=1816824573

Lua scripting engine create new simple lua scripts to change stuff ingame or make scenarios.

https://steamcommunity.com/sharedfiles/filedetails/?id=1812965265

Scenarios & Configurations  Adds a bunch of settings to the mapgeneration menu.

https://steamcommunity.com/sharedfiles/filedetails/?id=2014940545

 

If you find a bug please post here.

Link to comment
https://forums.kleientertainment.com/forums/topic/113661-mods-rainbowdesigns-mods/
Share on other sites

It's a null pointer exception. @Rainbowdesign Make sure you check for null, especially if you use GetComponent(). It might work on Windows, but not on Linux/Mac. Once I had an issue with KPrefabID component being null on Linux, but not on the Windows version of the game.

Good luck.

hello @Rainbowdesign it's me from steam, after a few weeks I decided to post my save for inspection on this forum because of the bug that you have mentioned about the super wire. check my save and replay if there is something wrong here is the file save with the image for proof that wires exists in this save

creative 2 Cycle 260.sav

creative 2 Cycle 260.png

I looked at the code i have however no idea what is wrong.

I remember it being connected with this error log: https://pastebin.com/dc5DrRrQ

And 

  1. [17:06:26.025] [1] [WARNING] Could not find prefab 'SuperWireRefined'

I am not really sure why it cannot find the prefab or where the error is. The wire code is very small:

This is the original wire:


using TUNING;
using UnityEngine;

public class WireRefinedConfig : BaseWireConfig
{
  public const string ID = "WireRefined";

  public override BuildingDef CreateBuildingDef()
  {
    string id = "WireRefined";
    string anim = "utilities_electric_conduct_kanim";
    float construction_time = 3f;
    float[] tieR0 = BUILDINGS.CONSTRUCTION_MASS_KG.TIER0;
    float insulation = 0.05f;
    EffectorValues none = NOISE_POLLUTION.NONE;
    BuildingDef buildingDef = this.CreateBuildingDef(id, anim, construction_time, tieR0, insulation, BUILDINGS.DECOR.NONE, none);
    buildingDef.MaterialCategory = MATERIALS.REFINED_METALS;
    return buildingDef;
  }

  public override void DoPostConfigureComplete(GameObject go)
  {
    this.DoPostConfigureComplete(Wire.WattageRating.Max2000, go);
  }
}

This is the super wire:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using Harmony;
using TUNING;
using UnityEngine;

namespace SuperWire
{
	internal class IDS
	{
		public const string ID = "SuperWire";
		public const string NAME = "Super Wire";
		public const string DESCRIPTION = "The Super Wire can transport 50000 Watts.";
		public const string EFFECT = "A very strong but expensive wire to connect in lategame.";
		public const string TECH = "PrettyGoodConductors";
		public const string PLANCATEGORY = "Power";
	}
	[HarmonyPatch(typeof(GeneratedBuildings), "LoadGeneratedBuildings")]
	internal class __LoadGeneratedBuildings
	{
		private static void Prefix()
		{
            Co.Add.BuildingPlan(IDS.ID, IDS.NAME, IDS.DESCRIPTION, IDS.EFFECT, IDS.PLANCATEGORY);
		}
	}
	[HarmonyPatch(typeof(Db), "Initialize")]
	internal class __Db_Initialize
	{
		private static void Prefix(Db __instance)
		{
            Co.Add.BuildingTech(IDS.ID, IDS.TECH);
        }
	}
	public class SuperWireRefinedConfig : BaseWireConfig
	{
		public const string ID = IDS.ID;

		public override BuildingDef CreateBuildingDef()
		{
			string id = IDS.ID;
			string anim = "utilities_electric_conduct_kanim";
			float construction_time = 3f;
			float[] construction_mass = new float[3] { 60,20,20 };
			string[] construction_materials = new string[3]
			{
				SimHashes.Steel.ToString(),
				SimHashes.TempConductorSolid.ToString(),
				"Plastic"
			};
			float insulation = 0.05f;
			EffectorValues none = NOISE_POLLUTION.NONE;
			BuildingDef buildingDef = this.CreateBuildingDef(id, anim, construction_time, construction_mass, insulation, BUILDINGS.DECOR.NONE, none);
			buildingDef.MaterialCategory = construction_materials;
			return buildingDef;
		}

		public override void DoPostConfigureComplete(GameObject go)
		{
			this.DoPostConfigureComplete(Wire.WattageRating.Max50000, go);
		}
	}
}

If someone can see a mistake or has an idea whats with the disappearing prefabs please tell me.

Also @tonimark2018 I wonder if you removed some mods and it happened afterwards and if it happened only once or if its something that can be found regularly.

6 hours ago, Rainbowdesign said:

I looked at the code i have however no idea what is wrong.

I remember it being connected with this error log: https://pastebin.com/dc5DrRrQ

And 

  1. [17:06:26.025] [1] [WARNING] Could not find prefab 'SuperWireRefined'

I am not really sure why it cannot find the prefab or where the error is. The wire code is very small:

This is the original wire:



using TUNING;
using UnityEngine;

public class WireRefinedConfig : BaseWireConfig
{
  public const string ID = "WireRefined";

  public override BuildingDef CreateBuildingDef()
  {
    string id = "WireRefined";
    string anim = "utilities_electric_conduct_kanim";
    float construction_time = 3f;
    float[] tieR0 = BUILDINGS.CONSTRUCTION_MASS_KG.TIER0;
    float insulation = 0.05f;
    EffectorValues none = NOISE_POLLUTION.NONE;
    BuildingDef buildingDef = this.CreateBuildingDef(id, anim, construction_time, tieR0, insulation, BUILDINGS.DECOR.NONE, none);
    buildingDef.MaterialCategory = MATERIALS.REFINED_METALS;
    return buildingDef;
  }

  public override void DoPostConfigureComplete(GameObject go)
  {
    this.DoPostConfigureComplete(Wire.WattageRating.Max2000, go);
  }
}

This is the super wire:


using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using Harmony;
using TUNING;
using UnityEngine;

namespace SuperWire
{
	internal class IDS
	{
		public const string ID = "SuperWire";
		public const string NAME = "Super Wire";
		public const string DESCRIPTION = "The Super Wire can transport 50000 Watts.";
		public const string EFFECT = "A very strong but expensive wire to connect in lategame.";
		public const string TECH = "PrettyGoodConductors";
		public const string PLANCATEGORY = "Power";
	}
	[HarmonyPatch(typeof(GeneratedBuildings), "LoadGeneratedBuildings")]
	internal class __LoadGeneratedBuildings
	{
		private static void Prefix()
		{
            Co.Add.BuildingPlan(IDS.ID, IDS.NAME, IDS.DESCRIPTION, IDS.EFFECT, IDS.PLANCATEGORY);
		}
	}
	[HarmonyPatch(typeof(Db), "Initialize")]
	internal class __Db_Initialize
	{
		private static void Prefix(Db __instance)
		{
            Co.Add.BuildingTech(IDS.ID, IDS.TECH);
        }
	}
	public class SuperWireRefinedConfig : BaseWireConfig
	{
		public const string ID = IDS.ID;

		public override BuildingDef CreateBuildingDef()
		{
			string id = IDS.ID;
			string anim = "utilities_electric_conduct_kanim";
			float construction_time = 3f;
			float[] construction_mass = new float[3] { 60,20,20 };
			string[] construction_materials = new string[3]
			{
				SimHashes.Steel.ToString(),
				SimHashes.TempConductorSolid.ToString(),
				"Plastic"
			};
			float insulation = 0.05f;
			EffectorValues none = NOISE_POLLUTION.NONE;
			BuildingDef buildingDef = this.CreateBuildingDef(id, anim, construction_time, construction_mass, insulation, BUILDINGS.DECOR.NONE, none);
			buildingDef.MaterialCategory = construction_materials;
			return buildingDef;
		}

		public override void DoPostConfigureComplete(GameObject go)
		{
			this.DoPostConfigureComplete(Wire.WattageRating.Max50000, go);
		}
	}
}

If someone can see a mistake or has an idea whats with the disappearing prefabs please tell me.

Also @tonimark2018 I wonder if you removed some mods and it happened afterwards and if it happened only once or if its something that can be found regularly.

ok i will run this mod lonely and if something happens i will investigate about compatibility issues

1 hour ago, Rainbowdesign said:

I think it might be because you uninstalled something else and it caused some kind of incompatibility maybe corrupting the savegame its just a feeling thats why i asked.

at least is there any file save editor (to get back my wiring schematic) , i tried one but it was incompatible with my save 

Please test out my new mod, you can change a bunch of starting settings with it.

This is a beta version.

Supposed to work are: mapsize, techlevel, techdifficulty and temperature.

Seasons is untested please add some feedback to it.

Most scenarios will not work.

Nuclear power is only a concept right now. The main issue to manipulate buildings from Lua is that you would have to find them first and i cannot find any list of buildings which i could iterate. If anyone has an idea where it might be please share.

Installation: install the Lua scripting engine from steam and enable it. Copy this file to the folder mods/local and enable it:

LuaGameConfigurator.zip

Also for people who like to tinker with code: The Lua files are all text you can simply edit the values for the settings and leave the edited file in the local folder without compiling.

LuaGameConfigurator.zip

output_log.txt

So here I'm. As said before, the mod  Scenarios & Configurations is not working as it should here. I have all the options in the custom creation enabled, by none of them ever change anything in the world after it is created. Even if I just enable Lua Script and Scenarios & Configurations, nothing changes after selecting custom options in the menu. Here are my logs:

output_log.text = all my mods installed.

output_log 2.text = just LuaScript and Scenarios & Configurations, nothing else.

 

 

output_log.txt

output_log 2.txt

Hey sorry i got you a little wrong. I assumed you dont see the configuration settings.

If you see the settings: All of the settings are not directly visible if you start a game.

If you select Drowning salt water world the map is transformed within the first 10 turns, it does not start as water world.

If you select Deadly cold the water on the map does freeze after about 25 cycles.

If you select the immigration timer the first immigration from the printing pod will be normal.

If you select Expensive researches you have to build a research station and look in the research menu.

 

If you see the menu entry you likely have everything working.

For testing if the mod works select Drowning salt water world Deadly cold and any expensive research and let it 5 cycles run.

Update:

 

The autosweeper mod is outdated now and will be no longer updated.

2 new sweepers are now integrated into the Super Building extension use that one instead.

 

Added a Bleach stone refinery to the Super Building extension, it contains now ~17 new buildings + some recipes and other stuff.

Also the supersweeper can go through tiles now


https://steamcommunity.com/sharedfiles/filedetails/?id=1828749978(edited)

 

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...