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

#121
Help / Problem with Hoppers
September 11, 2014, 03:32:14 PM
How are we dealing with hoppers when they are placed between 2 buildings that can use their inv?

Am i right in thinking currently if building 1 grabs the item from the hopper while building 2 has finished its check to see if theres an item there but hasnt grabbed it yet, itll barf.

Consider this:

private Thing StuffInHopper
        {
            get
            {
                ThingDef thingDef = ThingDef.Named("Hopper");
                Thing result;
                foreach (IntVec3 current in GenAdj.AdjacentSquaresCardinal(this))
                {
                    Thing thing = null;
                    Thing thing2 = null;
                    foreach (Thing current2 in Find.ThingGrid.ThingsAt(current))
                    {
                        if (current2.def == ThingDef.Named("Stuff"))
                        {
                            thing = current2;
                        }
                        if (current2.def == thingDef)
                        {
                            thing2 = current2;
                        }
                    }
                    if (thing != null && thing2 != null)
                    {
                        result = thing;
                        return result;
                    }
                }
                result = null;
                return result;
            }
        }


If 2 buildings were running that in their class and in tick were doing:

do
                    {
                        int num3 = Mathf.Min(StuffInHopper.stackCount, num);
                        num2 += num3;
                        list.Add(StuffInHopper.def);
                        StuffInHopper.SplitOff(num3);
                        if (num2 >= num)
                        {
                            break;
                        }
                        StuffInHopper= this.StuffInHopper;
                    }
                    while (StuffInHopper!= null);


Thats gonna barf right? so can we tell buildings to reserve items in hoppers even if its only for a few ticks?
#122
Help / if mod exists
September 10, 2014, 02:45:42 AM
Hi there, is there any way to do a "if such and such mod exists" in any way. For example i have 2 mods moreWeapons and moreTurrets the weapon mod has a flamethrower in it, right now if i wanted to use said flamethrower in the turret mod for a recipe I have to add the thingdef etc to it as well. What id like is almost like the research dependency but for mods. So if weapon mod exists then you can build this turret, if not its not available.
#123
Help / Help updating mod
September 09, 2014, 03:52:34 PM
Im having a crack at updating Mechatronics and am most of the way there, just a couple of hangups in the DLL that I cant seem to find their replacements/updates:

if (this.connectedToTransmitter != null)

I dont even know what connectedToTransmitter was supposed to do??? TransmitsPower maybe?

Ahah got that one:

if (this.def.ConnectToPower != null)

-------------------

this.story.adulthood.workDisables = 9141;

It doesnt like the number 9141 as im guessing it doesnt exist in the worktags enum anymore, anyone know what worktag 9141 is now or used to be or anything?

Fixed this one, defined the backstories myself.

-------------------

this.playerController.workSettings.InitialSetupFromSkills();

Says workSettings doesnt exist inside playerCOntroller but it does as far as I can tell

Fixed that one with:
this.playerController.pawn.workSettings.InitialSetupFromSkills();

-------------------

this.psychology.Loyalty.set_curLevel(100f);
this.psychology.Happiness.set_curLevel(100f);
this.psychology.Fear.set_curLevel(0f);


there doesnt seem to be these inside Psycology anymore, anyone know what they should be now, tried mood to no avail?

Thanks to Haplo below this ones done.

-------------------

if (this.health <= 0)
                {
                    Explosion.DoExplosion(base.Position, 1.9f, DamageTypeDefOf.Bomb, this);
                }


Moaning about Explosion not existing in the current context, was this replaced with something?

Again thanks to Haplo below this ones done.

--------------------

if (Find.get_TickManager().tickCount % 100 == 0)
            {
                this.healthTracker.Heal(1);
            }


.Heal is now?

Ive fixed the rest so its just the ones above im having issues figuring out.
#124
Outdated / [A9] Skullywags Weapons, Tools and Trinkets
September 08, 2014, 06:47:38 PM
For clarity this used to be MoreWeapons, ive decided to split it up into single mod format so people can pick and choose what they want, this thread will contain all my weapons, tools and other such stuff.

So without further adieu:

Fire Extinguisher - Area effect weapon, will tackle fires and cause frostbite damage on enemies. Can reach centre of large buildings.

Download FireExtinguisher

Flame Thrower - Area effect weapon, will set fire to whatever it hits, doesnt hit hard but causes flame damage that sends enemies into panic.

Download FlameThrower

Flare Gun - Fires a very bright flare that lights up an area or catches target on fire if it hits, slow moving projectile. Remember you have a bonus to shooting if the enemy is lit up.

Download FlareGun

Land Mine - Self arming land mine, once placed arms in 30 seconds and will explode when anything gets near it, even friendlies, use with caution.

Download LandMine

Revolver - Large pistol able to deal massive damage if it hits, slow to fire.

Download Revolver

Mp5 - Sub machine gun, fires faster bursts than an M16 but doesnt hit as hard, slightly more accurate at medium ranges.

