#STL progress updates

1 messages · Page 1 of 1 (latest)

clever dragon
#

I can't attach a video to this message

#

and I also have no video to attach as I pressed my recording hotkeys without OBS open

winter palm
clever dragon
#

I can't imagine how many bugs this thing has currently

#

I'm scared to even mess with players modifying the schedule

winter palm
#

Can you disable that in /permissions ?

clever dragon
#

there's add station and drag schedule

#

yeah disabling both of those work, and I think I'll end up doing that for the actual mod

#

something something entity copy paste though

#

hmm

clever dragon
#

okay I did some testing with permissions and I think I have to allow people to add stations to the schedule, but everything else can be disabled

#

as in removing stations, pressing the go to station button, that kind of stuff is a no no

winter palm
#

Although personal trains are taking a bit of a hit

clever dragon
#

yeah I'm trying to keep that in mind

#

I think I might just set a flag on the LuaTrain to see if it's in automatic automatic mode

#

I'm trying to make it so vanilla schedules can be done completely in the gui as well

#

and so far it looks like they can

#

like I don't want people to be able to do vanilla train schedules in the train gui at all, but there still needs to be some way to have a train in automatic mode without triggering all of the modded logic

#

specifically so people can do temporary stops while riding

#

I think I'm just going to ignore it completely and focus on getting the mod to function, then after that I would have a clear idea of what needs to happen regarding the player

misty ore
#

If it's the best solution, then go for it, but some people are gonna complain 🙂

clever dragon
#

yeah the main problem I'm facing with vanilla schedules being possible with the mod is I don't know if I want to enforce it

#

since you can (or at least will be able to) do everything in vanilla with the mod, I'm heavily considering turning all existing schedules into the mod format and not allowing people to do it otherwise

misty ore
#

IMO I think you should keep the vanilla GUI interactable

clever dragon
#

the main reasoning behind that is if you want vanilla schedules in the train gui, why have the mod installed in the first place

#

I can have the GUI be interactable while still disallowing vanilla schedule creation in said GUI though

misty ore
#

That's what I meant, sorry. I don't think you should prevent editing the schedule

#

Someone will probably report it as a bug if you disable it 😄

clever dragon
#

maybe I'll make it so you can't add more than 1 non-temporary station to the gui

misty ore
#

¯_(ツ)_/¯

clever dragon
#

that way you can still make trains go to specific stations, but the mod is still in control

misty ore
#

Whatever you decide, I hope it works out for the best

clever dragon
#

thanks

#

it's a bit much to think about this early without some of the underlying logic in place yet

misty ore
#

Definitely get the mod working semi fully before worrying about details like that though

#

Yeah

clever dragon
#

I mean the mod technically works right now, it just picks a random station in it's list or does that "repath" if there isn't one

#

still need to implement wait conditions, priorities, fuel stops, and all the bells and whistles

clever dragon
#

not that it's necessarily important, but do you guys think I should have physical confirm buttons for anything that needs a confirmation? right now it's just the add category button, you either have to press enter to create it or esc/press the add button again to cancel it

#

that way people don't get confused on where buttons are

clever dragon
#

I just had the horrible idea of storing data in the wait conditions of a temporary stop so I don't have to store state of trains

#

but that's probably a bad idea

#

huh, if you hover over the station x button it highlights all of the wait conditions as well

misty ore
#

Yeah, because it'll delete all of them

clever dragon
#

well yeah, but you'd think that would be obvious since you're deleting the station

clever dragon
#

should have posted this earlier but styling on the wait conditions is done, still need to figure out how to do the or/and button

#

I also forgot that deleting categories in the destination list is completely broken so that's getting fixed soon

clever dragon
#

you know what's weird is that ever since I've started working on this mod I've been seeing mentions of LTN everywhere

#

probably confirmation bias at it's finest, but at least it motivates me to keep doing this

clever dragon
#

lol, destinastions

#

any ideas on how to make the "Categories" and "Stations" headers look like headers? currently they're just subheader frames which look almost exactly like list buttons, and I don't really want to change the height

#

could change the text color, could make the frame the same color as the surrounding frame to make it look more like there's two separate lists

winter palm
#

Tabs?

#

Maybe not

trim otter
#

color would definitely be good. all titles have a slight yellow tint (you can use predefined styles for lables)

clever dragon
#

