Trying to resolve some modding woes, mostly graphical

For those of us who are curious and like to poke around in the game's data files and scripts as well as glitching. Caters to anything from unit/building stats to level data to telling how to glitch and stories of game errors.
Post Reply
User avatar
medicineman
Firefly
Firefly
Posts: 24
Joined: Fri Sep 14, 2018 3:15 am

Trying to resolve some modding woes, mostly graphical

Post by medicineman » Tue Jan 29, 2019 2:52 am

Hey guys, I've about wrapped up testing my campaign and have a couple of headaches (mostly graphical) left to solve before releasing it. First of all, I'm using the UA no CD crack (I had the disc and it's mysteriously disappeared), and am using the UA.exe not UA_xp.exe.

- First pertains to editing the main screen. I've successfully edited the .iff's in UA before using Paint Shop 8 but now when I try to edit the main menu background, if I change ANYTHING, it goes completely blank. Like I put one red pixel in the corner (using the same palette) and it goes black. On a related note, I've tried to edit the done.iff, and instead of a black screen, nothing changes. Yet the main level map was something I edited a long time ago and that's still in its edited form, working fine.

- Does anyone know where the icons for faction 0 (neutral) are stored (in-game HS, enemies, etc)? They appear the same as faction 7 but editing them does not change the icons. Seriously, I recolored every red square I could find in the .ilb files and nothing.

- Finally, how do you edit the icons in the MB screen? I'd like to make the host station icons and faction colors consistent with what's in the game... My thought was to edit set46/H_MB.ilb (since they're exactly the same as what I'm trying to edit) but nothing changes. As a sanity check, I also tried editing this in the dataXP/set46 folder (even though I'm using UA original) and that doesn't have any effect either.

I guess there's a common theme - are some of these graphics stored somewhere else (say, in the .exe file)? I don't recall having pallette issues a while back as I managed to change one color in the palette to make one of the sector colors bright purple and that works absolutely fine in-game. Has anyone else edited any of these images?

I'd be grateful for any help on this. I'd like to add new MB maps too (I've already designed them but the MB screen doesn't load if I use the new ones, regardless of whether or not the palette is the same as the other graphis) but I think I'd better fix these other issues first and go from there.

Please let me know if you need other information.

User avatar
CharlotteLabyrinth
Turantul 1 (Veteran)
Turantul 1 (Veteran)
Posts: 423
Joined: Thu Mar 01, 2012 3:00 pm
Location: Schloss Charlottenburg..?

Re: Trying to resolve some modding woes, mostly graphical

Post by CharlotteLabyrinth » Fri Feb 01, 2019 9:27 am

Hello medicineman,

medicineman wrote:
Tue Jan 29, 2019 2:52 am
- First pertains to editing the main screen. I've successfully edited the .iff's in UA before using Paint Shop 8 but now when I try to edit the main menu background, if I change ANYTHING, it goes completely blank. Like I put one red pixel in the corner (using the same palette) and it goes black. On a related note, I've tried to edit the done.iff, and instead of a black screen, nothing changes. Yet the main level map was something I edited a long time ago and that's still in its edited form, working fine.
There are many possible reasons for this, may I ask which rendering mode you're currently using?

According to this wiki page:
Wiki Page wrote:confirmation needed.

The ILBM files used by UA have 256 indexed colors. The files contain their own 256-color palette but it is apparently only used in hardware rendering mode. In software rendering mode, the default palette is used instead.

To make sure that the graphics look the same and are displayed properly in both hardware and software rendering mode, the files should always be edited according to the default palette. If needed, the default palette can be loaded from the stock image files. It's also stored separately in the Standard.pal file. See color palettes article for more information about palettes.

It's important to make sure that the file is saved with the correct palette after editing. Additionally, if the image is converted into another color mode, special care should be taken when converting it back to 256-color mode.

The transparent color used in many interface graphic files is apparently recognized by its RGB value which is 0xFFFF00. It's not known if it's also recognized by its index under certain circumstances.
Consequently, the game graphics are 100% compatible in both software/hardware rendering modes only when the colours from the default palette are used.

I also believe there are several saving options or settings to be considered which may affect the end results of the edited images, but these may vary between different graphics editors.


medicineman wrote:
Tue Jan 29, 2019 2:52 am
- Does anyone know where the icons for faction 0 (neutral) are stored (in-game HS, enemies, etc)? They appear the same as faction 7 but editing them does not change the icons. Seriously, I recolored every red square I could find in the .ilb files and nothing.
There are text-based graphics definition files which are responsible for designating coordinates assigned for each icon in the game. Our wiki pages may contain more info about this.

Reviewing one of my old post reveals that the faction 0 icon definitions in 'MAPVHCL#.FON' files share the same coordinates with 'dummy' icons assigned for faction 7.

Adding new icons into the relevant graphics files and then adjusting their new pixel allocations accordingly from the icon definition files would be necessary.

Related Thread


medicineman wrote:
Tue Jan 29, 2019 2:52 am
- Finally, how do you edit the icons in the MB screen? I'd like to make the host station icons and faction colors consistent with what's in the game... My thought was to edit set46/H_MB.ilb (since they're exactly the same as what I'm trying to edit) but nothing changes. As a sanity check, I also tried editing this in the dataXP/set46 folder (even though I'm using UA original) and that doesn't have any effect either.
H_MB.ilb is the correct file to modify for mission briefing elements. As you may know, 'DATA\SET46' for the original UA and 'dataxp\Set46' for the Metropolis Dawn Expansion.

Normally unsupported colours will be filtered out during MB display; however, if no icon changes are visible at all then it definitely sounds abnormal...

Please note that the host station icons appearing on the in-game map screen are not identical to the ones appearing on the MB screen, the in-game HS icons are stored at 'MAPROBOS.ilb' file in 'DATA\FONTS'.



I'm afraid that I may have missed out some important details, and I'm sorry if there are any mistakes here. It's been a while since I edited the graphics files so my memories could be wrong...
;--------------------------------------------------
;
; Vielleicht der niedlichste Hubi, Knuddel.
;
;--------------------------------------------------
„ Helfen - Wehren - Heilen “

Personal Declaration: I always use different usernames across different websites. Hence if you ever see my username is being used outside of Stoudson Corporation, I absolutely have no affiliation whatsoever with that!

Ormu
Turantul 1 (Veteran)
Turantul 1 (Veteran)
Posts: 867
Joined: Fri Dec 26, 2008 4:59 pm
Location: Finland

Re: Trying to resolve some modding woes, mostly graphical

Post by Ormu » Fri Feb 01, 2019 8:59 pm

CharlotteLabyrinth already posted plenty of useful information about the graphics. The wiki article is based on my notes and it may not be 100% correct. Editing according to the default palette is the safest option anyway. Be careful when saving the images. Any difference in the format that is not supported by UA may cause serious problems.


However, changes not appearing at all strongly sounds like a problem with the file paths or permissions.

Have you, by any chance, reinstalled UA (into another location) without uninstalling it properly? If the registry key of UA is present, it will override the game data paths defined in assign.txt.

So if you installed the game using the installer, then "reinstalled" it by dumping the game contents into some other location, the game will still load the data from the original location unless it was uninstalled properly. (This does NOT apply to UA Source as it does not use the registry.)

If you are using Windows Vista or newer, lack of permissions in the Program Files folders may also cause problems. Do you see the changes if you open the modified files in an editor? Is there anything in VirtualStore? See:

https://en.wikipedia.org/wiki/User_Acco ... l#Features
Image Im in ur base, stalkin ur hoststation


Not all Ormus are mine. When in doubt, please ask...

User avatar
medicineman
Firefly
Firefly
Posts: 24
Joined: Fri Sep 14, 2018 3:15 am

Re: Trying to resolve some modding woes, mostly graphical

Post by medicineman » Fri Feb 01, 2019 9:19 pm

Ok yes, UA has been through several installations, folder relocations and installations/uninstallations of MD. So that could definitely be a factor. The last time I edited the graphics before 2018 was in 2010, so I can look into that and try placing it in its original folder. I'm using Win XP.

I'll investigate the rendering mode - I believe I'm using hardware (I don't see the "flash" palettes that light up the screen anymore). This is what you set from the options menu, right? When I edited the graphics last, I changed one of the sector colors to something not in the standard palette and it worked fine.

Do folks have a preferred program for editing graphical files? I've been using PSP8 and it hasn't given me problems up until revisiting this project recently. I'm thinking moving the files around may be the culprit here. It might be worth clearing out the registry entries left over since I'm using the damn crack anyway. I'll investigate that and read the wiki articles a bit more thoroughly (I guess I missed some of this info) and let you guys know how it goes. Thanks!

User avatar
CharlotteLabyrinth
Turantul 1 (Veteran)
Turantul 1 (Veteran)
Posts: 423
Joined: Thu Mar 01, 2012 3:00 pm
Location: Schloss Charlottenburg..?

Re: Trying to resolve some modding woes, mostly graphical

Post by CharlotteLabyrinth » Sat Feb 02, 2019 7:38 pm

medicineman wrote:
Fri Feb 01, 2019 9:19 pm
Ok yes, UA has been through several installations, folder relocations and installations/uninstallations of MD. So that could definitely be a factor. The last time I edited the graphics before 2018 was in 2010, so I can look into that and try placing it in its original folder. I'm using Win XP.
Both Urban Assault and Metropolis Dawn are extremely registry-sensitive, and so as Ormu pointed out the problems are most likely caused by obsolete registry keys… Any remnants can potentially cause undesirable effects if left unchecked, since they may still be used by the game to determine from which directory it loads its files and many other things.

medicineman wrote:
Fri Feb 01, 2019 9:19 pm
I'll investigate the rendering mode - I believe I'm using hardware (I don't see the "flash" palettes that light up the screen anymore). This is what you set from the options menu, right? When I edited the graphics last, I changed one of the sector colors to something not in the standard palette and it worked fine.
Yes, the rendering mode can be changed from the options. There are some special graphics effects (such as the 'colour inversion' effect) that are only visible in software rendering mode. If hardware rendering mode is used the game can display much wider array of colours, but anyone who uses software rendering mode will not be able to see those colours in their game.

medicineman wrote:
Fri Feb 01, 2019 9:19 pm
Do folks have a preferred program for editing graphical files? I've been using PSP8 and it hasn't given me problems up until revisiting this project recently. I'm thinking moving the files around may be the culprit here. It might be worth clearing out the registry entries left over since I'm using the damn crack anyway. I'll investigate that and read the wiki articles a bit more thoroughly (I guess I missed some of this info) and let you guys know how it goes. Thanks!
I'm not sure which graphics editor is most widely used among the community, but any software that supports modifications of UA graphics formats would suffice. From what I've observed, Ultimate Paint, XnView, or IrfanView seems to be quite common. There are probably some wiki pages which contain more detailed statistics or suggestions for this...
;--------------------------------------------------
;
; Vielleicht der niedlichste Hubi, Knuddel.
;
;--------------------------------------------------
„ Helfen - Wehren - Heilen “

Personal Declaration: I always use different usernames across different websites. Hence if you ever see my username is being used outside of Stoudson Corporation, I absolutely have no affiliation whatsoever with that!

User avatar
medicineman
Firefly
Firefly
Posts: 24
Joined: Fri Sep 14, 2018 3:15 am

Re: Trying to resolve some modding woes, mostly graphical

Post by medicineman » Thu Feb 07, 2019 3:33 am

Ok, I've made some significant progress. Clearing out previous installations fixed the issue with icons not changing when modified. Thanks!

I managed to fix some problems with the overworld map, but editing the title screen (and some of the other screens) seem to be a bit mysterious. It's like putting a pixel in the wrong place causes the game to not load the image but other alterations are fine. Switching the default UA startup.iff with say the Taer MD one is fine. My putting an altered pixel in the corner of the original isn't. I can't find any rhyme or reason to it. I've started editing icons (which is a headache) but I at least know what I'm doing wrong there... they seem to be touchy in a similar fashion, although there are files where the dimensions of the icons are actually defined so I can see why that might cause the game to crash. If anyone has any ideas related to the startup.iff, I'd be grateful.

I have successfully been adding new MB maps to the game and made a couple of realizations, which are currently just working hypotheses but have fixed some issues with the maps not displaying:
- If there is an error in the map, the game skips the briefing screen and goes directly to the mission
- The maps seem to need to be a multiple of 240 in a given dimension (length need not equal height). It doesn't actually seem to matter whether this is defined correctly in the .ldf, just so long as the image itself has this property. Maybe this is why the mb map dimensions are sometimes omitted? Will keep this in the back of my mind.
- The edges of the MB image seem to need to be black (I'm not sure if it's RGB 000 or something close, but mine are pure black). If they aren't, the map won't load. As a matter of pure coincidence, I was doing this anyway (darkening the edges) to mimic the style of the original maps but the game crashed when I forgot to on one. They're generated using my best guess as to how the original designers made theirs (relief maps + cloud/myko cable transparency + skeleton of city + wild color palettes), but the "feel" of the new ones is different than before.
- The color palette doesn't seem to have to match the default - just so long as it's 256 colors. I am using hardware mode, though.
I'll verify these more thoroughly as I go, but wanted to note it.

Sorry if some of the above is already in the wiki. Anyway, thought I'd upload a preview of one of the new maps along with the discussion. Pretty excited about these, actually.
Attachments
MB_preview.png

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest