News:

Simutrans Chat Room
Where cool people of Simutrans can meet up.

Helping maintain and update the pakset

Started by Spenk009, November 05, 2014, 04:20:00 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Spenk009

I'm looking to help update the pak to encorporate some newer features available in the std pak.britain, since in some aspects (half-height, lakes,...) the experimental version is a bit behind.

What tasks are on hand, that can be done externally and then encorporated automatically? Are the two previously mentioned features pak or program dependant?

I've thought of doing this and that on the Experimental source, but I still lack the depth of knowledge within the code to be helpful yet.

jamespetts

Hello! Thank you very much for your offer of assistance. I have done very little these past few months as I have been preoccupied with moving house, which I am still in the process of doing. Hopefully, I will be able to be more actively involved again when I am fully set up in my new home. However, in the meantime, your assistance is greatly appreciated.

However, the situation is somewhat complex. Are you familiar with Github? There are currently two branches for Pak128.Britain-Ex on Github; one that is similar to the current released pakset, with a few changes, and one which is based on the next version of the Simutrans-Experimental executable that has a very large number of changes, including half-height support. Half heights are not supported in the current version of the Simutrans-Experimental executable, which itself lags behind Standard (in large part because there is more available programmer time for Standard than Experimental). This latter version of the pakset is the one that is in active development, as, given my limited time (even when not moving house) compared to the extremely large list of things that need to be done, I thought it more efficient simply to work on the branch that is ready for the next version rather than have a very large amount of time repeatedly consumed by branch switching and merging that would be necessary were I to separate meticulously each feature that is and is not supported by the latest executable version and put them on separate branches. The result is that nearly all the recent changes, whether they depend on the latest executable or not, are in the half-heights branch on Github. That is the branch on which you will probably find it beneficial to work, although you will not be able to use this compiled version without also compiling from source the latest Simutrans-Experimental binaries from the "way-improvements" branch on Github of the executable.

One of the first things that it would be very helpful for you to do is to fix the graphical errors with the icons of some types of bridges caused, I think, by the icon field pointing to the tooltip rather than the icon graphic for the relevant type of bridge. Secondly, it would be very helpful to merge recent additions to the Standard version of the pakset present on Github, but one should be careful with this, as a number of new things either need extra data to work with Experimental, or are balanced differently in the Experimental version of the pakset and will need adjusting on merging (or, indeed, both). The prices/costs of most items are not fully balanced and will need rebalancing in depth at some point in the future (but this will be a gargantuan exercise only worth undertaking when numerous extra features in the code affecting balance and making the balancing process easier have been implemented), but other things such as vehicle power, for example, are sometimes balanced differently in Standard than Experimental (the latter tending to prefer realistic figures).

The best thing, I think, to do is for you to identify some things of the above descriptions that you think you can do, describe in this thread what you plan to do, and we can discuss what, if any, adjustments to things incorporated from Standard need to be made.

Apologies that this is a rather more convoluted response than you might have hoped, but in the circumstances that I describe, that is rather unavoidable; your offer to help really is very welcome, however, especially given that I have had little time of late to do much work on this myself. Do let me know if anything is unclear, and thank you again.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Spenk009

Hi, the answer is exactly as I expected it and less convoluted than you think it sounds. The development and caretaking of the game and its content is a hobby for us all and I'm heavily impressed at the effort and time invested by all here. Good luck with the moving, these things always take far more time than anticipated.

I'm fairly new to programming, using my time off to give things a better look and seeing whether it's something that suits me at all. Compiling the binaries according to VS' guide has worked out for me so far as to getting most things working. And without a proper guide to doing the same for Experimental, I'd like to see how the usage based maintenance costs of ways can be implemented. Mainly by using the block reserving feature to add the total vehicle weight to the tiles of the block. Maybe in a few weeks

That said, keeping an eye on vehicles and balancing areas does sound like something non-coding I could do. Boats especially could see some use of the monthly upkeep. The bridge thumbnails I can do too, are they mid section, half size, aligned 2 pixels from the left and bottom, and on a transparent backdrop? Branch access to these may be necessary then...

jamespetts

Quote from: Spenk009 on November 06, 2014, 10:19:29 PM
Hi, the answer is exactly as I expected it and less convoluted than you think it sounds. The development and caretaking of the game and its content is a hobby for us all and I'm heavily impressed at the effort and time invested by all here. Good luck with the moving, these things always take far more time than anticipated.

Ahh, yes, it is always the way. I have bought the house, but have not moved in yet as there are things that need to be done to it. I am somewhat of a perfectionist, so these things take longer than they might take others. Something similar might be said about Simutrans-Experimental, too, except I haven't the option there of hiring in others to do the work for me.

QuoteI'm fairly new to programming, using my time off to give things a better look and seeing whether it's something that suits me at all. Compiling the binaries according to VS' guide has worked out for me so far as to getting most things working. And without a proper guide to doing the same for Experimental, I'd like to see how the usage based maintenance costs of ways can be implemented. Mainly by using the block reserving feature to add the total vehicle weight to the tiles of the block. Maybe in a few weeks

Have you managed to get the way-improvements branch compiled yet? If so, you are making good progress.

As to use based maintenance costs of ways, you would be better off doing this without reference to the block reserver. The block reserver is not used for all types of vehicles (road and water vehicles do not use it, for instance) and a block reservation may be set and cancelled without a vehicle actually passing. Far better would be to add way maintenance based on the vehicle's axle load every time that the vehicle passes over it: this will also be much simpler to code, as the block reserver is very complicated.

QuoteThat said, keeping an eye on vehicles and balancing areas does sound like something non-coding I could do. Boats especially could see some use of the monthly upkeep. The bridge thumbnails I can do too, are they mid section, half size, aligned 2 pixels from the left and bottom, and on a transparent backdrop? Branch access to these may be necessary then...

The bridge thumbnails are indeed as you describe: the problem is that these thumbnails are used instead of icons in some cases. As to branch access, are you familiar with how Git normally works? You can create your own branch on that from the existing public repositories without anyone's permission, then I can merge your branch(es) back into mine.

As to the boats and monthly upkeep, feel free to add this if you wish, but bear in mind that this may be wasted as the whole lot will have to be redone from scratch when full balancing is done.

Thank you again for your interest in helping with this: it is much appreciated.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

jamespetts

I have split the continuation of this discussion into the overhauls and renewals topic in the development forum, as that was discussing mainly new code features, whereas this topic is really about maintaining the pakset.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Spenk009

I have been grinding my teeth at MSVC, installing 2013, then 2010, then 2005 and finally 2008. Getting the VC++ Include Files working has been a challenge as most sources are scattered over forums and ftp servers. Nevertheless I believe to have almost compiled my first Makeobj.exe. I am stuck here, down from 25 errors to one:

1>vehicle_writer.obj : error LNK2019: unresolved external symbol "public: void __thiscall imagelist3d_writer_t::write_obj(struct _iobuf *,class obj_node_t &,class slist_tpl<class slist_tpl<class slist_tpl<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > const &)" (?write_obj@imagelist3d_writer_t@@QAEXPAU_iobuf@@AAVobj_node_t@@ABV?$slist_tpl@V?$slist_tpl@V?$slist_tpl@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@@@@@@Z) referenced in function "public: virtual void __thiscall vehicle_writer_t::write_obj(struct _iobuf *,class obj_node_t &,class tabfileobj_t &)" (?write_obj@vehicle_writer_t@@UAEXPAU_iobuf@@AAVobj_node_t@@AAVtabfileobj_t@@@Z)
1>D:\Coding\simutrans-experimental\Debug-makeobj\Makeobj.exe : fatal error LNK1120: 1 unresolved externals


Suggestions are welcome. Also compiling the Release - Not SDL (Is this correct??) - gives around 35 errors that all stem from messages like this:

c1xx : fatal error C1083: Cannot open source file: '.\simdings.cc': No such file or directory


