RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[RMXP] Good VS Evil

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 88
Script Name: Good VS Evil --- RMXP Version
Written by: Synthesize
Version: 1.0.0
Released: January 26, 2008

What is it?
This script allows you to have each actor have an alignment and alignment points. The alignment raises similar to Baldur's Gate 'reputation' system where if you accumulate x amount of Alignment Points, then your Alignment Level rises.

Features:
 - Easily Add/Remove alignment points
 - Easily check the Alignment Level
 - Easily check the Alignment points
 - Easy to customize
 - Short

DEMO:
Primary Download Link

Spoiler for:
The Script:
Code: [Select]
#===============================================================================
# Good VS Evil --- RMXP Version
#===============================================================================
# Written by Synthesize
# Version 1.0.0
# January 26, 2008
#===============================================================================
# * RMXP Version *
#===============================================================================
module GoodVSEvil
  # The initial Alignment for actors
  Alignment_initial = {1 => 2, 2 => 3, 3 => -5}
  Alignment_initial.default = 0
  # The names of the alignments
  Alignment_names = ["Very Good", "Good", "Neutral", "Evil", "Devil Child"]
  # maximum amount of points
  Maximum_alignment = 100
  # Maximum amount of evil points
  Maximum_evil_alignment = -100
  # Format = {value => amount to check}
  Rates = {0 => 50, 1 => 25, 3 => -25, 4 => 50}
  # Rates configure how many Alignment points a character needs to have
  # there alignment 'upgrade'
  # $alignment commands:
  # $alignment.add(value, member)   # Adds value of alignment
  # $alignment.remove(value, member)   # Removes value from member
  # $alignment.checksum(amount, member)   # Check value of points then return
  # $alignment.checkname(member, name)   # Check if the alignment level is =name
end
#-------------------------------------------------------------------------------
# Create and set alignment points
#-------------------------------------------------------------------------------
class Game_Actor < Game_Battler
  attr_accessor :alignment
  attr_accessor :alignment_name
  alias syn_gve_setup setup
  #-----------------------------------------------------------------------------
  # Setup Actor Alignment
  #-----------------------------------------------------------------------------
  def setup(actor_id)
syn_gve_setup(actor_id)
@alignment = GoodVSEvil::Alignment_initial[actor_id]
@alignment_name = "Neutral"
  end
  #-----------------------------------------------------------------------------
  # Return Alignment Values
  #-----------------------------------------------------------------------------
  def alignment_value
@alignment = GoodVSEvil::Maximum_alignment if @alignment > GoodVSEvil::Maximum_alignment
@alignment = GoodVSEvil::Maximum_evil_alignment if @alignment < GoodVSEvil::Maximum_evil_alignment
if @alignment >= GoodVSEvil::Rates[1]
  @alignment_name = GoodVSEvil::Alignment_names[1]
  @alignment_name = GoodVSEvil::Alignment_names[0] if @alignment > GoodVSEvil::Rates[0]
  return @alignment_name
elsif @alignment <= GoodVSEvil::Rates[3]
  @alignment_name = GoodVSEvil::Alignment_names[3]
  @alignment_name = GoodVSEvil::Alignment_names[4] if @alignment >= GoodVSEvil::Rates[4]
  return @alignment_name
else
  @alignment_name = GoodVSEvil::Alignment_names[2]
  return @alignment_name
end
  end
end
#-------------------------------------------------------------------------------
# Window_MenuStatus add-on
#-------------------------------------------------------------------------------
class Window_Status < Window_Base
  alias syn_gve_refresh refresh
  def refresh
syn_gve_refresh
self.contents.font.color = system_color
self.contents.draw_text(330, 400, 120, 32, "Alignment:")
self.contents.font.color = normal_color
self.contents.draw_text(450, 400, 120, 32, @actor.alignment_value)
  end
end
#-------------------------------------------------------------------------------
# Alignment Management
#-------------------------------------------------------------------------------
class Alignment_Management
  def add(value, member)
$game_party.actors[member].alignment += value
  end
  def remove(value, member)
$game_party.actors[member].alignment -= value
  end
  def checksum(amount, member)
if $game_party.actors[member].alignment >= amount
  return true
else
  return false
end
  end
  def checkname(member, name)
if $game_party.actors[member].alignment_name == name
  return true
