Jump to content


Photo

Modding Tutorials and Q&A


  • Please log in to reply
27 replies to this topic

#1 Pendaelose

Pendaelose

    Remix3 Modder

  • Hosted
  • 5,687 posts
  • Location:Rocket City
  • Projects:Remix Beta 1.0

Posted 16 May 2007 - 07:44 PM

I'll be posting some basic tutorials on how to get started, and I'll also be answering questions about modding zerohour.

If there is a question you have unanswered, I also suggest you try searching through the Contra Modding Q&A topic.



Tutorial 1 Getting started.


You will need:

GMAX
RENEGADE TOOLS - Includes RenX and W3D Viewer
CoolFile's W3D Importer
FinalBig
XCC Mixer (core app, not tool sets)



------------------------------------------------------------------------------------------
OK, actualy getting started... (if you havn't already)

1. Install GMAX. (I highly recomend default location) If you havn't already gotten a key you will have to get one from the GMax home page. Don't worry, it's free.

2. Install Renegade Tools. This includes RenX (an interface shell for GMAX), W3Dviewer, and an SDK for Renegade (this part we don't use)

3. Extract Coolfile's W3D importer. There should be "w3dimporter.ms" place it in "C:\gmax\gamepacks\Westwood\RenX\scripts\startup"

4. Don't open GMAX with the regular shortcut, use the RenX shortcut under Renegade Tools. That will allow you to export to W3D files.

5. Once you have RenX open, rightclick on the edge of the top tool bar, and select "Customize" In the action list, scroll down until you see "Coolfile W3D Importer" now drag and drop this onto the main toolbar. It should apear on that toolbar now. Now, select "Save" and use the default name. You should be good to go.

6. Create 2 folders "C:\Resources\" and "C:\Art\Textures". You will use both.

7. Use final big to open Generals\Textures.W3D. Under "Edit" use the Extract All button. Aim it at the "C:\Resources\" folder. It will run for a minute, and it will create "C:\Resources\Art\Textures" and will fill it with DDS files.

8. Close the Generals Textures.W3D, and do the same thing to Zerohour. The Textures will be in TexturesZH.W3D. Target the same folder so that the files go to the same place and overwrite the Generals files.

9. Open W3Dviewer. Go to "file", "Texture Path..." There will be TWO lines for Textures. Point the first line at "C:\Art\Textures" and the second at "C:\Resources\Art\Textures"



You should now be ready to start exporting Models for editing. Open the .Big file you want to start with (usualy W3D.Big, W3DZH.Big, Remix.Big, Contra.Big, etc). You'll want to create your own folders for exporting to help keep it orginized. I also highly recomend exporting single models only.

I use "C:\Art\GLA" "C:\Art\USA" "C:\Art\China"

Once you have your source W3D exported open it with W3Dviewer. This will show you not only what it looks like, but (more importantly) also a full list of all the skins used. under the Materials Tab you can view each Skin. To capture the skins for use in GMAX or for Editing to make new skins I use the "PrintScreen" button then paste it as a new scene in PaintShopPro. Just crop the texture down so its an exact fit. Then save it as a TGA file in "C:\Art\Textures" Its very important, that if your NOT moddifiying the skin, and you just want to use it in GMAX, that you MUST use the exact same name as the original, as listed in W3D Viewer.

If the model shows up missing all its skins and it looks like a mutant white and green thing, it means it uses a custom skin, not included with Generals and ZH. Use W3Dviewer to get a list of the textures (the names still show up, but you can't see the textures). Use that list and go back into the apropriate .Big file and export them out. If the texture is not already a part of the mod you are working on it must be placed in the "C:\Art\Textures" folder. If it already a part of the mod you should export the texture to "C:\Resource\Art\Textures"

Now, you have your tools setup, your model exported for editing, and the skins prepared for use in GMax/RenX. You can begin editing models.

GMax/RenX is fairly strieght forward, there are several tutorials available, though most of them assume you have done the 1-7 steps I listed above. Ofcourse there are tips and tricks that can make it easier, but those are for another occasion.

Edited by Pendaelose, 16 May 2007 - 07:40 PM.

Posted Image
Posted Image

Between now and the next polished release there should be very little new art work done. Instead the focus is on designing, testing, and fixing. the mod has always been so close to finished that its nearly criminal. I'd love to see this through to the end with a real community effort.


#2 Striker26

Striker26
  • Members
  • 191 posts
  • Location:yuu ess ayy

Posted 16 May 2007 - 07:46 PM

ahh yes a answer for all those noobish "how do i mod questions"

#3 Pendaelose

Pendaelose

    Remix3 Modder

  • Hosted
  • 5,687 posts
  • Location:Rocket City
  • Projects:Remix Beta 1.0

Posted 16 May 2007 - 07:46 PM

TUTORIAL 2. Basics of Ini Coding...

1st... Focus on EDITING units before you consider MAKING units. Both as models and as code. Start with changes first. this will give you the basic understanding of what you need before you dive headlong into starting from a blank page.

so... an explanation of the CODE.

*note* All code is case sensetive!


If you open up the _Remix.Big with FinalBig, near the bottom of the list you'll find the ini files. there are TWO major sets of files you need to notice.

/ini/ files and /ini/object/ files.

the /ini/object/ files include all the OBJECTS you see in game. every file is used to describe the properties and aperance of something. This includes units, buildings, and even projectiles.

the most important ones are the ini files for each general, and the weaponobjects.ini. There will also be varius drones and addons in the assorted "vehicles" files and so on.

the /ini/ files include behavioral details and systems. such as the stats for a weapon, or the locomotor details. Armors and particle effects. None of these is considered an object, but they are all refered to by objects and by each other. the most important

the most important ones are the weapon.ini, ObjectCreationList.ini (you'll see references all thourough the code to OCLs, they are here). less important, but still very usefull are the locomotor.ini, and armor.ini, particles.ini, and FXList.ini


so, on to basic editing.

The simplest code in the game is Tanks.
Buildings and Jets are very similare to tanks, but they have several aditional conditionstates.
Infantry are extreamly complicated and involve dozens of transition states and anmations, so lets not even worry about them for now. (I'll explain transitions and animations another day)


Lets start with a tank...

You can find tanks listed under the code for each general. Even if 2 generals have an identical unit, the unit is (typicaly) coded seperately for each general. you can find the a unit by its name. it will usualy be listed like this.

Object = Lazr_AmericaTankCrusader


the first area is the ART CODE.

For most of it you'll see something resembling:

ConditionState = aaaaaa
Model=bbbbbb
Turret=cccccc
TurretEL=dddddd
End

aaaaaa is the current status of the tank, damaged, rubble, etc.
bbbbbb is the W3D model that is used to draw the unit in game.
cccccc is the subobject in the model that you want to behave as the turret.
dddddd is a subobject of the turret that you want to raise and lower for elevation.

additional entries you'll likely see are weaponfx points and weaponlaunch points. these are bones in the W3D that the engine will use to place particle effects, spawn a missle or to place an addon, etc. If you use RenX to open up the model listed in bbbbbb you should be able to see all of these points as diamods.

Trial and error is the best way to learn more about this, there are countelss rules and exceptions, especialy when dealing with any kind of animation code. But once you get a grip on the basics of how editing the code, or the model effects each other its fairly easy from there out.


After the Art code comes the DESIGN CODE
These are simple, easy to edit values, such as cost, weaponset, vision radius, radar priority, exp value, armorset, etc. most of these are exactly what they look like.

Some most important notes:

ArmorSet must point at an armor type exsisting in the Armor.Ini
WeaponSet must point at weapons exsisting in the Weapon.Ini
etc...


The final set of code is the behavior modules. There are several of these modules for every unit. They effect how the unit will "behave" in the game. Can it be destroyed? how will it die when destroyed? How does it move, and can it target other objects? Does it have a "healing" radius? etc. Leaving out even a single section can have outragious consequences, such as a tank that cannot die, or if it dies it never disapears, or a tank that can't move...

Each behavior is marked and named. Each has a long list of aditional paramaters that can be included. This is where the toughest part is. for 99% of units, I'd recomend simply copy the behavior from an exsisting unit that does the same thing.



When I create a NEW unit, I don't start with a blank page of code. I start by copying a unit that I think is similare in behavior. Such as a Long Arm missile launcher is similare to a nuke cannon. The weapon is different, but the behavior is the same. So, once the code is coppied, off to the side in notepad, I begin editing the Artcode to make it use the new model. the animations have to be renamed etc, but I use the same basic code and just change it to use the new model I have made instead of the old one. Sometimes its as easy as just a find/replace for the 2 names. Then I go down and edit the costs and weapons etc until the unit will be balanced and armed the way I want. the last thing I do is double check the behaviors section to make sure there are no extra bits of code, such as a propoganda behavior where there should not be.

then I rename the whole unit to the correct new name and I paste it into the correct general. I then play test it. The art for the buttons and labels for the names is a block of instruction for another day.
Posted Image
Posted Image

Between now and the next polished release there should be very little new art work done. Instead the focus is on designing, testing, and fixing. the mod has always been so close to finished that its nearly criminal. I'd love to see this through to the end with a real community effort.


#4 Casojin

Casojin

    Democracy not Dictatorship

  • Project Team
  • 2,121 posts
  • Location:Thailand
  •  Thinker

Posted 18 May 2007 - 06:48 AM

How can I put more than one type of infantry into transport (like troop crawler) when it comes out of war factory?

I try to see Contra code, but it's very confusing.
Could you please explain what I have to do?
CASOJIN

Posted Image

#5 Pendaelose

Pendaelose

    Remix3 Modder

  • Hosted
  • 5,687 posts
  • Location:Rocket City
  • Projects:Remix Beta 1.0

Posted 18 May 2007 - 12:40 PM

Once I'm back at home I'll dig up the code and explain how that works.
Posted Image
Posted Image

Between now and the next polished release there should be very little new art work done. Instead the focus is on designing, testing, and fixing. the mod has always been so close to finished that its nearly criminal. I'd love to see this through to the end with a real community effort.


#6 Casojin

Casojin

    Democracy not Dictatorship

  • Project Team
  • 2,121 posts
  • Location:Thailand
  •  Thinker

Posted 18 May 2007 - 06:08 PM

Thanks in advance.
CASOJIN

Posted Image

#7 Pendaelose

Pendaelose

    Remix3 Modder

  • Hosted
  • 5,687 posts
  • Location:Rocket City
  • Projects:Remix Beta 1.0

Posted 28 May 2007 - 06:08 AM

Casojin,

My apologies for the delay... I forgot all about this while on vacation. I just happened to be combing through the forum and found it again.

The answer to your question comes in a few steps...

First, on the unit you want to build carrying troops you have to include a "TransportContain" behavior modual. I'll use the Infantry General's Troop Crawler as an example. it has:

Behavior = TransportContain ModuleTag_06
Slots = 8
DamagePercentToUnits = 10%
AllowInsideKindOf = INFANTRY
PassengersAllowedToFire = Yes
ScatterNearbyOnExit = Yes
HealthRegen%PerSec = 10
ExitDelay = 250
NumberOfExitPaths = 3 ; Defaults to 1. Set 0 to not use ExitStart/ExitEnd, set higher than 1 to use ExitStart01-nn/ExitEnd01-nn
GoAggressiveOnExit = No ; AI Will tell people to set their mood to Aggressive on exiting
ArmedRidersUpgradeMyWeaponSet = Yes
End

This gives it the basic "container" behavior.

To have the unit spawn loaded you also need an "ObjectCreationUpgrade" behavior module.

In this case we use:

Behavior = ObjectCreationUpgrade ModuleTag_InitialPayload
UpgradeObject = OCL_TroopCrawlerInitialPayload
TriggeredBy = Upgrade_Nationalism
End


Normaly we use a "ObjectCreationUpgrade" behavior module to add a drone or overlord addon, but in this case we chose an trigger upgrade that the player will always start the game with... thus, his transport will always get this upgrade and will spawn troops based on an OCL.

Now, notice the Upgrade object is an OCL. Specificly "OCL_TroopCrawlerInitialPayload". To edit the contents we just go to the ObjectCreatonList.ini (OCL.ini) and Edit that entry.

Rightnow it looks like this:

ObjectCreationList OCL_TroopCrawlerInitialPayload
CreateObject
ObjectNames = Infa_ChinaInfantryMiniGunner
Count = 4
ContainInsideSourceObject = Yes
End
CreateObject
ObjectNames = Infa_ChinaInfantryTankHunter
Count = 4
ContainInsideSourceObject = Yes
End
End


If we want to add an aditional troop type, such as remove a couple mini-gunners and add snipers it would look like this:

ObjectCreationList OCL_TroopCrawlerInitialPayload
CreateObject
ObjectNames = Infa_ChinaInfantryMiniGunner
Count = 2
ContainInsideSourceObject = Yes
End
CreateObject
ObjectNames = Infa_ChinaInfantryTankHunter
Count = 4
ContainInsideSourceObject = Yes
End
CreateObject
ObjectNames = Infa_ChinaInfantrySniper
Count = 2
ContainInsideSourceObject = Yes
End
End


And thats pretty much it. You can create new unique starting loads for new units just by creating a new OCL and pointing the "ObjectCreationUpgrade" at it.
Posted Image
Posted Image

Between now and the next polished release there should be very little new art work done. Instead the focus is on designing, testing, and fixing. the mod has always been so close to finished that its nearly criminal. I'd love to see this through to the end with a real community effort.


#8 Casojin

Casojin

    Democracy not Dictatorship

  • Project Team
  • 2,121 posts
  • Location:Thailand
  •  Thinker

Posted 28 May 2007 - 04:59 PM

Thanks.

More question.....
Is it possible to add 2 weapons upgrade to a vehicle?
(What I want to make is a Rocket Buggy could fire toxin rocket that can be upgraded with BuggyAmmo and AnthraxGamma)

Edited by Casojin, 28 May 2007 - 06:24 PM.

CASOJIN

Posted Image

#9 Pendaelose

Pendaelose

    Remix3 Modder

  • Hosted
  • 5,687 posts
  • Location:Rocket City
  • Projects:Remix Beta 1.0

Posted 28 May 2007 - 08:15 PM

Thanks.

More question.....
Is it possible to add 2 weapons upgrade to a vehicle?
(What I want to make is a Rocket Buggy could fire toxin rocket that can be upgraded with BuggyAmmo and AnthraxGamma)


you can do a rider change. It works pretty well, but the unit will be unable to gain ranks. Or you can have the alternate weapons load up as an overlord addon... it works for some units, but I think it would be a little ackward on a buggy.
Posted Image
Posted Image

Between now and the next polished release there should be very little new art work done. Instead the focus is on designing, testing, and fixing. the mod has always been so close to finished that its nearly criminal. I'd love to see this through to the end with a real community effort.


#10 Pendaelose

Pendaelose

    Remix3 Modder

  • Hosted
  • 5,687 posts
  • Location:Rocket City
  • Projects:Remix Beta 1.0

Posted 19 June 2007 - 08:16 PM

Casojin, I've been thinking more about your question and realized theres a better answer... you asked if you could have multiple weaponset upgrades... if you need weaponset upgrades you will have to get creative, like with the RiderChanges.

But, if you simply want to change from Anthrax alpha to beta to Gamma, you don't need to change weapon sets at all. Instead, on the basic weapon you give the missile object "deathweapon"s that are upgrade dependant. Each level of upgrade requires the matching upgrade and conflicts with the others. This way you can completly remove the need to create multiple weaponsets.

For examples I recomend looking in the Contra or Remix code under WeaponObjects.ini and looking at some of the flame and TBM weapons... depending purely on the upgrade used the same shell/missile can create Napalm, Black Napalm, or TBM after effects.
Posted Image
Posted Image

Between now and the next polished release there should be very little new art work done. Instead the focus is on designing, testing, and fixing. the mod has always been so close to finished that its nearly criminal. I'd love to see this through to the end with a real community effort.


#11 Guest_Maximitsu_*

Guest_Maximitsu_*
  • Guests

Posted 21 September 2008 - 11:09 AM

Hello I would just like to know if it's possible to enable the standard GLA generals sides to vs in skirmishes or will it cause errors...im not suggesting to release a new version with standard GLA enabled i was just wondering that if it was possible that you could just tell me how to enable them so i can mod my remix so i can play against them. Thanks for the awesome mod remix rules!

#12 SkyStrike

SkyStrike
  • Members
  • 8 posts

Posted 21 April 2009 - 03:11 PM

im sorry for this stupis question but can anybody tell me pease how can i rename existing unit.....for example Stealth Fighter on F-117
I found in INIZH data/ini/object/airforcegenerals and then
; ***DESIGN parameters ***
DisplayName = OBJECT:StealthFighter --->so i change it on my own name but in game it doesnt work. Please can anybody help me please?

#13 Rosco9487

Rosco9487

    title available

  • Project Team
  • 250 posts

Posted 21 April 2009 - 05:27 PM

You have to modify the .csf file. The entry you changed only tells the game which entry to use, the name that is displayed is stored in the .csf file. If you are trying to change the name of the stealth fighter, look for OBJECT:StealthFighter and chnage the name under that entry.

#14 Guest_Guest_SkyStrike_*_*

Guest_Guest_SkyStrike_*_*
  • Guests

Posted 22 April 2009 - 10:58 AM

You have to modify the .csf file. The entry you changed only tells the game which entry to use, the name that is displayed is stored in the .csf file. If you are trying to change the name of the stealth fighter, look for OBJECT:StealthFighter and chnage the name under that entry.

yeah i found it, thanks...but i have small problem i changed OBJECT:StealthFighter on OBJECT:F-117 saved it but after that game cant be launched.it write serious error. so i changed OBJECT:StealthFighter in INIZH file too on OBJECT:F-117 but it doesnt helps. Please what i doing wrong..

#15 Rosco9487

Rosco9487

    title available

  • Project Team
  • 250 posts

Posted 22 April 2009 - 11:17 AM

A name change wouldn't cause a serious error, it would display something like: MISSING:OBJECT:F117. The only thing with the name you are trying to use that I've never done is use a dash, try removing that and see if it helps. If you still get a crash (and as long as the .csf file is in the Data/Language folder) then your problem falls outside of the naming of the unit.

#16 SkyStrike

SkyStrike
  • Members
  • 8 posts

Posted 22 April 2009 - 05:14 PM

A name change wouldn't cause a serious error, it would display something like: MISSING:OBJECT:F117. The only thing with the name you are trying to use that I've never done is use a dash, try removing that and see if it helps. If you still get a crash (and as long as the .csf file is in the Data/Language folder) then your problem falls outside of the naming of the unit.

this is bad....maybe im just stupid idiot.....
Lets start again please....if i want rename unit in remix 3 i must find generalszerohour/data/english/generals.csf there i muste find OBJECT:StealthFighter then i rename it on OBJECT:F117.....thats all? or something else.....Im really new in generals moding so sorry for me nooobish

#17 Rosco9487

Rosco9487

    title available

  • Project Team
  • 250 posts

Posted 22 April 2009 - 07:16 PM

To change the name of the stealth fighter you only have to change the value in the generals.csf file. The line you need to find is object:stealthfighter, once you click on that you should see what is shown below:

csfpic.jpg

The name field is what is use in the code to identify the entry, you don't want to change this. The value field is what is displayed in game, if you change this then the name of the stealth fighter ingame will change.

If you have changed object:stealthfighter to object:F117 or anything else in the units code, you have to either change that back or change the name field to match.

#18 SkyStrike

SkyStrike
  • Members
  • 8 posts

Posted 23 April 2009 - 03:23 PM

To change the name of the stealth fighter you only have to change the value in the generals.csf file. The line you need to find is object:stealthfighter, once you click on that you should see what is shown below:

csfpic.jpg

The name field is what is use in the code to identify the entry, you don't want to change this. The value field is what is displayed in game, if you change this then the name of the stealth fighter ingame will change.

If you have changed object:stealthfighter to object:F117 or anything else in the units code, you have to either change that back or change the name field to match.


im sorry for your time rosco....thanks very much i know what is bad....i havent CSF editor and i used only text editor on csf files so this is problem...now if i download csf editor i will try your metod....so thank you :thumbsupsmiley:

#19 SkyStrike

SkyStrike
  • Members
  • 8 posts

Posted 25 April 2009 - 01:40 PM

hi i have 2 questions....please can someone help me?

1.how can i do that my unit can be buildable only once(as heroes or strategy center, they can be only once)

2.How exactly change icons of generals if games loading...i want change Icon of laser general on icon of robot general but i dont know how...

Thanks :p

Edited by SkyStrike, 25 April 2009 - 01:41 PM.


#20 Rosco9487

Rosco9487

    title available

  • Project Team
  • 250 posts

Posted 26 April 2009 - 02:14 AM

1. Add this:
MaxSimultaneousOfType = 1

2. The simplest way would probably be to just find the texture you want to replace and rename the new texture the same thing. When the game loads it will load the external textures after the archive textures, so your new one will overwrite the old one.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users