[Research/HOW-TO] Modding on iPad

Discuss and distribute tools and methods for modding. Moderator - Grognak
drakulix
Posts: 9
Joined: Sun Apr 20, 2014 5:13 pm

Re: [Research/HOW-TO] Modding on iPad

Postby drakulix » Mon May 05, 2014 7:39 am

Hael wrote:Heya, thanks I really appreciate the help. I'm being an idiot it seems.

so ive tested things with a bunch of different control files and think ive spotted the problem.
everytime i pack things in a directory that doesn't contain a subdirectory, the program works fine.. however if there is a subdirectory in there, it reads the directory like a string?? and mucks up (which then messes up everything else)

eg
deflate:"data/%"
deflate:"fonts/%"
deflate:"atlas/people/%"

works and packs correctly, however
deflate:"atlas/%"

gives the following error
Failed to read from atlas/people while writing package: Unexpected EOF

everything is in my home directory:
eg
build-pkg.exe
control-file.txt
extract-pkg.exe
ftl.dat (when its built)
and the directories
atlas, audio, data, fonts, img


in that case, you probably need to make one entry per file extension, so the build-pkg.exe does not try to read those folders as files.
so you should be able to do something like that:

Code: Select all

deflate:"atlas/%.tex"
deflate:"atlas/%.txt"
deflate:"atlas/people/%.tex
...


I just wrote a little script, when I was building those packages, that listed all files without any wildcards, but that script would not work on windows. It might be a good idea to create something similar for your operation system, so not everybody has to create a control file manually. Even if you decide to continue creating that file by hand, you should upload it once it is working to make the process easier for other people. ;)
Hael
Posts: 5
Joined: Sun May 04, 2014 8:32 pm

Re: [Research/HOW-TO] Modding on iPad

Postby Hael » Mon May 05, 2014 12:05 pm

Heya, thanks again for all the help.

Your method worked, and more importantly the whole system works. I was able to export an altered blueprint.xml onto my ipad and it has been working for over an hour of gameplay.

When I have time later this week, i'll upload the files. Do you think I should upload extract-pkg.exe etc? Its a little bit murky on copyright grounds.
drakulix
Posts: 9
Joined: Sun Apr 20, 2014 5:13 pm

Re: [Research/HOW-TO] Modding on iPad

Postby drakulix » Mon May 05, 2014 12:12 pm

Hael wrote:Heya, thanks again for all the help.

Your method worked, and more importantly the whole system works. I was able to export an altered blueprint.xml onto my ipad and it has been working for over an hour of gameplay.

When I have time later this week, i'll upload the files. Do you think I should upload extract-pkg.exe etc? Its a little bit murky on copyright grounds.


As long as you did not modify the source code of the binaries, uploading should not cause any problem in terms of copyright, while SIL is still free to use.
Glad to hear it worked for you. I still hope somebody figures out a nice way to edit the image files. I have some kind of franken-captains-edition mod running on my ipad, but most added images are simply missing. It just looks horrible.
Vhati
Posts: 792
Joined: Thu Oct 25, 2012 12:01 pm

Re: [Research/HOW-TO] Modding on iPad

Postby Vhati » Wed May 07, 2014 4:43 am

It'd be easy to write a java parser for the pkg format.
The tex format doesn't look bad either, though I'm less familiar with image formats to gauge that.

And when I was working on OverdriveGDX, I used GDX's packer to build collages, so it is possible to automate breaking up and recreating each atlas.

But I'm too busy to work on it right now, and I don't have iPad to test on anyway.
Just puttin' this out there.


Source: SIL's "package-pkg.h"
Source: SIL's "tex-file.h"
ApplesOfEpicness
Posts: 4
Joined: Wed Jul 16, 2014 5:49 pm

Re: [Research/HOW-TO] Modding on iPad

Postby ApplesOfEpicness » Wed Jul 16, 2014 7:35 pm

Wait, there is no file called "make" in the tools folder
drakulix
Posts: 9
Joined: Sun Apr 20, 2014 5:13 pm

Re: [Research/HOW-TO] Modding on iPad

Postby drakulix » Wed Jul 16, 2014 7:54 pm