Have I missed out on adding some Standard Simutrans to the soup?

jamespetts

Ahh, welcome to the world of compiling! It is difficult to get started, I know. You should probably try MSVC 2012 and use the project files on my Github repository, as that will set you up in the same way as I am set up.

As for your error, I suspect that you may be missing an include file, but I am afraid that I do not off the top of my head know which one. And, yes, do not try to compile the SDL version for Windows; that version never worked as well and I gave up long ago trying to support that as well as the GDI version.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Spenk009

Every version complained about different things in different files being from the wrong year. I'll give the 2012 version a go, it's the last one I haven't tried. If all include files I can find don't work, I'll mention it again.

What's the difference between the BG and normal version?


jamespetts

The BG version is one that Bernd Gabriel used that was configured to his settings: I suggest using the normal one, as that is what I use.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Spenk009

MSVC 2012 is fairly happy it seems, but can't find sched.h. Looking through the folders neither can I, where schedule_list.h can be retrieved but it doesn't look relevant.

Do you know off the top of your head what Bernd's version does differently? Just curiosity, no real interest.

jamespetts

Hmm - there is no sched.h. Why do you think that you need one? I am afraid that I do not know what Bernd's does differently, although it may now be a little out of date. I suspect that the differences relate to locations of include files and the like.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Spenk009

Well my release compilation is asking for it:



With 15 references across the files, it seems fairly vital.

jamespetts

Ahh, this is a Pthreads thing. Pthreads is an open source multi-threading library that is used for multi-threading in Simutrans. May I suggest that you look up how to install Pthreads code, as I am not sure that I remember where to download the files or what files go where now.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Spenk009

The guide here or here assumed you knew where things went.

I only downloaded pthread.h and didn't get sched.h or semaphore.h from here. Build succeeded.

jamespetts

Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Spenk009

After adding the files, it spat out an executable. Coupled with the freshest pthreadVC2.dll and pthreadVCE2.dll. The loadsave_t::start_tag() seems to have a problem.



Nesting the executable in a folder with contents from an earlier installation yields no difference, only having essential folders neither and running it on its own won't work as the pthread**.dll files are missing. I'm slightly tired of these tech-support like baby steps, but the only options (obvious to me) are different files around the executable. Have I missed something vital?

jamespetts

To correct this error, delete settings.xml (or settings-debug.xml) file from the /My Documents/simutrans folder.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Spenk009

The next error on the path is the "No GUI themes found" error. Here is a good explanation to its fix, which is: "Give up and download a pre-packaged version." Ters points to this thread in this thread on a seemingly similar error.

This proceeds to the next error: "FATAL ERROR: gui_theme_t::init_gui_themes - Wrong theme loaded", so at least there's some feedback towards the direction of building. What theme am I looking for now? Creating a pak with Makeobj (via PakHelper) from the theme.src folder yields a 1kb size pak, which makes little sense to aim towards in themes.tab. Having any and all of the files in both "My Documents" and the program folder makes no difference.

jamespetts

Try downloading this and unpacking it in your /simutrans (program) directory.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Spenk009

Thank you very very much. The game starts now without any issues and I'm extremely happy to see the lakes and land value system in place.

Regarding the contents of the themes folder, I was missing the menu.standard.pak.

Next up is generating a up-to-date version of pakbritain, but I'll leave that for another day.

jamespetts

Excellent! Glad that it is working for you.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Milko

#21
Hello Spenk009

Quote from: Spenk009 on December 28, 2014, 05:31:32 PM
Next up is generating a up-to-date version of pakbritain, but I'll leave that for another day.

If you are using windows I made a script to compile the pakbritain http://forum.simutrans.com/index.php?topic=6482.msg111753#msg111753. The compiler is not official but I hope it can help you. In the past I have used often.
[EDIT: Add link]

Giuseppe

Spenk009

Thank you for the script, I'm not sure of where to put the file and which other files (I assume pthreadVC2.dll, pthreadVCE2.dll & makeobj.exe) should be added to folders.

