[1.0](WIP) What The Hack?! - Mechanoid hacking

Started by Roolo, May 31, 2018, 04:03:57 PM

Previous topic - Next topic

Roolo

Update:


- Rebalanced hacking. Should be a lot easier now (while there's still a reasonable chance that it fails).
- Hacking now uses the intellectual skill when success chance is determined and for assigning experience, and has a minimum crafting skill requirement of 6.
- Already hacked mechanoids from other factions can now be hacked like normal mechanoids.

Canute

Such a Modify spot for mechanoids would realy be helpful.
Just like a crafting spot, but is needed for all modify but not hacking operations on mechanoids.

And the repair/restore ability of the recharge station, to restore all these lost legs and arms. But with scyther arm's it could be exploided, when the station restore it, and you remove the blade after it.
The Robot station from Misc. Robots got a similar function. Same to Recharge station for the Misc. MAI.  If you need some ideas.

Another thing, weapon exchange for hacked mechanoids. Currently i look at the weapon's before i try to hack them.
Mosttimes all sycther with Suprior or better weapons allways got a lost leg.
The best it would be, if you can extract the weapon, and install any owned weapon at the mech.
Similar to the Turret weapon base from Misc.  Objects.

Madman666

I guess you should only get fixing\repairing operations available for your own hacked mechanoids, not removing parts to avoid exploitation. And removing blades should also make an enemy downed mech unable to be hacked and only disassembled\shut down.

As for weaponry - Ideally would be an ability to arm mechs with weapons of your choosing. Uninstalling the mech weapons would be kinda too powerful though, same as with scyther blades. Mech weapons if detached from main body should be lost (except for miniguns). And instead you could install any human wielded weapon if you don't like the quality of a mech's own gun.

Roolo

Good points. Yes, regaining limbs should be made possible. This is really a missing thing right now, and should be added before release.

QuoteI guess you should only get fixing\repairing operations available for your own hacked mechanoids, not removing parts to avoid exploitation. And removing blades should also make an enemy downed mech unable to be hacked and only disassembled\shut down.
Good idea, this is a good way to resolve the issue since it's really easy to implement (which is always important, sint it gives me more time to implement fun things :) ). To make it a bit more immersive/less arbitrary, I could allow hacking on mechs with part removes, but if players do that, the state of the mech is stored, and limbs that were removed before the hack will never regrow (and a warning making this clear shows up when the mech is hacked).

Weapon replacement would be a nice thing to have. I'll probably add that post release, since I don't want to stall the release for too long. This isn't trivial to implement because we'd like to restrict certain weapons to mechs only, and maybe even certain mech types.

Talking about the release. I'm aiming for next week on Friday. This'll give me enough time to test things more extensively and finish the last things I want to finish before release. I updated the original post so you can see what will be in the initial release, and what will be added post-release.








Canute

QuoteTo make it a bit more immersive/less arbitrary, I could allow hacking on mechs with part removes, but if players do that,
That shouldn't be a problem, if you increase the fuel use if the station repair missing limbs.

You can increase the fuel tank from 10 to 50, and increase the generell fuel need by 50-100%

Canute

What do you think about to craft Adv. mech. chips out of Mech. Parts ?
I have ton's of part's but i am lacking of chips.
10 part + 100 silver -> 1 chip at the component assembly bench.

Roolo

Quote from: Canute on June 10, 2018, 02:56:07 AM
What do you think about to craft Adv. mech. chips out of Mech. Parts ?
I have ton's of part's but i am lacking of chips.
10 part + 100 silver -> 1 chip at the component assembly bench.

I do like the idea of making the component assembly bench more useful than it is. And it's also nice  if there are more ways to spend mechanoid parts. On the other hand I do want to keep the advanced mechanoid chips hard to obtain. I'll consider it. What I am going to for certain is decreasing the drop rate of the parts, as they shouldn't pile up like they do now, as they're supposed to be a valuable resource.


Arkalon

This seem amazing, I'll keep a very close look on it, good luck, keep up the good work !

Roolo

Thanks Arkalon! :)

Update:

- Mechanoid body part regeneration is now possible at mechanoid platforms.
  - Regenerating costs a lot of mechanoid parts (5x more than normal repairs), and can be toggled off at the platform so you can prioritize normal repairs.
- Doubled capacity of mechanoid platforms.
- Decreased drop rate of mechanoid parts
- Fixed problem involving colonists trying to tend with mechanoid parts, causing errors.

Todo:
Regenerating mech parts can now still be exploited. I'll fix this later.

By the way, releasing tomorrow won't happen yet. I didn't take into account that I have a wedding I have to attend then. Moreover, last week has been quite busy IRL. Still, release will be pretty soon.

Canute

Just double the capacity ? But it could be enough to repair some missing parts. We will see.
Currently i play with Lord of Rim's so no fast feedback.

