Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[Resolved] Help to create a fake level

Status
Not open for further replies.

kiku

Member

A Character is named "Tester". Whenever this character is in party, his level will be shown as 40 although he is not really that level. Even if his real level changes, his level will still be shown as 40. How would I modify my code to do this? Thanks.
 
Easy

Add in a new script above main

Code:
class Game_Actor
  def level
    return 40 if @actor_id == ACTOR_ID
    return @level
  end
end

replace ACTOR_ID with the actor id from the database

That should do it, let me know if it gives you any trouble
 

Tim.

Member

Alright, haven't tested it, but this should work.

First go to the Character Tab in the Database and double click one of Tester's stat boxes. Mess around with the numbers in there so that rather than going up or down with level/experience, they always stay the same. Adjust the stats to whatever you like.

Second make a Common Event. With a conditional branch, do something like, "If party member "tester" is level 41, change level to 40".

I probably could've explained it in more detailed, but Im tired as hell right now, so I hope that helps.

Edit: Damn my slow typing. I suppose Trickster's method would work too. ^^
 

kiku

Member

Thanks both. I just added in Trickster's few lines of codes and it's working with no problems.

I have a new question, what if I want to display the level with a string?
 
what do you mean by level with a string

if you mean the level as a string then just do

<Game_Actor>.level.to_s

where <Game_Actor> is a instance of Game_Actor ($game_actor[2], $game_party.actors[0])
 
Status
Not open for further replies.

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top