PDA

View Full Version : Window Management and arbitrary sizes



Pentazer
November 10th, 2020, 18:00
Why in the world does fantasy grounds unity assign arbitrary and random window sizes to any new instance of anything you create?
I've got 70 new image assets I need to import to a campaign that already has 200 existing image assets. I can't do a bulk import because that's going to duplicate 200 of the 270 images. So that means I have to manually import 70 image assets individually and assign them to the arsenal of items I have to create.

The problem is when I create a base item template and just copy it over and over, changing what I need to for each item, for some INSANE reason fantasy grounds applies an offset, moving the new window to some random near by location and I cannot auto-arrange all windows. I desperately need to be able to set window template sizes. such as all character windows are "this size when created" and the same goes for any items and every image. Again, for some reason every image I import to the campaign gets a random position and random size in FGU even though every image is exactly 500x500 pixels and I made sure of that.

How do I make sure new images, windows and entities all have a fixed size and location?

Zacchaeus
November 10th, 2020, 19:26
I'm not sure I completely understand. I've just opened up a bunch of stuff and the windows for NPCs, races etc open in the same place and the same size - unless I have moved them to somewhere else. But on first opening everything that I've opened more or less appears in the centre of the screen. Opening images from the image list also opens images centre screen. I don't have a bunch of exactly the same sized images to open to see what your issue is unfortunately but my testing would seem to indicate that everything should more or less open centre screen. But I think I'm not really understanding what it is you are doing in order to try and replicate your issue.

Pentazer
November 11th, 2020, 14:14
Sorry, let me elaborate.

As I add new images to the campaign folder outside of FGU, I have to import those images, one at a time, into the campaign using FGU. Every image is 500x500 and when I go:
Assets > Images > campaign folder data
And then refresh the asset list, it brings forth all the new art, but that art is not actually in the campaign, it's just in the asset list. So I have to open each image individually which shows as a preview window. The preview window is always the same size and always in the middle of the FGU desktop, which is fine. So I click "Import to Campaign" and it creates the actual image entry for the campaign. This campaign image will be unlocked by default but will always be a random size and location which I have to resize and fix the aspect ratio of the window for, to a box, every single time and desperately try to align each image to overlap so they appear in exactly the same place from now on.

Likewise, when I'm in the item tables and I create a new item to use as a copy-base this time may be "WEAPON" and it will have all the universal parameters of whatever set of weapons I'm creating, in this case, we'll say 30 different types of guns. All the guns have at least some identical properties to them so all I do is copy this weapon over and over, change the features that need changing, add the unique art asset mentioned above to each one and write a description to each one. The problem is, just like the image, when I create a new copy of the "WEAPON" the new copy is offset, appearing in a different location than exactly where "WEAPON" was on the desktop. So I have to orientate and fix the shape of every window duplicate created so it has exactly the same dimensions and location as each other.

Once I fix each one, FGU remembers their location, which is good. But what drives me up the wall is when creating something the first time, FGU randomly positions and/or sizes it. What I'd like to know is how to at least force FGU to create all new window entities in place, not offset, move or resize anything, just have a default spot and size... But ideally I'd like to be able to tell FGU what each class of window is: "This is an image for an item," this is a weapon," "this is a character," "this is adventuring gear," and so on and whenever I or a player opens said entity, it will default to exactly the coordinates and size defined by that class of window.

Zacchaeus
November 11th, 2020, 14:42
To import images into your campaign. Open the Images and Maps folder and either click on Import file or Import assets. The first will import a single file and the second will import a folder full of them. So put the assets you want to import into the campaignname/images folder and use the import assets option to import all of them into the campaign at once. Or do it one at a time via the import files option (your images can be anywhere you like using this method). This is easier than importing into the campaign via the Assets > Image.

I can't reproduce your second issue. My image shows that I've made several copies of the Battleaxe and then opened all of them up. As you can see each one opened in exactly the same place all right on top of one another. Maybe a screenshot or two will help me understand the issue you are having.

Also there isn't a way to force FG to open anything at any particular size or location. The position and size of windows that have been opened are remembered and will open in the same place even after closing and reloading the campaign. New windows open in the centre of the screen at a size fixed by the ruleset.

Moon Wizard
November 11th, 2020, 16:41
To reset all the window positions to see where they open by default, you can delete the windowstate.xml file in your campaign folder.

Regards,
JPG

Pentazer
November 11th, 2020, 21:38
To reset all the window positions to see where they open by default, you can delete the windowstate.xml file in your campaign folder.

Regards,
JPG

OMG Thank you. This worked fantastically. While not an actual solution, it did clean up all the windows, for now.

I'm not sure I understand the image loading though. I've already got hundreds of images in the folder you're saying and if I bulk import, it will duplicate everything, which would be a disaster. I don't know what you mean by an import files option. The only import I'm aware of is opening an art asset and then clicking "import to campaign" from the preview window.

Zacchaeus
November 11th, 2020, 21:44
See screenshot.

It's even better now with the very latest update; you can multiselect files in that window rather than just one at a time - so that negates the problem of duplicates. And as I said the files can be anywhere you want to import in this way; they don't need to be in the Smiteworks/images folder.

Pentazer
November 12th, 2020, 15:12
See screenshot.

It's even better now with the very latest update; you can multiselect files in that window rather than just one at a time - so that negates the problem of duplicates. And as I said the files can be anywhere you want to import in this way; they don't need to be in the Smiteworks/images folder.

Hmm, interesting. I'll try this out on the next batch of assets I need to bring in and see how that pans out. Thanks.

Pentazer
November 12th, 2020, 18:06
41031
So I tried the import you suggested but it didn't actually import the file.
As you can see, I already have the image in campaign the folder, where it belongs, so when I try to import using the method you suggested, it says it's already there. Yet, the image does not show up in the image list as you can see.

Which means I'll have to manually import the image asset into the image list, which is part of the original problem. Additionally if I click the "create from campaign assets" button, it's going to import all the images in the folder on the left again, which will duplicate the hundreds of images already loaded into the campaign.

I don't understand how to bring in many images at once without having to do them one at a time to avoid creating duplicates.

Zacchaeus
November 12th, 2020, 18:20
You have two choices. Import files and Create from Campaign Assets. If your files are in the campaignname/images folder then use Create from Campaign Assets. If your images are elsewhere (including in the images folder in the top level of the FGData folder) then use Import files. If your images are already in the campaign/images folder then you'll get the error that you are seeing since the files are already there. So when you are wanting to add more images don't put them in the images folder inside the campaign but put them somewhere else and import from there using Import files.

Pentazer
November 12th, 2020, 18:35
Oh, okay. So if the file is outside the folder, when I import it, it will both move the file to the folder and create the image entity in the campaign?

Moon Wizard
November 12th, 2020, 18:41
Yes, that's correct.

JPG

Pentazer
November 12th, 2020, 18:43
Fantastic, thanks. I'll try that new process for the next batch.