Scripting Documentation
Moderator: Plugin Moderators
- Lobby
- Developer
- Reactions:
- Posts: 3705
- Joined: 26 Oct 2008, 12:34
- Plugins: Showcase Store
- Version: Beta
-
Platform
Scripting Documentation
Lua scripting is supported for several months now. It basically allows you to do more interactive plugins similar to fun.
The documentation contains both, some general information about Lua scripting as well a detailed description for all scripting libraries.
Lua Documentation
It's not finished yet, but I'm working on
The current state should allow you to already get started.
The documentation contains both, some general information about Lua scripting as well a detailed description for all scripting libraries.
Lua Documentation
It's not finished yet, but I'm working on
The current state should allow you to already get started.
- Imran M
- Inhabitant of a Country
- Reactions:
- Posts: 844
- Joined: 24 Oct 2018, 13:41
- Plugins: Showcase Store
-
Plugin Creator
Platform
Re: Scripting Documentation
Maybe. It's basically more complex json that has more advanced options and doesn't describe buildings. You can use it to make a toast (basically a text that pops up, but isn't like ingame notifications). I'm kind of getting mixed up with fun functionality, so you should talk to someone else.
Edit: This has hardly any info... so you should probably just skip this. But you could read it if you want to.
- JustAnyone
- Developer
- Reactions:
- Posts: 3480
- Joined: 23 Jul 2017, 12:45
- Location: Easter Island
- Plugins: Showcase Store
-
Platform
Re: Scripting Documentation
You can create cool stuff like planets with this!
- Hadestia
- Inhabitant of a Megalopolis
- Reactions:
- Posts: 727
- Joined: 17 Jul 2017, 16:16
- Location: Philippines
- Plugins: Showcase Store
- Contact:
-
Plugin Creator
Platform
Re: Scripting Documentation
If the game allow us to use java instead of lua?
- Lobby
- Developer
- Reactions:
- Posts: 3705
- Joined: 26 Oct 2008, 12:34
- Plugins: Showcase Store
- Version: Beta
-
Platform
Re: Scripting Documentation
No, because for that a compiler would be needed; it would be overkill to do that for scripting functionality.
In addition, it would be much harder to prevent Java programs from doing malicious things.
In addition, it would be much harder to prevent Java programs from doing malicious things.
- Bearbear76
- Former Bearbear65
- Reactions:
- Posts: 5730
- Joined: 10 Feb 2017, 14:53
- Location: L2 cache
- Plugins: Showcase Store
-
Plugin Creator
Platform
Re: Scripting Documentation
Trust me Lua can do 99% of the stuff you want to do.
You could also make some malicious plugin by using l o o p s.
You could also make some malicious plugin by using l o o p s.
- Hadestia
- Inhabitant of a Megalopolis
- Reactions:
- Posts: 727
- Joined: 17 Jul 2017, 16:16
- Location: Philippines
- Plugins: Showcase Store
- Contact:
-
Plugin Creator
Platform
Re: Scripting Documentation
If all lua's definition or maybe tags ? and attribute is applicable?
- Bearbear76
- Former Bearbear65
- Reactions:
- Posts: 5730
- Joined: 10 Feb 2017, 14:53
- Location: L2 cache
- Plugins: Showcase Store
-
Plugin Creator
Platform
- ian`
- Supporter
- Reactions:
- Posts: 117
- Joined: 04 Apr 2020, 17:36
- Location: Indonesien
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: Scripting Documentation
Why do some functions not show changes? i used the road condition, then built the road deco, so i use isRoadDeco, but it didn't get any changes. other cases, i put some numbers in x and y, but that didn't happen any actions.
- Bearbear76
- Former Bearbear65
- Reactions:
- Posts: 5730
- Joined: 10 Feb 2017, 14:53
- Location: L2 cache
- Plugins: Showcase Store
-
Plugin Creator
Platform
Re: Scripting Documentation
isRoadDeco() will return a boolean (true/false) value. It won't change anything is the program it's more of a "checking function". Post the code here and I can give you some advice.
- ian`
- Supporter
- Reactions:
- Posts: 117
- Joined: 04 Apr 2020, 17:36
- Location: Indonesien
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: Scripting Documentation
Yes, i have seen all values or return of function in doc website. Boolean, number, or string.
Code: Select all
function script:click(x,y)
if Tile.isRoadDeco == true and Tile.getTraffic >= 0.3 then
stuff
end
- JustAnyone
- Developer
- Reactions:
- Posts: 3480
- Joined: 23 Jul 2017, 12:45
- Location: Easter Island
- Plugins: Showcase Store
-
Platform
Re: Scripting Documentation
You need to provide it with x, y and level arguments