Stone Story RPG

Stone Story RPG

Not enough ratings
Stonescript Readme
By PKPenguin
Organized rip of the help.txt file found at http://stonestoryrpg.com/stonescript/help.txt
Better formatting! Can be opened in the Steam overlay!
Currently v1.8.6.
   
Award
Favorite
Favorited
Unfavorite
Preface (NOT part of the .txt)
Every section of the guide after this one is copy-pasted from the URL that is provided ingame: https://stonestoryrpg.com/stonescript/help.txt

This guide presents it with formatting so that it looks nice as a Steam guide. Formatting includes a minor spelling fix in the Tips section, bullet points, tables, code blocks, and double spacing. I'm doing this so that it's a bit easier to read and parse through at a glance, and so I can open it from the Steam overlay (I don't think the Steam browser in the overlay renders the .txt page properly).

All credit goes to the dev. If the dev wishes for me to take this down, I'll immediately comply. Thanks!
Stonescript
Used in the Mind Stone to automate equipment choices.

Stonescript is very simple, yet powerful and will continue to be improved.

Need help? Want to collaborate on scripts? Go to: discord.gg/StoneStoryRPG


The goal of a good script is to equip the best items as the state of the game changes.

This could be as simple as automatically activating the potion if your health is low, or complex enough where combat is optimized to super-human levels.
Example
// Equips the Shovel for Rocky Plateau. // In Caves of Fear it equips loadout 1, // except against the boss, where the // Grappling Hook and a 7 star War Hammer // are used instead. // For Haunted Halls it uses two Wands, // specifying Poison for left hand and // Vigor for the right hand, however // if the difficulty is over 5 stars it uses // an enchanted +13 Vigor Staff instead. // Potion activates if hitpoints fall below 10 ?loc=rocky equip shovel ?loc=cave loadout 1 ?foe=bolesh equip grap equip hammer *7 D ?loc=halls equipL poison wand equipR vigor wand ?loc.stars > 5 equip vigor staff +13 ?hp < 10 activate potion
Basics
?
Compare and branch logic (if)
//
Comment
^
Continue previous line
Game State
These tell you what's happening and what's right in front of the player
?loc
the current location name
?loc.stars
the current location's difficulty
?foe
the current foe being targeted by the player
?foe.distance
the distance between the player and the foe being targeted
?foe.count
the number of foes within 40 units
?pickup
the current pickup being targeted by the player
?pickup.distance
the distance between the player and the pickup being targeted
?hp
the player's current hitpoints
?maxhp
the player's maximum hitpoints
?time
the current frame number of the run
?foe.hp
the current hitpoints of the foe being targeted by the player
?foe.maxhp
the maximum hitpoints of the foe being targeted by the player
?foe.armor
the current armor of the foe being targeted by the player
?armor
the player's current armor
?maxarmor
the player's maximum armor
?pos.x
the player's current x position
?debuffs.count
the number of debuffs currently on the player
?foe.debuffs.count
the number of debuffs on the foe being targeted
?face
the player's current facial expression. E.g. ?face =( ^^)
Commands
These tell the game to do something.
> <str>
Prints a string to the top of the screen.
equip <str>
Equips an item. <str> has a limit of 7 criteria
equipL <str>
Equips an item to the left hand
equipR <str>
Equips an item to the right hand
loadout <n>
Equips a specific loadout number
activate potion
Activates the current potion, if you have one
>(abcd
Shows a custom facial expression on the player. E.g. >( OwO
>oX,Y,[#rrggbb,]<str>
Advanced print relative to the player's head position.
>`X,Y,[#rrggbb,]<str>
Advanced print relative to the upper-left corner of the screen.
>cX,Y,[#rrggbb,]<str>
Advanced print relative to the center of the screen.
>fX,Y,[#rrggbb,]<str>
Advanced print relative to the target foe's head position.
  • E.g. ">o-6,3,#ff0000,walk forward ->"
Comparisons
Used in conjunction with game state to make decisions
=
Compares values equal or string contains
!
Compares values not equal or string does not contain. E.g.: "?foe!poison"
&
And. E.g.: "?loc=caves & foe=boss"
|
Or. E.g.: "?foe=slow | foe.count>3"
>
Greater than compare. Can be used with a location's difficulty, number of foes, health, etc
<
Less than compare
Search Filters
These are used when evaluating game state.
E.g.: "?foe = insect"
  • poison
  • vigor
  • aether
  • fire
  • air
  • ice
  • arachnid
  • serpent
  • insect
  • machine
  • humanoid
  • elemental
  • boss
  • spawner
  • flying
  • slow
  • ranged
  • unpushable
  • undamageable
  • magic_resist
  • magic_vulnerability
  • immune_to_stun
  • immune_to_ranged
  • immune_to_debuff_damage
  • immune_to_physical
  • *[number] star level of a location or item
  • +[number] enchantment bonus of an item
Tips
Space (indentation) matters when defining what happens as a result of '?' comparisons (scope).

The script can be changed in the middle of a run by pressing 'M' on your keyboard.

The Power button in the top-right of the Mind Stone turns the script ON/OFF.

If multiple equip Commands are called, whichever comes last will occur.

The script executes 30 times per second (once per frame).

To experiment with different scripts it's recommended to copy them into an external text editor, such as Notepad.

Common shortcuts such as Ctrl+A, Ctrl+C and Ctrl+V are useful.

Holding the Tab key in-game gives you a lot of information about game state.
Default script
?hp < 10 activate potion loadout 1 ?loc = rocky equip shovel ?foe = poison equipL crossbow
Roadmap
Things that are planned, but not yet in the game:
?ai.enabled True if the AI is ON, False if the AI is off (e.g. during a cinematic moment) ?has = potion Evaluates if there is a potion available to use ?has = <item> Evaluates if the given item is equipped ?hasL = <item> Evaluates if the given item is equipped on the Left ?hasR = <item> Evaluates if the given item is equipped on the Right ?harvest returns the current harvest object targeted by the player ?harvest.distance returns the distance between the player and the target harvest location var a Declare a new int variable, single character. Up to 26 variables from a to z = Assign a value to a variable Variable Operations + add two variables - subtract two variables ++ increment variable -- decrement variable * multiply two variables / divide two variables % modulus : Else logical branch ?key Allows custom key inputs. E.g. ?key = A ?foe.level ?foe.state (cast,perf,cooldown) ?foe.statetime brew [resources] Creates a potion at the beginning of a location. E.g.: brew wood stone > #func Possibility to insert function return values into the print > #var Possibility to insert variables into the print > #foe.distance, etc equipF <str> equips an item to the Faerie foes The list of foes within 30 units
2 Comments
PKPenguin  [author] 4 Jan, 2020 @ 2:07pm 
Ah, I take it that that renders this guide fairly obsolete then. That's fine!
cucumb3r 3 Jan, 2020 @ 11:36pm 
dude, if anything, there came out beta to Stonescript
https://stonestoryrpg.com/stonescript_beta.html
Good Luck