Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - mctwist

Pages: 1 ... 3 4 5 6 7 [8] 9 10 11 12 13 ... 70
106
Add-Ons / Re: [Support] EventScript - Sharing events for the future
« on: November 15, 2017, 04:29:10 AM »
If we replace syntax such as the -> in the script file it should still work as intended right?

I'm not sure what you mean here. If you modify the add-on to change the -> to anything else, then it'll only work for you, but everyone else that tries to use it will get errors.

I feel like just having > would be nice simply because its one less character (not sure if its used anywhere else though)

I've used that syntax before for my other event add-ons, but I only did that for laziness. I believe that this new syntax will make it easier to understand that it's a "pointer" that goes toward something instead of a "greater than". But to set a point I'll quote one of the known issues:
It is known that people have their own suggestion for design, but surely this standard is already set and cannot be altered.
The design is made this way to make it easier to understand events as well. I put the understanding of the event as first priority and then the functionality as second. However, the design made it possible for the functionality to be able to extend in the future with more functionality like "macros" and "named events". The arrow(->) is not crucial for functionality, but it plays a great part for the design to make the script easier to read.

107
General Discussion / Re: EventScript - Eventing 2.0
« on: November 15, 2017, 04:11:38 AM »
how do you activate it, nothing happens

From the download page it tells this:
Download. Install. Set your shortcuts of copy/paste. Start scripting.

Edit: I added a more detailed explanation for clarity.

108
Add-Ons / Re: [Support] EventScript - Sharing events for the future
« on: November 14, 2017, 04:00:52 PM »
I DONT LIKE HOW THE ARROWS HAVE HYPHENS IN THEM ITS WEIRD

Breath... You will get used to it eventually.

109
General Discussion / Re: EventScript - Eventing 2.0
« on: November 14, 2017, 03:49:20 PM »
I've released the Add-On. Do tell if you find anything that needs fixed.

https://forum.blockland.us/index.php?topic=314714.0

Design, scripting, debugging, testing, discussing and uploading all took in the time of yesterday to today, in total of about 20 hours.

110
Add-Ons / [Support] EventScript - Sharing events for the future
« on: November 14, 2017, 03:42:33 PM »
EventScript
For years people have used Duplicator or manual copying to transfer events from bricks and builds to other bricks and builds. Sharing events to others is also a hassle. Handling a huge amount of events have always become tedious and problematic. However, there is a solution for this.

This mod introduces the ability to script your events, through the new scripting language EventScript. It removes the hurdle of sharing. It reduces the problem with huge amounts of events. It completely obliterates copying issues.

Download. Install. Set your shortcuts of copy/paste/editor. Start scripting.


Copies the left code into the event system and then copies the event system into readable script.

Details
After installing the add-on, go to Options to set the shortcuts for copying and pasting events. Keep in mind that anything that relates to ctrl+c, alt+c, ctrl+v and alt+v will not work as expected. When this is done, one could easily just join a server and go into eventing mode. While there, just copy the events with previously mentioned shortcut. This will place the script in the clipboard, ready to be pasted in any text editor of choice. If a script already is within the clipboard, it can be pasted in the same manner with the other shortcut.

Any errors will halt the script and let the user know, giving brief explanation of why it could not parse the script. Keep in mind that pasting will always overwrite your current events, unless an error occurs.

It is also possible to paste the script on the server, if the add-on is enabled.
Code: [Select]
$script = EventScriptServer_save(_myBrick);
EventScriptServer_load(_myBrick, $script);
First function saves the events to a string.
Second function loads the string onto the brick.

Key bindings
When no binding is set, these are the default:
Code: (Windows) [Select]
ctrl+shift+c  Copy
ctrl+shift+v  Paste
ctrl+shift+e  Editor
Code: (Mac) [Select]
cmd+shift+c   Copy
cmd+shift+v   Paste
cmd+shift+e   Editor

Script Example
Script provided by Platypi.
Code: [Select]
# Author: Platypi / SadBlobfish
# Makes a brick change colors on a loop when toggled

# Start color changing (start with events enabled)
start: [x][0]onActivate->Self->playSound("Beep_Checkout.wav")
[x][33]onActivate->Self->fireRelay

# Stop color changing (start with events disabled)
[ ][0]onActivate->Self->playSound("Beep_Denied.wav")
end: [ ][0]onActivate->Self->cancelEvents

# Alternate between starting and stopping color changing
[x][0]onActivate->Self->toggleEventEnabled([start:end])

# Change colors
[x][0]onRelay->Self->setColor("0.898039 0.000000 0.000000 1.000000")
[x][500]onRelay->Self->setColor("0.898039 0.898039 0.000000 1.000000")
[x][1000]onRelay->Self->setColor("0.000000 0.498039 0.247059 1.000000")
[x][1500]onRelay->Self->setColor("0.200000 0.000000 0.800000 1.000000")

# Loop color changing
[2000]onRelay->Self->fireRelay

# Stop color changing when brick is blown up
onBlownUp->Self->cancelEvents

More in Tutorial thread.

Official support
MEGA (Up to v1.6)

Known issues
An unknown amount of Add-Ons wont work correctly with this mod as they are modifying the Event window in an evil manner.
It is known that people have their own suggestion for design, but surely this standard is already set and cannot be altered.
I cannot take your babies. It would be against the law and I see it more of a burden than a gift.

Download (aposoc.net)
Download (blocklandglass.com)

GitLab
Tutorial and Discussion

111
General Discussion / Re: EventScript - Eventing 2.0
« on: November 14, 2017, 02:51:32 PM »
Are spaces allowed in event names? If not, maybe it could just be "onActivate Self SetColor" without any unnecessary syntax.

You could even write it like this if you wanted to:
Code: [Select]
X 0 onActivate Self setColor 0
But I feel that looks really odd and removes the possibility to build upon it. My design was made in such a way that one could easily set have their own coding style while still enforcing a standard that everyone understands.

112
General Discussion / Re: EventScript - Eventing 2.0
« on: November 14, 2017, 10:09:16 AM »
Will it be possible to copy events from the ingame window and paste them into a text editor?

I'll explain the gif: From there I'm copying the text from the editor and pastes it into the event window with a shortcut you specify. Then I copy that event window with an another shortcut and pastes it into the text editor.



A quick update: I'm currently trying to add the functionality for the server as well, but I think I might have to scrap that due to difficulties for getting a correct id->datablock list on the server.

Edit: I might have found a way around it.
Edit2: And we're golden. Saving and loading scripts through server also now works.

113
General Discussion / Re: EventScript - Eventing 2.0
« on: November 14, 2017, 08:12:49 AM »
Instead of writing ->, why not a ;? Quicker to write.

Easier to understand. The events move in that direction, hence an arrow to strengthen that fact.

X 0 onActivate; Self; setColor(0)

The enabled and delay to the left is both that it looks better, but also so we can make them optional.

114
General Discussion / EventScript - Eventing 2.0
« on: November 14, 2017, 07:02:51 AM »
EventScript

There has been several ways to handle events, even additions that add more functionality for it. Some even used it in ways that it was not supposed to. However, there was no specification or standard of how to write events outside of Blockland. Everyone went as they pleased and even if most people understood it, it was still tedious to implement the events if they were long enough.

Introducing the new scripting language EventScript. It standardizes the specification of how to write events through text.


Copies the left code into the event system and then copies the event system into readable script.

EventScript Support List
  • Standardized format for events, everything included
  • Optional semantics
  • Easy as copy-paste
  • Comments
  • Labels
  • Indexing and ranges

Example
Code: [Select]
# Normal event
[x][33]onActivate->Self->fireRelayNum("1-5 5 7", "Brick")

# Disabled and delay with no params
[ ][500]onBlownUp->Player->Kill
[x][  0]onRelay->Self->fakeKillBrick("5 10 3.4", 2)

# Separate lines
[x][56]onRelay
->Self
->setColor(
"0.000000 0.000000 1.000000 1.000000"
)

# Default behavior
onRelay -> "test_brick" -> setColliding (1)
setApartment -> And -> setOwner (9845)
onProjectileHit -> Projectile -> Bounce (1.3)

# Indexes and ranges
onRelay -> Self -> toggleEvents([0:3])
onRelay -> Self -> toggleEvents([1,3,5])

# Labels
myLabel:
onRelay -> Self -> toggleEvents([myLabel:myLabel])

Semantics
The language is built on being forgiving. All sort of whitespace is ignored and newlines are the only used as an exception for certain cases due to parsing issues. Below is a detailed walk-through of the first event in the example above.

