GithubHelp home page GithubHelp logo

filunderscore / persistentrimworlds Goto Github PK

View Code? Open in Web Editor NEW
11.0 10.0 0.0 926 KB

Turns a rimworld into a persistent rimworld; explore fallen colonies where pirates may lurk, and stop by your predecessors.

License: GNU General Public License v3.0

C# 100.00%
rimworld persistent-worlds mod

persistentrimworlds's Introduction

Persistent RimWorlds

Turns a RimWorld into a Persistent RimWorld; explore fallen colonies where pirates may lurk and stop by your predecessors.

This RimWorld mod allows you to convert any chosen 'game' (save file) into a persistent rimworld, allowing you to have multiple colonies on the same world. The Persistent RimWorlds mod can be accessed through the main menu.

Features*

  • Start a new colony using a world from a previous save.
  • Trade with previous colonies throughout the world. (This may include trading using the actual inventories of said colonies)
  • Visit old maps from previous abandoned colonies. (This is a dice roll event, either - structures will be degraded over time OR pirates will have settled in to your surprise when you try to resettle)
  • Become enemies/allies with other colonies.
  • Convert an existing save game into a persistent world.
  • Switch between colonies in-game without having to reload the whole world again, through the Colonies tab.
  • Revert to a normal single-colony save game with any colony should you decide to quit playing a persistent world

* This list may change over time as the mod progresses in development.

Branches

stable - The latest stable version of the mod, i.e. pre-release/official release.

dev - The latest unstable development version of the mod, i.e. the next version for release in-development.

Development, Testing & Compatibility
I aim to have this mod compatible with many other mods out there, so this mod 
runs primarily using Harmony to patch. It however checks first if a persistent 
world is present - in order to not interfere with single colony games.

This mod will require extensive testing, and so any help is appreciated in 
stabilizing mod support as well as end-game support. This is because there 
is still a lot of testing that needs to be conducted and bugs to be fixed, 
as well as features to be implemented. Any contributions are welcome that 
improve mod compatibility, bugs or improvements on current mod features. Any 
suggestions can be reported in the Issues tab with using the 'enhancement' 
label. Any bugs that need to be reported can be labeled with the 'bug' label.

Contributions

persistentrimworlds's People

Contributors

filunderscore avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

persistentrimworlds's Issues

Caravaning

Figure out how caravans will be stored in world save without appearing for other colonies.

Better colonies tab.

  • Switch colonies 0.1.3.0
  • Change current colony color 0.1.3.0
  • Change current colony leader 0.1.4.0
  • See other colony leaders 0.1.3.0
  • Compatibility with Fluffy's Relations Tab and Psychology 0.1.5.0 References #28
  • Better sorting with a menu option of sorting alphabetically, by colony (id), by last write time etc. 0.1.5.0
  • Favorites system for colony list. A star in the top right corner that can be clicked to be active. I.E. two stars, one smaller than the other that is shaded in when enabled, invisible when disabled. 0.1.4.0

Backwards support with 1.1, 1.0

Just a good idea to expand the audience of the mod when officially released at some point, due to other mods being outdated/abandoned.

Persistent RimWorld Settings

Offer settings per Persistent RimWorld basis, such as:

  • Renaming world
  • Changing new map generation size
  • World backups instead of saving new copies of a world manually

Accessing TicksAbs but gameStartAbsTick is not set yet (you most likely want to use GenTicks.TicksAbs instead).

Stacktrace:
Accessing TicksAbs but gameStartAbsTick is not set yet (you most likely want to use GenTicks.TicksAbs instead). Verse.Log:Error(String, Boolean) Verse.Log:ErrorOnce(String, Int32, Boolean) Verse.TickManager:get_TicksAbs() Verse.LogEntry:.ctor_Patch0(Object, LogEntryDef) Verse.PlayLogEntry_Interaction:.ctor() System.Reflection.MonoCMethod:InternalInvoke(Object, Object[], Exception&) System.Reflection.MonoCMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo) System.Reflection.MonoCMethod:Invoke(BindingFlags, Binder, Object[], CultureInfo) System.Activator:CreateInstance(Type, BindingFlags, Binder, Object[], CultureInfo, Object[]) System.Activator:CreateInstance(Type, Object[], Object[]) System.Activator:CreateInstance(Type, Object[]) Verse.ScribeExtractor:SaveableFromNode(XmlNode, Object[]) Verse.Scribe_Collections:Look(List1&, Boolean, String, LookMode, Object[])
Verse.Scribe_Collections:Look(List1&, String, LookMode, Object[]) Verse.PlayLog:ExposeData() Verse.ScribeExtractor:SaveableFromNode(XmlNode, Object[]) Verse.Scribe_Deep:Look(PlayLog&, Boolean, String, Object[]) Verse.Scribe_Deep:Look(PlayLog&, String, Object[]) Verse.Game:ExposeSmallComponents() Verse.Game:LoadGame_Patch1(Object) Verse.SavedGameLoaderNow:LoadGameFromSaveFileNow_Patch1(String) Verse.Root_Play:<Start>m__0() Verse.LongEventHandler:RunEventFromAnotherThread(Action) Verse.LongEventHandler:<UpdateCurrentAsynchronousEvent>m__1()

Planet won't convert to Persistent RimWorlds

When loading a world in the Persistent RimWorlds tab it gets to 90% complete, then...

"Error while loading a map"
"An error occurred while loading a map. See error log for more information"

The map icon then appears in the load worlds tab. However, when I click to load up the map, I just get a black screen.

See below for error log...
https://pastebin.com/5ivU7HE4

Update mod to version RimWorld 1.1

