Okay, chalk that one up to JS syntax fail. The code you listed ought to be a plain value. You'd either need to assign it to a variable, or provide a function name to use it of course. It actually becomes a syntax error, however. So one of Code: var resetScale = function (scale) {api.arch.setIconScale(1.0) }; Code: function resetScale(scale) {api.arch.setIconScale(1.0) }
neither of the two have any effect. the game runs normall without any icon change i tryed it at scale 3.0 and 10.0 I know I'm the broken piece in the puzzle here but what am I missing?
Well, you do have to call the function you've just defined. resetScale(/* parameter not used */) Depending on where it's used, you might want to put it on model as well. self.resetScale = or model.resetScale = Depending on where it's being defined.
you're going to boop me on the head but here's what I tried: Code: function resetScale() {api.arch.setIconScale() model.resetScale = 10.0; } and Code: function resetScale() {api.arch.setIconScale() self.resetScale = 10.0; } at line 2455
There may be some confusion between functions and values due to the game's extensive use of Knockout. There are a lot of different ways to organize this. To just change it once, simply call api.arch.setIconScale(10.0) Since the api is already available everywhere, there isn't much benefit to putting stuff on the model, unless you want to start working with settings and keybinds. However, it might look something like this: Code: model.resetScale = function() {api.arch.setIconScale(10.0)} model.resetScale() I haven't looked into settings manager, but a basic non-manager implementation that used KO would look like Code: model.strategicIconScale = ko.observable(1.0) model.strategicIconScale.subscribe(api.arch.setIconScale) model.strategicIconScale(2)
I don't wanna have a settings entry for it. I just want to change in once in the code. Code: function resetScale() { api.arch.setIconScale(10.0); } I tried this. is this any better?
As long as you call resetScale() somewhere. Here is a quicky mod that will do it once in code, without danger of losing live_game hacks during build updates.
I was doing it in my own icon mod, plus am using notepad++ wich asks you if you wish to load changes to files first, so no risk of that and thanks ! giving it a read to see what I did wrong.
wow still can't believe it's one line. didn't know about that coui://ui/mods/modname/modname.js trick. that could have saved me alot of trouble testing a bunch of lines. was it @raevn who added that in? EDIT : realize that it's uber's original mod system with PAMM plugging into it somewhat now.
Yep, read mods/PAMM/ui/mods/ui_mod_list.js to see what it's doing with the modinfo.json paths. All the Uber scenes use this to fetch and eval those files. I'd normally have the mod code in a closure (function() {...})(), but there's no point here.
it's hard to find 1:1 aspect ratio, it's never ever perfect and this isn't the bit of code that Uber is using to do the icon resize evidently the pngs are shrunk down, then blown back up so obviously it doesn't get rid off the gitchy border and 1.0 scale isn't even 1:1 aspect ratio. the closest i got was 1.1 (numbers two spaces after the dot are rounded)
as a result of all this I won't be using this. the results are worse than with my bigger icons. Rule of thumb in photo editing : always downscale, never upscale I do have the icons ready for whenever UBER gets rid of the damn resize. I don't even understand why the Icons aren't part of coherent or something. they should exist in a 2D plane not a 3D one, the fact that they size up and down as you zoom out is obvious. I believe the icons being pixel perfect is important!
There is definitely some black magic going on with icons. If you over over an element in the debugger, all instances get the highlight effect. It's like they are grabbing the rendered bit of one element and redrawing it N times. The few experiments I made with cursors suggest that the size of the copy region is hardcoded, but I didn't make a thorough search through all the levels of CSS and DOM.
did you know that blackmagic is clusterfuck spelled backwards? ^^ damn. the more we dig, the grimmer it gets.
just shrink the damn icons down one by one and your done .. make a few tests and they are lookin acceptable
have a read up on the thread, look at the images I posted. take screenshots and compare no scaling to scaling. you'll see the amount of loss in data is unbearably high, just look at my pictures!