I still kinda want to change the frame style as well cause it looks a little weird mixing subheader and list button styles

#

label color will definitely change

clever dragon
#

I've had a mega brain moment

#

what if I move the add buttons to be the headers for the things

clever dragon
#

saves me some header space that I could use for other things

#

okay this looks way better

#

besides the dumb scroll pane frame + subheader frame border thingy

#

trying it out since I don't know if I'll like things until I see them, not sure how I feel about centered text

hollow needle
#

Eh not sure I like the buttons being below, except if there really is no space in the toolbar

#

Could make the text shorter by removing the 'Add ', the plus sign should explanative enough

#

But I think having non-square buttons there is fine actually

clever dragon
#

there's a feature I haven't implemented yet that I need the subheader space for (multiple lists per station)

#

so that would probably be a + tool button with a toggled textbox and a dropdown

hollow needle
#

Alright

#

Well it‘ll be easier to judge once that‘s in there too, for me at least

#

Always gotta see it in the flesh :p

clever dragon
#

yeah I'll put a dummy in there

hollow needle
#

Oh, what might be an improvement is to have the + buttons be on one line side-by-side, not one after the other

#

Might also be weird though

#

It‘s weird anyways for them to be part of the list, and they add to that list which makes sense, but they add two different things, but are visually on the same level, if that makes sense

#

Feels like they should be differentiated somehow if possible

#

Oh wait

hollow needle
#

Makes the most semantic sense

#

Meaning have the header 'Stations' with a plus button after it

#

Sorry I might have misinterpreted your thing before, but yeah I‘d just add a + button to each header

clever dragon
#

instead of making the header the whole button

#

I should clarify: there are two lists, one for stations and one for categories, but in the example image there are no categories in the category list so it looks like they're just both at the top

hollow needle
#

Yeah I missed that part. I don‘t like the buttons as headers idea tbh

#

Esp since the buttons to add things tend to be at the bottom of the list as the last item, not the first

#

So I‘d either put them there or do a simple + button next to the header text

clever dragon
#

yeah it would definitely be at the bottom if it weren't for the fact that there were two lists that need differentiation

#

anyway that's what it looks like in context, I added the dummy drop down and add button, and put some categories in there for example purposes

hollow needle
#

Don‘t like it in context either, breaks with convention too much 😅

clever dragon
#

fair enough

hollow needle
#

You do you of course

clever dragon
#

yeah I'm open to ideas, my main issue was the distinction between the two lists

#

if I did headers with add buttons in them, I'm not sure how to make the headers look

hollow needle
#

And add a green square button with '+' in it

clever dragon
#

I could also have the wide add buttons in the list at the bottom like vanilla does with things

#

and just have both the header and the wide button

hollow needle
#

Yeah that‘s an option

#

It‘s funny, I thought about this before since I‘ll have a similar situation in FP when adding multiplayer sharing. Hence the strong opinion :p

trim otter
#

what about

clever dragon
#

cut the list in half vertically

hollow needle
#

Yeah I imagined my thing as more separate lists as well

clever dragon
#

hmm

hollow needle
#

Same toolbar though

#

So not totally separate (for my mod)

clever dragon
#

I was considering having split lists, however you're probably going to have more stations in the list than categories, if you're going to be having both types

trim otter
#

you can add logic to automatically adjust the heights to fit more things

hollow needle
#

Or have a single scrollbar for both, but that might be worse.

clever dragon
#

it does that now /s

trim otter
#

or just have a shorter categories lists in general if you prefer fixed sizes

clever dragon
#

it automatically adjusts the height of the station list to line up with the bottom of the category list shoob

#

aka vertical alignment

#

honestly even though it goes against the norm slightly, I kind of like the buttons the way they are now since it's a very clear distinction between which list is stations and which list is categories

#

that's the main thing I wanted for this, having it be "one" list with distinction between which half of the list you're on

#

hmm, horizontal scroll bar appeared

#

that's where the policy comes in right

hollow needle
#

Scrollbars are black magic sometimes

trim otter
#

scollpanes are probably one of the most broken things in gui, but I don't think that's the case here. Looks more like you set a fixed width on the content instead of making it horizontally stretchable and setting the width on the scroll pane. At least I'm expecting the latter to work

clever dragon
#

I'm pretty sure I set the width on the scroll pane

trim otter
#

and never on any content? 🤔

