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

#1
Saw this in Disnof stream today, it's a heavily modded playthrough though so I really don't know if it's an issue with the core.

https://www.twitch.tv/videos/162207217?t=6h11m40s

A builder tries to get steel from a mined vein to the north instead of using steel dropped in pods. Sadly the camera wasn't on the siege at the time so we can't see anything useful.

I poked around the code and didn't find a method for construction specifically for sieges. Some pawns get assigned as builders then they use normal colonist methods for getting resources and building. Perhaps sieges should use a method that looks for resources within a radius of the siege point and requests more resources if it doesn't find any.
#2
https://clips.twitch.tv/CredulousBigClintBudStar

I ran a search and this has been marked as fixed in the past but it seems not to be.
#3
Outdated / [A17] OPAL: Orbital Peace Assurance Laser
April 10, 2017, 12:36:54 PM


Latest update: July 14, 2017 | Download

Click here for a video demonstration!




Got a manhunter problem that won't go away? A siege that is wrecking your shit? A psychic ship you can't get near? You need OPAL! For a modest* fee, our satellite will position itself above any target you choose and beam down pure energy until the problem is solved**. Contact OPAL to see if we service your Rim.

* 10,000 silver per use
** 10-20 seconds only

OPAL is a satellite that orbits your rimworld and every now and then it will come in range of your comms console. Buy a use of OPAL's laser and you will be given a laser guidance device. In a time of great need, deploy the laser and watch your foes be vaporised! You only get one use per purchase though so use it wisely.

Thanks to the Industrialization mod, originally developed my eatKenny and currently maintained by duduluu, for their skydriller code, without which this mod would not have been possible.

This mod was designed with modded storytellers in mind, such as Pandora Dark by Britnoth. For vanilla gameplay, it might be a bit overpowered, although it is very expensive to compensate. For Pandora, however, the concept of overpowered is meaningless. This is because the difficulty increases exponentially, which means that adding 10,000 to your wealth might add 3 raiders to the next, then adding 10,000 more might add 6 more raiders. The result is that something overpowered in the early game becomes merely average in the middle game and underwhelming in the late game. Modded storytellers allow us to go past the late game stage into something I'll call the late-late game and vanilla content does not keep up. When you're facing a horde of 5000 manhunter wargs, you'll be glad OPAL has your back.

Updated to A17!
#4
Outdated / [A16] FireDepartment
December 31, 2016, 09:08:35 PM
Latest update: January 1, 2017 | Download

Special thanks to Nattiejim for the firefoam grenades code. I have borrowed it in its entirety and used it as a reference to create the extinguisher and launcher.

Adds 3 items:

* Fire extinguisher - close range, fast, weak
* Firefoam grenades - medium range, slow, moderate strength
* Doomsday firefoam capsule launcher - long range, huge area, strong, single use

All can be crafted at the machining table or bought from exotic traders. Firefoam is a required research to craft them.

Videos:

Spartyon7 using a fire extinguisher to counter a centipede with an inferno cannon
Doomsday firefoam capsule launcher
Fire extinguisher
Firefoam grenades
#5
Video (Warning: Strong Language): https://clips.twitch.tv/disnof/SmoggyGullRitzMitz

Shouldn't animals stay at least a cell away from flames? Real animals would. This behaviour is a bit silly.

Further video: https://clips.twitch.tv/disnof/UninterestedSwallowBCWarrior
#6
Outdated / [A16] ReinforcedConcreteWall
December 15, 2016, 12:25:38 AM


Latest update: December 15 2016 | Download

The A15 version works in A16.

Adds a stronger wall for late-game. Intended to be balanced around the Pandora storyteller. As of 1.0, the wall has 5000 hp and is 99% resistant to fire.

The cost of each wall is 5 aggregate, 1 cement and 5 rebar. Aggregate is crafted from stone chunks at the stonecutter's table. Cement is crafted from limestone chunks or limestone blocks at the stonecutter's table. Rebar is crafted from steel at the fueled/electric smithy. Research stonecutting and smithing to unlock the wall designator.

