i compiled a modified luadec51 that uses single-precision lua_number. the file you posted began to decompile but it crashed luadec. i guess i was extracting the files wrong.sng wrote:I'm trying to decompile the file M05ListOfParts.luac taken from the file "pc\sds\missionscript\m05main.sds".
I use LuaDec51, but get an error "bad header in precompiled chunk".
Having sorted out, I realized that the error here: (luaconf.h)I changed it to 8, but a new error "bad constant in precompiled chunk".Code: Select all
"#define LUA_NUMBER double"
I understand, they use a modified Lua script. Am I right?
Mafia Lua Header:Lua Header v5.1:Code: Select all
1B 4C 75 61 51 00 01 04 04 04 [04] 00
Code: Select all
1B 4C 75 61 51 00 01 04 04 04 [08] 00
Important information: this site is currently scheduled to go offline indefinitely by end of the year.
Mafia II SDS files?
Re: Mafia II SDS files?
Re: Mafia II SDS files?
Code: Select all
DecompiledFunction = function(l_1_0)
if game.datastore:IsVariableExist("CON_DEMO") == false then
player = game.game:GetActivePlayer()
player:InventoryAddItem(55)
game.speech:LoadStage(60)
idMessages = common.messages.Id
questComM05 = Lokace.Create(idMessages.Distillery, idMessages.QuestDirector)
game.datastore:SetBool("tempDemoStart", true)
kteryPartik = game.datastore:GetNumber("missionPart")
kteraJeMise = game.datastore:GetNumber("missionNumber")
player:SetFightAbility(false, enums.FightAbility.COUNTER)
player:SetFightAbility(false, enums.FightAbility.COMBO)
if kteryPartik == 1 then
M05Part1(l_1_0)
elseif kteryPartik == 2 then
M05Part2(l_1_0)
elseif kteryPartik == 3 then
M05Part3(l_1_0)
elseif kteryPartik == 4 then
M05Part4(l_1_0)
elseif kteryPartik == 5 then
M05Part5(l_1_0)
elseif kteryPartik == 6 then
M05Part6(l_1_0)
elseif kteryPartik == 7 then
M05Part7(l_1_0)
elseif kteryPartik == 8 then
M05Part8(l_1_0)
elseif kteryPartik == 9 then
M05Demo(l_1_0)
elseif kteryPartik == 10 then
M05DemoDistFlat(l_1_0)
end
end
end)
-
- M-M-M-Monster veteran
- Posts: 1823
- Joined: Wed Mar 31, 2010 6:54 am
- Has thanked: 92 times
- Been thanked: 1058 times
-
- ultra-veteran
- Posts: 603
- Joined: Fri Nov 06, 2009 12:13 am
- Has thanked: 74 times
- Been thanked: 137 times
Re: Mafia II SDS files?
thanks!
here's my final version. the filenames are in the xml - so this needs to be written up in another programming language - but it can decompress the chunks and split all the listed files
leave a message or pm me if you have any problems.
here's my final version. the filenames are in the xml - so this needs to be written up in another programming language - but it can decompress the chunks and split all the listed files
leave a message or pm me if you have any problems.
You do not have the required permissions to view the files attached to this post.
Useful tool links:
-
- M-M-M-Monster veteran
- Posts: 1823
- Joined: Wed Mar 31, 2010 6:54 am
- Has thanked: 92 times
- Been thanked: 1058 times
Re: Mafia II SDS files?
trying on m05waytoelgreco.sdsWRS wrote:thanks!
here's my final version. the filenames are in the xml - so this needs to be written up in another programming language - but it can decompress the chunks and split all the listed files
leave a message or pm me if you have any problems.
Code: Select all
offset filesize filename
------------------------------
- SCRIPT's MESSAGE:
Dumping XML description..
000093c5 3149 m05waytoelgreco_desc.xml
- SCRIPT's MESSAGE:
total chunks: 6
decompressed size: 93408 bytes
- SCRIPT's MESSAGE:
Parsing uncompressed data..
- SCRIPT's MESSAGE:
warning: next output will keep header information
0000002a 7001 1__FrameResource
- SCRIPT's MESSAGE:
warning: next output will keep header information
00001bbc 6 2__FrameNameTable
- SCRIPT's MESSAGE:
warning: next output will keep header information
00001bfb 7476 3__Actors
- SCRIPT's MESSAGE:
warning: next output will keep header information
- error in src\quickbms.c line 2480: CMD_GetDString_func()
Error: tentative of allocating -1 bytes
Code: Select all
offset filesize filename
------------------------------
- SCRIPT's MESSAGE:
Dumping XML description..
00009de0 2794 demo05_desc.xml
- SCRIPT's MESSAGE:
total chunks: 9
decompressed size: 131859 bytes
- SCRIPT's MESSAGE:
Parsing uncompressed data..
- SCRIPT's MESSAGE:
warning: next output will keep header information
0000002a 5518 1__FrameResource
- SCRIPT's MESSAGE:
warning: next output will keep header information
000015f1 6 2__FrameNameTable
- SCRIPT's MESSAGE:
warning: next output will keep header information
00001630 6824 3__Actors
00003127 12 4__MemFile
00003193 18919 5__MemFile
00007bbf 61848 6__MemFile
- error in src\quickbms.c line 8504: myalloc()
Error: Not enough space
My Github repo
- Tosyk
- double-veteran
- Posts: 1027
- Joined: Thu Oct 22, 2009 10:24 am
- Location: Russia, Siberia
- Has thanked: 269 times
- Been thanked: 154 times
- Contact:
Re: Mafia II SDS files?
i just get an error with all SDS i've trying
anyway great job:)
upd:
or maybe it's not a bms script??
Code: Select all
offset filesize filename
------------------------------
- SCRIPT's MESSAGE:
Dumping XML description..
00a05599 55351 tunel_desc.xml
Error: the compressed zlib/deflate input is wrong or incomplete (-3)
Error: there is an error with the decompression
the returned output size is negative (-1)
Press RETURN to quit
upd:
or maybe it's not a bms script??
-
- ultra-veteran
- Posts: 603
- Joined: Fri Nov 06, 2009 12:13 am
- Has thanked: 74 times
- Been thanked: 137 times
Re: Mafia II SDS files?
i only had 2 files to write my script from. cut me some slack.
can you upload the ones you tried it with?
memory doesn't refer to hard disk spaceEkey wrote:Error: Not enough space - wtf 795gb free
can you upload the ones you tried it with?
Useful tool links:
-
- ultra-n00b
- Posts: 7
- Joined: Sun Aug 08, 2010 10:01 am
- Has thanked: 3 times
- Been thanked: 1 time
Re: Mafia II SDS files?
Tried your script with text_default.sds and it worked like a charm, thanks (I used quickbms)!
It produced 5 files: 1__Texture 2__MemFile 3__MemFile 4__MemFile 5__XML
I hope you'll find a way to recompress those files (especially Memfiles which contain translatable text) easily, without crashing the game.
Great job so far!
It produced 5 files: 1__Texture 2__MemFile 3__MemFile 4__MemFile 5__XML
I hope you'll find a way to recompress those files (especially Memfiles which contain translatable text) easily, without crashing the game.
Great job so far!
-
- M-M-M-Monster veteran
- Posts: 1823
- Joined: Wed Mar 31, 2010 6:54 am
- Has thanked: 92 times
- Been thanked: 1058 times
Re: Mafia II SDS files?
yup , attachedWRS wrote:i only had 2 files to write my script from. cut me some slack.
memory doesn't refer to hard disk spaceEkey wrote:Error: Not enough space - wtf 795gb free
can you upload the ones you tried it with?
You do not have the required permissions to view the files attached to this post.
My Github repo
Re: Mafia II SDS files?
The contents of this post was deleted because of possible forum rules violation.
-
- M-M-M-Monster veteran
- Posts: 1823
- Joined: Wed Mar 31, 2010 6:54 am
- Has thanked: 92 times
- Been thanked: 1058 times
Re: Mafia II SDS files?
in folder "Steam\SteamApps\common\mafia ii - public demo\pc\shaders\buildLogs\" i found interesting log file
Autobuilder.log
Edit by Rheini: removed the log to keep this thread clean
Autobuilder.log
Edit by Rheini: removed the log to keep this thread clean
My Github repo
-
- Moderator
- Posts: 2602
- Joined: Sun May 18, 2008 3:01 pm
- Has thanked: 57 times
- Been thanked: 1422 times
Re: Mafia II SDS files?
that is useless dude. please delete that its was to big for the forum posts use an attached text file next time.
-
- ultra-veteran
- Posts: 603
- Joined: Fri Nov 06, 2009 12:13 am
- Has thanked: 74 times
- Been thanked: 137 times
Re: Mafia II SDS files?
updated my script. adding some comments before i upload
You do not have the required permissions to view the files attached to this post.
Useful tool links: