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 - EzraN

#1
Help / Re: Add item to ThingDefOf for spawning.
August 27, 2016, 01:16:59 AM
Oh I didn't mean that I meant like spawning an item from my own project. I'll change the main question. Sorry
#2
Help / Add item to ThingDefOf for spawning.
August 26, 2016, 11:33:12 PM
I am working on a mod with multiple items and have created a building that when it is spawned will place a new item I made from the mod beside it. The trouble is with getting the item to spawn since when using GenSpawn you need a thingdef, but I am not too sure on how to reference that item or locate it. How can I find that item and then place it into GenSpawn or a similar method to make it spawn into the game world?
#3
Outdated / Re: [A14] Resource Mining Rig (1.1)
August 26, 2016, 01:32:43 PM
I can change that I'll update it right now!
#4
Outdated / Re: [A14] Resource Mining Rig (1.1)
August 21, 2016, 02:29:02 PM
It would take two minutes for it to create a new item on the regular single play button time, but the faster speeds will make it seem to spawn faster even thought it is just because of the increased time rate it goes at. Its like how crops grow in the game.
#5
Outdated / Re: [A14] Resource Mining Rig (1.1)
August 19, 2016, 01:09:34 PM
Oh thanks, I got it now. I'll make sure to not use the album link next time.
#6
Outdated / Re: [A14] Resource Mining Rig (1.1)
August 18, 2016, 11:21:42 PM
Wow, this got a lot of views. Thanks for commenting about it I appreciate it a lot! It looks like next update for A15 is going to have a machine like this that grabs stuff from 'underneath' the map so it will stay for this version probably.
Glad to see you liked it!
#7
Outdated / Re: [A14] Resource Mining Rig (1.0)
August 17, 2016, 06:05:22 PM
Thanks! I'm going to try a few different looks on the model to see which one 'fits' the best I think.
#8
Outdated / [A14] Resource Mining Rig (1.2)
August 17, 2016, 04:25:14 PM
Resource Miner

Description:
This mod adds a new way for you to get resources passively. You can construct a 2*2 mining 'rig' that will use power to find resources like stone, silver, steel, and other metals and place them around the rig.

Texture updated to look slightly more like it belongs in the game

Stone blocks will now spawn instead of stone walls, (Mountain rock?) steel slag also possibly now.

Images:




Technical Details:
Power Usage: 1500 W
Stack size: 1 (Will not stack items)
Will not place items on 'filled' zones (buildings, walls, ect...)
It will place an item at the surface about every two minutes.

Author
Me and a bunch of forum posts  :P

Download
https://www.dropbox.com/sh/az7c92dq4zyr6ux/AAC2tLXPViHxAH4x5dTLwppMa?dl=0

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

Side Notes:
First mod I have made so criticism would be very helpful. I know the texture for the mining rig is not very good I'm not a good artist, might update it with a better texture if I can figure out what to make it look like...



  • If someone wanted to use this mod for any of their modpacks I would be very happy for you to do so.
  • If you want to see how it works or want to change it to work better for you I will post the link to the development version.
#9
Help / Re: Spawning items into game world.
August 17, 2016, 05:07:24 AM
Thank you, it now works! I'm still figuring a few things out so I might be asking some dumb questions, sorry.
#10
Help / Re: Spawning items into game world.
August 16, 2016, 10:15:06 PM
Alright so if it needs an integer instead of a string for the item's id, how/where can I find the id's of the items in the game?
#11
Help / Spawning items into game world.
August 16, 2016, 09:24:54 PM
Right now I am trying to figure out how to use C# with items for mods and have run into a problem. What I'm trying to do is create a block that will spawn in an item (steel), but it doesn't work.
Could not convert id number from thingID=Steel, numString= Exception=System.FormatException: Input string was not in the correct format
  at System.Int32.Parse (System.String s) [0x00000] in <filename unknown>:0
  at System.Convert.ToInt32 (System.String value) [0x00000] in <filename unknown>:0
  at Verse.Thing.IDNumberFromThingID (System.String thingID) [0x00000] in <filename unknown>:0

