✨ ARCHIVE MODE ✨
The forum has now been set to read-only mode, no new posts, resources, replies etc will not be possible.
We recommend you join our Discord server to get real-time response: Discord Invite Link
T = "hello world"
if T == "hi" then
local Y = "i'm only local to this if"
end
--the following will then not work and create an error message in your log.dat saying Y doesn't exist
T = Y
function functionname(arguments)
-- function body
--optionally you can return a value
return true
end
function SomeAttackSpecialDelegate()
local result = Attacks_TryToFlinch(30, "target")
if result == true then
Attacks_SetStore("Flinched!")
end
end
-- these functions i'm calling aren't real btw this is just an example
function SomeAttackHitAnimation()
AnimationSequenceBegin()
if Attacks_Store == "Flinched!" then
Attacks_DoFlinchAnimation("target", 7.0)
end
Attacks_placeholderattackanimation(0.0)
AnimationSequenceEnd()
end
-- a bunch of stupid nonsense
function blah()
local i = 0
if i == 0 then
for i = 0, 10, 1 do
i = i
end
end
end
LUA, the same scripting language that powers WoW UI mods and garrys mod mods :> it pwnsalso curious, what language is the coding in?
i know java(as much help as that'll do)
and my terms are stuck with methods and classes
so at least knowing what the language is would help me learn
So by what I read, functions are akin to java methods. And basically all the fundamentals like conditionals(if-then-else, booleans) while and for loops. And operands all work the same. But there's no typing for variables such as int, double, etc. that singular fact punches holes in everything I've learned D:LUA, the same scripting language that powers WoW UI mods and garrys mod mods :> it pwnsalso curious, what language is the coding in?
i know java(as much help as that'll do)
and my terms are stuck with methods and classes
so at least knowing what the language is would help me learn
we're having difficulty phasing out the NPC scripting engine entirely but in time we're going to offer a LUA solution to scripting in the maps, where your script has a update tick and you check for conditions in there and execute the correct command for the time. it'll require more work but allow much more complex scripts, but also allow multiple scripts to be going. i havent worked on this much because other things are still hard coded and we need them to be moddableREMINDER
this is just for attacks(and abilities?)
not for everything else.....
everything else is designed by nilllzz
you'll find a lot of languages are alike and when you learn the fundamentals of your first language its easier to grasp everywhere elseSo by what I read, functions are akin to java methods. And basically all the fundamentals like conditionals(if-then-else, booleans) while and for loops. And operands all work the same. But there's no typing for variables such as int, double, etc. that singular fact punches holes in everything I've learned D:LUA, the same scripting language that powers WoW UI mods and garrys mod mods :> it pwns
Jk but seriously it'd be like learning a new form of the same language, almost
So your basically gutting out the old coding while trying to maintain the framework and putting in the brand spanking new LUA?we're having difficulty phasing out the NPC scripting engine entirely but in time we're going to offer a LUA solution to scripting in the maps, where your script has a update tick and you check for conditions in there and execute the correct command for the time. it'll require more work but allow much more complex scripts, but also allow multiple scripts to be going. i havent worked on this much because other things are still hard coded and we need them to be moddableREMINDER
this is just for attacks(and abilities?)
not for everything else.....
everything else is designed by nilllzz
Also LUA replaces brackets with "end" and I find that interesting.it seems harder organization and scope wise figuring out how many "end"s to put into a function. Of course enough time can train people to acclimateyou'll find a lot of languages are alike and when you learn the fundamentals of your first language its easier to grasp everywhere elseSo by what I read, functions are akin to java methods. And basically all the fundamentals like conditionals(if-then-else, booleans) while and for loops. And operands all work the same. But there's no typing for variables such as int, double, etc. that singular fact punches holes in everything I've learned D:
Jk but seriously it'd be like learning a new form of the same language, almost
LUA is strange because it doesn't have classes, but it has tables, and varaibles can be anything, you can load a table with stuff using table constructors and even do inheritance.
well theres a problem with just plain going to LUA right now, when i started trying it soon found that calling a bunch of stuff to make things happen would execute them all immediately. you can't do blocking within the script because the game calls the stuff sequentially and waits for the interpreter to say its run out of stuff to execute, so pausing the script to wait would lock the game up, yikes!So your basically gutting out the old coding while trying to maintain the framework and putting in the brand spanking new LUA?we're having difficulty phasing out the NPC scripting engine entirely but in time we're going to offer a LUA solution to scripting in the maps, where your script has a update tick and you check for conditions in there and execute the correct command for the time. it'll require more work but allow much more complex scripts, but also allow multiple scripts to be going. i havent worked on this much because other things are still hard coded and we need them to be moddable
Or are you going to totally revamp the whole game from LUA?
RegisterScriptHandler("SOME_SCRIPT_HANDLER")
Text("blah blah")
LockInput()
function SOME_SCRIPT_HANDLER()
if WaitingForInput == false then
UnregisterScriptHandler("SOME_SCRIPT_HANDLER")
UnlockInput()
end
end
use whitespaceAlso LUA replaces brackets with "end" and I find that interesting.it seems harder organization and scope wise figuring out how many "end"s to put into a function. Of course enough time can train people to acclimateyou'll find a lot of languages are alike and when you learn the fundamentals of your first language its easier to grasp everywhere else
LUA is strange because it doesn't have classes, but it has tables, and varaibles can be anything, you can load a table with stuff using table constructors and even do inheritance.
yes thats all working. a few patches back pokemon were not giving you the EV yields on defeat so EVs didnt grow, even as they were applied to stat growth, lol. made me not even bother playing for ages. thats been fixed for about a month thoughI would def rather stay with the current weird scripting if we have to do all that
I mean it would probably be good practice for me but still.....I am lazy.....
Changing type stuff would be cool...I got some requests to make a Pokemon Brown remake and I am quite willing but I would need to be able to change A LOT of stuff including types....
Do natures, and EVs currently work properly. I am pretty sure EVs do but I might as well check