Help Wanted Ads

I was thinking two things. First, it's a GLOBAL seed vault, so it should have everything. Second, by the time the Vault is ready to be built (late Modern Era, Ecology + Genetics), I probably have most of these resources already, so the Vault fills in a few gaps and gives some extra trade resources. I rarely trade resources, so maybe it doesn't seem as unbalancing to me.

Ah, I hadn't twigged that it was late modern. Yeh, I agree it should be fine in that case.

This is te wrong thread to discuss this. What affect does it have on corporations?
 
I've been working on making a new ship for the modern era, akin to the concept I posted in This thread and need some help. The unit is both a carrier and a transport unit, so what unitais will I need to assign it to work properly? Would the AI even recognize how to use a dual carrier/transport without borking itself.

I thank in advance anyone who helps me, learning to mod can be hard. :)
 
I've been working on making a new ship for the modern era, akin to the concept I posted in This thread and need some help. The unit is both a carrier and a transport unit, so what unitais will I need to assign it to work properly? Would the AI even recognize how to use a dual carrier/transport without borking itself.

I thank in advance anyone who helps me, learning to mod can be hard. :)

You can give a unit multiple ai types, though you have to pick one as it's default. In practice the ai would not make effective use of this combo, because when it builds a unit it assigns ONE ai type to it from the list of those it supports (that list is more a filter criteria for the ai to decide what to build to fulfill a fixed role than anything else). Once chosen a units ai type only changes under very rare and unusual circumstances, which transitions are all explicitly coded in the ai in the DLL. Since this particular transition is not coded for it basically wouldn't happen, so each unit of this type that got built would simply be used as either a transport or a carrier, not a flexible unit that sometimes acted as one, and sometimes the other. In practise, due to cheaper options being available I suspect the ai would never build it at all, or if it did then only in the carrier role.

To utilize units with flexibly deployment capabilities like this you'd have to write specific ai routines for it, or possibly generically extend the existing routines to understand the concept of being able to change the ai type to match the situation. The second approach (allow ai type switches dynamically) is probably the way to go, but it would be a fairly involved piece of work (and you'd need to modify ai unit valuation at build time also for it to see the value of such units, since logically they would be more expensive than single purpose units).

All this doesn't mean you can't define such a unit and give the human player the benefit of it, but I'm afraid it's not likely to be effectively used by the ai, so in the long run (without substantial DLL work) it would be in danger of becoming a balance issue.
 
@Koshling: Thanks for your response, even though it means that I'll have to find a different unit to make. One other quick question though. In existing Naval unit XML I saw several unit AIs, including naval attack, reserve, and support. Are all of those AIs nessesary to make the AI work properly? What AIs does 'every' ship need to have the AI not suck?

Edit: One more thing (sorry for pestering), but would the AI understand how to use a naval unit with the SUICIDE UnitAI?
 
@Koshling: Thanks for your response, even though it means that I'll have to find a different unit to make. One other quick question though. In existing Naval unit XML I saw several unit AIs, including naval attack, reserve, and support. Are all of those AIs nessesary to make the AI work properly? What AIs does 'every' ship need to have the AI not suck?

The ai types are basically the roles that the ai understands. When it decides what to build it evaluates what role it needs to fill at that time, and looks for the best unit it can build that has the corresponding ai type (with some small preference for those that have it as their default type). So basically a unit needs at least one ai type, for the ai to have a chance of wanting to use it. The more ai types it specifies, the more roles the ai will consider building it to fill.

The main ai types are the fairly obviously named ones ( attack, defense, etc.). Unless you intend a unit for a niche role, just give it the ai types that seem obvious given it's stats (so if it has high strength it's probably good in the attack or defense roles for example). The ai will cope just fine with units that only have one ai type - it just means it won't try to deploy them in roles othe than the one that type is intended for. Mostly, as I mentioned in my previous post, it's a filter applied when it is deciding which specific unit to build (already decided what role it wants to fill).

