Character Creator EX Plugin

Discussion in 'Javascript/Plugin Support' started by Tatsumaro, Apr 12, 2018.

Thread Status:
Not open for further replies.
  1. Tatsumaro

    Tatsumaro Veteran Veteran

    Messages:
    205
    Likes Received:
    40
    First Language:
    Portugues
    Primarily Uses:
    RMMV
    Hi, so im using SumRndmDde Character Creator. All my main characters are created with this plugin, all is PERFECT :)

    Character Creator EX-1.png

    Character Creator EX-2.png
    I would like to resize only in the world map, i dont understand a lot about code but i'm very persistent :) any suggestion?

    thanks.
     
    #1
  2. Poryg

    Poryg Dark Lord of the Castle of Javascreeps Veteran

    Messages:
    3,919
    Likes Received:
    9,892
    Location:
    Czech Republic
    First Language:
    Czech
    Primarily Uses:
    RMMV
    var chars = SceneManager._scene._spriteset._characters;
    for (var j in chars) chars[j].scale.set(0.5, 0.5);

    If you want to pinpoint the character sprites exactly, you'll go into SceneManager._scene._spriteset.children[0], where the player and followers are the last four children, allowing for this code:

    var chars = SceneManager._scene._spriteset.children[0].characters
    for (var i = 0; i < 4; i++) chars[chars.length - i - 1].scale.set(0.5, 0.5);

    Although I may have a mistake in the code. Even if I do though, it should be easy to find if you type SceneManager._scene._spriteset.children[0] into the dev console.
     
    Last edited: Apr 12, 2018
    #2
    Tatsumaro likes this.
  3. Tatsumaro

    Tatsumaro Veteran Veteran

    Messages:
    205
    Likes Received:
    40
    First Language:
    Portugues
    Primarily Uses:
    RMMV
    im sorry but i cant find [SceneManager._scene._spriteset._characters] anywhere.
     
    #3
  4. Poryg

    Poryg Dark Lord of the Castle of Javascreeps Veteran

    Messages:
    3,919
    Likes Received:
    9,892
    Location:
    Czech Republic
    First Language:
    Czech
    Primarily Uses:
    RMMV
    I thought mentioning the dev console would sduggest that I was talking about something you have to do on runtime.
    In any case, you have to do it on runtime via script command.
     
    #4
    Tatsumaro likes this.
  5. Tatsumaro

    Tatsumaro Veteran Veteran

    Messages:
    205
    Likes Received:
    40
    First Language:
    Portugues
    Primarily Uses:
    RMMV
    i have no idea of what you are talking about :elswt:. Can you do it? What do you thinks is the budget to create something like this? I can sand you my project.
     
    #5
  6. Poryg

    Poryg Dark Lord of the Castle of Javascreeps Veteran

    Messages:
    3,919
    Likes Received:
    9,892
    Location:
    Czech Republic
    First Language:
    Czech
    Primarily Uses:
    RMMV
    The budget for this is zero, because it's just two lines of code used inside Event's script connand. The only thing that may be required is opening of the dev console in game, typing in SceneManager._scene._spriteset._children[0], hit enter and search for something that contains character sprites in case my code doesn't work.
     
    #6
    Tatsumaro and Aloe Guvner like this.
  7. Tatsumaro

    Tatsumaro Veteran Veteran

    Messages:
    205
    Likes Received:
    40
    First Language:
    Portugues
    Primarily Uses:
    RMMV
    Hi, is this what you mean?
    Character Creator EX-3.png

    I tray this but it didn't work :( i'm not sure this is what i'm supposed to do
     
    #7
  8. Poryg

    Poryg Dark Lord of the Castle of Javascreeps Veteran

    Messages:
    3,919
    Likes Received:
    9,892
    Location:
    Czech Republic
    First Language:
    Czech
    Primarily Uses:
    RMMV
    Yeah, had a typo there :D
    SceneManager._scene._spriteset.children[0]
     
    #8
    Tatsumaro likes this.
  9. Tatsumaro

    Tatsumaro Veteran Veteran

    Messages:
    205
    Likes Received:
    40
    First Language:
    Portugues
    Primarily Uses:
    RMMV
    ok
    Character Creator EX-4.png

    the characters didn't scale and this is the log from SceneManager._scene._spriteset.children[0]

    even if i disable SDR plugins the scale didn't work
     
    Last edited: Apr 12, 2018
    #9
  10. Poryg

    Poryg Dark Lord of the Castle of Javascreeps Veteran

    Messages:
    3,919
    Likes Received:
    9,892
    Location:
    Czech Republic
    First Language:
    Czech
    Primarily Uses:
    RMMV
    OK, now that my computer finally works properly, I took a look at it.
    Sorry. I didn't remember the code properly.
    It's SceneManager._scene._spriteset._characterSprites. The last four.
    Code:
    var chars = SceneManager._scene._spriteset._characterSprites;
    for (var i = 0; i < 4; i++) chars[chars.length - i - 1].scale.set(0.5);
    
    Works for me.
     
    #10
    Aloe Guvner and Tatsumaro like this.
  11. Tatsumaro

    Tatsumaro Veteran Veteran

    Messages:
    205
    Likes Received:
    40
    First Language:
    Portugues
    Primarily Uses:
    RMMV
    OMG it works PERFECT :), i can place the code in every event that leads to a transfer to world map, but i have another problem, my game have rumdum encounters, when you win and return to world map the scale is gone :( any ideas?
     
    #11
  12. Aloe Guvner

    Aloe Guvner Walrus Veteran

    Messages:
    1,591
    Likes Received:
    1,000
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    Consider instead to run that code within an event on the World Map.
    Set the trigger of the event to Parallel.
    After the code, make sure to put a command to Erase Event.

    Now it will run exactly once every time the player enters the map (including after a battle).

    You can set the scale back to 1 on events leading away from the World Map
     
    #12
    Tatsumaro likes this.
  13. TWings

    TWings The Dragon Whisperer Veteran

    Messages:
    344
    Likes Received:
    600
    Location:
    Kyoto
    First Language:
    French
    Primarily Uses:
    RMMV
    You don't need to since it automatically scales back to 100% when loading a new map.
     
    #13
    Tatsumaro and Aloe Guvner like this.
  14. Tatsumaro

    Tatsumaro Veteran Veteran

    Messages:
    205
    Likes Received:
    40
    First Language:
    Portugues
    Primarily Uses:
    RMMV
    it works when you enter the map, sadly after a battle the event don't run.
     
    #14
  15. Poryg

    Poryg Dark Lord of the Castle of Javascreeps Veteran

    Messages:
    3,919
    Likes Received:
    9,892
    Location:
    Czech Republic
    First Language:
    Czech
    Primarily Uses:
    RMMV
    Erase event is useless here. You need an autorun event that sets the scale and then turns on a switch. On page 2 you set a totally empty page with that switch as a condition. And then in the battle you turn the switch off via troop events.
    Just don't also forget to turn it off while teleporting somewhere to a different map.
     
    #15
    Tatsumaro and Aloe Guvner like this.
  16. Tatsumaro

    Tatsumaro Veteran Veteran

    Messages:
    205
    Likes Received:
    40
    First Language:
    Portugues
    Primarily Uses:
    RMMV
    It works :) Thanks
     
    #16
  17. slimmmeiske2

    slimmmeiske2 Little Red Riding Hood Moderator

    Messages:
    5,530
    Likes Received:
    4,118
    Location:
    Belgium
    First Language:
    Dutch
    Primarily Uses:
    RMXP

    This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

     
    #17
Thread Status:
Not open for further replies.

Share This Page