The mod needs to be updated to the latest RimWorld version, some methods that are being patched have changed and will need to be updated over the course of the next few weeks. This will coincide with the 0.1.4.0 pre-release which will support the latest RimWorld version at release.

Sort colonies and worlds in main loading menus

Sort colonies and worlds by similar system to Colonies tab system in loading menus.

Additional info:

  • Include favorites list for colony selection on load colony menu
  • Offer last write time as sorting option for world load menu as well as alphabetical sorting

Scaling issue with textures in UI

After porting the mod to 1.1, there is now a scaling issue with textures within the mod's colony selection UI (both in-game and in the main menu), namely with the tribe icons and colony leaders. Seems to affect recently visited colonies, meaning the textures must have updated and need to be scaled down?

Visiting and trading with colonies.

Visit and trade with other colonies, possibly even assisting them in the future.

  • Visit other colonies 0.2.0.0
  • Trade with other colonies 0.2.0.0
  • Assist other colonies for rewards 0.2.1.0+

Missing Save Persistent World option in in-game UI.

While porting to 1.1, the Save option for Persistent Worlds in-game was not ported over and is left in the obsolete section of the MainMenuDrawer patch class. This will need a port over to the newer main menu patching system implemented with the port.

Colony FileInfo is null (when switching Colonies in-game)

For some reason, when LoadColony(PersistentColony&) is called, the Log.Error debug message of "Colony fileinfo is null." pops up when loading the colony which indicates that the FileInfo field is no longer set. This will need to be investigated as this prevents loading the colony in question unless the game is restarted. This usually happens when the persistent world is saved at a random chance.

Resettling in abandoned colonies.

Resettle into old abandoned colonies and have a dice roll type of event occur. Buildings will have degraded over time with animals and trees living in them OR pirates/mechanoids will have settled in and take you by surprise.

Set off colonies to thrive on their own.

This is a potential idea in which colonies will quietly simulate in the background or something with configurable settings, possibly running natively with C++/something else (for efficiency)? Will look into it in a future version.

Warning when saving objects, possibly disable or handle?

Stacktrace:
Object with load ID LogEntry_398156_10 is referenced (xml node name: combatLogEntry) but is not deep-saved. This will cause errors during loading. Verse.Log:Warning(String, Boolean) Verse.DebugLoadIDsSavingErrorsChecker:CheckForErrorsAndClear() Verse.ScribeSaver:FinalizeSaving() Verse.SafeSaver:DoSave(String, String, Action) Verse.SafeSaver:Save(String, String, Action, Boolean) PersistentWorlds.SaveAndLoad.PersistentWorldLoadSaver:SaveWorldData() PersistentWorlds.SaveAndLoad.PersistentWorldLoadSaver:SaveWorld() PersistentWorlds.SaveAndLoad.PersistentWorldLoadSaver:Convert(Game) PersistentWorlds.Patches.Game_FinalizeInit_Patch:Postfix(Game) Verse.Game:FinalizeInit_Patch1(Object) Verse.Game:LoadGame_Patch1(Object) Verse.SavedGameLoaderNow:LoadGameFromSaveFileNow_Patch1(String) Verse.Root_Play:<Start>m__0() Verse.LongEventHandler:RunEventFromAnotherThread(Action) Verse.LongEventHandler:<UpdateCurrentAsynchronousEvent>m__1()
Happens when saving all references, complaining they aren't deep saved even though they will be.

Root level exception in OnGUI().

Stacktrace:
Root level exception in OnGUI(): System.NullReferenceException: Object reference not set to an instance of an object at Verse.UIRoot_Entry.UIRootOnGUI () [0x00000] in <filename unknown>:0 at Verse.Root.OnGUI () [0x00000] in <filename unknown>:0 Verse.Log:Error(String, Boolean) Verse.Root:OnGUI()

Single colony games

Need to test whether or not single colony games can still be loaded with this new changes. If not, need to add in null checks beforehand.

LogEntry.ctor() throws error?

Need to investigate LogEntry constructor for possible null variables attempting to be used that may not have been loaded yet.

  at Verse.LogEntry..ctor (Verse.LogEntryDef def) [0x00000] in <filename unknown>:0 
  at Verse.LogEntry_DamageResult..ctor (Verse.LogEntryDef def) [0x00000] in <filename unknown>:0 
  at Verse.BattleLogEntry_MeleeCombat..ctor () [0x00000] in <filename unknown>:0 
  at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (object,object[],System.Exception&)
  at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  at System.Reflection.MonoCMethod.Invoke (BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  at System.Activator.CreateInstance (System.Type type, BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) [0x00000] in <filename unknown>:0 
  at System.Activator.CreateInstance (System.Type type, System.Object[] args, System.Object[] activationAttributes) [0x00000] in <filename unknown>:0 
  at System.Activator.CreateInstance (System.Type type, System.Object[] args) [0x00000] in <filename unknown>:0 
  at Verse.ScribeExtractor.SaveableFromNode[LogEntry] (System.Xml.XmlNode subNode, System.Object[] ctorArgs) [0x00000] in <filename unknown>:0 
Subnode:
<li Class="BattleLogEntry_MeleeCombat"><ticksAbs>1535426</ticksAbs><logID>6</logID><def>MeleeAttack</def><damagedParts><li><body>Human</body><index>54</index></li></damagedParts><damagedPartsDestroyed><li>False</li></damagedPartsDestroyed><ruleDef>Maneuver_Smash_MeleeHit</ruleDef><alwaysShowInCompact>True</alwaysShowInCompact><initiator>Thing_Human900</initiator><recipientPawn>Thing_Human73990</recipientPawn><implementType>Bodypart</implementType><toolLabel>left fist</toolLabel></li>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.