[0.11.13] RoadWorks 2.0.0

Topics and discussion about specific mods
Rahjital
Filter Inserter
Filter Inserter
Posts: 435
Joined: Thu May 29, 2014 10:44 am
Contact:

Re: [0.10.1] RoadWorks 1.04

Post by Rahjital »

Airat9000 wrote:;) idea
more in limestone convert in stone (2 variant in finished in base)
10 lims --> 1stone
That would make stone pretty much useless, though. You could simply build your base near a big limestone deposit and never have to worry about mining stone again.
Iceweasel44 wrote:I am getting the exact same error as orion420 - please post a fix if found. I am on windows, no idea what codecs I might need to fix this. I have never used or messed with ogg files before.
Huh, that's really strange. I'll do my best to find a fix for this quickly, but I can't promise anything, it's hard to fix an error that I don't have. If I had to guess, I would say the Ogg files have some sort of encoding your computer cannot handle (or possibly only Factorio on your computer), so changing the encoding to the same standard other Factorio sounds have may be the solution.
FKODgaming
Long Handed Inserter
Long Handed Inserter
Posts: 72
Joined: Thu Jun 19, 2014 5:15 pm
Contact:

Re: [0.10.1] RoadWorks 1.04

Post by FKODgaming »

For anyone interested, I'm starting a playthrough with this mod installed.

http://www.youtube.com/playlist?list=PL ... ei2kJyLkew

This is a link to the playlist, so keep tuned for more episodes.
Rahjital
Filter Inserter
Filter Inserter
Posts: 435
Joined: Thu May 29, 2014 10:44 am
Contact:

Re: [0.10.2] RoadWorks 1.05

Post by Rahjital »

Version 1.05 released!
Changelog
Download link: https://db.tt/nrD3fnQ1



Orion420, Iceweasel44: if you are reading this, could you please give the mod a try again? I've done my best to make the files as similar to those used by vanilla Factorio as was possible, hopefully it will fix the crash bug you've experienced.
FKODgaming wrote:For anyone interested, I'm starting a playthrough with this mod installed.

http://www.youtube.com/playlist?list=PL ... ei2kJyLkew

This is a link to the playlist, so keep tuned for more episodes.
Ah, thank you for posting the link! I'm definitely interested. :)

By the way, in version 1.04 (the one you seem to have) bridges were enabled despite still being rather buggy. Both the bridge bugs have been fixed, I'm still working on the bridge graphics which is why bridges are now disabled by default. If you want to enable them again, just go into the "control.lua" file of the mod and change the line enableExperimentalFeatures = false to enableExperimentalFeatures = true.
Grendelbiter
Manual Inserter
Manual Inserter
Posts: 1
Joined: Tue Jul 08, 2014 12:04 pm
Contact:

Re: [0.10.2] RoadWorks 1.05

Post by Grendelbiter »

Hi, I registered to say this: it still doesn't work, I get the same error.
Rahjital
Filter Inserter
Filter Inserter
Posts: 435
Joined: Thu May 29, 2014 10:44 am
Contact:

Re: [0.10.2] RoadWorks 1.05

Post by Rahjital »

Grendelbiter wrote:Hi, I registered to say this: it still doesn't work, I get the same error.
Thanks for the report. I have no idea what the issue might be, so I'll release a sound-less version soon for people who are experiencing the bug. I'll also look into the issue further, but I can't say for sure if I'll be able to find a solution.
Airat9000
Smart Inserter
Smart Inserter
Posts: 1418
Joined: Fri Mar 28, 2014 12:32 am
Contact:

Re: [0.10.2] RoadWorks 1.05

Post by Airat9000 »

