[request] - "moving walkway" electrically powered floortiles for fast movement

Started by stigma, July 06, 2017, 03:41:29 PM

Previous topic - Next topic

stigma

PROBLEM:
Later in the game movement becomes a bottleneck very fast. You can't really do much far away from your main hub where people eat/sleep/produce because it becomes increasingly inefficient. By the time people arrive to do something at a distant location they will turn right around because they have a need for food, sleep ect.

SOLUTION:
A modified floor-tile you can call "moving walkway". These exist in real life and you have probably seen them at the airport and such. Basically a transport-belt for people.

Compared to a normal floor:
- They would have much higher movement speed (a simple value tweak). Maybe somewhere in the range of 150-200%? To be determined in balancing obviously.
- They require low-moderate electricity pr. tile. (but have inbuilt conduits like a solar panel)
- They have considerably higher cost than any other floor for balance purposes. Probably just steel (or other metal-like materials) I'm thinking. It would be nice to require components too, but I don't see a way to use less than 1 component pr. tile which is too much...
- They require MUCH more work to construct... not trivial to build at all
- Slightly ugly beauty. They are there for practical applications, not to look nice.

The idea is that you can make some high-speed connections for the most important areas - especially those areas outside your core, but the cost in work and resources will be high enough that you have to consider carefully when and where it is worth making them.

Since this is essentially just a modded floor I suspect that it shouldn't be terribly hard to create? For simplicity's sake we assume they can move in any direction, so simply a movespeed multiplier in the XML - and this should work perfectly with vanilla pathfinding.

If anyone wants to make something like this I would gladly help in testing and finding good and balanced value for costs, work ect. and generally assist in any way that I can. I've never modded for rimworld before, but I do some coding now and then.

EDIT: Oh, and if something like this already exists then please let me know. I wouldn't be surprised ... but I have looked and the only references I have found was for very early builds.

-Stigma

Holvr

I like the idea overall. One solution to THIS problem:
Quote from: stigma on July 06, 2017, 03:41:29 PM
It would be nice to require components too, but I don't see a way to use less than 1 component pr. tile which is too much...
Could be that a new resource could be added, let's name it "conveyor belt". Such resource would be produced at a machining table and it could use as much steel and components per N conveyors as you'd like, so for example recipe for 10 belts would be 25 steel and 1 component, and the floor type itself would only require such belts as a resource to build.

Since it'd take time to be crafted at the machining table, you could cut the time it takes to actually lay it on the floor - it'd balance itself out that way.

Although I have no idea whetner or not the floor tiles can have built-in conduits, since those are operating on two different layers.

stigma

Yea, this could work for sure.

I was just thinking to keep the mod as technically simple as possible to increase the chance that someone picked up the project. If we start to add recipies, items with graphics and more then it sounds like the complexity would add up pretty fast.

But since we are talking about it I guess ideally there should be a research thing for this too. Maybe tie it to the vanilla "autodoors" research which seems like a natural steppingstone both in terms of technology and theme.

-Stigma

stigma

I just wanted to add here that I found one mod that has something kind of like this in it:
Fences and floors:
https://ludeon.com/forums/index.php?topic=26964.0

The highest tier floor is made from components and steel and has 160% movement on it - very lategame stuff, and really hard on those components. It's not exactly what I described here, but it's certainly a lot better than nothing - and it does seem fairly balanced. Even though it doesn't use power, the component cost pr tile is pretty hefty.

The fences are also kind of neat if you just need an a cheap and fast animal enclosure and such, and the plywood is a nice little cheap&ugly walkway until you can reach better tech.

-Stigma

lorebot

I particularly enjoy Fences and Floors for the steel grating floor type. I use it in and around my barns and it almost completely eliminates the need to clean up the area.

The Reactive flooring is cool, but as you said it's an expensive late game item. I wouldn't mind seeing 'people movers' in the game as a mid game flooring that requires power and maintenance to keep working and provide a way to move pawns so things aren't so difficult to complete once your colony reaches a larger size.