The dependency on limestone is both for realism and for balance. If your map has no limestone, you can buy bricks. In A16, raiding other colonies and deconstructing their limestone walls/floors will be an option.

I'm open to suggestions about balance. 5000 hp is a lot and I don't think the current cost is high enough.
#7
Outdated / [A13-1.0][Modlist] RD's QoL Mods & More
July 21, 2016, 03:59:59 PM
2019 April Latest news: I'm back! Updating my mods to 1.0.

I've been pumping them out since A14 and I still have ideas so it's time for a list post.

Shinzy, when you see this, make me a banner or something  8)


[1.0.x] SlowDown

Allows you to choose between speeding the game up (normal mechanic) and slowing the game down. Toggle slowdown by pressing 5. The normal speed options are now reversed, and very fast becomes very slow. Useful for no-pause runs or for capturing video of the game during intensive situations i.e. a hundred manhunting wargs versus fifty colonists, when framerates are normally highly variable.

I have plans for implementing a cooldown meter mechanic. Running in normal or fast speeds fills up the slowdown meter and running in slow speed empties the meter. First I'll have to learn how to draw a meter to the GUI layer.

Downloads - Steam


[1.0.x] WildAnimalAlert

Alerts the player whenever a wild animal enters the map. This is useful in extremely cold maps where growing is difficult and hunting is the primary source of food.

Downloads - Steam


[A17] OPAL: Orbital Peace Assurance Laser

Tynan liked it so much he made his own version of it!

Got a manhunter problem that won't go away? A siege that is wrecking your shit? A psychic ship you can't get near? You need OPAL! For a modest* fee, our satellite will position itself above any target you choose and beam down pure energy until the problem is solved**. Contact OPAL to see if we service your Rim.

* 10,000 silver per use
** 10-20 seconds only

Downloads



[A16] FireDepartment

Adds a three tools for fighting fires: fire extinguisher (short range), firefoam grenades (medium range), doomsday firefoam capsule launcher (long range).

Downloads


[A16] ReinforcedConcreteWall

Adds a stronger wall for late-game. Intended to be balanced around the Pandora storyteller. As of 1.0, the wall has 5000 hp and is 99% resistant to fire.

Downloads


[A16] BabyBattery

A smaller battery, 1x1, that costs the same as a large battery. It holds less charge but it is much more efficient at storing charge than a larger battery.

Downloads


[A14] [CCL] DevSpeedEnabler

If the hidden fourth speed mode "dev speed" is the only tool from dev mode that you use, this mod is for you. It enables dev speed outside of dev mode.

Downloads


[A16] FloorBeautyRebalance

Why do wooden floors have no beauty? Why do smoothed stone floors have more beauty than stone tiles? These questions are addressed by this mod.

Downloads


[A16] HardyDevilstrand

Devilstrand takes forever to grow but dies in a instant. I fix this by removing some ways that devilstrand dies: extreme cold and toxic fallout.

Downloads


[A15] AllowDazedDrops

Important notice: As of A16, this mod is no longer necessary. Tynan changed the mood and pawns no longer drop their stuff.

When pawns enter a dazed state they often shed their clothes and throw down their weapons. No big deal, but why aren't my other colonists cleaning these items up? They will now!

Downloads


[A14] [CCL] NicknameTweaks

Increases nickname character limit for colonists from 15 to 27 - longer does not render nicely. Also implements a tag scheme at the end of each nickname:

Quote from: Spartyon7The letters after the colonists name denote whether they are a shooter (S), brawler (B), or non-violent (NV). It also tells whether they are a hauler (H) or non-hauler (NH). These letters are just to make it easier for me to see who to grab when I need certain things done quickly.

Downloads


[WIP] [A13] BlackGold: There's oil in them thar hills

BlackGold aims to be a mod that adds a new resource to the Rim: oil. I'll get to this eventually, probably.

Downloads
#8
Outdated / [A14] [CCL] DevSpeedEnabler
July 21, 2016, 09:24:39 AM
Requires CCL

Latest update: July 21 2016 | Download