About the release, hey didn't you said you don't want kid's for the next 2 years ? Then you don't need a honeymoon and you can work the night ! :-))
You arn't a comerical so you don't need to have deadlines for your mods, beside to made your fan's happy.
Didn't you watch StarTrek TNG when Scotty explained Geordi he never should tell the captain the real time he might need to the repairs. He should say he need twice so much, so when a captain want it faster (like they mosttimes do) you still have timebuffer and lucking good if you made it intime. ! :-)

mrsebseb

I haven't tried the latest version properly yet. Didn't actually mean to have it active for this as I have WAY too many mods right now, but I randomly got this error on world generation:

Error in WorldGenStep: System.NullReferenceException: Object reference not set to an instance of an object
at WhatTheHack.Harmony.Pawn_HealthTracker_MakeDowned.Postfix (Verse.Pawn_HealthTracker) <0x0007c>
at (wrapper dynamic-method) Verse.Pawn_HealthTracker.MakeDowned_Patch3 (object,System.Nullable`1<Verse.DamageInfo>,Verse.Hediff) <0x00a3b>
at (wrapper dynamic-method) Verse.Pawn_HealthTracker.CheckForStateChange_Patch3 (object,System.Nullable`1<Verse.DamageInfo>,Verse.Hediff) <0x0052e>
at (wrapper dynamic-method) Verse.Pawn_HealthTracker.AddHediff_Patch2 (object,Verse.Hediff,Verse.BodyPartRecord,System.Nullable`1<Verse.DamageInfo>) <0x00269>
at RimWorld.AgeInjuryUtility.GenerateRandomOldAgeInjuries (Verse.Pawn,bool) <0x00786>
at (wrapper dynamic-method) Verse.PawnGenerator.GenerateInitialHediffs_Patch1 (Verse.Pawn,Verse.PawnGenerationRequest) <0x00035>
at Verse.PawnGenerator.TryGenerateNewNakedPawn (Verse.PawnGenerationRequest&,string&,bool) <0x0070c>
at (wrapper dynamic-method) Verse.PawnGenerator.GenerateNewNakedPawn_Patch1 (Verse.PawnGenerationRequest&) <0x0021d>
at (wrapper dynamic-method) Verse.PawnGenerator.GeneratePawnInternal_Patch1 (Verse.PawnGenerationRequest) <0x00aaa>
at (wrapper dynamic-method) Verse.PawnGenerator.GeneratePawn_Patch1 (Verse.PawnGenerationRequest) <0x000c1>
at Verse.PawnGenerator.GeneratePawn (Verse.PawnKindDef,RimWorld.Faction) <0x0020b>
at RimWorld.Faction.GenerateNewLeader () <0x00294>
at RimWorld.FactionGenerator.NewGeneratedFaction (RimWorld.FactionDef) <0x0037e>
at RimWorld.FactionGenerator.GenerateFactionsIntoWorld () <0x00087>
at RimWorld.Planet.WorldGenStep_Factions.GenerateFresh (string) <0x00048>
at (wrapper dynamic-method) RimWorld.Planet.WorldGenerator.GenerateWorld_Patch2 (single,string,RimWorld.Planet.OverallRainfall,RimWorld.Planet.OverallTemperature) <0x002c2>

Verse.Log:Error(String)
RimWorld.Planet.WorldGenerator:GenerateWorld_Patch2(Single, String, OverallRainfall, OverallTemperature)
RimWorld.Page_CreateWorldParams:<CanDoNext>m__0()
Verse.LongEventHandler:RunEventFromAnotherThread(Action)
Verse.LongEventHandler:<UpdateCurrentAsynchronousEvent>m__1()


Regenerating the world a few times, the error went away

Roolo

Quote from: Canute on June 15, 2018, 03:40:28 AM
Just double the capacity ? But it could be enough to repair some missing parts. We will see.
Currently i play with Lord of Rim's so no fast feedback.

About the release, hey didn't you said you don't want kid's for the next 2 years ? Then you don't need a honeymoon and you can work the night ! :-))
You arn't a comerical so you don't need to have deadlines for your mods, beside to made your fan's happy.
Didn't you watch StarTrek TNG when Scotty explained Geordi he never should tell the captain the real time he might need to the repairs. He should say he need twice so much, so when a captain want it faster (like they mosttimes do) you still have timebuffer and lucking good if you made it intime. ! :-)

Haha, yeah I'll keep that in mind. It's not my own wedding by the way, and i can't remember saying that but it's definitely true that I wouldn't want kids for the coming two years. But if I do some day, I'll make sure that they learn how to mod, so I'll have my own team of Roolo's.

Quote from: mrsebseb on June 15, 2018, 04:41:49 AM
I haven't tried the latest version properly yet. Didn't actually mean to have it active for this as I have WAY too many mods right now, but I randomly got this error on world generation:

Error in WorldGenStep: System.NullReferenceException: Object reference not set to an instance of an object
at WhatTheHack.Harmony.Pawn_HealthTracker_MakeDowned.Postfix (Verse.Pawn_HealthTracker) <0x0007c>
at (wrapper dynamic-method) Verse.Pawn_HealthTracker.MakeDowned_Patch3 (object,System.Nullable`1<Verse.DamageInfo>,Verse.Hediff) <0x00a3b>
at (wrapper dynamic-method) Verse.Pawn_HealthTracker.CheckForStateChange_Patch3 (object,System.Nullable`1<Verse.DamageInfo>,Verse.Hediff) <0x0052e>
at (wrapper dynamic-method) Verse.Pawn_HealthTracker.AddHediff_Patch2 (object,Verse.Hediff,Verse.BodyPartRecord,System.Nullable`1<Verse.DamageInfo>) <0x00269>
at RimWorld.AgeInjuryUtility.GenerateRandomOldAgeInjuries (Verse.Pawn,bool) <0x00786>
at (wrapper dynamic-method) Verse.PawnGenerator.GenerateInitialHediffs_Patch1 (Verse.Pawn,Verse.PawnGenerationRequest) <0x00035>
at Verse.PawnGenerator.TryGenerateNewNakedPawn (Verse.PawnGenerationRequest&,string&,bool) <0x0070c>
at (wrapper dynamic-method) Verse.PawnGenerator.GenerateNewNakedPawn_Patch1 (Verse.PawnGenerationRequest&) <0x0021d>
at (wrapper dynamic-method) Verse.PawnGenerator.GeneratePawnInternal_Patch1 (Verse.PawnGenerationRequest) <0x00aaa>
at (wrapper dynamic-method) Verse.PawnGenerator.GeneratePawn_Patch1 (Verse.PawnGenerationRequest) <0x000c1>
at Verse.PawnGenerator.GeneratePawn (Verse.PawnKindDef,RimWorld.Faction) <0x0020b>
at RimWorld.Faction.GenerateNewLeader () <0x00294>
at RimWorld.FactionGenerator.NewGeneratedFaction (RimWorld.FactionDef) <0x0037e>
at RimWorld.FactionGenerator.GenerateFactionsIntoWorld () <0x00087>
at RimWorld.Planet.WorldGenStep_Factions.GenerateFresh (string) <0x00048>
at (wrapper dynamic-method) RimWorld.Planet.WorldGenerator.GenerateWorld_Patch2 (single,string,RimWorld.Planet.OverallRainfall,RimWorld.Planet.OverallTemperature) <0x002c2>

