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

#81
Help / Initializing comps and inspect string
January 31, 2015, 03:10:07 PM
Hi all,

Small issue im having with the inspect string on my auto heal casket, its extending the core sleep casket whos get inspect string simply returns some text and doesnt call base.getinspectstring so never hits thingwithcomponents so never gets the inspect string if you add comps to anything that extends the sleep casket, ive created a comp list in my heal casket class and filled on spawn setup:

The part of my spawnSetup()
ThingComp thingComp = (ThingComp)Activator.CreateInstance(this.def.comps[i].compClass);
                thingComp.parent = this;
                thingComp.Initialize(this.def.comps[i]);
                this.comps.Add(thingComp);


However the strings always show "not connected to power" and "0 power needed".

The part of my getInspectString()
for (int i = 0; i < this.comps.Count; i++)
            {
                string text = this.comps[i].CompInspectStringExtra();
                if (!text.NullOrEmpty())
                {
                    stringBuilder.Append(text);
                    if (i < this.comps.Count - 1)
                    {
                        stringBuilder.AppendLine();
                    }
                }
            }


Any ideas what im missing or is this not possible due to the way the sleep casket im extending doesnt use base.getinspectstring().
#82
First off, no this unfortunately isnt a Robocop mod but who knows....maybe in the future...

This IS however where im going to be putting a few mods ive been working on in sekrits...

First up:

OmniTurrets

Download



This makes some rather big under the hood changes to the game in terms of it turns guns into stuff, this allowed me to have 1 turret that could use all the guns ingame as building materials, i then used said gun as the turrets gun. ive also made it replace the improvised turret. It also uses the research to speed up the bursts slightly.

What does this mean for you? you can use your spare firearms to make turrets all from 1 button. All the guns still work normally as guns obviously and the turret still needs power. Due to the gun stuff...stuff, the base is made from steel...so yeah neat huh?

Oh and as a bonus ive given all weapons a top texture (theyre passable) which the turret uses.


Second up:

OmniConduit

Download



Simply put allows conduits to be made from metallic stuff, well actually wrapped in it, it still takes 1 steel but takes an extra 1 stuff (times the multiplier for gold, silver and uranium), ive left the core conduit intact so if youre in a pinch you can still use that. Some examples of what this does: plasteel ups the health of a conduit to 225 and gives it a 20% flammability score and Uranium has a 0.0 flammability multiplier so is fireproof.

Third up:

OmniPanels

Download



Metallic stuff based solar panels, steel is the norm 1700 power, plasteel 1900, silver 2100, gold 2300, uranium 2500. The reasoning behind the numbers is due to needing 60 stuff and 20 steel, this means a steel solar panel costs 80 steel (60+20 as per core) a plasteel one costs 60 plasteel, 20 steel but uranium, gold and silver cost 1200 stuff plus 20 steel, this is due to the stuff multiplier so ive scaled the last 3 higher than plasteel as they are the harder to get due to amount of resources needed. The numbers arent AMAZING but I didnt want to overtake a geothermal, this about small improvements if you can afford them. If people deem 1 resource easier to get than others i may change this...?

Fourth up:

OmniThermals

Download



Stuff based Geothermal Generators, similar to the above in most ways, still not sure on the amount of stuff I could balance it more towards the steel amount, its currently 170 steel 200 stuff. Let me know on this one.

Fifth up:

OmniTurbines

Download



Stuff based Wind Turbines, similar to the above in most ways, its currently 100 steel 25 stuff. Again willing to tweak the numbers on all the above so feedback is appreciated.

Sixth up:

OmniBatteries

Download



A battery for each metallic stuff, doesnt use the stuff system due to the way the battery is structured in code its either impossible (at least to change stuff in the comp props like storage amount) or crazily difficult (I cant work it out). So its 5 buildings with their comps changed, please give feedback on this one, the amounts and stats are kind of placeholder for now.

Seventh up:

PODs

Download