If the hidden fourth speed mode "dev speed" is the only tool from dev mode that you use, this mod is for you. It enables dev speed outside of dev mode.
#9
Outdated / [A16] FloorBeautyRebalance
July 19, 2016, 05:34:20 PM

Suggested by Spartyon7

Latest update: January 1, 2017 | Download

Before: Wood floors give 0 beauty. Smooth stone floors give 3 beauty. Smoothing requires 1200 work.

After: Smoothing takes 400 work. Wood and stone floors now have 3 levels: rough, smooth and polished. Smoothing a floow improves beauty by 1. Wood ranges from 0 to 2 beauty and stone ranges from -1 to 1 beauty.
#10
Outdated / [A15] AllowDazedDrops
July 18, 2016, 12:57:42 AM
Requested by sirgzu

Latest update: August 31 2016 | Download

When pawns enter a dazed state they often shed their clothes and throw down their weapons. No big deal, but why aren't my other colonists cleaning these items up? They will now!

This mod provides a modified version of the MentalState_WanderPsychotic class which is invoked by MentalBreakDef WanderPsychotic. Any mod that modifies WanderPsychotic will conflict with this mod.
#11

Current version: v0.3 - Github link - latest changelog

BlackGold aims to be a mod that adds a new resource to the Rim: oil.



Features:

  • Oil gusher - copied from steam geysers because why reinvent the wheel? Place a pump jack on it to harvest oil.
  • Pump jack - it is to oil what geothermals are to steam. Used to fill barrels with oil. Must be researched first.
  • Barrel - made from a few steel in a barrel table. Must be researched first.
  • Refinery - refines crude oil into petroleum.
  • Petrol-powered generator - fueled by barrels of oil, a barrel will power the generator for 2 days.
  • Chemical Plant - makes products from petroleum.
  • Plastic - resource made in the chemical plant.
  • Plasteel - adds a recipe to make plasteel from plastic and steel in the electric smelter

Planned:

  • Replace pump jack with two buildings: hand pump and electric pump jack
  • Make oil barrels explosive
  • Add an asphalt floor made from tar which would be made from petroleum

Need help with:

  • Sprites - all of the sprites
  • Seriously, I'm borrowing 2 sprites from a Factorio mod without permission as placeholders - the refinery and the chemical plant
  • halp

Screenshots:

#12
Help / How to properly define ThingDefs?
June 09, 2016, 06:26:25 AM
I'm working on a mod that copies much of the SteamGeyser code to create oil gushers. The idea is that you build a pump jack on the gusher and then pawns can use the pump to produce barrels of oil.

This is the error:

Object reference not set to an instance of an object

This is the class throwing the error:

using Verse;

namespace BlackGold
{
    public class PlaceWorker_OnOilGusher : PlaceWorker
    {
        public override AcceptanceReport AllowsPlacing(BuildableDef checkingDef, IntVec3 loc, Rot4 rot)
        {
            Thing thing = Find.ThingGrid.ThingAt(loc, ThingDefOf.OilGusher);
            if (thing == null)
            {
                return "Thing is null: " + thing.ToString();
            }
            if (thing.Position != loc)
            {
            return "MustPlaceOnOilGusher".Translate();
            }
            return true;
        }
    }
}


I believe that I have need to define some ThingDefs to make this work. Here is my ThingDefOf.cs:

using RimWorld;
using Verse;

namespace BlackGold
{
    public static class ThingDefOf
    {
        public static ThingDef OilGusher;

        public static void RebindDefs()
        {
            DefOfHelper.BindDefsFor<ThingDef>(typeof(ThingDefOf));
        }
    }
}


Defining a ThingDef in ThingDefOf did not fix the issue though.

Any thoughts?
#13
BlueprintsEverywhere is a WIP title and doesn't represent the mod's intentions going forward per se

Current release: v0.2.0

Github: https://github.com/lost-RD/BlueprintsEverywhere

Requires CCL

How to use:


  • Load after CCL
  • Designate a wall blueprint on natural stone or other mineables
  • Watch in amazement