If in doubt start with just one ai type on the unit, play test a bit, and if you think the ai should using it more widely than it does, add a few more. The other thing to bear in mind is that when it decides to build a unit to fulfill a role, it essentially evaluates the effectiveness of every unit it knows how to build that has that roles ai type. Apart from a small random element it will choose the one that evaluates highest (cost is part of the evaluation, so there's an element of 'best value' here), so if you define a unit that doesn't have some concrete advantage over other units available at the same techs, or resources required to build, unless it's substantially cheaper to build, it isn't going to get built much anyway. Usually the variation you'll want to ensure, to get a good mix, will be in requirements to build relative to the other already existing alternatives (so requiring aluminum say to get a unit that is better than the equivalent steel unit in some way)
 
Not that this is the correct thread for any of this but...

Technically, the base BtS DLL will base air units on units without the carrier unit AI. It will not do certain behaviors of the carrier unit AI if it has the transport unit AI, but you wouldn't want it to since that would mean it wasn't acting as a transport properly.

The main problem is that it only builds air units with the proper unit AI to get them to load onto other units if there are units with the carrier unit AI. This is because it only checks for unused cargo space on units with the carrier unit AI type to determine the value of building more air units that get the "UNITAI_CARRIER_AIR" unit AI type (the only one for regular air units that will get them to load onto other units). A secondary problem is that only the proper carrier unit AI has the extra code to force its cargo to recheck their moves on the same turn the carrier arrives at its destination (so any that did not already attack can do so after the carrier moves) - since air units are normally checked before the others this means they will wait until the start of the next turn to attack, both missing an opportunity to attack and giving enemy units a chance to sink the ship they are on before the air units have done anything.

If you have some ships with the carrier unit AI, UNITAI_CARRIER_AI, it may (more or less accidentally) load some of the carrier air units onto units that do not have that carrier unit AI (like units that have the transport unit AI, in this case). You will just find that there tends to be a shortage of such air units.

This is different than missiles. Missiles will only load themselves onto a specific set of unit AI types via a series of calls in the CvUnitAI::AI_missileAirMove function (it will put as many as can be carried onto a unit with UNITAI_MISSILE_CARRIER_SEA, or a limited number onto units that have UNITAI_RESERVE_SEA or UNITAI_ATTACK_SEA). This is probably because there is no specific unit AI type for them that is just for missiles to be loaded onto ships: every missile has the same unit AI type (UNITAI_MISSILE_AIR). The non-missile air units use the opposite method: these air units have a specific unit AI type (UNITAI_CARRIER_AIR) just for the ones that go onto carriers and any air unit with that unit AI can load itself onto any unit that is capable of carrying it regardless of what unit AI that other unit has - it rates every unit (even ignoring the domain, so it can load them onto land units or, in theory, even other air units) and loads itself onto the one that gets the highest rating.

I have been messing with this sort of thing a lot recently, getting the units in Final Frontier Plus (which are all land units since the space terrain is actually land) to carry missiles and squadrons. I have added checks for units without the carrier type unit AI (both regular and missile) to count the number of available cargo spaces (I currently only use half the empty cargo spaces, rounded up, on units with non-carrier unit AI types so as to not give it too high of a value).
 
Well, on God-Emperor's response I went ahead and started on the unit, but have hit a new roadblock. The <domaincargo> for the Nuclear Carrier is AIR, while for the Transport in LAND. However, the carrier has the <specialcargo> FIGHTER. Are both the domaincargo and the specialcargo nessesary?

Also, just thinking, if the <specialcargo> FIGHTER limits the cargo to only Air to Air that would be good, it would enhance the role of this craft. I have no idea how this works though so an explanation would be appreciated.
 
@ls612

Here is what the modiki says:

DomainCargo: The Domain (AIR, SEA, or LAND) of units that the unit can carry.

SpecialCargo: The type of SpecialUnit that the unit can carry.

There is a distinct difference here.
 
So, does that mean that if I set specialcargo to FIGHTER and domaincargo to LAND that the unit could carry both aircraft tagged with SPECIALUNIT_FIGHTER and land units?
 
So, does that mean that if I set specialcargo to FIGHTER and domaincargo to LAND that the unit could carry both aircraft tagged with SPECIALUNIT_FIGHTER and land units?

I think it means that you can carry land units of type fighter but I could be wrong. the only way to be sure is to try it.
 
So, does that mean that if I set specialcargo to FIGHTER and domaincargo to LAND that the unit could carry both aircraft tagged with SPECIALUNIT_FIGHTER and land units?

OK the only thing that can go into the SpecialCargo are those listed in this file ONLY:

CIV4SpecialUnitInfos.xml (located in the units folder)

but in regards to your question, i dont see why not.
 
Well, I created my module with the requsite files and such, but now it refuses to load, the game is unchanged. What did I do wrong. Attached is the module and the MLF.

*attachment removed*
 
Well, I created my module with the requsite files and such, but now it refuses to load, the game is unchanged. What did I do wrong. Attached is the module and the MLF.

View attachment 312029
View attachment 312030

I can repeat your problem. Could it be because Orion Veteran's Pirates mod has same named units? UNITCLASS_ASSAULT_SHIP? I would not have thought so.
 
I can repeat your problem. Could it be because Orion Veteran's Pirates mod has same named units? UNITCLASS_ASSAULT_SHIP? I would not have thought so.

Ahh, that might be it. I'll have to change it all to AMPHIBIOUS_ASSAULT_SHIP and try again tomorrow.
 
Well, that wasn't right, the module still failed to load. Modified files attached.

View attachment 312133
View attachment 312134

If that is your modular loading file then the answer may be that you forgot to include your folder in the list.

Edit putting your folder in did not work either :( Continuing to investigate. It has to be something simple.
 
Top Bottom