This error message will pop up so I must not be using the ThingID property correctly, has anyone used it before?

This is the code that I am using trying to spawn the item in with:

   
Thing item = new Thing();
item.ThingID = ("Steel");
                   
GenSpawn.Spawn(item, location);


#12
How can I check the xml def?
#13
Help / Tried to SetFactionDirect on a building error.
August 12, 2016, 06:20:02 PM
There is a problem when I try to create a new type of table in the game and spawn it in, it will say Tried to SetFactionDirect on VaultTable4848 which cannot have a faction..
I've looked through the xml file to see if "SetFactionDirect" is in the file, but I can't find it. The output log says: (Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)

Tried to SetFactionDirect on VaultTable4848 which cannot have a faction.

(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)

Setting up 1 worker threads for Enlighten.
  Thread -> id: 4a0 -> priority: 1


And the table xml file reads:
<?xml version="1.0" encoding="utf-8" ?>
<ThingDefs>

 
  <ThingDef>
    <DefName>VaultTable</DefName>
    <label>Vault construction table</label>
    <ThingClass>Building_WorkTable</ThingClass>
    <Description>Info on bench...</Description>
    <graphicData>
      <texPath>Things/VaultTable</texPath>
      <graphicClass>Graphic_Random</graphicClass>
      <drawSize>(3.5,1.5)</drawSize>
      <damageData>
        <cornerTL>Damage/Corner</cornerTL>
        <cornerTR>Damage/Corner</cornerTR>
        <cornerBL>Damage/Corner</cornerBL>
        <cornerBR>Damage/Corner</cornerBR>
      </damageData>
    </graphicData>
    <castEdgeShadows>true</castEdgeShadows>
    <staticSunShadowHeight>0.20</staticSunShadowHeight>
    <costStuffCount>75</costStuffCount>
    <CostList>
      <Steel>50</Steel>
      <Component>3</Component>
    </CostList>
    <stuffCategories>
      <li>Metallic</li>
      <li>Woody</li>
    </stuffCategories>
    <AltitudeLayer>Building</AltitudeLayer>
    <fillPercent>0.5</fillPercent>
    <useHitPoints>True</useHitPoints>
    <statBases>
      <WorkToMake>2500</WorkToMake>
      <MaxHitPoints>180</MaxHitPoints>
      <Flammability>1.0</Flammability>
    </statBases>
    <Size>(3,1)</Size>
    <DesignationCategory>Production</DesignationCategory>
    <Passability>PassThroughOnly</Passability>
    <pathCost>70</pathCost>
    <hasInteractionCell>True</hasInteractionCell>
    <interactionCellOffset>(0,0,-1)</interactionCellOffset>
    <surfaceType>Item</surfaceType>
    <inspectorTabs>
      <li>ITab_Bills</li>
    </inspectorTabs>
    <building>
      <spawnedConceptLearnOpportunity>BillsTab</spawnedConceptLearnOpportunity>
      <unpoweredWorkTableWorkSpeedFactor>0.4</unpoweredWorkTableWorkSpeedFactor>
    </building>
    <comps>
      <li Class="CompProperties_AffectedByFacilities">
        <linkableFacilities>
          <li>ToolCabinet</li>
        </linkableFacilities>
      </li>
      <li Class="CompProperties_Breakdownable"/>
    </comps>

  </ThingDef>
 
</ThingDefs>


Am I missing something from this?
#14
I am trying to create a piece of clothing that will not be affected by the materials it is made by, is there a setting to turn this off?
#15
I did some more looking around and went through the core mods folder, copied the slag smelting recipe def and replaced the broken recipe and then slowly began to filter through all of the parts changing it to fit what I am trying to do and it seems to work. I think there might have been a small misspelling or a combination of pieces not placed correctly that would break the system.