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

#1156
Help / Re: How to change ore drops from veins?
May 22, 2015, 03:58:45 PM
You need two basic things to create new mineable resource which will auto-gen (requires a new world).

Look at the existing xml defs for "RockBase" and it's derived objects (such as Granite).  They define the rock for the maps.  The other thing you need is something to mine which, for the core rocks, is "chunks."  Metals work almost identically and you will see how pretty quick.

Within a few hours I was able to create an aluminium production chain by mining bauxite rock into bauxite chunks which get turned into alumina at the stone cutting workbench and smelted with "industrial chemicals" (made at another workbench) to produce aluminium.  Not sure if I will make anything of it, it was just an personal challenge to figure out the systems involved and increasing levels of complexity.

xml to create mineable bauxite rock:
/Mods/modName/Defs/ThingDefs/Bauxite.xml
<?xml version="1.0" encoding="UTF-8"?>
<Defs>
<!--======================= Bases ==============================-->
<ThingDef Name="ResourceBase" Abstract="True">
<thingClass>ThingWithComps</thingClass>
<label>unspecified resource</label>
<category>Item</category>
<resourceReadoutPriority>Middle</resourceReadoutPriority>
<useHitPoints>true</useHitPoints>
<selectable>true</selectable>
<altitudeLayer>Item</altitudeLayer>
<stackLimit>75</stackLimit>
<comps>
<li>
<compClass>CompForbiddable</compClass>
</li>
</comps>
<alwaysHaulable>true</alwaysHaulable>
<drawGUIOverlay>true</drawGUIOverlay>
<rotatable>false</rotatable>
<pathCost>15</pathCost>
</ThingDef>
<!--======================= Natural Building Base ==============================-->
<ThingDef Name="BuildingNaturalBase" Abstract="True">
<category>Building</category>
<selectable>true</selectable>
<drawerType>MapMeshOnly</drawerType>
</ThingDef>
<!--======================= Natural Rock Base ==============================-->
<ThingDef Name="RockBase" ParentName="BuildingNaturalBase" Abstract="True">
<thingClass>Mineable</thingClass>
<graphicPath>Things/Building/Linked/Rock_Atlas</graphicPath>
<graphicClass>Graphic_Single</graphicClass>
<linkDrawerType>CornerFiller</linkDrawerType>
<altitudeLayer>BuildingTall</altitudeLayer>
<passability>Impassable</passability>
<castEdgeShadows>true</castEdgeShadows>
<fillPercent>1</fillPercent>
<coversFloor>true</coversFloor>
<neverMultiSelect>true</neverMultiSelect>
<rotatable>false</rotatable>
<saveCompressible>true</saveCompressible>
<filthLeaving>RockRubble</filthLeaving>
<holdsRoof>true</holdsRoof>
<staticSunShadowHeight>1.0</staticSunShadowHeight>
<blockLight>true</blockLight>
<mineable>true</mineable>
<statBases>
<Flammability>0</Flammability>
<Beauty>-2</Beauty>
</statBases>
<building>
<isInert>true</isInert>
<isNaturalRock>true</isNaturalRock>
<soundMined>CollapseRock</soundMined>
<canBuildNonEdificesUnder>false</canBuildNonEdificesUnder>
</building>
<linkFlags>
<li>Rock</li>
<li>MapEdge</li>
</linkFlags>
</ThingDef>
<!--======================= Chunk Base ==============================-->
<ThingDef Name="ChunkBase" Abstract="True">
<category>Item</category>
<thingClass>Thing</thingClass>
<altitudeLayer>Item</altitudeLayer>
<passability>PassThroughOnly</passability>
<fillPercent>0.4</fillPercent>
<statBases>
<MaxHitPoints>300</MaxHitPoints>
<Flammability>0</Flammability>
<Beauty>-10</Beauty>
</statBases>
<selectable>true</selectable>
<neverMultiSelect>true</neverMultiSelect>
<pathCost>55</pathCost>
<graphicOverdraw>false</graphicOverdraw>
<drawerType>MapMeshOnly</drawerType>
<randomizeRotationOnSpawn>true</randomizeRotationOnSpawn>
<designateHaulable>true</designateHaulable>
<saveCompressible>true</saveCompressible>
<stackLimit>1</stackLimit>
<tradeability>Never</tradeability>
</ThingDef>
<!--======================= Bauxite Rock ==============================-->
<ThingDef ParentName="RockBase">
<defName>Bauxite</defName>
<label>bauxite</label>
<description>Bauxite, an aluminium ore, is the world's main source of aluminium.</description>
<defaultColor>(169,131,120)</defaultColor>
<statBases>
<MaxHitPoints>1000</MaxHitPoints>
</statBases>
<building>
<mineableThing>ChunkBauxite</mineableThing>
<mineableDropChance>1</mineableDropChance>
</building>
</ThingDef>
<!--======================= Bauxite Chunk ==============================-->
<ThingDef ParentName="ChunkBase">
<defName>ChunkBauxite</defName>
<label>bauxite chunk</label>
<graphicPath>Things/Item/Chunk/ChunkStone</graphicPath>
<graphicClass>Graphic_Random</graphicClass>
<soundDrop>ChunkRock_Drop</soundDrop>
<defaultColor>(169,131,120)</defaultColor>
<thingCategories>
<li>StoneChunks</li>
</thingCategories>
</ThingDef>
</Defs>
#1157
I haven't encountered that but, I haven't tested it exaustively either.  The situation which I am using it - hiding production tables and furntiture until multiple research techs are completed - it works.  I have setup motars in my personal mod to hide behind multiple techs but I haven't actually tested them specifically.  Also, my test cases are usually with only the core and EdB mods enabled plus my own mod.  There may be some other mod interaction so, please consult your doctor before trying MyPotentiallyFaultyCode (tm).  :P
#1158
Quote from: OpalMonkeyIf you don't mind my asking, how did you go about getting it working?