else
  return false
end
  end
end
#-------------------------------------------------------------------------------
# Scene_Title:: Create the Global Variable
#-------------------------------------------------------------------------------
class Scene_Title
  alias syn_gve_newgame command_new_game
  def command_new_game
syn_gve_newgame
$alignment = Alignment_Management.new
  end
end
#===============================================================================
# * This script will not work with RPG Maker VX *
#===============================================================================
# Written by Synthesize
# Version 1.0.0
# January 26, 2008
#===============================================================================
# Good VS Evil --- RMXP Version
#===============================================================================

Questions? Concerns? Post them.

**
Rep:
Level 86
CHAINSAW!!
sounds good but the download link is workin
I have:
GM7
RPGXP
RPGVX
FPS Creator
Cube 2
3D Gamemaker (SHITBOX!)

WIP stats:
RPGVX:
none, just experimenting with random events...

***
Rep:
Level 85
were the hell do we put the script
//img146.imageshack.us/img146/5391/ubd5282fs3vb6.png

**
Rep: +0/-0Level 84
Is there a way to make it so you can make events based on your alignment like in Fable 2.
LOLZERSMATICITICION


**
Rep: +0/-0Level 83
where do we choose the allignment?

***
3==D This is my bellend.
Rep:
Level 83
how do you put points towards an alignment? it dosn't let me  :(
no

By Kraft

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Code: [Select]
  # $alignment commands:
  # $alignment.add(value, member)   # Adds value of alignment
  # $alignment.remove(value, member)   # Removes value from member
  # $alignment.checksum(amount, member)   # Check value of points then return
  # $alignment.checkname(member, name)   # Check if the alignment level is =name

***
3==D This is my bellend.
Rep:
Level 83
Code: [Select]
  # $alignment commands:
  # $alignment.add(value, member)   # Adds value of alignment
  # $alignment.remove(value, member)   # Removes value from member
  # $alignment.checksum(amount, member)   # Check value of points then return
  # $alignment.checkname(member, name)   # Check if the alignment level is =name
that's all well and good,but wtf? wot button do i press? it's an awesome script though
no

By Kraft

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
What do you mean by button?

In the Event Commands, you go to the third page and there is a Script.. command. Click that and type in the codes you need.

***
3==D This is my bellend.
Rep:
Level 83
What do you mean by button?

In the Event Commands, you go to the third page and there is a Script.. command. Click that and type in the codes you need.
ok...
no

By Kraft

********
Resource Artist
Rep:
Level 94
\\\\\
Project of the Month winner for June 2009
wow. how can you even consider making a game when you didn't understand what MA said. Go to the 3rd page in the event commands and click on Script... command. Then type in that shit with the correct information.

Spoiler for:
You dumb-butt :mad:

***
3==D This is my bellend.
Rep:
Level 83
wow. how can you even consider making a game when you didn't understand what MA said. Go to the 3rd page in the event commands and click on Script... command. Then type in that shit with the correct information.

Spoiler for:
You dumb-butt :mad:
it has errors you stupid robot
no

By Kraft

***
Rep:
Level 83
X-PLAT!

^  ^
*  *
  .,   - uh oh!
 f



********
Resource Artist
Rep:
Level 94
\\\\\
Project of the Month winner for June 2009
wow. how can you even consider making a game when you didn't understand what MA said. Go to the 3rd page in the event commands and click on Script... command. Then type in that shit with the correct information.

Spoiler for:
You dumb-butt :mad:
it has errors you stupid robot

Then you should post them so someone can fix it

Spoiler for:
Stupid ninny-head :mad:

***
Rep:
Level 83
X-PLAT!

@Synthesize - maybe if the download was fixed...


*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
I haven't tested it, but I don't see what errors would occur just from the script itself.

Just in case you don't realize this though, the # signs just designate those lines as comments since I was quoting directly from the script. You would exclude them when running the call script, so it would be:

Code: [Select]
$alignment.add(value, member)

not

Code: [Select]
# $alignment.add(value, member)

**
Rep: +0/-0Level 83
This seems like a good script, I always wanted a reputation values system, but does this only go good v evil. cause if your only goin on one axis, i almost think it would be easier just to assign rep through control variables, except for the checkname function, that is a time saver. Thx alot for the script!
The things we do for pizza!