[WIP] Expansion: InfoStatsMod - 0.4.2

Thanks.

That means, I’ll stay on 01.01.1980 :smiley:

Y1 M1 W1 = 01.01.1980

I might consider handling the GameLengthModifier in one of the next updates, which is currently being ignored when calculating the date.

Trying to remember, I think we talked that it would be after the video game crash so likely 83 or even 86 (which is coincidentally the score on the pong poster) but I guess it would look much cleaner if you start with 80.

2 Likes

Interesting point, that also gave me an additional idea:

I could imagine making the start date configurable, so players can experiment which is the best setting for them.

The default value would be 1980 and changes would be allowed in a range between 1980 and 1986.

not much point to that, in my opinion. the change doesn’t have any substantial effect.

Totally agree. Absolutely no substantial effect on anything. It’s just for a friendly display of the date and simply senseless. Firlefanz, I know :wink:

Sure, I’ve switched off all mods except for those two. Now I know something odd is happening.

After switching off all other mods (including CheatMod, which was the only one working properly at this point), I started a new game and I got the same result. The weird thing is, CheatMod is still on. Even if I reboot the game entirely, it’s the only mod that appears to be working and it does so whether I’ve got it switched on in the mods menu or not.

Is there something you know of that could be causing this? I posted a crapton of screenshots in another thread recently, I can pull those up if you like. I’m starting to think I need to see screenshots of how someone else has their mods folder organised, I might have installed something incorrectly or something.

I’m having a bizarre display issue with InfoStatsMod - more a collection of issues, really. I’ve spent a while banging on the code, and I’m pretty sure by now that the problem has to be somewhere else in my system, but I haven’t got a clue where to look.

I am running Game Dev Tycoon version 1.4.5, installed from the Debian package. I am trying to use InfoStatsMod version 0.4.2, obtained from the tarball, installed by copying the InfoStatsMod directory from that tarball into the mods/ directory under my Game Dev Tycoon install location. This is the first version of InfoStatsMod I have tried to install or use.

Screenshots of the issues are presently (though probably not permanently) available here. They were made with a copy of InfoStatsMod which I have tweaked to use periods rather than commas in calls to formatMoney() and to say “rated” rather than “scored” in the “best game” notification, but with no other changes from the 0.4.2 tarball; the issues appeared even without those tweaks.

The issues include the following:

  • The mod’s config pages appear with a transparent background. This makes them hard to read.

  • The header of the “released games” table extends far beyond the right-hand side of the window, and does not scroll horizontally. As a result, some of the column names are not visible.

  • In the “released games” table, the column widths in the header do not match the column widths in the body. This makes it difficult to tell which column corresponds to which heading, and thus, what each column actually means.

  • The “platform details” window does not seem to display any useful information, and does not match the screenshot of that window available on the GitHub site. It also has at least one apparent graphical glitch, which is probably easier to see from the screenshot than by me trying to describe it.

  • The “game details” window (whether modal or otherwise) displays blank squares in place of the rating stars, and does not include most of the information shown in the screenshot for the same window on the GitHub site. Specifically, as far as I can tell, it does not include any of the three “tabs” in the bottom section of the window, or any of the information which would appear in those tabs.

Any idea what could be causing this, and/or how to get it working correctly?

First of all, thank you very much for the extensive feedback.
I was quite surprised to see how “bad” InfoStatsMod looks on your side.

I will probably need to set up a virtual machine with a *nix distribution in order to reproduce the behaviour and provide the necessary fixes. Everything seems to indicate that there are problems related to CSS / Styling on a *nix system.

Are u using Ubuntu? (I thought so, because you mentioned debian package).

Btw. if there are some changes you want to discuss (like the small tweaks you did) I’d be glad to implement what u need as soon as we have InfoStatsMod running smoothly on your system.

I’ll be at home this evening, and, depending if I fell asleep on the couch or not, I could look into it as soon as I’m there :wink: (in a couple of hours).

Again, thank you for your valuable input, and sorry for this “mess” on *nix. Tbh. I never tested it on it!

Cheers

I’m actually running Debian itself; I’m currently tracking testing (the upcoming jessie release), though I’m at least a week or so behind on the latest package versions.

If you need anything from me to help with this, just let me know what.

Note: A few months back, one of my brothers - who also runs Debian - tried what I’m pretty sure was the then-current version of InfoStatsMod, and although I didn’t see it in action myself he didn’t report any display issues. If it would help, I could probably find out the exact version he was using, and confirm whether it looks correct on his system.

1 Like

So. Back home now :smile:

Let’s try to find out what happens!

Just to clarify one thing: afaik there is no official support for mods on *nix systems. That being said, I suppose you’re implementing the mod by adding a <script...> tag on your own in the DefaultBrowser.html.

Before I start to install and poke around with Debian on a VM, I would like to understand what happens. Let’s go step by step:

Step 1

Please open the file InfoStatsMod_Core.js found at ./mods/InfoStatsMod/libs/ ./mods/InfoStatsMod/source/ (if you didn’t already do this, for the sake of simplicity, you should install / copy the InfoStatsMod files into such a folder).

