Argonath RPG - A World of its own

GTA:SA => SA:MP - San Andreas Multiplayer => SA:MP General => Topic started by: Teddy on November 26, 2015, 09:02:17 pm

Title: Let's build the Internet: AIL
Post by: Teddy on November 26, 2015, 09:02:17 pm
AIL is Argonath Internet Language and is a format for creating websites for in-game use. It uses JSON as a standard and allows for robust control. The following is an example of a Discount PC store (furniture shop in-game)
Code: [Select]
{
"domain": "aiw.discountpc.bizz",
"owner": "[WS]EvilTeddy",
"data": [
"1983",
"generic_page",
"allowed_payment_gateway",
"restrict_location",
"restrict_inventory"
],
"menu": [
"Home",
"About Us",
"Order"
],
"pages": [
"Welcome to Discount PC world! We sell the highest quality and cheapest home computers in the state!",
"Discount PC was founded in 1982 by Theodore Haswell I and has since grown to be the largest distributor of PCs since.",
"Ordering a new PC is easy. Simply click the order button below and your new PC will be shipped soon! Each PC costs $150 ARD"
],
"response": [
"",
"",
"Order"
],
"functions": [
"",
"",
"order_pc"
],
"local_function": {
"order_pc": [
"take_player_funds",
150,
"send_item",
"Laptop 1"
]
}
}

The first bit you don't need to worry about. The developers handle setting up this information. The first part of the data field is the property ID, followed by the page type. The last three are permissions; payment gateway, location service, and inventory.
Code: [Select]
"domain": "aiw.discountpc.bizz",
"owner": "[WS]EvilTeddy",
"data": [
"1983",
"generic_page",
"allowed_payment_gateway",
"restrict_location",
"restrict_inventory"
],

Next up is the home menu. When you first access a website from a computer in-game you are given a menu of pages in the site.
Code: [Select]
"menu": [
"Home",
"About Us",
"Order"
],

Next up we define our pages, the order of these need to directly corespond to the pages
Code: [Select]
"pages": [
"Welcome to Discount PC world! We sell the highest quality and cheapest home computers in the state!",
"Discount PC was founded in 1982 by Theodore Haswell I and has since grown to be the largest distributor of PCs since.",
"Ordering a new PC is easy. Simply click the order button below and your new PC will be shipped soon! Each PC costs $150 ARD"
],

you can see the corresponding values better here:
Code: [Select]
"menu": [
"Page 1",
"Page 2",
"Page 3"
],
"pages": [
"Page 1 Text",
"Page 2 Text",
"Page 3 Text"
],

The next part get's into actual interactivity and is responses. All message dialog have two buttons, the first we can leave blank so it only shows the "back" button. However if you want interactivity you can program responses:
Code: [Select]
"response": [
"",
"",
"Order"
],

You can see on our example on our order page we want the button "Order" to be next to "Back". This would execute a function, which we define here in our functions:

Code: [Select]
"functions": [
"",
"",
"order_pc"
],

Again, the order is directly corresponding of the function. Now we need to define the function, for this we setup local_function and create "order_pc".

Code: [Select]
"local_function": {
"order_pc": [
"take_player_funds",
150,
"send_item",
"Laptop 1"
]
}

Functions are executed in a procedural order. We will eventually release full documentation detailing building local functions. The directive take_player_funds automatically checks to make sure the player has the funds. If not, the function will automatically abort. The directive send_item will also automatically make sure the business has the product in stock.

We will release full documentation on this upcoming platform which should see in-game functionality before the end of the year. In a few days a GitHub repo will be created for you to create and submit your own websites into the Argonath Interactive Web (AIW). This repo will also contain the documentation needed for creating websites.

On a side note, happy thanksgiving to our American friends here at Argonath. Enjoy getting fatter!  :bananav:
Title: Re: Let's build the Internet: AIL
Post by: TiMoN on November 26, 2015, 09:10:31 pm
Just when someone mentioned players scripting in the game itselt, great job Teddy.
Title: Re: Let's build the Internet: AIL
Post by: Archie on November 26, 2015, 09:11:25 pm
Wow, looks pretty. Thank you!
Title: Re: Let's build the Internet: AIL
Post by: Dizzy. on November 26, 2015, 09:28:33 pm
Looks Great Teddy, Good job.
Title: Re: Let's build the Internet: AIL
Post by: Teddy on November 26, 2015, 09:48:46 pm
More information on programming here:
https://github.com/derekmartinez18/ArgonathInteractiveWeb/wiki/Function-Programming
Title: Re: Let's build the Internet: AIL
Post by: TiMoN on November 26, 2015, 09:53:44 pm
More information on programming here:
https://github.com/derekmartinez18/ArgonathInteractiveWeb/wiki/Function-Programming
Programmable hitman websites? Holy shit.
Question, will this use textdraws or dialogs when added ig?
Title: Re: Let's build the Internet: AIL
Post by: Badandy on November 27, 2015, 04:21:45 am
I really REALLY want to play with this, as a programmer and web developer, this makes me happy. I want to use this so bad   :bananarock:

