I am currently working on a purchasing system. All costs are in ore. There would be a unit for sale at a pre-determined amount from player 5 6 or 7. These 3 players have the ability to set the cost of the unit by sending a civilian to a location 100, 250, 500, 1000, or 5000 up to 4 times. Each time the civilian goes to the location a respective power up is created to visually display cost. There is no specific order or combination required. As an example, a unit could be for sale for 100 + 250 + 100 + 5000 (=5450 ore.) Total cost of the unit could result anywhere from 100 to 20,000 ore all based by the players 5 6 or 7 selection.
To give you as much info as I can, each power up (flag, larva, crystal, etc) representing a cost, spawns in its own location. There are 4 of these power up locations for players 5, 4 locations for player 6, & 4 locations for player 7.
I have spent a few days considering my possibilities of how to turn a power up unit into a resource cost, and the only feasible solution I can come up with is by using death counts.
Here would be a small example of how I would select the death counts based on power-up. Of course each location would need a trigger for all 5 different power ups.
If player 5 brings 1 psi emiter ($100) to location 1.
Add 100 cave deaths for player 5
If player 5 brings 1 flag ($250) to location 2.
Add 250 cave deaths for player 5
If player 5 brings 1 psi emiter ($100) to location 3.
Add 100 cave deaths for player 5
If player 5 brings 1 crystal ($5000) to location 4.
Add 5000 cave deaths for player 5
With these triggers I now have reference for cost. Every death of cave player 5 has would = the total cost of the unit. Now with a total cost system its just a matter of setting the rules for the buy. The triggers would look something like
Conditions:
Bring("Player 1", "Terran Civilian", "Location 10", Exactly, 1);
Deaths("Player 5", "Cave", Exactly, 100);
Accumulate("Player 1", At least, 100, ore);
Actions:
Set Resources("Player 1", Subtract, 100, ore);
Set Resources("Player 5", Add, 100, ore);
Conditions:
Bring("Player 1", "Terran Civilian", "Location 10", Exactly, 1);
Deaths("Player 5", "Cave", Exactly, 150);
Accumulate("Player 1", At least, 150, ore);
Actions:
Set Resources("Player 1", Subtract, 150, ore);
Set Resources("Player 5", Add, 150, ore);
Conditions:
Bring("Player 1", "Terran Civilian", "Location 10", Exactly, 1);
Deaths("Player 5", "Cave", Exactly, 200);
Accumulate("Player 1", At least, 200, ore);
Actions:
Set Resources("Player 1", Subtract, 200, ore);
Set Resources("Player 5", Add, 200, ore);
etc..
Conditions:
Bring("Player 1", "Terran Civilian", "Location 10", Exactly, 1);
Deaths("Player 5", "Cave", Exactly, 5450);
Accumulate("Player 1", At least, 5450, ore);
Actions:
Set Resources("Player 1", Subtract, 5450, ore);
Set Resources("Player 5", Add, 5450, ore);
I am confident this system would work. Where the hesitation lies is the vast amount of triggers it would require. Player 5,6 & 7 each have their own selling location and players 1-4 each have their own purchase location for each selling spot. So if I follow this line of thought, at purchasing increments of 50, Player 1 buying from Player 5 would require 400 triggers (increments of 50 to max of 20,000.) Player 5 has 4 people they can sell to resulting in 1,200 triggers total for Players 5 selling system. With 3 sellers, this would require 4,800 triggers. I honestly don't know if I have the patience to edit 4,800 triggers in notepad. God forbid I mistype on one trigger, don't know if I would ever find it.
I hope I have been descriptive enough for you to understand the current layout and potential issues. Does anyone have advice to simplify this process? Thanks for your time!
Buzz
None.