Page 8 of 10

Posted: 10 Oct 2015, 15:05
by Lotus006
Kevsoft wrote:Well you can do that:

Code: Select all

function onInputUpdate()

    -- you code to handle keys --
 
    player.upKeyPressing = false
    -- ... --
end


So first you want to handle the keys and at the end you want to set them to false (At least I did it for my API once)

Yeah I know for this one, it's because I already use upKeyPressing for moving the cursor in my menu (the red one) and if I do this not only the player dont move but in my menu the cursor (in red) is not moving because I set to test upKeyPressing or Right, Left or Down ... (but for this the player is not moving it's working, but I need to find a derivation for lock the player without upKeypressing and the other)

Posted: 10 Oct 2015, 17:14
by Kevsoft
But you can test for control input BEFORE setting it to false.

Like:

Code: Select all

function onInputUpdate()

    if(player.upKeyPressing)then
        -- do stuff here
    end
   
    player.upKeyPressing = false
   
end

Posted: 18 Oct 2015, 12:49
by Lotus006
Sorry to ask but just to know is lunalua is on hold about update ?
thanks in advance :P

P.S: sorry for not posting on my new menu stuff but i will probally post some new stuff soon about the menu , I added a hand cursor animated like mario rpg instead of the red triangle , also I moved the power-ups box in the bottom like the original !

screen shot will be coming soon with the cursor animated :)

Posted: 18 Oct 2015, 13:08
by Kevsoft
LunaLua v7.2.0 has it's features already in, but there are some bugs which has to be cleaned out before the release.

Posted: 18 Oct 2015, 13:23
by Lotus006
Kevsoft wrote:LunaLua v7.2.0 has it's features already in, but there are some bugs which has to be cleaned out before the release.

Cool wow I cannot wait to test it when it's released :D
thanks about this info :P

Posted: 20 Oct 2015, 23:00
by Kevsoft
Just a quick update on what's currently is on the way:

* A critical bug has been recently fixed which mostly occure on european comuputers.

* Now there is still the issue with the render priorities, that "drawImage" draws images behind images from "placeSprite". Now this is unchangeable as this is already way too long out there and for the sake of backwards-compatibility we keep that. However we do add a "priority" value as parameter for the drawImage functions.

There are currently three default values:

1.) drawImage = priority of 1.0
2.) placeSprite = priority of 2.0
3.) Text.print / printText = priority of 3.0

So you might have already guessed it. The priority with the lowest number is rendered first and the highest last.
If you specify the value "1.5" as the priority to a drawImage call, then it is drawn over all other drawImage (with default priority) but not over placeSprite.
If you specify the value "2.5" as the priority to a drawImage call, then it is drawn over all other drawImage and over all placeSprite.
ect...

Pretty straightforward. With this system we:
1.) Keep backwards compatiblity
2.) Can still "overdraw" frames
3.) Maybe even render before or after Items in SMBX (but this is still only a plan)

Posted: 22 Oct 2015, 7:03
by Lotus006
Kevsoft wrote:Just a quick update on what's currently is on the way:

* A critical bug has been recently fixed which mostly occure on european comuputers.

* Now there is still the issue with the render priorities, that "drawImage" draws images behind images from "placeSprite". Now this is unchangeable as this is already way too long out there and for the sake of backwards-compatibility we keep that. However we do add a "priority" value as parameter for the drawImage functions.

Cool I cannot wait to see the update again :)

I almost finished my Misc Cheat Menu and Inventory + Inventory Manager stuff (Maybe the Inv. can be accessible on both way (overworld and in-game))
I just need to manage how to get work save data and get data to have data sync in all the time.

Just a few maybe little question :

1) I'm trying to find how to get a way to add +5 sec on the counter when I activate my cheats
but i dont find the adress about clock

2) turn NPC to Ice is it possible into lua ? because i see "iceage" in cheats triggered but I dont want to use Cheats buffer over lua...
and i have found in lua turnnpc into Coins with "npcToCoins()" but not Ice thing...

3) a way to have god mode without the editor but in lua stuff.

What I have so far what is working in the menu is
a) Npc to coins
b) set lives
c) the main desing for the menu is almost done :P

I will make small video very soon sorry again for the delay I want to be sure about desing and animation is done before

Posted: 29 Oct 2015, 3:00
by Lotus006
Hey Hi all sorry for the lack of time I've taken to make this video and preview about my Inventory and cheats menu + debug info stuff :)

