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

#1
I read a lot of forum posts/wiki stuff etc. over the last week about taming thrumbos. Here is why; I heal-bonded a 29 yo thrumbo female early in game and wanted to have a mate for her. However, all male thrumbo's (five of 'em through several events) that followed would rather get killed than being tamed or bond. So I began thinking. Was it a fluke, was it because of her low age, should I use animal beds or medicine? It slowly drove me 'mad'. So I eventually decided to decompile and look in the Assembly. Of course things can (and probably will) change with new releases. This is from Alpha 16 sources.

I'm posting this as a new topic, because previous topics about this subject are already some months old (or older) and necroing them might not be appropriate.


I can't find any spoiler tags so, please stop reading here if you do not want to.
.
.
.
.


For me it's quite obvious. Of course I left out a lot of code and added some stuff in brackets to summarize or clarify parts. But for the bond chance, this is basically it.

// RimWorld.TendUtility
public static void DoTend(Pawn doctor, Pawn patient, Medicine medicine)
{
...
if (doctor != null && doctor.RaceProps.Humanlike && patient.RaceProps.Animal && RelationsUtility.TryDevelopBondRelation(doctor, patient, 0.004f) && doctor.Faction != null && doctor.Faction != patient.Faction)
{
InteractionWorker_RecruitAttempt.DoRecruit(doctor, patient, 1f, false); (this function only formalizes the bond and does some UI stuff)
}
...
}


// RimWorld.RelationsUtility
public static bool TryDevelopBondRelation(Pawn humanlike, Pawn animal, float baseChance)
{
... (breaking conditions, like the bond already exists, or animal already has a bond are handled first)
...
int num = 0; (base chance is reduced through animal or humanlike having other, active (as in not dead), direct relations)
List<DirectPawnRelation> directRelations = animal.relations.DirectRelations;
for (int i = 0; i < directRelations.Count; i++)
{
if (directRelations[i].def == PawnRelationDefOf.Bond && !directRelations[i].otherPawn.Dead)
{
num++;
}
}
int num2 = 0;
List<DirectPawnRelation> directRelations2 = humanlike.relations.DirectRelations;
for (int j = 0; j < directRelations2.Count; j++)
{
if (directRelations2[j].def == PawnRelationDefOf.Bond && !directRelations2[j].otherPawn.Dead)
{
num2++;
}
}
if (num > 0)
{
baseChance *= Mathf.Pow(0.2f, (float)num);
}
if (num2 > 0)
{
baseChance *= Mathf.Pow(0.55f, (float)num2);
}
...
if (Rand.Value < baseChance) (Rand.Value is a random float between (and including) 0 and 1)
{
... (relation is added)
return true
}
return false
}



TryDevelopBondRelation is called with a bond chance of .004 So that makes this base chance 1 in 250, which is only modified (chances diminish) by other active bonds.

Nothing about the faction patching you up, had riddled you with bullets just earlier, comfortable animal beds, a good roof, the animals skill... just a base chance on every heal applied. This is not mentioned as a critique of any kind, it's just what it is, and means I just have to try a little harder to get Antonina her mate.

#2
I've only recently started playing Rimworld, but I've already put far too many hours in it ;) I reached end-game a week ago and held off constructing 'the' space ship, because that was not how I wanted my colonies to end... Such a rickety mess of structural beams and cryptosleep pods was just not to my liking. This post will be something like a game-mechanics check and some opinions for how I'd like space ships implemented. I'd like to inventorize if everything I thought about can be achieved in-game before I'll try to implement parts of it. Yes, I'd like to actively contribute to a mod to make this happen. I haven't done much game modding but I am a seasoned software developer with over a decade of C# desktop application writing experience amongst many other things (I actually started out in my professional career on C/C++ projects, at the turn of the millennium, but even then I already had over a decade of hobby/educational programming experience). But first, how do I see space-ships in RimWorld?

Spaceships for colonists should be practicality for an appropriate investment in end-game and some new fun game elements to explore, expand, exploit and yeah, if you are into it the fourth 'e' as well. I'd like it to be somewhat realistic in the building departement, second. I'm not concerned about faction balance. That late in game, you should have the massive resources already to deal with any (mech/faction) raid thrown at you at 'some challenge' and most of them on 'rough' - in the open field, no need for any kill boxes or attention traps - and have no severe casualties (at higher difficulty level you may need to be a bit more careful). Or make a warband that dwarfs anything enemy colonies can throw at you, if you play a storyteller like Random Randy or Iron Dan that doesn't restrict you severely in colonists number.
It's like playing Master of Orion, where all the other races hold the galaxy and you never colonized another planet. But you did get to the end-game research while all other races are only halfway, built your doom stars and for half a game now, you pounded into dust anything that even looked queerly upon your single Gaia terraformed blue marble. When you decide to 'expand', the game will be 'won' in a few turns anyway. Even the Antarans are something to take pitty upon, rather than fear, and you sure as hell realise that you have 'won' without technically meeting a victory condition - yet.
In MOO, the thing that could challenge you - a peer equal to you in another galaxy, is something that isn't in game. The same for Rimworld. When you get to space ships, you would have the tech level to, with enough hands, make a world glitter and your only challenge would be other civilizations out in space. However, that's that other game...But I'd like to have space ships still, if only for them currently being practical (in-game) in orbital use.

