This thread is a mixture of tutorial and correction of tutorials.
Since i hate to write nice stuff to please everyone this tutorial about modding and about other tutorials might be considered as very harsh and some of the original tutorial writers might get offended. Guess what... i give a fuck about that. Its time to talk about facts and leave the fairy tales of pages like Lancersreactor or other freelancer pages outa here (or at least correct them).
Please forgive me my sarcasm but i think its neccessary to show you what is important and what not.
Many FL modding tutorials were written in the early days of modding and published on LR. Some were written later but ok....
The actual problem is that in my eyes most tutorials are either wrong, too complicated or outdated due to new tools and a better knowledge about the game and its engine.
My personal oppinion about tutorials and modding in general is even more harsh.
Most of the modders hold their flag high in the sky thinking they would be good coz they know some code.
"Uhh i know that the code for manhattan is Li_01_base" coooooooool
"uhh i know to use UTF" impressive
"i can create systems with FLExplorer" incredible!!!!
Dear modders, modding does not mean let tools create the entire mod or to learn the code from a-z. Modding means to create something new that has not been done before.
But ok... lets go on with the "tutorial".
1. I have installed all the tools and got a copy of SDK and my FL directory is prepared. What do i do now?
Ok the first and most important step you have to do is to delete FLExplorer again.... oh and while you are already deleting stuff... do the same with all other tools which automatically generate code for the ini-files.
Why?
well most tools are buggy and therefor your mod is going to be buggy aswell... or was it your intention to create a buggy mod? no? ok - delete it
Another reason for not using such tools is pretty simple. With such tools you can easily create systems and such stuff but you actually have no control about what code the tool does add to your mod. You only see the result but not the creation process and that does make "bug-hunting" nearly impossible since you dont know your own code.
When i create a mod i use the normal windows editor and when a bug appears then i remember what code i did add to the mod and where i did add it and therefor i am able to fix this bug.
Not to mention that this way you really learn modding and you start "thinking out of the box". Tools are limiting your creation process since they only can create standard code but nothing special... nothing that this tool does not know... no new features... no new parameters.
Using such script tools does mean only one thing: fast creation of standard, buggy, boring game content that lacks of new ideas.
Reality is hard guys... get familar with it.
2. How does a good mod look like?
Simple answer!!!!!!
"different from the other mods"
If you want to create a mod then it should be special in order to become successful. Nobody wants to see a copy of an already existing mod with different systems.
Nobody wants to see the same ships over and over again.
Time for creative work!
3. The sur lie
Some time ago i critisised a tutorial at LR that was written about how to create wireframes of ships... the tutorial simply was absolutly stupid and would have caused more lag on servers. Not to mention that the workload involved to create those wireframes was a bit high considering that my solution was working while i intentionally left out a few steps. But often it happens that ppl at LR get offended when i come up with a better solution (maybe hurt pride... hmm dunno). Well since that i stopped commenting tutorials there.
But i see no reason why i shouldnt comment them here ^^.
OK good old LR has some threads about sur splicing and a tutorial called "complex and working surs"
pffffffffffffff..... ooooookkkkkkaayyyyyy
"complex and working surs"... something is wrong there with this topic -> the "complex" and the "working" does not fit together guys
Complex? what is that?
Complex is a high polygon surface moddel and that means the .sur file is kinda big
ok lets have a short look at the original vanilla sur files... are they big? are they complex? ... hmm not really
Why are surs needed?
well originally digital anvil created the ship models and realized during the development that the complex models have to be calculated over and over again during the gameplay in order to calculate damage from gunfire
these calculations would cause increase the cpu usage and in mp it would cause heavy lag
But the Digital Anvil guys were no idiots so they had an awesome idea: "lets seperate the visible high polygon model from the hitpoint detection and create a low polygon sur file for every object in FL".
The result was simple. Smaller files for hit detection and therefor less calculations needed which is the only reason why we have a halfway lagless MP experience in FL
when the first sur files were created there were 2 different methods... one using the sur splicer with the complex surs and one method that a famous modder called "Arghh" invented
Arghh did create simple surs and understood alot about the server-client-dependencies in FL. Besides a small error in his tutorial (some of the steps he used to create his surs could have been avoided if he would have changed a standard value in milkshape) he was on the right way. Argh told the other modders that complex surs cause problems and lag but like so often he got ignored at LR.
Well he was right with his tutorial and with what he said about surs.
Now some modders will say "but i need complex surs coz my ships are complex and i want that every part of it does take damage". Gentlemen... the damage recognition in FL is a very vague procedure. The ships mainly have a size between 10 and 20 meters and if a gunshot hits the ship surface 50cm above the original ship model you wouldnt even recognize it... especially since the hit effects often have a size of several meters.
So what is more important for gameplay? 30cm that you dont even recognize or a lagfree mp experience?
Conclusion: throw away those complex surs and create simple ones which halfway covers the shape of the ship
if you test it ingame you wont recognize a difference between the surs... but a difference in performance
4. Collision groups
With the sur discussion and the tutorials the call for ships with collision groups grew.
What are collision groups?
Basically that are destructable parts of the ships like wings or fins.
Pro: it looks good to shoot an opponent into pieces and watch his ship parts floating through space
Contra: it does create lag and it overpowers missiles, mines and torpedos
Theory: The collision groups are connected with the root (ship) and (in vanilla FL) every collision group does take damage from explosions. So lets compare a ship with 5 collision groups with a ship that has only a root body:
We have a ship with 10.000 hitpoints and fire a torpedo with a explosion range of 500m and a damage value of 2.000 on that ship.
- The ship with the root only:
Torpedo hits.... booom... 2.000 of the torp damage done to the root (hpMount)... and the ship still has 8.000 hitpoints
- Now lets take the ship with the collision groups:
Torpedo hits.... booom... 2.000. of the torp damage done to the root(hpMount)... to wing 1... to wing 2... to fin 1... to fin 2... to fin 3
the damage is recognized additive due to the fact that the explosion range is high enough to reach all collision groups of that ship which means a damage of 10.000 for the collision groups and 2.000 for the root.
that makes a total damage for the ship of 12.000 with a hull with 10.000 hitpoints.... -> rest in pieces poor pilot
In vanilla FL and mods which keep the original settings and use ships with collision groups it would mean that missiles, mines and torps take higher damage than they should. It also means that a ship with 5 collision groups might take more damage than a ship with only 3 collision groups even if they have the same hitpoints and the same torp does hit them.
A bit unfair isnt it?
If you like fairplay and less complaining such as "how could you kill me with a 2k torp when i have 10k hitpoints - you cheater" then you better forget the collision groups and deactivate that crap.
Its just a suggestion... your choice.
5. Dynamic Economy
Thats a very big topic in the modding scene. Most ppl want that prices change after they bought something. A full working dynamic economy on the servers.
ok
lets do a short calculation
the market-file for commodities is about 200kb big
if you want to create a full dynamic universe you will have to update the entire market infomation... lets say every second in order to keep the server and the clients syncronized
200kb x 60seconds = 12mb traffic per minute (for just one player)
12mb x 60minutes = 720mb traffic per hour (for just one player)
ufff - im sure there might be ppl that can handle such high traffic but the majority wont be able to do that
even if you say "hey lets only update the market files with the changed values"
we go in with moderate 2kb per second and have additional traffic of 7,2mb per hour
-> bye bye 56k users
It is not complicated to create a dynamic economy using flhook (at least from the theoretical point of view, the coding might be a bit more complicated but possible)
but in the end FL would become un-playable for many ppl
the better choice is to create a semi-dynamical economy (the first one was introduced with the Crossfire mod 1-2 years ago ****ADVERTISMENT****)
6. How to create new unique features
.... to be continued