hunterrravyn
TH.net Regular
- Reaction score
- 19
Reputation Tutorial
To start of we all know what reputation is, if not here's a brief overview.
You can gain or lose favor, otherwise known as reputation, with many of the several different factions in your game by completing certain quests or killing certain creatures. Doing so will usually unlock special rewards or new quests to accomplish.
Okay so for this well need several variables:
Interger Array [FurbolgRep]
Integer [Maxplayers]
Player Array [PlayersPlaying]
PlayerGroup Array [PlayersPlayingGroup]
Okay lets start with the setup trigger. Known as "Setup" for this we will make it, a four player map.
Basically this sets up everything for the rest of the triggers, Maxplayers is for all the loops, so it makes everything easier to configure.
Lets get the Rep Gain and lose triggers up
This is "RepGain"
and the "RepLose"
Okay basically if the unit is Dark Green(Player 11) you will gain 1 reputation point and if it is Brown(Player 12) you will lose one rep. It also tells you what your current reputation with them is and will only count for the killing player.
Finally the "RepLevel"
Okay, so if you have 30 rep they love you, 0 rep your neutral and -30 rep means they hate you. With this you can make faction specific quests and items, and even hire able units.
View attachment 30093View attachment 30094
Here is the Demo Map View attachment 30092 the demo also includes a creep revival thingy.
Throw whosyourdaddy on it makes it faster (yes i did make something like this before but it was useless, this explains it and yeah...)
Woot 100th post
To start of we all know what reputation is, if not here's a brief overview.
You can gain or lose favor, otherwise known as reputation, with many of the several different factions in your game by completing certain quests or killing certain creatures. Doing so will usually unlock special rewards or new quests to accomplish.
Okay so for this well need several variables:
Interger Array [FurbolgRep]
Integer [Maxplayers]
Player Array [PlayersPlaying]
PlayerGroup Array [PlayersPlayingGroup]
Okay lets start with the setup trigger. Known as "Setup" for this we will make it, a four player map.
Code:
Events
Map initialization
Conditions
Actions
-------- Stuff To Configure!!! --------
Set MaxPlayers = 4
Set PlayersPlayingGroup[1] = Player Group - Player 1 (Red)
Set PlayersPlayingGroup[2] = Player Group - Player 2 (Blue)
Set PlayersPlayingGroup[3] = Player Group - Player 3 (Teal)
Set PlayersPlayingGroup[4] = Player Group - Player 4 (Purple)
Set PlayersPlaying[1] = Player 1 (Red)
Set PlayersPlaying[2] = Player 2 (Blue)
Set PlayersPlaying[3] = Player 3 (Teal)
Set PlayersPlaying[4] = Player 4 (Purple)
For each (Integer A) from 1 to MaxPlayers, do (Actions)
Loop - Actions
Set FurbolgRep[(Integer A)] = 0
Player - Make PlayersPlaying[(Integer A)] treat Player 12 (Brown) as an Neutral
Player - Make Player 12 (Brown) treat PlayersPlaying[(Integer A)] as an Neutral
Basically this sets up everything for the rest of the triggers, Maxplayers is for all the loops, so it makes everything easier to configure.
Lets get the Rep Gain and lose triggers up
This is "RepGain"
Code:
Events
Unit - A unit Dies
Conditions
(Owner of (Triggering unit)) Equal to Player 11 (Dark Green)
Actions
For each (Integer A) from 1 to MaxPlayers, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Killing unit)) Equal to PlayersPlaying[(Integer A)]
Then - Actions
Set FurbolgRep[(Integer A)] = (FurbolgRep[(Integer A)] + 1)
Game - Display to PlayersPlayingGroup[(Integer A)] the text: (You're reputation with the Furbolgs is + (String(FurbolgRep[(Integer A)])))
Else - Actions
and the "RepLose"
Code:
Events
Unit - A unit Dies
Conditions
(Owner of (Triggering unit)) Equal to Player 12 (Brown)
Actions
For each (Integer A) from 1 to MaxPlayers, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Killing unit)) Equal to PlayersPlaying[(Integer A)]
Then - Actions
Set FurbolgRep[(Integer A)] = (FurbolgRep[(Integer A)] - 1)
Game - Display to PlayersPlayingGroup[(Integer A)] the text: (Youre reputation with the Furbolgs is + (String(FurbolgRep[(Integer A)])))
Else - Actions
Okay basically if the unit is Dark Green(Player 11) you will gain 1 reputation point and if it is Brown(Player 12) you will lose one rep. It also tells you what your current reputation with them is and will only count for the killing player.
Finally the "RepLevel"
Code:
Events
Unit - A unit Dies
Conditions
Actions
For each (Integer A) from 1 to MaxPlayers, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
FurbolgRep[(Integer A)] Equal to 30
Then - Actions
Game - Display to PlayersPlayingGroup[(Integer A)] the text: You are now Loved b...
Player - Make PlayersPlaying[(Integer A)] treat Player 12 (Brown) as an Ally with shared vision
Player - Make Player 12 (Brown) treat PlayersPlaying[(Integer A)] as an Ally with shared vision
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
FurbolgRep[(Integer A)] Equal to 0
Then - Actions
Game - Display to PlayersPlayingGroup[(Integer A)] the text: You are now Neutral...
Player - Make PlayersPlaying[(Integer A)] treat Player 12 (Brown) as an Neutral
Player - Make Player 12 (Brown) treat PlayersPlaying[(Integer A)] as an Neutral
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
FurbolgRep[(Integer A)] Equal to -30
Then - Actions
Game - Display to PlayersPlayingGroup[(Integer A)] the text: You are now Hated b...
Player - Make PlayersPlaying[(Integer A)] treat Player 12 (Brown) as an Enemy
Player - Make Player 12 (Brown) treat PlayersPlaying[(Integer A)] as an Enemy
Else - Actions
Okay, so if you have 30 rep they love you, 0 rep your neutral and -30 rep means they hate you. With this you can make faction specific quests and items, and even hire able units.
View attachment 30093View attachment 30094
Here is the Demo Map View attachment 30092 the demo also includes a creep revival thingy.
Throw whosyourdaddy on it makes it faster (yes i did make something like this before but it was useless, this explains it and yeah...)
Woot 100th post