jamespetts

You can change the makeobj folder by editing parameter.mos. I cannot remember the default location for it. You do not need the .dll files just for running makeobj, I think, but you will need them to run Simutrans.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Spenk009

Never knew you needed Python and Moscript for this whole thing. I'm pointing some things at the wrong directories I think.

jamespetts

Python and Moscript is only needed for the automatic building of the pakset. You can do it manually without, but it is very tedious.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Milko

Hello

Quote from: Spenk009 on January 15, 2015, 03:13:22 PM
Thank you for the script, I'm not sure of where to put the file and which other files (I assume pthreadVC2.dll, pthreadVCE2.dll & makeobj.exe) should be added to folders.

It's enought to put msvcp100.dll and msvcr100.dll in the same makeobj folder and my script will work.

Giuseppe

Spenk009

Guiseppe,

I finally got things working after messing about with the location of makeobj.exe in parameter.mos. Thank you very much for that, I have now built a 0.9.2 that only hung itself upon the creation of noise barriers (see attached image). This, I assume, is due to makeobj.exe being outdated or there being file errors in the GitHub fork.

The built pak will load until it finds no road files. Sourcing the missing files from Junna's 0.9.2J, yields the result of the game ultimately crashing without explanation. All in all, I regard the whole operation as successful, since theoretically a stable release is built (happily running 0.9.2J) and the pak generation works somewhat.

Cheers, Jeremy

jamespetts

Ahh, I had forgotten about the noise barriers issue. This was, I think, something that either Philip or Neroden had added in one of their own Github branches that was never fully merged with my Experimental repistory, although I cannot remember for sure now. Either way, the current working code does not have a noise barrier feature, and I am not quite sure what this code was supposed to do. All that you need to do to get the ways to compile is to comment out the noise barrier .dat file, or just delete it.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Spenk009

A screenshot of a freshly compiled Simutrans Experimental running 0.9.2!


Thank you again for the help, I'm glad I've made it this far.

Now to the idea I have as a simple starter project:

Changing the colours on the "Tracks" display on the map. The yellow for signals does not stand out very well from the white of normal tracks (but this is probably a good relation between the two). Also the electrification is still leaning heavily on Standard's idea of only one type existing. A variety of colours depicting the different types of electrification would be a nice addition for those who want a quick overview of what types exist where.

In karte.cc, under line 818, is the code that changes the pixels representing track to a certain colour. My understanding is that "way_constraints_t" or "way_constraints_of_way_t" keep this in a list that's built upon reading of the pak folder. So making a switch  or "else if" statement for each case of each integer representing another colour, would be my solution. simcolor.h is a clear guide here. I'd "#include way_constraints.h" and then use "else if" statements to determine the colour to display:

This gives the error that 'way_constraints_t': no variable declared before '-'

Being able to understand the German is really helpful. I might be a bit distracted from the matter for a week until I can get to implementing this. Sorry for the rambling about obvious and very basic stuff, but this is a world I'm amazed toeven begin to understand, the previous paragraph being halved by following up on my own arising questions.

Milko

Hello Spenk009

Very Well.

You used my script or script .MOS?

Thank

Vladki

Judging from the screenshot, there is something wrong with slopes. Roads on them seem to have half slope image but the terrain if full slope.

Sent using recycled electrons.


Spenk009

Milko - It won't run for me, but magically makeALL.mos does now.

Vladki - The test.sve is an old one, which seems to load fine and will be updated when a release comes nearer.

jamespetts

Spenk - when I get time in the next week or so, I will be implementing some massive translation patches from Standard into Experimental. This should clear up any confusion with German, but might interfere with your work if you use any of the German names that are going to be changed. See here for details.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Spenk009

James - I have no problem with German whatsoever. It just takes a second for me to run through different possible meanings for things like besch and sch. The intended change/update uses no components that I recognise as German. Can you explain which array(?) holds the different electrification types? I'd reference that and depending on the types of electrification change the displayed colour on the map.