ApplesOfEpicness wrote:Wait, there is no file called "make" in the tools folder

If you do not know what a make-based build system is, you probably won't be able to follow the rest of the tutorial. "make" is not supposed to be a file in the folder, but an executable in your environment.
Google it.
ApplesOfEpicness
Posts: 4
Joined: Wed Jul 16, 2014 5:49 pm

Re: [Research/HOW-TO] Modding on iPad

Postby ApplesOfEpicness » Fri Jul 18, 2014 4:21 am

drakulix wrote:
ApplesOfEpicness wrote:Wait, there is no file called "make" in the tools folder

If you do not know what a make-based build system is, you probably won't be able to follow the rest of the tutorial. "make" is not supposed to be a file in the folder, but an executable in your environment.
Google it.

Honestly, your probably right. Thanks for the reply though, I probably would have never found out make wasn't a file.
At it stands, I'm trying to repack everything, but build-pkg keeps giving me this error.

Code: Select all

Segmentation fault (core dumped)


All the directories are in place and the control file has been written.
This is the build-pkg.exe.stackoverflow file.

Code: Select all

Exception: STATUS_ACCESS_VIOLATION at rip=0018016966F
rax=00000000000491E0 rbx=2525252525252525 rcx=0000000000000040
rdx=0000000000000025 rsi=00000000000491E0 rdi=000000000022CCF0
r8 =0000000000000025 r9 =0000000000000000 r10=2525252500000000
r11=00000001004011E7 r12=0000000000000003 r13=000000000022A5E0
r14=0000000000000000 r15=0000000000000001
rbp=00000001802E2BD0 rsp=0000000000228568
program=C:\cygwin64\home\THISPC\build-pkg.exe, pid 5880, thread main
cs=0033 ds=002B es=002B fs=0053 gs=002B ss=002B
Stack trace:
Frame        Function    Args
001802E2BD0  0018016966F (00000000000, 00000000000, 00000000000, 00000000000)
001802E2BD0  001004015BB (001801744B0, 000801744B0, 0000022D6C0, 001802BE600)
001802E2BD0  00100403564 (00000000000, 00000000000, 00000000030, 30001000000FF00)
0000022AB90  001800482D1 (00000000000, 00000000000, 00000000000, 00000000000)
00000000000  0018004619B (00000000000, 00000000000, 00000000000, 00000000000)
00000000000  001800462F4 (00000000000, 00000000000, 00000000000, 00000000000)
00000000000  00100402AD1 (00000000000, 00000000000, 00000000000, 00000000000)
00000000000  00100401010 (00000000000, 00000000000, 00000000000, 00000000000)
00000000000  000776E59ED (00000000000, 00000000000, 00000000000, 00000000000)
00000000000  0007791C541 (00000000000, 00000000000, 00000000000, 00000000000)
End of stack trace

ApplesOfEpicness
Posts: 4
Joined: Wed Jul 16, 2014 5:49 pm

Re: [Research/HOW-TO] Modding on iPad

Postby ApplesOfEpicness » Thu Aug 07, 2014 2:35 am

Okay, so forget the post above. I got build-pkg to work in Ubuntu. So now the ftl.dat is packed and ready to go. However, I still have one question, how do I get my ftl.dat to replace the game's original one? ifunbox doesn't seem to work; it's like it just copies it over and then the data inside the app resets back.
dinoman
Posts: 1
Joined: Wed Jun 03, 2015 1:24 am

Re: [Research/HOW-TO] Modding on iPad

Postby dinoman » Wed Jun 03, 2015 1:29 am

ifunbox can be a bit tricky. Try deleting the file first to make sure that ifunbox is working. I seem to recall that sometimes you need to install a cydia extention to get ifunbbox to work properly. You might also try bundling the file back into the ipa and reinstalling ftl...
Lightwavers
Posts: 29
Joined: Thu Aug 06, 2015 4:45 am

Re: [Research/HOW-TO] Modding on iPad

Postby Lightwavers » Thu Aug 06, 2015 4:50 am

Can someone please start work on making a tool for this? I would seriously PAY for this to be done. I only have the iPad edition, and want to install mods so badly...