Login  Register
 



Post new topicReply to topic Go to page 1, 2, 3, 4, 5 ... 7  Next
 
Author Message
 PostPosted: 24 May, 2009 
 
Forum Scout
Forum Scout

Joined: 16 Feb, 2007
Posts: 2839
Location: Phoenix, Arizona, USA
Offline
Blackops Research & Development Presents
Global Icon Support

Current Version: 5.0
Download:
Vault - Currently On Vault
Zip - Zip Download
SCD - SCD Download

Before anyone gripes about another Blackops Project being posted please understand this one is actually a support tool for all mods (hence the global part) rather than something specific to Blackops.

Essentually one of the major issues with unit mods is that GPG didn't make icon support centralized so currently mods only really have three options. First is to just not include icons and deal with placeholders which is annoying but happens, Second is to use Goom's Build Icon Scripts which provide build icons but leaves alot of holes, and Third to put the icons into an SCD file in gamedata and hope it doesn't cause desync issues in multiplayer.

During trying to get 100% icon coverage for Blackops I asked DeadMG for some help rewriting an old script I was using. Quite frankly he returned it in such better shape that it lead to alot of possibilities. Together we tracked down as many of the game's references to unti Icons as I could and while I still haven't found them all we have made a serious chunk.

Install Instructions:
Vault Package - Avalible - Already downloads into proper place. Can be found in /My Documents/My Games/Gass Powered/ect if you need to.
SCD Package - Unzip and drop .scd file in your <FA Install Directory>/gamedata/ folder.
Zip Package - Unzip and drop the containing folder into your <FA Install Directory>/mods/ folder. Make sure folder structure is /mods/BlackopsACUs/mod_info.lua. If there is an extra folder the mod will not work correctly.
Zip Package Alternate - Unzip and drop the containing folder into /My Documents/My Games/Gas Powered Games/Supreme Commander Forged Alliance/mods/ folder. Make sure folder structure is /mods/BlackopsACUs/mod_info.lua. If there is an extra folder the mod will not work correctly.

Activation Instructions:
Simply turn it on in the Mod Manager. If you activate a mod that specifically requires this mod you will get a message asking you to activate this mod as well.

Compatable Mods: (Mods configured specifically for BOGIS Support)
4th-Dimension(Bad Icon Preloader support) (Coming Soon)
Veteran Producing Factories V1.5 by FuryoftheStars
BlackOps: Unleashed by the BlackOps Team
BlackOps: Advanced Command Units by the BlackOps Team
BlackOps: Special Weapons Add-on by the BlackOps Team
BlackOps: Altered Reality Add-on by the BlackOps Team

How it Works:
Basically you simply turn it on.
The beauty of the mod is that it does all the hard work with very little prep needed as BOGIS will search all the active mods folder structures to locate any compatabilt unit or upgrade icon and store them for reference later.

This mod is configured for legacy mod support which means that it will find icons for any mod reguardless of what folder they are dropped into (Enhancments have 1 minor exception) even if they use the old fassion scd in the game data folder for their icons.

Icons Currently Supported:
-Construction Icons (Icons shown in Factory/Build menus)
-Unit Select Icons (General icon shown when single or multiple units selected)
-Hover Over Unit Icons (Icon showed in unit detail popup)
-Targetting Icon (Icon shown on mousover to see what a unit is shooting at)
-Avatar Icons (Commander's Idle Icon)
-Commander Upgrades (Icons shown for commander upgrades)

Configuring Your Mod to Utilize This:
Configuration is actually very straight forward as you simply have to have your icons somewhere for the mod to find them. There are a few minor conditions but they are caused mainly by the game's restrictions rather than mine.

1) All custom units must have 7 character unit IDs followed by _unit.bp or the script will ignore it. This is because some of GPGs scripts are incredibly picky.

2) Enhancment/Upgrade icons must be placed inside a faction specific folder. It doesn't matter where these folders are located just the name of the folder. This is because some enhancments may have the same name for each faction but require a different colored icon. It is to prevent overwrites.
aeon-enhancements
cybran-enhancements
seraphim-enhancements
uef-enhancements