Verse.Log:Error(String)
RimWorld.Planet.WorldGenerator:GenerateWorld_Patch2(Single, String, OverallRainfall, OverallTemperature)
RimWorld.Page_CreateWorldParams:<CanDoNext>m__0()
Verse.LongEventHandler:RunEventFromAnotherThread(Action)
Verse.LongEventHandler:<UpdateCurrentAsynchronousEvent>m__1()


Regenerating the world a few times, the error went away

Thanks for reporting. Should be easy to fix. It's still weird the code that makes pawns downed is called when the world generated. Had a similar issue when I created RunAndGun.

Roolo

Rimworld 1.0 unstable has just been released. This leaves me to a choice: finish WhatTheHack B18 quickly and update it to 1.0 when the time comes, or be patient and wait with releasing until 1.0 is oficially released.

If I were to pick the first option, the release would be next friday, as stalling it any further won't be any good: unfortunately this is a few days before a very important exam I really have to pass. Not very convenient. That in addition to the fact many players will be waiting with installing new mods until 1.0 releases, made me decide to go for the other option: releasing when v1.0 pops up. This will give me some extra time to get the mod fleshed out really well, and also give me some room to update my other mods to 1.0 (especially Giddy-up! Caravan won't be easy since they really changed the caravanning system).

Nilokka


Roolo

Thanks Nilokka :)

I'm finally done getting WhatTheHack working for Rimworld 1.0 experimental. Rimworld 1.0 was a bit of a setback for this project since a lot of things changed that broke the mod. But it's all fixed now.

The master branch now contains the 1.0 version. I've created a separate branch for the B18 version, which can be found here: https://github.com/rheirman/WhatTheHack/tree/B18

The 1.0 version also comes with many (mostly small) changes. The mod should now feel much more balanced. Here's a small changelog (probably has some things missing):


- Increased power consumption of active mechs
- Decreased mech repair speed
- Reworked how hacking success chance is determined - should also feel much more balanced now, and it's easier for me to balance now.
- Added special "hacking" work type, that can be designated in the work tab. Depends on both crafting and intellectual. Intellectual is the base stat that determines chance of succes, but when crafting is below level 12, a small per level penalty is applied.
- Mechs can be downed again (isn't possible in vanilla anymore)
- Re-added mech shutdown operation
- Fixed problem with regrowing body parts not working properly.
- Toned down drop chance of mechanoid parts a bit.
- Renamed most defs (this breaks B18 saves)
- Made pawns move a bit closer to the mechs when controlling them.
- Fixed problems occuring when controlled mechs die