Everything to do it is in the first code block of the first post.

Quote from: OpalMonkeyHaven't even played Alpha 10 properly yet  :o

haha, I know that feeling.  XD
#1159
Actually, I resolved this quite a while ago but it's interesting to see how you did it.  There's many ways to skin a cat.

I had heard that research couldn't prereq itself although I never tested it.  If that actually works, then it opens a few doors.
#1160
Help / Re: Vanilla armor XML location
May 19, 2015, 06:55:20 PM
You'll find everything here:

%RimWorld%/Mods/%Mod%/Defs/

Where %RimWorld% is your install directory and %Mod% is the name of the mod, the core game is in "Core."

For game objects, be it a work table, weapon, food or even drop pods, you want the "ThingDefs" directory in "Defs."

I recommend creating your own mod (even if it's just for yourself) instead of changing the "Core" mod.
#1161
Help / Re: mars mod
May 19, 2015, 06:44:39 PM
Well, domes would provide the room/area protection, but when you crash land, you hardly have domes available to move into.  There-in lies my original point.  Until you have built the domes (taking much time), you are at the mercy of a lethal environment.  Even walling a small cave off to protect you, you'd likely be dead before it's done as it's more than simply tossing a couple sheets of plywood up over a frame.  Creating a sealed, contained atmosphere is not a trivial task when all you have is some scrap steel to work with.  Without having even some basic advanced tools (that is, you need tools for metal fabrication, plastics, rubber compounds), survival would simply be impossible beyond a few days.  Assuming having suits would mean you could survive the environment long enough to wall off a small cave, build the required minimal infrastructure to produce and contain a breathable environment then generate said environment, well, you're still dead by starvation since opening your helmet to eat would expose you (and your meal once opened) to all the things that kill you within minutes.  Surviving a hostile planetoid requires pre-colonization before the colonization occurs.  The pre-colonization is where unmanned ships are sent to deposit the basic necessities the colonists need such as habitat modules, food production, food stores (survival meals) and compressed atmosphere (air tanks) until the food production and by extension atmosphere generation, kicks in.  There is a huge process and cost associated with this, especially since radiation protection means gold lining.  Gold, and some other metals, block the nasty infra-red and lets most of the visible light through, the main reason for it's use (vs silver, copper and aluminium) is that it doesn't corrode and thus lose effectiveness as well as being easier to work with.  The ISS, the (now defunct) NASA Shuttle Program and existing manned rockets all use a paper-thing layer of gold lining around the main crew compartments.  This isn't a complete lining as there are windows (albeit there is gold in them too), portals, etc.  This is another one of the problems with existing space exploration, not just the effects of a near 0g environment but the extreme doses of radiation exposure (limiting length and frequency of space walks and other activities).

As to the fantasy, if the flora/fauna don't need air to breathe...doesn't that make such a mod moot?  The lore of the game (did anyone actually read the lore behind RimWorld besides me, Tynan did a fairly decent basic write-up to setup the game and it's pretense) already states that the worlds have largely been terraformed from hostile environments to colonizable worlds, even if the colonization process wasn't complete (ie, not all the worlds ended up having colony ships sent but at some point they were terraformed.)  If it's sci-fi magic then there is no need to worry about atmosphere or deadly radiation, it's sci-fi magic.
#1162
Help / Re: mars mod
May 19, 2015, 04:22:12 PM
How would you cross the death-in-less-than-10-minutes-due-suffocation barrier after you crash and before you can do anything to stop it?  The second too-much-unfiltered-harmful-radiation-which-kills-in-days barrier is less of a hurdle but still a big one.

I like the idea of a non-breathable planetoid start but you would need to change a huge amount of stuff and add new stuff to allow survival for that crucial first few minutes of exposure to a hostile environment.  Inside rooms wouldn't be too bad (pressurized environment, hydroponics to produce oxygen/"air", etc).  You'd need to track oxygen/"air" levels in environments and environment loss through portals (doors).  Somehow provide a means to deal with the lack of natural biological resources (flora/fauna).  If you want to do a planetoid with absolutely no atmosphere, then you have other issues like solar radiation (earths atmosphere, for example, blocks most of the suns radiation and only a small percentage actually reaches the surface, mostly as visible light, some as infrared (thermal) radiation), cosmic radiation (the same radiation that comes from the local star but is from the galaxy as a whole and doesn't include the star you are orbiting).  There would be no other factions on the planet with less than a "spacer" tech-level as colonizing such a planetoid would require technologies already available to deal with all the aforementioned problems.  Everyone "outside" would need environmental suits to not only provide "air" to breath but protect against the radiation which makes clothes a problem for pawns transversing areas.  Without an atmosphere (and free water) there are no "seasons" just a "hot" and "cold" period based on the planets orbit but no rain/snow.

If you could pull all this off or fake it enough to make it believable, it would be an interesting mod to try.  I only see problems with certain areas namely - tracking atmosphere and radiation levels for areas/rooms and pawn clothing for surviving area transversal.
#1163
Take a look at mipen's Mechanical Defense 2.  The droids all have custom backstories which is set in dll code.  If you take a look, these are the droids you are looking for.
#1164
Help / Re: uranium... radioactive attribute?
May 17, 2015, 02:42:18 AM
That's what he's asking for, he want's it to be radioactive.  It would require some C# coding to do such a thing but I'm not sure the best way do it.
#1165
Mods / Re: Could not resolve cross reference?
May 15, 2015, 03:55:56 PM
It's your path names in your xml, you need to use unix style path names.  That is, use / instead of \.

ie:
directory1\directory2\filename

Becomes:
directory1/directory2/filename

Or:
<worngraphicPath>Hats\LegionaireHelmet\Rome</worngraphicPath>

To this:
<worngraphicPath>Hats/LegionaireHelmet/Rome</worngraphicPath>
#1166
I was looking at this myself a few weeks ago and couldn't find anything on the table itself nor attached bills to help so, I ended up doing exactly what you don't want to do - check the interaction cell for a pawn and then see if that pawn has a job and if it does, is it at the table we want.

If you can make your checks fast enough and short-circuit your code, the impact of checking the interaction cell isn't too bad.  The ThingComp CompPowerLowIdleDraw in CommunityCoreLibrary tries to be fairly efficient in it's scanning method.  For worktables, I set the ticker to rare as a pawn will always be at a table for more than a single rare tick to complete a bill (unless the player is micro-managing.)  So I can do the check reasonably fast and minimize how often I am doing it.
#1167
Actually, now it is officially affiliated with A2B and the recommended method to get this add-on is through the github link on the A2B thread OP.

This thread will be left for historic purposes (ha!) but I am otherwise locking it and removing the download link from this thread.  Please direct all comments/concerns to the A2B main thread and I will addres them there.  Further, suggestions for more A2B add-ons should be made there too.
#1168
I'm glad it's working for people and reduce the amount if info logged to basics/errors.  Further, my local copy now also injects missing research prerequisites and makes them red for easy identification.

I'm also looking at getting it to tell more about the tech when hoving the mouse including, files which define it in mod order, highlighting the parent tree and directly opening the file(s) the tech is defined.
#1169
Quote from: Neal Raven on May 11, 2015, 05:21:18 AMI always get "Could not locate game mods directory!" even though I placed the exe in the rimworld folder...

It's in the same place as RimWorldNNNWin.exe and can't find Mods\ in the same directory??? ie:

Some Directory Containing RimWorld\
+ Mods\
+ RimWorldNNNWin.exe
+ RimSearch.exe

If it can't find it that case, the runtime library for this compiler is borked.  I'm not doing anything strange to get the directory, just calling the runtime function to return the local directory structure filtered for the mods path, specifically:

Const As String ModsDir = "Mods"
If( Dir( ModsDir, fbDirectory ) = "" )Then
   '' Derp, not found :(
EndIf

Where fbDirectory is a library constant (bitwise flag) filtering file table attributes (ie, entries with only the directory bit set so, no files).  If that is failing then there is nothing I can do about the runtime library short of writing and submitting a patch but I would need to know what specifically caused the error which I can't reproduce locally (not that I want to write compiler patches).  Otherwise, it's switch tool chains (which I was going to do anyway, this was just originally a quick'n'dirty program).

Quote from: Neal Raven on May 11, 2015, 05:21:18 AMMy rimworld folder is on dropbox though, could that have anything to do with it?

Well, it might actually.  If I create a symlink to a directory located somewhere else, the runtime library is fooled because the Windows file system resolves the symlink and returns everything you'd expect as if the file/directory was local.  Using a 3rd party tool which emulates such behaviour, like dropbox, may interfere in that it's not a believable liar and my program correctly identifies it's not there.  That is the runtime may be using to low a level API to access the files and dropbox isn't "deep enough" to trap it.  But, since the runtime is the standard crt lib (c runtime library) which is installed with Windows, it should be smart enough to trap that.
#1170
ok, mrofa, if you would be so kind as to try this version (attached to this specific post) and let me know the log results if it fails and just let me know in general if it works, that would be gre-e-e-e-e-at.

[attachment deleted due to age]