v1.0
Intro
This is a basic script which allows you to get the character arrested for certain crimes. You can escape by bailing with money, appealing, or pleading guilty (getting executed)
Okay heres how it works.
You do something bad like talk to someone rudely and your Reputation goes down.
You do something wrong, for example, attack a police officer and it goes down even further, or your Infamy goes up. If you lose the battle against the police officer though, they will take you to jail.
In jail you have three options.
1 - Pay a bail of 2000G.
This will get you out easily, but will raise your Infamy by 1. If you don't have the money, you can't do this.
2 - Appeal
This will allow you to try to plead innocent. This is based on your Rep. If you do this, and your rep is below 5, you will be executed. If it is 5 or over, you will live, your Rep will be reduced, and your Infamy will be 0 again.
3 - Plead guilty
If all else fails, say you did it and die. This is a last resort.
To understand it all, you need to play the demo really. It helps you understand.
OTHER STUFF
Number of arrests is how many times you've seen the Infamy screen.
This is a working progress and all this will be made better at a later date.
FUTURE ADDONS:
- Ability to arrest other people
- More options
- More flexible offences
- More detailed trial in 'Appeal'.
You do something bad like talk to someone rudely and your Reputation goes down.
You do something wrong, for example, attack a police officer and it goes down even further, or your Infamy goes up. If you lose the battle against the police officer though, they will take you to jail.
In jail you have three options.
1 - Pay a bail of 2000G.
This will get you out easily, but will raise your Infamy by 1. If you don't have the money, you can't do this.
2 - Appeal
This will allow you to try to plead innocent. This is based on your Rep. If you do this, and your rep is below 5, you will be executed. If it is 5 or over, you will live, your Rep will be reduced, and your Infamy will be 0 again.
3 - Plead guilty
If all else fails, say you did it and die. This is a last resort.
To understand it all, you need to play the demo really. It helps you understand.
OTHER STUFF
Number of arrests is how many times you've seen the Infamy screen.
This is a working progress and all this will be made better at a later date.
FUTURE ADDONS:
- Ability to arrest other people
- More options
- More flexible offences
- More detailed trial in 'Appeal'.
Main screen:
http://www.rubygames.net/gallery/albums ... amy_S1.PNG[/IMG]
And a little Status screen addon
http://www.rubygames.net/gallery/albums ... amy_S2.PNG[/IMG]
http://www.rubygames.net/gallery/albums ... amy_S1.PNG[/IMG]
And a little Status screen addon
http://www.rubygames.net/gallery/albums ... amy_S2.PNG[/IMG]
SCRIPTS:
Insert in a new scene above Main and call it Infamy System.
And then a little addon for your Status scene.
Call this Scene_JailInfo, and below the other script.
To call an arrest, use $scene = Scene_Infamy.new
Call the status window with $scene = Scene_JailInfo.new
Code:
#=====================
#Infamy and Reputation System v1.0
#by Rubymatt
#=====================
class Scene_Infamy
def main
$game_variables[$data_system.variables.index("Arrest No.")] += 1
s1 = "Pay Bail"
s2 = "Appeal"
s3 = "Plead Guilty"
@command_window = Window_Command.new(192, [s1, s2, s3])
@command_window.x = 32
@command_window.y = 320
@offence_window = Window_Offence.new
@info_window = Window_Info.new
@arrest_window = Window_Arrest.new
if $game_party.gold < 2000
@command_window.disable_item(0)
end
if $game_variables[$data_system.variables.index("Infamy")] >= 5
@command_window.disable_item(1)
end
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@command_window.dispose
@info_window.dispose
@arrest_window.dispose
@offence_window.dispose
if $scene.is_a?(Scene_Title)
Graphics.transition
Graphics.freeze
end
end
def update
@command_window.update
@offence_window.update
@info_window.update
@arrest_window.update
if Input.trigger?(Input::C)
case @command_window.index
when 0
if $game_party.gold < 2000
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
$scene = Scene_PayBail.new
when 1
if $game_variables[$data_system.variables.index("Infamy")] >= 5
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
$scene = Scene_Appeal.new
when 2
$game_system.se_play($data_system.decision_se)
$scene = Scene_Guilty.new
end
return
end
end
end
#Scene_PayBail
class Scene_PayBail
def main
@pay_window = Window_Pay.new
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@pay_window.dispose
if $scene.is_a?(Scene_Title)
Graphics.transition
Graphics.freeze
end
end
def update
@pay_window.update
if Input.trigger?(Input::C)
$game_system.se_play($data_system.decision_se)
$game_variables[$data_system.variables.index("Infamy")] += 1
$game_party.lose_gold(2000)
$scene = Scene_Map.new
end
end
end
#Scene_Guilty
class Scene_Guilty
def main
@guilty_window = Window_Guilty.new
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@guilty_window.dispose
if $scene.is_a?(Scene_Title)
Graphics.transition
Graphics.freeze
end
end
def update
@guilty_window.update
if Input.trigger?(Input::C)
$game_system.se_play($data_system.decision_se)
$scene = Scene_Gameover.new
end
end
end
#Scene_Appeal
class Scene_Appeal
def main
@appeal_window = Window_Appeal.new
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@appeal_window.dispose
if $scene.is_a?(Scene_Title)
Graphics.transition
Graphics.freeze
end
end
def update
@appeal_window.update
if Input.trigger?(Input::C)
if $game_variables[$data_system.variables.index("Rep")] < 5
$game_system.se_play($data_system.decision_se)
$scene = Scene_Gameover.new
else
$game_system.se_play($data_system.decision_se)
$scene = Scene_Map.new
$game_variables[$data_system.variables.index("Rep")] -= 3
$game_variables[$data_system.variables.index("Infamy")] == 0
end
end
end
end
#Window_Offence
class Window_Offence < Window_Base
def initialize
super(32, 32, 576, 96)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.size = 22
self.contents.font.name = "Arial"
refresh
end
def refresh
self.contents.font.color = Color.new(192, 224, 255)
self.contents.draw_text(0, 0, 560, 32, "You have committed the following offence:", 1)
self.contents.font.color = Color.new(255, 255, 255)
if $game_variables[$data_system.variables.index("Crime")] == 0
self.contents.draw_text(0, 32, 544, 32, "Assault of a Police Officer") #Edit your reasons here.
elsif $game_variables[$data_system.variables.index("Crime")] == 1
self.contents.draw_text(0, 32, 544, 32, "Assault of an Innocent Person") #Edit your reasons here.
elsif $game_variables[$data_system.variables.index("Crime")] == 2
self.contents.draw_text(0, 32, 544, 32, "Insert Third Custom Offence Here") #Edit your reasons here.
else
self.contents.draw_text(0, 32, 544, 32, "")
end
self.contents.draw_text(0, 64, 544, 32, "")
end
end
#Window_Info
class Window_Info < Window_Base
def initialize
super(32, 128, 192, 192)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.size = 22
self.contents.font.name = "Arial"
refresh
end
def refresh
self.contents.font.color = Color.new(192, 224, 255)
self.contents.draw_text(0, 0, 176, 32, "Status", 1)
self.contents.font.color = Color.new(192, 224, 255)
self.contents.draw_text(0, 32, 176, 32, "Arrest No.")
self.contents.font.color = Color.new(255, 255, 255)
self.contents.draw_text(80, 32, 80, 32, $game_variables[$data_system.variables.index("Arrest No.")].to_s, 2)
cx = contents.text_size($data_system.words.gold).width
self.contents.font.color = Color.new(192, 224, 255)
self.contents.draw_text(0, 64, 176, 32, "Money:")
if $game_party.gold > 2000
self.contents.font.color = Color.new(110, 255, 110)
else
self.contents.font.color = Color.new(255, 255, 255)
end
self.contents.draw_text(60, 64, 100-cx-2, 32, $game_party.gold.to_s, 2)
self.contents.font.color = Color.new(192, 224, 255)
self.contents.draw_text(160-cx, 64, cx, 32, $data_system.words.gold, 2)
self.contents.draw_text(0, 96, 176, 32, "Reputation:")
if $game_variables[$data_system.variables.index("Rep")] >= 10
self.contents.font.color = Color.new(110, 255, 110)
elsif $game_variables[$data_system.variables.index("Rep")] < 0
self.contents.font.color = Color.new(255, 0, 0)
else
self.contents.font.color = Color.new(255, 255, 255)
end
self.contents.draw_text(80, 96, 80, 32, $game_variables[$data_system.variables.index("Rep")].to_s, 2)
self.contents.font.color = Color.new(192, 224, 255)
self.contents.draw_text(0, 128, 176, 32, "Infamy: ")
if $game_variables[$data_system.variables.index("Infamy")] == 0
self.contents.font.color = Color.new(110, 255, 110)
elsif $game_variables[$data_system.variables.index("Infamy")] >= 5
self.contents.font.color = Color.new(255, 0, 0)
else
self.contents.font.color = Color.new(255, 255, 255)
end
self.contents.draw_text(80, 128, 80, 32, $game_variables[$data_system.variables.index("Infamy")].to_s, 2)
end
end
#Window_Arrest
class Window_Arrest < Window_Base
def initialize
super(224, 128, 384, 320)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.size = 22
self.contents.font.name = "Arial"
self.opacity = 0
refresh
end
def refresh
@logo = RPG::Cache.picture("Guilty.png")
self.contents.blt(96, 64, @logo, Rect.new(0, 0, 160, 160))
end
end
#Window_PleadGuilty
class Window_Guilty < Window_Base
def initialize
super(32, 144, 576, 128)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.size = 24
self.contents.font.name = "Arial"
refresh
end
def refresh
self.contents.font.color = Color.new(192, 224, 255)
self.contents.draw_text(0, 0, 544, 32, "You have plead guilty to your offence.", 1)
self.contents.font.color = Color.new(255, 255, 255)
self.contents.draw_text(0, 32, 544, 32, "You were taken to a grotty jail cell for a week before finally")
self.contents.draw_text(0, 64, 544, 32, "being taken away by the police and executed. Your life has ended.")
end
end
#Window_Pay
class Window_Pay < Window_Base
def initialize
super(160, 192, 288, 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.size = 24
self.contents.font.name = "Arial"
refresh
end
def refresh
self.contents.font.color = Color.new(255, 255, 255)
self.contents.draw_text(0, 0, 544, 32, "Paid 2000" + $data_system.words.gold + " to escape jail.")
end
end
#Window_Appeal
class Window_Appeal < Window_Base
def initialize
super(32, 128, 576, 160)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.size = 24
self.contents.font.name = "Arial"
refresh
end
def refresh
self.contents.font.color = Color.new(192, 224, 255)
self.contents.draw_text(0, 0, 544, 32, "You have chosen to appeal.", 1)
self.contents.font.color = Color.new(255, 255, 255)
if $game_variables[$data_system.variables.index("Rep")] < 5
self.contents.draw_text(0, 32, 544, 32, "Your Reputation was low. The appeal failed.", 1)
self.contents.draw_text(0, 64, 544, 32, "You were taken to a grotty jail cell for a week before finally")
self.contents.draw_text(0, 96, 544, 32, "being taken away by the police and executed. Your life has ended.")
else
self.contents.draw_text(0, 32, 544, 32, "Your Reputation was high. The appeal Succeeded!", 1)
self.contents.draw_text(0, 64, 544, 32, "You were released without charge. Your reputation was")
self.contents.draw_text(0, 96, 544, 32, "reduced by 3 and your infamy was also reduced to 0.")
end
end
end
Call this Scene_JailInfo, and below the other script.
Code:
class Scene_JailInfo
def main
@jail_window = Window_JailInfo.new
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@jail_window.dispose
if $scene.is_a?(Scene_Title)
Graphics.transition
Graphics.freeze
end
end
def update
@jail_window.update
if Input.trigger?(Input::B)
$game_system.se_play($data_system.decision_se)
$scene = Scene_Map.new #CHANGE THIS LINE IF NEEDED
end
end
end
class Window_JailInfo < Window_Base
def initialize
super(224, 144, 192, 160)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.size = 24
self.contents.font.name = "Arial"
refresh
end
def refresh
self.contents.font.color = Color.new(192, 224, 255)
self.contents.draw_text(0, 0, 144, 32, "Status", 1)
self.contents.draw_text(0, 32, 144, 32, "Arrests:")
self.contents.font.color = Color.new(255, 255, 255)
self.contents.draw_text(80, 32, 80, 32, $game_variables[$data_system.variables.index("Arrest No.")].to_s, 2)
self.contents.font.color = Color.new(192, 224, 255)
self.contents.draw_text(0, 64, 144, 32, "Reputation:")
self.contents.font.color = Color.new(255, 255, 255)
self.contents.draw_text(80, 64, 80, 32, $game_variables[$data_system.variables.index("Rep")].to_s, 2)
self.contents.font.color = Color.new(192, 224, 255)
self.contents.draw_text(0, 96, 144, 32, "Infamy")
self.contents.font.color = Color.new(255, 255, 255)
self.contents.draw_text(80, 96, 80, 32, $game_variables[$data_system.variables.index("Infamy")].to_s, 2)
end
end
Call the status window with $scene = Scene_JailInfo.new
Insert the scripts and call them as required.
Add the graphic below to the pictures folder.
Go into your variable editor and make 4 variables. Doesn't matter what ID.
Just call em:
"Crime", "Arrest No.", "Rep", and "Infamy" without the ""s.
EDITING THE CRIME:
At the top of the main scene is the crime you comitted. You can make your own on the lines around line 189 of Scene_Infamy. Then before calling the scene, change this to the number as is with the others.
So by default:
0 = Assault of a police officer
1 = Assault of an innocent person
2 = Insert Third Custom Offence Here
NOTE: The status script is NOT required. It is just a simple thing you can use if you want to see how your Police Records are.
Add the graphic below to the pictures folder.
Go into your variable editor and make 4 variables. Doesn't matter what ID.
Just call em:
"Crime", "Arrest No.", "Rep", and "Infamy" without the ""s.
EDITING THE CRIME:
At the top of the main scene is the crime you comitted. You can make your own on the lines around line 189 of Scene_Infamy. Then before calling the scene, change this to the number as is with the others.
So by default:
0 = Assault of a police officer
1 = Assault of an innocent person
2 = Insert Third Custom Offence Here
NOTE: The status script is NOT required. It is just a simple thing you can use if you want to see how your Police Records are.
ADDING THE GRAPHIC
You need to put this graphic in your pictures folder:
http://www.rubygames.net/gallery/albums ... Guilty.png[/IMG]
Use any colour as the transparency.
ALTERNATIVELY: Make a graphic 160x160 and entitle it "Guilty" and put it in the Pictures folder.
DEMO:
http://www.uploading.com/files/CGWDSBZG/Infamy_v1.0.rar.html
Give credit and enjoy!