I agree with @Flatlander, 1.x lacks/lacked some functions/features that we, in 2015, should consider "basic." I, personally, have never advocated for the stripping of features (looking at you, onMove) just because the code isn't the best in theory. Yes, there's a better way to implement onMove, but why remove it before providing the better solution?
I love the work that you do, and you're a more talented programmer/scripter than I probably ever will be; I have to disagree with you here.
TFS 0.3.6 being "easier" could only be due to the fact that some people have more practice with it.
doPlayerSetStorageValue
playerSetStorageValue
setPlayerStorageValue
doCreatureSetStorageValue
creatureSetStorageValue
setCreatureStorageValue
doPlayerSetStorage
doCreatureSetStorage
creatureSetStorage
playerSetStorage
Which function is correct? I was very hesitant to convert to metatable methods until I got a bit of practice under my belt. Now, when I make a script, I rarely reference the documentation; in the past I needed to keep a tab with the documentation open at all times because the precise syntax of the code was almost impossible to remember. Now, if I want to set a storage value I can easily write:
player:setStorageValue
And I will never screw the code up. It requires a slightly different method of thinking but I find it superior and more congruent.
I'm sorry. But mods should have never been implemented. The only reason to use mods is to make a system easily copy-pastable.
I spent a good month creating a compat between 0.4 (or 0.3.6) and 1.0. Yes, it's time I didn't want towastebut once my compat was complete it's been smooth sailing. "arbitrarily fucked up for no reason" is because 1.x was never meant to be a compat for 0.3.x or 0.4. It was meant to be compat for 0.2.
Logically, I find 1.x sound; at least more so than 0.x series. My only grievance is that I don't think the end-user is always considered when making changes. But anyone with enough knowledge to hold their own should be able to make up for that issue.
Red
player::setStorageValue(key, value)
player = Player(cid)
player::getLevel()
/thread#pointlessthread
Uhm, all of those are the same function? You just listed a lib file basically.
if all of those work for you, somewhere there is a library file showing:
playerSetStorageValue = doPlayerSetStorageValue
setPlayerStorageValue = doPlayerSetStorageValue
doCreatureSetStorageValue = doPlayerSetStorageValue
creatureSetStorageValue = doPlayerSetStorageValue
setCreatureStorageValue = doPlayerSetStorageValue
doPlayerSetStorage = doPlayerSetStorageValue
doCreatureSetStorage = doPlayerSetStorageValue
creatureSetStorage = doPlayerSetStorageValue
playerSetStorage = doPlayerSetStorageValue
And TFS 1.x is not compatable with 0.2.
I have used 0.2, try taking any 0.2 script and just place it into a TFS 1.x server. I bet it won't work without changing something.
Now i know WHY they did this. It makes perfect sense to say "hmm, doPlayerSetStorageValue works on creatures and NPCs, so why does it have player in the name? Lets change it to setStorageValue!"
Now that is fine to me, setStorageValue(cid, key, value) is a perfectly fine function I could get used to.
But having to do.
Doesn't that just seem weird? Sure you can compat them all or something, but aren't there functions where you have to do like.Code:player::setStorageValue(key, value)
Code:player = Player(cid) player::getLevel()
Maybe I'm ignorant, but it just seems like inventing a new way to do things with no benefit, because you want your new thing to be "cool and new and different".
I would have hoped that you would be able to see why they did it that way. Yes what you said about setStorageValue ( ) being a perfectly fine function is true, however it is just a function that is coded into the interpreter. With lua ot has been merely using it, not utilizing it! Fact is that lua may be a scripting language, but it is still very powerful and can be used OOP style. Creating userdata, objects, classes, all of these things in the source to be utilized by lua is a good thing. It may be that everyone has a different preference, but at the same time utilizing the full ability of lua since we depend on it anyways just makes sense. I believe jiddo to be one of the first pioneers to show us this with the npc system that is still used in almost every distribution still till this day. You ask why remake something that isn't broken, I ask why not make it better? Sure the wheel works fine, but because it's been constantly researched and developed (the problem that the wheel solves) we now have gyroscopic technology. I would rather my scripts and source and libraries all be as minimal as possible, but still with complete functionality, performance, and modularity.
Do you realize that this is not a matter of a better engine, but just server owners that got a clientele of players only willing to play OTS of old protocol where TFS 1.x doesn't reach?
This
/thread
Player = setmetatable({}, {
__call = function(t, cid)
return t
end,
__index = function(t, cid)
return t
end
})
function Player:getLevel()
return getPlayerLevel(cid)
end
Uhm, all of those are the same function? You just listed a lib file basically.
if all of those work for you, somewhere there is a library file showing:
playerSetStorageValue = doPlayerSetStorageValue
setPlayerStorageValue = doPlayerSetStorageValue
doCreatureSetStorageValue = doPlayerSetStorageValue
creatureSetStorageValue = doPlayerSetStorageValue
setCreatureStorageValue = doPlayerSetStorageValue
doPlayerSetStorage = doPlayerSetStorageValue
doCreatureSetStorage = doPlayerSetStorageValue
creatureSetStorage = doPlayerSetStorageValue
playerSetStorage = doPlayerSetStorageValue
And TFS 1.x is not compatable with 0.2.
I have used 0.2, try taking any 0.2 script and just place it into a TFS 1.x server. I bet it won't work without changing something.
Now i know WHY they did this. It makes perfect sense to say "hmm, doPlayerSetStorageValue works on creatures and NPCs, so why does it have player in the name? Lets change it to setStorageValue!"
Now that is fine to me, setStorageValue(cid, key, value) is a perfectly fine function I could get used to.
But having to do.
Doesn't that just seem weird? Sure you can compat them all or something, but aren't there functions where you have to do like.Code:player::setStorageValue(key, value)
Code:player = Player(cid) player::getLevel()
Maybe I'm ignorant, but it just seems like inventing a new way to do things with no benefit, because you want your new thing to be "cool and new and different".
Do you realize that this is not a matter of a better engine, but just server owners that got a clientele of players only willing to play OTS of old protocol where TFS 1.x doesn't reach?
This
/thread
How is it a pointless thread if it makes people discuss a theme ? tbh, theres not really dumb questions only dumb answers. (not gonna quote you 2 times, ) thanks byeDo you realize that this is not a matter of a better engine, but just server owners that got a clientele of players only willing to play OTS of old protocol where TFS 1.x doesn't reach?
This
/thread
if ppl want to eat shit is not ur problem m8, let them do what they want but HEY! dont expect helpHow is it a pointless thread if it makes people discuss a theme ? tbh, theres not really dumb questions only dumb answers. (not gonna quote you 2 times, ) thanks bye
But anyone making custom servers is using 0.X.
"easy"
and very time-consuming XD
Im using TFS 1.0, i can feel i can do almost anything i want with Lua codes now.This is probably the most absurd thing I've heard from you. I've argued this with Xagul plenty of times.
1.X, source edit or not, offers pretty much everything that 0.Noob offers, plus more, and it is STILL continuously being updated.
Custom attributes is the biggest criticism of 1.X; well, not in my book; it's possible to implement through Lua.
I can make the most custom server you will ever know with 1.X just perfectly fine, definitely not limited to 0.Crap
This is probably the most absurd thing I've heard from you. I've argued this with Xagul plenty of times.
1.X, source edit or not, offers pretty much everything that 0.Noob offers, plus more, and it is STILL continuously being updated.
Custom attributes is the biggest criticism of 1.X; well, not in my book; it's possible to implement through Lua.
I can make the most custom server you will ever know with 1.X just perfectly fine, definitely not limited to 0.Crap
But anyone making custom servers is using 0.X.
What is the benefit of using player::setStorageValue(key, value) rather than setStorageValue(cid, key, value).
If it increases functionality somehow that I don't know, then i'll admit my ignorance right here and now.
But right now, it's missing ALOT,