lua scripts and pak files

Locked
shaintalach
Posts: 5
Joined: Sun Jul 02, 2017 3:29 pm

lua scripts and pak files

Post by shaintalach » Sun Jul 02, 2017 4:00 pm

I've been looking for a way to heavily mod the campaign and free game maps, and I've managed to do quite a bit of modding using Insigars editor(which is great) however I cant edit things like spawn points. Hokan's editor looks a bit more advanced but I have hard time understanding how to use it. I've read a lot of posts about this sort of modding and from what I understand I need to extract all my pak files into my spellforce folder and then somehow edit the lua files. My problem is I'm not particularly well versed in this sort of thing, since I don't know how to extract the pak files in the first place- and I don't know how to decompile lua files. So far I've tried using dragon unpaker 5 to extract the pak files into my spellforce folder but it only seems to extract the subfolders within the pak files- and not the actual files. It seems I have to extract every subfolder one by one. I managed to find some lua files but when I open them in notepad++ I have no way to decompile them. Also I noticed that the pak files are numbered sf0 -36 but there are only 23 in my spellforce\pak folder, meaning that some numbers are skipped. I don't know if that's normal or not. BTW I have the steam version of spellforce platinum and the cd version.

I suppose what I'm asking is if somebody could explain to me step by step how to access and modify the lua files.

-Sorry for the long text but would really appreciate an answer

User avatar
Dieter
Posts: 62
Joined: Sat Feb 20, 2016 12:11 am
Contact:

Re: lua scripts and pak files

Post by Dieter » Sun Jul 16, 2017 5:24 pm

Hello !
1st - You need to use Dragon UnPACKer version 5.6.2, it is proven to extract from any SF pak files .
2nd - "notepad++" is only for editing already decompiled script files , you need to convert from
lua with the help of "unluac" or any other similar program .
3rd - Maybe some people have decompiled (converted) scripts.
4th - You don't have to convert them back , the game will see/use these files,
just keep the original name and extension "lua".

shaintalach
Posts: 5
Joined: Sun Jul 02, 2017 3:29 pm

Re: lua scripts and pak files

Post by shaintalach » Tue Jul 18, 2017 11:53 am

Dieter wrote:Hello !
1st - You need to use Dragon UnPACKer version 5.6.2, it is proven to extract from any SF pak files .
2nd - "notepad++" is only for editing already decompiled script files , you need to convert from
lua with the help of "unluac" or any other similar program .
3rd - Maybe some people have decompiled (converted) scripts.
4th - You don't have to convert them back , the game will see/use these files,
just keep the original name and extension "lua".
Thanks for the reply I've extracted all the pak files now using the dragon unpacker you suggested but now I cant find any programme to decompile the lua files. I tried unluac but it only works on lua 5.1 and 5.2. I think I need a decompiler that works on lua 4.0. I've tried looking for already decompiled scripts but I cant find any on this forum - it seems the've all been removed.

User avatar
Dieter
Posts: 62
Joined: Sat Feb 20, 2016 12:11 am
Contact:

Re: lua scripts and pak files

Post by Dieter » Tue Jul 18, 2017 12:04 pm

You're welcome ! I'd give you mine , but I have a completely different version of the scripts ,
my game is Limited Edition ver. 1.36 , it was only available in Austria (I guess). But perhaps this will help , they wrote "CFLuaDC" is the one , just scroll to the bottom . viewtopic.php?f=14&t=156

shaintalach
Posts: 5
Joined: Sun Jul 02, 2017 3:29 pm

Re: lua scripts and pak files

Post by shaintalach » Wed Jul 19, 2017 4:59 pm

I just tried to download CFLuaDc but the download link is broken - All the decompilers that work for lua 4.0 appear to be non-functional. I think I read somewhere that this forum got corrupted somehow and that might be why the forum page you linked to me doesn't have any attachments when it looks like it should. I guess I'll just have to hope that someone can re-upload their decompiled scripts. Thanks for all your help anyway.

User avatar
Dieter
Posts: 62
Joined: Sat Feb 20, 2016 12:11 am
Contact:

Re: lua scripts and pak files

Post by Dieter » Wed Jul 19, 2017 7:41 pm

What is your game version ? It can be seen in the lower corner on the left in the menu , I mean CD game, you told you have the game on CD . Mostly I need to know the version number without the Phoenix campaign . Install the original game (OOD + BoW) without the last Addon (phoenix) and tell me the game version . If it matches mine , perhaps I can help you.

shaintalach
Posts: 5
Joined: Sun Jul 02, 2017 3:29 pm

Re: lua scripts and pak files

Post by shaintalach » Wed Jul 19, 2017 8:30 pm

Unfortunantley I only have spellforce platinum(CD and Steam) which includes the phoenix campaign. It doesn't say which version on the menu but I think it's v 1.52.

User avatar
Dieter
Posts: 62
Joined: Sat Feb 20, 2016 12:11 am
Contact:

Re: lua scripts and pak files

Post by Dieter » Wed Jul 19, 2017 8:56 pm

I have decrypted spawns from version 1.36 . As far as I can see, it's not compatible with your version. Why ? It's simple . The numbers of the spawn points had been changed , for example if you load Coop_36 map , you'll see mummies instead of goblins , etc . Of course the mummies will demolish the goblin camp and the spawn halts . But you can buy 1.36 via ebay , it's dirt cheap. And I'll send you the spawn file via e-mail. It will be 100% compatible and you can edit manually the units you want to spawn . I do not know if it is allowed to send external links / Just hit search on ebay and type SPELLFORCE Limited Edition, it will match my version . Make sure to buy your language ( English and German are available ). Regards

Locked