Railworks Work
Other Sims Work
Work In Progress Blog
Copyright statement
LinkedIn profile logo

Category: Trainz

  • PPQG (for Trainz) – minor update

    PPQG (for Trainz) – minor update

    … Passenger Point Queue Generator, the program that took my site offline once.


    Its not often you hear a site taken offline for a program that well, does what its not supposed to. I spent quite a while developing PPQG (Passenger Point Queue Generator – for Trainz) and it’s suppose to help with randomising and creating queues for rolling stock for passenger trains. I might enhance this to include freight queues as well, as some of my projects also have freight queues (parcels) included. Not unusual for Railbuses.

    I wrote this about 8 years ago in Visual BASIC 6, yes, really, on the train to and from work and it took quite a while. Across several computers and never finished. The reason why I never considered it finished, is because I left a module unfinished and never went back to it. Yes, I use it a lot, I’ve offered it out with its source code on this site which was fine for a number of years, until suddenly, my site got shut down because of it – because it contained malware. Got it back online, hosted it on Google Drive and it looks like its been deleted again. I have scanned it and some sites saying its clean, some are saying it has malware.

    It looks like this, doesn’t actually do any file handling and its only 40KB long. I hope it’s bugless but it can probably be buggy accidently. (If you do find some, let me know please).



    So used VirusTotal and it says 3 out of 71 providers consider it to have a virus which isn’t bad news, it just means that there is a way and style of my code writing matches a pattern in a Trojan or Virus. After all, all virus scanners look for is patterns in the code, if it matches that pattern, its a false positive. This could also be related to the VB6 libraries and embedded code to identify it as a VB6 programs but without asking a question to why, I will probably never find an answer. Nor would they tell me how their virus scanners work, because of intellectual property and secrecies that could be used to beat the virus scanner. So with that in mind, I started thinking about completely re-writing from scratch, this time, I used Visual Studio Community edition and the skills I already learnt.

    The thing I find is that to understand the language as VB.net is vastly different than VB6 (the language structure is different and its more Object Orientated and its compiled rather than interpreted. I could develop it in C++ which isn’t beyond my capabilities, or C# or Java, just all 3 take a lot longer for me as I rarely program in those languages. When I go over to Linux, I might look at that, but then I may end up using GAMBAS anyway.

    ARRGHH - PPQG virus results.



    So, I started off like this on an old laptop that I was going to get rid of and ended up in use on my desk. (Dell Latitude E6430 ATG).

    PPQG in Visual Studio Community Edition

    To get the randomisation to work took…. ages! But I worked it out with little help from the internet, which shows that I understand the basic language structure. When I started programming, I had high expectations of myself, thinking an experience programmer would understand off by heart all the required libraries. C++ is a strictly typed language and my god, it can be hell to work with. (Actually, in the office, that is a point, I wonder if the other 2 capable programmers understand C++?) until one of my tutors at the time pointed out that there is 25,000 libraries from memory, approximately! Yeah, I can’t memorise 25,000 libraries and what they do, that would be nearly impossible. Its bad enough understanding union rules for train crew or understanding the limits what you can do on the infrastructure. I know the other 2 understand VB, but Visual BASIC for Applications (which I avoid due to its flexibility). One has a basic understanding of VBA and had to explain to them how the VBA IDE (integrated Development Environment) window, like debugging features – inserting break points and the intermediate window, which is VERY powerful and you can understand how the program is working. But the code? That’s something else. The other understands VBA to a deeper level than me. (Oh one understands I believe Python that I find it difficult to get on with and understands Blender, whereas I tried Blender and struggled.) I like structured rather than spaghetti code, so all my loops and decisions are always indented to which one I am applying my code to (good programming practise) and I was always taught “Do not use GOTO statements”, its not quite true, but yeah, avoid them. Your code is messy! I always use modules; they allow reuse and small code. Goto statements? Don’t. How to get into a mess quickly and have zero usability of code.

    On Err GoTo Hell.

    You may not understand that! Anyway, I think I topped out for PPQG VB6 at less than 500 lines of code. I’m waiting to find out how this one is doing, but you will need Windows 10/11 at least as I’m building it for .Net Version 8. I prefer 3.5 as it doesn’t need 8.0 or even 10. No doubt I’ll talk about more of its development over time.

    Russ the Roofer - does it leak? No it doesn't!
    Russ the roofer – does it leak? No it doesn’t!

    In other news

    You may of noticed I’ve done some changes to the site too, small ones on some pages. I finally found the problem with my templates, so I’ve locked the sidebar, footer and header which resolved most issues on most templates and there is a search bar now. I’ve also put some files up, I had a separate page that just directly linked to a Google Drive as I wanted a publicly accessible drive for all the stuff that I’ve not put onto a page, but that didn’t, so I went the manual way. I’ve got some sources to put up and yes, you can download them and do what you like with them. There will be more in the future. That came from my WIP server and if you are after something that isn’t on my site, just drop me an email, the contact me page should work now and I’ll send it over. I also plan to add some sort of feedback to the side bar, so I’ll see how that goes – more importantly, time. Considering I’m feeling like “Bob the builder” at the moment. “Can I fix it? No I f***ing can’t!”
    As well as – going around the country on the coldest week on record!


    Ticketless scroat

    Lets just say a Northern guard had a bit of a shock when I hid under a hood and a scarf covering my face, then presented them with my Southern ITSO card, my Staff ITSO card, my PRIV card and my PRIV rate ticket. – it was blowing a gale at -2°C. I had a good laugh, just the Class 150 I was on, (between Ribblehead and Salford Cresent) went from nice and toasty, to the time we got to Blackburn – (or was it Bolton?), it was bloody freezing.


    Yes, that is an Class 805 Evero, yes, that is Ribblehead, Yorkshrie. Unfortunately, I’m not friends with Class 800s now, one took me and a lot of passengers prisoner at Carlisle by refusing to release the doors on 5 out of 10 coaches, with loads of alarms going off in the cab as the train refuses to co-operate with the door release buttons. Considering I was a full fare paying passenger in that I actually brought an advance single on a Disabled Railcard.





    EDIT much later (next day in fact!):

    A partially wasted Sunday with little to do, I was able to get it working. Well, I say wasted, I did manage to rearrange my desk so it was more usable for my height. But, after a lot of head scratching and finding out why variables weren’t parsing, I managed to fix it:


    Only 4 or 5 hours to get back into it and produced something useful. VB6 skills are still relevant. (And I didn’t resort of Xojo – another BASIC IDE!) – hopefully, it’s easy to read. I can add a crap ton of comments if you REALLY want.

    (And yes, I’m that “old school” that I try to follow the Visual BASIC coding standards)

  • Did you know? (Trainz)

    Did you know? (Trainz)

    That the Trainz forum is now 25 years old today?

    They went live on the 01/08/2000 to promote what was Trainz Community Edition. I joined the forums on the 14/08/2000 looking for a train simulator that was more engaging than what I was using, that’s when I discovered after many hours of trawling through search engines (I can’t remember which one I used, Yahoo maybe? Google wasn’t on the horizon). For those in Trainz, if you noticed, my KUID author number (Koolthingz Unique IDentification) is actually a very low 30051. Yep, that low.

    Auran as it was back then, had a LOT of big plans for Trainz, digital downloadable content was thought of way back in 2002, but didn’t happen until much later. Despite being in the community for a long time, I’ve also only met 2 employees from Auran, I wonder what they are doing now? Ironically, that was in London Victoria way back in 2004. I should really visit n3v, but getting to Australia is a bit more difficult and possibly requires a long stay.

    One other thing, I was actually 14 when I joined, I’m now nearly 40! How time flies.

    Of interest, I’ve got a draft blog post as I write this of a very rare version of Trainz that I plan to update in the future, let’s just say this, its rare as it never was released. The NDA has long expired, so I don’t think I’ll come to any disrepute over it. All I will say is, that you will be surprised, it was talked about, it exists but never made it to market, it was abandoned almost just before it was released.
    I think it’s because the Apple Mac’s were going through their second transitioning stage, I can’t remember the exact reason why the plug was pulled. I also still retain the computer I was testing it on as well, it’s on the shelf of shame in my room,
    untouched from when I played with it years ago in 2 forms. Again, if I get a chance to talk about it and spend some time in my really packed diary to finish the post, I’ll explain more.

    Hopefully, I’ll finish it before Trainz turns 25 and it will be interesting to see if n3v still has the original source code, I don’t think they do.

  • The site looks like its getting bigger

    The site looks like its getting bigger

    All through looking through my hard drive. I know a lot of people have been looking for my content for years and isn’t available anywhere anymore – this is what this site was suppose to address, but while clearing out my hard drive and putting what is left as there is a lot of duplicates on said NAS/Hard drive, I came across this folder from a previous site:

    I had to edit some of the files out, but yes, that is a LOT I need to put up, in addition to what’s up already. This will take a long time to sort, so don’t expect anything to be instant (sorry). To add it and document everything, probably takes around 30 minutes an object – plus I need to validate and check it works on modern Trainz (TS2019+) which some items won’t. Pack it, etc.

    I also found a reskin file for the Class 141, so that will be uploaded ASAP, so if anyone wants a fiddle, be my guest. It will be the second source item on the site (finally). Then there is the issue of space. I may run out. If that happens, I’ll start hotlinking everything off the site or talk nicely to the owner, but I got 5GB and still got some way to go. For those interested, the size so far of what’s in that folder is:

    Ok, not as bad as I thought, but getting that way!

    Look out for more to add of older releases in the future. For reference, if I remember correctly, this was put onto a self hosted server. Yes, I had one of those in days gone by, Internet Information System 6.0 tied to an IP address and on 24/7, I could do it all over again as I have the equipment. Its just the time and knowhow as I would use Linux these days, with a VPN server for more fun. A good way to use up your capacity. The connection is fast enough, around 2.5GB/s fibre, but then its limited to the port of the computer – which is 1GB/s as it is an old Lenovo.

    Going off subject slightly, for those messing with PCs and have a network to yourself, I seriously recommend having a play around, but just for gods’ sakes! Isolate your computer! Its how you learn. Also remember, a new hole in the network is a new hole that introduces security risks.

  • Past work..

    I probably should talk more about my past and present work, yet these days, I generally don’t tend to.

    PiggiesSWT

    Here is an item that took me around about a month and a half to draw using Microsoft Visio, way back in I think 2008, I vaguely remember being either at college or uni at the time and it was meant to be a avatar for the Trainz forum, it was! So was it’s off springs (livery).

    If you want to use it, you have all right to do so, I’m not looking for money for it, unless you want to give me a donation which will be appreciated and I would say “you don’t have to give me credit”, it should be, its nice if you could give me credit, but you don’t have to.

    Just Right Click or Apple Click and save as.. depending on your OS (I use a variety, so its upto you).

Accessibility Toolbar