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

Messages - Leeman

#1
Help / Re: GlowGrid woes
March 16, 2015, 05:53:55 PM
Then I don't know. Sorry  :-\ You#re sure the compglower also updates if you just switch the it's def?
#2
Help / Re: GlowGrid woes
March 16, 2015, 05:42:22 PM
After looking in the Class MapChangeType

there is a special Enum for GroundGlow. Did you try doing the line above with MapChangeType.GroundGlow instead of MapChangeType.Things
#3
Help / Re: GlowGrid woes
March 16, 2015, 05:37:07 PM
What you can try is updating the Map after you changed the glowgrid. Graves update their Graphics using this line of code

Find.MapDrawer.MapChanged(this.Position, MapChangeType.Things);

Maybe this helps you somehow
#4
Outdated / Re: [Mod] (Alpha 9) Graves (1.0b)
March 16, 2015, 05:16:59 PM
Quote from: Igabod on March 16, 2015, 04:59:59 PM
It would be nice to be able to assign graves to colonists before they actually die, sorta like beds. And as soon as a colonist dies, their corpse is taken to their assigned grave.

Sounds like a neat Idea. Will add it to the list and hopefully can get most of it into it over the next few days
#5
Outdated / Re: [Mod](Alpha 9) Graves (1.0a)
March 16, 2015, 04:16:57 PM
Next Bugfix is up.

Changelog Version 1.0b:
  • Graves can now be deconstructed. Works with existing save


Quote from: Iwillbenicetou on March 16, 2015, 12:18:31 PM
I have an idea. you can make three (or however colonists you have) "founder" graves. These will be reserved for the first colonists you get. They are tombstones and (of course) require stone. Or they could be a mausoleum...

Sounds Interresting. I will put it up on the list for now but I cannot promise anything ^^
#6
Hey guys,

currently working on my first mod. And I found a bug after I released it already sadly and this one is kinda major.
If someone tries to deconstruct the grave it says

http://i.imgur.com/tSE8agw.png

And I have no Idea what is causing that. If anyone could help me would be great. I have the xml and the sourcecode here in a gist for you so you can have a look if needed

https://gist.github.com/anonymous/e1a2d761f15139f3c659

Edit:

I don't know why this happened and I do not know how my solution fixed it. But all I did was, that I added

        public override void Destroy(DestroyMode mode = DestroyMode.Vanish)
        {

            base.Destroy(mode);
        }


Into the classes. I did first some more stuff in there, thats why I added it. And then I started stripping it down as it was quite overloaded and realised that alone helped.

So not sure what exactly the cause was. But that fixed it so I am not going after it (for now)

Edit2: Actually not fixed. It still happens randomly. Not sure what's causing it :/
#7
Outdated / Re: [Mod](Alpha 9) Graves (1.1)
March 16, 2015, 01:25:06 PM
Little Bugfix is up. The Graves no longer change their names. Also changed the layout of the .rar

== Known Issue == You currently are not able to remove the Grave. Looking into it and hopefully can fix it today
#8
Outdated / Re: [Mod](Alpha 9) Graves (1.0)
March 16, 2015, 11:43:47 AM
Hey.
Thanks for the replies guys :)

Quote from: imuteyou on March 16, 2015, 11:41:33 AM
Hi! Dropped in to say that it's a good ideea, but please fix the .rar( Just archive a folder with About, Assemblies and Defs ); it would be a better layout.

What exactly do you mean?

http://i.imgur.com/eObDLAI.png

that's what I get if I download the .rar.. And that's how you mean it or?
#9
As ItchyFlea said someone else should do it and he can't do it currently I took the freedom and did it

https://ludeon.com/forums/index.php?topic=11501.0

Currently working on the MassGrave, Urne and some custom Textures. However thought I'd still release it so you can at least use the Colonist / Stranger Grave functionality
#10
Outdated / [Mod] (Alpha 9) Graves (1.0b)
March 16, 2015, 09:48:46 AM
Graves

Description:
This simple mod let's you you build different graves from the get go. It saves you in the end just some tedious work if you like to have seperate Graveyards as there
is no more need to edit each single Grave who is allowed or not allowed to be burried in there.

Common Grave - This is just like the basic Grave that is already in the game. Allows all sort of Humanoid Corpses
Colonist Grave - This works just like the Common Grave, however it is by default that only Corpses from your Colonists are allowed to be burried here
Strangers Grave - Same as above however set so that only Corpses from people that are NOT from your Colony are allowed to be burried here

Changelog
v 1.0: Initial Release
Hotfix v1.0a: Graves now keep their name and do not turn into Common Graves anymore
Hotfix v1.0b: Graves can now be deconstructed again


Known Issues
  • None at the moment