Download Mp5

Rail Gun - High powered long ranged rifle that will vaporize most targets if it hits, insta kill. Costs a LOT though.

Download RailGun

AK47 - Traditional AK, fires in slow bursts of 4 but hits hard due to the high caliber.

Download AK47

TAR21 - Medium caliber bullpup assault rifle, fires in bursts of 3.

Download TAR21

SA80 - Medium caliber highly accurate, fires quickly in single shots.

Download SA80

RPG - Rocket Propelled Grenades explode like grenades but you can fire em further, simples.

Download RPG

Tomahawk - A thrown axe, does major damage if it hits, needs to be picked back up once thrown.

Download Tomahawk

ShapedCharge - An explosive device that removes roofs, an explosion will take mountain roof to thin and another will take thin to open sky.

Download ShapedCharge

Non-Lethals - These are in 1 mod

Tazer - Knocks most enemies out in a few hits, melee weapon.

Stun Grenades - Grenades that stun targets for a few seconds, keep multiple on target and you can stun lock enemies.

Stun Gun - Inaccurate gun with long cool down, get close to make sure your opponent gets hit, instant knock down.

BeanBagShotty - A shotgun modified to fire bean bags, capable of stunning most targets.

Download Non-Lethals

If you have any requests for stand alone stuff like this please let me know, enjoy!

Oh and if you want them all:

ALL THE THINGS!
#125
Bugs / Traders and weapon descriptions
September 08, 2014, 06:33:38 PM
Adding a weapon to the game and setting a description adds that description to guns on the ground and whatnot but the trader "info" button shows "fires a bullet" which is the default description of the parent "BaseHumanGun". Unless ive messed something up.
#126
Help / Help with compile error
September 07, 2014, 06:14:45 PM
Hi all,

getting back into some c# in a loooooong time and I cant fathom what im doing wrong here, im getting lots of messages on build like:

Error   1   'RimWorld.CompPowerTrader.PowerOn.get': cannot explicitly call operator or accessor   \Building_Generator.cs   16   35   RimWorld_MyMod

code in question is just:

public bool GotLogs
    {
        get
        {
            return this.powerComp.get_PowerOn() && this.HasLogsInHopper;
        }
    }


Ive got lots of others like this and they all seem to be in "verse", am i doing something dumb...I feel like i am.
#127
Outdated / [MOD] (Alpha 7) More Turrets
September 07, 2014, 04:21:21 PM
DOWNLOAD FROM MY GITHUB:

https://github.com/Skullywag/Rimworld-Mods (download zip and grab the mod you need)

Me again,

This is a simple mod which contains some extra turrets, a simple pistol pole powered by a potato, it shoots slightly slower than a pawn and is obviously stationary and has little health. and a flamethrower turret, good close range, needs power and sets stuff on fire, does no impact damage though as it shouldnt.

Pistol Pole takes 1 pistol,  1 potato, 1 wood log and some metal...Better than nothing....
FlameThrower takes a flamethrower and 200 metal.


#128
Help / Shared Resource Library
September 07, 2014, 03:20:03 PM
Something I am keen to see done in this modding community (which im now part of YAY!) is to get a shared resource library together. In its purest form id like it to consist of contrib code (DLLs, Defs, textures etc...) not sure how to handle where to put it or whatever but for now here is as good a place as any i suppose.

As an example of the things I think it should contain.

Cala13er has put together a non power requiring compGlow, this allows you to add glow effects to your stuff without it needing power, simple, effective.

http://ludeon.com/forums/index.php?topic=3960.msg38868#msg38868

and as stated i just put:

<li>
<compClass>CompGlowerX</compClass>
<glowRadius>6</glowRadius>
<glowColor>(0,370,0,0)</glowColor>
</li>


in my thingDef and voila green glow. Any code that can be made generic like this and then allows a modder to use XML to play with it is extremely useful. I hope this doesnt come across me sponging off the community, I plan to contribute to this as well (my C# is rusty but its ok).

Thoughts?
#129
Outdated / [MOD] (Alpha 9) More Blasting Charges
September 07, 2014, 01:26:27 PM
Hi all,

Just started modding today (about an hour ago actually).
Its all this mods fault!

I chucked this together as "my first mod" and it seems to hold up ok (if a little overpowered...)

It adds 4 blasting charges, all locked behind research, they are:

The standard "used to be in the game" blasting charge.

The IED:


Simple explosion, radius 5.

The BRB (BoomRatBomb tm):


Explosion radius 5 and fire radius 5

and finally, the Mini Nuke:


Have to thank Cala13er for the no power compGlow, was gonna write it myself but no need as hed already done one.

and heres what a nuke does:



I have plans to add radiation thoughtdefs and stuff, infact they are in there i just need a dll trigger written to fire it. All the injurys and damagetypes are here as well for radiation, have fun!

I could probably balance it better, but ill need feedback for that ;)

Download