Ludeon Forums

RimWorld => Mods => Unfinished => Topic started by: scuba156 on December 21, 2016, 10:01:42 AM

Title: [A16][WIP] Persistent Worlds [7.1.17 AEST][Features updated]
Post by: scuba156 on December 21, 2016, 10:01:42 AM
(http://i.imgur.com/uwtC0tq.png)

Description
Persistent Worlds aims to allow continuous play through on an existing world, even after your first faction is long gone. Re-visit old bases that once belonged to your old colonies, with a chance to come across some traders or raiders who have taken over the land! Send caravans to your old colonies that survived and trade your goods with them!

Mod Goals/Features
NOTE: Persistent Worlds is currently an early work in progress. Features are not fully implemented, only use this for testing purposes until the WIP tag is removed.

(* = recently updated)

Known Issues
Many... there are many known issues. This is more of a placeholder until later.

Screenshots
Since it seems there is no spoiler tag and to save bandwidth, screenshots are viewable on the Steam Workshop page (http://steamcommunity.com/sharedfiles/filedetails/?id=828696032)

Author
Thanks

Downloads
NOTE: Persistent Worlds is currently an early work in progress. Features are not fully implemented, only use this for testing purposes until the WIP tag is removed.
Title: Re: [A16][WIP] Persistent Worlds
Post by: scuba156 on December 26, 2016, 12:28:05 AM
Just a quick update. I haven't been able to do much due to the Xmas holidays, but did manage to get some done. I am hoping to at least upload the source over the next few days.
Title: Re: [A16][WIP] Persistent Worlds
Post by: Telefonmast on December 26, 2016, 04:07:44 PM
I really like this idea!
Keep up the work.

It's quite a sad moment once your colony is dead since then you either stop, wait, or reload the last save with everyone alive.
So having the ability to continue without dying of boredom is a nice concept.

Though some examples of "What is currently done" would be nice, same goes for what isnt done yet; "Stuff" doesn't tell much :P
Title: Re: [A16][WIP] Persistent Worlds
Post by: scuba156 on December 27, 2016, 12:35:21 AM
Thanks for the feedback!

That was all written at 2 am, I couldn't think of what I wanted to type exactly so the use of the word 'more' is a bit 'more' than I would like :p I will add some extra details and at least a screenshot soon, just be warned that it is a very early work in progress and looks ugly :D
Title: Re: [A16][WIP] Persistent Worlds
Post by: Telefonmast on December 27, 2016, 02:27:29 AM
Everything has its humble beginnings
Title: Re: [A16][WIP] Persistent Worlds [28.12.16][Screenshots Added]
Post by: scuba156 on December 27, 2016, 10:05:07 PM
OP has been updated, will add more info later.

I cleaned up a lot of my code (removing old commented code, unused usings, small bit of refactoring) in preparation for uploading the source, I still have to finish up a few things such as setting nextMapID before posting it.

I also moved the entry point to be on the select storyteller page instead of the create world page, and added a detour to StorytellerUI. This would currently be incompatible with any mod that uses custom pages, but I am unaware of any that currently do.
Title: Re: [A16][WIP] Persistent Worlds [29.12.16 AEST][Partial Source Code Added]
Post by: scuba156 on December 28, 2016, 10:14:44 AM
After a big clean up of code, partial source has been posted to Github (https://github.com/scuba156/PersistentWorlds)!

I say partial because I have decided to rewrite how the data gets edited now that I know a bit more about how RimWorld works, so I have not included any code that edits any data. All that currently is available is the new colony page detours and overrides as shown in the screenshots and loading of world data only. It will not work correctly once a landing site is selected, as there will be no player map, faction, or cryptosleep pods for starting colonists to spawn in.
Title: Re: [A16][WIP] Persistent Worlds [29.12.16 AEST][Partial Source Code Added]
Post by: scuba156 on December 28, 2016, 10:14:43 PM
And another update:

Uploaded to steam workshop, link is in the OP.

Moved old faction to a new tribe faction, currently has random affinity towards you. Allows blank worlds to be loaded.
Title: Re: [A16][WIP] Persistent Worlds [29.12.16 AEST][Source Code Added]
Post by: Grishnerf on December 28, 2016, 11:19:11 PM
the concept sounds amazing, i hope it all works out in the end!
Title: Re: [A16][WIP] Persistent Worlds [29.12.16 AEST][Source Code Added]
Post by: scuba156 on December 30, 2016, 01:15:50 PM
Quote from: Grishnerf on December 28, 2016, 11:19:11 PM
the concept sounds amazing, i hope it all works out in the end!
Thank you.

I've done a few updates over the past couple of days, mainly regarding cleaning of invalid refrences. More details are in each commit on github, I tried to summarize each commit in the first listed item. I will update the OP tomorrow.
Title: Re: [A16][WIP] Persistent Worlds [31.12.16 AEST][Steam workshop + updates Added]
Post by: scuba156 on December 31, 2016, 01:05:51 AM
A few more updates today and there will be more to come.

Drug policies and outfits are now loaded, also cleaned up a few more warning messages during world loading. I've almost removed all the warning messages while loading a world from my save but I only have mine to go from so I might need a bit of help.

Would there be people that would kindly upload their A16 save file for me to test against? Preferably vanilla saves for now but a few mods is fine. Also the more you have done with the world/map the better. Thank you.
Title: Re: [A16][WIP] Persistent Worlds [31.12.16 AEST][Save Files Needed]
Post by: Nanao-kun on January 01, 2017, 12:19:18 PM
This looks pretty cool. I don't have any saves to spare though, all of mine are very heavily modded.
Title: Re: [A16][WIP] Persistent Worlds [31.12.16 AEST][Save Files Needed]
Post by: scuba156 on January 01, 2017, 10:45:53 PM
Quote from: Nanao-kun on January 01, 2017, 12:19:18 PM
This looks pretty cool. I don't have any saves to spare though, all of mine are very heavily modded.
Thanks for the interest, helps to keep me motivated. I am happy to take a heavily modded save, it would be interesting to see if it works (it should)

As a quick update: all world related data should now be loaded, maps are also loaded but are currently kept in memory which could cause performance issues. Next up is working out the best way to deal with the old maps and entering them.
Title: Re: [A16][WIP] Persistent Worlds [4.1.17 AEST][Save Files Still Needed + OP updated]
Post by: scuba156 on January 03, 2017, 07:32:09 PM
Because I am being lazy today, like every other day, I'm just going to copy&paste what I wrote on steam:

QuoteThanks everyone. Hopefully it won't be long till the initial release. Once world and map loading is finished it will then be usable, otherwise you would need to start a new colony between updates. Because of this, I have to try to get everything right the first time or it will be a pain in the ass when I do fix it.

I do require some help though. If people could either test it out for a little while and let me know of any issues. Or if you could visit the pinned discussion thread and upload your save, no matter how many mods you have, that would be awesome. Thanks.
Title: Re: [A16][WIP] Persistent Worlds [7.1.17 AEST][Features updated]
Post by: scuba156 on January 06, 2017, 12:08:02 PM
Just pushed an update that will change your previous faction base to abandoned if no player pawns were on the map, or to destroyed if no player pawns were on the map but another factions pawns were. Instead of being destroyed, it will be changed to being owned by one of the factions with pawns on that map. It also currently works with 1 map.

After these things are finished, I can't think of anything else that needs to be done before load time, which means it will be in a usable state.
Title: Re: [A16][WIP] Persistent Worlds [7.1.17 AEST][Features updated]
Post by: scuba156 on January 09, 2017, 02:43:23 AM
I've been a bit unwell for a few days so things slowed down a bit but will get back into it later today.

I haven't posted any updates so far but the next update will have, at least, the following changes:

-Old maps are now saved into a separate file per map
-Each map file has the modIds and modNames of the world
-Added playLogHandler and playSettings Handler
-old maps are loaded when visiting old bases
-a few other other things I've probably forgotten
Title: Re: [A16][WIP] Persistent Worlds [7.1.17 AEST][Features updated]
Post by: Helixien on January 09, 2017, 08:05:18 AM
Let me just say that I love this idea and the mod! I always wanted to make multiple colonies and factions on one planet!

Just a simple idea for the future, since you want to implement that buildings turn into ruins over time, when starting a new game with an exisitng world, let us choose how much time has passed since the last colony. for example 2 days will make no changes, but say 100 years and the colony is abandoned and when say, the player chooses, 1000 years, the base is just a ruin.
Title: Re: [A16][WIP] Persistent Worlds [7.1.17 AEST][Features updated]
Post by: scuba156 on January 09, 2017, 09:40:18 AM
Quote from: Helixien on January 09, 2017, 08:05:18 AM
Let me just say that I love this idea and the mod! I always wanted to make multiple colonies and factions on one planet!

Just a simple idea for the future, since you want to implement that buildings turn into ruins over time, when starting a new game with an exisitng world, let us choose how much time has passed since the last colony. for example 2 days will make no changes, but say 100 years and the colony is abandoned and when say, the player chooses, 1000 years, the base is just a ruin.
Thanks!

That's a great idea, and it will be easy to implement. I'll add it to my list of things to do!
Title: Re: [A16][WIP] Persistent Worlds [7.1.17 AEST][Features updated]
Post by: scuba156 on January 10, 2017, 12:09:08 AM
Quote from: scuba156 on January 09, 2017, 02:43:23 AM
I've been a bit unwell for a few days so things slowed down a bit but will get back into it later today.

I haven't posted any updates so far but the next update will have, at least, the following changes:

-Old maps are now saved into a separate file per map
-Each map file has the modIds and modNames of the world
-Added playLogHandler and playSettings Handler
-old maps are loaded when visiting old bases
-a few other other things I've probably forgotten
Just an update on the above. I was hoping to have this out already but I ran into a few hiccups last night (was working on it till 5am) and will continue on it tonight.

When I was working on map loading, I wasn't able to get any 'thing' to spawn other than placed floors and the roofgrid. After an hour or so of scratching my head, I did the thing I should of done first, check if the data is actually being saved correctly, which is isn't. D'oh.

Compressible map things weren't being saved, but at least I know where to start when I get back into it next.
Title: Re: [A16][WIP] Persistent Worlds [7.1.17 AEST][Features updated]
Post by: scuba156 on January 10, 2017, 11:07:52 AM
So, fun story.

Was working on the issue above, of getting the list of 'things' in a map to save. I was getting null reference errors, Invalid cast exceptions, and a few more weird things that would take too long to explain, when everything seemed like it should work. Just over 2 hours of racking my brain trying to understand what was going wrong, rereading my code and comparing to source, thinking that maybe its impossible to do without having hundreds of detours (which would be dreadful to write them all, and break so much mod compatibility), until i realized I had left a single line in there that was re-initializing parts of the map :(

So much time wasted, and I still have a few errors to deal with but at least I know the reason for these ones. I probably wont be able to get an update out tonight because of this but I can at least move on now.
Title: Re: [A16][WIP] Persistent Worlds [7.1.17 AEST][Features updated]
Post by: scuba156 on January 10, 2017, 09:14:25 PM
This is starting to feel like a blog. Hopefully someone out there is reading it and finding it interesting.

As I thought, I wasn't able to finish it up in time to be able to push an update out. I progressed on some things and regressed on others. Maps now load perfectly when attacking your old base. Everything loads into the map, including buildings and pawns, your pawns from the caravan are spawned on the edge of the map as usual and the maps owning faction pawns are enemies.

I have not tested a map that has been taken over by a new faction because, as I mentioned, some things have regressed and that is map saving. Currently it seems that loading/saving a map using Map.ExposeData will reference some things like PlayerColony faction and the mapUI (looking for the colonistBar), which do not exist until after pawn selection and the game is in play mode respectively.

I originally had map load/save happen just after selecting a world to load, but the needed references don't exist yet which creates a lot of exception messages which is not good, even though it saves the map. So now I have to find a good spot to handle the maps, or find some way around the above errors.
Title: Re: [A16][WIP] Persistent Worlds [7.1.17 AEST][Features updated]
Post by: Seeker89 on January 11, 2017, 02:13:57 PM
Have no fear... I am reading this...

I wondering though, wasn't something like this in the game at some point?
Title: Re: [A16][WIP] Persistent Worlds [7.1.17 AEST][Features updated]
Post by: scuba156 on January 11, 2017, 07:58:19 PM
Quote from: Seeker89 on January 11, 2017, 02:13:57 PM
Have no fear... I am reading this...

I wondering though, wasn't something like this in the game at some point?
Glad to hear someone is :)

I'm not sure if it was in there, I only joined the RimWorld colony in late A15.

I didn't work on this yesterday. I worked on and released Mod List Backup (https://ludeon.com/forums/index.php?topic=29420.0). It let me have a break from this mod and will also be useful when loading different worlds.
Title: Re: [A16][WIP] Persistent Worlds [7.1.17 AEST][Features updated]
Post by: BlackSmokeDMax on January 12, 2017, 01:39:16 AM
Quote from: Seeker89 on January 11, 2017, 02:13:57 PM
Have no fear... I am reading this...

I wondering though, wasn't something like this in the game at some point?

Think it was back in Alpha 13 (not positive on that # though) and previous that you used to first generate a world. Then you would generate a colony on that world. So back then you could easily generate multiple colonies per world. Of course there was nothing in there at the time like in A16 where the world was actually more alive with factions. Everything was static at the time, so there really wasn't a lot of point in actually generating multiple colonies on the same planet. IIRC, it was also nothing like DF where you could actually go back and try to re-inhabit a colony that failed.
Title: Re: [A16][WIP] Persistent Worlds [7.1.17 AEST][Features updated]
Post by: Nomsayinbrah on January 13, 2017, 04:40:06 AM
Wow, actually a really great idea.. really nice constant updates

(Sorry if this has been said already) but what if your colony dies (with ur base)
will there be a possibility of someone else living inside ur base when you return to it? or would that be too hard to implement?
Title: Re: [A16][WIP] Persistent Worlds [7.1.17 AEST][Features updated]
Post by: scuba156 on January 14, 2017, 06:08:38 AM
Quote from: Nomsayinbrah on January 13, 2017, 04:40:06 AM
Wow, actually a really great idea.. really nice constant updates

(Sorry if this has been said already) but what if your colony dies (with ur base)
will there be a possibility of someone else living inside ur base when you return to it? or would that be too hard to implement?
That's the plan! :) If your colony dies during a raid or something, that base now belongs to that faction. If your base was abandoned then their may be visitors when you return.

My other mod is finished, and I will be returning to work on this one. Current thoughts are that I might scrap how I load/save maps, and parse through the map data manually instead of using the built in method. This will give me better control but also make it harder to update for future patches.
Title: Re: [A16][WIP] Persistent Worlds [7.1.17 AEST][Features updated]
Post by: scuba156 on January 20, 2017, 09:26:40 PM
Sorry for the lack of updates. This mod is definetly not dead and I'm still doing small bits of work to it at times.

I've changed parts of it so that map saving is done using Linq rather than using RimWorlds Scribe methods. This allows me to manipulate the map without having to deal with RimWorld wanting to resolve refs. RimWorlds current saving/loading method is a whole lot of spaghetti code that I hope to see improvements on in future RimWorld releases which would make this easier.

Currently map saving and loading is working, including building and pawns, but there are a lot of errors as things have some old references that need to be changed. I will push an update once some of this has been fixed.
Title: Re: [A16][WIP] Persistent Worlds [7.1.17 AEST][Features updated]
Post by: Senio on January 22, 2017, 11:52:24 AM
Quote from: scuba156 on January 20, 2017, 09:26:40 PM
Sorry for the lack of updates. This mod is definetly not dead and I'm still doing small bits of work to it at times.

I've changed parts of it so that map saving is done using Linq rather than using RimWorlds Scribe methods. This allows me to manipulate the map without having to deal with RimWorld wanting to resolve refs. RimWorlds current saving/loading method is a whole lot of spaghetti code that I hope to see improvements on in future RimWorld releases which would make this easier.

Currently map saving and loading is working, including building and pawns, but there are a lot of errors as things have some old references that need to be changed. I will push an update once some of this has been fixed.

Good job
Waiting this mod  ;D
Title: Re: [A16][WIP] Persistent Worlds [7.1.17 AEST][Features updated]
Post by: Techgenius on January 23, 2017, 09:22:56 PM
Your work is commendable, I hated how the development decided to cut out world generation like it used to be, I loved reusing my worlds, now.. having to generate a new world each time is so annoying, but hey, persistent worlds fixed this, incredible work!
Title: Re: [A16][WIP] Persistent Worlds [7.1.17 AEST][Features updated]
Post by: rdz1122 on February 10, 2017, 09:45:35 PM
What a great idea; I love the idea of revisiting an old base, especially if it has been taken over.  I was hoping that I could "gift" my abandoned base as I leave the planet (seems such a waste), but this is just about as good!
Title: Re: [A16][WIP] Persistent Worlds [7.1.17 AEST][Features updated]
Post by: AngleWyrm on February 23, 2017, 06:04:53 AM
Is there a download that isn't source code or Steam?
Title: Re: [A16][WIP] Persistent Worlds [7.1.17 AEST][Features updated]
Post by: S1lverw0lf on June 10, 2017, 04:12:00 PM
Need that for a17!!!  :D
Title: Re: [A16][WIP] Persistent Worlds [7.1.17 AEST][Features updated]
Post by: scuba156 on June 11, 2017, 12:14:44 PM
Quote from: S1lverw0lf on June 10, 2017, 04:12:00 PM
Need that for a17!!!  :D
I am working on a17 but I'm writing it from scratch so I can't say how long it will be.
Title: Re: [A16][WIP] Persistent Worlds [7.1.17 AEST][Features updated]
Post by: tgbps4 on June 11, 2017, 12:42:12 PM
reserved
Title: Re: [A16][WIP] Persistent Worlds [7.1.17 AEST][Features updated]
Post by: Hammerskyne on June 30, 2017, 06:46:43 PM
Scuba, this concept is awesome. Literally something I never realized I needed in the game.

Might I suggest, if you're still having difficulty referencing the map objects without player faction data, adding an option/button/whatever to 'retire' a colony and pass it into a container file for later reuse? And if that's feasible, would sharing of bases and spawning in arbitrary worlds be possible?

I feel like Rimworld moves closer to DF every day, and that pleases me greatly.
Title: Re: [A16][WIP] Persistent Worlds [7.1.17 AEST][Features updated]
Post by: scuba156 on July 02, 2017, 05:33:31 PM
Quote from: Hammerskyne on June 30, 2017, 06:46:43 PM
Scuba, this concept is awesome. Literally something I never realized I needed in the game.

Might I suggest, if you're still having difficulty referencing the map objects without player faction data, adding an option/button/whatever to 'retire' a colony and pass it into a container file for later reuse? And if that's feasible, would sharing of bases and spawning in arbitrary worlds be possible?

I feel like Rimworld moves closer to DF every day, and that pleases me greatly.
I haven't got up to rewriting the reference to map objects yet, I've done everything before that though in my new code. It even has an option button before you begin where you can choose to start with your old faction or start a new faction then and either set your old faction off on their own or remove them from the game :D

I just haven't touched the code for a little while as I had my hard drive die on my laptop which I dev on(I need to buy a new one when I can afford to). After that I've been having a break playing Darkest Dungeon, and trying to finish another project which I need to make a post about. The other project should allow me to work on every other project more efficiently with updating.
Title: Re: [A16][WIP] Persistent Worlds [7.1.17 AEST][Features updated]
Post by: Soupy Delicious on July 15, 2017, 06:06:06 AM
Definitely, definitely love this idea.  Im wishing for a persistent rimworld.  A desire to move on from my current base without abandoning it or leaving it just sitting there, constantly delivering notifications to my fore.
Title: Re: [A16][WIP] Persistent Worlds [7.1.17 AEST][Features updated]
Post by: tigg on August 07, 2017, 11:53:53 PM
Quote from: Techgenius on January 23, 2017, 09:22:56 PM
Your work is commendable, I hated how the development decided to cut out world generation like it used to be, I loved reusing my worlds, now.. having to generate a new world each time is so annoying...
Couldn't agree more!
Title: Re: [A16][WIP] Persistent Worlds [7.1.17 AEST][Features updated]
Post by: LiteEmUp on August 19, 2017, 02:58:09 AM
so what's the status of this mod??

would love to eventually play this mod... and any chance of an a17 update??
Title: Re: [A16][WIP] Persistent Worlds [7.1.17 AEST][Features updated]
Post by: raydarken on November 05, 2018, 01:21:41 PM
I would love to see this updated and continued for 1.0!
Title: Re: [A16][WIP] Persistent Worlds [7.1.17 AEST][Features updated]
Post by: scuba156 on November 07, 2018, 10:51:00 AM
Quote from: raydarken on November 05, 2018, 01:21:41 PM
I would love to see this updated and continued for 1.0!
While I have made no plans for it, I have been thinking about it.
Title: Re: [A16][WIP] Persistent Worlds [7.1.17 AEST][Features updated]
Post by: lehniers on February 24, 2019, 04:55:03 AM
need update... plz be my saviour
Title: Re: [A16][WIP] Persistent Worlds [7.1.17 AEST][Features updated]
Post by: NobodyImportant on August 10, 2019, 01:22:37 AM
Well since the other persistent world mod seems abandoned... maybe this one isn't? Come oooon someone?

The idea is so great it should be vanilla game behavior