Announcement: Why not try our official idea generator for inspiration when making puzzles?


Caravel Forum : DROD Boards : Architecture : _MyScript and TSS
New Topic New Poll Post Reply
Poster Message
Dischorran
Level: Smitemaster
Avatar
Rank Points: 3408
Registered: 09-10-2005
IP: Logged
icon _MyScript and TSS (+8)  
TSS scripting is missing a few odds and ends in what can be easily done with scripting, but monkeying with _MyScript commands can permit a few more things to be done. This is after skell's RPG guide, which largely seems to hold for TSS as well but needs some extra numbers identified. If none of this even begins to make any sense to you, Xindaris goes into more detail here.

Specifically, _MyScript can be used to build and detect some stuff that isn't explicitly listed in the options for the relevant commands. In all cases, reset changed variables back to -9999 ASAP or scripts tend to stop working.

Use _MyScriptH in generate entity, _MyScriptF in wait for entity type
0: Roach
1: Roach queen
2: Roach egg
3: Goblin
4: Nothing. Formerly neather?
5: Wraithwing
6: Evil Eye
7: ---
8: Tar mother
9: Tarspawn
10: Brain
11: Mimic
12: Spider
13: ---
14: ---
15: Golem
16: Waterskipper
17: Waterskipper Nest
18: Aumtlich
19: Clone
20: Decoy
21: Wubba
22: Seep
23: Stalwart
24: Young Halph
25: 39th
26: Fegundo
27: Fegundo ashes (can't generate entity)
28: Guard
29: ---
30: Mud mother
31: Mud baby
32: Gel mother
33: Gel baby
34: Citizen
35: Rock giant
36: Halph
37: Slayer
38: Soldier
39: Engineer
40: Construct
41: Gentryii (including chain); can't generate entity
42: Temporal projection
43: Fluff

Use _MyScriptF in Build or Wait for Item At
0:
1: Floor
2: Pit
3: Stairs
4: Wall
5: Broken wall
6: Blue door
7: Green
8: Red
9: Yellow
10: Yellow open
11: Trapdoor
21: Invis
22: Mimic
23: Scroll
24: Orb
35: Tar
36: Checkpoint
37: Black
38: Speed
39: Briar root
40: Withered briar
41: Briar growth
43: Bomb
44: Fuse
47: Tunnel north
48: Tunnel south
49: Mirror
50: Clone
51: Decoy
52: Water platform
53: Platform (but appears as pit, and may make DROD unstable?)
54: Floor mosaic
55: Road
56: Grass
57: Dirt
58: Alternate floor
59: Master wall
60: Mud
61: Stairs up
62: Secret wall
63: Tunnel east
64: Tunnel west
65: Image floor
66: Hard wall
67: Water
68: Open green
69: Open blue
70: Open red
71: Open black
72: Trapdoor over water
73: Oremites
74: Light
75: Hot tile
76: Gel
77: Relay station
78: Multiuse pressure plate
79: Bridge
80: Horizontal bridge
81: Vertical bridge
82: Image pit
83: Image wall
86: Shallow water
87: Squad horn
88: Soldier horn
89: Stepping stone
90: Seeding beacon
91: Seeding beacon off
92: Powder keg
93: Floor spikes
103: Fluff
104: Fluff vent
105: Thin ice
106: Thin ice over shallows
107: Fire trap
108: Active fire trap
109: Hold complete wall
157: Start of unregistered stuff?
Negative values are used for tokens:
-4: Rotate CW
-5: Rotate CCW
-6: Switch tar/mud
-7: Switch tar/gel
-8: Switch mud/gel
-9: Vision
-10: Power
-11: Disarm
-12: Persistence
-13: Conquer
-14: Sword
-15: Pickaxe
-16: Spear
-17: Staff
-18: Dagger
-19: Caber
-20: Temporal

____________________________
Click here to view the secret text


[Last edited by Dischorran at 02-17-2018 12:21 AM]
07-18-2014 at 06:05 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
abe10
Level: Goblin
Rank Points: 18
Registered: 03-14-2014
IP: Logged
icon Re: _MyScript and TSS (0)  
What exactly is this for? Does this have to do with the NPC timing?

____________________________
My avatar is a cool gif I found on the Kongregate forums.
Click here to view the secret text

07-22-2014 at 12:11 AM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 5056
Registered: 02-04-2003
IP: Logged
icon Re: _MyScript and TSS (0)  
abe10 wrote:
What exactly is this for? Does this have to do with the NPC timing?
It's about custom behavior you can place in your levels with scripts. Please read the in-game help pages about Script Commands. Look for "_MyScript" in the sections about script variables.

____________________________
Gandalf? Yes... That's what they used to call me.
Gandalf the Grey. That was my name.
I am Gandalf the White.
And I come back to you now at the turn of the tide.
07-22-2014 at 12:50 AM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
Kwerulous
Level: Smiter
Rank Points: 340
Registered: 05-15-2008
IP: Logged
icon Re: _MyScript and TSS (+2)  
I may be being dense (I'm hardly a scripting expert; I don't even know that I'm using these correctly), but have you got the wrong variable name for generate entity? Where you've written _MyScriptW, I think this should be _MyScriptH. I tried this:
  Set Var _MyScriptX = 20
  Set Var _MyScriptY = 20
  Set Var _MyScriptW = 10
  Generate entity [whatever] at (wherever,wherever,whichever)
And I get [whatever] at (20,20). Using _MyScriptH gives the desired effect (brain (10) at (20,20)). It looks like _MyScriptW gives the orientation of the placed entity.

In any case, great reference, thanks for this!

[Last edited by Kwerulous at 07-22-2014 01:19 PM]
07-22-2014 at 11:54 AM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Dischorran
Level: Smitemaster
Avatar
Rank Points: 3408
Registered: 09-10-2005
IP: Logged
icon Re: _MyScript and TSS (+1)  
Hm, guess so. Fixed.

____________________________
Click here to view the secret text

07-23-2014 at 12:12 AM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
skell
Level: Legendary Smitemaster
Avatar
Rank Points: 3734
Registered: 12-28-2004
IP: Logged
icon Re: _MyScript and TSS (+1)  
Feel free to adapt RPG's Architectopedia which is a full reference to _MyScript variables in DROD RPG.

____________________________
My website | Facebook | Twitter
07-24-2014 at 10:13 AM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts High Scores This architect's holds Quote Reply
Dischorran
Level: Smitemaster
Avatar
Rank Points: 3408
Registered: 09-10-2005
IP: Logged
icon Re: _MyScript and TSS (0)  
I was ... sort of hoping to just link to it and wait for somebody else to do the grunt work. :)

____________________________
Click here to view the secret text

07-24-2014 at 12:33 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
TripleM
Level: Smitemaster
Rank Points: 1373
Registered: 02-05-2003
IP: Logged
icon Re: _MyScript and TSS (+1)  
mrimer wrote:
Please read the in-game help pages about Script Commands. Look for "_MyScript" in the sections about script variables.
For what it's worth, the only mention in the in-game help is:
There are a number of predefined script vars that begin with an underscore.
...
Variables prefixed with "_My" are connected to the state of the NPC.
Nothing about what anything means, eg O being orientation, or how to use them. Took a lot of forum searching to find examples + that Architectopia thread to start figuring it out.

[Last edited by TripleM at 08-20-2014 06:32 AM]
08-20-2014 at 06:27 AM
View Profile Send Private Message to User Show all user's posts Quote Reply
Jacob
Level: Smitemaster
Rank Points: 3746
Registered: 10-01-2004
IP: Logged
icon Re: _MyScript and TSS (+1)  
Yes, the documentation on scripting is pretty scare in some areas, both ingame and on the forum.

It would be great if someone who knew enough about scripting (i.e. not me) could write some tutorials which could go in the game, and be put on the drod site.

e.g. How do I do X? With X being some task of increasing complexity throughout the tutorial.


____________________________
New to DROD? You may want to read this.
My Holds and Levels:
Click here to view the secret text

08-20-2014 at 04:32 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
RoboBob3000
Level: Smitemaster
Avatar
Rank Points: 1978
Registered: 10-23-2003
IP: Logged
icon Re: _MyScript and TSS (+1)  
Jacob wrote:
Yes, the documentation on scripting is pretty scare in some areas, both ingame and on the forum.

It would be great if someone who knew enough about scripting (i.e. not me) could write some tutorials which could go in the game, and be put on the drod site.

e.g. How do I do X? With X being some task of increasing complexity throughout the tutorial.

If someone could come up with a few suggestions for X, then I might be interested in writing some tutorials.

Some more advanced topics that some to mind include:

-Flow control (If/Else/IfEnd/Label/GoTo/GoSub/Return)
-Variables, _My Variables, Referencing Variables (_MyScript Overrides)
-Characters, Default Scripts, Local Variables
-Graphical things (Tiles, Image floors, animations, effects) (This one is not my area of expertise)
-Debugging, Testing considerations

____________________________
http://beepsandbloops.wordpress.com/
08-20-2014 at 07:40 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
abe10
Level: Goblin
Rank Points: 18
Registered: 03-14-2014
IP: Logged
icon Re: _MyScript and TSS (0)  
I have found a cool and simple program that can alter pictures with ease. It is called Pinta. Now that I can MAKE pictures, I just need to find a way to CONVERT pictures to .dmf.

____________________________
My avatar is a cool gif I found on the Kongregate forums.
Click here to view the secret text

08-20-2014 at 08:40 PM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
averagemoe
Level: Smiter
Avatar
Rank Points: 487
Registered: 03-22-2012
IP: Logged
icon Re: _MyScript and TSS (-8)  
mrimer wrote:
abe10 wrote:
What exactly is this for? Does this have to do with the NPC timing?
It's about custom behavior you can place in your levels with scripts. Please read the in-game help pages about Script Commands. Look for "_MyScript" in the sections about script variables.

It's severely unhelpful, I cant figure out what the letters mean. Could I get some more details or are you trying to alinate people whith very little knowledge of scripting terminology. If it's the latter, you people are jerks.

____________________________
There are two types of sheep in the world. Those who jump off a bridge when told to, and those who jump off a bridge when told not to. Don't be either.
03-02-2015 at 11:01 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
Jacob
Level: Smitemaster
Rank Points: 3746
Registered: 10-01-2004
IP: Logged
icon Re: _MyScript and TSS (0)  
There is more explanation in the scripting guide linked to in the first post.

I'm sure that if you have specific questions there are plenty of people on the forum who can help answer them.

____________________________
New to DROD? You may want to read this.
My Holds and Levels:
Click here to view the secret text

03-02-2015 at 11:52 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
Nuntar
Level: Smitemaster
Avatar
Rank Points: 4590
Registered: 02-20-2007
IP: Logged
icon Re: _MyScript and TSS (+2)  
Well, both this topic and skell's start off assuming you know what the "MyScript" variables actually do, which is not easy to find out. The only place it's really documented is the F1 help in DROD RPG, not TSS.

These variables are parameter overrides for other script commands. For instance, if a script has the command "Activate item at (0,0)" but _MyScriptX contains the value 5 and _MyScriptY contains the value 7, it will activate the item at (7,5). So you can make any of the commands that take a location as parameter do different things depending on other variables. For example, you can store _X and _Y (the player's location) in custom variables CurrentX and CurrentY, then make a script generate a monster on the tile the player was on 10 moves ago.

_MyScriptF and _MyScriptH similarly affect other parameters. For instance, with "Generate entity", _MyScriptH controls the type of monster generated (if you know what number is what monster -- that's what the list in the opening post of this topic is for) and _MyScriptF controls its orientation.

All these variables must be given the value -9999 after using them. This is a special value that tells the game "don't use an override". If you don't set them back, they will affect other script commands besides the one you wanted to affect.

____________________________
50th Skywatcher
03-03-2015 at 04:43 AM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
azb
Level: Smiter
Rank Points: 460
Registered: 03-08-2014
IP: Logged
icon Re: _MyScript and TSS (+2)  
Here's an updated list of Game Effects to include the TSS ones:

Direction Matters means it depends on the direction you give it, such as "Center" or "West", etc. Also, Sound Matters means that it depends whether you click "On" or "Off" for the sound associated with the effect. (If the Sound does not matter, it is automatically "Off.")

_MyScriptH is used to determine which type, and the numbers do as follows:
0: Blood Splatter (Direction Matters, Sound Matters)
1: Mud Splatter (Direction Matters, Sound Matters)
2: Tar Splatter (Direction Matters, Sound Matters)
3: Gel Splatter (Direction Matters, Sound Matters)
4: Seep Splatter (Direction Matters, Sound Matters)
5: Rock Splatter (Plays "Wall smash" sound instead of "Golem kill" sound) (Direction Matters, Sound Matters)
6: Slayer Splatter (Unsure, but I think Direction Matters) (Sound Matters)
7: Wall Debris (Direction Matters, Sound Matters)
8: Fuse Spark (Direction Matters, Sound Matters)
9: Explosion (Does not depend on direction, but Sound does matter)
10: Water Splash (Does not depend on direction, but Sound does matter)
11: Hot Tile Steam (Does not depend on direction, but Sound does matter)
12: Apparently Nothing?
13: Wall Crumbs (aka "Vermin") (Unsure, but I believe Direction Matters, sound does not matter)
14: Lightning Bolt (Direction comes from the NPC's location to the determined tile) (Sound Matters)
15: Jitter (only works if an entity is on the tile) (Unsure, but I do not believe Direction matters) (Sound does not matter)
16: Spikes Popping (Does not depend on direction, but Sound does matter)
17: Puff Explosion (Does not depend on direction, but Sound does matter)
18: Flame (Does not depend on direction, but Sound does matter)
19: Ice Melting (Does not depend on direction, but Sound does matter)
20: Fluff Splatter (Direction Matters, but sound does not)

Every script from 21 and up are invalid and do nothing.

____________________________
Please feel free to test the ultimate arena: King Azb's Arena today!
07-25-2015 at 01:03 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Moo
Level: Master Delver
Rank Points: 224
Registered: 10-14-2006
IP: Logged
icon Re: _MyScript and TSS (+1)  
12 is "Swirl", which is the yellow swirly thing that appears over you when starting the game etc.
07-25-2015 at 03:46 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
hyperme
Level: Smitemaster
Avatar
Rank Points: 1062
Registered: 06-23-2006
IP: Logged
icon Re: _MyScript and TSS (+2)  
New values from 5.1 for Build and Build Marker:

Arrow (N) : 13
Arrow (NE) : 14
Arrow (E) : 15
Arrow (SE) : 16
Arrow (S) : 17
Arrow (SW) : 18
Arrow (W) : 19
Arrow (NW) : 20

Off Arrow (N) : 94
Off Arrow (NE) : 95
Off Arrow (E) : 96
Off Arrow (SE) : 97
Off Arrow (S) : 98
Off Arrow (SW) : 99
Off Arrow (W) : 100
Off Arrow (NW) : 101

Orthosquare : 45

There are others so I'll check the DROD source later.

____________________________
[Insert witty comment here]
Qzvlkx?
01-19-2016 at 07:26 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
averagemoe
Level: Smiter
Avatar
Rank Points: 487
Registered: 03-22-2012
IP: Logged
icon Re: _MyScript and TSS (0)  
Going through some of the scripts included in the TSS custom elements pack, I noticed that sometimes a variable will be set to -9999. I'm pretty sure there's some sort of flag that makes the number do something special, but I couldn't find any reference to that. Can anyone be of assistance?

____________________________
There are two types of sheep in the world. Those who jump off a bridge when told to, and those who jump off a bridge when told not to. Don't be either.
04-15-2016 at 03:48 AM
View Profile Send Private Message to User Show all user's posts Quote Reply
Dragon Fogel
Level: Smitemaster
Rank Points: 2434
Registered: 06-21-2014
IP: Logged
icon Re: _MyScript and TSS (+1)  
From the original post of this thread:

Dischorran wrote: In all cases, reset changed variables back to -9999 ASAP or scripts tend to stop working.

So that's just a resetting thing.
04-15-2016 at 04:12 AM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Xindaris
Level: Smitemaster
Avatar
Rank Points: 1531
Registered: 06-13-2015
IP: Logged
icon Re: _MyScript and TSS (+1)  
More specifically, the myscript variables override the values originally entered into a command (in the editor) with something that may be set more dynamically (during play of the room), and -9999 is the special value that says "don't override it."

____________________________
109th Skywatcher

Here are some links to Things!
Click here to view the secret text


[Last edited by Xindaris at 04-15-2016 04:40 AM]
04-15-2016 at 04:39 AM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
averagemoe
Level: Smiter
Avatar
Rank Points: 487
Registered: 03-22-2012
IP: Logged
icon Re: _MyScript and TSS (0)  
azb wrote:
Here's an updated list of Game Effects to include the TSS ones:

Direction Matters means it depends on the direction you give it, such as "Center" or "West", etc. Also, Sound Matters means that it depends whether you click "On" or "Off" for the sound associated with the effect. (If the Sound does not matter, it is automatically "Off.")

_MyScriptH is used to determine which type, and the numbers do as follows:
0: Blood Splatter (Direction Matters, Sound Matters)
1: Mud Splatter (Direction Matters, Sound Matters)
2: Tar Splatter (Direction Matters, Sound Matters)
3: Gel Splatter (Direction Matters, Sound Matters)
4: Seep Splatter (Direction Matters, Sound Matters)
5: Rock Splatter (Plays "Wall smash" sound instead of "Golem kill" sound) (Direction Matters, Sound Matters)
6: Slayer Splatter (Unsure, but I think Direction Matters) (Sound Matters)
7: Wall Debris (Direction Matters, Sound Matters)
8: Fuse Spark (Direction Matters, Sound Matters)
9: Explosion (Does not depend on direction, but Sound does matter)
10: Water Splash (Does not depend on direction, but Sound does matter)
11: Hot Tile Steam (Does not depend on direction, but Sound does matter)
12: Apparently Nothing?
13: Wall Crumbs (aka "Vermin") (Unsure, but I believe Direction Matters, sound does not matter)
14: Lightning Bolt (Direction comes from the NPC's location to the determined tile) (Sound Matters)
15: Jitter (only works if an entity is on the tile) (Unsure, but I do not believe Direction matters) (Sound does not matter)
16: Spikes Popping (Does not depend on direction, but Sound does matter)
17: Puff Explosion (Does not depend on direction, but Sound does matter)
18: Flame (Does not depend on direction, but Sound does matter)
19: Ice Melting (Does not depend on direction, but Sound does matter)
20: Fluff Splatter (Direction Matters, but sound does not)

Every script from 21 and up are invalid and do nothing.

So which ones determine the direction and sound?

____________________________
There are two types of sheep in the world. Those who jump off a bridge when told to, and those who jump off a bridge when told not to. Don't be either.

[Last edited by averagemoe at 05-11-2016 04:16 AM]
05-11-2016 at 04:16 AM
View Profile Send Private Message to User Show all user's posts Quote Reply
azb
Level: Smiter
Rank Points: 460
Registered: 03-08-2014
IP: Logged
icon Re: _MyScript and TSS (+1)  
_MyScriptX controls the X-coordinate.

_MyScriptY controls the Y-coordinate.

_MyScriptH controls the type (the list that you quoted.)

_MyScriptW controls the direction (what you are looking for.)

_MyScriptF overrides the sound flag (on/off when applicable.)

____________________________
Please feel free to test the ultimate arena: King Azb's Arena today!
05-14-2016 at 08:28 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
averagemoe
Level: Smiter
Avatar
Rank Points: 487
Registered: 03-22-2012
IP: Logged
icon Re: _MyScript and TSS (+1)  
I figured out the undetermined ones.

7: Serpent
13: Adder
14: Rattlesnake
29: NPC

____________________________
There are two types of sheep in the world. Those who jump off a bridge when told to, and those who jump off a bridge when told not to. Don't be either.
04-25-2019 at 02:44 AM
View Profile Send Private Message to User Show all user's posts Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD Boards : Architecture : _MyScript and TSS
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.