There is the stuff :) not all functionnal but its a start, I was needed to remake the hole code because the 1st time I do this one this was a mess (probally again but better now :D ) and I was learning also , and I just discovered the dynamic programation in lua lol

PS: I have a hard time with button not sure how to make it dynamic with table and dynamic variables
I made my self the button in lua with png I love photoshop and lua :D
sky is the limit !!

Maybe I will also make this all standalone after (Inventory, cheats menu + editor for the cheats menu this will allow to create your one maybe in game :biggrin:
I have a few ideas :music: :gamer: :biggrin:

Edit: I forgot to mention I added cheats input with getinput() :D
cheats 1 :
"Cheats" : for making appearing cheats menu from the left

cheats 2 :
"inventory" : for making appearing inventory menu from the bottom

phpBB [youtube]

Original link: https://www.youtube.com/watch?v=eCu4TvSiqXM


Posted: 29 Oct 2015, 13:57
by gzavod
Is there a way to run SMBX when the window is not in foreground?
I'm working with networking. I found that connection will be lost when SMBX is not active , and some synchronization will fail or stop.

Posted: 29 Oct 2015, 16:01
by Kevsoft
SMBX is always unstable as hell.
Anway, can you tell me if this is only the case in the LunaLua SMBX or in the vanilla SMBX too?

Posted: 29 Oct 2015, 17:43
by gzavod
Kevsoft wrote:SMBX is always unstable as hell.
Anway, can you tell me if this is only the case in the LunaLua SMBX or in the vanilla SMBX too?
Sorry for lack of information.
I'm going to make a simple multiplayer system that works over the network by using socket. (socket.core)

What I'm going to do are:
1.Do UDP hole punching to establish connection.
2.Send UDP packets periodically to keep connected.
3.Synchronize players' states periodically.

These processes will be interrupted when SMBX window goes to background because all routines in SMBX (including lunalua) stop.
Once someone stopped, all players may have to reestablish connection and re-sync.
This is inconvenient for players. So I want to make SMBX work even in background.

Posted: 29 Oct 2015, 20:03
by Kevsoft
gzavod wrote:... server talk...

Wait, do I understand it right?
You make a multiplayer system in lunalua?

Lotus006 wrote:... cheat talk...
Pretty awesome stuff you got there, mate! Maybe you want to post that on smbx.org or talkhaus? Maybe useful for other too ^^.

About your question (sorry when it is a bit late)
Lotus006 wrote:1) I'm trying to find how to get a way to add +5 sec on the counter when I activate my cheats
but i dont find the adress about clock

2) turn NPC to Ice is it possible into lua ? because i see "iceage" in cheats triggered but I dont want to use Cheats buffer over lua...
and i have found in lua turnnpc into Coins with "npcToCoins()" but not Ice thing...

3) a way to have god mode without the editor but in lua stuff.

1.) Clock of what? SMBX doesn't have a clock itself. If you're using an API or HUD mod you have to look on the documentation of the API.

2.) Try this:

Code: Select all

for k,v in pairs(NPC.get()) do
  v:mem(0x124, FIELD_WORD, -1)
end


3.) It is a memory field you can toggle.

Code: Select all

mem(0x00B2C8C0, FIELD_WORD, -1) --Toggle on
mem(0x00B2C8C0, FIELD_WORD, 0) --Toggle off

Posted: 29 Oct 2015, 21:35
by gzavod
Wait, do I understand it right?
You make a multiplayer system in lunalua?
Yes :biggrin: Just a try.
I think it might be able to run SMBX in background by using mem()...

Posted: 29 Oct 2015, 22:17
by Kevsoft
gzavod wrote:
Wait, do I understand it right?
You make a multiplayer system in lunalua?
Yes :biggrin: Just a try.
I think it might be able to run SMBX in background by using mem()...
You could try the HUD event onHUDDraw().

Posted: 29 Oct 2015, 22:37
by gzavod
You could try the HUD event onHUDDraw().
I tried but didnt work.

Added after 11 hours 15 minutes:
OK , I managed to do this.
I altered the value of 0x00424748 which points to GetActiveWindow

Posted: 30 Oct 2015, 9:58
by Kevsoft
gzavod wrote:
You could try the HUD event onHUDDraw().
I tried but didnt work.

Added 30 Oct 2015, 9:53:
OK , I managed to do this.
I altered the value of 0x00424748 which points to GetActiveWindow
Okay, I am a bit surprised that you now make your own ASM patches, but oh well....

