|
Post by Phantomeis on Nov 16, 2018 2:16:02 GMT
How to read the unlocks-table of the database
Here you will learn how to view this image as database:
Looking into the unlocks table of the bf2142 databse we see this rows:
pid = player ID, meaning the soldier ukit = the unique kit/class from 1 to 5 1 = Recon 2 = Assault 3 = Pioneer 4 = Support 5 = non-class/All-Kits unlocks (grenades, sprint etc.) utree = left or right side of the unlocks-tree ingame from 1 to 2 (GanZ HMG or Clark shotgun side basicly)
uorder = how far you have gone up an unlock-tree, numbers 1 to 5 A "1" represents the first unlock of a tree A "2" represents the first two (so second unlock and everything underneath it) A "3" represents the frist three (so third unlock and everything underneath it) A "4" the mainweapon and the three unlocks under it A "5" is northerstrike, so the most top unlock and includes all underneath it
The ingame image again: So a table like:  translates to: Soldier with ID=1 has an engineer with the AA-Misslelauncher (utree=2 so right side and unlock 4= mainweapon) or in proper english: the soldier with ID 1 got the aa-launcher and the other tat this tree-side holds. poor decision making.
How to unlock weapons for a soldier
So to unlock specific weapons for example for recon, for one soldier, you need your unlocks-table to look like this: You can use the tools from myphpadmins table (direct edit, copy etc.) or read further.
To give someone all unlocks from the start you may use this SQL command.
You need to change the #playerID# with the actual playerID from the soldier.
Open xampp, click "admin" so you get into the myphpadmin page. Select "bf2142" database and then select table "unlocks". On the top row of the page you find a button called "SQL", click it. Paste the blow commands in the textbox and click OK.
You need to change the #playerID# with the actual playerID from the soldier. INSERT INTO unlocks (pid, ukit, utree, uorder) value (#playerID# ,1 ,1 ,5); INSERT INTO unlocks (pid, ukit, utree, uorder) value (#playerID# ,1 ,2 ,5); INSERT INTO unlocks (pid, ukit, utree, uorder) value (#playerID# ,2 ,1 ,5); INSERT INTO unlocks (pid, ukit, utree, uorder) value (#playerID# ,2 ,2 ,5); INSERT INTO unlocks (pid, ukit, utree, uorder) value (#playerID# ,3 ,1 ,5); INSERT INTO unlocks (pid, ukit, utree, uorder) value (#playerID# ,3 ,2 ,5); INSERT INTO unlocks (pid, ukit, utree, uorder) value (#playerID# ,4 ,1 ,5); INSERT INTO unlocks (pid, ukit, utree, uorder) value (#playerID# ,4 ,2 ,5); INSERT INTO unlocks (pid, ukit, utree, uorder) value (#playerID# ,5 ,1 ,6); INSERT INTO unlocks (pid, ukit, utree, uorder) value (#playerID# ,5 ,2 ,5); to update a row you can use the buttons from myphpadmins table (direct edit, copy etc.) or an sql command:
UPDATE unlocks SET uorder = 6 WHERE pid = 2 AND ukit =5 AND utree=1;
In this example you will unlock the left tree of the "non-class unlocks" for soldier with id 2 If you dont specify the pid, you will change the kit5-tree1 for all soldiers in this table. 
UPDATE unlocks SET uorder = 6 WHERE ukit =5 AND utree=1;
|
|
snazz
New Member
Posts: 24
|
Post by snazz on Jan 2, 2019 0:54:39 GMT
Thanks for this, I was able to unlock everything in game for my soldier.
Did you come up with an SQL command?
|
|
|
Post by Phantomeis on Jan 12, 2019 0:06:52 GMT
To give someone all unlocks from the start you may use this SQL command.
Open xampp, click "admin" so you get into the myphpadmin page. Select bf2142 databse and then select table "unlocks". Oon the top row of the page you find a button called "SQL", click it. Paste the blow commands in the textbox and click OK. You need to change the #playerID# with the actual playerID from the soldier.
INSERT INTO unlocks (pid, ukit, utree, uorder) value ( #playerID# ,1 ,1 ,5); INSERT INTO unlocks (pid, ukit, utree, uorder) value ( #playerID# ,1 ,2 ,5); INSERT INTO unlocks (pid, ukit, utree, uorder) value ( #playerID# ,2 ,1 ,5); INSERT INTO unlocks (pid, ukit, utree, uorder) value ( #playerID# ,2 ,2 ,5); INSERT INTO unlocks (pid, ukit, utree, uorder) value ( #playerID# ,3 ,1 ,5); INSERT INTO unlocks (pid, ukit, utree, uorder) value ( #playerID# ,3 ,2 ,5); INSERT INTO unlocks (pid, ukit, utree, uorder) value ( #playerID# ,4 ,1 ,5); INSERT INTO unlocks (pid, ukit, utree, uorder) value ( #playerID# ,4 ,2 ,5); INSERT INTO unlocks (pid, ukit, utree, uorder) value ( #playerID# ,5 ,1 ,6); INSERT INTO unlocks (pid, ukit, utree, uorder) value ( #playerID# ,5 ,2 ,5); ############ to update a row you can use the browser or an sql command: UPDATE unlocks SET uorder = 6 WHERE pid = 2 AND ukit =5 AND utree=1;In this example you will edit the row where pid(player account ID) equals 2, then only kit 5 (soldier unlocks like sprint, nades etc.) and tree 1 (the left one of the unlocks). if you dont specify the playerid, you will change the kit5-tree1 for all soldiers in this table.
|
|
snazz
New Member
Posts: 24
|
Post by snazz on Jan 12, 2019 3:06:59 GMT
Thanks Phantomeis
|
|
|
Post by Phantomeis on Apr 3, 2019 0:06:22 GMT
beefed up the insructions with meaningfull images and more code and examples
|
|
dbm
New Member
Posts: 11
|
Post by dbm on Apr 13, 2019 12:11:04 GMT
Amazing work.
Anyone know off-hand how to get the Dogtag Dagger? I know the requirements back then were 50 unique dog tags, which I did put into the database but still didn't get the new knife
|
|
|
Post by wattockhunt on Aug 1, 2020 9:15:12 GMT
Did something happen since 5yrs ago that 2142 no longer shows/uses unlocks/awards? Used to run my own private server,fesl/stats/unlocks/awards etc Everything worked,rank up,choose how to use your unlocks,medals,badges etc Wasn't perfect but it was ok. Now I can't get unlocks or awards working,same problem as shadowsilver,stats but no bfhq stuff? database shows unlocks waiting in the 'available' column but nothing when in game. tried assigning all unlocks like in the instructions,still not appearing. Not using any remaster files as yet,just the same olds one which when comparing seem to be using the same files/systems/edits etc.
Is the host file edit needed when running 1.51 client/server?
One edit I never used back then was the reverse hidden IP? I cannot find 0301a8c0 in my exe or your provided exe? ____________________________________________________
I just tried your fesl/database options and still didn't have unlocks,even with the admin soldier given.
|
|
|
Post by Phantomeis on Aug 3, 2020 15:58:03 GMT
heyo, the hostsfile thing is necessary even for 1.51 because of 'some' addresses that are not coded into the bf2142.exe (the others are getting overwritten with your IP). i dont know which entries in specific, but since the guide also covers patch 1.25 i included all edits. having them in the hostsfile doesnt matter or hurt, because a server machine's game client would be routet to fesl by hostsfile, while your friends wont have the hostsfile edit, besides the hostsfile reroutes only DNS names, not direct IPs that we configure in the .exe tl;dr: having all entries in hostsfile is cool. having sudden problems with the awards can be caused by: - an update of xampp, we run an old version because it uses old PHP, which in return uses old SQL calls which are coded into the fesl-application, so dont update xampp OR exchange all SQL calls with the ones PHP 7 uses (i dont know how they are called right now, but recoding that is pain). - firewall/windows10 killing apache/mysql connections - game not being version 1.51 - bf2142.exe being not edited correctly (here the hidden IP comes in) - having myPHPadmin (the database UI in browser) open while playing BF2142, so close the browser tab - fiddling in the DB and messing it up, in that case just copy the contents of drop_in_xampp_folder into /xampp/ again To find the hidden IP, change the search option from TEXT to HEX: 
|
|
|
Post by wattockhunt on Aug 4, 2020 22:34:54 GMT
edited the host file twice,one with local IP and once with WAN IP. my client exe is edited with my domain name instead of IP but I reversed the WAN IP of the host pc/server
192.168.1.3 is 11 characters my domain is also 11 characters hosts WAN IP is 14 characters which makes the exe fail,this is the dots and 0's thing to not make it fail?
Still not seeing unlocks in the game,none of the below are a factor.
having sudden problems with the awards can be caused by: - an update of xampp, we run an old version because it uses old PHP, which in return uses old SQL calls which are coded into the fesl-application, so dont update xampp OR exchange all SQL calls with the ones PHP 7 uses (i dont know how they are called right now, but recoding that is pain). - firewall/windows10 killing apache/mysql connections - game not being version 1.51 - bf2142.exe being not edited correctly (here the hidden IP comes in) - having myPHPadmin (the database UI in browser) open while playing BF2142, so close the browser tab - fiddling in the DB and messing it up, in that case just copy the contents of drop_in_xampp_folder into /xampp/ again
At this point I'll just start with a clean slate and set things up on my own pc and see if I can get things running once I've redirected the domain to my own IP.
|
|
|
Post by Phantomeis on Aug 5, 2020 16:03:00 GMT
I like to show you this tool: www.moddb.com/mods/bf2142unlocker/downloads/bf2142unlocker-v0-9-3-winit combines all FESL server stuff into one utility that starts the servers with one click, even the game server. Friends can easily join you in LAN with it too. You dont have a database to save points and awards though, but unlocks and awards will show up. Imagine a portable FESL server with no save-feature  Besides a very odd topic came around me this week: IPv6 dual stack Lite, every heared about that? that could effect your router and the connections. but i dont think this is the problem here. The length of the IP/Domainname should not matter that much, the many dots you see in the hexeditor are 00 values cause EA used their very long hostnames there. only the reversed IP is limited in length, but its a hex value and will handle every valid IP address anyway. But when you are using a domainname you are probably avoiding the change of your IPv4 by your provider, so the reverse IP WILL fail at the point when your provider changes the IPv4. Reverse IP (hidden IP) always must be a IP converted to hex, no chance for domain names there. would you mind sending me the domainname or the IP, in private massage? people having the .exe can reverselookup it anyway. i will build an .exe myself of this data and can try to connect or just exchange the hash (SHA256) of the file if you want. i suspect a problem here.
|
|
|
Post by wattockhunt on Aug 6, 2020 15:47:31 GMT
I like to show you this tool: www.moddb.com/mods/bf2142unlocker/downloads/bf2142unlocker-v0-9-3-winit combines all FESL server stuff into one utility that starts the servers with one click, even the game server. Friends can easily join you in LAN with it too. You dont have a database to save points and awards though, but unlocks and awards will show up. Imagine a portable FESL server with no save-feature  Besides a very odd topic came around me this week: IPv6 dual stack Lite, every heared about that? that could effect your router and the connections. but i dont think this is the problem here. The length of the IP/Domainname should not matter that much, the many dots you see in the hexeditor are 00 values cause EA used their very long hostnames there. only the reversed IP is limited in length, but its a hex value and will handle every valid IP address anyway. But when you are using a domainname you are probably avoiding the change of your IPv4 by your provider, so the reverse IP WILL fail at the point when your provider changes the IPv4. Reverse IP (hidden IP) always must be a IP converted to hex, no chance for domain names there. would you mind sending me the domainname or the IP, in private massage? people having the .exe can reverselookup it anyway. i will build an .exe myself of this data and can try to connect or just exchange the hash (SHA256) of the file if you want. i suspect a problem here.
PM sent
|
|
|
Post by wattockhunt on Aug 10, 2020 19:28:11 GMT
Follow up for the rest.............. Started a fresh from my own pc,all is running ok. Does the use of a domain in the exe negate the need for host file edits?I didn't edit mine and all seems to work ok...... 11 character domains were chosen I guess because it's a straight swap for 192.168.1.3 = less faffing around inside the exe. I used to give full unlocks to a soldier by way of db edit 'unlocks available - 50'. Once in the game the player found 50 unlocks to use and duely 'ticked' everything. Now I can do that with the SQL edit nice thanks  but can still give only 5 unlocks or whatever whenever needed etc
Copied all to the other server for testing,lets see ..............................
|
|
|
Post by wattockhunt on Aug 12, 2020 5:45:09 GMT
Other server still does the same......  Although I may have found out something,it may depend on the python file and domain used?  I'll test for sure but it looks like http://www.domain.* doesn't use unlocks but domain.* does This is for the server pc just running a 2142 server and stats on my own pc.
|
|
|
Post by Phantomeis on Aug 12, 2020 7:38:54 GMT
try adding the domain into the database to be enabled as a server (DB->server->add, instead of ip use domainname). what python file are you speaking of ?
|
|
|
Post by wattockhunt on Aug 12, 2020 16:14:47 GMT
try adding the domain into the database to be enabled as a server (DB->server->add, instead of ip use domainname). what python file are you speaking of ? Never even thought of that,thought it had to be IP in the db,will try it. BF2142 game server,BF2142StatisticsConfig.py Change this line http_backend_addr = 'stella.prod.gamespy.com'
|
|