clever dragon
#

at least not with style mods

#

lemme check the data styles

trim otter
#

I mean you can set the horizontal scrolling policy to never, probably better that way anyway

clever dragon
#

ah

#

I had set width in the style prototype

#

yeah removing that fixed it

clever dragon
#

just thought of an interesting concept, not sure how I feel about it

#

currently when you add a category to a station's ruleset, it's essentially just a shortcut to any one of those stations

#

I was thinking if there was another dataset of stations called a group or something would be useful, where a train has to visit all stations in the group's list before going to a station in the group's next station ruleset

#

but I'm not sure if that's even useful, and I don't know how I would present that data in the gui

#

like you could effectively do the same thing currently by making a train go from station A to B to C, then D, since all a group would do is let you visit A B and C out of order

#

on a side note, I'm thinking of changing the left side of the GUI from a list box to a scroll pane with lost box styles and implementing the logic myself, that way instead if removing and adding things to the list when filtering I can just set the button's visible property, but I don't know if that would help anything

odd solar
clever dragon
#

if there are no other things in the way like train limits or whatever, I suppose random

#

that or keeping track of which station was visited the longest time ago

odd solar
#

if your aim is to simplify train logistics I suggest abstracting that part from the users. But for the sake of discussion, I just want to point out that the construct you described is similar to stations with same priority?

Cybersyn handles it in the backend by doing round-robin (like you have mentioned) if it is a provider deficit situation, and closest station if it is a provider surplus situation.

clever dragon
#

well there's no internal difference between any one station or another so round robin is probably what I'll end up doing, but yeah I probably won't be doing the group thing cause it's just unnecessary

#

you technically don't need categories either, but that makes it so much nicer to add new stations to every ruleset

clever dragon
clever dragon
odd solar
#

🤔 I have just joined this discussion, I have no idea what black magic was involved

#

is the mod trying to insert a new schedule everytime the inactivity timer is up?

clever dragon
#

yeah pretty much

#

there's only ever one station in the trains schedule

#

it's completely event based

odd solar
#

I see

#

so one can actually send a train to a dead end and not loop?

clever dragon
#

yeah

#

but that's their problem lmao

odd solar
#

do you have a repo for us to play around?

clever dragon
#

I'll probably have some flying text about no station or something

odd solar
#

^ ye that seems like a good idea

clever dragon
#

it's local for now, but I'm not against it

#

I can upload it to github if you want (or just send the zip lmao)

odd solar
#

hmm it is your decision, uploading to github means we can follow it easily

#

oo... there's no read-only access for personal private repo on github

#

it's all-or-none

#

heh

clever dragon
#

hmm

#

I was in the middle of doing wait conditions so they're going to appear on the right but they don't do anything yet

odd solar
#

so in your mod a train's schedule is determined by the stop? Any other way to branch differently? Say the stop is serving as a multi-item requester

clever dragon
#

currently no, but you will be able to have multiple lists per station and you can choose which list a train will be able to go to

#

for that multi item requester let's say it's a green circuit input station, you'll be able to specify list 1 and list 2, list 1 will be the iron plates dropoff and list 2 will be the copper plates dropoff

#

however you could get away without doing that by just naming the station "Green Circuit Input" and telling both the iron and copper provider stations that they're allowed to go to that station

#

since it's going to be empty afterward, it doesn't matter where it goes

#

you know that's kind of funny that it gets simpler if you don't do it like vanilla

clever dragon
# clever dragon for that multi item requester let's say it's a green circuit input station, you'...

this is worded weirdly, I'll rephrase
let's say you wanted two individual resource loops, one for iron and one for copper, and you wanted them both to go to the same station
in that station's lists, one would have the iron provider and the other would have the copper provider, then in the iron provider's list it would have the specific list for green circuits to go back to the iron provider, and the same for the copper
however if you allow a train to go to any provider station after leaving the circuit station, you can simplify that completely by having the circuit station allow going to either one of those stations after leaving, since the train would be empty

#

the keybind to open the gui is shift + T by the way

odd solar
#

🙃 I brokes it

#

station name doesn't update when I change it?

odd solar
clever dragon
#

huh

#

what exactly did you do

#

click the trash button?

#

after renaming a station

odd solar
#

yea, I had the old station name in the list before renaming

#

rename -> saw the old station name still in the list -> proceed to click delete -> boom