I LOVE YOU TEDDDDDDDDDDY
Title: Re: Let's build the Internet: AIL
Post by: Marcel on November 27, 2015, 08:19:53 am
I really REALLY want to play with this, as a programmer and web developer, this makes me happy. I want to use this so bad   :bananarock:

I LOVE YOU TEDDDDDDDDDDY
Now you can RPly build websites for your clients and RP the same frustrations as real life webdevelopers about their clients. BRILLIANT!!!
Title: Re: Let's build the Internet: AIL
Post by: TiMoN on November 27, 2015, 08:31:31 am
Now you can RPly build websites for your clients and RP the same frustrations as real life webdevelopers about their clients. BRILLIANT!!!
cant wait to RP ddos
Title: Re: Let's build the Internet: AIL
Post by: Marcel on November 27, 2015, 09:53:08 am
cant wait to RP ddos
Inb4 CIA cybercrime squad :rofl:
Title: Re: Let's build the Internet: AIL
Post by: Teddy on November 27, 2015, 04:03:31 pm
Programmable hitman websites? Holy shit.
Question, will this use textdraws or dialogs when added ig?

Dialogs
Title: Re: Let's build the Internet: AIL
Post by: Teddy on November 27, 2015, 04:20:12 pm
https://github.com/derekmartinez18/ArgonathInteractiveWeb/

Using pull requests, you can now begin building websites in /www. Availability of domains are on a first come first serve basis. Throughout the day the directives page will be updated with more details.
Title: Re: Let's build the Internet: AIL
Post by: TiMoN on November 27, 2015, 04:48:47 pm
Dialogs
Are there any plans to include textdraws? They could use a pre-set view and information can be placed on them. They do look and feel a lot more professional than dialogs.

As for TLDs, why isn't there any support for .com and .net(non-group/business)?
Title: Re: Let's build the Internet: AIL
Post by: Teddy on November 27, 2015, 05:00:41 pm
Are there any plans to include textdraws? They could use a pre-set view and information can be placed on them. They do look and feel a lot more professional than dialogs.

There could be plans for textdraws later on down the road.

As for TLDs, why isn't there any support for .com and .net(non-group/business)?

There will be further down the road once the processing engine is more complete.
Title: Re: Let's build the Internet: AIL
Post by: Badandy on November 27, 2015, 06:43:20 pm
Now you can RPly build websites for your clients and RP the same frustrations as real life webdevelopers about their clients. BRILLIANT!!!

Shit :( ... but in this, I can shoot people.

Title: Re: Let's build the Internet: AIL
Post by: Rusty on November 27, 2015, 06:46:30 pm
I wish I had a business now, had a idea for something unless there is a way for players to buy directly from your player inventory I could still do it. 
Title: Re: Let's build the Internet: AIL
Post by: TiMoN on November 27, 2015, 06:47:23 pm
Finished up the website for GS9, easy as hell lol
Title: Re: Let's build the Internet: AIL
Post by: Stivi on November 27, 2015, 07:10:55 pm
So I can't really have an ammu-nation here can I?

If yes, how do I make it that one buys more than just 1 item, cuz y'know bullets?
Title: Re: Let's build the Internet: AIL
Post by: Marcel on November 27, 2015, 08:39:10 pm
So I can't really have an ammu-nation here can I?

If yes, how do I make it that one buys more than just 1 item, cuz y'know bullets?

Will be in the local functions once full documentation is released.

I suppose it would provide a function to compare a quantity of sorts, enabling you to create local functions such as this:

Code: [Select]
"local_function": {
"buy_deagle": [
"minimum_quantity",
                        50,
                        "ask_quantity",
                        amount,
"send_item_amount",
"Deagle",
                        amount
]
}
Title: Re: Let's build the Internet: AIL
Post by: Stivi on November 27, 2015, 08:56:59 pm
Will be in the local functions once full documentation is released.

I suppose it would provide a function to compare a quantity of sorts, enabling you to create local functions such as this:

Code: [Select]
"local_function": {
"buy_deagle": [
"minimum_quantity",
                        50,
                        "ask_quantity",
                        amount,
"send_item_amount",
"Deagle",
                        amount
]
}
That's nice.

The code lacks take_player_money :/
Title: Re: Let's build the Internet: AIL
Post by: Marcel on November 28, 2015, 12:09:55 am
That's nice.

The code lacks take_player_money :/
Yeah, was just some quick example anyway :)
Title: Re: Let's build the Internet: AIL
Post by: Teddy on November 28, 2015, 01:00:16 am
Will be in the local functions once full documentation is released.

I suppose it would provide a function to compare a quantity of sorts, enabling you to create local functions such as this:

Code: [Select]
"local_function": {
"buy_deagle": [
"minimum_quantity",
                        50,
                        "ask_quantity",
                        amount,
"send_item_amount",
"Deagle",
                        amount
]
}


The full documentation is done, as of now since items are instantly delivered, there is no way to send more than one. Yes, we will be creating a mailbox system and a job for a state delivery driver.
SimplePortal 2.3.7 © 2008-2025, SimplePortal