Official Mod Code Error Thread - For Mod Authors

i tryed everything to “fix” it n same error n this is my 1st ALFIA mod so far

@apljee sorry, it just happens so often with mods that use UME, for instance I have never been able to play my Achievements@Consoles mod, but I am able to play my Movie Topics Mod

EDIT:

@kingofblox360 I took a look at your mod and noticed it tries to do this:

res =   LevelCalculator.getMissionLevel('A.I.') >= 3;

The problem is, A.I. isn’t a so-called mission (something that levels up with each game, such as graphics, world design etc.). The correct mission name is AI without any dots. If you didn’t add any custom code, then it is probably a bug in the UME. @alphabit can you verify this?


Original post:

[size=10]@kingofblox360 Have you contacted alphabit? He might be able to help you out.[/size]

I quickly looked at UME and tried to find something related to this(just out of curiosity :p) and this is actually caused by UME ._.
ze example; http://prntscr.com/3grxa9

1 Like

so can i recode it myself if so how?

Change the lines in the code.js file (in the folder called “main” of UltraEngineResearch) that say this:

res =   LevelCalculator.getMissionLevel('A.I.') >= 3;

to this (remove the dots):

res =   LevelCalculator.getMissionLevel('AI') >= 3;
1 Like

it wont let me open js file

use a text editor

like notepad?

yep. open it with notepad.

it wont let me save it

Do you have GDT opened when editing it?

nope

Got it! Just edited the main code of the JS. giving the link of the patch of my mod soon! Please standby!

EDIT: The download link is up and running! Download the patch now! Link: http://www.mediafire.com/download/hboooe0yehrwh23/UltraEngineResearch.zip - Patch 0.0.2a

ANOTHER EDIT: Sorry guys i might shutdown the download link of my VERY FIRST mod. The picture bug wont be erased. i tried restarting the UME, Re-install it and rebooting my WinXP Laptop. well thats it. im gonna shut down my FIRST mod after 1 week. Please standby.

Kind of stuck here… I want an event to trigger after GRID is researched, but I don’t know how.

Also, how do I make an already existing topic to go away?

Open up the event, there’s a tab that says something like qualifications or something along those lines.

There will be a drop down menu that you can select Lab Research, then a 2nd drop down will appear next to it and GRID should be an option.

That should do it.

1 Like

@Stian for your first question, I don’t know, but for your second question, you’d have to go into the game’s source code.

TypeError: Cannot read property ‘id’ of null
(file:///Users/TechGuru/Library/Application%20Support/Steam/SteamApps/common/Game%20Dev%20Tycoon/Game%20Dev%20Tycoon.app/Contents/Resources/app.nw/compressed/codeNw.js:1664)

Please help I can’t even play.

Use this trigger code:

trigger: function(company)
{
    return GameManager.company.researchCompleted.indexOf(Research.grid) > -1;
},

should work :slight_smile:

Don’t do that. It would cause errors and possibly screw up saves.

Hi and welcome to the forums clubby, we need more information to be able to help you solve that issue. Did you create the mod in UME? When does the error appear? If possible, posting your mod source code makes it easier for us.

1 Like