Weirdoze
New Member
- Reaction score
- 6
INFO:
So, I've created an easy reputation system that can be used in all kinds of maps, using it is up to you. It includes a very basic ranking system (no rank names or anything) so feel free to expand the system in any way. (but if you use it as a template for something, please, do give me credits :thup
What does it require:
It is so simple without the rank system it requires laughable 4 triggers and 3 variables! (2 integer, 1 unit-type [1 integer and 1 unit-type with array]).
Where can I use it:
You can use it anywhere! By the system killing enemy units adds reputation and there are not too many wc3 mods where you don't kill enemies. Mostly it's made for an ORPG I'm working on, but you can use it in TDs, Tags.. or what ever you like.
Expanding the system:
I only made a very basic template of it, so you are free to expand the system in all directions (as mentioned before). Here I provide you with some ideas:
*You can make -rep from killing your own units just by changing all the + to -
*You can create rank names those are displayed when ever you want to see your reputation
*You can create different prices from acquiring a high reputation (I have prices in my map, but there is only experience) example: items, skills, control of some specific unit, alliance with a nation or.. anything
And here i present the system:
First, I'll be setting reputation values or units:
2 variables:
So, Reputation_Values is an integer with array 10 and it is used to detect the reputation amount gained from every unit. The other one Reputation_Units is an Unit-Type variable with array also 10 (array equals to the amount of units you want to set a reputation_value)
To the second trigger where I add the reputation to player
In the event a unit dies, and if the killer is equal to player red we add reputation to player red. This way it takes more time but I think it's easier. (The other way you set every unit a custom value [in object-editor] and add Player_Reputation the Custom value of unit) So, in the last trigger we set up unit types and reputation value, now all we have to do is add the reputation value to to players reputation. It's like, if a dying unit is a peon we add the reputation_amount of the peon (which is set to 20) to players reputation amount (integer without array, satrting value 0)
and down the third:
Now, when player red types in the message -sr (or what ever u want[sr = show reputation)] he will see the amount of reputation he has gained. And thats all with the triggers.
There are some "ranking" things in the map, but I don't see the need of adding those triggers here. (if you want to see them, just download the map)
Overall:
-The system is very flexible
-It can be modified easily
-You can use it in all maps
-It is noob friendly
Last words:
Just tell me if there is something wrong with this tutorial [map is tested and triggers should be leakless]. And if there are many who like this system, I will make a bigger and better tutorial [including things I mentioned in "Expanding the system"]. I guess that's all, if you like the tutorial give me +rep. I really tried to do something useful
*Comments are highly appreciated*
So, I've created an easy reputation system that can be used in all kinds of maps, using it is up to you. It includes a very basic ranking system (no rank names or anything) so feel free to expand the system in any way. (but if you use it as a template for something, please, do give me credits :thup
What does it require:
It is so simple without the rank system it requires laughable 4 triggers and 3 variables! (2 integer, 1 unit-type [1 integer and 1 unit-type with array]).
Where can I use it:
You can use it anywhere! By the system killing enemy units adds reputation and there are not too many wc3 mods where you don't kill enemies. Mostly it's made for an ORPG I'm working on, but you can use it in TDs, Tags.. or what ever you like.
Expanding the system:
I only made a very basic template of it, so you are free to expand the system in all directions (as mentioned before). Here I provide you with some ideas:
*You can make -rep from killing your own units just by changing all the + to -
*You can create rank names those are displayed when ever you want to see your reputation
*You can create different prices from acquiring a high reputation (I have prices in my map, but there is only experience) example: items, skills, control of some specific unit, alliance with a nation or.. anything
And here i present the system:
First, I'll be setting reputation values or units:
Code:
Settings
Events
Map initialization
Conditions
Actions
Set Player_Reputation = 0
Set Reputation_Values[1] = 10
Set Reputation_Units[1] = Peon
Set Reputation_Values[2] = 50
Set Reputation_Units[2] = Troll Headhunter
Set Reputation_Values[3] = 75
Set Reputation_Units[3] = Grunt
Set Reputation_Values[4] = 100
Set Reputation_Units[4] = Troll Witch Doctor
Set Reputation_Values[5] = 250
Set Reputation_Units[5] = Shaman
Set Reputation_Values[6] = 300
Set Reputation_Units[6] = Spirit Walker
Set Reputation_Values[7] = 500
Set Reputation_Units[7] = Raider
Set Reputation_Values[8] = 625
Set Reputation_Units[8] = Kodo Beast
Set Reputation_Values[9] = 750
Set Reputation_Units[9] = Tauren
Set Reputation_Values[10] = 1000
Set Reputation_Units[10] = Blademaster
So, Reputation_Values is an integer with array 10 and it is used to detect the reputation amount gained from every unit. The other one Reputation_Units is an Unit-Type variable with array also 10 (array equals to the amount of units you want to set a reputation_value)
To the second trigger where I add the reputation to player
Code:
Adding reputation
Events
Unit - A unit Dies
Conditions
(Owner of (Killing unit)) Equal to Player 1 (Red)
Actions
If ((Unit-type of (Dying unit)) Equal to Reputation_Units[1]) then do (Set Player_Reputation = (Player_Reputation + Reputation_Values[1])) else do (Do nothing)
If ((Unit-type of (Dying unit)) Equal to Reputation_Units[2]) then do (Set Player_Reputation = (Player_Reputation + Reputation_Values[2])) else do (Do nothing)
If ((Unit-type of (Dying unit)) Equal to Reputation_Units[3]) then do (Set Player_Reputation = (Player_Reputation + Reputation_Values[3])) else do (Do nothing)
If ((Unit-type of (Dying unit)) Equal to Reputation_Units[4]) then do (Set Player_Reputation = (Player_Reputation + Reputation_Values[4])) else do (Do nothing)
If ((Unit-type of (Dying unit)) Equal to Reputation_Units[5]) then do (Set Player_Reputation = (Player_Reputation + Reputation_Values[5])) else do (Do nothing)
If ((Unit-type of (Dying unit)) Equal to Reputation_Units[6]) then do (Set Player_Reputation = (Player_Reputation + Reputation_Values[6])) else do (Do nothing)
If ((Unit-type of (Dying unit)) Equal to Reputation_Units[7]) then do (Set Player_Reputation = (Player_Reputation + Reputation_Values[7])) else do (Do nothing)
If ((Unit-type of (Dying unit)) Equal to Reputation_Units[8]) then do (Set Player_Reputation = (Player_Reputation + Reputation_Values[8])) else do (Do nothing)
If ((Unit-type of (Dying unit)) Equal to Reputation_Units[9]) then do (Set Player_Reputation = (Player_Reputation + Reputation_Values[9])) else do (Do nothing)
If ((Unit-type of (Dying unit)) Equal to Reputation_Units[10]) then do (Set Player_Reputation = (Player_Reputation + Reputation_Values[10])) else do (Do nothing)
and down the third:
Code:
Showing reputation
Events
Player - Player 1 (Red) types a chat message containing -sr as An exact match
Conditions
Actions
Game - Display to (All players) for 10.00 seconds the text: (Your reputation: + (String(Player_Reputation)))
Now, when player red types in the message -sr (or what ever u want[sr = show reputation)] he will see the amount of reputation he has gained. And thats all with the triggers.
There are some "ranking" things in the map, but I don't see the need of adding those triggers here. (if you want to see them, just download the map)
Overall:
-The system is very flexible
-It can be modified easily
-You can use it in all maps
-It is noob friendly
Last words:
Just tell me if there is something wrong with this tutorial [map is tested and triggers should be leakless]. And if there are many who like this system, I will make a bigger and better tutorial [including things I mentioned in "Expanding the system"]. I guess that's all, if you like the tutorial give me +rep. I really tried to do something useful
*Comments are highly appreciated*