User avatar
McNaughton
Posts: 2766
Joined: Wed Mar 21, 2007 8:47 pm
Location: Toronto, Canada

Changing a Unit type, and Unit name

Sat Oct 20, 2007 1:43 pm

Is it possible, via events, to change a unit from one type to another?

For example, I want to change a Volunteer Brigade to be a 'Regular' Brigade in an event. I don't want to do the individual model upgrade (i.e., alter models one at a time) but would rather change the entire unit (i.e,. from uni_CSA_VolBde to uni_CSA_Bde8MO)

Also, is it possible to change a unit's name through events? I am interested in this to show the change of brigade name as the game goes through (for some units). For example, to rename the 'California Bde.' to become 'Pittsburgh Bde.' (representing the change, without having to add an entire new unit, and delete the old one).

User avatar
Pocus
Posts: 25673
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Sat Oct 20, 2007 7:04 pm

Would the first command change the models incidentally or you just want to change the UID of the unit (pointing to another unit in the DB).
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

User avatar
McNaughton
Posts: 2766
Joined: Wed Mar 21, 2007 8:47 pm
Location: Toronto, Canada

Sat Oct 20, 2007 7:23 pm

Pocus wrote:Would the first command change the models incidentally or you just want to change the UID of the unit (pointing to another unit in the DB).


Basically, I want a specific Brigade (one of Price's Missouri State Troop) to change to a Confederate 'Regular' Brigade (representing the change of force from Missouri to Confederate command, as historically happened).

I know that units can be trained, from State Troop to Regular, but, I want a specific unit to change (entirely) from a Militia to a Regular brigade (I have figured this one out by existing events) but have not seen anything similar as to units.

I could do so by removing this militia brigade via event, and adding a regular force to the same unit (simulating this change, but adding and removing entire units), but was wondering if I could keep the unit in the game, just change its designation. I think I may just do this, as it will do the same thing and I know how to do it already.

However, I wonder if you can rename units via the event system?

User avatar
Pocus
Posts: 25673
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Sat Oct 20, 2007 7:55 pm

No you can't rename units, but I will add the command, no big deal.

So for the first command, you just don't want to change the UID of the unit, without changing the elements within. You want also to erase all elements within the unit and add new ones? This is much more tricky and basically you are destroying the first unit and creating another one, although not quite, as with your command you would retain experience for example. My problem is how to map the original elements into the new ones.
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

User avatar
Pocus
Posts: 25673
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Sat Oct 20, 2007 7:57 pm

Taking an example, I have a depleted brigade with only one arty unit, and I have to convert it into another brigade. In you case, you would want that I create the infantry elements, but only alter the old artillery into the new one, retaining experience? That would ask for a bit too much of a work I think.
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

Return to “Modding AGE engine games”

Who is online

Users browsing this forum: No registered users and 9 guests