Possible Ideas for future Releases

  • Custom Graphics for the Graves
  • More Materials to build the Graves with and increase their look by that
  • Mass Graves (For the time you just want to save some place and want them Raiders to rott in one place
  • Urnes - So you never forget your friends and maybe place them down for Decoration
  • Special Graves / Mausoleum for original Founders
  • Assign Grave to a still living Pawn

Author
Leeman

Download


How to install:
- Unzip the contents and place them in your RimWorld/Mods folder.
- Activate the mod in the mod menu in the game.
#11
Not sure it counts as new Post if I edit my old post so you could see that there's a new reply here @ItchyFlea.. I have a little workarround for your problem if interrested ;)

What you can do is create a MapComponent that runs every so often and checks if a grave was built and set the def of that grave to ThinkDefOf.Grave if it is not the case.. I'll add my xml and my code here so you can see how I did it and then adjust it to your needs. I do not have anything in regards of different materials for the graves or a mass grave but I looked at a way to make it so the corpses get hidden in the custom graves^^


<?xml version="1.0" encoding="utf-8" ?>
<Buildings>


  <ThingDef Name="BuildingBase" Abstract="True">
    <category>Building</category>
    <soundImpactDefault>BulletImpactMetal</soundImpactDefault>
    <selectable>true</selectable>
    <drawerType>MapMeshAndRealTime</drawerType>
    <terrainAffordanceNeeded>Light</terrainAffordanceNeeded>
    <repairEffect>Repair</repairEffect>
    <leaveResourcesWhenKilled>true</leaveResourcesWhenKilled>
    <filthLeaving>BuildingRubble</filthLeaving>
  </ThingDef>

  <!-- Grave building definition -->

<ThingDef ParentName="BuildingBase">
    <defName>Grave</defName>
    <eType>BuildingInert</eType>
    <label>Common Grave</label>
    <thingClass>Building_Grave</thingClass>
    <graphicPath>Things/Building/Misc/GraveEmpty</graphicPath>
    <graphicClass>Graphic_Single</graphicClass>
    <graphicOverdraw>true</graphicOverdraw>
    <constructEffect>ConstructDirt</constructEffect>
    <altitudeLayer>FloorEmplacement</altitudeLayer>
    <useStandardHealth>false</useStandardHealth>
    <description>Place the dead in graves to give them a decent final resting place.</description>
    <size>(1,2)</size>
    <statBases>
      <WorkToMake>650</WorkToMake>
    </statBases>
    <passability>Standable</passability>
    <building>
      <fixedStorageSettings>
        <allowances>
          <categories>
            <li>Corpses</li>
          </categories>
        </allowances>
      </fixedStorageSettings>
      <defaultStorageSettings>
        <priority>Important</priority>
        <allowances>
          <categories>
            <li>CorpsesHumanoid</li>
          </categories>
          <specialFiltersToAllow>
            <li>AllowBuried</li>
          </specialFiltersToAllow>
        </allowances>
      </defaultStorageSettings>
    </building>
    <inspectorTabs>
      <li>ITab_Storage</li>
    </inspectorTabs>
    <terrainAffordanceNeeded>Diggable</terrainAffordanceNeeded>
    <designationCategory>Misc</designationCategory>
    <itemSurface>true</itemSurface>
    <designationHotkey>G</designationHotkey>
  </ThingDef>
 
<ThingDef ParentName="BuildingBase">
    <defName>ColonistGrave</defName>
    <eType>BuildingInert</eType>
    <label>Grave for Colonists</label>
    <thingClass>Building_Grave</thingClass>
    <graphicPath>Things/Building/Misc/GraveEmpty</graphicPath>
    <graphicClass>Graphic_Single</graphicClass>
    <graphicOverdraw>true</graphicOverdraw>
    <constructEffect>ConstructDirt</constructEffect>
    <altitudeLayer>FloorEmplacement</altitudeLayer>
    <useStandardHealth>false</useStandardHealth>
    <description>Place the dead in graves to give them a decent final resting place. Preset for Colonists only</description>
    <size>(1,2)</size>
    <statBases>
      <WorkToMake>650</WorkToMake>
    </statBases>
    <passability>Standable</passability>
    <building>
      <fixedStorageSettings>
        <allowances>
          <categories>
            <li>Corpses</li>
          </categories>
        </allowances>
      </fixedStorageSettings>
      <defaultStorageSettings>
        <priority>Important</priority>
        <allowances>
          <categories>
            <li>CorpsesHumanoid</li>
          </categories>
          <specialFiltersToAllow>
            <li>AllowBuried</li>
          </specialFiltersToAllow>
  <specialFiltersToDisallow>
    <li>AllowCorpsesStranger</li>
  </specialFiltersToDisallow>
        </allowances>
      </defaultStorageSettings>
    </building>
    <inspectorTabs>
      <li>ITab_Storage</li>
    </inspectorTabs>
    <terrainAffordanceNeeded>Diggable</terrainAffordanceNeeded>
    <designationCategory>Misc</designationCategory>
    <itemSurface>true</itemSurface>
  </ThingDef>

  <ThingDef ParentName="BuildingBase">
    <defName>StrangerGrave</defName>
    <eType>BuildingInert</eType>
    <label>Grave for Strangers</label>
    <thingClass>Building_Grave</thingClass>
    <graphicPath>Things/Building/Misc/GraveEmpty</graphicPath>
    <graphicClass>Graphic_Single</graphicClass>
    <graphicOverdraw>true</graphicOverdraw>
    <constructEffect>ConstructDirt</constructEffect>
    <altitudeLayer>FloorEmplacement</altitudeLayer>
    <useStandardHealth>false</useStandardHealth>
    <description>Place the dead in graves to give them a decent final resting place. Preset for Strangers only</description>
    <size>(1,2)</size>
    <statBases>
      <WorkToMake>650</WorkToMake>
    </statBases>
    <passability>Standable</passability>
    <building>
      <fixedStorageSettings>
        <allowances>
          <categories>
            <li>Corpses</li>
          </categories>
        </allowances>
      </fixedStorageSettings>
      <defaultStorageSettings>
        <priority>Important</priority>
        <allowances>
          <categories>
            <li>CorpsesHumanoid</li>
          </categories>
          <specialFiltersToAllow>
            <li>AllowBuried</li>
          </specialFiltersToAllow>
  <specialFiltersToDisallow>
    <li>AllowCorpsesColonist</li>
  </specialFiltersToDisallow>
        </allowances>
      </defaultStorageSettings>
    </building>
    <inspectorTabs>
      <li>ITab_Storage</li>
    </inspectorTabs>
    <terrainAffordanceNeeded>Diggable</terrainAffordanceNeeded>
    <designationCategory>Misc</designationCategory>
    <itemSurface>true</itemSurface>
  </ThingDef> 
</Buildings>



using System;
using System.Collections.Generic;
using RimWorld;
using Verse;

namespace Graves
{
    class MapComponent_Graves : MapComponent
    {
        private int updateCounter = 0;
        private const int updateInterval = 500;

        public override void MapComponentOnGUI()
        {
            --this.updateCounter;
            if (this.updateCounter > 0)
                return;
            this.updateCounter = 500;
            List<Building> buildings = Find.ListerBuildings.allBuildingsColonist;

            foreach (Building current in buildings)
            {
                if (current.GetType() == typeof(Building_Grave) && current.def != ThingDefOf.Grave)
                {
                    current.def = ThingDefOf.Grave;
                }
            }
        }
    }
}
#12
[...]
Edit:  nvm. sorry. didn't see the 'Edit' in the first post
#13
Help / Help with GetInspectionTabs
March 12, 2015, 07:15:50 PM
Hey guys,

currently trying to write my own Mod for better Zone Management. However I am at the point were I am stuck and need your guys help. I want to add a custom Tab to the Zones for some micromanagement and the only way to do this is - at least the only way I found out - is by overwriting the specific zone. So. I thought.. Hey. Can't be too hard, can it?

However when I look at the code for the function of GetInspectionTabs and this is all I get


public override IEnumerable<ITab> GetInspectionTabs()
{
Zone_Growing.<GetInspectionTabs>c__Iterator20 <GetInspectionTabs>c__Iterator = new Zone_Growing.<GetInspectionTabs>c__Iterator20();
Zone_Growing.<GetInspectionTabs>c__Iterator20 expr_07 = <GetInspectionTabs>c__Iterator;
expr_07.$PC = -2;
return expr_07;
}


I know the reason as to why this happens however I have no Idea what exactly the method does so I can implement it. Is it just simply returning a list<ITab> that includes references to the Tabs themself or? If anyone got an Idea please lemme know :)
#14
Help / Re: UI Modifications
March 12, 2015, 03:03:06 PM
Ok. I had a look at it and I gotta say it's not exactly what I need. Sadly. He adds a tab to a ThingDef, which seems pretty easy after reading his code. But adding a new Tab to a Zone is not that easy and so far I had no luck finding a way adding a new tab to a Zone. But I am not giving up quite yet :P

Edit: Mind have found a way. However I need to come at it from a different angle than I went ahaed so far. I have to create my own Zones and "replace" the ones that are ingame. Hoped to avoid that to reduce any risk of needing a new safegame if I ever wanted to get rid of the mod
#15
Help / Re: UI Modifications
March 10, 2015, 01:44:03 PM
Cheers. I'll take a look at it :)