UnitIcons

Modders can post their questions on scripting and more.

Moderators: Slitherine Core, BA Moderators

Post Reply
junk2drive
BA Moderator
BA Moderator
Posts: 1478
Joined: Sun May 23, 2010 4:47 pm
Location: Arizona USA -7GMT

UnitIcons

Post by junk2drive »

I think I see from Merr's Rally mod that uniticons has 7 spots. 2 4 8 16 32 64 128
The yellow Pacman for prepared is not used as far as I can tell.

Is there a 255 limit?

My thought was to shrink the current 1024x1024 to 512x512 and double the space. The next icon would be 256 512.
pipfromslitherine
Site Admin
Site Admin
Posts: 9937
Joined: Wed Mar 23, 2005 10:35 pm

Post by pipfromslitherine »

I'd have to check the code but my guess is that it's limited to just 8 entries. It's a small thing that I would like to make more flexible, but it needs to work without breaking all the current assets.

Cheers

Pip
junk2drive
BA Moderator
BA Moderator
Posts: 1478
Joined: Sun May 23, 2010 4:47 pm
Location: Arizona USA -7GMT

Post by junk2drive »

Shrinking didn't work. I guess I'll have to wait until you add more slots somehow.

In the meanwhile I used 16.

Image
junk2drive
BA Moderator
BA Moderator
Posts: 1478
Joined: Sun May 23, 2010 4:47 pm
Location: Arizona USA -7GMT

Post by junk2drive »

What is the trigger that picks the line that the icon comes from?

I see places where it sets or resets uniticonmask for suppressed, loaded, hold fire but I can't find when you get a promotion that it moves down a line.
pipfromslitherine
Site Admin
Site Admin
Posts: 9937
Joined: Wed Mar 23, 2005 10:35 pm

Post by pipfromslitherine »

The line that it uses is defined by the unit status - the main game uses that for promotions etc, but it's not hard coded that the status is anything specific.

Cheers

Pip
junk2drive
BA Moderator
BA Moderator
Posts: 1478
Joined: Sun May 23, 2010 4:47 pm
Location: Arizona USA -7GMT

Post by junk2drive »

//returns the status of the unit, [0,3]
GetUnitStatus(id)

//sets the status of a unit. Valid values are 0,1,2,3. Changes the icon set used, and can be used to give extra abilities
SetUnitStatus(id, status)

So while we can add the 8th icon and get that to work, line 4 can be set in the editor but doesn't mean anything.

Am I wrong?
pipfromslitherine
Site Admin
Site Admin
Posts: 9937
Joined: Wed Mar 23, 2005 10:35 pm

Post by pipfromslitherine »

The 4th state is not currently used by the game, no.

Cheers

Pip
Post Reply

Return to “Battle Academy : Modders Corner ”