For me, in this game, getting and keeping space ships afloat involves three stages:
-Building the infrastructure, or space port.
-Building an actual ship (and maybe more, if you want).
-Maintain your ship(s).

Usability of ships should be:
-Trade with other settlements, if they are technically advanced enough to have orbital beacons.
-Transfer (own faction) or trade (other faction) any person or resource on a world cell when landed.
-Orbital bombardment with 'no' accuracy (like mortars, maybe even wider) on a selected world cell within range. Top-down bombardment with some accuracy when hovering above the world cell. Will cost mortar shells.
-Land, damage free, on any world cell with a friendly space port.
-Land, with ship damage appropriate to the environment, on any world cell with an unroofed non-mountainous space the size of a space port, or a damaged space port, for that fact. (Thinking of mortaring those centipedes, moving over your space port towards your second turret line? Think again!)

The costs involved are:
-Research - some extra research is needed for topics currently not in vanilla.
-Construction costs of the infrastructure. In materials and most importantly, level, fully paved, continuous, unroofed and well defended tile space.
-Construction costs of ship hull (metals, plasteel and components), functional parts (whatever it needs to be) and interior (if you want gold floors, go for gold floors ;) ). And construction of it should take an insane number of 'work ticks' for all components needed. If you thought component and power armour assembly take too long, eat your heart out. It may take multiple in-game seasons to produce a complete ship hull. All the while, the facilities will need to be defended and your colony thriving.
-Maintenance costs in fuels and repair costs.

Now for the game mechanics I'd need and what they are used for.

Research. Many mods add research topics. This should be no different. Research topics needed because they are missing in vanilla are, in my opinion:
-Space port construction research
-Ship hull research
-Ship-wide life support.
-Manual piloting, navigation instruments and procedures. (Maybe colonists should have a pilotting skill as well?)
-Orbital bombardment.
-Remote ship control research.
Most of these will be optional. But you will miss out on ship usability and possible survivability.

To actually have a place to land and take-off hazard-fee, you need a flat, unroofed and specifically paved terrain which is of a size that is large enough to support the entire ship. Maybe there should be a scale factor involved because we can hardly support a 200 tile-wide interstellar vessel on a 400x400 colony map size. But it should still be significant. So I'd propose 16x16 for the smallest trade vessels to 64x64 for the 'interstellar' class ships.
Material should be steel primarily (like with concrete), but maybe it should have a nice graphic overlay, like the markings on airfield runways.
-Building a floor tile-wise but have an overall graphic, dependent on square size, is that possible?

To actually be able to build the hull of your ship, you need an assembly hall. 8x8 in size, should be adjacent to your space port fully at one side. The hall contains two machine assembly workshops, which can be occupied by colonists with a skill in construction. Also there should be a blueprint console where you can select the ship hull being built on a particular space port (part) in range. When a ship is being constructed, no ship can land on the part of the space port taken up by the ship in construction.
-Adjacency check of building structures?
-Building or setting up complete buildings? The Setting up camp mod does something similar...

