[1.0] Prepare Landing (v0.9.2)

Started by neitsa, July 22, 2017, 01:05:30 PM

Previous topic - Next topic

neitsa

#60
Quote from: BlackSmokeDMax on December 21, 2017, 06:51:55 AM
Quote from: Zalpha on December 11, 2017, 03:14:25 AM
Good on you! Thanks for the amazing mod. This is now a core mod of mine. I will be using it for as long as I play the game and it stays up todate. :D

Edit: I am ashamed to admit how many hours I spent rerolling and searching the world maps to get, Mountainious, Tropical Jungle, River + Road + Coastal + Caves.

PS: Is there any chance of getting the option to find caves as well added in the search features?

According to author's reply #52 searching for caves should already be in.

Edit: or maybe I should say.. "Coming soon"

Exactly as BlackSmokeDMax said. The next version (v0.7) is already finished, but I need to rewrite the mod documentation as I changed the way filters work (and didn't have time to rewrite the documentation lately).

If you really want to try it, the latest development version is available on github.

Cave filtering is on the leftmost column on the second tab ("Terrain 2 and Temp."), see "Has Cave" (click image for full view):



Be wary that the new filtering (which targets only roads, rivers and stones) might be strange if you are not accustomed to Boolean logic. There's a new button "OR" (or "AND" if you press it) next to the filters:



Note that it is still a development release. Next "stable" release should be available this week-end or next week at most.

neitsa

#61
PrepareLanding v0.7 released (Merry Christmas release \o/).

Some of the filtering logic has been revised. In case you get lost, I would suggest to read the general documentation and especially the one that concerns filtering.

In a nutshell the major changes are as follow:

* New filters:
    - Caves
    - Named locations
    - Coastal rotations
* Reworked Road / Rivers filters to follow Boolean logic.
* Stones can be filtered in order or not.
* Add a new "coordinates" window.

Here's is the detailed changelog (a more readable version of this changelog can be found on the github repository).


# General

What's New?
===========

This version has more changes than I thought I would implement...

## TL;DR

* New filters:
    - Caves
    - Named locations
    - Coastal rotations
* Reworked Road / Rivers filters to follow Boolean logic.
* Stones can be filtered in order or not.
* Add a new "coordinates" window.

## Major Changes

* Add a filter for tiles with caves [issue #20]
    - It's in the "Terrain 2 & Temp". tab.
* Add a filter for filtering tiles that are in a specific named location (aka World Features) [issue #21]
    - It's in the "Terrain 2 & Temp". tab.
* Add a filter for coastal rotation [issue #25]
    - It is now possible to filter coastal tiles that have their coast facing a certain direction
    - e.g. Filter all tiles that have a northern coast, etc.
    - It's in the Terrain Tab, below the already existing coastal filters.
* Completely reworked the filtering for 3 states items (ON / OFF / Partial)
    - Roads and Rivers: complete Boolean filtering (AND & OR)
        - new button on the GUI to choose between the two
    - Stones:
        - Finally, added a "no order" filtering, hooray!
    - These new filters can now be saved and loaded in presets.
* Add a new "Coordinates Window" (still rough implementation)
    - `CTRL + M` while on the world map. (`command + M` for Mac)
    - Allows to go to a tile by its ID or coordinates.
    - Add buttons with the main point of interests (North Pole, South Pole, etc.)

## Minor Changes

* Each filter header is now colored (default to magenta)
* Remove all the code that was implemented to bypass a bug in Rimworld vanilla (bug was fixed in B18) [issue #22]
    - [bug details](https://ludeon.com/forums/index.php?topic=34054.msg347150#msg347150)
* Info Tab
    - Add the "Average Disease Frequency" information for each biome in the Info Tab [issue #19]
    - Rework the world information display on the Info Tab
        - new "World records" with the lowest / highest characteristics (temperature, rainfall, elevation)
* Add a way to list and delete presets [issue #23]
    - The delete button is in the "Load" tab, visible when you load a preset.
    - Pick a preset in the left list and press delete twice to remove it.
* Fix a bug where "Animal Can Graze" filter could not be saved or loaded properly [issue #24]
* (Privacy) Redact the name of the current user from the log file [issue #26]
    - The preset folder location is written in the log as a debug purpose.
    - This folder is, most of the time,  in a sub-dir of the user directory: thus user name would be written to the log...
    - e.g. `C:\Users\neitsa\AppData\LocalLow\Ludeon Studios\RimWorld by Ludeon Studios\PrepareLanding`
    - Is now logged as: `C:\Users\<redacted>\AppData\LocalLow\Ludeon Studios\RimWorld by Ludeon Studios\PrepareLanding`
* Remove a warning from RimWorld: "mesh already finalized." [issue #27]
    - RimWorld thinks that the highlighted tiles mesh (used to display highlighted tile on the world map) is already finalized.
    - This makes RimWorld display a warning in the log.
    - This warning was not present until B18: fixed by telling RimWorld that the mesh was not yet finalized when created.
* Rename "Temperature" Tab to "Terrain II & Temp."
* Clear the filter logger when a new world is generated
    - Add a new message, "New World Generated"
* Updated filtered tile description (in "Filtered Tiles" tab) to be in synch. with B18.

## Internal Changes

* Upgrade automatic builder to VS 2017 \o/
* Add a new internal container for three state items
    - Easier to manage from a code POV.
* Reworked completely the Harmony Patch for displaying the main PrepareLanding button.
    - 2 times less code!
    - It now allows other mods to patch the same function.
* Major Code cleanup


werty112

I encountered a bug.

[attachment deleted by admin: too old]
That moment when you get oneshotted from first shot by first raider that had 0.2% acc

neitsa

Quote from: werty112 on December 28, 2017, 05:14:47 AM
I encountered a bug.

Hmmm, I see what happened, but it's pretty hard to know why without a log file and a detailed explanation.

If you still have the log file of I'd be glad to take a look at it. Also, did you go back and forward on the world generation dialog and did you stumbled upon that bug right away on the first try?

I haven't been able to repro. It might be a mod conflict or something like that. Hard to tell without a log...

Harry_Dicks

Do you think it would be possible to remove the limit of 3 stone types when setting a cell's details with God Mode turned on? I dislike how I've got all these kickass stone types from different mods, some my own, but I can only ever have 3 maximum if I use the mod to change a cells settings. It's unfortunate, too, because this mod is absolutely freaking awesome, and I will still continue to use, it just stinks not being able to get 5 or more stone types on my map. I've even tried with cuproPanda's Stones, and with RF - Configurable maps, changing the mod settings for one or both of them to have more than 3 types of stone per map. And those will work fine, and I could even for example have 5 stone types on a cell in the world map from the regular world gen, but if I tell the mod to change the stone types, I will be reduced to only the 3 that I choose. My current workaround is just using cuproPanda's Quarry mod, until I could have this changed. Also, I really would have done this myself, but I am completely clueless when it comes to C# ::) and I really don't think this setting would be in an xml file.

Kori


Harry_Dicks

Hello again. I've come to yet again hopefully suggest something that I think would be really fantastic if we had the option.

In the world stage when we are selecting which cell to land on, with god mode enabled, you are able to alter the cell's properties, but not all. In the future, would it be possible to also alter a cell's level of water (creek to huge river, or include a coast, and even which side the coast will be on, like it says in the world stage?) and also turn on or off caves? This would be really fantastic, and with those two options I couldn't think of too much more really that I could ever want out of something like this already near perfect mod! ;)

Maybe allow the player to create more than 3 stone types when alter a cell as well? No biggie ::)

neitsa

#67
Hello Harry, Sorry for the late reply.

I'm planning to rebuild entirely the god mode feature (in fact I'll probably remove it from the "prepare landing" code base and make a side mod).
The thing I've envisioned (I already have a very basic proof of concept mod) is to make a complete "planet builder" mod:

- start with a default rimworld generated planet (usual startup but with various setting tweaked, e.g no Perlin noise for temperature)
- start with a completely blank planet (same start tile all over the planet, e.g complete ocean planet, desert planet) [done]
    - at startup: no roads, no rivers, default elevation for the whole planet (e.g 1 meter everywhere) [done]
    - ability to change planet size [done]
    - ability to save and load planets (so people can reuse their own planets or share them) [partially done; code is there but buggy...]
- some tools to "sculpt" the planet (change tile biomes, elevation, add rivers, roads, etc.) [partially done but very crude (i.e not user friendly)]
    - got to do some GUI stuffs so users can choose the tile radius where the effect applies, etc.
    - as of now no rivers and roads tweaking

I still have some various problems right now (temperature is the main one as it is a very complex system) but I'm getting some progress. The other one is rivers: they must flow from higher altitudes to lower altitudes (sounds obvious, but it's more complex than it seems) and the river branching is also quite complex. So to answer your questions:

Quote from: Harry_Dicks on January 30, 2018, 03:18:59 PM
Do you think it would be possible to remove the limit of 3 stone types when setting a cell's details with God Mode turned on? I dislike how I've got all these kickass stone types from different mods, some my own, but I can only ever have 3 maximum if I use the mod to change a cells settings.

I don't remember exactly but If I recall correctly (I might be wrong though), it might be hard coded in the game. Not exactly like a constant saying 'NumOfStones = 3" but more like the game code really expects to see 2 or 3 types of stones on a tile, no more, no less. Changing that would surely make the game go awry. I need to to double check but I'm pretty sure it's the case.

Quote from: Harry_Dicks on March 05, 2018, 08:33:09 PM
In the world stage when we are selecting which cell to land on, with god mode enabled, you are able to alter the cell's properties, but not all. In the future, would it be possible to also alter a cell's level of water (creek to huge river, or include a coast, and even which side the coast will be on, like it says in the world stage?)

As hinted by my previous answer, the river system is pretty complex and is deeply tied on the terrain altitude feature. That means that technically you cannot have a river flowing exactly where you want by default. It requires altering the terrain all along the river bank. I need to come up with an algorithm for that but it will definitely take time... As for the water flow (e.g big rivers vs small creeks) I don't remember exactly how ti works, but I remember I had some problems making it work correctly :( I need to dig onto that once again...

Quote from: Harry_Dicks on March 05, 2018, 08:33:09 PM
and also turn on or off caves?

Haven't thought about it but it's *probably* the easiest :) I need to check how the game generate caves or not, but it might be just a flag saying if there's a cave or not on a map tile (and the game code take care of generating the cave).

I can probably make a quick test to toggle caves on/off. Gonna try that this week end. If it works as expected I could release a new version right off the bat.

Quote from: Harry_Dicks on March 05, 2018, 08:33:09 PM
This would be really fantastic, and with those two options I couldn't think of too much more really that I could ever want out of something like this already near perfect mod! ;)

I'll definitely try! Thanks!

Harry_Dicks

Quote from: neitsa on March 07, 2018, 03:33:49 AM
The thing I've envisioned (I already have a very basic proof of concept mod) is to make a complete "planet builder" mod:

- start with a default rimworld generated planet (usual startup but with various setting tweaked, e.g no Perlin noise for temperature)
- start with a completely blank planet (same start tile all over the planet, e.g complete ocean planet, desert planet) [done]
    - at startup: no roads, no rivers, default elevation for the whole planet (e.g 1 meter everywhere) [done]
    - ability to change planet size [done]
    - ability to save and load planets (so people can reuse their own planets or share them) [partially done; code is there but buggy...]
- some tools to "sculpt" the planet (change tile biomes, elevation, add rivers, roads, etc.) [partially done but very crude (i.e not user friendly)]
    - got to do some GUI stuffs so users can choose the tile radius where the effect applies, etc.
    - as of now no rivers and roads tweaking
Well my jaw just hit the damn floor. Holy hell, you're talking about something I've been thinking about for a few weeks now. About how freaking awesome it would be to have some easy to use "tools" to "paint" a world map to your liking! Even better, if we could have full control of faction placement, similar to RF - Faction control, but even more direct input from the player - maybe even direct faction/colony placements.

The reason I had been thinking about this was because I was editing cells with God Mode, and thinking about how if I wanted to change a whole area on the world map, how long this could take doing them all one by one.

Quote from: neitsa on March 07, 2018, 03:33:49 AM
I still have some various problems right now (temperature is the main one as it is a very complex system) but I'm getting some progress. The other one is rivers: they must flow from higher altitudes to lower altitudes (sounds obvious, but it's more complex than it seems) and the river branching is also quite complex. So to answer your questions:
I wish that the world map did a better job of displaying elevation. As it is right now, I don't think that there's anyway to tell other than actually clicking on a world cell and looking in the information pane. I think it could help the world to look at lot more beautiful and dynamic if Ludeon could somehow make the actual elevation be displayed on the world map, if only for aesthetic reasons alone.

Quote from: neitsa on March 07, 2018, 03:33:49 AM
I don't remember exactly but If I recall correctly (I might be wrong though), it might be hard coded in the game. Not exactly like a constant saying 'NumOfStones = 3" but more like the game code really expects to see 2 or 3 types of stones on a tile, no more, no less. Changing that would surely make the game go awry. I need to to double check but I'm pretty sure it's the case.
No biggie. I have actually moved on from the stones since then, and ended up modding in my own custom gemstones, but don't fall under the list of regular rock types. I pretty much just wanted a few more colors to be able to build statues and maybe some floors/walls/furniture out of. So now I have sapphire, ruby, emerald, and quartz in my game. :P

Quote from: neitsa on March 07, 2018, 03:33:49 AM
Haven't thought about it but it's *probably* the easiest :) I need to check how the game generate caves or not, but it might be just a flag saying if there's a cave or not on a map tile (and the game code take care of generating the cave).

I can probably make a quick test to toggle caves on/off. Gonna try that this week end. If it works as expected I could release a new version right off the bat.
That would be really awesome of you.

Thanks so much for taking the time to reply so thoroughly! Your mod has definitely made it into the list of must haves, and I wouldn't ever want to continue on without something equivalent to Prepare Landing, of which there is none!

I'm really looking forward to your world painter, or whatever you decide to call it. One thing I really hope that Ludeon improves in the future is making the world map actually matter. Things like raids depending on how close/far enemies are from you. Or making you get almost no raids if you are surrounded by allies. Or people can't come see you in winter because you are so far off and remote. Really anything that they could add similar to this would increase the immersion factor so much, for me at least, and make it all the more fun to actually roleplay in your game with the different factions and (hopefully at some point in the not-too-distant-future) world/factionVfaction mechanics.

Also Safely Hidden Away was just released, and I think it's really freaking awesome. It's perfect for someone like me, who always has factions clumped together on the world map, so they look like actual nations, but this will leave lots of large open, sometimes barren areas on the world map. So I like to pick some really far off remote area. It's exactly what I want for my roleplay of a secretive cult that practices all sorts of taboos and wants to avoid any neighborly persecution for their heresy. ;)

Jibbles

Hey! From steam. Here's that output log.



[attachment deleted due to age]

Alenerel

this mod makes my game crash very often, mostly when minimizing the game. Here are a couple of logs:



[attachment deleted due to age]

neitsa

#71
Damn I'm so late in posting answers... I completely forget to actually post answers even though I did take look almost immediately at the logs and dumps.

Quote from: Jibbles on March 18, 2018, 06:09:05 PM
Hey! From steam. Here's that output log.

The only thing I can see is that your GFX card seems to be out of memory... I don't have any other answers, that what's the log seems to say. The fact that the last line is from PrepareLanding doesn't help very much (I have seen those lines with other mods too). It's pretty hard to diagnose the crash :(

Quote from: Alenerel on May 01, 2018, 03:38:37 PM
this mod makes my game crash very often, mostly when minimizing the game. Here are a couple of logs:

There are many problem with crash dumps from Rimworld: We don't have the PDB from the game; crash dumps are to be debugged with windbg but the plugin to debug .NET executables doesn't handle Mono (which is the framework used by Unity3D); the format used by Mono for the crash dumps is sparse dumps, they only contain the stack trace of the different native threads and that's pretty all...

Anyway, the only thing I could see is that the problem arises from Rimworld... great, and absolutely not helpful in any way... I haven't been able to dig more on that. From experience, I usually don't trust the line to have been printed in the log to be the definite source of the problem, as a lot of code can be run between the time the log line is printed and the crash site.

Technically, without a .NET stack trace I'm in the dark :(

[edit]
I doubt this is very helpful but here are the notes (well, basically a debugger session on the crash dump) I took when looking at the dump; basically the error is in Rimworld itself... it's just a native NULL pointer deref.


0:005> lmDvmRimWorldWin
Browse full module list
start    end        module name
00be0000 01e05000   RimWorldWin T (no symbols)           
    Loaded symbol image file: RimWorldWin.exe
    Image path: D:\Steam\steamapps\common\RimWorld\RimWorldWin.exe
    Image name: RimWorldWin.exe
    Browse all global symbols  functions  data
    Timestamp:        Wed Aug 16 19:45:37 2017 (599484C1)
    CheckSum:         00000000
    ImageSize:        01225000
    File version:     5.6.3.37608
    Product version:  5.6.3.37608
    File flags:       0 (Mask 17)
    File OS:          4 Unknown Win32
    File type:        0.0 Unknown
    File date:        00000000.00000000
    Translations:     0000.04b0 0000.04e4 0409.04b0 0409.04e4

0:005> .excr
eax=00000000 ebx=0a69fb60 ecx=0e93e87c edx=00e71890 esi=00000000 edi=07a12860
eip=00e718b6 esp=0e93e834 ebp=0e93e844 iopl=0         nv up ei pl nz na po nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00010202
RimWorldWin+0x2918b6:
00e718b6 8b4020          mov     eax,dword ptr [eax+20h] ds:002b:00000020=????????

; null pointer deref on EAX
; eip is in Rimworld.exe ??? it's not even a managed fault...

0:005> .cxr
Resetting default scope
0:005> kb
# ChildEBP RetAddr  Args to Child             
00 0e93b614 771eead4 abababab 775ee85c 771eeaf8 ntdll!NtGetContextThread+0xc
01 0e93b62c 771eeb0d 65cd1a7c 00000b6c 060f0065 KERNELBASE!CloseHandle+0x34
02 0e93b6a4 775c299e 3ca76160 00000000 00000028 KERNELBASE!CloseHandle+0x6d
03 0e93b728 775c1659 00000022 00000008 65ccb2c0 ntdll!RtlpLowFragHeapAllocFromContext+0x112e
04 0e93e240 0e93e3d4 7767fb48 00000001 0e93f8bc ntdll!RtlpAllocateHeapInternal+0x259
WARNING: Frame IP not in any known module. Following frames may be wrong.
05 0e93e25c 775f6a70 7769b350 775f08a0 0e93e384 0xe93e3d4
06 0e93e27c 77609d52 0e93e384 0e93f8ac 0e93e3d4 ntdll!_except_handler4+0x20
07 0e93e2a0 77609d24 0e93e384 0e93f8ac 0e93e3d4 ntdll!ExecuteHandler2+0x26
08 0e93e36c 775f0c16 0e93e384 0e93e3d4 0e93e384 ntdll!ExecuteHandler+0x24
09 0e93e36c 00e718b6 0e93e384 0e93e3d4 0e93e384 ntdll!KiUserExceptionDispatcher+0x26
0a 0e93e844 00eee214 06ed4a30 0e93e87c 00000001 RimWorldWin+0x2918b6    ; <------- fault here
0b 0e93e8ac 00f6e273 0049e2f2 00000001 0000000d RimWorldWin+0x30e214
0c 0e93e944 00ed24d5 0e93f040 00000001 0000000d RimWorldWin+0x38e273
0d 0e93f824 00ed36de 06e71030 011c5960 0738c750 RimWorldWin+0x2f24d5
0e 0e93f844 011c5996 0738c750 000014d0 01a5079c RimWorldWin+0x2f36de
0f 0e93f860 75528654 06e87450 75528630 49bc8bdc RimWorldWin+0x5e5996
10 0e93f874 775e4a77 06e87450 25b45624 00000000 kernel32!BaseThreadInitThunk+0x24
11 0e93f8bc 775e4a47 ffffffff 77609ed5 00000000 ntdll!__RtlUserThreadStart+0x2f
12 0e93f8cc 00000000 011c5960 06e87450 00000000 ntdll!_RtlUserThreadStart+0x1b

0:005> dx Debugger.Sessions[0].Processes[8476].Threads[5328].Stack.Frames[10].SwitchTo();dv /t /v ; just see EIP context at crash site

0:005> u @$scopeip
RimWorldWin+0x2918b6:
00e718b6 8b4020          mov     eax,dword ptr [eax+20h]
00e718b9 85c0            test    eax,eax
00e718bb 0f845c010000    je      RimWorldWin+0x291a1d (00e71a1d)
00e718c1 8b4cf104        mov     ecx,dword ptr [ecx+esi*8+4]
00e718c5 8b13            mov     edx,dword ptr [ebx]
00e718c7 8b9290010000    mov     edx,dword ptr [edx+190h]
00e718cd 51              push    ecx
00e718ce 6a00            push    0



Jibbles

Quote from: neitsa on June 15, 2018, 05:13:07 PM
Quote from: Jibbles on March 18, 2018, 06:09:05 PM
Hey! From steam. Here's that output log.

The only thing I can see is that your GFX card seems to be out of memory... I don't have any other answers, that what's the log seems to say. The fact that the last line is from PrepareLanding doesn't help very much (I have seen those lines with other mods too). It's pretty hard to diagnose the crash :(

Hey, thanks for taking the time to look at it.  I believe you're right that it deals with my GFX card being out of memory. The only time rimworld would crash was when this mod was enabled so I assumed.  I boot up some other high performance games not too long ago and they all crash on me at some point. Wished I remembered about this post when I came across that fact.  I will test the mod again and let you know if the issue resolves once I get my GFX working properly again.  Sorry for not getting back to you sooner!

neitsa

Quote from: Jibbles on June 15, 2018, 06:34:25 PM
Quote from: neitsa on June 15, 2018, 05:13:07 PM
Quote from: Jibbles on March 18, 2018, 06:09:05 PM
Hey! From steam. Here's that output log.

The only thing I can see is that your GFX card seems to be out of memory... I don't have any other answers, that what's the log seems to say. The fact that the last line is from PrepareLanding doesn't help very much (I have seen those lines with other mods too). It's pretty hard to diagnose the crash :(

Hey, thanks for taking the time to look at it.  I believe you're right that it deals with my GFX card being out of memory. The only time rimworld would crash was when this mod was enabled so I assumed.  I boot up some other high performance games not too long ago and they all crash on me at some point. Wished I remembered about this post when I came across that fact.  I will test the mod again and let you know if the issue resolves once I get my GFX working properly again.  Sorry for not getting back to you sooner!

No problems, and thanks a lot for the feedback! Hope you find a solution to your problem.

neitsa

PrepareLanding v0.8 has been released. It's available on steam or can be downloaded here on github.

In a nutshell the major changes are as follow:

* Translations:
    - The Mod can now be entirely translated.
    - Added French translation.

* There's now a mod option that skips some calculations (saves memory and CPU cycles), at the expense of less available information.

* Removed completely some code that was heavy on memory and CPU but was seldom used.

Here's is the detailed changelog (a more readable version of this changelog can be found on the github repository):


# Version 0.8.0
**Released June 15, 2018**
**`RimWorld Version: Beta 18`**

# General

What's New?
===========

* The whole mod can now be translated to other languages.
    - Added French translation! Cocorico :)

* Added a game option to reduce CPU cycles and the memory footprint of the mod.
    - While in game, see: Options > Mod Settings > PrepareLanding
    - There's one option which is **disabled** by default
    - If enabled, it skips some calculations and doesn't store some data about the world
        - In return for less CPU cycles and less memory used, some world information are not available.

* Drastically reduced the Mod memory footprint and CPU cycles.
    - Some non critical code has been factored out.
    - The code was doing some heavy calculation (and used some memory) for world map overlays which is still not public.

## Minor Changes

* Tweaked some parts of the GUI for languages that are more verbose than English.

* Side note: the "God Mode" tab is not translated as it is doomed to disappear at some point.