#

okay I can't repro it, let me see...

clever dragon
#

yeah no I got it

#

that didn't use to happen but I just changed around the station and category lists

odd solar
#

somehow only one of the old names is left in the list, tried it with three stations

#

ah okay

clever dragon
#

if you do it with one station it happens

#

place one, add it to it's own list, rename, then delete the old name from it's own list

odd solar
#

okay... so how do I get the train to move? I have this and the train is at AmbientKiller but it is not moving

clever dragon
#

is it in automatic and does it have that station in it's schedule already

#

right now you have to tell it to go to that station once to kickstart it

odd solar
#

let me try sending it away

#

hmm... still stuck at the same station

clever dragon
#

interesting

#

I didn't actually check if the mod was working before zipping it

#

there's a do return end in trains.lua

#

I put that in there cause I was trying to load an existing save and I haven't made it work with that yet

#

since you'll be able to do vanilla train schedules with this mod I'm probably just going to auto convert all existing schedules into this mod's format and force people to do it through the GUI, that way I don't have to have the headache of having two systems operating at once

odd solar
#

okay I commented that line and it started working

clever dragon
#

nice

odd solar
#

is the category function similar to rai's train groups?

clever dragon
#

yeah, except it's for stations and not trains

odd solar
#

interesting concept 🤔

clever dragon
#

say for example you make a "provider" category and tell all requester stations to go to that category

#

any station you put in the provider category effectively gets added to all requester station's lists automatically

#

that way it's super easy to introduce new resources into the hypothetical many to many network

odd solar
#

this is like tagging but for stations 🧐

#

I'll need to internalise the concept more before coming back with more horrible feedbacks

clever dragon
#

lol

odd solar
#

thanks for the share

clever dragon
#

yeah it takes a little bit of getting used to

#

once you wrap your head around the concept that stations are controlling everything instead of trains it gets a lot easier

#

you can also think of it like a graph where nodes are the stations and all of the connections are one directional

#

then trains are traveling along the graph

#

I'm very proud of this concept as a whole, instead of forcing the provider requester mentality

odd solar
#

How do you control the number of trains serving a path under this concept?

clever dragon
#

you don't

odd solar
#

Do I have to?

clever dragon
#

not really

odd solar
#

Sorry but it is still new to me lol

clever dragon
#

I mean if you have a closed loop system you might want to monitor how many trains are in there but if it's a closed loop the number of trains in it will never change

#

I'll most likely be adding number labels to the stations so you can see how many trains are going to or at each station

odd solar
#

Say I see a path is underserved, I just throw more train to the depot and it solves it magically?

clever dragon
#

or the original train gui might do this

#

pretty much

odd solar
#

Cool

clever dragon
#

if that's the way you have your network set up

clever dragon
#

this mod is more of a generic tool to create your own system

#

but yeah if your network is many to many and it's one large graph, you can absolutely just throw more trains in if you're running low

odd solar
#

You can even extend the mod to provide visualisation for the user's system to show where the trains are in the graph

clever dragon
#

I was just thinking that

odd solar
#

Instead of just numbers

#

Pretty sure you need another name for this, instead of "Simple" ChibiSmug

clever dragon
#

yeah scope creep

#

it's low priority, making graph visualizations look good is hard

#

but it's not off the table :P

#

to be fair, the rules of the system are simple

#

each station has a list of next stations that the train picks from

odd solar
#

Is there an easy way to set train limit from your mod?

clever dragon
#

no, that is still vanilla

odd solar
#

I think that will be helpful

#

If it is made easier from your mod

clever dragon
#

possibly, but I don't see how

#

do you mean a static limit?

odd solar
#

Yea

clever dragon
#

ah yeah that wouldn't be too hard

odd solar
#

Since the flow of trains in a system is gated by station limit

clever dragon
#

I was thinking more along the lines of dynamic limits where it turns to 1 if it is accepting items

#

and 0 if it's closed

#

that you definitely can't do with the mod

odd solar
clever dragon
#

if they decide to do that yes

odd solar
#

Default 1 when there is a need for inc train will avoid problems yea

clever dragon
#

I don't see why it wouldn't work with dynamic limits that go above 1

#

it would be the almost the same as it would vanilla trains, except I somehow have to make trains choose stations that don't have their limits fulfilled

#

