[B18] [WIP] Jurassic Rimworld

Started by Serpyderpy, July 16, 2017, 08:23:48 PM

Previous topic - Next topic

demeggy

Quote from: kaptain_kavern on July 22, 2017, 07:36:57 PM
Hey, you're welcome mate, my pleasure. The more mods we have the more I'm happy ;-)

I'm a big fan of Jurassic Park myself (more the two books by M. Crichton than the films, but as someone born in the 80's, I've seen the first movie as a child and had my "dinomania period" after ^^)

_______________

Regarding the previously discussed mechanics, that seems doable with XML only, if you'd ask me ;)

Modded "ore", modded building (made like the multi-analyzer) that require "amber" to be construct. This building unlock a (or several) research projects. Those projects unlocks recipe that produce fertilized eggs :p



As a bonus : you can also have a look at the XML code for hive. You'll find that they have a function (I'm not sure but I think it is a <comps>) made to just "spawn" a Thingdef every x ticks if you want to have a building that spawn eggs ;-pt

Genius. An automated hatchery! Could be a research tree jobby

Gunblast

Ahaha great choice of pawn for your screenshot :)

Serpyderpy

#17
QuoteNP - Simple process really, Amber ore generated in map akin to other ores, once amber's mined, can then be used at a special DNA Extraction Stationwith a custom workgiver that produces randomised Dino DNA once the process is complete (would require a colonist to stand there doing their magic, like any standard tool table really). That DNA can then be used in a Dino Egg style recipe at a Hatchery Station, exactly the same as before, but this time round it produces the relevant dino egg. Pop the egg down somewhere, and voila, baby dinos!

QuoteModded "ore", modded building (made like the multi-analyzer) that require "amber" to be construct. This building unlock a (or several) research projects. Those projects unlocks recipe that produce fertilized eggs :p