I was building a mountainhome and found that having to wait for a natural stone wall to be mined before I could designate a replacement wall that offers more beauty and luxury was very inconvenient. I like to pause, designate a whole bunch of plans, then unpause and watch my peons go about carrying out my orders. I hope I'm not the only one.

Thanks to the help of some of the experienced coders/modders of this community, I cobbled together a mod to solve my own problem and I'm posting it here so you can use it if you share my frustration.

The mod is functional but not balanced or even implemented in the best way which is why I've posted this in the unfinished section.
#14
Help / How to modify a static class from Verse?
May 11, 2016, 05:47:09 AM
Update: I have a prototype working thanks to CCL detours, see here for the repo. Here is a quick video of how it works currently.




Original post:

I decompiled Verse.GenSpawn and I want to drop in a premature return to enable the placement of blueprints everywhere. Here's my edit of GenSpawn:

http://pastebin.com/Pud35KP5

I commented out everything I don't want to touch. My plan was to compile this and have it overwrite the base methods. I'm finding that my DLL is having no effect. What am I doing wrong?

I've done some poking around various mods and forum topics and I've implemented a couple of things that I thought would solve the issue (such as [StaticConstructorOnStartup]) but nothing has worked.

None of the tutorials seem to cover this case.
#15
I'd like to be able to build my slate walls on tiles that contain slate rock. Having to mine away the rock first makes no sense when all I want my colonists to do is mine away the face of the wall and replace it with a beautiful brick face, not remove the whole ugly rock wall and then have to rejig my prison rooms and whatnot.

This mod would not add any new tools, it would just change the list of tiles that walls are allowed to be built on.

I've suggested it and a good few people were interested.

Edit 8: I posted in the help forum and got some great advice. Check out this topic to see the progress I've made.

Everything below here is somewhat redundant now but I'll leave it.




Edit: I'll try to make it myself but I've never used C# and am not an experienced modder.

NB: Everything past this point is stream-of-consciousness and you probably shouldn't read all of it but feel free skip to the bottom of the post and tell me if my proposed solution is terrible or not

So I'm peeking around the source code and I've found some relevant code

public static bool CanBuildOnTerrain(BuildableDef entDef, IntVec3 c, Rot4 rot)
{
TerrainDef terrainDef = entDef as TerrainDef;
if (terrainDef != null && !c.GetTerrain().changeable)
{
return false;
}
if (entDef.terrainAffordanceNeeded == TerrainAffordance.Any)
{
return true;
}
CellRect cellRect = GenAdj.OccupiedRect(c, rot, entDef.Size);
cellRect.ClipInsideMap();
CellRect.CellRectIterator iterator = cellRect.GetIterator();
while (!iterator.Done())
{
TerrainDef terrainDef2 = Find.TerrainGrid.TerrainAt(iterator.Current);
if (!terrainDef2.affordances.Contains(entDef.terrainAffordanceNeeded))
{
return false;
}
iterator.MoveNext();
}
return true;
}


Specifically:

if (!terrainDef2.affordances.Contains(entDef.terrainAffordanceNeeded))
{
return false;
}


So I'll need to modify the affordance that walls need.

Edit 2: Nope, affordances are a floor thing, not a walls thing. Back to the drawing board.

Looking at Various_Stone.xml, UglyRockBase is the ParentName of the stone that I want to be able to designate walls onto.

From Buildings_Structure.xml:

  <ThingDef ParentName="BuildingBase" Name="Wall">
    <defName>Wall</defName>
    <label>wall</label>
    <thingClass>Building</thingClass>
    <category>Building</category>
    <description>An impassable wall. Capable of holding up a roof.</description>


Next objective is to find where Building things are defined.

Edit 3: Verse.ThingCategory contains Building. Cool.

There isn't a Building_Wall in the RimWorld namespace which makes sense because walls don't do anything, they just exist and can be destroyed. Instead I'll look at BuildingProperties.  Within it I see public bool isNaturalRock;. I found nothing useful when analysing that bool.

