• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
Somersault's Utilities Script

Resource Somersault's Utilities Script 5.3.0

Somersault

Composer, Spriter, and Scripter!
Member
Joined
Apr 27, 2021
Posts
56
Somersault submitted a new resource:

Somersault's Utilities Script - A script that provides functions for both using as standalone and as support to my other scripts.

Provided functions:

pbSetCharName Simple function to name a character depending on the player's gender
pbSuggestTrainerName Simple function to make a custom suggestion when choosing a name for the player
pbChDigitsAmount An easy function to change the number of digits (and zeroes at the left) that a variable has.
pbAmbSound A function to add ambient sounds!
pbLAmbSound A function to add ambient sounds for...

Read more about this resource...
 

Somersault

Composer, Spriter, and Scripter!
Member
Joined
Apr 27, 2021
Posts
56
Hi! I haven't done any compatibility test with v18, but it should work since they are all independent functions. If you have any problem let me know! ^^,
 

Somersault

Composer, Spriter, and Scripter!
Member
Joined
Apr 27, 2021
Posts
56
Somersault updated Somersault's Utilities Script with a new update entry:

Version 4.0 is here!

The new version includes the following features and changes:

NEW FEATURES:

  • U.A.R.M. functions for sprites! You can now handle simple physics with sprites by usingeither of thefollowing functions, for respectively calculate just the next position (in case you wanted your scripts to do more things in parallel), or the next n positions:
pbNext_mrua_Pos(sprite,speed=[0,0],deltaTime=1,g=1)
where:
  • sprite is the sprite...

Read the rest of this update entry...
 

SirWeibrot

Novice
Member
Joined
Jan 30, 2021
Posts
21
I keep getting this error message:

Ruby:
Expand Collapse Copy
[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.7]

Error in Plugin: [Somersault Utilities Script]
Exception: NameError
Message: uninitialized constant Events

Backtrace:
[Somersault Utilities Script] [004] Map Utilities Script.rb:340:in `<main>'
008:PluginManager:653:in `eval'
008:PluginManager:653:in `block (2 levels) in runPlugins'
008:PluginManager:643:in `each'
008:PluginManager:643:in `block in runPlugins'
008:PluginManager:634:in `each'
008:PluginManager:634:in `runPlugins'
387:Main:28:in `mainFunctionDebug'
387:Main:18:in `block in mainFunction'
014:Errors:80:in `pbCriticalCode'
 
I keep getting this error message:

Ruby:
Expand Collapse Copy
[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.7]

Error in Plugin: [Somersault Utilities Script]
Exception: NameError
Message: uninitialized constant Events

Backtrace:
[Somersault Utilities Script] [004] Map Utilities Script.rb:340:in `<main>'
008:PluginManager:653:in `eval'
008:PluginManager:653:in `block (2 levels) in runPlugins'
008:PluginManager:643:in `each'
008:PluginManager:643:in `block in runPlugins'
008:PluginManager:634:in `each'
008:PluginManager:634:in `runPlugins'
387:Main:28:in `mainFunctionDebug'
387:Main:18:in `block in mainFunction'
014:Errors:80:in `pbCriticalCode'
The script is for v19, not v20.
 

Somersault

Composer, Spriter, and Scripter!
Member
Joined
Apr 27, 2021
Posts
56
I keep getting this error message:

Ruby:
Expand Collapse Copy
[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.7]

Error in Plugin: [Somersault Utilities Script]
Exception: NameError
Message: uninitialized constant Events

Backtrace:
[Somersault Utilities Script] [004] Map Utilities Script.rb:340:in `<main>'
008:PluginManager:653:in `eval'
008:PluginManager:653:in `block (2 levels) in runPlugins'
008:PluginManager:643:in `each'
008:PluginManager:643:in `block in runPlugins'
008:PluginManager:634:in `each'
008:PluginManager:634:in `runPlugins'
387:Main:28:in `mainFunctionDebug'
387:Main:18:in `block in mainFunction'
014:Errors:80:in `pbCriticalCode'
Hi, SirWeibrot!
One question. In which version of Pokémon Essentials are you, and which version of the plugin are you using? The class Events, used in MapUtilitiesScript.rb at line 340, is no longer defined in PEv20, so if you are in that version, you will face some problems. For that, and depending on which other of my plugins you are using, (if any), you could comment from line 340 to 345 (latest version as a reference for the line numbers):

1673617492978.png

My scripts have been made for v19 so there might be some incompatibilities or issues if you use them in v20. Having said this, I'm planning to release a compatible version with v20 as soon as my university studies lets me ^^',

Hope this helps! ^^,
If you still have problems let me know and do not hesitate in contacting me via discord or mail!

Edit: Try replacing lines 340 to 345 with the following:
EventHandlers.add(:on_player_step_taken, :name, proc {
if SUSC::ACTIVATE_MAP_UTILITIES
SMapUtil.pbLoadSMMapData if !$loadedData
SMapUtil.pbUpdLocData if SMapUtil.pbCheckChangingPortions
end
})
 
Last edited:
Back
Top