Sion

I'm a programmer but noob to RimWorld modding, but I'm looking for somewhere to start and this project looked plausible.

But after looking in the .xml files I couldn't find any floor stat that change walk speed, not even in the .xml for concrete floors that is supposed to be fast to walk on:
Path: Mods/Core/Defs/Terrain_Floors.xml

<TerrainDef ParentName="FloorBase">
<defName>Concrete</defName>
<label>concrete</label>
<Description>Quick-poured concrete. Fast to walk on, cheap, and very quick to pour, but quite ugly.</Description>
<texturePath>Terrain/Surfaces/Concrete</texturePath>
<EdgeType>Hard</EdgeType>
<RenderPrecedence>70</RenderPrecedence>
<statBases>
<Beauty>-1</Beauty>
<WorkToBuild>100</WorkToBuild>
</statBases>
<CostList>
<Steel>1</Steel>
</CostList>
<designationHotkey>Misc6</designationHotkey>
</TerrainDef>

As you can see there are no stat for "walk speed" os similar.

I only found a <pathCost> in Core/Defs/Terrain_Floors_Burned.xml but that probably only affect the pathfinding so the colonists doesn't walk there.

However I found <MoveSpeed> in Core/Defs/Traits_Spectrum.xml for the Fast walker & slowpoke colonists, maybe that can be inserted in a floor?

I'm doing some tests right now.
So many ideas... so little time...
Silence is the worst answer.

Sion

After some tests I couldn't find a way to make the MoveSpeed be applied to the colonist on the floor tile, I think I actually made the floor tile itself have a move speed ;D :P

However Rimworld didn't complain that I put <MoveSpeed> inside the <StatBase> so I guess there actually are a MoveSpeed property in StatBase?
So many ideas... so little time...
Silence is the worst answer.

dburgdorf

Sion, <pathCost> is what you want. The higher the number, the more effort it takes for a pawn to walk through the tile. Floors typically have a pathCost of 0, which equates to a 100% move speed.

But negative pathCost values are legal. I just did a little checking, and got some numbers. (I haven't bothered to worry about the actual calculation that determines the numbers, but you could probably find it in the code if you looked for it.) A pathCost of -1 sets the movement speed at 108%. -2 sets it to 118%.  -5 to 162%. -10 to 433%. And -12 to a whopping 1300%. After that it gets weird, as the value seems to overload such that the display wraps around, but the actual speed keeps increasing. A -15 pathCost, for example, displays in game as "-650%" speed, but it's definitely fast transport, not slow. ;)

Creating an "intermediary" item so that 1 component is ultimately used in the creation of a set of "fast transport" tiles would be trivial. And I'd assume that setting the tiles to act as conduits wouldn't be difficult.

BUT....

I'm not sure how you'd be able to handle the need for electricity. Terrain tiles have just a single pathCost value. I don't know how you'd be able to set them to have different move speeds depending upon whether or not they were powered.
- Rainbeau Flambe (aka Darryl Burgdorf) -
Old. Short. Grumpy. Bearded. "Yeah, I'm a dorf."



Buy me a Dr Pepper?

Sion

Thank you!
Strange that <PathCost> change walk speed instead of <MoveSpeed>.

Anyway, I could probably quit easily make like 3 different speed floors with different speeds & costs?

However I think it would be cool with just 1 floor and then it moves faster depending on how much electricity you give it, but I have to do research about the electricity first for something like that.
So many ideas... so little time...
Silence is the worst answer.

dburgdorf

Quote from: Sion on July 19, 2017, 06:44:06 PMHowever Rimworld didn't complain that I put <MoveSpeed> inside the <StatBase> so I guess there actually are a MoveSpeed property in StatBase?

I'd assume that this is a case where the attribute is legal, since some things *can* move, but superfluous, since things that are terrain tiles *don't* move. :D

Quote from: Sion on July 19, 2017, 06:55:27 PMHowever I think it would be cool with just 1 floor and then it moves faster depending on how much electricity you give it, but I have to do research about the electricity first for something like that.