Edit 4: My next idea is to use the canPlaceOverWall tag and re-purpose it so that walls can be placed over other walls, then take it further and somehow convince the game engine that rough stone is a wall so that anything that canBePlacedOverWall [sic] can be placed on it.

The relevant code is in Verse.GenSpawn:

// Verse.GenSpawn
public static bool CanPlaceBlueprintOver(BuildableDef newDef, ThingDef oldDef)
{
if (oldDef.EverHaulable)
{
return true;
}
if (oldDef == ThingDefOf.SteamGeyser)
{
return newDef == ThingDefOf.GeothermalGenerator;
}
ThingDef thingDef = newDef as ThingDef;
BuildableDef buildableDef = GenSpawn.BuiltDefOf(oldDef);
ThingDef thingDef2 = buildableDef as ThingDef;
if (oldDef.category == ThingCategory.Plant && oldDef.passability == Traversability.Impassable && thingDef != null && thingDef.category == ThingCategory.Building && !thingDef.building.canPlaceOverImpassablePlant)
{
return false;
}
if (oldDef.category == ThingCategory.Building || oldDef.IsBlueprint || oldDef.IsFrame)
{
if (thingDef != null)
{
if (!thingDef.IsEdifice())
{
return (oldDef.building == null || oldDef.building.canBuildNonEdificesUnder) && (!thingDef.EverTransmitsPower || !oldDef.EverTransmitsPower);
}
if (thingDef.IsEdifice() && oldDef != null && oldDef.category == ThingCategory.Building && !oldDef.IsEdifice())
{
return thingDef.building == null || thingDef.building.canBuildNonEdificesUnder;
}
if (thingDef2 != null && thingDef2 == ThingDefOf.Wall && thingDef.building != null && thingDef.building.canPlaceOverWall)
{
return true;
}
if (newDef != ThingDefOf.PowerConduit && buildableDef == ThingDefOf.PowerConduit)
{
return true;
}
}
return (newDef is TerrainDef && buildableDef is ThingDef && ((ThingDef)buildableDef).CoexistsWithFloors) || (buildableDef is TerrainDef && !(newDef is TerrainDef));
}
return true;
}


In that block is the code that allows geothermals to be placed on steam geysers. Also, if you're trying to build on something that is haulable, congratulations, that's a valid place to build. Also, if the new thing is not a power conduit and the old thing is, you're golden. Now we're getting somewhere. I want to put some code in there that says:

if (oldDef == ThingDefOf.Stone && newDef == ThingDefOf.Wall || oldDef == ThingDefOf.Wall && newDef == ThingDefOf.Door)
{
return true;
}


I'm not sure it's even possible to solve the problem that way though because SteamGeyser is defined using a defName tag and stone is not. The problem I'm having is that I'm not sure how stone is defined and how I should select or interact with it. Door, Autodoor and Wall are all defName compatible.

I might be able to use the isNaturalRock tag. I'll have to study Verse.GenSpawn some more.

Edit 5: Alright, I deciphered GenSpawn:

// Verse.GenSpawn
public static bool CanPlaceBlueprintOver(BuildableDef newDef, ThingDef oldDef)
{
// true if the old building is haulable
if (oldDef.EverHaulable)
{
return true;
}
// return geothermal if the old building is a geyser
if (oldDef == ThingDefOf.SteamGeyser)
{
return newDef == ThingDefOf.GeothermalGenerator;
}
ThingDef thingDef = newDef as ThingDef;
BuildableDef buildableDef = GenSpawn.BuiltDefOf(oldDef);
ThingDef thingDef2 = buildableDef as ThingDef;
// false if old building is an impassable plant and the new building can't be placed on impassable plants
if (oldDef.category == ThingCategory.Plant && oldDef.passability == Traversability.Impassable && thingDef != null && thingDef.category == ThingCategory.Building && !thingDef.building.canPlaceOverImpassablePlant)
{
return false;
}
// if old building is a building or a blueprint or an "unspecified building frame"
if (oldDef.category == ThingCategory.Building || oldDef.IsBlueprint || oldDef.IsFrame)
{
// if the new building is not null (very sensible start)
if (thingDef != null)
{
// if new building is not an edifice - i.e. is a power conduit
// return true if no old building or can build conduit under AND either the old or new building does not transmit power
// this is the place conduits under things case
if (!thingDef.IsEdifice())
{
return (oldDef.building == null || oldDef.building.canBuildNonEdificesUnder) && (!thingDef.EverTransmitsPower || !oldDef.EverTransmitsPower);
}
// if new building is not a conduit and old building is a conduit
// return true if conduits can exist under new building
// this is the place things on conduits case
if (thingDef.IsEdifice() && oldDef != null && oldDef.category == ThingCategory.Building && !oldDef.IsEdifice())
{
return thingDef.building == null || thingDef.building.canBuildNonEdificesUnder;
}
// return true if old building exists and is a wall and new building exists and can be placed over a wall
// this is the door case
if (thingDef2 != null && thingDef2 == ThingDefOf.Wall && thingDef.building != null && thingDef.building.canPlaceOverWall)
{
return true;
}
// return true if new building is not a conduit and old building is a conduit
// this is another place things on conduits case
if (newDef != ThingDefOf.PowerConduit && buildableDef == ThingDefOf.PowerConduit)
{
return true;
}
}
// return true if placing a floor and existing structure coexists with floors or is already a floor
return (newDef is TerrainDef && buildableDef is ThingDef && ((ThingDef)buildableDef).CoexistsWithFloors) || (buildableDef is TerrainDef && !(newDef is TerrainDef));
}
// return true if all the other shit is not relevant
return true;
}


Line 22 says "// if old building is a building or a blueprint or an "unspecified building frame" " and I'm willing to bet that placing a wall onto stone does not satisfy the conditions. A quick and dirty way to make this work might be to do an else and check whether the new building is a wall and return true if so. Kinda like this:

// Verse.GenSpawn
public static bool CanPlaceBlueprintOver(BuildableDef newDef, ThingDef oldDef)
{

...

// if old building is a building or a blueprint or an "unspecified building frame"
if (oldDef.category == ThingCategory.Building || oldDef.IsBlueprint || oldDef.IsFrame)
{

...

}
else
{
if (newDef == ThingDefOf.Wall)
{
return true;
}
}
// return true if all the other shit is not relevant
return true;
}


Would the above code cause any serious issues?

Edit 6: That was dumb. Whether I put in my else or not, there's a return true regardless. If building a wall is going to fail because it's on stone, it's going to fail before it reaches this method.

Verse.GenSpawn.CanPlaceBlueprintOver is used by RimWorld.GenConstruct.CanPlaceBlueprintAt. The code block is as follows:


if (!godMode)
{
foreach (IntVec3 current4 in GenAdj.CellsOccupiedBy(center, rot, entDef.Size))
{
foreach (Thing current5 in Find.ThingGrid.ThingsAt(current4))
{
if (!GenSpawn.CanPlaceBlueprintOver(entDef, current5.def))
{
AcceptanceReport result2 = new AcceptanceReport("SpaceAlreadyOccupied".Translate());
return result2;
}
}
}
}


If you're playing normally (not in god/dev mode), for each cell that the building would occupy, for each thing in each cell, check whether the thing already there is compatible with the thing you're trying to build. If it can't be built, generate a report that says the space is occupied. If all is well, generate a report that says the blueprint can be placed. If it's going to fail, it's going to fail before this.

I'm going to check what the game says when I try to build a wall on stone in vanilla.

Edit 7: I'm glad I checked because it's definitely the SpaceAlreadyOccupied report. I'm really not sure where false is being returned. I'm going to try compiling a version of the method that simply returns true.
#16
Having to designate a stone wall to be mined, waiting for it to be mined and only then being able to designate the placement of a wall is, in my opinion, inefficient design and I would like to see it changed.

In Dwarf Fortress there is a "smooth wall" command as well as a "smooth floor" command that Tynan has borrowed. I request we get an equivalent to smooth wall command efficiency-wise but in the Rimworld style of walls being constructed from blocks.