Some advice from modders, please.

Rathelon

Prince
Joined
Mar 10, 2006
Messages
423
Location
Portland, OR
I'm trying to create a few more changes for Civ IV, and I think most of them are fairly simple XML modifications, but I'd appreciate some input from the more experienced guys here. I've done modding for Freelancer in the past (mostly just editting .ini files and .dll files - no modeling), and I've been working on the XML files a bit in Civ IV.

So far, my custom mod includes some things made by you good folks here, and a couple minor XML changes I've made. I've added in the Mobile Artillery and Mobile SAM that came with patch 1.52, custom flags (courtesy of Rhye, Bad Ronald, and Krispa), and Willowmound's diplomacy text. I also changed some game text myself, removed global warming, changed a couple civ colors, and changed the names of Praetorians to Roman Legion and Colosseum to Stadium (inspired by another person here).

Many of the additional changes I want to make are inspired by ideas discussed here, or things that were in previous Civ versions that are missing.

1. Make the Stealth Bomber unique to America, but add a new unit for everyone else called a Long Range Bomber. I know I can do this in XML, though I'll have to borrow somebody's model for the Long Range Bomber. Though, I'm not exactly sure how to make the Stealth Bomber unique. Should I just remove the evasion bonus from the default Stealth Bomber, and rename it in the GameTextObjects file to display as Long Range Bomber and replace it's graphics with the new model. Then create the original Stealth Bomber (using the backup files) model as a new unit, unique to the Americans?

2. Change Navy Seals to Special Forces (no longer a unique unit). I know this is just XML changes also (assuming I just keep the old model - which I probably will). I'd have to remove it as a unique unit from America, and then do what to make it available to every civ? Or is that all I need to do?

3. Marines dont become obsolete. Another easy one, I think. Do I just remove the upgrade to mechanized infantry from their unit tag in the UnitInfos file?

4. Cavalry upgrades to armor (i.e Tank), as well as Gunship. Personal preference, since I was an armor crewman in the Army, but I was in the 1st Cavalry Division. Another simple one, I think. Just add an the additional upgrade to the end of the Cavalry definition, correct?

5. Add in a transport helicopter. For this one I've already downloaded Nautil's Chinook and MI26 helicopters, but there doesnt seem to be enough .nif files to create the new unit. The Mobile Artillery and Mobile SAM had a dozen or so files associated with them, but Nautil's models only have 3 each. Not sure what to do here?

6. Make helicopters (Gunships and the proposed transport) able to fly over water, and also able to land on aircraft carriers. I know how to make them able to land on carriers, simple enough. And, I've read that you can just change the Gunship to DOMAIN_NONE to make them fly over water - but when I tried that, it only was able to move 1 space per turn. I must be missing something.

7. Let Submarines carry Special Forces. Submarines can carry SPECIALUNIT_PEOPLE, and SPECIALUNIT_PEOPLE is defined in the GameTextInfos as 'Scouts, Explorers, Missionaries, Spies, Great People'. Now, if I add Special Forces here, all that's going to do is make it display to the player that Submarines can carry Special Forces. How to I make the game know that Submarines can carry them?

The last two things I want to do, I dont think can be done in XML, which is the limit of my knowledge so far. I would like to have Artillery and Mobile Artillery be able to attack/bombard from more than adjacent tile. At least 1 or 2 tiles range. I'd also like workers to have the ability to build Airstrips again, and have Airstrips act like a city when it comes to healing rate of units positioned there. In fact, that would be another addition to make Forts more useful as well - for land units. Make Forts give the same healing bonus as a friendly city.

Any advice or tips would be appreciated.
 
1) Sounds right.
2) Just remove it from America, and give it it's own unitclass (in UnitInfos, and UnitClassInfos).
3) Should be
4) Yes
5) Wait for more units I think...
6) SDK work. I've already done something similar for my mod, but I don't have the code with me, and some stuff is mod-specific anyway. Hopefully somebody will post a MODCOMP which does adds a new domain to do this. (TheLopez?) :p
7) In your Special Forces entry, make them SPECIALUNIT_PEOPLE, like has been done with the others

Other stuff is SDK/Python work. Some has been done already, some is being worked on.
 
Can you add new UnitClasses? I thought I read something about not being able to do that without the SDK?

