Lua

Discuss anything about DraStic here.
Hemmings
Posts: 1
Joined: Thu May 25, 2017 6:38 am

Re: Lua

Postby Hemmings » Wed May 31, 2017 9:24 am

xperia64 wrote:Known Issues:
Going through doors with this enabled and the joystick tilted will make the joystick stuck. Just disable and enable the script again.


It's annoying having to do this all the time though.
See d bal max results.
User avatar
dsattorney
Posts: 245
Joined: Thu Aug 03, 2017 11:29 am
Location: Argentina

Re: Lua

Postby dsattorney » Sat Aug 05, 2017 12:22 am

Exedion wrote:One question: with lua script can hidden virtual buttons automatically when enter in a battle? That will be a important feature

Can you be more specific?
OBJECTION!
Image
Other places to find me:
VOGONS: http://www.vogons.org/ (as olddos25)
talos91
Posts: 80
Joined: Sat Sep 12, 2015 7:09 pm

Re: Lua

Postby talos91 » Sun Sep 03, 2017 7:48 pm

Could anyone edit the first Lua script so that it moves all four directions with the accelerometer instead of just left and right?
User avatar
dsattorney
Posts: 245
Joined: Thu Aug 03, 2017 11:29 am
Location: Argentina

Re: Lua

Postby dsattorney » Sun Sep 03, 2017 9:55 pm

Do you understand that most phones do not have a four-way accelerometer? So it's impossible to do a script for your purposes.
OBJECTION!
Image
Other places to find me:
VOGONS: http://www.vogons.org/ (as olddos25)
User avatar
kaikun97
Posts: 504
Joined: Thu Dec 26, 2013 11:41 am
Location: England

Re: Lua

Postby kaikun97 » Mon Sep 04, 2017 6:04 am

dsattorney wrote:Do you understand that most phones do not have a four-way accelerometer? So it's impossible to do a script for your purposes.


Actually they do, an X and Y axis. What you are probably thinking of is a gyroscopic sensor which has yaw, pitch & roll.

android.get_rotation()
Returns an integer with the current device rotation in degrees.
The range is [0,-180[ for counter-clockwise rotation and [0,180] for clockwise rotation.


However it seems to not be possible anyway since only the X rotation function in the lua code is supported at the moment.
User avatar
dsattorney
Posts: 245
Joined: Thu Aug 03, 2017 11:29 am
Location: Argentina

Re: Lua

Postby dsattorney » Mon Sep 04, 2017 6:59 am

Well, I guess you learn something new everyday then.
OBJECTION!
Image
Other places to find me:
VOGONS: http://www.vogons.org/ (as olddos25)
talos91
Posts: 80
Joined: Sat Sep 12, 2015 7:09 pm

Re: Lua

Postby talos91 » Tue Sep 05, 2017 2:28 am

kaikun97 wrote:
android.get_rotation()
Returns an integer with the current device rotation in degrees.
The range is [0,-180[ for counter-clockwise rotation and [0,180] for clockwise rotation.


However it seems to not be possible anyway since only the X rotation function in the lua code is supported at the moment.


Exophase any chance you could add Y rotation to the lua code?
websterek
Posts: 1
Joined: Tue Sep 26, 2017 7:17 am

Re: Lua

Postby websterek » Tue Sep 26, 2017 7:25 am

Hi!

I'm trying to write LUA script for pokemon black/white to show/hide controls in certain moments of the game. How can I debug and get values from this part of NDS memory? Or in other words how to easily debug it?

- drastic.get_ds_memory_arm9_8(address)
- drastic.get_ds_memory_arm9_16(address)
- drastic.get_ds_memory_arm9_32(address)
- drastic.get_ds_memory_arm7_8(address)
- drastic.get_ds_memory_arm7_16(address)
- drastic.get_ds_memory_arm7_32(address)

and it's will be cool to get the option for disabling/enabling touch screen of nds using LUA

BEST!
talos91
Posts: 80
Joined: Sat Sep 12, 2015 7:09 pm

Re: Lua

Postby talos91 » Sat Nov 04, 2017 5:37 pm

talos91 wrote:
kaikun97 wrote:
android.get_rotation()
Returns an integer with the current device rotation in degrees.
The range is [0,-180[ for counter-clockwise rotation and [0,180] for clockwise rotation.


However it seems to not be possible anyway since only the X rotation function in the lua code is supported at the moment.


Exophase any chance you could add Y rotation to the lua code?


Anyone has any idea how to do this?
Kostas Gangstar
Posts: 33
Joined: Sat Nov 26, 2016 12:05 am

Re: Lua

Postby Kostas Gangstar » Fri Apr 27, 2018 11:08 am

Tried to test the Lua script for desmume which helps with Learn with Pokemon - Typing Adventure but game will always have a white screen no matter which rom I try (normal or patched rom)..

The Retroarch desmume core and all those 1000 DS emulators in the Google store based on desmume can open the patched rom and run the game fine without a keyboard but saving won't work and Lua scripts ain't supported :/
Normal rom will give a error saying "the setup for the keyboard has failed bla bla"

Is there any way to have this game working in drastic and have the in-game saving work too? :D

Return to “General”

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot] and 4 guests