Login  Register
 



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

Joined: 15 Feb, 2007
Posts: 144
Location: Florida, USA
Offline
There was a request for a step by step how to create a selectable mod and add a new unit. Apperently all the information is out there but no single spot to get it. I will take on the task. Additions or corrections are appreciated.

Here Goes.

First off in you supcom folder make a mods folder.
Inside that, make another folder that is named for your mod.
Inside that, make a "mod_info.lua" file.
that file should look like this

Code:
author = "Your Name"
name = "Your Mod's Name"
copyright = "Copyright © 2007, Your Company"
version = 1
description = "What does this mod do."

exclusive = false
ui_only = false


Now. make a "units" folder.
Inside that, make a folder named for you units ID, you can follow the naming scheme of gpg, or just make up your own ID.
Inside that, Coppy all the files from the unit that you want to start from (or start from scratch if you want, But I don't recomment it for a beginner.)
Rename all the files so the ID portion of the name matches your units ID.
Inside the units _scrip.lua file you will see something like
Code:
URL0104 = Class(TLandUnit)

change that so the URL0104 part matches your units ID.
At the bottom of the file there is
Code:
TypeClass = URL0104

again change that to match your units ID.

Inside the .bp file there are some things you can change to help you identify your unit in game.

Code:
Description = '<LOC uel0104_desc>Mobile Anti-Air Gun',
UnitName = '<LOC uel0104_name>Archer',
HelpText = '<LOC uel0104_help>Mobile Anti-Air Gun',


Now, create a supcom shortcut and open its properties and append this to the end of the target. (outside the quotation marks)
/windowed 1024 768 /EnableDiskWatch /nosound

That will as it looks, start the game in a window (so you can see the log), enable the game to keep an eye for changed files so that you don't have to restart the game every time you make a change, and turn off sound(its kind of annoying while testing).

Using that link start the game, go to skirmish mode, choose
Fog of War = None <-- so you can see the whole map(good if you are testing artillery)
Victory Condition = Sand Box <-- game dosn't end
Game Speed = Adjustable <-- sucks waiting around while things move or build
Cheats = On <-- so you can use debugging tools

Ok, start the skirmish.
Now, hit F9 to open the log and look for any yellow text as these are warnings. You shouldn't see any. Unchecking Log and Spew should help with this.

Now, click on the map somewhere and hit Alt+F2.
Find your unit in the list and click on it.
Also, your unit should be buildable from the same place as the unit you started with if you didn't change any built by stuff.

Again, check the log for errors.

After that, tweak to your hearts content.

Note, even though the enable disk watch is on it is kind of flakey in my experience. If you think something should work try exiting back to the main menu and restarting the skirmish. Also, making changes won't affect units already placed so select them and Ctrl+Delete to get rid of the old version and place a new one.


Top
 Profile  
 PostPosted: 13 Apr, 2007 
 
User avatar

Joined: 30 Mar, 2007
Posts: 31
Offline
Anyway to add a unit without it being a mod?

Over the next couple of years there is likely to be hundreds, and maybe thousands, of units made for SupCom. If every unit has to be added as a Mod it will make the Mod manager very cluttered.

_________________
When you go out into the world, watch for traffic.
Image


Top
 Profile  
 PostPosted: 14 Apr, 2007 
 

Joined: 09 Mar, 2007
Posts: 33
Offline
I think so. Although I just started Modding today and haven't done programming for 3 years so I could be wrong. Anyways, run through III_demon's tutorial to do a tutorail UI mod. (The one that says "DO THIS FIRST") Where he renames it Shadowed, maybe call it Modded or whatever. Anyways after that, unpack the Unit.SDC into the same place you unpacked LAU.SDC. Now, just choose a unit from the newly unpacked "units" folder, copy + paste, then follow these directions! Best of all, this lets you still run original supcom, while modding/messing the -bleep- out of the other one. At least it should :D

Edit: Also tack on that bit the first poster said to your shadowed icon. Just add it after demons stuff. Worked for me -shrug- Also, if any of this is wrong, I'm sorry now in advance.

_________________
[quote="Hrimfaxi"]The Mavor is the perfect unit for the UEF. It's a full-on mad scientist doomsday gun that perfectly captures the spirit of 'just you wait!' [quote]


Top
 Profile  
 PostPosted: 16 Apr, 2007 
 
User avatar

Joined: 15 Feb, 2007
Posts: 144
Location: Florida, USA
Offline
While you could do like Shaeden said, that is a bit messy. It is really best to have the units in a mod. Now what you can do is find all of the units you like and pack them into a single mod. Just create the ubermod or whatever folder inside the mods folder, put the mod_info.lua file in there and add all of the other files in there appropriate spots inside of that folder. Now when you activate the ubermod all the units and such from the various mods should be in there. As a side note, a lot of people that are running mods are packaging all of there units and other modifications into one package for eazy installing and using of the mod.


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