Prime - Amber Tweaks and Scripting API

Forum for alternative clients, mods & discussions on the same.

Re: Prime - Amber tweaks and Scripting API

Postby LostJustice » Thu Dec 22, 2016 9:19 pm

Paradoxs wrote:
LostJustice wrote:I like the update. Definitely a thumbs up for it. Updated my script and things are working a lot better now.


I'm glad to hear it! I'm currently working on a number of things to improve it as I go. It still doesn't do everything I personally would like it but I think we have a good start. Keep me updated with requests and suggestions. Theres still a ton of work to do before we hit Version 1.0 on both the scripting API side and the general client tweaks and changes

I should also have noted all objects have a special print function.

So if you say do
Code: Select all
print(getAttention());


instead of being greeted with
[object object]


you'll see a print-out that will give you actual information, making debugging and reporting easier


As a minor suggestion, could we have a console window in game? Aka have a new window option that prints the console in the game as well instead of just debug? Sometimes I do like running my game as regular run because it one less window to deal with and it a bit more convenient for debugging purposes.
Image
User avatar
LostJustice
 
Posts: 677
Joined: Sun Mar 25, 2012 3:57 am

Re: Prime - Amber Tweaks and Scripting API

Postby Paradoxs » Thu Dec 22, 2016 9:54 pm

its on the list of things I want to add, I find it frustrating jumping between windows when Im coding, playing and looking for debug. So its certainly a feature that I'll be looking into
User avatar
Paradoxs
 
Posts: 294
Joined: Tue Aug 25, 2015 7:16 am

Re: Prime - Amber Tweaks and Scripting API

Postby LostJustice » Thu Dec 22, 2016 11:36 pm

Paradoxs wrote:its on the list of things I want to add, I find it frustrating jumping between windows when Im coding, playing and looking for debug. So its certainly a feature that I'll be looking into


I also have a global chat system that at the moment is only in our village. I can push the changes to your repository if you want that feature as well. You could also use it to easily modify into a command console.
Image
User avatar
LostJustice
 
Posts: 677
Joined: Sun Mar 25, 2012 3:57 am

Re: Prime - Amber Tweaks and Scripting API

Postby Paradoxs » Thu Dec 22, 2016 11:47 pm

LostJustice wrote:
Paradoxs wrote:its on the list of things I want to add, I find it frustrating jumping between windows when Im coding, playing and looking for debug. So its certainly a feature that I'll be looking into


I also have a global chat system that at the moment is only in our village. I can push the changes to your repository if you want that feature as well. You could also use it to easily modify into a command console.


If you could make a request so I can take a look at it, I'v done some changes to how scripts are ran to prepare for some future updates. But i'd love to see what your system does for reference
User avatar
Paradoxs
 
Posts: 294
Joined: Tue Aug 25, 2015 7:16 am

Re: Prime - Amber Tweaks and Scripting API

Postby LostJustice » Fri Dec 23, 2016 2:53 am

Paradoxs wrote:
LostJustice wrote:
Paradoxs wrote:its on the list of things I want to add, I find it frustrating jumping between windows when Im coding, playing and looking for debug. So its certainly a feature that I'll be looking into


I also have a global chat system that at the moment is only in our village. I can push the changes to your repository if you want that feature as well. You could also use it to easily modify into a command console.


If you could make a request so I can take a look at it, I'v done some changes to how scripts are ran to prepare for some future updates. But i'd love to see what your system does for reference


I will get that ready to do so. Also, just a notation issue under objects is object.Fullname should be object.FullName to match the other item.FullName and also to match proper variable name conventions.
Image
User avatar
LostJustice
 
Posts: 677
Joined: Sun Mar 25, 2012 3:57 am

Re: Prime - Amber Tweaks and Scripting API

Postby Paradoxs » Fri Dec 23, 2016 3:19 am

LostJustice wrote:
I will get that ready to do so. Also, just a notation issue under objects is object.Fullname should be object.FullName to match the other item.FullName and also to match proper variable name conventions.


Good catch, I will update it now, must have missed it during a re-write somewhere
User avatar
Paradoxs
 
Posts: 294
Joined: Tue Aug 25, 2015 7:16 am

Re: Prime - Amber Tweaks and Scripting API

Postby LostJustice » Fri Dec 23, 2016 4:28 am

Also another issue I have run across. Lets say you make a script to cut logs into blocks or planks, doesn't matter which. You finish chopping one log but you are now currently holding a block or plank on your hand. However you need to drop the block or plank in order to right click another item. I can't drop this item because no matter where i click with pfClick, it will not let me drop the item which doesn't let me continue chopping.
Image
User avatar
LostJustice
 
Posts: 677
Joined: Sun Mar 25, 2012 3:57 am

Re: Prime - Amber Tweaks and Scripting API

Postby Paradoxs » Fri Dec 23, 2016 5:02 am

LostJustice wrote:Also another issue I have run across. Lets say you make a script to cut logs into blocks or planks, doesn't matter which. You finish chopping one log but you are now currently holding a block or plank on your hand. However you need to drop the block or plank in order to right click another item. I can't drop this item because no matter where i click with pfClick, it will not let me drop the item which doesn't let me continue chopping.


Fixed in the current update to the API

hasHandItem
getHandItem
dropHandItem

Added them yesterday after realizing I had no method to do a normal drop, along with some other handy functions coming our way next revision
User avatar
Paradoxs
 
Posts: 294
Joined: Tue Aug 25, 2015 7:16 am

Re: Prime - Amber Tweaks and Scripting API

Postby LostJustice » Fri Dec 23, 2016 7:37 am

Paradoxs wrote:
LostJustice wrote:Also another issue I have run across. Lets say you make a script to cut logs into blocks or planks, doesn't matter which. You finish chopping one log but you are now currently holding a block or plank on your hand. However you need to drop the block or plank in order to right click another item. I can't drop this item because no matter where i click with pfClick, it will not let me drop the item which doesn't let me continue chopping.


Fixed in the current update to the API

hasHandItem
getHandItem
dropHandItem

Added them yesterday after realizing I had no method to do a normal drop, along with some other handy functions coming our way next revision


Already ahead of things, nice.
Image
User avatar
LostJustice
 
Posts: 677
Joined: Sun Mar 25, 2012 3:57 am

Re: Prime - Amber Tweaks and Scripting API

Postby Paradoxs » Fri Dec 23, 2016 6:33 pm

Yeah I have a number of changes coming to prime. A number of which include changes to a few amber interfaces.

Some more functions and a few scrilt flags to customize your API usage.

Holiday is coming up though so I'll probably be working 15 hours a day. So expect an update post holiday.

Also a null.length error occured of get items returns empty handed
Until the update put any var = getItems into a try catch. It's been fixed for the next release though
User avatar
Paradoxs
 
Posts: 294
Joined: Tue Aug 25, 2015 7:16 am

PreviousNext

Return to The Wizards' Tower

Who is online

Users browsing this forum: Claude [Bot] and 156 guests