X2CommunityCore / X2WOTCCommunityHighlander

https://steamcommunity.com/workshop/filedetails/?id=1134256495
MIT License
60 stars 68 forks source link

Add an Event to arbitrarily set soldier class when they are first promoted #801

Closed Iridar closed 4 years ago

Iridar commented 4 years ago

Adding an Event to the start of XCGS_Unit::RankUpSoldier would allow mods setting soldier's class based on arbitrary conditions when they are first promoted.

For example, when used alongside Not Created Equal, it would be possible to make high aim soldiers gravitate towards becoming snipers.

Iridar commented 4 years ago

Will 'PreUnitRankUp' do as the name for the event? Considering it happens just a bit earlier than ''UnitRankUp', I think it'll be fine.

pledbrook commented 4 years ago

Another option is something like 'OverrideRankUpSoldierClass' since that appears to be the primary purpose of the event.

Wondering how this will impact mods like Commander's Choice. Would it make life easier for them? Is it irrelevant?

Iridar commented 4 years ago

Another option is something like 'OverrideRankUpSoldierClass' since that appears to be the primary purpose of the event.

Wondering how this will impact mods like Commander's Choice. Would it make life easier for them? Is it irrelevant?

I'm not sure how commander's choice works, however only after pushing the commit I realized the mod would just be a complicated alternative to commander's choice, so idk if it's of any relevance.

Iridar commented 4 years ago

Closing the issue, because Commander's Choice does the same thing.

Iridar commented 4 years ago

Reopening because Commander's Choice does big bad voodoo.