Rainbowdesign

  • Content count

    456
  • Joined

  • Last visited

Community Reputation

155 Excellent

About Rainbowdesign

  • Rank
    Senior Member
  1. Cool mod idea

    Actually i think the way that would fit best to the intention is make neutronium tiles that would make the game quicker.
  2. Lua Wishes

    I understand IBuildingConfig is an interface class. What is irritating me is that they use it as dictionary key - as an interface you cannot make instances so what is the key at all if not the instance and why not use a string as key and have the other part access able inside the value. My idea is: i search with c# the Building, make a copy of it and let the user manipulate the copy that way they really dont need to insert ALL the values if they want to do something similar. I have however no idea how to find that class from lua just with a string and then i dont know how it is registered properly. Especially since i cannot use types from lua.
  3. Cool mod idea

    Debug mod is not quite ingame...
  4. Lua Wishes

    I started with it now, but i really have a problem i cannot find anything about lua and types. As example if i want to get a component i cannot do .FindOrAddComponent<Storage>() Its not lua syntax (well of course it does not work) go = GetGameObject("Ladder") go.FindOrAddComponent<Storage>() end [16:40:51.130] [1] [INFO] [LuaError] chunk_1:(9,22-23): unexpected symbol near '<' Also i have no idea how to return the type. I started with this as example and it did lead nowhere too: public static Type GetComponent(GameObject prefab_id, string typename) { //prefab_id.AddOrGet< >(prefab_id); Type t = Type.GetType(typename); return t; } If i dont find a way i have to make a function for each component. I started with AddBuilding now. The biggest problem for tomorrow will be to replace this properly mostlikely with reflections and activator: IBuildingConfig cloneb = new LadderConfig(); static public bool AddBuilding(string buildingname, string clonename) { if (TagManager.GetProperName(clonename) != null) { ScriptingCore.DebugLogError(" The building cannot be cloned, the name " + clonename + " is already used."); return false; } IBuildingConfig clonebuildingconfig = null; BuildingDef clonebuildingdef = null; foreach (var i in configTable) { if (i.Value.PrefabID == buildingname) { clonebuildingconfig = i.Key; clonebuildingdef = i.Value; } } if (clonebuildingdef == null) { ScriptingCore.DebugLogError(" The configTable did not contain, the name " + clonename + "."); return false; } IBuildingConfig cloneb = new LadderConfig(); BuildingConfigManager.Instance.RegisterBuilding(cloneb); configTable[cloneb] = clonebuildingdef; return true; }
  5. Lua Wishes

    Thankyou i will look into it as soon i am back modding Lua. I wonder if it would be possible to clone a building and then add different attributes with a script. The main problem would be the new class i think. till then i wonder why do i get a NullReferenceException: Object reference not set to an instance of an object where __instance seems to be null not sure whats the problem with harmony there: [HarmonyPatch(typeof(AutoMiner), "ValidDigCell"), ] public class __isValidDigCell { public static bool Prefix(AutoMiner __instance,int cell ) { int width = __instance.width;// Traverse.Create(__instance).Field("width").GetValue<int>(); int height = __instance.height;// Traverse.Create(__instance).Field("height").GetValue<int>(); Debug.Log(" width " + width + " " + height); if (width == 60&& height == 8) return Grid.Solid[cell] && !Grid.Foundation[cell]; else return Grid.Solid[cell] && !Grid.Foundation[cell] && Grid.Element[cell].hardness < (byte)150; } }
  6. Weird Ideas

    Unwrangled zombie dupes can bite other dupes and might infect them (not if the dupe has animals skill, then they can only fight them when he tries to wrangle the other zombie) Really this has to come sometime now we have zombie spores.
  7. Lua Wishes

    I am just experimenting with the research cost modifier. I wonder what i can use as maximum research costs for rocketry. I wonder is there a limit for research disks to get from a rock.
  8. Lua Wishes

    public static GameObject CreateDrecko( string id, string name, string desc, string anim_file, bool is_baby) { GameObject wildCreature = EntityTemplates.ExtendEntityToWildCreature(BaseDreckoConfig.BaseDrecko(id, name, desc, anim_file, "DreckoBaseTrait", is_baby, "fbr_", 308.15f, 363.15f), DreckoTuning.PEN_SIZE_PER_CREATURE, 150f); Trait trait = Db.Get().CreateTrait("DreckoBaseTrait", name, name, (string) null, false, (ChoreGroup[]) null, true, true); trait.Add(new AttributeModifier(Db.Get().Amounts.Calories.maxAttribute.Id, DreckoTuning.STANDARD_STOMACH_SIZE, name, false, false, true)); trait.Add(new AttributeModifier(Db.Get().Amounts.Calories.deltaAttribute.Id, (float) (-(double) DreckoTuning.STANDARD_CALORIES_PER_CYCLE / 600.0), name, false, false, true)); trait.Add(new AttributeModifier(Db.Get().Amounts.HitPoints.maxAttribute.Id, 25f, name, false, false, true)); trait.Add(new AttributeModifier(Db.Get().Amounts.Age.maxAttribute.Id, 150f, name, false, false, true)); Diet diet = new Diet(new Diet.Info[1] { new Diet.Info(new HashSet<Tag>() { "SpiceVine".ToTag(), SwampLilyConfig.ID.ToTag(), "BasicSingleHarvestPlant".ToTag() }, DreckoConfig.POOP_ELEMENT, DreckoConfig.CALORIES_PER_DAY_OF_PLANT_EATEN, DreckoConfig.KG_POOP_PER_DAY_OF_PLANT, (string) null, 0.0f, false) }); CreatureCalorieMonitor.Def def1 = wildCreature.AddOrGetDef<CreatureCalorieMonitor.Def>(); def1.diet = diet; def1.minPoopSizeInCalories = DreckoConfig.MIN_POOP_SIZE_IN_CALORIES; wildCreature.AddOrGetDef<SolidConsumerMonitor.Def>().diet = diet; ScaleGrowthMonitor.Def def2 = wildCreature.AddOrGetDef<ScaleGrowthMonitor.Def>(); def2.defaultGrowthRate = (float) (1.0 / (double) DreckoConfig.SCALE_GROWTH_TIME_IN_CYCLES / 600.0); def2.dropMass = DreckoConfig.FIBER_PER_CYCLE * DreckoConfig.SCALE_GROWTH_TIME_IN_CYCLES; def2.itemDroppedOnShear = DreckoConfig.EMIT_ELEMENT; def2.levelCount = 6; def2.targetAtmosphere = SimHashes.Hydrogen; return wildCreature; } I registered the building components you mentioned now. However i have not tested them. DreckoConfig looks like this any idea where wildCreature and trait will be stored to access them?
  9. Unfortunate Screencaps

    Sandstone melting point set to very low.
  10. Lua Wishes

    Do you have any more suggestions what to expose to lua? I have some stuff now and need more can expose classes or write functions to expose. Maybe you have some ideas too @trevice
  11. Dupe self preservation

    The challenge is either here: or in the challenges forum, however if you look at the screenshot it should be obvious from the basename: 10000 Dead dupes please And i did not mention it further because its offtopic - unless its 10000 Dead dupes by suicide from stupidity please. "Dupe digging a hole he can`t get out of is the players fault 90% of the time." Last time dupe died when i did dig upwards i marked a ladder to build and then marked to dig sidewards dupe did dig something behind him there was a gap of 2 tiles and no breathable air. And the usually nofatal but very annoying case dupe should build a wall to enclose the colony there is a little cave dupes builds the wall and ends in the cave.
  12. Dupe working prioritys

    You can test the system if you want to see what dupes are send from where to where: Give your colony the order to kill a wild shove vole and enjoy randomly popping up alerts about dupes attacking - those dupes are usually VERY far away you can click on the alert and know from where they will come to kill the shove vole. Proximity mode on the other hand just removes that hidden system: If you use sub-priority 5 for everything duplicants will just move to the closest task. Not even good on paper... The hidden system is used in the rarest cases so thats the reason the button does nothing. Proximity should prioritze by location giving a task that is close by + 3 or so levels of priority to the priority it has with the dupe (except disabled tasks) and then fall off and things on the other side of the colony should be deprioritized till they are disabled. The button proximity should be replaced by a number selector where you can choose on how much the close location is prioritized.
  13. Dupe self preservation

    Maybe you would like g5457s challenge: Its did always fascinate me when people feel for pixel animal / humans like they were real animals / humans.
  14. Dupe self preservation

    It is new that slicksters drown in the testversion. I think in my colony atleast 5 died that way. If the pipe breaks the dupes still work as usual till health is 0.
  15. Dupe working prioritys

    Actually it was enabled when i have seen the dupe doing this i wonder since several versions if its making a big difference...