Alrighty, so I spent a while messing around with the mod and the whole idea of taking amber and then using DNA to reconstruct eggs that you could place in a hatchery and then get baby dinosaurs that are easier to tame, and got so far before I've run into a roadblock that's giving me a serious headache. First off, amber 'ore' can be found in any generated world akin to any other mineral. They give out roughly two amber per block give or take. I have then made an amber extraction workbench where you take two amber and turn it into a strand of DNA (has it's own unfinished def too) that I would then like to further refine into an egg.

This is where the issues come in. I duplicated all that I did since I wanted the workflow to be sort of the same. I duplicated the extraction bench and renamed it along the lines of DNA reconstruction bench. I duplicated the work giver def, the recipes, I made the unfinished egg def and the finished egg def (which is a duplicate of a normal dinosaur egg given to a duplicate of the normal dinosaur race, just with 0% wildness so you can tame it ASAP) and every other def and thing that it needs to work and it went fine, nothing exploded, and it all seems to go swell up until the pawn actually goes to do the work. They pick up the DNA, they take it to the bench, and then the game throws me this error.

JobDriver threw exception in initAction. Pawn=Veli, Job=DoBill A=Thing_DNAReconstructionBench107669 B=Thing_DNA118495 C=(162, 0, 124), Exception: System.NullReferenceException: Object reference not set to an instance of an object
  at Verse.AI.Toils_Recipe.<CalculateDominantIngredient>m__783 (Verse.ThingCountClass x) [0x00000] in <filename unknown>:0
  at System.Collections.Generic.List`1[Verse.ThingCountClass].GetIndex (Int32 startIndex, Int32 count, System.Predicate`1 match) [0x00000] in <filename unknown>:0
  at System.Collections.Generic.List`1[Verse.ThingCountClass].FindIndex (System.Predicate`1 match) [0x00000] in <filename unknown>:0
  at Verse.GenCollection.Any[ThingCountClass] (System.Collections.Generic.List`1 list, System.Predicate`1 predicate) [0x00000] in <filename unknown>:0
  at Verse.AI.Toils_Recipe.CalculateDominantIngredient (Verse.AI.Job job, System.Collections.Generic.List`1 ingredients) [0x00000] in <filename unknown>:0
  at Verse.AI.Toils_Recipe+<MakeUnfinishedThingIfNeeded>c__AnonStorey4A6.<>m__77A () [0x00000] in <filename unknown>:0
  at Verse.AI.JobDriver.TryActuallyStartNextToil () [0x00000] in <filename unknown>:0  lastJobGiver=RimWorld.JobGiver_Work, curJob.def=DoBill, curDriver=Verse.AI.JobDriver_DoBill
Verse.Log:Error(String)
Verse.AI.Pawn_JobTracker:StartErrorRecoverJob(String)
Verse.AI.JobDriver:TryActuallyStartNextToil()
Verse.AI.JobDriver:ReadyForNextToil()
Verse.AI.JobDriver:Notify_PatherArrived()
Verse.AI.Pawn_PathFollower:PatherArrived()
Verse.AI.Pawn_PathFollower:StartPath_Patch1(Object, LocalTargetInfo, PathEndMode)
Verse.AI.<GotoThing>c__AnonStorey4F3:<>m__7DA()
Verse.AI.JobDriver:TryActuallyStartNextToil()
Verse.AI.JobDriver:ReadyForNextToil()
Verse.AI.JobDriver:TryActuallyStartNextToil()
Verse.AI.JobDriver:ReadyForNextToil()
Verse.AI.JobDriver:TryActuallyStartNextToil()
Verse.AI.JobDriver:ReadyForNextToil()
Verse.AI.JobDriver:TryActuallyStartNextToil()
Verse.AI.JobDriver:ReadyForNextToil()
Verse.AI.JobDriver:Notify_PatherArrived()
Verse.AI.Pawn_PathFollower:PatherArrived()
Verse.AI.Pawn_PathFollower:TryEnterNextPathCell()
Verse.AI.Pawn_PathFollower:PatherTick()
Verse.Pawn:Tick()
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()


It seems that it doesn't recognise the duplicated egg as a thing it can produce, I think. It's probably super simple but I cannot for the life of me figure it out and I don't want to risk messing with anything else in case that all messed up, too.

kaptain_kavern

care to show some actual files? 8) especially the recipe one I suspect.

Serpyderpy

Yup! Attached all the files that I think have something to do with the error, as they're all the ones I duplicated and made before this error started popping up. If you need any more files, please let me know. ;A;

[attachment deleted by admin due to age]

SpaceDorf

This looks really really awesome right now.
And I am sure it would go well together with the Megafauna and Cthullhu Mod to create epic animal battles  :o

But as a fan of Modular Mods I have to ask :
Could you seperate it into different sections ?

- Buildings
- Animals and their Support
- Weapons and Clothes ( if you are going to create them )

This way you could create some pre-releases for us to beta-test,
others could pick features from your mod, the would maybe not use if the package is to big and
changes to much.
And I could put those awesome statues in my colony and use the lights and the helipad for my OHU Airfield :)
Maxim 1   : Pillage, then burn
Maxim 37 : There is no overkill. There is only open fire and reload.
Rule 34 of Rimworld :There is a mod for that.
Avatar Made by Chickenplucker

demeggy

Now either I'm being slow (likely), or I cant actually see any link between your recipe, the bench, and the DoBillsReconstructDNA work_giver.

The error is related to the DoBillsReconstructDNA - and the fact it cant find the right objectref. I've had this before, be buggered sideways if I can remember what it was though.

kaptain_kavern

I'm on my phone right know but I will look into it. The error seems like vaguely familiar but I can't recall (seen too much since I start modding) but my wild guesses are either the work giver or the recipe.

I will look into it and come back at you

Serpyderpy

Ahh, no need guys! Managed to figure it out myself! Everything was essentially all ready to go, unfortunately something so simple as a typo was what caused all that grievance. My game was trying to locate the pawn that would hatch from the duplicated, reconstructed egg, but it was trying to find TyrannosaurusReconstructed... which doesn't exist! It needed to find TyrannosaurusReconstruct instead!

Both the amber extraction bench and the DNA bench now work, and I would like to congratulate Nelson, a random lone explorer pawn who got shunted into my testing colony, for being the first person to reconstruct a Tyrannosaurus rex egg from amber and DNA on a distant rimworld. There is no end to the madness.

QuoteBut as a fan of Modular Mods I have to ask :
Could you seperate it into different sections ?

- Buildings
- Animals and their Support
- Weapons and Clothes ( if you are going to create them )

Not sure about weapons or clothes, since Jurassic Park/World never did seem to have that many stand out garments or weapons, buuut I can definitely look into a modular release, sure! My significant other was a little bummed out that I couldn't figure out how to patch the dinosaurs for Combat Extended since it uses new body stuff and all (tried, couldn't patch it, my head hurt just trying to understand it all) but I said I'd try and send him all the other stuff so, I guess I could do that for others too!

thank you also to all those who offered to help, I'm a klutz sometimes when it comes to modding haha

SpaceDorf

Quote from: Serpyderpy on July 24, 2017, 07:39:49 PM

Not sure about weapons or clothes, since Jurassic Park/World never did seem to have that many stand out garments or weapons, buuut I can definitely look into a modular release, sure! My significant other was a little bummed out that I couldn't figure out how to patch the dinosaurs for Combat Extended since it uses new body stuff and all (tried, couldn't patch it, my head hurt just trying to understand it all) but I said I'd try and send him all the other stuff so, I guess I could do that for others too!


The most common cause of software errors :)
Gratz on finding it yourself, those +5 mood boni are hard to come by

And thank you for humoring me. I did not expect you to add weapons, but since it could possibly happen I said "if" ..

CE Sucks .. I don't know what the big fuzz is all about .. half of the mods I use are not compatible with it .. I guess, I never tried .. and the thought alone of figuring this out gives me nightmares.
Maxim 1   : Pillage, then burn
Maxim 37 : There is no overkill. There is only open fire and reload.
Rule 34 of Rimworld :There is a mod for that.
Avatar Made by Chickenplucker

kaptain_kavern

#25
It's nice you find out by yourself (better for the ego morale) ^^
It wasn't a easy one to spot
I like seeing this project progressing :-p

demeggy


Serpyderpy

Update time!
Amber and DNA!


How this works:


(for picture demonstration purposes only, they don't generate in this big of a quantity!)

Fossilised Amber
Fossilised amber will now generate in any map you play on akin to any other mineral or ore.
Fossilised amber can be mined for one or two amber pieces per block.



Amber
Fossilized tree sap that takes on a beautiful golden hue. Can be used to extract DNA.
Amber will drop when mined, manifest as walls or arrive in weapon form via pissed off tribal raiders.
Amber weapons can be smelted
(yeah, I know what you're thinking, but it gives people a fighting chance to get more rather than waiting on some laggy ass caravan to turn up which may not even have any)
Amber can also be used as a building and crafting material with a base of 5 beauty.
Used as an ingredient at the extraction bench.



Amber Extraction Bench
The amber extraction bench will take two amber and turn it into one strand of DNA.
Using the bench requires intellectual skills at or above 10, meaning those pawns who are utterly useless at everything except researching now have something else to do to prove their worth to not be sold to some passing slave trader.



DNA
Deoxyribonucleic acid. Contains all the genetic information and instructions that govern the functioning of every living thing on earth, past, present and future.
DNA will not deteriorate.
You can sell DNA to make a tidy profit, but remember that their initial quantities on the map will be finite unless you yourself buy some more.
Used as an ingredient at the reconstruction bench.



DNA Reconstruction Bench
The DNA reconstruction bench will take a varying amount of DNA and turn it into a reconstructed fertilised egg of whatever species you choose.
Certain dinosaurs will cost more DNA to replicate than others.
Fertilised eggs are actually a seperate entitity to normal, wild dinosaur eggs.
They will hatch into a near duplicate race of the corresponding dinosaur,
though differences include 0% wildness and 0% chance that they'll turn on the handler if they fail a tame.
Again, this requires an intellectual skill at or above 10.



Hatchery
Acts as a storage unit for eggs that will keep them from deteriorating or being ruined by temperature or other such means.
It's much larger than the shelf, meaning you can store more dinosaur eggs inside than you could by building a ton of shelves (though I definitely won't discourage you if that's what you want to do!)

I could not figure out a way to instantaneously make the reconstructed eggs join your colony when they hatch, so instead the animal being docile and open to taming was the best I could do. Whilst this is a tad annoying due to the fact that you do still need someone with good handling to try and tame them, I also think it can benefit those who just want to mess around and make a park.

Vanilla Rimworld only allows up to five distinct animal zones, and if you're anything like me, who likes to seperate animals into individual pens, this could be a problem when trying to keep your different dinosaurs in different enclosures. There are mods out there that remove this limitation, but the users UI can screw with this in many different ways. This is why the mechanic of having a wild dinosaur hatch instead of a tame one could work quite well instead.

All one has to do is make the prerequisite enclosure for the dinosaur they want, then set out to make the egg with all the materials they need. Once it's made, drop the egg off in the enclosure in a hatchery so it doesn't spoil, and wait for it to hatch. Viola! Wild dinosaurs in enclosures! Pop a herby or carny feeder down when building the enclosure, and you don't have to worry about keeping them fed, either. Of course, carnivorous dinosaurs maaaay have a nibble on your colonists if they go into the enclosure, but if the films have taught us anything, that's kind of expected.

kaptain_kavern

Awesome update. You're progressing quite quickly ;-)

You can have a patch for including amber specifically in some merchants stock. Or you could even have a specific dinosaurs-theme modded; trader once you'll going to messes with factions (because I'm sure you will ;-p )

Again good works you've done there. Thank you

Serpyderpy

Quote from: kaptain_kavern on July 26, 2017, 02:00:29 AM
Or you could even have a specific dinosaurs-theme modded; trader once you'll going to messes with factions (because I'm sure you will ;-p )

You got me. I wanted to look into making a trader that sells dinosaurs, amber and DNA. If I get that working I may forego amber as a building material, as generating a few worlds has suddenly left me with an awful lot of amber buildings strewn about, which would be fine if they didn't give so much out, haha. May have to look into reducing the commonality.

I have not a lot to do at the moment, so updates should hopefully keep coming quickly!