Post subject: Hyper Lode Runner LUA - save/load up to 999 levels
ventuz
He/Him
Player (123)
Joined: 10/4/2004
Posts: 940
Ok so here's LUA script that modifies game behavior. I wanted it to be able to let you create up to 999 levels, save level to file, load level from file (so you can share levels over internet, try out other people's level for fun for example) I pretty much got the "skeleton" of it, but whole script is mostly unfinished and godawful, I was just trying to write new stuff as I go and trying get single thing to work (im pretty much newbie to scripting/programming). But lately I havent gotten any more motivation to go on with it, and soon I'll be very busy with work. So instead of just "deleting it"... I'm putting it here if anyone interested to fix it up or finish it. It badly need rewrite anyway. In current stage of lua script... What it CAN DO:
    Create up to 999 levels in EDIT (there's no script to clear level within RAM when changing level #) Saving level when you press Select in level editor. Makes "lv###.txt". (I think it need different button combination, up+select maybe) Play first level created file "lv000.txt" in GAME (need more script to make it nicer)
What it CAN'T DO:
    Playing levels other than lv000.txt Playing a GAME level with 2 rooms (room B, camera don't scroll, I don't know mem loc for 2nd room.. so I disabled key/door tile selection in level editor)
What can you do with this script? 1. Put script in your LUA folder. 2. Start VBA 3. Load Hyper Lode Runner ROM 4. Load THIS script 5. in game, press Select to change to EDIT then press Start 6. use direction up,down,left,right to choose level to create (for this script, stay with 000) 7. press start to enter level editor 8. hope you know game enough to create decent level, put a character and darken ladder leading to top of level minimum to make a level winnable 9. press select, it'll make lv000.txt in your LUA folder 10. press select+start to exit to main menu (see why it need different button combination) 11. press Start to choose GAME 12. choose first level, it'll load only lv000.txt (or try out someone else's lv000.txt) 13. play, that's pretty much what script can do Something to note... when you stop script, game is still "edited".. you'll need to reload ROM if you want to play regular Hyper Lode Runner <<Pastebin>>