3) Custom units making use of Enhancment/Upgrade icons must have a faction identifier as the 2nd character in the unit ID (example: xAxxxxx). This is the only hard limit on what you can set as the unitID besides the char limit mentioned above. This is because GPG's enhancment scripts look specifically at that character to determine faction.
a = Aeon
e = uef (earth)
r = cybran (recyclers)
s = seraphim

4) This mod is capable of overwriting older scripts such as Goom's or Gilbot's Icon systems however you will need to check your mod's UID. If it is higher than the UID used by this mod then you will break functionality of BOGIS scripts and may not properly load the icons for all them ods you are running.

Manual Overrides:
Due to populare request I have added a number of manual overrides to the mods functionality. These can be set by a player with a specific purpose in mind.

Alternate Icon Path
This is the first override and allows you to specifically set the path to an icon you wish to use. If you set this value the icon you choose will become the new default icon for all build menus, avatars, control groups, and general unit information. To set this you just need to add the follong line to your units BP.
Code:
    Display = {
        AlternateIconPath = '/mods/modfolder/<folders>/',
    },

You do not need to include the unit ID or the file name in this path. This is just the folder path to where the icon should be located. BOGIS will map to this location as primary before trying to fall back on other icon locations.

Alternate Enhancment/Upgrade Path
This one is very similar to the previous override but marks out what folder to look for the units enhancment/upgrade icons. This is useful for units whos unitIDs don't have the proper faction identifier or adding custom icons to existing units.
Code:
    Display = {
        AlternateUpgradeIconPath = '/mods/modfolder/<folders>/',
    },

This is just the folder path to where the icon should be located. BOGIS will map to this location as primary before trying to fall back on other icon locations.

Bad Icon Preloader
Note: This function is supported by version 3.0+
Some of the biggest mods and even GPG's default game have helper/dummy units that don't have and simply don't need icons. To reduce log spam BOGIS compiles a list of units that don't have icons and puts them in a Bad Icon table. This way it reduces log spam everytime the game tries to load an icon for this unit.

Per request mod developers wished to pre-load a list of unitIDs into this table for units that they know do not have valid icons and so with some manipulation of Manimal's Mod locator script (to make sure BOGIS is running before trying to load data into mods outside your mod's folder) I created a little script that can be filled out and inserted into a mod to pre-load a list of unitIDs.

Create this file if it doesn't exist in your mod:
/mods/modfolder/hook/lua/globalInit.lua

Insert this code into it:
Code:
do

local EXPreloadBadIconUnits = {
   'eeb0001',
}

local GetMyActiveMod = function( byName, byUID, byAuthor )
   for i, leMod in __active_mods do
      if (byName   and ( byName   == leMod.name   ))
      or (byUID    and ( byUID    == leMod.uid    ))
      or (byAuthor and ( byAuthor == leMod.author )) then
         --LOG("MANIMAL\'s DEBUG: Mod infos = "..repr(leMod))
         return leMod
      end
   end
   WARN("MANIMAL\'s MOD FINDER:  Unable to get Mod Infos ! Either your mod is not installed or you have mistyped its name, UID or author.")
   return {}
end
local BOGISCheck = GetMyActiveMod( 'BlackOps Global Icon Support Mod', false, false )

if BOGISCheck.name == 'BlackOps Global Icon Support Mod' then
   local BlackopsIcons = import('/mods/BlackopsSupport/lua/BlackopsIconSearch.lua')
   for i, v in EXPreloadBadIconUnits do
      local EXunitID = v
      BlackopsIcons.EXNoIconLogSpamControl[string.upper(EXunitID)] = EXunitID
   end
end

end

Expand the "EXPreloadBadIconUnits" table with all the unitIDs that do not have icons in your mod. When this is done it will check to make sure BOGIS is running and then insert every unitID within that table into the Global Bad Icon table within BOGIS.

Note: This was done during Global Initiation so that it is executed & loaded before BOGIS runs its primary search function.

This script deals specifically with standerd unitIDs and not Enhancment/Upgrade icons. Enhancment/Upgrade icons are required to have existing icons within the mod or bad things happen. Do not create an enhancment without having an icon for it.


-----===== Credits =====-----
Exavier Macbeth
Initial Code, File Tracking, Debugging, & Tweaking

DeadMG
Core Functions & Hooking


Last edited by Exavier Macbeth on 12 Aug, 2011, edited 17 times in total.

Top
 Profile  
 PostPosted: 24 May, 2009 
 
User avatar

Joined: 09 Nov, 2008
Posts: 215
Location: New Earth
Offline
Finally an icon support mod!

I hope this helps with some of the anoying placeholders for some new units that some older mods have.


Top
 Profile  
 PostPosted: 24 May, 2009 
 
Forum Scout
Forum Scout

Joined: 16 Feb, 2007
Posts: 2839
Location: Phoenix, Arizona, USA
Offline
Ion wrote:
Finally an icon support mod!

I hope this helps with some of the anoying placeholders for some new units that some older mods have.


Keep in mind that turning it on "At This Moment" will probobly do nothing as so far the only mods configured to use it are the Blackops Betas it was originally designed to support lol. Untill other mods get their icons in the proper folders there isn't much for this mod to do lol.


Top
 Profile  
 PostPosted: 25 May, 2009 
 
User avatar

Joined: 15 Feb, 2007
Posts: 20020
Location: Presumably, at the time of posting, his computer.
Offline
Exavier Macbeth wrote:
Exavier Macbeth
Screaming that it doesn't work when infact it's GPG's fault that they left in a bunch of busted code

DeadMG
All the work


Fixed! :P

_________________
I'm watchin you!
Image


Top
 Profile  
 PostPosted: 25 May, 2009 
 
Forum Scout
Forum Scout

Joined: 16 Feb, 2007
Posts: 2839
Location: Phoenix, Arizona, USA
Offline
LMAO! close enough when it comes to actually getting the basic code working. After all it doesn't work anything like the old scripts it was based on.

But it still needed alot of debugging after the fact :P


Top
 Profile  
 PostPosted: 25 May, 2009 
 

Joined: 13 Oct, 2008
Posts: 256
Offline
So should those of us using the BlackOps mod download this seperately, or will it be packaged in the next version of one of them?

EDIT: I guess I should've read the other thread first. :?


Top
 Profile  
 PostPosted: 25 May, 2009 
 

Joined: 21 May, 2008
Posts: 720
Offline
:?: :?: :?: i'm really a noob here but I suppose someone had to ask the question, why this mod, as far as I know all the serious mods out there have replaced placeholders with build icon for their units and it works.

All dds files are neatly arranged in an icon folder in the mod and the units id referenced in the 3 ui files they need to be references into to appear in game.

So what's the usefulness of this mod could you be more specific (or more plain :) ) for us noobs ?


Top
 Profile  
 PostPosted: 25 May, 2009 
 
User avatar

Joined: 15 Feb, 2007
Posts: 20020
Location: Presumably, at the time of posting, his computer.
Offline
That only works when you run one mod. If you run two custom icons mods, they overwrite and one of them can't have custom icons. Whereas this supports simultaneous mods.

_________________
I'm watchin you!
Image


Top
 Profile  
 PostPosted: 25 May, 2009 
 
Forum Scout
Forum Scout

Joined: 16 Feb, 2007
Posts: 2839
Location: Phoenix, Arizona, USA
Offline
Basically what DeadMG said...

Also Goom only covers 3 of the 7-8 files that call icons so even with his way of doing them you still get placeholders. We have tracked down 7 of the files though there is still one I am looking for :P


Top
 Profile  
 PostPosted: 25 May, 2009 
 

Joined: 21 May, 2009
Posts: 36
Offline
This is awesome! no more forgetting to add icon support for new units or any of that old hastle! just place the icons in the folder and off you go :D

Great job!

On a side note, it's quite easy to edit any mod to use this :) just place the icons in the correct folders and delete the hook .lua files relating to icons.


Top
 Profile  
 PostPosted: 25 May, 2009 
 
User avatar

Joined: 15 Feb, 2007
Posts: 20020
Location: Presumably, at the time of posting, his computer.
Offline
That was the aim. Now, all you do is mirror the stock's folder structure for icons, and all works fine.

_________________
I'm watchin you!
Image


Top
 Profile  
 PostPosted: 25 May, 2009 
 

Joined: 21 May, 2009
Posts: 36
Offline
I have noticed it adds about 3-8 sec of load time, but thats not that much if you think about how much time it takes to manualy add support for all the icons to every unit you use :P

and becides, how often does one load a game anyway?

EDIT: I did notice when I enabled logging it spat out a bunch of "icon missing" errors relating to units GPG didn't add icons for (civilian units mostly)

list


Top
 Profile  
 PostPosted: 25 May, 2009 
 
User avatar

Joined: 11 Apr, 2007
Posts: 1916
Offline
My solution with mod locator wasn't simple enough for getting icons to show up...

_________________
Console Plus - Solo A.C.U. - Experimental Wars Image


Top
 Profile  
 PostPosted: 25 May, 2009 
 
Forum Scout
Forum Scout

Joined: 16 Feb, 2007
Posts: 2839
Location: Phoenix, Arizona, USA
Offline
@rseding91: The delay gets more noticable when you run something like say Blackops Unleashed with it because of how many new units are added but its still quite fast and then doesn't effect gameplay once the game starts.

As for that list of units, Yes I know. I actually left that log enabled on purpost mainly so if a modder was having trouble (aka a spelling typo in the icon name) he could easilly see which unit is not getting a proper icon.

The reason this log triggers for GPG buildings is because GPG didn't add icons for them lol. So it returns false for GPG's icon check then gets passed to the custom script and returns false (because its not a modded unit) logging the ID before finally being shunted to the placeholder icon :P

@Manimal: Actually the core scripts of this mod where originally suppost to be a rework of a script I used to get commander upgrade icons. When I asked DeadMG if he could help me hook & rewrite it to be more multi-mod compatable the core script for this mod was born lol. And just for the record the few times i tried using your mod locator i wasn't able to get it to work successfuly :(


Top
 Profile  
 PostPosted: 26 May, 2009 
 
User avatar

Joined: 29 Sep, 2007
Posts: 205
Location: Zevenbergen, The Netherlands
Offline
:shock: Ok not sure why this is happening but I just gonna post it in both the BO ACU 2.7 topic and this one cause it could be because of somekind of conflict ?

