Advertisement
Civilization Fanatics' Center  

Welcome to Civilization Fanatics' Center.

You are currently viewing our site as a guest which gives you limited access to our site features. By joining our free community, you will be able to participate in the discussions, search the forum, send private messages, vote in polls, upload your own screenshots to the gallery, and access many other special features. Registration is fast, simple and absolutely free, so sign up today! If you have any problems with the registration process or your account login, please contact support.

Go Back   Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization

Notices

Reply
 
Thread Tools
Old Sep 11, 2008, 07:05 PM   #1
Deep_Blue
Knight
 
Deep_Blue's Avatar
 
Join Date: Aug 2005
Posts: 750
How to mod a Troops carrier unit?

I have this idea in my mind but I don't have any background about BTS modding, I had done some modding on CIV3 but I never tried modding CIV4.

My idea is to add new troops carrier unit for faster deployment of troops in enemy land. Being unable to move troops (like rifleman, infantry , cannons ..etc) fast enough in enemy land makes wars very tedious and time consuming and affects the fun part of the game. How many times you felt annoyed because you cannot move your cavalries stack 2 moves toward an enemy city just because they are slowed down by cannons and riflemen in their stack.

The answer to this is troops carrier unit, this unit carries un-mounted units (swords, Muskets , Infantry ..) and siege weapons.

I was thinking about adding the following units:

1.Wagon:
Strength: 0
Movement: 2
Prereq: Engineering
Cargo Space: 2
Upgrades to: Motorized Carrier
*Carries un-mounted units and siege weapons
**Cannot defend, when destroyed loaded units will be unloaded not killed.


2.Motorized Carrier:
Strength: 0
Movement: 2
Prereq: Industrialism , Oil
Cargo Space: 4
Upgrades to: Armored Carrier
*Carries un-mounted units and siege weapons
**Cannot defend, when destroyed loaded units will be unloaded not killed.


3.Armoured Carrier:
Strength: 16
Movement: 3
Prereq: Composites , Oil
Cargo Space: 6
*Carries un-mounted units and siege weapons
**Can only defend , doesn't receive defensive bonus, when destroyed loaded units will be unloaded not killed.

I think the following will be involved in such Mod:
1- Graphics modding
2- Tech modding
3- XML modding

As I said I am beginner in this and I don't know where to start and I need you help:
- What do I need for the described units above?
- What are required modding steps?
- Where to start learning about the required modding steps?
- How can I trigger units unload when the carrier is destroyed? and is this possible to Mod?

Any Info / suggestions will be very appreciated.

Last edited by Deep_Blue; Sep 11, 2008 at 07:17 PM.
Deep_Blue is offline   Reply With Quote
Old Sep 12, 2008, 01:51 AM   #2
ViterboKnight
King
 
ViterboKnight's Avatar
 
Join Date: Feb 2006
Posts: 624
You must define a CargoType, in an Xml which I can't remember.
Once you have defined it, set the units you want to be carried to be that type of cargo, and then set your carrier unit to have a cargo type of that type.

You can refer to the Caravel, and see how it's set to carry spies/missionaries/GP.
ViterboKnight is offline   Reply With Quote
Old Sep 12, 2008, 02:07 PM   #3
Deep_Blue
Knight
 
Deep_Blue's Avatar
 
Join Date: Aug 2005
Posts: 750
Come on where are the modding experts?
Deep_Blue is offline   Reply With Quote
Old Sep 12, 2008, 02:47 PM   #4
Thomas SG
CCV-designer
 
Thomas SG's Avatar
 
Join Date: Aug 2007
Location: Germany
Posts: 1,164
Big Problem - the AI can't handle it. Tried it with missiles some days ago. But I'll be looking for a solution asap.
__________________
Leading designer of the Community Civ V [CCV] project
**** 22.06.2011 **** NEW PATCH **** 22.06.2011 ****
Download =====> CCV 4.40 D <===== Download
Thomas SG is offline   Reply With Quote
Old Sep 16, 2008, 12:08 PM   #5
phungus420
Deity
 
phungus420's Avatar
 
Join Date: Mar 2003
Posts: 6,296
AI will only load units into a transport on cost, or in a costal city. You would need to program a new UnitAI type so that the AI could handle any transport other then ocean going. Making a troop transport is easy though, but without the AI being able to use it, there simply isn't a point.

Also this is the wrong forum for this, questions aren't supposed to be asked here, this is for modcomps that are finished and ready to be assimilated into other mods.
phungus420 is offline   Reply With Quote
Old Sep 16, 2008, 12:48 PM   #6
Deep_Blue
Knight
 
Deep_Blue's Avatar
 
Join Date: Aug 2005
Posts: 750
Where is the right place for this thread then?
Deep_Blue is offline   Reply With Quote
Old Sep 16, 2008, 03:34 PM   #7
MagisterCultuum
Great Sage
 
MagisterCultuum's Avatar
 
Join Date: Feb 2007
Location: Kael's head
Posts: 14,058
Apart from the AI's inability to understand it, it is quite simple. Most of it is handled in CIV4UnitInfos.xml, but if you want to limit it to specifc types of units then you'll need to edit CIV4SpecialUnitInfos.xml too.

Transports can only carry units from one domain (Land, Sea, or Air), and of one SpecialUnitType. Since units can have only one domain and only one SpecialUnitType, you couldn't limit some transports to only siege, some to only unmounted units, and some to both, as they's have to be defined in the same special unit type.



I really wish this was changed so that a unit could carry different numbers of multiple domains and special unit types, so that units could carry cargo while being cargo (which should probably make the cargo's cargo count against the both cargo limits), and so that the AI could understand how to use transports better.
MagisterCultuum is offline   Reply With Quote
Old Sep 16, 2008, 03:43 PM   #8
Deep_Blue
Knight
 
Deep_Blue's Avatar
 
Join Date: Aug 2005
Posts: 750
Quote:
Originally Posted by MagisterCultuum View Post
you couldn't limit some transports to only siege, some to only unmounted units, and some to both, as they's have to be defined in the same special unit type.
Caravals are limited to spies , great people , scouts and missionaries. I guess if we study caravals then we may find out how this can be done.
Deep_Blue is offline   Reply With Quote
Old Sep 16, 2008, 07:26 PM   #9
Deep_Blue
Knight
 
Deep_Blue's Avatar
 
Join Date: Aug 2005
Posts: 750
Can a moderater move this to "Modding Tutorials & Reference" please?
Deep_Blue is offline   Reply With Quote
Old Sep 17, 2008, 04:43 PM   #10
Ginger_Ale
Lurker


 
Ginger_Ale's Avatar
 
Join Date: Jul 2004
Location: Red Sox Nation
Posts: 8,448
Images: 225
Moderator Action: Moved to the main C&C forum, actually.
Ginger_Ale is offline   Reply With Quote
Old Sep 17, 2008, 07:45 PM   #11
Deep_Blue
Knight
 
Deep_Blue's Avatar
 
Join Date: Aug 2005
Posts: 750
Many Thanks
Deep_Blue is offline   Reply With Quote
Old Sep 18, 2008, 08:51 AM   #12
General Tso
Panzer General
 
General Tso's Avatar
 
Join Date: Oct 2007
Location: U. S. of A.
Posts: 1,182
Quote:
Originally Posted by Deep_Blue View Post
Caravals are limited to spies , great people , scouts and missionaries. I guess if we study caravals then we may find out how this can be done.
The caravel's "SpecialCargo" field is set to SPECIALUNIT_PEOPLE. The units that it carries (such as a spy) have there "Special" field set to SPECIALUNIT_PEOPLE. I think it's as simple as that.

I think that you just need to add a new specialunit to CIV4SpecialUnitInfos.xml then place it in the above fields to make things work.

I did this with my own mod and it worked fine. Unfortunately I don't have my mod on the computer that I'm currently using, so I had to go on memory while posting the above comments, but they should be correct.
__________________
Really Advance Setup Mod
Gives additional options when starting a new game.
Current Status: Version 5
http://forums.civfanatics.com/showthread.php?t=486324
Also available in the Steam workshop.
General Tso is offline   Reply With Quote
Old Sep 19, 2008, 10:04 AM   #13
Edgecrusher
King
 
Edgecrusher's Avatar
 
Join Date: Aug 2006
Location: Massachusetts
Posts: 904
As General TSO mentioned, that is exactly what you have to do.

1). Create a SPECIALUNIT_SOLDIER (or whatever you want to call it) item in the SpecialUnitInfos.xml file
2). Put this new item in the <SPECIALUNIT> tag in the UnitInfos.xml file (its the 3rd or 4th line from the beginning of each new unit). Note only put this for the units you want to be carried. I would imagine you are talking about Infantry, Machine Gunners, and other non-motorized units.
3). On the unit that you want to do the carrying, you put the same item in the specialunitcargo tag. its toward the bottom, just look for the caraval and mimic what it does for your own.

