[Mod] Advanced Trains [advtrains] [2.4.3]

yw05
Member
Posts: 368
Joined: Tue May 07, 2019 12:59
GitHub: y5nw
IRC: y5nw
In-game: ywang
Location: Germany

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by yw05 » Post

Blockhead wrote:
Wed Dec 14, 2022 03:34
yw05 wrote:
Tue Dec 13, 2022 16:35
I thought game-specific mods are run first (i.e. before Advtrains)?
Nope, read this thread for more details. In short, game mods are not special and aren't guaranteed to load first. In fact they are basically guaranteed to load later if there is a big chain of dependencies in the game's mods but a user installed mod with no dependencies exists.
Interesting. Thanks for the info.
I think we should make any advtrains module that adds recipes optionally-depend on any game-specific mod that advtrains supports, or use something like Adaption Modpack. I think that the misc_nodes.lua which is inside the core modpack should either be replaced entirely by integrating advtrains_platform into the core modpack and deleting misc_nodes.lua, OR perhaps the platform registration function can remain inside the core modpack, but with no registrations in the core modpack, only calling the regisration function from other mods.
I would suggest including advtrains_platform, but as a subtree (similar to serialize_lib). IMO platform registration code should be kept in the core mod as an API.
Multi-game support is hard, but realistically, we still only support Minetest Game unless you're playing creative mode. For now I think realising our mistake and adding default back to the optional dependencies will suffice until someone makes a conscientious effort to support some other game like Mineclone2.
Agreed. I don't think there is currently much work on supporting games not based on MTG.
Netmapper is a mess currently, with my version (which adds TCB and station drawing) not rebased on upstream to support serialize lib, and obviously netmapper also needs more options like manually defining the boundary or at least a more sensible default for the boundary size because stuff can end up off the viewport or really tiny and so on. However it's done though, please fix it by modifying the Lua source code directly to do its job properly instead of hacking around stuff with external shell scripts and other nonsense.
I could consider working on netmapper, considering that there is currently not much to do with the branches I am currently working on.

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by 56independent_actual » Post

💥🚄
Last edited by 56independent_actual on Sun Jan 15, 2023 16:21, edited 1 time in total.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

yw05
Member
Posts: 368
Joined: Tue May 07, 2019 12:59
GitHub: y5nw
IRC: y5nw
In-game: ywang
Location: Germany

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by yw05 » Post

56independent_actual wrote:
Fri Dec 16, 2022 20:58
I SERIOUSLY don't get this codebase. The more i grep the more i weep.

