Iâll add a mod.allLoaded
event.
Oh, you mean that kind of window. facepalm
Yeah, youâll have to use divs To create an empty window:
$("#resources").append('<div id="myDialog" class="tallWindow windowBorder"></div>');
And to show it:
UI.showModalContent("#myDialog", {
disableCheckForNotifications: true,
close: true, //whether there is an X button that closes it
onOpen: function() {
//do something
},
   onClose: function() {
   GameManager.resume(true);
   }
});
Ugh.
I dunno if this doesnât work or I am just (âŚ), but itâs just like it was earlier, Iâm clicking anywhere and the game just freezes.
(sorry for going a bit offtopic)
It works for me⌠if you want to, you can send the code in a PM and Iâll help you.
Great, thanks!
Do you have an ETA for the workshop release, or is it too early to tell yet?
Noticed this and just wondering if support could be added or not, Is there a way to provide the folder name to mods, so say for whatever reason you download a mod and name the folder hippo2. Can you provide the mod which is actually hippo the folder url so it knows to find the files in hippo2? example:
var folderPath = "......"
GDT.loadJS(['mods/'+folderPath+'/source.js']);
But folderpath would be provided on your end with the correct folder name?
Just one more thing⌠(</Columbo>)
The function that generates the candidates when you hire staff is currently anonymous. It probably deserves to be exposed in some way. You could do that by just giving it a name, so we could override the entire thing, but it might also be useful to add events for it.
An event thatâs fired before returning the generated candidates, maybe âbeforeStaffChoiceâ or âbeforeHiring,â which passes to the event handlers the array of generated candidates, the budget ratio, and maybe that mersenne twister you create (why do you do that, BTW? Why not just keep using the company RNG?) would allow modders to append traits to staff without replacing the whole function. I was thinking it might be interesting, for example, to have staff members sometimes have a specialty in certain genres (so you might get, for instance, a designer whoâs particularly good with Action games). It would be pretty easy to implement with an event like that.
An event that fires after a new staff member is chosen could also be useful. I donât need it myself, though.
EDIT: Actually, on reflection, an âafterStaffChoiceâ event would be necessary for what I was thinking, since the properties of the generated staff members are manually copied to the Character object thatâs later created. Simply adding a property to that array wouldnât be enough, weâd need to store the information in the modâs data store. So, an âafterStaffChoiceâ event that passes, to the handler, the object from the generated candidate array which the player chose to be hired (which would include any of the properties we appended in the âbeforeStaffChoiceâ event), or nothing (if the window was closed without hiring a staff member).
Will do
Exposing:
UI._hireStaff(applicant)
: method that is called to add an applicant to the company and initialize the visuals.
UI._generateJobApplicants()
:returns the array of generated applicants.
And adding new events (GDT.eventKeys):
staffApplicantsGenerated:'gameplay.staffApplicantsGenerated',//data={applicants, settings, rng}
staffHired: 'gameplay.staffHired',//data={character, applicant}
staffFired: 'gameplay.staffFired'//data={character}
Event data will contain the generated applicants, the settings used to generate them and the rng in use.
The reason we use a separate RNG: We want that job searches are deterministic so you canât cheat by simply reloading the game. We donât want to save the applicants in data, so we generate them when the UI shows. The companyâs RNG state from the time we initiated the search to the time the UI shows is not deterministic because it depends on the players actions in the meantime. We thus store a seed when we first initiate the search and initialize a new RNG from that seed when we generate applicants.
Iâm also adding a new Sales.applyGridSales
method which is called every week to apply the sales. This should make it much easier to overhaul the sales logic for the grid system (you can then simply hijack that method). /cc @Stian
Fantastic! Thanks again!
Many thanks! I was literally playing with the code to make that, when I checked the forum
Will these changes be coming to non-Steam versions soon?
I got a super useful feature.
Add strings to translation through code. Instead of writing your very own localization, (@Darkly) you should be able to just write
nb.addString("police", "politi")
Also, could you please update your mod-API documentation to include the optional properties of GDT.addResearchItem
? (if there isnât any optional properties, ignore. But I seem to recall there being)
Letâs add Lab/Hardware researches (same thing, but targetZone changes) and is it possible to make custom offices and booths?
Would be easy to backport this from the UltimateLib. If someone wants to give this a go, we welcome pull requests. Otherwise it might take a while longer for us to get to this.
I canât use ULâs custom code until I ask @alphabit for that. I used UME to make a research but completing the research makes it useless then. @DzjengisKhan told me he added Lab Researches to the API himself one, a long time ago and now he forgot how to do it. He can help.
Could you add nb.addString("police", "politi");
please? Or would that be impossible?
Inside platforms, you have two groups of platforms.
Platforms in group a have their images in the images/platforms directory.
Platforms not in group a have their images in the images/platforms/superb directory.
Is there a reason behind this?
The ones inside the superb folder are not included in the lite version.