Talk:How do I level up my hero using plotscripting?

From OHRRPGCE-Wiki
Jump to navigation Jump to search

Bob: I am trying to think if it is currently possible to write a plotscript that will add a new copy of a hero at a particular level, copy over their name, equipment, and spell lists, and then delete the original hero... I think it can be done... of course, really this needs to go directly into GAME. Like a new "set hero level" command (one that actually adjusts stats and spells and experience properly)

Bob: Here is a block of text that I moved from How do I prevent a hero in the reserve party from appearing in the team menu?. I don't think it belongs there, but it could come in handy for improving this article.

moved from How do I prevent a hero in the reserve party from appearing in the team menu?[edit]

The problem can become more complicated if the other heroes have gained experience (and passed levels) during the 2 or 3 hours times. What can you do then to prevent the poor hero (1) to loose in battle? (Damn! No one have been seen on the reserve party but we have no a level and experience issues! As you can read clicking above experience for technical reasons cannot be modified though plotscripting)

Here is how to do : to use hero (5) instead of hero (1) give hero (5) the palette set and the grafic palette of hero(1) and then add him to the party. Be sure he has about the same experiences and levels as the other heroes just before he comes back! (if needed, use a piece of paper to note all the stats)

Just enter the following code when the fake hero (1) add the party hero (5) has just arrived it has not been seen in the reserve. The only problem with this solution is that heroes 1 and 5 have to wear a different name.(and now there's a problem with names! Oh my god!)

To solve this new problem we will have to give the name of hero(1) to hero(5) through strings. To prevent bugs (two heroes can't have the same name) rename first hero (1)and give him a new name. (Then do the same for hero 5)

The string make all this invisible as the game plays.

# Change the name of a hero named Vladislaus in CUSTOM to Vlad the Impaler
$0="Vlad the Impaler"
set hero name(0,find hero(hero:Vladislaus)) 

Please note that hero naming under custom is case sensitive. It means that it makes a different between James; james, JAMES, and JAmes.

You can choose not to name the heroes through strings but some people may notice that when fake heroe(1)(which is oh surprise hero(5) in reality) comes back that names have changed a little.