I have never used the editor, but I would like to make this simple extension mod to play with my friends: automatically share resources (we would only use vs AI due to imba).
I searched through trigger actions, but don’t see this. Any idea how to do this, or if there’s a mod already out there?
Set Alliance Aspect / PlayerSetAlliance maybe?
Thx- I tried SetAllianceAspectForPlayerGroup((PlayerGroupAlliance(c_playerGroupAlly,1)),c_allianceIdSpend,true)
…but this did not work on my test run (I don’t know if this makes a difference, but I tested with 1 AI ally).
Did you put it in a trigger that react to the event :
Player Changes Alliances
- Player: Any Player
in raw:
TriggerAddEventPlayerAllianceChange
- p: c_playerAny
Also, hopefully the AI can’t break the alliance, in which case it would explain why it would not have worked.
Or maybe resource sharing don’t work with AI…but as I’m writing this, I doubt it, I feel like I’ve seen it done before.
edit: also, Initially I was thinking (because I don’t use the editor often) of a more brute force approach that using groups like name:
Player Group -For each player Untitled Variable 001 in (All players) do (Actions)
Actions
General -If (Conditions) then do (Actions) else do (Actions)
If
(Controller of player Untitled Variable 001) == User
Then
Player Group -For each player Untitled Variable 002 in (All players) do (Actions)
Actions
General -If (Conditions) then do (Actions) else do (Actions)
If
(Controller of player Untitled Variable 002) == User
Then
Player -Turn player Untitled Variable 001 Resource Spending On towards player Untitled Variable 002
Else
Else
Though that exclude computers, so an additional code would have been needed to test it with a computer ally.
Appreciate your time, but I didn’t get very far until I was lost on how to do this. I did do one workaround by giving allied players control of each others units, spending, and vision. This is pretty interesting because the F2 does not select your ally’s units (you have to manually select them by clicking or boxing), but you can still control-grp your ally’s units. This is perfect! The only bad part is, you cannot actually see how many resources your ally has, even though you can spend them. This means I might have to script a dialog box or something, which shouldn’t be an issue…