Error when using ExpansionPack mod

@LineLiar I’ve been encountering errors when trying to create a new computer via the hardware lab. It won’t allow me to progress past the initial template choice. So far, everything else works in the mod. This is the error message I receive:

Uncaught TypeError: Object [object Object] has no method ‘textfill’
(file://E:/Steam/steamapps/common/Game%20Dev20Tycoon/mods/ExpansionPack/source//CC_AddOn.js1928)
Please restart the game.

A screenshot of your mods folder would be nice. :stuck_out_tongue:

Apparently “new users” can’t upload pics :-\

I also get the same error every time i move the slider for the quality assurance budget for computer design

Also getting the same error.
but with a different line "ExpansionPack/source/CC_AddOn.js:2959"
No other mods are even installed.

Using UltimateLib 1.3.3
Maybe the ULib version conflicts?

We can’t help you unless you give us a picture of your mods folder. And if possible, a picture of the conflicting file.

1 Like

Hey guys

@lukiono @RevLong

You will find this thread useful;
http://forum.greenheartgames.com/t/official-mod-code-error-thread-for-mod-users/12560

Please list the following information to allow the mod authors to assist you further;

- Which OS you are using? e.g. Mac 10.7.5 // Win 7 Sp1
- Which Version of Game Dev Tycoon you are running? e.g. 1.3.9.
- Which Edition are you using? Steam, Windows Store or Standard?
- Have you used any mods or Save game editors? If so, which ones?
- What does the error message say?

Still can’t upload any pictures. But I can give a breakdown of the mod folder in text
Folders:

  • Mods
    • CheatMod
    • source
    • source.js
    • CheatMod.js
    • LICENSE
    • package.json
    • README.md
  • ExpansionPack
    • api
      • labResearch.js
    • source
      • ccimg
        • (images case 1V1 - 7V3)
      • img
        • (various images of consoles)
      • CC_AddOn.js
      • Search_AddOn.js
      • source.js
    • ExpansionPack.js
    • LICENSE
    • package.json
  • gdt-modAPI
    • api
      • events.js
      • persistence.js
      • platforms.js
      • research.js
      • topics.js
    • examples
      • img
        • (greenheartOne images)
      • examples.js
      • helpers
        • checks.js
      • LICENSE
      • modAPI.js
      • package.json
      • README.md
  • UltimateLib
    • css
      • checkbox.css
      • flot.css
      • message.css
    • img
      • (9 various UltLib images)
    • package.json
    • UltimateLib.js
    • UltimateSuite for GDT ReadMe.doc
  • _Modding Agreement.rtf

I figured out the problem. Kind of kicking myself for not realizing it earlier. I didn’t have the Steam game set to beta…

Heya @RevLong

That is not the issue :wink: The beta is currently unused and we would advise against using it.
Which OS are you using?

This how the primary folder for Game Dev Tycoon should look;
C:\Steam\steamapps\common\Game Dev Tycoon

And this is how inside the mods folder should look (mods will vary per user. This is my mod folder)
C:\Steam\steamapps\common\Game Dev Tycoon\mods

Switching it over to the beta did fix it for whatever reason. My OS is Windows 8.1 and I’m running the game via Steam. I’m also using the CheatMod simultaneously with the ExpansionPack mod. Those are the only 2 mods that I’ve downloaded (unless you technically count the UltimateLib package)

Switching to the beta branch also fixed the error for me on win7 sp1.

Ok Thanks for the feedback. That shouldn’t need to be activated. Although activating it may have force downloaded the files. If you get chance and want to help out more could you please now switch out of the beta (select none) and then restart your Steam client and let us know if the mods work or not?

The reason for this is that modding is not in beta and you shouldn’t need to do this to be able to activate mods.

@lukiono @RevLong

without beta it crashes. even a new install hasnt helped.

with beta no crash, but i see all 24 computer cases for choosing.

also the mods redownloaded and reinstalled. not better…
Only using the Better Error Mod, Ultimate Lib 1.3.3 and Expansion Pack.

this is the function that crashes my game…;

var updateComputerCost = function () {
	var modalContent = $(".simplemodal-data");
	var cost = 1E6;
	cost += getConsoleCosts();
	var value = modalContent.find(".budgetSlider").slider("value");
	var qACost = customEase(costSliderEase, 1, MAX_QA_BUDGET / 1E6, value / 100);
	qACost = Math.floor(qACost);
	qACost *= 1E6;
	cost += qACost;
	var costElement = modalContent.find(".windowCostLabel");
	costElement.empty().append($("<span>{0}</span>".format("Cost: {0}".localize().format(UI.getShortNumberString(cost))))).textfill({
		maxFontPixels : 20,
		maxHeightPts : 37
	});
	return cost
};

(CC_AddOn.js.js line 2949 - 2964)

Did you also try:

  • If you have the steam version of the game:
  • You should find a folder named LocalStorage located in
    c:\users\YOURUSERNAME\AppData\Local\Game Dev Tycoon - Steam
    Rename or delete or backup this folder (LocalStorage) before starting the game.

Also make sure to visit the Mod FAQ for further information in case you didn’t already: Official Modding F.A.Q

Once you removed / renamed localstorage, start the game (not the beta) without mods.
Does it work?

Now activate ExpansionPack (which should also automatically activate the mod-gdtAPI and the UltimateLib).
Does it work?

On the other hand, @DzjengisKhan, can u plz check the code? Seems that textfill is called on an undefined?

Even with a new save it crashes instantly when choosing to develop the custom computers from the lab.

anyone has the older versions from UltimateLib?
maybe the problem are there.
Edit: nevermind. tested with 3 older versions. no changes

i remember that the Computers has worked in January for me…

This is the error I get whenever I try to make a computer (Using Mac OS X 10.9.3):

Error Uncaught error. Please report this to support@greenheartgames.com: Uncaught TypeError: Object [object Object] has no method ‘textfill’ (file:///Users/matthughes/Library/Application%20Support/Steam/SteamApps/common/Game%20Dev%20Tycoon/Game%20Dev%20Tycoon.app/Contents/Resources/app.nw/mods/ExpansionPack/source/CC_AddOn.js:2959) Please restart the game.

Enabled Mods: [“gdt-modAPI”,“UltimateLib”,“InfoStatsMod-AbescoUG”,“UltimateAchievements”,“CK-percentager”,“CheatMod-kristof1104”,“CAMELOT-EXP-PACK”,“Updated Often so often”,“TweakMod-AbescoUG”,“e57bd2e2-607a-4b94-8f26-30507e0947cc”,“2341edef-c37a-49b2-9052-0362e4569b5f”,“31f7d174-3c66-4bbe-8304-507b96146c0a”,“2e17fcf0-98c9-4583-b36a-b1826be75b37”,“c6737986-2536-40d0-8e60-7e5601c47178”,“1c4ce25e-a78a-438e-b0ba-137e4be3659f”,“ExpPackMod”]