Ludeon Forums

RimWorld => Mods => Help => Topic started by: skullywag on September 09, 2014, 03:52:34 PM

Title: Help updating mod
Post by: skullywag on 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.
Title: Re: Help updating mod
Post by: mrofa on September 09, 2014, 04:13:02 PM
Quoteif (this.health <= 0)
                {
                    Explosion.DoExplosion(base.get_Position(), 1.9f, DamageTypeDefOf.Bomb, this);
                }

It should work if you remove _get and leave "base.Position"
Title: Re: Help updating mod
Post by: skullywag on September 09, 2014, 05:09:42 PM
Yeah i spotted that and already fixed it, its still underlining the Explosion part in red.
Title: Re: Help updating mod
Post by: Haplo on September 09, 2014, 06:36:49 PM
For your explosion part, you can use it like this:

GenExplosion.DoExplosion(Position, 1.9f, DamageTypeDefOf.Bomb, this);


And for the psychology part:

psychology.mood.CurLevel = 100.0f;

Title: Re: Help updating mod
Post by: skullywag on September 09, 2014, 06:47:21 PM
Quote from: Haplo on September 09, 2014, 06:36:49 PM
For your explosion part, you can use it like this:

GenExplosion.DoExplosion(Position, 1.9f, DamageTypeDefOf.Bomb, this);


And for the psychology part:

psychology.mood.CurLevel = 100.0f;


Does the mood 1 replace all 3 of the others then? wasnt around for when it was happiness, loyalty etc..

Ill add these now and see what happens. Thanks muchly.
Title: Re: Help updating mod
Post by: Haplo on September 09, 2014, 06:58:03 PM
Yes, Happyness and Fear are combined into Mood.
I don't know where the Loyalty part comes from, as I don't remember it at all..
Title: Re: Help updating mod
Post by: skullywag on September 09, 2014, 07:14:38 PM
Those work so its just the heal one left...
Title: Re: Help updating mod
Post by: Haplo on September 09, 2014, 07:18:34 PM
Oh, didn't see that one..
I'm not sure, but try this:

healthTracker.Health += 1;
Title: Re: Help updating mod
Post by: skullywag on September 09, 2014, 07:37:28 PM
Well that got all the errors, however the mod goes nuts when loaded, lots of red yellow green blue colours!!

Fancy taking a quick peak as I feel ive done most of what I can achieve. It at least doesnt crash on adding it now (just cant play the game lol)

Had to split the zip due to file sizes.

hmm actually might have been a bad save. Seems to work ok on a new world. Now to test it.

Ok spawning in a centipede from the mod and errors galore, debug time.

[attachment deleted by admin: too old]