Code:
info: Mod icons folder not found!\000OPC1001
info: Mod icons folder not found!\000OPC1002
info: Mod icons folder not found!\000OPC2001
info: Mod icons folder not found!\000OPC5007
info: Mod icons folder not found!\000OPC5008
info: Mod icons folder not found!\000OPE2001
info: Mod icons folder not found!\000OPE2002
info: Mod icons folder not found!\000OPE6002
info: Mod icons folder not found!\000OPE6004
info: Mod icons folder not found!\000OPE6005
info: Mod icons folder not found!\000OPE6006
info: Mod icons folder not found!\000UAB5204
info: Mod icons folder not found!\000UAC1902
info: Mod icons folder not found!\000UEB5204
info: Mod icons folder not found!\000UEB5208
info: Mod icons folder not found!\000URB3103
info: Mod icons folder not found!\000URB5204
info: Mod icons folder not found!\000URB5206
info: Mod icons folder not found!\000UXL0021
info: Mod icons folder not found!\000XAC2301
info: Mod icons folder not found!\000XAC8001
info: Mod icons folder not found!\000XAC8002
info: Mod icons folder not found!\000XAC8003
info: Mod icons folder not found!\000XAC8101
info: Mod icons folder not found!\000XAC8102
info: Mod icons folder not found!\000XAC8103
info: Mod icons folder not found!\000XEC1908
info: Mod icons folder not found!\000XEC1909
info: Mod icons folder not found!\000XEC9001
info: Mod icons folder not found!\000XEC9002
info: Mod icons folder not found!\000XEC9003
info: Mod icons folder not found!\000XEC9004
info: Mod icons folder not found!\000XEC9005
info: Mod icons folder not found!\000XEC9006
info: Mod icons folder not found!\000XEC9007
info: Mod icons folder not found!\000XEC9008
info: Mod icons folder not found!\000XEC9009
info: Mod icons folder not found!\000XEC9010
info: Mod icons folder not found!\000XEC9011
info: Mod icons folder not found!\000XRC2101
info: Mod icons folder not found!\000XRC2301
info: Mod icons folder not found!\000XRC2401
info: Mod icons folder not found!\000XRO4001
info: Mod icons folder not found!\000XSC1601
info: Mod icons folder not found!\000XSC1701
info: Mod icons folder not found!\000XSC8013
info: Mod icons folder not found!\000XSC8014
info: Mod icons folder not found!\000XSC8015
info: Mod icons folder not found!\000XSC8016
info: Mod icons folder not found!\000XSC8017
info: Mod icons folder not found!\000XSC8018
info: Mod icons folder not found!\000XSC8019
info: Mod icons folder not found!\000XSC8020
info: Mod icons folder not found!\000XSC9010
info: Mod icons folder not found!\000XSC9011
info: Mod icons folder not found!\000XAC8101
info: Mod icons folder not found!\000XSC8020
info: Mod icons folder not found!\000XEC9010
info: Mod icons folder not found!\000OPE6005
info: Mod icons folder not found!\000XEC9008
info: Mod icons folder not found!\000UEB5208
info: Mod icons folder not found!\000XSC1701
info: Mod icons folder not found!\000XEC1909
info: Mod icons folder not found!\000URB5206
info: Mod icons folder not found!\000UXL0021
info: Mod icons folder not found!\000OPE6004
info: Mod icons folder not found!\000XSC9010
info: Mod icons folder not found!\000XEC9006
info: Mod icons folder not found!\000XEC9007
info: Mod icons folder not found!\000XAC8001
info: Mod icons folder not found!\000URB5204
info: Mod icons folder not found!\000XSC8014
info: Mod icons folder not found!\000OPC1002
info: Mod icons folder not found!\000OPE6006
info: Mod icons folder not found!\000XRC2401
info: Mod icons folder not found!\000UAC1902
info: Mod icons folder not found!\000XSC1601
info: Mod icons folder not found!\000XEC9002
info: Mod icons folder not found!\000XSC8013
info: Mod icons folder not found!\000URB3103
info: Mod icons folder not found!\000XEC9004
info: Mod icons folder not found!\000XAC8103
info: Mod icons folder not found!\000XRO4001
info: Mod icons folder not found!\000XEC9009
info: Mod icons folder not found!\000OPC2001
info: Mod icons folder not found!\000XAC8003
info: Mod icons folder not found!\000XSC8018
info: Mod icons folder not found!\000UEB5204
info: Mod icons folder not found!\000XEC9003
info: Mod icons folder not found!\000UAB5204
info: Mod icons folder not found!\000OPE2001
info: Mod icons folder not found!\000XEC9001
info: Mod icons folder not found!\000XEC1908
info: Mod icons folder not found!\000XSC8017
info: Mod icons folder not found!\000XSC8015
info: Mod icons folder not found!\000OPC5008
info: Mod icons folder not found!\000XAC2301
info: Mod icons folder not found!\000XRC2101
info: Mod icons folder not found!\000XSC8016
info: Mod icons folder not found!\000XEC9011
info: Mod icons folder not found!\000XEC9005
info: Mod icons folder not found!\000OPC5007
info: Mod icons folder not found!\000XSC8019
info: Mod icons folder not found!\000XAC8102
info: Mod icons folder not found!\000XSC9011
info: Mod icons folder not found!\000OPC1001
info: Mod icons folder not found!\000OPE6002
info: Mod icons folder not found!\000XAC8002
info: Mod icons folder not found!\000XRC2301
info: Mod icons folder not found!\000OPE2002


Ok change the code to be cleaner, like you asked :wink:

_________________
Image
Help Save Lives Join World Community Grid! Image


Last edited by Shinzok on 26 May, 2009, edited 1 time in total.

Top
 Profile  
 PostPosted: 26 May, 2009 
 
User avatar

Joined: 15 Feb, 2007
Posts: 20020
Location: Presumably, at the time of posting, his computer.
Offline
Yep, pretty much.

_________________
I'm watchin you!
Image


Top
 Profile  
 PostPosted: 26 May, 2009 
 
Forum Scout
Forum Scout

Joined: 16 Feb, 2007
Posts: 2839
Location: Phoenix, Arizona, USA
Offline
@Shinzok: LMAO thats the exact thing that rseding91 was asking about a cpl posts earlier. Yes that list is normals. Its all the units GPG never made icons for so they are getting passed into our custom functions which of coarse is not going to find the icons in a mods folder :P

If you get a chance after this responce please delete some of that post... Maybe everything but the Mod Icons Folder not found messages. That way we have an example but without the extra junk that streatches the post.


Top
 Profile  
 PostPosted: 26 May, 2009 
 

