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

Help / [SOLVED] Finding Closest Mineable Rock
January 04, 2016, 04:10:00 PM
Hello all, I am working on getting my mod Horrors back up and running, however there is one hurdle in the way presently:

Previously I could locate the closest rock to my digger using this code:

public static Thing ClosestRock(Pawn digger, float rockSearchRadius)
            Predicate<Thing> validator = delegate(Thing t)
                Building building = t as Building;
                if (t.def.eType != EntityType.Rock)
                    return false;

                return (building.Position.CanReach(digger.Position, PathMode.Touch, TraverseMode.NoPassDoors, Danger.Some) && RockAttackUtility.IsGoodTrashTargetFor(t, digger));
                // return (caccoonBuilding.Position.CanReach(kidnapper.Position, PathMode.OnCell, TraverseMode.NoPassDoors, Danger.Some) && caccoonBuilding.container.Empty && ReservationUtility.CanReserve(kidnapper, caccoonBuilding, ReservationType.Use));
            return (Building)GenClosest.ClosestThingReachable(digger.Position, ThingRequest.ForGroup(ThingRequestGroup.Building), PathMode.Touch, TraverseParms.For(digger, Danger.Deadly, true), rockSearchRadius, validator, null, -1);

However, since the update, I no longer have a 'ThingRequestGroup.Building', it only describes items that are Artificial in nature and such. And the ThingRequestGroup is an enumerated integer that I cannot (Or don't know how to) alter.

So I tried everything I could think of on that approach, failed, and retook arms from another front, namely I looked at the 'JobGiver_Manhunter' code to determine how it targets turrets, the code is as follows (abridged):

private Thing FindTurretTarget(Pawn pawn)
return AttackTargetFinder.BestAttackTarget(pawn, (Thing t) => t is Building, 70f, 0f, TargetScanFlags.NeedLOSToPawns | TargetScanFlags.NeedLOSToNonPawns | TargetScanFlags.NeedReachable | TargetScanFlags.OnlyTargetCombatBuildings, default(IntVec3), 3.40282347E+38f);

But if I use that code to find a target I am running into another problem... It has to be hostile. So I dropped the 'TargetScanFlags.OnlyTargetCombatBuildings' flag in the hopes that it will work, but the class still has a check for hostility...

So I copied the class and created my own version where I merely removed the 'isHostile' check... But no joy.

Anyone have any suggestions regarding a possible way to approach this?

Thank you to anyone willing to read my issue and those whom reply, beforehand.
Help / [SOLVED] Executing code at game start.
March 01, 2015, 12:44:43 PM
Hey guys, Is there an elegant way to ensure some code gets executed at map start? Like say for instance I to instantiate something on map start that you gotta defend or I want to create an abstract class at game start for something like a noise generator and then feed those values to other things instead of constantly regenerating the noise over and over again.
Help / Horrors Mod - How do I...?
February 27, 2015, 05:48:36 AM
Hey guys I am working very hard on the Horrors mod, and I have all kinds of goodies lined up. However there are a few issues I am struggling with and I hope that maybe someone can help me figure it out.

Issue 1:

I have had moderate success, I can place blueprints down and I figured out how to set the blueprint faction. The issue however comes when I want pawns to build it. When I try to issue a job via thinktree using this code in the custom JobGiver_ I made:

return new Job(JobDefOf.PlaceNoCostFrame, new TargetInfo(pawn2.Position))
locomotionUrgency = LocomotionUrgency.Sprint

The pawns don't do anything. Same for JobDefOf.FinishFrame.
Any insights?

Issue 2:

I am having trouble getting this one to work. Trying to get a CompRottable on a human pawn seems to give me a null point reference. I can't see a RottingUtility or something like that. So I am kinda confused. Also I can't find where the debug menu rot tool is. If I can find that then I can reverse engineer it probably.

Issue 3:

I need to generate a perlin for the map. But everytime I do:

Perlin horrorPerlin = new Perlin(10, 5, 2, 4, Find.Map.WorldCoords.GetHashCode(), QualityMode.Medium);

public getPerlinValue(IntVec3 Pos)

If I do that and call to get the perlin from say a JobGiver_ then I don't get any errors, but all the values I get are 0...

Thanks for reading guys/gals. Hope you can throw the stick in the right direction for me and help me out. I have so many horrible things I still want my Horrors to do, and only YOU can help bring untold suffering to the Rimworlds.

Outdated / [A11] Darkness
February 11, 2015, 12:54:42 PM
Ambience Mod

This is a simple mod that changes the light levels during the nights. It makes nights much darker, sometimes completely dark (in storms) and is done mostly for aesthetic reasons. It helps create spooky atmospheres for more horror themed mods.

Author/Mod Team

DropBox: Darkness Alpha 11
DropBox: Darkness Alpha 11 (Slightly Brighter Overcast)

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

Currently it does not affect weapon accuracies beyond what is normal, if anyone can point me towards changing those values I would be very appreciative.

Also any help regarding changing eclipse light levels would also be awesome.

Oh and doesn't require a new colony. Should be safe to add/remove any time.

Working on getting caves permadark.


Alpha 11 (06/23/2015)
* Fixed for Alpha 11
* Tweaked saturation a little during fog

Update 2 for Alpha 9 (03/03/2015)
* Adjusted Dawn and Dusk colours.
* Added version with 0.05 night illumination in overcast weather instead of 0.01 (half the clear night darkness instead of one tenth)

Update 1 for Alpha 9 (20/02/2015)
* Eclipses are currently disabled by default, inside incidentdefs there are instructions to reactivate them if you so choose.
* Alpha 9 compatibility ensured.
* Added a banner to the mod menu for it.
Outdated / [MOD](Alpha 9) Horrors - Update 2
February 11, 2015, 12:43:00 PM
Faction Mod

This mod adds another faction to the game, however, this faction is not human or civilized in any way. What you will find is a rampant horde of Horrors from the Unknown that periodically assail your base.

Currently there are two enemies included, namely the Terror Worm and the Visceral. The prior is slow and relatively harmless, no more than area denial at first. And the latter is large and hulking, capable of easily doing fatal amounts of damage once up close.

Install into mods folder like any other mod and then activate via in-game menu. Please note that since this is a Faction mod, GENERATING A NEW WORLD is VITAL for it to take effect.


DropBox: Horrors for Alpha 9

I also suggest you play this mod with darkened nights for enhanced horror-ness:

Please go easy on me, this is my first mod for Rimworld.

Everything in this mod is free to use for whatever you want in accordance with Ludeon Studios' license agreement. Meaning you may not use its assets for commercial gain.


Alpha 9 Update 2 (25/02/5515)
* Rebalanced point cost of all Horrors.
* Rebalanced probability of all horrors appearing.
* Tweaked accuracy on Spitter Spines.
* Lowered Flaming Goo range.
* Added minimum range to Spitter spines.

Alpha 9 Update 1 (20/02/5515)
* TerrorWorms are Carnivorous for now, just until I can get rid of a bug they have when it comes to eating survival meals.
* Added Spitters.
* Rebalanced Attack compositions.
* Lowered Visceral Health 20%
* Increased Terrorworm health 10%
* Gave some love to the sound effects.
* Redid faction naming.
* Worlds now generate only one Horror site.
* Small tweaks across the board.
* Info text tweaks.
* Rebalanced hit chances on all horrors. (Not final yet).

Help / Adding Needs?
August 23, 2014, 08:18:16 AM
Is there a way to add other needs to a colonist, or to another pawn entirely, like for instance say I want to add a 'water' need for colonists, or a 'relaxation' need. Is this possible at present or not at all?