Personal Omni Devices (PODs) are devices that are thrown and contain multiple tools. 2 are currently available, the "Pea" POD (short for Pistol Pod) which contains a small calibre pistol, needs to charge its internal batteries after prolonged use. The "Shell" POD, which contains a micro shield generator, shield is active until its internal batteries are dry or the shield takes too much damage (Thanks to Jaxxa for the shield code, couldnt of made this without it). Im still working on these and am tweaking stuff constantly but would love some ideas for further PODs.

Eighth up:

OmniShields

Download



Adds a shield "turret", requires 2 personal shields (standard ones), lasts a little longer than a personal one protects everything within the bubble from projectiles. Also adds a couple of personal shields, the Aspis is armoured vest with shield integrated, slightly buffed over the core shield in terms of energy but recharges slower and the Aegis same as above but power armour variant with even more energy but again slower to charge. Both get the shield plus the normal buffs/debuffs from the armour that they are integrated with and also allow shooting out.

More mods are incoming...
#83
Help / Heal disease
January 18, 2015, 03:58:31 PM
Simple request, im looking for a way to heal a disease instantly, everything I see in the code states I should go through the full motion of curing a disease, but I have been staring at it for a long time now and have code blindness.

So i want to loop over this:

pawn.healthTracker.bodyModel.GetTreatableDiseases()

and cure any diseases found. Any other modders messed in this area?
#84
Outdated / [MOD] (Alpha 9) Automated healing
January 17, 2015, 06:35:55 PM
Hey everyone.

So i was messing with EdBs scenarios and started a game on the lone survivor, it soon dawned on me it was gonna nigh on impossible to survive as I couldnt heal myself. So I started tinkering and came up with this mod. It uses a hopper (Medical Gel Synthesizer) to feed in herbal meds (10 per) itll heal disease (completely) and injuries, it might even fix some things that are unfixable in the core game (please test this).

Download SelfHeal

Currently the injured pawn gets into the crypto and will be healed after a while (its a long ish time) he will then be popped out with all injuries that can be healed, healed. If they have a frail or bad back or cateracts these will be healed but will require multiple treatments. Diseases will also be treated, again may need multiple treatments.

The pod needs to be fed herbal medicine (10 per treatment) via a custom hopper. (This is temporary until i can figure out a better way of handling this)

So yeah play with it, feedback is appreciated. I still feel its OP but im hoping once I get the logic for working out length of time and meds used I can balance it better.
#85
Off-Topic / Thanks Blitz! The Spatials
January 15, 2015, 02:43:29 AM
Was watching our fellow rimmer Blitz on the tube and saw his video on this game. I bought it about a minute after.

This game is perfect for my surface pro 3 as it seems to support touch beautifully.

Check it out. Its got quite a lot of content but the gameplay needs a little deepening. Not sorry i paid though. :)

http://thespatials.com
#86
So im trying to make a pawn "throw a weapon" and it be consumed but am having issues. Currently im detecting when the projectile impacts and then trying to remove the "launchers" primary weapon but its not having it. Anyone have any tips in this area. Should i be doing this somewhere else? In something else?
#87
General Discussion / Dslyecxi plays Rimworld
December 23, 2014, 06:06:06 PM
I know i shouldnt be excited by this but I am, Im a huuuge Shacktac fan (applied a few times) and watch his videos pretty much religiously now, so to see this:

https://www.youtube.com/watch?v=HEJ6QymV7-o

pop up on his channel, made me so happy and its about my fav subject....SQUIRRELS!

Welcome to the nuthouse Dslyecxi....unless youve been here all along....ninjaing as always...

/fanboy
#88
Help / How to get an instance of a comps properties
November 21, 2014, 06:18:13 AM
I think ive worded that right.

So my problem, given this code on a battery for example:


CompPowerBattery comp = this.GetComp<CompPowerBattery>();


if i:


comp.props.storedEnergyMax = 1400;


that will set all batteries on the map to have a storage of 1400, I want to only affect the battery instance im currently on. I can see no other way of getting at the storedEnergyMax field. Is this just not possible due to the way properties are being used?
#89
Mods / Tynan - Access to Internal classes
November 19, 2014, 04:39:41 PM
Hi Tynan,

Are we likely to get access to internal classes like PowerPlantSteam for example.

