Access Unit Attributes

A new section for modding SOW Waterloo. Ask questions, post tips here.
Post Reply
Marching Thru Georgia
Reactions:
Posts: 1769
Joined: Mon Mar 29, 2010 9:56 pm

Access Unit Attributes

Post by Marching Thru Georgia »

In the AI code, is there a way to access a unit's attributes, such as experience, closed order proficiency, etc.?
I can make this march and I will make Georgia howl.
mitra76
Reactions:
Posts: 933
Joined: Wed Mar 31, 2010 1:21 am

Re: Access Unit Attributes

Post by mitra76 »

No you cannot access them directly, you can access to the values generated by them in unitattributes.csv
Visit my wargames blog: http://warforgame.blogspot.it/
Marching Thru Georgia
Reactions:
Posts: 1769
Joined: Mon Mar 29, 2010 9:56 pm

Re: Access Unit Attributes

Post by Marching Thru Georgia »

What function accesses column B of unitattributes for the different attributes?
I can make this march and I will make Georgia howl.
mitra76
Reactions:
Posts: 933
Joined: Wed Mar 31, 2010 1:21 am

Re: Access Unit Attributes

Post by mitra76 »

you access using int GetMod ( int type ) with the enum EGame which represents the column from D and successives, the column B is not accessible. The function returns the cumulate value of the column
Visit my wargames blog: http://warforgame.blogspot.it/
Marching Thru Georgia
Reactions:
Posts: 1769
Joined: Mon Mar 29, 2010 9:56 pm

Re: Access Unit Attributes

Post by Marching Thru Georgia »

That's not very useful. I request a function be created that can access a unit's attributes directly. I want to be able to allow or prohibit units of certain skill levels from doing things such as changing from column to line while under fire.
I can make this march and I will make Georgia howl.
mitra76
Reactions:
Posts: 933
Joined: Wed Mar 31, 2010 1:21 am

Re: Access Unit Attributes

Post by mitra76 »

I'll ask to Norb if it is possible
Visit my wargames blog: http://warforgame.blogspot.it/
Post Reply