• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Stop using tfs 0.x

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 to waste but 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

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.
Code:
player::setStorageValue(key, value)
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 = 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
#pointlessthread
/thread
 
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.
Code:
player::setStorageValue(key, value)
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 = 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.
 
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.

Well, simply show something you can do now with the new system that you couldn't do with the old system. And I will immediatly admit I am wrong.

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.
 
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

me and a big group of people refuse to play 1.1/1.0 servers because the new monster ai is absolute horseshit, monsters cant even follow players properly. i've seen maybe one of mby 50 10.41 servers where mobs actually followed u, but all other distros ever made for opentibia had better momster AI then what newest TFS got.

I remember seeing a thread that had videos comparing the ai of 0.4 and 1.0 bit cant find it, and mark even said that it was intended
 
compat example(1.x -> 0.x)
Code:
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.
Code:
player::setStorageValue(key, value)
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 = 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".

Apologies in advance for my ball-of-trash response. Re-reading a bit of what I wrote below is proof I should brew my cup of coffee before posting.

I wasn't trying to say that all of those functions work. I was trying to point out "which order of 'do/set/[creature/player]' is the correct order?" And does the function include the word "value?" I was deconstructing the function name and how it's inherently not easily memorable.

It was to my understanding that 1.x was built to be compatible with 0.2 - That's what compat.lua is for.
To me, player:setStorageValue(key, value) makes more logical sense. If I wanted to append the storage to a creature I could change "player" to "creature" or "monster" or "npc" (I'm aware 1.x doesn't support setting storage to creatures.)

Also, player = Player(cid) was only necessary for 1.0, as "cid" was still being passed instead of userdata. It was mostly for backward-compatibility. That's why this commit is a breaking commit.

Of course everything I'm posting is opinion. Perhaps I have an inferior practical memory, or perhaps changing from 0.2 to 0.3.6 to 1.x crippled my ability to remember proper function syntax.

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

Yes I understand that it's a mostly useless post. It's just easier for me to contribute to this conversation as opposed to any other thread currently trending in Discussion. No offense to the other threads, I just can't spend a bunch of time following a project right now. :oops:

Red
 
they're still compatible, it just needs one line more below main function of the script:
Code:
cid = cid:getId()
 
If I tried to copy ANY of my 10 projects to TFS 1.X, it would not be possible without very heavy source edits, and sql database updates. etc.

If you are making something similar to Tibia, like an RL Map or an Evo, sure fine TFS 1.X offers all the basic functionality to run a tibia server and then some.

But anyone making custom servers is using 0.X.

Are there even any servers using the OTClient that run from TFS 1.X?
I'm pretty sure everyone I know that is good at what they do, or is doing anything exciting or worth mentioning in the OTLand community is using tfs 0.X.
 
For custom stuff 8.6 is good as it offers variety of client modification tools. Otclient is slow, drops fps everytime you go hunting and it uses almost 500MB of ram while afking on empty server.
 
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 bye
 
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 bye
if ppl want to eat shit is not ur problem m8, let them do what they want but HEY! dont expect help
 
But anyone making custom servers is using 0.X.

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
 
Last edited:
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
Im using TFS 1.0, i can feel i can do almost anything i want with Lua codes now.
It does takes some time to get use to, but i started from nothing 2months ago.
I admit, it is so much better if you rewrite the original functions into custom functions in global.lua
Things will go much smoother and i guess 0.x already has "smooth functions" as meta functions.
Although, i have feeling we cant register events for specific Future (AddEvent is kinda limited)

The only function we seem to miss in TFS 1.x is doCreatureSetNoMove()
But then again. It simply takes 1 extra creaturescript to write such function.
 
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

Why is it 0.Noob?

If you were playing on one of my servers, using the OTClient. You wouldn't be able to tell the difference between me using 0."NOOB" or 1.X.
For what I do, which is making custom servers. TFS 1.X offers nothing.

You really want people to start using 1.X? Well then offer something fucking new and exciting. If 1.X is so god damn amazing, then why does every single server running 1.X play exactly like every server that is running on TFS 0.X?

I'll tell you why, because they have the same exact functionality. The only thing TFS 1.X offers is greater optimization. Which hey, that is a great thing, and in a couple of years TFS 1.X might become the next best thing. But right now, it's missing ALOT, and people are working on it, there are commits happening all the time.
 
But anyone making custom servers is using 0.X.

I know of 6 developers right now off the top of my head that are using 1.x to make a custom server

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.

I couldn't tell you honestly. I am doubtful that it would affect functionality, performance, or modularity honestly. But that is one function, we are talking about programming style in general, and the servers themselves as a whole. To be honest, you can do anything you want with any of the distro's if you know how. You mention 10 projects, and to convert any over to 1.x would require heavy editing. Did you not do this for the original server you started with for each of those projects? Did you not alter the database, make libraries, or alter the source? You didn't do any of that on any of them? I am sure you did, because you are a talented programmer with unique ideas. This is one reason I have always admired your work, but you are the one who convinced me to switch, and I HATED the switch, but honestly I am glad I did, I couldn't imagine how little my skill would have progressed working with those functions and not understanding the concepts that drive OOP style programming. Technically the servers are almost the same, you can take the code and do what you want with it if you know how. However 1.x is going through changes (breaking backwards compatibility at the same time) to make full use of... everything! That includes lua, and now offers those things I mentioned before that help with OOP programming in lua, userdata, classes, and objects. This just means that both types of programming are still available and it's up to the programmer what their preference is, but if you keep track of the issues, PR's, and milestones from the master branch you will see that soon the whole thing is gonna have a huge overhaul. They are talking about something that is going to increase the modular usage of lua https://github.com/otland/forgottenserver/issues/1057 it's going to be a huge change, but they are focusing on the three things I mentioned before, performance, functionality, and modularity...

Edit: I would also like to add that most people developing "custom" servers use OTX, and OTX 3.0 is based off of TFS 1.x, so again, you can see the movement is happening now.
 
Last edited:
But right now, it's missing ALOT,

There really isn't ALOT missing anymore. The things missing are being worked on like you said, and the time isn't going to be 2 years from now, the time is now. Look at otland. It is being shown on all the boards, the movement is happening right now!
 
Back
Top