Making mods for PA is utter torture. Lemme rephrase. Making icons mods for PA is utter torture. There is no "press F5" to see results. You gotta restart the damn game and generate a new system and start an new game (or reconnect) every damn little change you wanna test ! and when you're trying to figure out what is mode down to the tiniest of criteria icons HAVE to be saved in to not end up blurry.... there are A LOT of things to test. Make icons and all the rest of the files currently non-refreshable ingame refreshable ingame. LIKE THE REST. FOR THE LOVE OF ALL THAT IS GOOD AND HOLY. (I'VE BEEN ASKING FOR THIS FOR TWO YEARS)
Try to reload the icons scene in the debugger via F5 Also moving this to mod support and giving it a title that has meaning.
Atlases don't have pageIds to pass to the reload call. There is now an uncached:// url scheme that could be modded in, although it may still need a page refresh.
I can't get it to work so far. I opened the debugger after starting up my game. I opened up the "live game" scene and pressed F5 but no change to my current changed icon. tried "special icon atlas" and a number of others as well.
You need to open the icon atlas something scene. You can tell you have the right scene by looking at the html. The strategic icon scene has lots of images with the icons in it and when you hover over them in the debugger you will see it ingame.
I'm on the "icon atlas" scene as soon as it's opened all icons are with a grey transparent box over them. but I can't refresh them.
Ah... that works in Windows but not OS X. @tatsujb you are on Linux if I recall? Probably same issue.
it only works if you refresh "planetary Annihilation Main" but that send you back to the main menu. that doesn't make me gain any time. I want to be able to refresh icons ingame.
Hmm. I tested and found that when I change an icon and reload the scene it removes all icons. Somethings seems to break and it doesnt show any icons at all anymore. The icons themselves in the scene are replaced though, but the renderer seems to not like it. It'll work though if you instead us js inside the scene to reload only the images, considering how it easily reacts to the mousehover effects of the debugger.
$("img").each(function(elem){ $(this).attr("src", $(this).attr("src").split("?", 1)+"?r="+Math.random()) }); Change the image and then run that javascript in the scene. That works fine for me.