Can someone give me a big-picture overview of the door system and which files contribute which aspect? Which file makes carriage doors open? wagons.lua? Which file defines which functions and how do i know? def.*?functioname( into grep?
  • What have you found out on this matter so far?
  • I am not sure what you want by a "big-picture overview of the door system". There are a few places where information on doors is involved.
  • I am not sure what makes you think about putting def as part of the match pattern. You should also read the documentation on grep and git-grep to get an idea on how to use these tools and what to search for.
I am SICK AND TIRED of my only contributions being the newsletter, but that's the only code i understand.
I do not see a place here for you in terms of code contributions if your purpose of contributing to Advtrains does not go beyond having something in your portfolio.
I honestly feel like Advtrains would do well with auto-generated documentation from comments under functions:

Code: Select all

def open_doors(x) do
    -- This function opens doors of carriage x of the train returning nill if the carriage does not exist (or crashing the server if `worstPossibleOption = true` in minetest.conf)
Something like this would go to this markdown file:

Code: Select all

# open_doors(x)
This function opens doors of carriage x of the train returning nill if the carriage does not exist (or crashing the server if `worstPossibleOption = true` in minetest.conf)
That way, anytime someone wants to add, they can just read some documentation and update it after they did their addition.
There is LDoc for Lua, and it is partly used by the doc branch.

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by 56independent_actual » Post

💥🚄
Last edited by 56independent_actual on Sun Jan 15, 2023 16:21, edited 1 time in total.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

User avatar
Blockhead
Member
Posts: 1688
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by Blockhead » Post

56independent_actual wrote:
Fri Dec 16, 2022 22:49
In any case, working on git projects rather on personal ones has 100% benifits with little to no downsides.
I think britsignals would be good for you to return to. You've already received a fair bit of feedback and dialogue from me over it and I do genuinely want it to succeed, so you don't need to consider it "solo".
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

W3RQ01
Member
Posts: 157
Joined: Sat Nov 28, 2020 06:33
GitHub: W3RQ01
In-game: Dario23 or W3RQ01
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by W3RQ01 » Post

Hi everyone, I want to proudly announce that at Advtrains Supplemental we are working on the NY Subway. Blockhead managed to fix the hitbox issue with the model! He also made a PR for a floor substitution as next goal of our development of this mod is to fix the textures.

Link: https://notabug.org/advtrains_supplemen ... _subway_ny
OneUnitedPower

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by 56independent_actual » Post

💥🚄
Last edited by 56independent_actual on Sun Jan 15, 2023 16:21, edited 1 time in total.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

yw05
Member
Posts: 368
Joined: Tue May 07, 2019 12:59
GitHub: y5nw
IRC: y5nw
In-game: ywang
Location: Germany

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by yw05 » Post

56independent_actual wrote:
Fri Dec 16, 2022 22:49
yw05 wrote:
Fri Dec 16, 2022 21:45
[*] What have you found out on this matter so far?
Not much. Wagons seems to hold some info but the file is really long so cannot be easily understood by my brain.
[*] I am not sure what you want by a "big-picture overview of the door system". There are a few places where information on doors is involved.
The general overview; you might describe a hypothetical Hypotheticatest Forum post request as "data enters x.php and then is turned into temporary HTML at x.php before becoming published in the MySQL database", showing how data flows through the system.
  • You are clearly aware that door information can be set by ATC (hint: the only other place I can find where this is set is in the code for manual train control). Why did you not look info that?
  • There are multiple (separate) places where door information is involved, and the purpose of using door information at these places differ from each other (train HUD, door animation, coupling, etc.). There is also not much data flow - the information is set in a field of the train table, and other modules access them.
[*] I am not sure what makes you think about putting def as part of the match pattern. You should also read the documentation on grep and git-grep to get an idea on how to use these tools and what to search for.
I've mostly been programming in Ruby and Python so some Lua (all three are similar languages) insticts slipped out of my brain; i meant function or something like that as the function definition.
git grep -rn -C3 door_open
I do not see a place here for you in terms of code contributions if your purpose of contributing to Advtrains does not go beyond portfolio.
That's what sparked the fire for me to seek git projects to work on; i also was beggining to get bored of solo projects and felt like i was missing out on some human connections and some valuable experience working in other codebases.

In any case, working on git projects rather on personal ones has 100% benifits with little to no downsides.
56independent_actual wrote:
Sat Dec 17, 2022 08:56
Blockhead wrote:
Sat Dec 17, 2022 01:36
I think britsignals would be good for you to return to. You've already received a fair bit of feedback and dialogue from me over it and I do genuinely want it to succeed, so you don't need to consider it "solo".
I might be seeking employment in the next few years and then i'll have to work on a novel codebase not written by me.
If you want to (sensibly) contribute to the Advtrains codebase, then the downside for you is that you are expected to be sufficiently competent to
  • Know how to use grep and similar utilities
  • Know how to do research yourself instead of asking people to spoon-feed you with information, especially for something simple enough that you can figure out with grep
  • Take the responsibility for your own words
Which you currently clearly aren't.
There is LDoc for Lua, and it is partly used by the doc branch.
Where are the compiled files held? If they're not held, what command would i use to run it in the doc root directory?
RTFM. Also you can check out the doc branch and read the LDoc config or the CI config yourself.
Blockhead wrote:
Sat Dec 17, 2022 01:36
56independent_actual wrote:
Fri Dec 16, 2022 22:49
In any case, working on git projects rather on personal ones has 100% benifits with little to no downsides.
I think britsignals would be good for you to return to. You've already received a fair bit of feedback and dialogue from me over it and I do genuinely want it to succeed, so you don't need to consider it "solo".
I think the thing is that some features of that signal pack will overlap with advtrains_signal_japan if the new-ks branch is merged.

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by 56independent_actual » Post

💥🚄
Last edited by 56independent_actual on Sun Jan 15, 2023 16:22, edited 1 time in total.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

yw05
Member
Posts: 368
Joined: Tue May 07, 2019 12:59
GitHub: y5nw
IRC: y5nw
In-game: ywang
Location: Germany

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by yw05 » Post

56independent_actual wrote:
Sat Dec 17, 2022 10:46
Clearly the codebase is not designed to be begginer-friendly so i will seek alternative codebases to contribute to. The developers also seem overworked for their teamsize so i will find a codebase with a larger team more willing to guide begginers.
Mouthwork is easy. Asking for other people to implement some is easy: just demand something and have others do the work of actually implementing it; proposals can be written without thinking through it in terms of implications in various aspects, and these can be written to make it appear as if you had an idea of how things work even when your actual knowledge does not (fundamentally) extend beyond creating one hype after another.

Then things turn out to be not so simple. (From hindsight, there is the keyword h137 for me), and, unlike other people working on Advtrains (by the way, they also started without much knowledge of the codebase, and I also started out this way), instead of spending time figuring out how things work and how to improve things, you seem to expect people to tell you everything even for some of the simplest things:

Code: Select all

$ git -C .minetest/mods/advtrains grep -rn -C3 door_open | cat
advtrains/atc.lua-240-  ["O([LRC])"]=function(id, train, match)
advtrains/atc.lua-241-          local tt={L=-1, R=1, C=0}
advtrains/atc.lua-242-          local arr=train.atc_arrow and 1 or -1
advtrains/atc.lua:243:          train.door_open = tt[match]*arr
advtrains/atc.lua-244-          return 2
advtrains/atc.lua-245-  end,
advtrains/atc.lua-246-  ["K"] = function(id, train)
advtrains/atc.lua:247:          if train.door_open == 0 then
advtrains/atc.lua-248-                  atwarn(sid(id), attrans("ATC Kick command warning: Doors closed"))
advtrains/atc.lua-249-                  return 1
advtrains/atc.lua-250-          end
--
advtrains/init.lua-467-                 local v=advtrains.save_keys(train, {
advtrains/init.lua-468-                         "last_pos", "last_connid", "last_frac", "velocity", "tarvelocity",
advtrains/init.lua-469-                         "trainparts", "recently_collided_with_env",
advtrains/init.lua:470:                         "atc_brake_target", "atc_wait_finish", "atc_command", "atc_delay", "door_open",
advtrains/init.lua-471-                         "text_outside", "text_inside", "line", "routingcode",
advtrains/init.lua-472-                         "il_sections", "speed_restriction", "speed_restrictions_t", "is_shunt",
advtrains/init.lua-473-                         "points_split", "autocouple", "atc_wait_autocouple", "ars_disable",
--
advtrains/trainhud.lua-68-                      end
advtrains/trainhud.lua-69-              end
advtrains/trainhud.lua-70-              if pc.left then
advtrains/trainhud.lua:71:                      if train.door_open ~= 0 then
advtrains/trainhud.lua:72:                              train.door_open = 0
advtrains/trainhud.lua-73-                      else
advtrains/trainhud.lua:74:                              train.door_open = -1
advtrains/trainhud.lua-75-                      end
advtrains/trainhud.lua-76-              end
advtrains/trainhud.lua-77-              if pc.right then
advtrains/trainhud.lua:78:                      if train.door_open ~= 0 then
advtrains/trainhud.lua:79:                              train.door_open = 0
advtrains/trainhud.lua-80-                      else
advtrains/trainhud.lua:81:                              train.door_open = 1
advtrains/trainhud.lua-82-                      end
advtrains/trainhud.lua-83-              end
advtrains/trainhud.lua-84-              if not act then
--
advtrains/trainhud.lua-257-     -- door
advtrains/trainhud.lua-258-     ht[#ht+1] = "187,10=(advtrains_hud_bg.png^[resize\\:26x30^[colorize\\:white)"
advtrains/trainhud.lua-259-     ht[#ht+1] = "189,12=(advtrains_hud_bg.png^[resize\\:22x11)"
advtrains/trainhud.lua:260:     ht[#ht+1] = sformat("170,10=(advtrains_hud_bg.png^[resize\\:15x30^[colorize\\:%s)", train.door_open==-1 and "white" or "darkslategray")
advtrains/trainhud.lua-261-     ht[#ht+1] = "172,12=(advtrains_hud_bg.png^[resize\\:11x11)"
advtrains/trainhud.lua:262:     ht[#ht+1] = sformat("215,10=(advtrains_hud_bg.png^[resize\\:15x30^[colorize\\:%s)", train.door_open==1 and "white" or "darkslategray")
advtrains/trainhud.lua-263-     ht[#ht+1] = "217,12=(advtrains_hud_bg.png^[resize\\:11x11)"
advtrains/trainhud.lua-264-     -- speed indication(s)
advtrains/trainhud.lua-265-     sevenseg(math.floor(vel/10), 320, 10, 30, 10, "[colorize\\:red\\:255")
--
advtrains/trainhud.lua-315-local _, texture = advtrains.hud_train_format { -- dummy train object to demonstrate the train hud
advtrains/trainhud.lua-316-     max_speed = 15, speed_restriction = 15, velocity = 15, tarvelocity = 12,
advtrains/trainhud.lua-317-     active_control = true, lever = 3, ctrl = {lzb = true}, is_shunt = true,
advtrains/trainhud.lua:318:     door_open = 1, lzb = {oncoming = {{spd=6, idx=125.7}}}, index = 0,
advtrains/trainhud.lua-319-}
advtrains/trainhud.lua-320-
advtrains/trainhud.lua-321-minetest.register_node("advtrains:hud_demo",{
--
advtrains/trainlogic.lua-1165-
advtrains/trainlogic.lua-1166-  newtrain.velocity=train.velocity
advtrains/trainlogic.lua-1167-  -- copy various properties from the old to the new train
advtrains/trainlogic.lua:1168:  newtrain.door_open = train.door_open
advtrains/trainlogic.lua-1169-  newtrain.text_outside = train.text_outside
advtrains/trainlogic.lua-1170-  newtrain.text_inside = train.text_inside
advtrains/trainlogic.lua-1171-  newtrain.line = train.line
--
advtrains/trainlogic.lua-1191-  advtrains.path_setrestore(train, true)
advtrains/trainlogic.lua-1192-
advtrains/trainlogic.lua-1193-  -- rotate some other stuff
advtrains/trainlogic.lua:1194:  if train.door_open then
advtrains/trainlogic.lua:1195:          train.door_open = - train.door_open
advtrains/trainlogic.lua-1196-  end
advtrains/trainlogic.lua-1197-  if train.atc_command then
advtrains/trainlogic.lua-1198-          train.atc_arrow = not train.atc_arrow
--
advtrains/wagons.lua-339-                               else
advtrains/wagons.lua-340-                                       -- If on a passenger seat and doors are open, get off when W or D pressed.
advtrains/wagons.lua-341-                                       local pass = data.seatp[seatno] and minetest.get_player_by_name(data.seatp[seatno])
advtrains/wagons.lua:342:                                       if pass and self:train().door_open~=0 then
advtrains/wagons.lua-343-                                       local pc=pass:get_player_control()
advtrains/wagons.lua-344-                                               if pc.up or pc.down then
advtrains/wagons.lua-345-                                                       self:get_off(seatno)
--
advtrains/wagons.lua-374-               --door animation
advtrains/wagons.lua-375-               if self.doors then
advtrains/wagons.lua-376-                       if (self.door_anim_timer or 0)<=0 then
advtrains/wagons.lua:377:                               local dstate = (train.door_open or 0) * fct
advtrains/wagons.lua-378-                               if dstate ~= self.door_state then
advtrains/wagons.lua-379-                                       local at
advtrains/wagons.lua:380:                                       --meaning of the train.door_open field:
advtrains/wagons.lua-381-                                       -- -1: left doors (rel. to train orientation)
advtrains/wagons.lua-382-                                       --  0: closed
advtrains/wagons.lua-383-                                       --  1: right doors
--
advtrains/wagons.lua-444-
advtrains/wagons.lua-445-               --automatic get_on
advtrains/wagons.lua-446-               --needs to know index and path
advtrains/wagons.lua:447:               if train.velocity==0 and self.door_entry and train.door_open and train.door_open~=0 then
advtrains/wagons.lua-448-                       --using the mapping created by the trainlogic globalstep
advtrains/wagons.lua-449-                       for i, ino in ipairs(self.door_entry) do
advtrains/wagons.lua-450-                               --fct is the flipstate flag from door animation above
--
advtrains/wagons.lua-452-                               local ix1, ix2 = advtrains.path_get_adjacent(train, aci)
advtrains/wagons.lua-453-                               -- the two wanted positions are ix1 and ix2 + (2nd-1st rotated by 90deg)
advtrains/wagons.lua-454-                               -- (x z) rotated by 90deg is (-z x)  (http://stackoverflow.com/a/4780141)
advtrains/wagons.lua:455:                               local add = { x = (ix2.z-ix1.z)*train.door_open, y = 0, z = (ix1.x-ix2.x)*train.door_open }
advtrains/wagons.lua-456-                               local pts1=vector.round(vector.add(ix1, add))
advtrains/wagons.lua-457-                               local pts2=vector.round(vector.add(ix2, add))
advtrains/wagons.lua-458-                               if minetest.get_item_group(minetest.get_node(pts1).name, "platform")>0 then
--
advtrains/wagons.lua-654-                               if data.owner==pname then
advtrains/wagons.lua-655-                                       poss[#poss+1]={name=attrans("Wagon properties"), key="prop"}
advtrains/wagons.lua-656-                               end
advtrains/wagons.lua:657:                               if not self.seat_groups[sgr].require_doors_open or self:train().door_open~=0 then
advtrains/wagons.lua-658-                                       poss[#poss+1]={name=attrans("Get off"), key="off"}
advtrains/wagons.lua-659-                               else
advtrains/wagons.lua-660-                                       if clicker:get_player_control().sneak then
--
advtrains/wagons.lua-688-                                       return
advtrains/wagons.lua-689-                               end
advtrains/wagons.lua-690-
advtrains/wagons.lua:691:                               local doors_open = self:train().door_open~=0 or clicker:get_player_control().sneak
advtrains/wagons.lua-692-                               local allow, rsn=false, "Wagon has no seats!"
advtrains/wagons.lua-693-                               for _,sgr in ipairs(self.assign_to_seat_group) do
advtrains/wagons.lua-694-                                       allow, rsn = self:check_seat_group_access(pname, sgr)
--
advtrains/wagons.lua-776-               clicker:set_eye_offset({x=0,y=0,z=0}, {x=0,y=0,z=0})
advtrains/wagons.lua-777-               local train=self:train()
advtrains/wagons.lua-778-               --code as in step - automatic get on
advtrains/wagons.lua:779:               if self.door_entry and train.door_open and train.door_open~=0 and train.velocity==0 and train.index and train.path then
advtrains/wagons.lua-780-                       local index = advtrains.path_get_index_by_offset(train, train.index, -data.pos_in_train)
advtrains/wagons.lua-781-                       for i, ino in ipairs(self.door_entry) do
advtrains/wagons.lua-782-                               --atdebug("using door-based",i,ino)
advtrains/wagons.lua-783-                               local fct=data.wagon_flipped and -1 or 1
advtrains/wagons.lua-784-                               local aci = advtrains.path_get_index_by_offset(train, index, ino*fct)
advtrains/wagons.lua-785-                               local ix1, ix2 = advtrains.path_get_adjacent(train, aci)
advtrains/wagons.lua:786:                               local d = train.door_open
advtrains/wagons.lua-787-                               if self.wagon_width then
advtrains/wagons.lua-788-                                       d = d * math.floor(self.wagon_width/2)
advtrains/wagons.lua-789-                               end
advtrains/wagons.lua-790-                               -- the two wanted positions are ix1 and ix2 + (2nd-1st rotated by 90deg)
advtrains/wagons.lua-791-                               -- (x z) rotated by 90deg is (-z x)  (http://stackoverflow.com/a/4780141)
advtrains/wagons.lua-792-                               local add = { x = (ix2.z-ix1.z)*d, y = 0, z = (ix1.x-ix2.x)*d }
advtrains/wagons.lua:793:                               local oadd = { x = (ix2.z-ix1.z)*(d+train.door_open), y = 1, z = (ix1.x-ix2.x)*(d+train.door_open)}
advtrains/wagons.lua-794-                               local platpos=vector.round(vector.add(ix1, add))
advtrains/wagons.lua-795-                               local offpos=vector.round(vector.add(ix1, oadd))
advtrains/wagons.lua-796-
And anyone who points out this matter is then labeled as being unfriendly to beginners.
And any piece of code that involves some level of thinking is then labeled as spaghetti code.
And to answer your original question: no, there is no "door system" like LZB or interlocking.

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by 56independent_actual » Post

💥🚄
Last edited by 56independent_actual on Sun Jan 15, 2023 16:22, edited 1 time in total.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

User avatar
LMD
Member
Posts: 1397
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by LMD » Post

56independent_actual wrote:
Sat Dec 17, 2022 10:46
Clearly the codebase is not designed to be begginer-friendly [sic] so i will seek alternative codebases to contribute to. The developers also seem overworked for their teamsize so i will find a codebase with a larger team more willing to guide begginers [sic].
1. First of all, flesh out your programming & mod development skills (Lua API knowledge); these are prerequisites for MT mod development. Fellow modders might be willing to teach you the ropes of their mods, but you need to know Lua and the MT Lua API well, which does not seem to be the case currently. You should have developed some nontrivial mods before attempting to contribute to nontrivial mods; generally reading (foreign) code is harder than writing code, so how do you expect to be able to contribute if you haven't written nontrivial codebases yourself yet?
2. You seem to consider Minetest a more suitable codebase to contribute to. This is very likely not the case - at all. MT core devs are massively overworked and do not really have the time "guide beginners"; well-made PRs of professional C++ programmers or other core devs are already waiting for months or years because resources are so sparse. There really is very little to no core dev time for "guiding beginners". Prerequisites in this case are decent programming experience and C++ knowledge (I'll admit to my C++ knowledge being insufficient, but at least I bring the decent programming experience). C(++) also is much harder than Lua, and the Lua portions of Minetest are rather small. Trivial fixes or string changes like your first PR just clutter up the PR list and distract from more important PRs.
yw05 wrote:
Sat Dec 17, 2022 12:23
Mouthwork is easy. Asking for other people to implement some is easy: just demand something and have others do the work of actually implementing it; proposals can be written without thinking through it in terms of implications in various aspects, and these can be written to make it appear as if you had an idea of how things work even when your actual knowledge does not (fundamentally) extend beyond creating one hype after another.

Then things turn out to be not so simple. [...], and, unlike other people working on Advtrains (by the way, they also started without much knowledge of the codebase, and I also started out this way), instead of spending time figuring out how things work and how to improve things, you seem to expect people to tell you everything even for some of the simplest things [...]

And anyone who points out this matter is then labeled as being unfriendly to beginners.
And any piece of code that involves some level of thinking is then labeled as spaghetti code.
Agreed. That is not to say that proposals shouldn't be written - but those writing them should have a clear idea of how to straightforwardly implement them - otherwise you get unrealistic proposals that just end up ignored (rightfully so). I've sometimes written proposals which ultimately got picked up (thanks very much TurkeyMcMac!), which is great because core devs have a much better experience with C++ and the codebase.
My stuff: Projects - Mods - Website

W3RQ01
Member
Posts: 157
Joined: Sat Nov 28, 2020 06:33
GitHub: W3RQ01
In-game: Dario23 or W3RQ01
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by W3RQ01 » Post

I know that we're talking of somewhat important stuff but please keep this out of advtrains as it's not anymore related.
OneUnitedPower

User avatar
Blockhead
Member
Posts: 1688
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

AdvTrains Supplemental coming soon to ContentDB

by Blockhead » Post

Good news everyone, one of AdvTrains Supplementals' main goals, getting MBB's mods onto ContentDB, may soon come to fruition. The mods are properly licensed and running well on the latest versions of Minetest and AdvTrains. I plan to add them to ContentDB under an organisational account soon as per my discussion at IRC earlier.

This would involve me creating a new ContentDB account and assigning members to maintainer roles on all the packages which that account posts. ContentDB doesn't have proper organisational account support, so this is the best we can do. According to IRC discussion, this is how the mt-mods account is handled. I don't take the idea of holding the password to this account lightly, but for security I do not think sharing the password would be a good idea. I would of course hand the account over in case I were to take a long leave of absence or retirement from AdvTrains, but I'm committed to it for the foreseeable future.

Could Supplemental organisation members let me know if they have any concerns before I proceed? Feedback from others outside the organisation is welcome too if you have some insights into how best to handle this.

Let's try to get supplemental trains out on ContentDB in time for Christmas :)
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

yw05
Member
Posts: 368
Joined: Tue May 07, 2019 12:59
GitHub: y5nw
IRC: y5nw
In-game: ywang
Location: Germany

Re: AdvTrains Supplemental coming soon to ContentDB

by yw05 » Post

Blockhead wrote:
Mon Dec 19, 2022 11:28
Good news everyone, one of AdvTrains Supplementals' main goals, getting MBB's mods onto ContentDB, may soon come to fruition. The mods are properly licensed and running well on the latest versions of Minetest and AdvTrains. I plan to add them to ContentDB under an organisational account soon as per my discussion at IRC earlier.

This would involve me creating a new ContentDB account and assigning members to maintainer roles on all the packages which that account posts. ContentDB doesn't have proper organisational account support, so this is the best we can do. According to IRC discussion, this is how the mt-mods account is handled. I don't take the idea of holding the password to this account lightly, but for security I do not think sharing the password would be a good idea. I would of course hand the account over in case I were to take a long leave of absence or retirement from AdvTrains, but I'm committed to it for the foreseeable future.
That would make sense in terms of organization/attribution.
Could Supplemental organisation members let me know if they have any concerns before I proceed? Feedback from others outside the organisation is welcome too if you have some insights into how best to handle this.

Let's try to get supplemental trains out on ContentDB in time for Christmas :)
On a side note, as more trains are provided, would it make sense to create an in-game mechanism for browsing trains (which can be extended in the future to other things)? The idea is that regular players on servers then do not have to go to the Advtrains wiki for that purpose.

User avatar
Blockhead
Member
Posts: 1688
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: AdvTrains Supplemental coming soon to ContentDB

by Blockhead » Post

yw05 wrote:
Mon Dec 19, 2022 12:07
Blockhead wrote:
Mon Dec 19, 2022 11:28
... I plan to add them to ContentDB under an organisational account soon ...
That would make sense in terms of organization/attribution.
I'll take that as an approval.
yw05 wrote:
Mon Dec 19, 2022 12:07
On a side note, as more trains are provided, would it make sense to create an in-game mechanism for browsing trains (which can be extended in the future to other things)? The idea is that regular players on servers then do not have to go to the Advtrains wiki for that purpose.
In terms of discoverability I would say ContentDB, the catalogue and playing on multiplayer servers more than suffices. In-game information about mods you don't have installed doesn't seem to make any sense to me. Everyone has a browser open these days.

In terms of train information, possibly. As in, being able to view statistics on the trains that are running in AdvTrains on the current server. I would look at doing something with a mod like doc for that purpose. It would be straightforward enough to generate a page for each wagon that lists its basic statistics from the wagon registration information. From there an external system that publishes that kind of information to DokuWiki or at least prepares the documents for posting there would be helpful. And that's basically the argument I've been saying for a long time that the contents of the wiki should be integrated into the source files of the mod.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

yw05
Member
Posts: 368
Joined: Tue May 07, 2019 12:59
GitHub: y5nw
IRC: y5nw
In-game: ywang
Location: Germany

Re: Improved documentation for Advtrains-related items

by yw05 » Post

Blockhead wrote:
Mon Dec 19, 2022 12:20
yw05 wrote:
Mon Dec 19, 2022 12:07
Blockhead wrote:
Mon Dec 19, 2022 11:28
... I plan to add them to ContentDB under an organisational account soon ...
That would make sense in terms of organization/attribution.
I'll take that as an approval.
Yes.
yw05 wrote:
Mon Dec 19, 2022 12:07
On a side note, as more trains are provided, would it make sense to create an in-game mechanism for browsing trains (which can be extended in the future to other things)? The idea is that regular players on servers then do not have to go to the Advtrains wiki for that purpose.
In terms of discoverability I would say ContentDB, the catalogue and playing on multiplayer servers more than suffices. In-game information about mods you don't have installed doesn't seem to make any sense to me. Everyone has a browser open these days.
My idea is (as you described below) that it mainly targets some players who want to (for example) look up some details on a specific wagon that is already present on the server. I don't think discoverability is the main goal.
In terms of train information, possibly. As in, being able to view statistics on the trains that are running in AdvTrains on the current server. I would look at doing something with a mod like doc for that purpose. It would be straightforward enough to generate a page for each wagon that lists its basic statistics from the wagon registration information.
Agreed. I found the doc mod on CDB, but I have not yet looked into that mod in detail.
From there an external system that publishes that kind of information to DokuWiki or at least prepares the documents for posting there would be helpful. And that's basically the argument I've been saying for a long time that the contents of the wiki should be integrated into the source files of the mod.
There are a few methods I can think of to do that, except I don't think any of these (other than keeping the current situation) can be implemented well in the short term.
  1. Using e.g. JSON files for wagon registration: this would favor a system like the wiki, but a lot of customization features would be lost here, and mods would have to support this new API.
  2. Running all relevant mods and then generating data: the Advtrains test world already does something similar, but for the purpose of generating registration information the result would be inaccurate in for information that depends on other mods (e.g. crafting recipes)
  3. Code analysis: this could be possible, but things get complicated for anything beyond a "hello world" level of train pack.
  4. Creating a Lua-based sandbox environment specifically for wagon registration: this would be similar to "combining" 1. and 2., where Lua allows a higher level of customization than serialized data while (hopefully) providing some level or accuracy. However, such a sandbox would likely diverge from the coding practices of Lua (in terms of e.g. branching), and mods would need to adapt to this new API. A lot of coding could also be involved here. (Edit: I thought about this again, this seems impractical to implement.)
  5. Keeping the current method of maintaining information on multiple places: currently there is not much coding involved, but this requires more manual work compared to other methods in terms of keeping information up-to-date on multiple sources.

yw05
Member
Posts: 368
Joined: Tue May 07, 2019 12:59
GitHub: y5nw
IRC: y5nw
In-game: ywang
Location: Germany

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by yw05 » Post

By the way, you can also consider adding https://notabug.org/y5nw/advtrains_doc_integration to the Advtrains Supplemental organization.

W3RQ01
Member
Posts: 157
Joined: Sat Nov 28, 2020 06:33
GitHub: W3RQ01
In-game: Dario23 or W3RQ01
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by W3RQ01 » Post

yw05 wrote:
Mon Dec 19, 2022 20:57
By the way, you can also consider adding https://notabug.org/y5nw/advtrains_doc_integration to the Advtrains Supplemental organization.
Yeah sure, when i'll arrive home i will
OneUnitedPower

User avatar
Miniontoby
Member
Posts: 616
Joined: Fri Mar 01, 2019 19:25
GitHub: Miniontoby
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by Miniontoby » Post

Oke so thanks to technical issues at the server host which now finally have been fixed I now get this error:

Code: Select all

2022-12-21 19:07:08: WARNING[Main]: [advtrains]Crash during advtrains main step - skipping the shutdown save operation to not save inconsistent data!
2022-12-21 19:07:08: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod 'advtrains' in callback environment_Step(): ...inetest/minetest/mods/adv
trains/serialize_lib/atomic.lua:112: Loading data from file 'worlds/trains/advtrains_core.ls' failed:
2022-12-21 19:07:08: ERROR[Main]: ...test/minetest/mods/advtrains/serialize_lib/serialize.lua:209: bad argument #1 to 'gsub' (string expected, got nil)
2022-12-21 19:07:08: ERROR[Main]: Disable Strict Loading to ignore.
2022-12-21 19:07:08: ERROR[Main]: stack traceback:
2022-12-21 19:07:08: ERROR[Main]:       [C]: in function 'error'
2022-12-21 19:07:08: ERROR[Main]:       ...inetest/minetest/mods/advtrains/serialize_lib/atomic.lua:112: in function 'load_atomic'
2022-12-21 19:07:08: ERROR[Main]:       /home/minetest/minetest/mods/advtrains/advtrains/init.lua:381: in function 'load_version_4'
2022-12-21 19:07:08: ERROR[Main]:       /home/minetest/minetest/mods/advtrains/advtrains/init.lua:263: in function 'avt_load'
2022-12-21 19:07:08: ERROR[Main]:       /home/minetest/minetest/mods/advtrains/advtrains/init.lua:645: in function 'load'
2022-12-21 19:07:08: ERROR[Main]:       /home/minetest/minetest/mods/advtrains/advtrains/init.lua:586: in function </home/minetest/minetest/mods/advtrains/ad
vtrains/init.lua:575>
2022-12-21 19:07:08: ERROR[Main]:       /home/minetest/minetest/builtin/game/register.lua:431: in function </home/minetest/minetest/builtin/game/register.lua
:417>
This is after a downtime of like nearly a week and a lot of logs and a full /home disk because of the log spam. How to solve this?
Working on mtctl ---- Check my mod "Doorbell" -- Stay safe

yw05
Member
Posts: 368
Joined: Tue May 07, 2019 12:59
GitHub: y5nw
IRC: y5nw
In-game: ywang
Location: Germany

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by yw05 » Post

Miniontoby wrote:
Wed Dec 21, 2022 18:13
Oke so thanks to technical issues at the server host which now finally have been fixed I now get this error:

Code: Select all

2022-12-21 19:07:08: WARNING[Main]: [advtrains]Crash during advtrains main step - skipping the shutdown save operation to not save inconsistent data!
2022-12-21 19:07:08: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod 'advtrains' in callback environment_Step(): ...inetest/minetest/mods/adv
trains/serialize_lib/atomic.lua:112: Loading data from file 'worlds/trains/advtrains_core.ls' failed:
2022-12-21 19:07:08: ERROR[Main]: ...test/minetest/mods/advtrains/serialize_lib/serialize.lua:209: bad argument #1 to 'gsub' (string expected, got nil)
2022-12-21 19:07:08: ERROR[Main]: Disable Strict Loading to ignore.
2022-12-21 19:07:08: ERROR[Main]: stack traceback:
2022-12-21 19:07:08: ERROR[Main]:       [C]: in function 'error'
2022-12-21 19:07:08: ERROR[Main]:       ...inetest/minetest/mods/advtrains/serialize_lib/atomic.lua:112: in function 'load_atomic'
2022-12-21 19:07:08: ERROR[Main]:       /home/minetest/minetest/mods/advtrains/advtrains/init.lua:381: in function 'load_version_4'
2022-12-21 19:07:08: ERROR[Main]:       /home/minetest/minetest/mods/advtrains/advtrains/init.lua:263: in function 'avt_load'
2022-12-21 19:07:08: ERROR[Main]:       /home/minetest/minetest/mods/advtrains/advtrains/init.lua:645: in function 'load'
2022-12-21 19:07:08: ERROR[Main]:       /home/minetest/minetest/mods/advtrains/advtrains/init.lua:586: in function </home/minetest/minetest/mods/advtrains/ad
vtrains/init.lua:575>
2022-12-21 19:07:08: ERROR[Main]:       /home/minetest/minetest/builtin/game/register.lua:431: in function </home/minetest/minetest/builtin/game/register.lua
:417>
This is after a downtime of like nearly a week and a lot of logs and a full /home disk because of the log spam. How to solve this?
From my limited understanding of serialize_lib you should consider restoring from a backup. Your advtrains_core.ls file appears to be empty.

(Note: definitely restore every Advtrains-related file from the same backup. Otherwise things can get out of sync.)

User avatar
Miniontoby
Member
Posts: 616
Joined: Fri Mar 01, 2019 19:25
GitHub: Miniontoby
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by Miniontoby » Post

yw05 wrote:
Wed Dec 21, 2022 18:26
Miniontoby wrote:
Wed Dec 21, 2022 18:13
Oke so thanks to technical issues at the server host which now finally have been fixed I now get this error:

Code: Select all

2022-12-21 19:07:08: WARNING[Main]: [advtrains]Crash during advtrains main step - skipping the shutdown save operation to not save inconsistent data!
2022-12-21 19:07:08: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod 'advtrains' in callback environment_Step(): ...inetest/minetest/mods/adv
trains/serialize_lib/atomic.lua:112: Loading data from file 'worlds/trains/advtrains_core.ls' failed:
2022-12-21 19:07:08: ERROR[Main]: ...test/minetest/mods/advtrains/serialize_lib/serialize.lua:209: bad argument #1 to 'gsub' (string expected, got nil)
2022-12-21 19:07:08: ERROR[Main]: Disable Strict Loading to ignore.
2022-12-21 19:07:08: ERROR[Main]: stack traceback:
2022-12-21 19:07:08: ERROR[Main]:       [C]: in function 'error'
2022-12-21 19:07:08: ERROR[Main]:       ...inetest/minetest/mods/advtrains/serialize_lib/atomic.lua:112: in function 'load_atomic'
2022-12-21 19:07:08: ERROR[Main]:       /home/minetest/minetest/mods/advtrains/advtrains/init.lua:381: in function 'load_version_4'
2022-12-21 19:07:08: ERROR[Main]:       /home/minetest/minetest/mods/advtrains/advtrains/init.lua:263: in function 'avt_load'
2022-12-21 19:07:08: ERROR[Main]:       /home/minetest/minetest/mods/advtrains/advtrains/init.lua:645: in function 'load'
2022-12-21 19:07:08: ERROR[Main]:       /home/minetest/minetest/mods/advtrains/advtrains/init.lua:586: in function </home/minetest/minetest/mods/advtrains/ad
vtrains/init.lua:575>
2022-12-21 19:07:08: ERROR[Main]:       /home/minetest/minetest/builtin/game/register.lua:431: in function </home/minetest/minetest/builtin/game/register.lua
:417>
This is after a downtime of like nearly a week and a lot of logs and a full /home disk because of the log spam. How to solve this?
From my limited understanding of serialize_lib you should consider restoring from a backup. Your advtrains_core.ls file appears to be empty.

(Note: definitely restore every Advtrains-related file from the same backup. Otherwise things can get out of sync.)
Then I am happy I got one backup from the world...
Working on mtctl ---- Check my mod "Doorbell" -- Stay safe

W3RQ01
Member
Posts: 157
Joined: Sat Nov 28, 2020 06:33
GitHub: W3RQ01
In-game: Dario23 or W3RQ01
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by W3RQ01 » Post

Hi everyone,
In the last few weeks i've been trying to make some liveries for the moretrains_intercity mod. I am pretty happy about the results of the ones i've made. What do you think?

1st livery: replica of the RegioJet wagons (1st and 2nd class, still wip)
2nd livery: replica of the OBB Intercity wagons (1st and 2nd class)
3rd livery: replica of the InterCity Sun wagons (1st class only)
Attachments
screenshot_20221223_105721.png
screenshot_20221223_105721.png (436.43 KiB) Viewed 4595 times
screenshot_20221223_105705.png
screenshot_20221223_105705.png (576.46 KiB) Viewed 4595 times
screenshot_20221223_105643.png
screenshot_20221223_105643.png (352.77 KiB) Viewed 4595 times
OneUnitedPower

User avatar
Blockhead
Member
Posts: 1688
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by Blockhead » Post

W3RQ01 wrote:
Fri Dec 23, 2022 10:03
Hi everyone,
In the last few weeks i've been trying to make some liveries for the moretrains_intercity mod. I am pretty happy about the results of the ones i've made. What do you think?

1st livery: replica of the RegioJet wagons (1st and 2nd class, still wip)
2nd livery: replica of the OBB Intercity wagons (1st and 2nd class)
3rd livery: replica of the InterCity Sun wagons (1st class only)
All of them like nice, good work.

About the 1st: Nice, you got the "Vehrkehrsgelb" yellow-orange colour perfect.

About the 2nd (ÖBB) ones: the umlaut on the Ö is important, or you can substitute OE in its place wherever you can't/don't want to use the proper umlaut. We wouldn't want to upset the German-speakers! Also maybe I'd make the red on the roof of that wagon slightly more saturated, it's very bright IRL.

About the 3rd: I couldn't find what this is a reference to, though I do like the design.

AdvTrains supplemental on ContentDB

The rollout of AdvTrains trains to ContentDB has begun, with mods that are in a good state for now. Some others may see an update or two on git before they head to ContentDB.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

W3RQ01
Member
Posts: 157
Joined: Sat Nov 28, 2020 06:33
GitHub: W3RQ01
In-game: Dario23 or W3RQ01
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by W3RQ01 » Post

Blockhead wrote:
Fri Dec 23, 2022 12:48

AdvTrains supplemental on ContentDB

The rollout of AdvTrains trains to ContentDB has begun, with mods that are in a good state for now. Some others may see an update or two on git before they head to ContentDB.
Maybe you could make the request for the NY subway or the Orient Express as those are the ones in a better condition imo.
Also I invite everyone to contribute to the repositories at Advtrains Supplemental by reporting bugs, opening PRs ecc...
OneUnitedPower

Post Reply

Who is online

Users browsing this forum: No registered users and 75 guests