The AI wont know how to us it, but I thin if you define this new carrier unit to AI_ASSAULT_SEA or whatever the tag the carrier has, it might work. never expirimented with it much. I did make a truck that did this a while back, uploaded it here at some point. but as mentioned I never expiramented with the AI too much.
__________________
Units: War Pigs, Siege Quinquereme

Mod Comps: Heroes, Unique National Wonders

Last edited by Edgecrusher; Sep 19, 2008 at 02:25 PM.
Edgecrusher is offline   Reply With Quote
Old Sep 19, 2008, 02:04 PM   #14
Deep_Blue
Knight
 
Deep_Blue's Avatar
 
Join Date: Aug 2005
Posts: 750
Thanks General TSO and Edgecrusher I will experiment with the mentioned method.
To be honest I never thought about how the AI will be using this, and it will be the biggest problem with a troops carrier unit if the AI cannot understand it. Iam imagining the AI loading infantries and trying to move the unit overseas.
Deep_Blue is offline   Reply With Quote
Old Sep 19, 2008, 02:29 PM   #15
Edgecrusher
King
 
Edgecrusher's Avatar
 
Join Date: Aug 2006
Location: Massachusetts
Posts: 904
Deep Blue, I think the problem with the AI, is that it wont, ever load infantries into a truck/helicopter/etc.. at all.
I "thought" I tried to test the UNITAI_ASSAULT_SEA, which is the ai that the transport is given, on a land based unit, to see if the AI would use it as a transport. I cant remember how that turned out, THen again, it might be one of those things I wrote down to test, then when I take my sebatical from Civ during the summer, I never got to it.
__________________
Units: War Pigs, Siege Quinquereme

Mod Comps: Heroes, Unique National Wonders
Edgecrusher is offline   Reply With Quote
Old Sep 19, 2008, 04:43 PM   #16
phungus420
Deity
 
phungus420's Avatar
 
Join Date: Mar 2003
Posts: 6,296
I tried, it failed. I think the AI can load and offload on coastal tiles, and coastal cities if you use the UnitAI_Assault_Sea tag. However, it for sure will never load/offload on inland tiles, which kind of makes these units pointless, unless you just want to have a one up on the AI.
phungus420 is offline   Reply With Quote
Reply

Bookmarks

Go Back Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization > How to mod a Troops carrier unit?

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
New Unit: Jump Carrier Kinboat Civ3 - Unit Graphics 38 Sep 30, 2011 12:34 AM
Submarine Carrier Unit Rrakkiss Civ3 - Unit Graphics 17 May 07, 2006 04:43 PM
Unit in progress: Super Carrier Neomega Civ3 - Creation & Customization 23 Mar 23, 2005 10:10 PM
New unit: Kiev Class Carrier Dragon King Civ3 - Unit Graphics 16 Oct 20, 2002 08:21 AM
Attn Mod Fans! Can you Make me a unit!(Troop Carrier) Bugg Civ3 - General Discussions 0 Dec 22, 2001 09:32 PM


Advertisement

All times are GMT -6. The time now is 11:14 AM.


Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
This site is copyright © Civilization Fanatics' Center.
Support CFC: Amazon.com | Amazon UK | Amazon DE | Amazon CA | Amazon FR