How to make a guerilla unit?

VeteranLurker

Warlord
Joined
Nov 8, 2006
Messages
259
Location
Ann Arbor, MI
I posted this in the Creation and Customization forum, but haven't had any responses yet. Perhaps this is a better place for it, since I am working on a mod of RTW...

I've looked through the threads and downloads and haven't found quite what I'm looking for, so I'll ask here. I am working on a mod of the Road To War mod (BTS, 3.17) and want to add a guerilla-type unit for each of the mod's 'religions' (rather, ideologies: fascism, communism, democracy, neutral). Ideally, I want this unit to be much like a privateer -- no-nationality, can attack without DoW -- only on land, with defensive promotions like guerilla/woodsman/etc. This is to represent the guerilla/resistance type units which conducted proxy-like wars, like the International Brigades during the Spanish Civil War, the partisans in Yugoslavia, etc. The unit is otherwise a low-power infantry unit which would not fare well in direct combat until it picks up promotions/upgrades and/or is supported by regular-army units, is more expensive than comparable infantry, and is limited to a certain number of national units.

The problem I am running into, as with privateers, is that EVERYONE attacks the guerilla units whenever they find them, since of course with bHiddenNationality=1 and bAlwaysHostile=1 they are everyone's enemy. What I would like is to have most everyone attack these units EXCEPT for units with the same ideology (such as other guerillas) or regular units from countries with the same ideology. Is there a way to attach ideology to these units, and have other units able to see this and respond accordingly?

In the Spanish Civil War example, the Nationalist units (fascists) would not attack the hidden-nationality fascist guerilla unit, since it considers it an ally. However, the Republican units (communists) would of course attack fascist guerillas if they find any nearby.

A workaround would be to make the guerilla units invisible (and turn off the HiddenNationality), but that isn't really accurate, could become overpowered (though it could be countered by making some regular units able to see invisible), and would likely be a hassle for the AI to handle in a reasonable way.

I am new to modding, and currently am only able to handle manipulating the XMLs, so if the solution is in Python and/or the SDK then I will be out of my element. Perhaps someone has already done something like this and can point me to an example?
 
My next attempt has been to make the guerilla unit invisible, still with hidden-nationality and always-hostile (just like privateers). But now I am adding a secret police unit to counter it, which has comparable combat strength and promotions but also has the ability to see invisible units. I was going to add the secret police anyway, as a means of removing rival ideologies (religions) from one's cities, but this expands their usefullness; they will also be a low-cost city-defense and crowd-control unit.

Not a perfect solution for the guerilla/partisan, but now it might be playable. Thoughts?
 
Top Bottom