Theres a mod im writing and as much as I managed to do what i wanted perfectly to solar panels, I cannot do the same thing to the thermal gen.

Ive looked up reflection and think i can maybe getting working if i really hunkered down (if im getting the gist of what im reading correct) but it would be so much easier if classes like this were public, is there a reason its not?
#90
Help / Regen Terrain
November 14, 2014, 06:16:41 PM
Anyone know if its possible to regen a specific cell back to how the map originally had it. So where you place floors, remove said floor and have it back to the terrain it was before. Cant find anything in the terrain grid I can use.
#91
Ideas / Turn off ability to cut plants - modder request
November 05, 2014, 03:53:15 AM
Ive just come across this in my purple ivy mod. Due to the fact that it uses the plant def there is no way i can stop colonists from cutting my plants down (I want the end user to use fire) due to the designation selector for cutting only caring about things like edge of map, fog or it actually being a plant.

Could we get a way to disable certain designations on thingdefs via xml or straight c#. I realise this is a very edge case request so im not going to push the issue any further than this post.
#92
Mods / Hostile Pawns and Factions
October 31, 2014, 02:45:14 PM
Hey all,

Hopefully a really quick question got a new pawnkind, setup a faction, set said faction in a new race def. Im pretty much using the mechanoids as a base for now but my pawns are not hostile on spawn, anyone know what dumb thing im missing?
#93
As per discussion here:

https://ludeon.com/forums/index.php?topic=7131.0

Ive made this simple little mod, it contains a small torch, takes 1 log to build, glows for 5 minutes (editable in xml def) and lets of a small puff as it dies.

Enjoy!

Download SimpleTorch

[attachment deleted by admin: too old]
#94
As per title, I feel there are good ways and bad ways to achieve this, part of me says I shouldnt be removing anything from the IEnumerable<Pawn> and should be using a strongly typed list, does one exist?

or for clarity:

public static IEnumerable<Pawn> FindAnimals(IntVec3 position, float distance)
        {
            return
                from p in Find.ListerPawns.AllPawns
                where p.RaceProps.IsAnimal && p.Position.WithinHorizontalDistanceOf(position, distance)
                select p;
        }


Is there a better way of finding Animals nearby that would then allow me to loop through them and destroy() them or equivalent?
#95
Im trying to set a roof above a building to "isThickRoof = false" this works but obviously sets all roofs to this as im checking the roof above and using a RoofDef, how do I target just the instance or can I not as isThickRoof is a class var,? anyone know a way?
#96
Ideas / The weapon system and naming/categorisation
October 19, 2014, 05:55:42 PM
I was thinking the other day "wouldnt it be nice to have traits like pistoleer or Rifleman" which would make a pawn better with certain weapons and not with others, then I thought how the current game just has "guns" and "shooting". This is not a small task but I would love it if the weapons were categorised into "handguns", "assault rifles", "sniper rifles", "heavy weapons" etc (this would also mean that "pistol" would need renaming...it bugs me soooo much). We could then allow stats against categories of weapons (with some work). This seems to fit with how EVERYTHING else is categorised to a more equivalent granular level than just "guns". Thoughts?
#97
So after the conversation here:

https://ludeon.com/forums/index.php?topic=6579.0

I decided to see how hard it would be to implement a "creep" like plant to the game, that was simplish to achieve, then I started thinking how would the plant get here, so an incident was made using "meteors" (droppods). Tweaked it a little, made it kill walking speed and made it need to use other plantlife to spread, The meteorite will continue to spread the plant if there is a space around, so dont just kill the plants (which also spread on their own) and leave it. Killing the rock will net you 300 Metal, to kill the plants, fire is your friend. The ivy will consume floors that arent natural, plants and corpses, it will also damage anything that gets caught in it (it literally tears you to pieces)

I may take this and expand upon it but im not sure yet, this was just a proof of concept and and a challenge to myself to mess in an area id not messed in yet.

So I have picked this up and added to it, theres now a centipede hatchlings that will spawn from eggsacs that are randomly generated in the ivy along with gaseous pustules (just for looks currently). The hatchlings are psychotic by default so will hunt your colonists down, this will change once i come up with some appropriate thingdefs.

