[A15][WIP] Expeditions - Explore the world of Rimworld

Started by Paul.R, September 29, 2016, 02:21:34 PM

Previous topic - Next topic

Paul.R

Expeditions

Not doing this anymore since this is (kinda) being added to the game. The code was one hell of a mess anyway, since I started making this mod when I had 0 experience in C#/size]


Important:
This mod is far from finished or stable, the download is just an alpha so you can kinda play around with it.
DO NOT add this mod to your active games if you want to keep them

So yeah, as the title may suggest I was, like many other players, bored of just being able to interact with only one tile of this big map that gets generated (and I also wanted to get more into Modding for Rimworld). Since I pretty much started even reading about Rimworld Modding about 1 month ago, I didn't wanted to tackle the challenge of building outpost, so I came up with the idea of being able to start expeditions.




This is how it works:
- You can choose how long you want to explore one tile (default: one day) - the longer you stay, the more resources you'll get
- You can choose for what resources your pawn should look (one pawn can only carry 2000 items; nothing with weight so far, just units)
- The traveltime consists of two big factors: How long you want your Pawn to stay and explore AND how far the tile is away (your pawn will travel at 4tiles/day)
- After the expedition is done, the pawn will return with the items in his inventory, but will not drop it automatically(todo)
- The pawn will have a cooldown of 1 day until he can go on another expedition

You will be able to control your Expeditions over the "Expeditions"-tab found on the lower bar.




The Mechanics
What resources which come from mountains you will be able to gather depends on your colonists mining level[/size]




Mining Levels
Min lvl0145791213
ResourceStoneblocksSteelComponentsGoldSilverJadeUraniumPlasteel

Moving on to Berries and Wood, which doesn't depend on any skill levels, but still hast multipliers (Wood = 1, Berries = 5; Will explain now)

The amount of resources you get is calculated with this (short and) simple calculation:

Math.Floor(((defaultAmount * percentage / 100) * days / 2) * pawn.health.capacities.GetEfficiency(PawnCapacityDefOf.Manipulation) * pawn.health.capacities.GetEfficiency(PawnCapacityDefOf.Moving))

  • defaultAmount for Berries, Wood = 50
  • defaultAmount for any other resource = 200
  • percentage is the percentage you choose in the resourcedialog(will provide pic soon)
  • days = days you choose to let your colonist stay at the coords (/2 because you should only get the total amount by selecting two days, so basically to balance things)




ToDo
Low Priority
High Priority
- Add function to add animals to expedition to expand the maximum amount a colonist can bring back
- Let the manipulation/movement efficency affect how much your pawn can carry/will even find
- Let the movement efficency affect the travelspeed
- Add Rescues -> Rescue captured Pawns
- Add Raids (will do when everything else is done)
- Add Meat as a resource to gather
- Balance the general times/item amounts
- Add Trade Caravans
- Make squares depletable
- (Randomly?) generate rare ore locations

As I said, if I get more into modding I might try adding outposts, but I'll finish this first.

0.1
0.2
(source will be available on github soon, I'm just too lazy to upload it)




Patchnotes
Quote0.2

  • adjusted Mininglevels
  • adjusted Traveltime to 4 tiles/day
  • added Movement and Manipulation to calculations of Resourceamounts and Expeditiontimes
  • fixed saving problem - brought along new problem, cannot add new expeditions after save gets loaded




How to Install
1. Open .rar file
2. copy "Expeditions" folder in "yourpathtorimworld/Rimworld/Mods" (yourpathtorimworld is often C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods)

Let me know what you think and what I could improve, after all this I a WIP :)[/size]

DariusWolfe

Nice! Will definitely be interested in checking this out.

An idea for travel speed, I'd consider having the size of the map tile you chose affect the travel speed; If you chose the largest size, then presumably every tile on the map would be that size, right?

Presumably, since you're looking at adding Raids, that eventually injury or even death will be on the table for expeditions?

Paul.R


Was planning on doing that too. Problem is, I will have to generate the battles which will be pretty complicated (at least to come up with how to do it). I also want to add death and injury to the rescue missions since you basically have to fight your way inside the enemy base to get the prisoner (or maybe the colonist got recruited, ohh the possibilitys ;D)

DariusWolfe

I think, were it me, I'd just define a scale based on potential resistance levels, with X potential ranged injuries and Y potential melee injuries (with tribal enemies being weight more toward melee), then roll a 50/50 for each, using existing mechanics to determine the hit location and severity. So like...

Light: 5 ranged, 3 melee
Med: 10 ranged, 7 melee
Etc.
So you'd get an average of 2-3 ranged injuries and 2 melee injuries for a light resistance raid, divided amongst the colonists you send, then whatever algorithms are used to determine location and severity could be used to generate the actual injuries.

Thirite

This sounds like a really interesting idea. I was never enamoured by the "move to a different map tile!" suggestions, but I can definitely see this working. Perhaps give the player the ability to send out trading caravans as well?

BlueWinds

I like the idea here. A couple of suggestions:

1. Tone down the required mining levels. 12 for plasteel, 14 for uranium would probably be a good top level.
2. Especially for mining things, squares should be depletable. And some squares just shouldn't have any jade / uranium / gold at all.
3. Tone down the map movement speed. I'd go with more like 2-4 squares per day. As a low priority item, could be slowed down by mountainous terrain?
4. Check out Misc. Core + Incidents - it already has an "sending pawns off-screen" system, though it doesn't use the world map like you are. Might be helpful for getting things to save / ideas. https://ludeon.com/forums/index.php?topic=3612.0

Paul.R

Well since this (I guess) was already an ongoing idea of Tynan, I will not continue to develope this mod. As already written above, the code is an absolute clusterfuck because this was my first proper c# project and I started with no experience at all. (His version also looks wayyyy better, lets be honest here)

Thirite

Well I guess you get the prestigious "mod integrated into RimWorld" bragging rights. Sort of. Goes to show it was a good idea.

samuk190

Quote from: Paul.R on November 13, 2016, 04:13:37 PM
Well since this (I guess) was already an ongoing idea of Tynan, I will not continue to develope this mod. As already written above, the code is an absolute clusterfuck because this was my first proper c# project and I started with no experience at all. (His version also looks wayyyy better, lets be honest here)
Why you don't do documentation and make a expedition mod different than tynan idea?