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.
Actor Prefixes

0 Members and 1 Guest are viewing this topic.

*
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
Actor Prefixes
Version: 1.0
Author: modern algebra
Date: February 3, 2009

Version History


  • <Version 1.0> 02.03.2009 - Original Release

Description


This allows you to set prefixes to your classes that are based on actor level. Perfect if you want your classes to be rank based. For instance, with this script, your warrior can be Squire Philip between levels 1 and 10, Sir Philip between levels 11 and 30, Lord Philip between levels 31 and 60, and King Philip after level 60.

Features

  • Allows you to give dynamic prefixes to your actors
  • Can set these prefixes unique to classes
  • Define exactly at what levels your actors gain a new prefix
  • Set as many prefixes per class as you like.

Instructions

Please see inside the script for instructions.

Script


Code: [Select]
#==============================================================================
#  Actor Prefixes (based on class)
#  Version: 1.0
#  Author: modern algebra (rmrk.net)
#  Date: February 3, 2009
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Description:
#    This allows you to set prefixes to your classes that are based on actor
#   level. Perfect if you want your classes to be rank based. For instance,
#   with this script, your warrior can be Squire Philip between levels 1 and
#   10, Sir Philip between levels 11 and 30, Lord Philip between levels 31 and
#   60, and King Philip after level 60.
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Instructions:
#    Place this script in the Script Editor (F11) in a slot above Main and
#   below Materials
#
#    For instructions on configuring this script, please see the Editable
#   Region starting at line 35.
#==============================================================================
# ** Game_Actor
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    aliased method - name
#==============================================================================

class Game_Actor
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Name
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modalge_nevious_chr_prefx_nm_83y5n name
  def name
    prefix = ""
    case @class_id
    #----------------------------------------------------------------------
    # EDITABLE REGION
    #``````````````````````````````````````````````````````````````````````
    #  Instructions:
    #    Set each class as below:
    #
    #      when <class ID>
    #        prefix = case @level
    #        when p1 .. p2 then "<original prefix>"
    #        when p2 + 1 .. p3 then "<second prefix>"
    #        when p3 + 1 .. p4 then "<third prefix>"
    #          ................................
    #        else "<last prefix>"
    #        end
    #
    #   where p1, p2, p3, ..., pn are the levels at which the prefix ought
    #  to change. class ID is the ID of the class, and the prefixes are all
    #  the prefixes for that level range. If you leave any levels out, then
    #  there will be no prefix for that level or, if you have set an else
    #  branch, then it will take that prefix.
    #
    #    EXAMPLES:
    #    
    #      when 1 # Class ID = 1 : Paladin
    #        prefix = case @level
    #        when 1 .. 10 then "Squire "  # Squire between levels 1 and 10
    #        when 11 .. 30 then "Sir "    # Sir between levels 11 and 30
    #        when 31 .. 60 then "Lord "   # Lord between levels 31 and 60
    #        else "King "                 # King after level 60
    #        end
    #      when 3 # Class ID = 3 : Priest
    #        prefix = case @level
    #        when 1 .. 15 then "Br. "  # Squire between levels 1 and 15
    #        when 16 .. 35 then "Fr. "    # Sir between levels 16 and 35
    #        when 36 .. 69 then "Bishop "   # Lord between levels 36 and 69
    #        else "Cardinal "                 # King after level 70
    #        end
    #----------------------------------------------------------------------
    when 1 # Class ID = 1 : Paladin
      prefix = case @level
      when 1 .. 10 then "Squire "  # Squire between levels 1 and 10
      when 11 .. 30 then "Sir "    # Sir between levels 11 and 30
      when 31 .. 60 then "Lord "   # Lord between levels 31 and 60
      else "King "                 # King after level 60
      end
    when 3 # Class ID = 3 : Priest
      prefix = case @level
      when 1 .. 15 then "Br. "     # Brother between levels 1 and 15
      when 16 .. 35 then "Fr. "    # Father between levels 16 and 35
      when 36 .. 69 then "Bishop " # Bishop between levels 36 and 69
      else "Cardinal "             # Cardinal after level 70
      end
    #----------------------------------------------------------------------
    # END EDITABLE REGION
    #----------------------------------------------------------------------
    end
    return prefix + modalge_nevious_chr_prefx_nm_83y5n
  end
end

Credit


  • modern algebra

Thanks

  • nevious, for requesting the script

Support