:( bug
Attachments
10.07-12.png
10.07-12.png (471.94 KiB) Viewed 7547 times
Iceweasel44
Manual Inserter
Manual Inserter
Posts: 2
Joined: Fri Jul 04, 2014 12:22 am
Contact:

Re: [0.10.2] RoadWorks 1.05

Post by Iceweasel44 »

Also confirming, same issue as before.
Tivec
Burner Inserter
Burner Inserter
Posts: 8
Joined: Thu Feb 20, 2014 9:10 pm
Contact:

Re: [0.10.2] RoadWorks 1.05

Post by Tivec »

Confirming the issue mentioned above with "Item stack count has to be a positive number". You can see a screenshot of this here: http://puu.sh/a6SrR/a4652e66eb.jpg

I haven't tried with the other types yet, but I could check those too.
User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: [0.10.2] RoadWorks 1.05

Post by FreeER »

Tivec wrote:"Item stack count has to be a positive number"
This looks like an oversight in the helperfunctions.RWaddItem function :) that or something in Factorio got changed recently
note: skip to code if you just want the fix (this paragraph kind of explains why the error happens for those interested)
Well, I say oversight, but it's more about the way 0 is treated by the insert/remove functions (hint, it's not treated as a positive number :lol:), so when the code gets called and the cursorstack happens to be equal to the itemCount, the if on line 40 fails (since == is not greater) and the else comes in, where it subtracts the cursorstack.count leaving the itemCount as 0. A few simple fixes are possible, (change > to >= and set the player's cursorstack to nil if cursorstack var is 0, or do essentially the same in the else, or use an elseif when the stacks are equal). Now...the first thing I encountered when I loaded this and cheated myself a 'road' (using test mode, so probably the RW_asphaltroad) was the same issue, except on line 56 (though I haven't duplicated it since..I haven't tried too hard). Fairly obvious fix there, if itemCount is not greater than 0 it's either 0 or negative, the 0 needs to be handle separately (well, technically not at all) and if < 0 itemCount needs to be negated.

@players who want to fix this yourselves you should be able to add (see code) after line 43 (before the else, thus the 'elseif' is on line 44)

Code: Select all

			elseif cursorstack.count == itemCount then
        cursorstack.count = cursorstack.count - itemCount
        game.player.cursorstack = nil
The other issue I mentioned about (line 56 without the fix, line 60 with) can be fixed by changing the "else" (line 55/59) to "elseif itemCount < 0 then" and adding a "-" in between "count=" and "itemCount". so it should look like

Code: Select all

elseif itemCount < 0 then
			game.player.removeitem({name=itemName, count=-itemCount})
I haven't done 'extensive' testing with these fixes, but I was able to place a few of each type :)
Rahjital
Filter Inserter
Filter Inserter
Posts: 435
Joined: Thu May 29, 2014 10:44 am
Contact:

Re: [0.10.2] RoadWorks 1.05

Post by Rahjital »

Thank you for the fixes, FreeER! I have had the issue at line 49 fixed already but I had no idea it could crash at line 56 too, that was supposed to be prevented by a check at the very beginning of the function (and it shouldn't even really be able to happen when using RoadWorks normally... perhaps it was a specific situation that happened because of Test Mode?). Both of the issues are now fixed, but again, thank you for your detailed answer and a fix for the initiative players! :)

Version 1.06 should come soon, but still not right at this moment. I need to make two versions of this release, one without sounds for the people who experience sound-related crashes. I still want to fix the issue, but in the meanwhile, there will be two versions of each Factorio release.
Rahjital
Filter Inserter
Filter Inserter
Posts: 435
Joined: Thu May 29, 2014 10:44 am
Contact:

Re: [0.10.3] RoadWorks 1.06 + Soundless version

Post by Rahjital »

Version 1.06 released!
Changelog
Version 1.06 download here: https://db.tt/nrD3fnQ1

Version 1.06 Soundless download here: https://db.tt/sWTpvYmr

To use the Soundless version, drop the archive to the Factorio mod folder and rename it from roadworks_soundless.zip to roadworks.zip




To anybody who gets a sound-related crash using the normal version, could you please tell me what OS do you use and if other mods adding new sounds cause crashes as well? Any help is sincerely appreciated and may push me closer to fixing the issue once and for all.
Dark
Long Handed Inserter
Long Handed Inserter
Posts: 83
Joined: Wed May 07, 2014 12:45 pm
Contact:

Re: [0.10.0] RoadWorks

Post by Dark »

Rahjital wrote:[snip]
sonnyskare wrote:It'd be interesting if you could force the cars to stay on the pavement, so we never hit any buildings.

Similar to how the train moves except you could freely move.
Theit8514 described it very well, it would be difficult. The direction a car drives in cannot be changed by mods, so currently the only way to do this is to constantly track the position of the car and the tile it is currently on and then teleport it back in the direction of the road. Very demanding on the computer.
[snip]
It is possible to force car steering in certain direction. It would require a two part script that:
1. Every few ticks it checks that user is in the car and on the road, if car is going to intersect road's edge it would choose the steering direction and issue steering command for the next part of script.
2. Every tick checks if steering command was issued and if so overrides

Code: Select all

game.player.character.ridingstate = {direction=left/right}
There are edge cases, a simple version would allow to ride on straight road (avoid border behavior), more advanced could be tuned to automatically turn car in 45 degree turns.
It could aslo kick-in only on high speed, as a user I would want to steer normally on controllable speeds.
Script is not exactly demanding as it works with just one entity.
Rahjital
Filter Inserter
Filter Inserter
Posts: 435
Joined: Thu May 29, 2014 10:44 am
Contact:

Re: [0.10.3] RoadWorks 1.06 + Soundless version

Post by Rahjital »

I had no idea ridingstate existed when I wrote that, so I assumed the car would have check the tile in front of it and be teleported each tick, which could get rather expensive (teleporting the character to give it a movement boost is already bad enough as it is). Being able to tell the car to turn by itself simplifies things massively.
Airat9000
Smart Inserter
Smart Inserter
Posts: 1418
Joined: Fri Mar 28, 2014 12:32 am
Contact:

Re: [0.10.3] RoadWorks 1.06 + Soundless version

Post by Airat9000 »

Rahjital wrote:I had no idea ridingstate existed when I wrote that, so I assumed the car would have check the tile in front of it and be teleported each tick, which could get rather expensive (teleporting the character to give it a movement boost is already bad enough as it is). Being able to tell the car to turn by itself simplifies things massively.
:D game more limestone
fix?
can not change anything but just to make the recipe of limestone to produce something
User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2173
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Re: [0.10.3] RoadWorks 1.06 + Soundless version

Post by Ranakastrasz »

Did a quick test. Noted something
When you place a road piece, it doesn't place an object, and can't then be removed. This is a bit worrying. Aside from wasting resources, it might cause issues with unwanted terrain alterations, which could look bad and are irreversible, from a simple, easily accidental click.

In addition, it appears that the game constantly spams (like one per minute or two) "Roadworks true" "Floors False"
Presumably that is a debug message you left in.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.10.3] RoadWorks 1.06 + Soundless version

Post by kovarex »

Wow, very nice looking mod, I like all the details including walking sounds and recipes (I didn't test it properly though).

There might be objects to place grass/dirt etc. as well to solve the problem of accidently clicking the road.
Schmendrick
Fast Inserter
Fast Inserter
Posts: 223
Joined: Wed Apr 30, 2014 11:17 pm
Contact:

Re: [0.10.3] RoadWorks 1.06 + Soundless version

Post by Schmendrick »

Ranakastrasz wrote:Did a quick test. Noted something
In addition, it appears that the game constantly spams (like one per minute or two) "Roadworks true" "Floors False"
Presumably that is a debug message you left in.
If this is what I think it is (and it probably is), this is my fault - and you have it exactly, it is a debug message I left in, on Bumpers. It checks for Roadworks and Floors on the onload function, which is triggered after every save. You're getting the message when the game autosaves. I'll fix it.

edit: fixed and uploaded.
Like my mods? Check out another! Or see older, pre-0.12.0 mods.
Rahjital
Filter Inserter
Filter Inserter
Posts: 435
Joined: Thu May 29, 2014 10:44 am
Contact:

Re: [0.10.3] RoadWorks 1.06 + Soundless version

Post by Rahjital »

Ranakastrasz wrote:Did a quick test. Noted something
When you place a road piece, it doesn't place an object, and can't then be removed. This is a bit worrying. Aside from wasting resources, it might cause issues with unwanted terrain alterations, which could look bad and are irreversible, from a simple, easily accidental click.
Yes, this is because the mod uses the game's terrain engine for the roads. It's the fastest way to do it, but unfortunately the tile system was not made for road laying and it's neither flexible nor precise enough for this purpose.

I eventually plan to switch to using entities instead of tiles, similar to how the Floors mod does it. This will make roads deletable and avoid the issues the terrain system has, though it will require a bit of work to make sure the issues present both in the Factorio terrain system and in the Floors mod will not be there. It might also run slower than it does now, but I think getting rid of the annoyances there are now is worth it. I want to implement the bridges first, though, which will likely take quite some time - the coding is ready, but I'm a terrible 3d artist and making the art is very difficult and time consuming for me.
kovarex wrote:Wow, very nice looking mod, I like all the details including walking sounds and recipes (I didn't test it properly though).

There might be objects to place grass/dirt etc. as well to solve the problem of accidently clicking the road.
Thank you very much, it's very inspiring to hear this from you! I think I have an alternate way to solve that problem. :)
zlosynus
Global Moderator
Global Moderator
Posts: 114
Joined: Sat Feb 09, 2013 2:17 am
Contact:

Re: [0.10.3] RoadWorks 1.06 + Soundless version

Post by zlosynus »

I have just started testing this mod and it is really good. I would consider removing warning message that you don't have enough of tiles to place, or just place some of them which you currently have. Also it seems to me that the amount of generated limestone is too large, I have it everywhere and I don't think I will need more than a few thousand units. So maybe it could be much more rare?
Rahjital
Filter Inserter
Filter Inserter
Posts: 435
Joined: Thu May 29, 2014 10:44 am
Contact:

Re: [0.10.3] RoadWorks 1.06 + Soundless version

Post by Rahjital »

The warning message is there because it can be very confusing when the road stops being placed, and unfortunately, placing less than 4 tiles is not an option with the terrain system Factorio uses. I'll look at it once I migrate the mod to the entity system, but first I need to get bridges done.

As for limestone, it will be used more once bridges are in, but I think you are right that there's still too many. I'll probably mostly make the deposits smaller, though, you need stone to be present near limestone anyway and I'm not sure if roads can justify building/expanding a train network to transport the resources.
Post Reply

Return to “Mods”