don't know if there's API for that but I'm ignoring the problem until I have to deal with it

odd solar
clever dragon
#

if it can only accept one train then only one train will go there

#

the mod isn't going to tell trains to go to full stations

#

unless that's the only station in the list, then it will wait

#

and if all stations in the list are full, it will sit there "repathing" until one opens up

#

(again it doesn't do that yet but it's planned)

odd solar
clever dragon
#

it doesn't matter what kind of limit system you use, when a train is picking it's next station it will attempt to go to one that's not destination full

#

if you're asking what happens in a system when there are a bunch of static limit 1 stations and not enough trains to fulfill all of them at once, and they get "stuck" at the station eventually, that's user design error

odd solar
#

Ok let's put dynamic limits aside for now. My point was that I felt that it will be useful if one is able to easily adjust the static train limit from your mod.

clever dragon
#

I can see how that would be useful

#

similar to mass renaming a station

odd solar
#

If it doesn't crash

clever dragon
#

shush I already fixed that in dev

clever dragon
#

hmm

#

minor thing I have just noticed

#

since the system currently only has it so a train has one non-temporary station in the list at once, I'm pretty sure you can't make a train go to a station of the same name that it's currently at

#

however in vanilla you can list the same station in the schedule twice to make it go between stuff

odd solar
#

or actually, I don't think I understand what's the problem here lol

clever dragon
#

it's the fact that I'm not making trains progress from station to station in their schedules and instead writing over each other

#

normally in vanilla if you put two station A's in the schedule it would loop between any number of stations labeled A

#

with my mod, it's resetting the first schedule index to be A so it never leaves

#

I think

#

I haven't actually tested it but I'm 90% sure that's what would happen

#

I've broken my popup completely so I can't really test anything until I fix it

odd solar
#

Make it so that when it is the only station in your mod's list, have two similar stops?

clever dragon
#

if it's actually an issue I might just hard code the edge case

icy thicket
clever dragon
#

the only thing it actually does is randomize the order of visiting a few stations, which I don't think is necessary

#

you can just make the train visit each station in order and it will accomplish the same thing

icy thicket
#

That's true.

clever dragon
#

one of the main things I haven't figured out that I need to before working on the schedule conversion is looped schedules

#

where you have A B A B A B C repeat

icy thicket
#

like, implementing that in lua?

#

or something more conceptual

clever dragon
#

conceptual

#

I can do that in lua easily, I just don't know how to make the interface for it

#

I mean technically you can do it with the different station list thing and fake it but that's just as bad as vanilla, if not worse

#

it would get the job done but it would be ugly

icy thicket
#

for some reason i just have the mental image of that playlist repeat symbol somewhere in your gui

clever dragon
#

maybe I can have another tab for "Routes" where you can create linear routes of stations and you can send trains to that route

#

or maybe the whole concept of having lists of valid stations per station is dumb and I should be doing routes from the start, but allow trains to switch routes

#

that would at least be a little more familiar for people who have vanilla experience already

icy thicket
#

i was sort of thinking you could er, 'lock' two or more stations together as a schedule and the trains would switch between these categories/groups as determined by your system

icy thicket
clever dragon
#

well trains wouldn't be locked to one

#

after finishing a route, they can choose from the outstanding list of routes or go to a depot or something

icy thicket
#

ah that sounds like what i was just describing 🙂

clever dragon
#

that doesn't really mesh too well with station prioritization though

#

actually wait, it might

#

I'd have to think about this

icy thicket
#

If we're talking a specific station, it might have to be done as a slightly differently named/grouped station + you having someway to prioritize a route being selected over others

#

but that's more complex

#

actually, have you already got/planned a way to 'disable' a category? For example all stations that accept green circuits have full buffers; i wouldn't want a train to enter into that category and get loaded up with green circuits and then just be stuck waiting for it to empty

clever dragon
#

you can do that with normal train limits

#

or technically enable/disable as well

icy thicket
#

in the middle of an intersection

clever dragon
#

trains will remember the station they last visited and pick a different one if there's another in the list

winter palm
clever dragon
#

however if they already loaded up with green circuits for example, then they will wait for a green circuit station to open up

#

you just prevent them from going to the green circuit pickup station in the first place by setting the limit to 0 when there's not a station that needs green circuits

icy thicket
#

yeah, i just wanted to make sure that the mod would be taking that into account