Enabled / Delay
Code: [Select]
[x][33]
Each of these needs to be put between a pair of square brackets.
The first x is defining that the event is enabled. If there is no x, then it is disabled. Leaving this parameter out will default to enabled.
The second 33 is the delay. Leaving this out will default to 0 or server default.
These can be written in any order.

Input
Code: [Select]
onActivate->
This defines the input event name. The arrow indicates the end of the name and the beginning of the target.

Target / Name
Code: [Select]
Self->
This indicates the current target. For named targets, one just put the name between double quotes. As for input event name, the arrow indicates the end of the name and the beginning of the output name.
Code: [Select]
"test_brick"->

Output
Code: [Select]
fireRelayNum
The output name of the event.

Parameters
Code: [Select]
("1-5 5 7", "Brick")
The parameters for the output event needs to be put between paranthesis. This is optional for output events with no parameters. Each parameters is separated with a comma. They could also be put between double quotes if it contain comma or double quotes. Recommendation is to put everything that isn't number between double quotes to avoid issues.

Indexes and ranges
Code: [Select]
[1,3,5]
[0:3]
Indexes or ranges is a feature to handle a bigger amount of event numbers. It supports both specific indexes and ranges from one number to inclusive an another number.
Code: [Select]
[2:5,7,10,15:20,25]

Labels
Code: [Select]
myLabel:
The above code creates a label that can be used to reference to the event after it.
Code: [Select]
[myLabel:myLabel]
These are then used for indexes and ranges so direct numbers are not needed.

Links

115
General Discussion / Re: "Ana" ARG thread
« on: November 12, 2017, 10:16:34 AM »
Lol, dll size can change a lot based on optimizations, standard library type (varies with VS version), if you static compile, use dynamic base, generate meta data, packer usage, etc etc.

I am well aware of this fact. I did compile the DLL with their own build files, located on GitHub. The only difference is that they used an older version of the SDK, which I doubt would increase the file size this significantly. However, the dll could be dynamically linked with DiscordRPC, though.

116
General Discussion / Re: "Ana" ARG thread
« on: November 11, 2017, 03:55:29 PM »
As I mentioned earlier, I compiled the source that was given for the DLL. Somehow I ended up with more than 3 times the size than the one Ana. gave us, where only DiscordRPC was more than double the size. But still it worked for people. I cannot say that the DLL was legit, but it was crudely put together, barely working at all. Unless someone de-compiles it, we cannot be sure if it's the real deal or if it's a hoax, as some people said it worked. I tried the source and it worked somewhat. I could make it better if I get time to fix it. But then again, I'm not sure I'll release it here as its not an Add-On.

117
General Discussion / Re: "Ana" ARG thread
« on: November 11, 2017, 10:31:41 AM »
I'm still confused how we think it is or was Zapk, can someone help de-confuse me?

People point at him, but there is no real evidence that it is him. For now, it's just "they". People should stop telling otherwise until they got real evidence on the subject.

118
General Discussion / Re: "Ana" ARG thread
« on: November 11, 2017, 10:23:53 AM »
I also would like to add the following as a hint to who the person might be:
From GitHub

Backup:
Backup Fork

119
General Discussion / Re: "Ana" ARG thread
« on: November 11, 2017, 04:59:43 AM »
They at least followed my directions to upload on github with build files so we could reproduce the build quite easily.

https://github.com/blocklandana/blockland-discord

I've forked it for safety and have also compiled it. If anyone want directions to build themselves, then I'll send a step-by-step. However, there's a lot of functionality left out here that could make this a lot better. As I mentioned in that thread, I would be happy to implement more features if people would love to have it. Most of it should be quite an easy task.

Edit: I tested it and it works like it should do. However, the packaging is crude and is not guaranteed to work properly. Especially when going from one game to the Main Menu. This could really be done better. Also adding some safety checks would minimize severe errors.



Also, adding to the thread, the only information on that github worth anything is in one commit where one e-mail is: anablockland@gmail.com

Not sure if anyone get any use of it, or if you even know anything about it already.

120
Modification Help / Re: Detect if window is active
« on: November 10, 2017, 05:19:47 PM »
There's a function that is called whenever you select the window again:

Code: [Select]
onWindowReactivate()
Sadly, I didn't see any function for deselecting the window.

Pages: 1 ... 3 4 5 6 7 [8] 9 10 11 12 13 ... 70