Added after 28 minutes 57 seconds:
After much wait it is finally here: LunaLua v0.7.2
This version is a big milestone because it fixed some major bugs.

Here is the changelog:
Spoiler
* Extended Level class and World class (Overworld)
* Extended Player class
* Extended Section Class
* Extended Graphics Namespace
* Extended Block class
* Extended NPC class
* Added Section Namespace (Static functions for Section class)
* Added some new Defines (Defines.* namespace)
* Added switch between letterbox-mode (forced 4:3) or scretched-mode via F4
* Bugfix [LunaLua and SMBX Engine]: Decimal numbers now work perfectly in layer speed and npc codes (Thanks to DarkMecha for testing!)
* Bugfix [LunaLua and SMBX Engine]: Fullscreen in the level editor works again!
* Added printTextWP, drawImageWP, drawImageToSceneWP which enables rendering with priority settings (also known as Z-Index)
* Added sounds.ini on level-basis

Posted: 1 Nov 2015, 0:40
by Lotus006
Thanks Kevsoft about the help for ice and god mode :D
I didnt have time to test it yet but it will soon and but just one
I tried the mem ice code and it do nothing :( weird :S

And about the extend stuff in player , npc , section class what is changed ? (thanks for the update :D :D)
there is a list of this ? I cheked on your wiki and its look the same as before the update :P

Also there is a surprise here I cant release it yet but it almost done, I have almost finisih the Inventory from SBM3 !!
I need idea what to do more if you have suggestion please tell me :)

Edit : Look at 20 sec to see directly the inventory
phpBB [youtube]

Original link: https://youtu.be/M1qBUfLnvso



And for the other place to post it, I didnt have time yet but I will probaly post it before the end of the day :wacko:
Thanks for the suggestion kevsoft about other forum :)

Posted: 1 Nov 2015, 9:54
by Kevsoft
Lotus006 wrote:cool stuff
Yea, I noticed that the memory code for ice didn't either BUT there is a woking NPC:toIce() for LunaLua v0.7.2.1. You have to wait a bit :P

Posted: 1 Nov 2015, 11:05
by Lotus006
Kevsoft wrote:
Lotus006 wrote:cool stuff
Yea, I noticed that the memory code for ice didn't either BUT there is a woking NPC:toIce() for LunaLua v0.7.2.1. You have to wait a bit :P

Yep I just see that also , i tried to update my old 0.7.1 luna lol to the latest in beleiving it was the 0.7.2.1 oops lol nope latest is it 0.7.2 but its ok, hehe !!

I found a way to transform NPC to Ice :P not the same style but its working :) also I can give you the workaround to see what I done, just for messing around :) (you can transform to anything you want :))

Code: Select all

local testnpcA = NPC.get()
    for k,v in pairs(testnpcA) do
  v.id = 237 for Ice Cube !!
-- v.id = 10 -- or for Coins one by one !!end


also for the clock I was talking before i want to mean the normal time the one a the top when is at 0 mario die.
is there a way to mess around also ?

And last thing god mode I found an another adress too if you want to know :) (on talkhaus forum I dont remember where)

Code: Select all

mem(0x00B2C8C0, FIELD_WORD, 0xFFFF)


Thanks for all your help also :)

Posted: 3 Nov 2015, 23:38
by Kevsoft
LunaLua v0.7.2.1 has just been released. This is an important update because it fixes an exploit which manages to run assembler code on your computer throught lunadll.txt due to an exploit in the Autocode module.

Additional changes are:
Spoiler
* Extended NPC class
* Added cheat values. Some cheat can now be toggled by value. (Defines.* namespace)
* Added Audio.MusicArtistTag(), Audio.MusicAlbumTag() and Audio.MusicCopyrightTag() functions
* Added console class. You can now use the windows console for debugging. (See LunaLua command arguments at the wiki)
* Hotfix Bugfix [LunaLua]: Fixed ROP exploit at the Autocode module.

Lotus006 wrote:And last thing god mode I found an another adress too if you want to know :) (on talkhaus forum I dont remember where)

Code: Select all

    mem(0x00B2C8C0, FIELD_WORD, 0xFFFF)


Thanks for all your help also :)
Instead you could use now "Defines.cheat_donthurtme = true"
You should check out this page:
http://wohlsoft.ru/pgewiki/SMBX_Fields

Added after 12 hours 17 minutes:
A Hotfix which fixes the Autocode Module has just been uploaded!