Login  Register
 



Post new topicReply to topic
 
Author Message
 PostPosted: 11 Apr, 2007 
 
User avatar

Joined: 15 Feb, 2007
Posts: 1439
Offline
I wanted to make everyone aware of some of the patch changes that will affect how your mods are structured so you can be ready with new versions when patch day hits. This isn't an exhaustive list, and I may be able to get a few new features in before we freeze the patch, but this should get you started.

- Hooked files are now concatenated together instead of loaded in to the same environment. This means you can access local variables from your mods. Note that the search path method of finding files has been replaced with a "mount" method, which is much cleaner and more versatile.

- You no longer need to rename your packed mods from zip to scd :)

- Locals are now available to all hooked mods. This also means you can't have two locals of the same name in the same scope. For example if you have

Code:
local oldModBlueprints = ModBlueprints
function ModBlueprints(all_bps)
    oldModBlueprints(all_bps)
end


and another mod uses the same local name, they'll conflict. You can solve this by changing the scope of your mod by creating a new block with do and end:

Code:
do
    local oldModBlueprints = ModBlueprints
    function ModBlueprints(all_bps)
        oldModBlueprints(all_bps)
    end
end


- You shouldn't have a "mods" folder in your packed, the mod_info.lua and hooks should be at the root, as that's where
mods get mounted.

- All mods must have a uid field, which is a string. This uid should be unique for every mod (and every version of a mod.) Search the internet for "generate guid" to find some handy guid generators.

- The exclusive flag now works

- The before, after, conflicts and requires lists now work, they are based on the UID

- Mods may be put in to My Documents\My Games\Supreme Commander\mods

- An OpenURL(string) function has been added. This uses the ShellExecute command, so it will do whatever the appropriate behavior for the protocol is according to the shell registry setup. The only protocols we allow are: http, https, mailto, ventrillo, teamspeak, dapp, im. If you would like us to add a new protocol, you can post here and we'll consider it (with security in mind.) You can find the current list of acceptable protocols in SupComDataPath.lua.

- Some bad news: shadowing via the mod manager is unfortunately not going to be available in this patch. It requires some major changes to our file system that we were unable to complete in time for this patch. My goal is to have this in place for the next full integration patch.

_________________
==}O->

"Primary function completed."


Top
 Profile  
 PostPosted: 11 Apr, 2007 
 
User avatar

Joined: 22 Feb, 2007
Posts: 172
Offline
Sweet, I cant wait for this patch.


Top
 Profile  
 PostPosted: 11 Apr, 2007 
 

Joined: 25 Feb, 2007
Posts: 217
Offline
Sounds great. Thanks for all your hard work.

_________________
tpapp's sc2normal texture converter (v1.1):
Image


Top
 Profile  
 PostPosted: 18 May, 2007 
 

Joined: 22 Feb, 2007
Posts: 978
Location: Gas Powered Games Office, Redmond, WA
Offline
Bump.

Because there's likely too many exact script changes to enumerate I suggest copying your lua folder to a backup location before patching. After the patch use a good directory/file diffing tool (I recommend Araxis Merge) to see which files are different and examine the changes.


Top
 Profile  
 PostPosted: 18 May, 2007 
 

Joined: 24 Mar, 2007
Posts: 8
Offline
Cool, I like some the of the changes in the modding system.

One question

Quote:
The only protocols we allow are: http, https, mailto, ventrillo, teamspeak, dapp, im.

is it dapp or daap.


Top
 Profile  
 PostPosted: 23 May, 2007 
 
User avatar

Joined: 29 Apr, 2007
Posts: 155
Location: In that Blackhole behind you
Offline
question why does it not support the old way of activating mods?


Top
 Profile  
 PostPosted: 23 May, 2007 
 
User avatar

Joined: 11 Mar, 2007
Posts: 108
Offline
why do i have to recode all my mods they all cause the game to crash now

_________________
Image


Top
 Profile  
 PostPosted: 23 May, 2007 
 
User avatar

Joined: 26 Feb, 2007
Posts: 511
Location: UK
Offline
Bubb9 wrote:
question why does it not support the old way of activating mods?


you can still use the "old" method (scd in gamedata folder) as thats how the resourcerich mod is still done (which is included with the game)

as far as im aware the "new" methods are not a "it must be done like this! graghr! >:0" but just another more convenient option, i like to use the new method because its more user friendly for people to install mods and also doesnt clutter the gamedata folder

edit:

a mod designed to work the "new" way must be installed the "new" way, a mod designed the "old" way must be installed the old way

to be more specific: if i have a mod_A.scd with a mods/ folder inside, this is the "old" method and must be placed in the gamedata folder and can not be installed in the "new" way

same goes the other way round


Top
 Profile  
 PostPosted: 23 May, 2007 
 
GPG Employee
GPG Employee
User avatar

Joined: 28 Feb, 2007
Posts: 3808
Location: Marysville, WA USA
Offline
O wrote:
Because there's likely too many exact script changes to enumerate I suggest copying your lua folder to a backup location before patching. After the patch use a good directory/file diffing tool (I recommend Araxis Merge) to see which files are different and examine the changes.


That program made it SO much easier. Thanks for the tip O.

_________________
Image

Steam Id: _sorian_


Top
 Profile  
 PostPosted: 13 Oct, 2007 
 
User avatar

Joined: 11 May, 2007
Posts: 435
Offline
do you happen to know why the command caps in "general" in the unit BP file is making the game crash, says invalid value, yet in the units included in the game, they still have the same -- EX.
Code:
RULEUCC_Attack = false,
RULEUCC_CallTransport = true,
RULEUCC_Capture = true,

what is invalid about true and false? im lost, if it's not too inconvenient a post about what changed in the unit BP would be much appriciated to convert the old mods over.


Top
 Profile  
 PostPosted: 13 Oct, 2007 
 
Forum Scout
Forum Scout
User avatar

Joined: 23 Feb, 2007
Posts: 7504
Location: Belgium
Offline
things like a shield toggle button are now ToggleCaps instead

_________________
Image
LabWars
Lok'tar Ogar!


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic



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