Are these unit ideas codable?

isnorden

Amnesiac Modder
Joined
Jul 6, 2012
Messages
608
Location
Madison, Wisconsin, USA
A few unit types I was thinking of adding to BNW, after seeing too many Settlers and religious units die (especially at sea):


  1. Crusader: Combat strength and maintenance costs similar to a Spearman; does not upgrade. May spread an existing religion once, although this destroys the Crusader. Must be bought with Faith; costs 125% of a standard Missionary's value. Requires the Theology tech.
  2. Missionary Ship: Move of 3; defensive strength only, does not upgrade. Can spread an existing religion to adjacent coastal cities; vanishes after 2 uses. Must be bought with Faith; costs 125% of a land-based Missionary's value. Requires the Astronomy tech (for long-distance sailing).
  3. Colony Ship: Move of 3; defensive strength only, does not upgrade. Can found cities on adjacent coastal tiles (if no other rule forbids a city there). Costs 125% of a land-based Settler's value; requires the Astronomy tech.
  4. Pioneer: a Scout with the additional ability to found cities (in suitable locations, of course). Does not upgrade; costs 150% of a normal Settler's value. Requires the Construction tech (for building shelters in out-of-the-way places).


Is coding any of the above possible without DLL hacks? If you know, I'd appreciate any help you can offer. Thank you!
 
I believe all of these things are codable, yes.
 
#1, #2, and #4 should all be do-able with database changes only (i.e., XML or SQL). #3 is going to need some Lua to decide where to place the city. Unfortunately, the AI won't use the settle ability from #4 (like the Conquistador) without a DLL change (note that whoward69's DLL already fixes this). Getting the AI to settle with #3 is going to take some work.
 
#1, #2, and #4 should all be do-able with database changes only (i.e., XML or SQL). #3 is going to need some Lua to decide where to place the city. Unfortunately, the AI won't use the settle ability from #4 (like the Conquistador) without a DLL change (note that whoward69's DLL already fixes this). Getting the AI to settle with #3 is going to take some work.

Hmmm, it's a shame that Civ5 always crashes whenever I try to run a version of that DLL pack newer than v37 (too old for the AI hacks). I'm wondering if I could have a DLL pack made with just the few features I've needed, and see whether that can run normally -- but that's another thread.


As for the units that don't need AI hacks, I'd be glad to code the XML and find some suitable atlas art. I might aiso handle some Lua if the game already has similar code I can use as a guide. Beyond that, however, I'd ask for help; thank you for answering my questions and being patient with me.
 
ISNorden,

All you'll need to do to get the settler ability is to add

<Found>true</Found>

in the definitions of your units in the <units> table. I created a composite unit by copying everything in the Warrior unit into a new called a WarriorSettler, and added the Found command. I made the unit a unique replacement for the settler and added it to Rome, so I wouldn't have to uncheck so many mods that I am using in a game I'm mid-stream of. I can throw the file onto mediafire and give a link if you want. I didn't do anything past bare minimum to add the new unit, just to test concept. Hopefully there won't be a snag when you define your units as something other than settler unitclass.

I thought I'd go ahead and test concept because I fiddled around for so long after I said I would test-play your Trajan mod, and because, well, when I told you which table to use for the empire-wide requirement I really should have been a little more clear as to whether the table you were going to use was likely to give the effect you were after with a world wonder. Sorry about that. I made it sound at the time that I was 100% positive it was good to go when I was only about 98%.

Are we still *hugs* ?
 
ISNorden,

All you'll need to do to get the settler ability is to add

<Found>true</Found>

in the definitions of your units in the <units> table. I created a composite unit by copying everything in the Warrior unit into a new called a WarriorSettler, and added the Found command. I made the unit a unique replacement for the settler and added it to Rome, so I wouldn't have to uncheck so many mods that I am using in a game I'm mid-stream of. I can throw the file onto mediafire and give a link if you want. I didn't do anything past bare minimum to add the new unit, just to test concept. Hopefully there won't be a snag when you define your units as something other than settler unitclass.

I thought I'd go ahead and test concept because I fiddled around for so long after I said I would test-play your Trajan mod, and because, well, when I told you which table to use for the empire-wide requirement I really should have been a little more clear as to whether the table you were going to use was likely to give the effect you were after with a world wonder. Sorry about that. I made it sound at the time that I was 100% positive it was good to go when I was only about 98%.

Are we still *hugs* ?

Thank you again for your technical advice; you know how to explain a problem so that even a relatively inexperienced coder like me will understand.

P.S. Of course we are! *BIG HUGS*
 
All you'll need to do to get the settler ability is to add

<Found>true</Found>

in the definitions of your units in the <Units> table.

This will ONLY work for the human player. The AI is incapable of using a combat unit with Found=true to settle new cities. There are a couple of threads about this on these forums - search for "samurai fishing" IIRC (as it relates to the AI's inability to use combat units to build things as well - eg AI Legions won't build forts/roads, nor Samurai fishing boats)
 
This will ONLY work for the human player. The AI is incapable of using a combat unit with Found=true to settle new cities. There are a couple of threads about this on these forums - search for "samurai fishing" IIRC (as it relates to the AI's inability to use combat units to build things as well - eg AI Legions won't build forts/roads, nor Samurai fishing boats)

Why does that not suprise me? The more I learn about how Firaxis did the code, the more I realize they're not very good at making code that isn't just plain sloppy.

On the other hand, oooh, I can see so many shiney ways i can cheat without actually cheating!
 
Back
Top Bottom