Joined: 21 May, 2009
Posts: 36
Offline
"...That way we have an example..." HEY! I put a link with all the icon related parts on my post :P

You must have missed it lol. Again: ->Link<-

EDIT: I've got a random question, is there any way to make it so when you have overlaping shields and something hits them only one of the shields takes damage? or would that require a remake of the shielding stuff?(AKA-to much coding)


Top
 Profile  
 PostPosted: 26 May, 2009 
 
User avatar

Joined: 15 Feb, 2007
Posts: 20020
Location: Presumably, at the time of posting, his computer.
Offline
Manimal wrote:
My solution with mod locator wasn't simple enough for getting icons to show up...


We don't need our own UID, author, or anysuch. When Exavier has tracked down the last file, it's a literally drop and drag solution.
You also only hooked UIFile. Actually, far from every call for icons uses UIFile.
Plus, I was under the impression that your solution was much more for scripting use. This is much more specific.

_________________
I'm watchin you!
Image


Top
 Profile  
 PostPosted: 26 May, 2009 
 
Forum Scout
Forum Scout

Joined: 16 Feb, 2007
Posts: 2839
Location: Phoenix, Arizona, USA
Offline
@rseding91: Lmao Pasrebin clears out their files eventually unless you selected "forever". It usually defaults to only a month. Having it posted directly in the thread means it sticks and can be found easier than a link by pwoplw just brousing a thread for major posts.

EDIT: as for the shield question I am not sure... But thats a question for the Mod Dev Support Forum :)


Top
 Profile  
 PostPosted: 26 May, 2009 
 

Joined: 21 May, 2009
Posts: 36
Offline
Does this scan all units in all mods/the normal game?

or does it just scan all units in all mods?

or does it just scan active mods?

Because I was thinking, is there anyway to tell what mods are being used and only scan those ones for icons? that way if you only had say 1 small mod enabled it wouldn't scan all 5 of the mods in the "mods" folder and it would reduce the load times.

That is, unless it already does that :P

Also, does the mod scan units in the units.scd file ? if so, why? don't they already have icons setup for them and wouldn't that increase load time?

Keep in mind i'm half guessing on some of this stuff so I don't know if it's REQUIRED that the units.scd file be scaned or what :)

Let me know :P


Top
 Profile  
 PostPosted: 26 May, 2009 
 
Forum Scout
Forum Scout

Joined: 16 Feb, 2007
Posts: 2839
Location: Phoenix, Arizona, USA
Offline
It checks the "Active Mod" list and then scans based on that so if a mod is turned off it doesn't register the unitIDs. So it is a quick loading process if only say my ACUs are running.

The mod does not scan anything in the units.scd. The messages your seeing in the log where its saying it can't find the icon is generated by our script but its caused by GPG's icon check failing and passing a GPG unitID into our custom script as a secondary location check. Our script compars it to the table of unitIDs found in the /mods/ folder and returns a negetive (and puts ID in log for reference) then passes the unitID to the final check which simply sets the placeholder icon as the untis Icon :P

Hope that makes better sense :)


Top
 Profile  
 PostPosted: 26 May, 2009 
 

Joined: 21 May, 2009
Posts: 36
Offline
Ahh yes that makes perfect sense :)

It does exactily what it should do :P

I didn't know what it was scanning and it kinda looked like it was scanning the units.scd file because of the errors but what you said explains that.


Top
 Profile  
 PostPosted: 27 May, 2009 
 
User avatar

Joined: 15 Feb, 2007
Posts: 20020
Location: Presumably, at the time of posting, his computer.
Offline
I was just thinking that ideally, it would only load once...

_________________
I'm watchin you!
Image


Top
 Profile  
 PostPosted: 27 May, 2009 
 
User avatar

Joined: 04 Feb, 2008
Posts: 583
Offline
here is your link sorry bout taking a while
http://supremecommander.filefront.com/f ... port;99906

_________________
Image


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic Go to page 1, 2, 3, 4, 5 ... 7  Next



Quick Tools

Search for:
Jump to:  

© 2002-2010 Gas Powered Games Corp. All Rights Reserved. Gas Powered Games is the exclusive trademark of Gas Powered Games Corp.
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
 
Home| Games | Company | News & Press | Support
  Terms of Use   |    Copyright Information   |    Privacy Policy