The ship itself should be a fully modifiable map with a few twists
-Use of camp map space, made permanently. Not connected to a world cell, but stand-alone and accessible for colonists and goods through various mechanisms.
-Disable random events (currently not available on a camp map, so that's done).
-Introduce some new random events (hull breach).
-Disable natural resources (no trees growing, also no deep drilling).
-Standard ship hull implemented as a wall structure, a fully metal floor tiling and a couple of doors as exits which work as portals spawning any pawn/animal adjacent to the space the ship has landed upon.
-Damage is represented as weakened/missing wall/hull pieces. A ship can't lift off if there are holes in the hull and weakened hull pieces should increase the risk of a hull breach event, requiring an emergency landing on the world cell the space ship is currently floating above or anyone put in cryptosleep with an AI landing to a pre-destined space port, or through radio control. Damage occurs on landing in unsuitable terrain and when a ship is being shot at, while landed. Damaged pieces can be repaired (construction), missing pieces should be made from raw materials.

There should be some standard equipment on a ship in fixed places (engines, ship reactor (doubles as power source), optional AI, communications console, piloting console(s)). The rest of the space can be partitioned and used to the players liking.
-Use the same mechanic as steam geysers to put stuff where it needs to be.

To move the ship over the world I'd like to use an extension of the caravan-en-route mechanics.

Pilots can fumble, have mental breaks, consoles and engines can break down, power conduits can blow. If nothing pilots the ship, it will most likely crash with no survivors on board (emergency pods?) after a set number of seconds. It could completely break up in orbit or bore itself into the under-laying world cell and there will be a small percentage of 'successful' emergency landing. Percentages of emergency landing will increase with pilots snapping out of it, or remote control taking. If you have redundant consoles/pilots, you reduce the risks and an on-board constructor (can I name mine, Scotty?) can repair much of it to restore redundancy. An AI on board means you don't need a proper pilot to keep the ship afloat but you won't be able to administer course changes. Unless there is a colonist, conscious, with some pilot skill somewhere on board of the ship or you have researched remote control research and a colony with a comm console and local pilot present.
-I think most of the mechanics are already present in game. It will be script content here mostly and how to bind 'new' events to this ship hull map.
-The piloting checks may be something 'new'.
-Can we add new skills? And how to do that for existing pawns in existing games?

Trade the contents of your ship-map against the contents of the world cells you're hovering near (orbital beacon filtered) or the cell you have landed upon (like caravan trading). Also, drop pods should work like they are fired from the world cell the ship is at that moment. Either floating above or landed.
-Generated colonies with a sufficient tech-level should have a command console generated in their structures, beacons near any storage space like places and a pawn at the command console whenever there is orbital trading. When colonies of such tech-level are in range, there should be a chance one hails you for trade.
-Can we forgo a power check here and still have it 'work'? Else we also need to generate a power structure.
-World-cell to world-cell transfer/trading for when landed of whatever is on storage spaces, is that something easy to implement upon current mechanics?
-Drop pods for item transfer and emergency escape. Should be exactly like drop pods in a typical colony, for now. With chemfuel use and new pod construction (if you have the metal and components laying around).


I know this post has already been way too long. If you have any remarks, don't hesitate to reply ;)
When I start writing mod-code for these ideas, I'll probably do it piece-by-piece, making small mods for each of the game play elements expressed in here. Don't expect a fully working space ship mod in weeks or even months. I'm still playing Rimworld and have a daytime job so a couple of hours a week, half a day per week at most... And I'm definitely no designer so expect place-holder graphics with community requests to make it better whenever I got something technically 'done' ;)







#3
I've read many posts on this forum about how Caravanning is severely limited in usability in A16 and to be fair I had many problems with it until a few days ago when everything just fit together.
My main problems, using the vanilla game are:
-Random loading spot.
-Only the caravanneers are packing the pack animals.

For the first problem there is an excellent mod, CaravanSpot.

For the second problem I found the following workaround:

-Create your caravan in the world view selecting all goods, pack animals and colonists you want to help packing the caravan. Make sure the weight of your items does not over-reach the carrying capacity of your pack-animals ALONE. This I have to stress very carefully. You even want to include some headroom for if a pack animal gets pregnant on the way. So you won't have problems at embarkation later or have an immobile caravan while on-route.
-Your colonists will herd the pack animals and load up the caravan in no-time if you use CaravanSpot for a loading location near your stores.
-At the moment of embarkation (and this is important), cancel the forming of your caravan by de-preoritizing the activity from one of the colonists loading the caravan. This is something you have to look at manually. The closer you cancel when the caravan leaves from the caravan loading spot, the easier the next bit gets.
-Now, re-form your caravan and select the pack animals and your caravan master of choice. Don't forget to select the correct exit! If you have room left for a couple of things, maybe grab a single extra stack of food for on the way, but nothing more!
-He/she will re-herd the caravan at the loading spot and go straight to the exit (if no extra items are selected).
-Voila, done loading a caravan, within a fraction of a day. No exhaustion, no mental breaking. No deaths by starvation.

Obviously such large caravans, having only one or a few caravan master, are only recommended for short trips. If you're assaulted along the way you have very limited protection.

Some statistics for fun and boasting:
-My muffalo fleet currently has a carrying capacity of 5 metric tonnes. This includes juveniles, pregnancies and calfs but is equivalent to 72 adult muffalo.
-The fleet is loaded within 3 in-game hours (using 10 of the 12 colonists of my mining colony) using this method, with vanilla items (tested with steel and brick mostly). I also use a crates mod in my game, which can make packing times virtually non-existent, if you only use crated items, which do have a hight weight-per-item ratio.