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

Messages - Vampiresbane

#1
Releases / [1.3-1.4] Rails and Roads of the Rim (1.0)
December 02, 2022, 01:48:47 AM


RRotR - A Rimworld mod allowing rail and road construction on the world map.

Introduction

This is an continuation and expansion on Loconeko's "Roads of the Rim" which was a successor to Jecrell's RimRoads from beta Rimworld.  This expansion on Roads of the Rim adds buildable rail to the buildable road options. The rail portion of this mod is intended to be used alongside mods such as SRTS Trains and/or Decorative Railway Props

Features

       
  • Create Rail or Road Construction Sites on the world map
  • Send Caravans with skilled colonists, pack animals, and resources to build the rail or the road
  • Enjoy faster movement than the base game on high tier roads, including for all already existing roads (can be switched off in the settings)
  • Part or all of the biome, hills, swamps and season movement difficulty is also cancelled depending on the rail or road
  • Higher tier roads and rail tunnels can be built through impassable terrain
  • Get your allies to help you build
Details

Construct
With RRotR, caravans can create a construction site on the world map, players can then select a type of rail or road, left click from neighbouring tile to neighbouring tile until they reach their desired goal and then right click to build. If you make a mistake, clicking on a planned section of rail or road will remove it and all sections after it. Clicking on the Construction Site or right-clicking anywhere will finalise the construction.

Do note that rail overpasses should not be used to go over more than one tile of road or rail.  Due to a limit to the core or mod coding, this does not render properly.

Work
By using resources and colonists with Construction skill, the current section (or leg) can be built. A progress bar is shown on the world map.  Once a leg is finished, the caravan automatically moves on to the next leg.
Note : Rail and road legs must be built in the order they were placed on the world map.

Having all colonists down, resting during night time, or a moving caravan will prevent work. Similarly, some rail and roads require a certain percentage of the workforce to have a certain construction skill. If only a lower percentage is available, work will be reduced. If no colonist in the caravan has the required skill, work will be impossible. Prisoners don't work.

Cancel construction
A site can be removed by selecting it and clicking on the "Cancel Construction" button. A Caravan does not need to be there to do so. All resources spent so far will be lost.

Building costs modifiers
Construction costs have two components : base costs that depend on the road and modifiers that depend on the terrain. Rail and roads cost more at higher elevation, starting from 1000m. Hills and swamps also have an effect, which can be checked when clicking on a site.

The total cost can be further reduced from 100% down to 10% in the settings. The original author, Loconeko, believed that anything lower than 100% is probably quite unrealistic, but I believe that 10% is actually realistic if playing with a small settlement or you want to be able to build a lot of roads and rail.  To adjust the cost settings be sure to turn off the setting for enabling ISR2G which I've disabled anyways due to the ISR2G causing too many bugs.  Adjust to your liking and taste.

Important note
It is not necessary to bring all resources at once in one caravan. A fraction is enough for a certain amount of work. However, it is necessary to bring each material with you. As an example a tenth of the asphalt road: 360 Stone, 60 Steel, 30 Chemfuel is enough material for a tenth of the work (180 work.)

Upgrade
When building a road over an existing one that is slower, 30% of the cost of the existing road will be deducted from the cost of the new road, as long as both roads use that same resource (e.g. A dirt road will provide 120 work and 36 wood when upgrading to a Stone road.)
Note: Railroads cannot be upgraded.

Allies help
Allied factions can help building rail or roads.

Impact on movement
The roads of RRotR do not only provide a customized movement cost multiplier compared to the base game, they also cancel some or all of the movement cost of the terrain. 

Rails only provide a partial movement cost multiplier. This is because SRTS Trains, which provides loadable and usable trains, uses retextured drop pod sprites and so the trains ignore terrain on the world map and their speed is modifiable through SRTS Trains' settings.  Because of this, the buildable rails are for mostly aesthetic purposes only.  The general movement cost multiplier (60%) used for both railroad track and glitterrail is to reflect the general speed increase a person and/or animal would gain by walking on railroad track instead of normal terrain or a specifically built type of road.   

Giving Feedback
       
Feedback is more than welcome on Steam.

You're welcome to also alter the base xml code that I added for the rail. 

I wrote a guide on how to do that here:


I also wrote a guide on how to make a Western out of Rimworld:


You can check the code on GitHub.

Big thank you to both Loconeko and Mlie for their work on the original mod code.  Without that base code, I never would have been able to make small changes to the dll file and large additions to the Def xml files.  By the way, if you do not care for building rail, but want just to build roads, here is the link to Roads of the Rim (Continued) by Mlie and his team.
#2
Mods / Re: Mods that create new quests? Are there any?
December 01, 2022, 10:29:12 AM
Quote from: llunak on November 26, 2022, 02:58:53 AM
I'm not sure if that's what you want, but there's "Go Explore!".

And you can also simply look at the game itself for how it does it (wiki has decompiling source section).

This is extremely helpful. When I'm done publishing the other mod I just finished coding I'll look through this in more detail. 

From my initial glance you mention each quest has a predetermined map associated with it.  How does that work and how does it determine what allies/ enemies to spawn?
#3
Help / Re: Need help reverse engineering dll file
November 22, 2022, 12:47:32 AM
I figured it out, all of it.
1. So you can't "reverse engineer" dll files.  At least not easily...but you can open the original C# and sln file if the original author uploaded them to github and rebuild/edit the old sln file while updating a new and improved dll file that Rimworld will eventually use.  And btw, all I needed was Microsoft Visual Studio.  I didn't need dnSpy at all.

This video helped a lot for a guy like me who had 0 experience with C#, sln, or dll files. 
https://www.youtube.com/watch?v=UgCOhFzeX4A

2. Widening the menu was hard, but I finally figured it out. 
    public class ConstructionMenu : Window
    {
        private readonly RoadConstructionSite site;
        private readonly Caravan caravan;
        private readonly List<RoadDef> buildableRoads;
        public override Vector2 InitialSize => new Vector2(676+128, 544+128);

The "676+128" is the x value for the menu width.  By increasing it I could fit everything I needed.  Interestingly enough, either Nekko or Jecrell had left notes right under this spot reminding himself to go back and make the menu self-update ingame to the width required, but it looks like neither did that and I don't have the coding chops to figure it out though I did try. 

3. It was a simple naming error that I had made.  Once I found it and named the def correctly, it fixed the issue.  #1 and #2 were much more difficult. 

And final preview while I'm getting everything put together and ready for publishing the mod (the final fixed result for #2):
https://imgur.com/IEGRACC
#4
Help / Need help reverse engineering dll file
November 18, 2022, 01:05:34 AM
Hello all,
First time modder here and I'm working on an "expansion" of the Roads of the Rim mod. 
I've hit two issues I need help with.

First, I need to remake the dll (Assembly) file, but I'm not sure how so I can add five more RoadDefs.  I was hoping to just edit the dll file using Visual Studio, but either you cannot actually do that or I just cannot figure it out.  I tried using dnSpy, but as far as I can tell, that just lets me look at the code inside the dll, not actually copy it or edit it. 

Second, I need to either add tabs or widen the ingame menu for building roads while on the world map.  As you can see, with everything I've added (small preview), not all the options are displayed. 
https://imgur.com/uyHHkxW

Third and something I might be able to figure out myself is somehow the construction icons on the world map are not displaying the correct text.

Fixing or finding an answer to the first two are much more important though.  So if anyone can help, let me know.
#5
That's wild. It looks very much like another rimworld. The biggest difference is it takes the idea of the space exploration of "Save Our Ship" and turns it up quite a few notches. I've never played SOS but I imagine it doesn't do planet exploration quite like what Nebula looks like it's going to do.

With Rimworld's success there's bound to be spin-offs but it's up to Tynan and his legal team to judge if the game is different enough to be considered a different intellectual property.  You could argue Clanfolk is a medieval ripoff of Rimworld but if you play it, it plays very different from medieval modded Rimworld does but that's just one example.
#6
Mods / Mods that create new quests? Are there any?
October 24, 2022, 04:27:25 PM
I've seen the likes of Caravan Adventures]https://rimworldbase.com/caravan-adventures-mod/]Caravan Adventures and RimQuest]https://rimworldbase.com/rimquest-mod/]RimQuest, but I'm not seeing any mods that add entirely new quest types.

I'm considering making a new quest type, but I was wanting to look at the code of existing mods so I knew, on basic level, how to construct it.