Please post in this topic here at rmrk.net for support or requests


Creative Commons License
This script by modern algebra is licensed under a Creative Commons Attribution-Non-Commercial-Share Alike 2.5 Canada License.
« Last Edit: February 11, 2010, 09:51:31 PM by Modern Algebra »

**
Rep: +0/-0Level 84
lll Carpe Diem lll
Nifty script! You amaze me as always MA! :blizj:
*  Name: Sexy Technique (おいろけの術, Oiroke no Jutsu; Viz "Ninja Centerfold", English TV "Sexy Jutsu", UK DVD "Art of Eros")
    * Type: E-rank, Supplementary
    * Users: Naruto Uzumaki, Konohamaru, Moegi, Udon
    * Hand Seal: Ram
    * Debut (Anime): Episode 1
    * Debut (Manga): Chapter 1

The Sexy Technique is simply a Transformation Technique used to transform the user into a beautiful, nude woman (or a woman in a bathing suit, as seen in episode 177 and the Naruto video games). Naruto uses it to distract his instructors, sometimes leading to an exaggerated nosebleed by the victim, and it is indeed annoyingly effective; even the Third Hokage swooned when Naruto used it on him. Naruto was forced to use this jutsu in order to receive training from Jiraiya and has also used it to get Jiraiya's attention if he was slacking off. A variant of this technique is the Harem Technique, which uses varying numbers of shadow clones in combination with the technique to produce multiple clones of a nude women. Naruto teaches the Sexy Technique to Konohamaru in episode 2, who in turn taught it to Moegi and Udon.

**
Rep:
Level 84
~Chase Leader~
I am getting more used to this scripting system...
This script is pretty cool...and has sparked an idea of my own.

I don't normally like using classes, however I think
I might be able to use it for something else like a caption
or something as you progress during the game.
For instance at Level 1...(beginning of game)
Have a caption or thought of the character
and at lets say Level 10...
Have a caption or thought that progresses the story in a small
but unique way.
Its a work in progress though...

**
Rep:
Level 84
NecroKing
hay nevious here! love the script works perfectly with all of my scripts tottaly plug and play! (and i have alot of scripts.... lol alot....)

also i was wondering is there a way to implament a piece in here that when certian level is reached and prefix is obtained it changes the actor graphic?

for example i have a class set up right now that if your a necromancer youll have a undead pet. but i want that pet to be set up to if lvl 1-10 prefix skeleton (with skeleton graphic). if 10-20 prefix ghost (where i would like the graphic to change to a ghost graphic...) i tried this with a common event but it didnt work...

if you could do this tho it would be super great!! ill worship you forever lol

*
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'm glad it works for you.

For the request, that would be a different script altogether. It's also something you can do with an event if you wish. Parallel process, and you can set a variable to actor level (it's one of the options under level). Then you can check that variable against level and use the command Change. I might make an event system for you actually.

**
Rep:
Level 84
NecroKing
actualy i tried to set that up as such i have it

control variable [0001 characters lvl] = [undead]'s lvl
conditional branch: variable [0001 character lvl] >= 16
     change actor graphic: [undead], 'monster', 0, (none)
else
control variable [0001 characters lvl] = [undead]'s lvl
conditional branch: variable [0001 character lvl] >= 36
     change actor graphic: [undead], 'monster', 6, (none)

so on and so forth
and my undead is a lvl 19 and graphic didnt change... and thats from starting a new game...
the event is set up under a common event as a parrallell process only triggered if the [001:job] switch is activated...

did i do somehting wrong? or is there another way to do it? i woulld put it on the map itself but i dont want to clutter up my map ya kno what i mean.

*
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
Well, have you turned the switch on?

There is a problem with your event system, in that you put them into the else branches where the smallest numbers come first. Because a level 38 pet will return true that the level is greater than or equal to 16, everything in the else branch would never run. A better way would be to put the higher level ones first, so that it will actually go to the else branches and do it correctly. You also don't need to continually set the variable to the level of the monster. Once is enough.

But, neither of those should have stopped the monster from changing once he hit level 16. The only other thing I can think of is that you haven't fixed the glitch that comes with the program. Have you implemented the variable fix yet?

**
Rep:
Level 84
NecroKing
yes i activated the switch and thank you for the only once tip and the else tip i didnt think about that... tho i should have..... and no i havnt fixed that yet... didtn kno there was a problem.... ill check that out once i get home... thank you again! your a great person!!! lol