As I said, I don't know that you'll be able to do that. But I'll be thrilled if you figure out a way, as it'd be an amazingly handy mod. :D
- Rainbeau Flambe (aka Darryl Burgdorf) -
Old. Short. Grumpy. Bearded. "Yeah, I'm a dorf."



Buy me a Dr Pepper?

Sion

Ok, I have made "Speed Concrete" (-10) and it's working, however I noticed a quirk, when a colonist is "wandering" he moves at normal speed even on the Speed Concrete.

Any requests on the floor texture? (only Rimworld textures or if anyone else want to make some textures that I can use?) I'm thinking carped textures: blue = slow, green = medium & red = fast?

Also, where does Rimworld store the images?
I see the paths like:
<texturePath>Terrain/Surfaces/Concrete</texturePath>
but I can't figure out where to go and look at the Concrete texture.
I know that I should put the textures in a /Texture folder, but I need to get the texture first.
So many ideas... so little time...
Silence is the worst answer.

Sion

Quote from: dburgdorf on July 19, 2017, 06:57:52 PM
Quote from: Sion on July 19, 2017, 06:55:27 PMHowever I think it would be cool with just 1 floor and then it moves faster depending on how much electricity you give it, but I have to do research about the electricity first for something like that.

As I said, I don't know that you'll be able to do that. But I'll be thrilled if you figure out a way, as it'd be an amazingly handy mod. :D

( solved, I found it: <basePowerConsumption>75</basePowerConsumption> )

I took a look at the power switch, and the power is quite binary, eihter it transmit power or it's flickable:

<ThingDef ParentName="BuildingBase">
    <defName>PowerSwitch</defName>
    ...
    <comps>
      <li Class="CompProperties_Power">
        <compClass>CompPowerTransmitter</compClass>
        <transmitsPower>true</transmitsPower>
      </li>
      <li Class="CompProperties_Flickable"/>
    </comps>
    ...
  </ThingDef>


So then I thought to take a look at the lamps, mabe I could adjust how much powe the floor required, but they don't have a "<RequiredPower>" tag or something:
 
<ThingDef ParentName="StandingLampBase" >
    <defName>StandingLamp</defName>
    <label>standing lamp</label>
    <description>Standing lamp that lights an area.</description>
    <designationHotKey>Misc11</designationHotKey>
    <comps>
      <li Class="CompProperties_Glower">
        <glowRadius>12</glowRadius>
        <glowColor>(217,217,208,0)</glowColor>
      </li>
    </comps>
  </ThingDef>


So how do I decide how much power something uses?
So many ideas... so little time...
Silence is the worst answer.

dburgdorf

The <basePowerConsumption> tag can be found in the lamp's parent def ("StandingLampBase").

I'm still skeptical that simply adding a power requirement to a terrain tile will have any effect on that tile's <pathCost> value, but I'd love for you to prove me wrong. ;)

As far as graphics are concerned, they're all compressed in a resources asset file. But you can find them uncompressed here: https://www.dropbox.com/s/mzev7dt9budmohg/A17%20Textures.zip?dl=0.
- Rainbeau Flambe (aka Darryl Burgdorf) -
Old. Short. Grumpy. Bearded. "Yeah, I'm a dorf."



Buy me a Dr Pepper?

Sion

I made this temporary mod (attached file), it has 3 tiers of floor:
Wood (118%), Concrete (443%) & Carpet (1300% of base movement speed)
So far no power stuff.

Feel free to look at it and give feedback.

[attachment deleted by admin due to age]
So many ideas... so little time...
Silence is the worst answer.

Sion

I just found out that I can't see the attached file through my phone, possibly because I'm not longed in.
Anyway, here is a Google Drive link to the file:
https://drive.google.com/open?id=0B5UeLQx50FOBaGFvdW85MkF1dXc


Why did this thread die?
So many ideas... so little time...
Silence is the worst answer.