Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
Quark

Renaming an enemy

Question

Hello all,

 

Does anyone know of a script that will let me change the name of an enemy in the database? Just to give some context, I want to let players name characters whatever they want - so let's say they name change Basil's name to Cuddlebunny. Basil then betrays the party (presumably because they renamed him Cuddlebunny!) and starts a fight. I can't figure out a way for an enemy to show the new name. 

 

If anyone could design a script that would allow the user to do the following functions - change monster's name to X and change monster's name to actor X's name - then I'd be very grateful. I've had a look and can't find anything like this for XP.

 

Thank you :)

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Here you go:

 

 

def changeName(actorID, enemyID)
  if $data_enemies[enemyID].name==$game_actors[actorID].name
    return
  end
  $data_enemies[enemyID].name=$game_actors[actorID].name
  file = File.open("Data/Enemies.rxdata", "wb")
  Marshal.dump($data_enemies, file)
  file.close
end

 

I assume you know how to "install" it.

To use it you need to put a "Script" event command before starting a battle against the character to make sure that their name is up to date. Inside that event write this: "changeName(1, 2)" and replace 1 with the ID of the character whose name you want to change from the actors list, and 2 with the ID of the character in the enemies list.

Share this post


Link to post
Share on other sites
  • 0

I can't do this, but I thought of something else that could be done that basically does the same thing.

 

In rmxp's terrible message editor, it's possible to have the game display a character's name even if the player changes it by typing \n[ACTOR ID]

If someone could set up a script so that the same thing works for enemy names, it would...well it would be cool and not require a script call.

Share this post


Link to post
Share on other sites
  • 0

Not a problem. As long as you don't ask anything beyond my ability I'm happy to help.

I hope I covered all the potential problems, but if a bug turns up just tell me and I'll try to fix it.

By the way, you don't actually have to put the call right before the battle, as long as it's called somewhere between the last time you changed their name and before the battle where you fight him.

Share this post


Link to post
Share on other sites
  • 0

Since it seems the question has been answered we can close this thread. If the OP wishes to reopen it, please PM a mod.  :wave: 


Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...