Because to add in the transport helicopters and the Special Forces so they are available to all civs, I'd have to add them to the UnitClassInfo.
 
Yes.

You cannot add domains or unit_AIs without the SDK, but they are the only two I can think of off the top of my head.

When adding unit classes make sure that they appear in the same order in CIV4UnitClassInfos.xml as they appear in CIV4UnitsInfos.xml.
 
IIRC #5 can be done and sure you need new models, but the problem is that the AI has no idea how to handle paradropping -- am I right about that TGA?
 
The Great Apple said:
6) SDK work. I've already done something similar for my mod, but I don't have the code with me, and some stuff is mod-specific anyway. Hopefully somebody will post a MODCOMP which does adds a new domain to do this. (TheLopez?) :p

I think Kael already answered this, here is the link:
http://forums.civfanatics.com/showthread.php?t=167041
 
Well, I was going to make the Transport Helicopter function similiar to the Gunship, but with less attack power. Basically, just a way to shuttle units over land/sea ignoring terrain costs. They would still load/unload from the helo like they do from Transport ships. Since the Transport Helos would be weak, you'd want to escort them with Gunships. No need for creating an airdrop code.

I've been working on these modifications today, and so far #3, 4, and 7 are done. I also stole another idea from here, and moved Cannons back to Gunpowder to bridge the gap between Catapults a bit.

I also worked on changing Navy SEALs to make them a little more covert, rather than just a slightly improved Marine. I took away their bonuses vs Artillery and Machine Guns, and instead made them invisible to most units, able to enter rival territory without triggering war, and they can conduct the Sabotage mission (like a Spy). I also gave them 75% withdrawal chance.

They cannot Steal Plans, Investigate Cities, or Destroy Production though - those still require a Spy. I let Spies and Recon units have the ability to see Navy SEALs, so that gives people a reason to keep a few Scouts or Explorers around, if they dont have Spies (You can attack an invisible unit with a unit who cannot see it, as long as one of your units that can see it is nearby to spot them. I tested this with a battleship and submarine. I had a destroyer nearby who spotted the enemy sub, and my battleship attacked and killed it alone). I'm also probably going to put a limit on these, because having stacks of them wouldnt be very balanced.

The only hitch I have with these Navy SEALs is in the Civilopedia, when you look at their description, it says they are 'Invisible to all units', even though they are not. Scouts, Explorers, and Spies can see them.

In the GameTextInfos.xml there are two entries; TXT_KEY_UNIT_INVISIBLE_ALL and TXT_KEY_UNIT_INVISIBLE_MOST. These are where the civilopedia texts are defined, but I could not find anywhere in the other files where you would put these tags. I compared the Submarine's UnitInfos entry to my editted Navy SEALs entry and there isnt anywhere that the Submarine specifies to use INVISIBLE_MOST.

It's not a big thing, because they are working correctly, but I would prefer it said 'Invisible to most units' so as not to be misleading.

I tried to put in the B52 model posted here in place of the Stealth Bomber, but it didnt work (that is, I couldnt figure it out). I still want to add in a new model for the Transport Helicopter, Long Range Bomber, and something to distinguish Special Forces from Navy SEALs. If anyone can give me some tips on that, it'd be appreciated. I havent decided if the Special Forces will be stealth units like the Navy SEALs or not.
 
TheLopez said:
I think Kael already answered this, here is the link:
http://forums.civfanatics.com/showthread.php?t=167041
Hmmm. His solution isn't really very good IMO. While it works, it would be alot neater to add an extra domain - which is a bit more work (though admittedly still not too hard).


About invisible unit naming - I don't really know. Sorry.
 
The Great Apple said:
Hmmm. His solution isn't really very good IMO. While it works, it would be alot neater to add an extra domain - which is a bit more work (though admittedly still not too hard).


About invisible unit naming - I don't really know. Sorry.

You're right. My dilema is that domains are used in a lot more places than just unit movement (most notably all through the AI code). If a new domain is added, which I would love to see, it is going to be a lot of work to get the AI to use it correctly.

My workaround allows the AI to use them as land units and disregard water if they have the appropriate setting (bImpassable in my example, I will move this to a unique tag someday). Simple, but as you say, not the ideal solution. At a functional level I guess its the same, but not as clean.
 
I guess I'll add coming up with a combined LAND/SEA domain that works correctly to my growing todo list... :D.
 
Top Bottom