Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - Zoimos

#1
Help / check for pawns in a room?
March 03, 2015, 11:03:18 PM
how do you check if there is a pawn in a room? been searching around and can only find that it might have something to do with ListerPawns but I don't know how it works :(

#2
Outdated / [A10] Expanded Mining 1.04 (Updated 20/04/15)
February 25, 2015, 11:07:43 PM
Expanded Mining 1.04

Alpha 10

Coal Power Plant is working again!

Latest verison should now work with alpha 10. I have removed the craftable power armors for now as I want to do something much better in the future.



Description:

This is a simple mod that add some more mineable materials to the game as well as some ways to use them. I have tried to keep it balanced but any suggestions is welcomed.

Latest Updates

1.03
Coal Power now working again.
Added coal feeder to feed the coal power plant instead of a hopper.

1.03
Updated to Alpha 10!
Adjusted some veins to appear more often.
Some stuff costing cost now needs less.
Removed craftable power armor for now.

1.02
Added Coal campfire.
Added Diamonds.
Fixed furnace texture.
Added Tin and Bronze.
Added patch to allow VeinMiner to work with new veins types. (see below)
Added Mining Trader.


1.01
Adjusted aluminiums stats slightly.
Added craftable light and heavy power armors.
Plasteel now uses Riminium and cloth to create so now is profitable to craft.
Added a research-free furnace to smelt steel
A few balance adjustments

Current New Resources:

Iron: Weaker than steel but can be used to make steel
Copper:  Used for power cables and is a requirement for some buildings.
Aluminium: Slightly weaker than steel  .
Titanium: Slightly stronger than steel.
Riminium: New metal! Stronger than titanium.
Rimsteel: A alloy of riminium and steel, stronger than plasteel!
Coal: Used for coal power or make steel.
Diamonds: very rare and valuable, like gold and silver you will need more of it to make stuff.
Tin: Used to make bronze.
Bronze: Made from copper and tin, an ok alloy for equipment but makes good sculptures.

Most can be mined if you find a vein, also adds some of these to help you start off.

Can smelt some of the alloys at the new the electric smelter

Iron+Coal = Steel
Steel + Riminium = Rimsteel
Riminium + Cloth = Plasteel

Military Helmets are now craftable at a smithing table, the better the metal used the stronger the helmet.  Melee weapons can also use the new metals to make stronger weapons.

Coal Power:
Coal power plants can also be built, no research is needed, coal must be feed to it via a hopper and one piece of coal will provide 3000W for 4 hours. (6 coal a day to keep it running 24/7!)

The bulk trader will now always carry Coal so you can have a constant supply.

Screenshots:





Author

Zoimos - My first go at modding!

Metal textures I'm "burrowing" from the internet! May try making some myself in the future but will most likely suck!

Anyone is welcome to use this mod any way they wish.

Planned Features:
- Revamp the craftable armors, working on textures for some new armors!
- Open to any suggestions on new metals/alloys!
- More Gems!

- Any experts on material science out there feel free to tell me if the metal properties are off!


Download

Download here!

How to install:
- Unzip the contents and place them in your RimWorld/Mods folder.
- Activate the mod in the mod menu in the game.

- VeinMiner should now work without a compatibility patch!
#3
Help / Oil Refinery
February 24, 2015, 06:14:20 PM
Having some problems getting my Oil Refinery to work

I used the nutrient dispenser as a reference and looked at some similar mods but it is just refusing to work.

In game once I have crude oil in the pump ready to go it just displays work until refined: 0 and nothing else happens

this is the code I am trying to use

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;
using Verse;
using RimWorld;
using Verse.AI;


namespace PetroleumAge
{
    class Building_Refinery : Building
    {
        private CompPowerTrader powerComp;
public static int CollectDuration = 50;
        private int refineTime;
public bool CanRefineNow
{
get
{
return this.powerComp.PowerOn && this.HasOilInPump;
}
}
public bool Powered
{
get
{
return this.powerComp.PowerOn;
}
}
public bool HasOilInPump
{
get
{
return this.OilInPump != null;
}
}
private Thing OilInPump
{
get
{
ThingDef thingDef = ThingDef.Named("OilPump");
                ThingDef thingDef2 = ThingDef.Named("CrudeOil");
foreach (IntVec3 current in GenAdj.CellsAdjacentCardinal(this))
{
Thing thing = null;
Thing thing2 = null;
foreach (Thing current2 in Find.ThingGrid.ThingsAt(current))
{
if (current2.def == thingDef)
{
thing = current2;
}
if (current2.def == thingDef2)
{
thing2 = current2;
}
}
if (thing != null && thing2 != null)
{
                        return thing;
}
}
return null;
}
}
public override void SpawnSetup()
{
base.SpawnSetup();
this.powerComp = base.GetComp<CompPowerTrader>();
}
public Building AdjacentReachableOilPump(Pawn reacher)
{
ThingDef thingDef = ThingDef.Named("OilPump");
foreach (IntVec3 current in GenAdj.CellsAdjacentCardinal(this))
{
Building edifice = current.GetEdifice();
if (edifice != null && edifice.def == thingDef && reacher.CanReach(edifice, PathMode.Touch, Danger.Deadly))
{
return (Building_Storage)edifice;
}
}
return null;
}

       


        public override string GetInspectString()
        {
            StringBuilder stringBuilder = new StringBuilder();
            stringBuilder.Append(base.GetInspectString());
            stringBuilder.AppendLine();
            stringBuilder.Append("Work until oil is refined".Translate() + ": " + this.refineTime);

            if (!this.CanRefineNow)
            {
                stringBuilder.AppendLine();
                stringBuilder.Append("Can not refine.".Translate());
            }
            return stringBuilder.ToString();
        }

public Thing RefineOil()
{
            if (!this.CanRefineNow)
            {
                return null;
            }
            int num = 10;
            int num2 = 0;
            List<ThingDef> list = new List<ThingDef>();
            Thing oilInPump = this.OilInPump;
            do
            {
                int num3 = Mathf.Min(oilInPump.stackCount, num);
                num2 += num3;
                list.Add(oilInPump.def);
                oilInPump.SplitOff(num3);
                if (num2 >= num)
                {
                    break;
                }
                oilInPump = this.OilInPump;
           
            }
            while (OilInPump != null);
            Thing diesel = (Thing)ThingMaker.MakeThing(ThingDef.Named("Diesel"), null);
            diesel.stackCount = 5;
            GenSpawn.Spawn(diesel, base.Position);
            this.refineTime = 1000;
            return null;
}

        public override void Tick()
        {
            base.Tick();
            if (this.CanRefineNow)
            {
                this.refineTime--;
                if (this.refineTime <= 0)
                {
                    this.RefineOil();
                }
            }
        }
}
}


thanks in advance!