Ive also added the Plant based turrets and mortars, theyll need tweaks but they hurt a little for now.

Ive added some rare drops to the mortar and the turret, both drop a tendril one does cut damage is slower and does more damage the other does stab damage is quicker but does less damage. Again Art by Shinzy...thanks bud!

Youll need to start a new world for the faction to generate correctly.

All artwork was done by SHINZY.

MASSIVE THANKS TO SHINZY! his arts awesome!

AGAIN ALL HAIL SHINZY FOR HIS AWESOMENESS!

This mod wouldnt be half as good if it werent for him.

On a side note I think this is also all the code the meteor mod needs to update to A7, ill post it there if anyone fancies updating that mod.

Grab it from Github:

https://github.com/Skullywag/Rimworld-Mods/archive/master.zip (this will also get you all my other mods)



[attachment deleted by admin: too old]
#98
Help / [solved]Array index out of range error - help!
October 16, 2014, 03:53:47 PM
I have no idea how this is happening, Ive copied a load of the DropPod stuff and renamed it so I can faff with it, in doing so I get this on load:

Fallback handler could not load library C:/Users/mjsku_000/Desktop/RimWorld581Win/RimWorld581Win_Data/Mono/data-0B583008.dll
IndexOutOfRangeException: Array index is out of range.
  at Verse.Graphic_Random.get_MatSingle () [0x00000] in <filename unknown>:0

  at Verse.EntityDef.get_DrawMatSingle () [0x00000] in <filename unknown>:0

  at Verse.EntityDef.PostLoad () [0x00000] in <filename unknown>:0

  at Verse.ThingDef.PostLoad () [0x00000] in <filename unknown>:0

  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)

  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0

  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0

  at Verse.XmlToItem.TryDoPostLoad (System.Object obj) [0x00000] in <filename unknown>:0

  at Verse.XmlToItem.ItemFromXml[ThingDef] (System.Xml.XmlNode xmlRoot, Boolean doPostLoad) [0x00000] in <filename unknown>:0

  at Verse.XmlLoader+<AllGameItemsFromAsset>c__IteratorD3`1[Verse.ThingDef].MoveNext () [0x00000] in <filename unknown>:0

  at Verse.ModDefSet`1[Verse.ThingDef].ReloadAllFromFiles () [0x00000] in <filename unknown>:0

  at Verse.Mod.ReloadAllContent () [0x00000] in <filename unknown>:0

  at Verse.LoadedModManager.LoadAllActiveMods () [0x00000] in <filename unknown>:0

  at Verse.PlayDataLoader.LoadAllPlayData () [0x00000] in <filename unknown>:0

  at VerseBase.Root.Start () [0x00000] in <filename unknown>:0


Nothing in the log helps me locate this.
#99
Help / GenAI.BestShootTargetFromCurrentPosition
October 15, 2014, 11:03:49 AM
Anyone know how i can make this muther work for non hostiles:

return GenAI.BestShootTargetFromCurrentPosition(base.Position, searcher, new Predicate<Thing>(this.IsValidTarget), this.gun.PrimaryVerb.verbProps.range, this.gun.PrimaryVerb.verbProps.minRange, !this.gun.PrimaryVerb.verbProps.projectileDef.projectile.flyOverhead, !this.gun.PrimaryVerb.verbProps.ai_IsIncendiary);

The this.isVallidTarget only fires when the pawn its targetting is a hostile, but I dont seem to be able to find where it wants a hostile before firing that. (its in the turretgun code btw).

Anyone have any clues?

or alternatively anyone know a good way to scan for targets using another way?
#100
Ideas / power priorities
October 13, 2014, 12:33:30 AM
Can we have a way of prioritising what recieves power, I feel being able to state that I want my cooker to stay on and not those random lights over there during a power shortage would be nice. I'm thinking a simple button when a power comp is used that when clicked cycles through numbers (1 being high l, 5 low) then when a power shortage happens it just uses this list to turn off stuff lower down the list.