Navigate to line 217 where there’s a function called self.embedCustomCSS = function() .
Inside that function, at line 230, watch for the line containing link.href = 'mods/InfoStatsMod/libs/'+css[i]+'.css';

Change the line by addin a ./ to mods so that it looks like this:

link.href = './mods/InfoStatsMod/libs/'+css[i]+'.css';

Reload the game and see if it works.

Actually, no. I just copied the InfoStatsMod directory into the mods/ directory under the Game Dev Tycoon install location; it showed up in the Mods list in-game, and started working, except with the problems already described.

I don’t have a libs/InfoStatsMod_Core.js, but I do have a source/InfoStatsMod_Core.js, with the lines you describe.

I made the suggested change, and tested; there was no visible difference in the major symptoms, the problems appear to be unchanged.

I then tried entering the absolute path, rather than using a relative path. With that change, the problems disappeared entirely, at least as far as I can tell at a glance.

This led me to wonder whether the game was trying to find the specified files relative to “the current directory” as determined by the game’s launch environment. To test that, I reverted to the original form (no absolute path, no leading ‘./’), changed to the game’s install directory, and launched again; the problems were back. That seems to indicate that my guess had been wrong.

Also, just to correct myself from earlier: apparently the brother who had InfoStatsMod working is actually the one who runs the game on Windows, not on Linux. So that wasn’t useful information to begin with.

Third edit: Moved new information to a separate reply, now that I can do that again.

Sorry for the wrong path I indicated. I have corrected it in my previous post. It should be pointing, of course, to source and not to libs.

So, you’re using now an absolute path in the embedCustomCSS function?

Sorry for not replying earlier; I tried to reply within half an hour, but apparently there’s a “three replies per thread for new users” limit. It suggests editing existing posts instead of replying again, and I did that, but I guess that doesn’t provide notification in the way a new reply would.

Transferring the new information from my previously edited post here:

Yes, at the moment I have an absolute path for link.href in embedCustomCSS(), and with that absolute path most of the observed symptoms went away. The “released game details” window was still missing quite a bit, but when I added absolute paths to a couple of other places (the :url value in getGameDetailsTabs in the same file, and the star-image files in source/InfoStatsMod_Utils.js) those started working as well.

The only other places in the source that I see that refer to the mods/ directory are in InfoStatsMod.js itself, and I didn’t end up needing to change any of those.

Hardcoding an absolute path isn’t a general solution, of course, but it suffices as a clunky local workaround for those who are comfortable editing JS.

Most forums have such a thing. Anti-spambots. :stuck_out_tongue:

It isn’t surely the best solution, especially if done manually. It definitely feels somehow clunky.

Nevertheless I came up with a quick solution that might help you out configuring the path quicker and a bit more comfortable (at least I hope so).

I’ve added two variables to the InfoStatsMod.js file, where you can set a custom base path from where all files are loaded.

CUSTOM_BASE_PATH_ENABLE allows to enable or disable the feature of using a custom base path.
CUSTOM_BASE_PATH is the custom base path in case that CUSTOM_BASE_PATH_ENABLE = true

Depending on the settings defined, you can see if and which custom base path has been set, in the mod’s game settings dialog [config] (please note that it’s a read-only setting):

If you are interested in giving it a try, just send me a PM with your email address, so that I can send you a test version.

2 Likes

I sent a PM about that several days ago now, but I’ve had no response that I can see. Did you not notice the PM, or have you just been busy?

Also, any chance of an explanation of exactly what information is meant to be provided by the Platform Details screens? I don’t have the vertical scrollbar that’s shown in the screenshot on GitHub, though that’s possibly because I don’t have enough total platforms to need one yet, and clicking on a platform highlights it but does nothing else. The only use I’ve found for these screens is as a way of helping me remember which platforms I haven’t released anything for yet, which is minor enough that I suspect there’s supposed to be more that I’m missing.

Sorry. Yes… I’ve been very busy this days with an unexpected project and have a lot of notifications to go through now.
I’ll try to go through all the stuff during the day. So expect an answer, soon.

2 Likes

Not Haveing the gui is it a bug?

nvm

Hello, I enjoy your mod alot, so thank you. I have this problem that when i click on an MMO to end it that I get an error and it breaks the game, freezing the time right there. This has happened twice now, both times to the second MMO that my company has made. Once it happens I can revert to a previous save but clicking the MMO will produce the same error. After the error occurs, even a game reload wont work. I know I am using more than your mod, but I believe all the mods say they are compatible with each other. I am posting this more to just let you know than anything else.

Error Uncaught error. Please report this to support@greenheartgames.com: Uncaught TypeError: Cannot read property ‘0’ of null (file:///D:/Steam/steamapps/common/Game%20Dev%20Tycoon/mods/InfoStatsMod/source/InfoStatsMod_Utils.js:566) Please restart the game.

Enabled Mods: [“gdt-modAPI”,“UltimateLib”,“CAMELOT-EXP-PACK”,“ExpPackMod”,“InfoStatsMod-AbescoUG”,“TweakMod-AbescoUG”]