Shop  •   Avatar  •   FAQ  •   Search  •   Memberlist  •   Usergroups  •   Profile  •   Log in to check private messages  •   Log in  •  Register 

other files in the FPKs?
Post new topic   Reply to topic     Forum Index -> Customization & Modding Goto page 1, 2  Next
View previous topic :: View next topic  
Author Message
alpine
Powder Monkey
Posts: 17


1120 Gold -

PostPosted: Wed Dec 08, 2004 8:43 am    Post subject: other files in the FPKs? Reply with quote

OK, I know what the DDS and BMP files are for, but what are the other files in the FPKs? I assume some of it is 3D modelling, some of it looks like map information.

.bhi - seems to be map related
.cue - ?
.dta - data file of some kind
.fnt - font files
.kf - ?
.kfm - ?
.nif - ?
.nl9 - ?
.pcx - seems to left over from Pirates Gold (in pak6.fpk, for example)
.dat - ? map info?
.csv - comma seperated files, seems to have something to do with sound
.tga - map related (strange, I have GPS software that uses TGA files)
.xml - xml files for various things
Back to top
View user's profile Send private message Send e-mail
Davos
Powder Monkey
Posts: 36


301 Gold -

PostPosted: Wed Dec 08, 2004 11:30 am    Post subject: Reply with quote

The .nif files are the 3d geometry files. The ships, the islands, the palm trees etc.
Back to top
View user's profile Send private message
uly
Powder Monkey
Posts: 27


783 Gold -

PostPosted: Wed Dec 08, 2004 11:59 am    Post subject: Reply with quote

And .tga are targa images used for texturing.
Back to top
View user's profile Send private message
Rahly
Powder Monkey
Posts: 37


376 Gold -

PostPosted: Thu Dec 09, 2004 1:36 am    Post subject: Reply with quote

Davos wrote:
The .nif files are the 3d geometry files. The ships, the islands, the palm trees etc.


Islands? no, Islands are made through multiple pictures files, where one is the hieghtmap
Back to top
View user's profile Send private message
jlangsdo
Cutthroat
Posts: 400



10932 Gold -

PostPosted: Sat Dec 22, 2012 12:54 pm    Post subject: Reply with quote

cue files probably set up dancing cues.

maplabel.dta determines how the city labels are drawn onto the world map. 4264 bytes are organized as 1066 double words (4 byte signed integers with least significant byte first).

Text label section:
Header: 4 dw
Red, Green, Blue for the color of an unselected city label
Font selection (0,1,2)
Data section: 44 x 3 x 4 dw.
Data is listed per city in the usual ordering from Antigua to Villa Hermosa. First there are 44 dw for the zoomed out map, then the medium map, then the zoomed in map. The batches are x-offset, y-offset, font size, orientation

Gold/Hearts/Cannons icons section:
Header: 6 dw
The 5th dw has to be 0 or the flags disappear.
Data section: 44 x 3 x 4 dw
Then data is the same 44 x 3 x 4 dw giving the x-offset, y-offset, magnification, and orientation of the icons.
Back to top
View user's profile Send private message
jlangsdo
Cutthroat
Posts: 400



10932 Gold -

PostPosted: Sun Sep 22, 2013 1:09 am    Post subject: Reply with quote

Looking into the cue file further, I translated them from binary to text and found some patterns

Quote:

43 55 45 20 01 00 00 00 9d 00 00 00
01 00 00 00 d1 01 00 00 64 61 74 61 00 00 00 00 00 00 00 00 1c 28 00 00
02 00 00 00 9f 03 00 00 64 61 74 61 00 00 00 00 00 00 00 00 da 4f 00 00
03 00 00 00 6c 05 00 00 64 61 74 61 00 00 00 00 00 00 00 00 8e 77 00 00
04 00 00 00 39 07 00 00 64 61 74 61 00 00 00 00 00 00 00 00 50 9f 00 00
05 00 00 00 07 09 00 00 64 61 74 61 00 00 00 00 00 00 00 00 11 c7 00 00
06 00 00 00 d4 0a 00 00 64 61 74 61 00 00 00 00 00 00 00 00 d0 ee 00 00
07 00 00 00 a2 0c 00 00 64 61 74 61 00 00 00 00 00 00 00 00 99 16 01 00
08 00 00 00 6f 0e 00 00 64 61 74 61 00 00 00 00 00 00 00 00 4b 3e 01 00
09 00 00 00 3d 10 00 00 64 61 74 61 00 00 00 00 00 00 00 00 14 66 01 00
0a 00 00 00 0a 12 00 00 64 61 74 61 00 00 00 00 00 00 00 00 d0 8d 01 00
0b 00 00 00 d8 13 00 00 64 61 74 61 00 00 00 00 00 00 00 00 96 b5 01 00
0c 00 00 00 a5 15 00 00 64 61 74 61 00 00 00 00 00 00 00 00 4f dd 01 00
0d 00 00 00 73 17 00 00 64 61 74 61 00 00 00 00 00 00 00 00 13 05 02 00
0e 00 00 00 40 19 00 00 64 61 74 61 00 00 00 00 00 00 00 00 d5 2c 02 00
...

There appears to be a 12 byte header followed by 24 byte lines, all in 4-byte chunks.

The first 4 bytes of the header are the characters "CUE ".
The next 4 bytes are the number 1, perhaps the first line number.
The last 4 bytes of the header are the number of lines in the file, probably referring to the last line number.

The 24 byte lines seem to break up into 6 4-byte chunks.

The first 4 bytes are the line number, and increase sequentially from 1. (Except in dance44normal-000.cue, which has an extra line d5 inserted between 01 and 02. This may be that my unpacked version is corrupt).

The next 4 bytes seem to be a non-decreasing number. The number goes up by roughly the same amount each line, but with some variations within the file and bigger variations across files. The delta ranges from 300 to over 500 between the different files. The delta increases for the last three lines at the end, and sometimes slightly in the middle, so this seems to be the time of the next maneuver, including the slowdown at the end.

The next 4 bytes are characters for "data" : 64 61 74 61
The next 8 bytes are zero.

The last 4 bytes are another non-decreasing number, which also get farther apart at the end, but these are bigger - about 22.05 times as large as the earlier field.

I'm mystified. I was expecting that this would have dance direction sequences, like 82112833 or 12121212, but that doesn't appear to be what is in these files, it seems like it is all timing, perhaps to two different scales.
Back to top
View user's profile Send private message
Captain Teague
Rigger
Posts: 1185



12207 Gold -

PostPosted: Sun Sep 22, 2013 2:31 am    Post subject: Reply with quote

I remember reading that all the dance tunes are either 3 beats per measure or 4 beats per measure. Could that be what this is?
_________________
The Code is the Law.
Back to top
View user's profile Send private message
jlangsdo
Cutthroat
Posts: 400



10932 Gold -

PostPosted: Sun Sep 22, 2013 1:38 pm    Post subject: Reply with quote

The cue files are named dance34normal-*.cue and dance44normal-*.cue, presumably breaking them into the 3/4 and 4/4 time signatures. I think that the different files in each time signature are for the different dances (which use different combinations and are also at different speeds).
Back to top
View user's profile Send private message
jlangsdo
Cutthroat
Posts: 400



10932 Gold -

PostPosted: Sun Sep 22, 2013 5:52 pm    Post subject: Reply with quote

OK, a little experimentation has yielded some fruit. I wrote a script that can scale up or down either set of numbers.

The second set of numbers (the bigger ones) appear to do nothing. Perhaps the SMP creators entered raw numbers here in a spreadsheet and then translated them (dividing by 22.05) to make the first set which actually affect the game.

Scaling the first set of numbers changes the tempo of the dance. Speeding it up works fine - in fact, dancing at 2.5x speed is quite a challenge. It's been a long time since a governor's plain daughter has told me I couldn't dance!

Slowing it down runs into a problem - running out of music before finishing the dance causes the game to do a soft hang. Presumably a mod to slow down the dancing would also have to slow down or extend the music. Come to think of it, if you really want to slow dance with the governor's daughter, the music and dance steps ought to change altogether... and maybe the lighting too.

But this accounts for everything in the cue files - so the dance moves themselves are stored elsewhere. Perhaps they are in the executable itself.
Back to top
View user's profile Send private message
jlangsdo
Cutthroat
Posts: 400



10932 Gold -

PostPosted: Sun Sep 22, 2013 11:13 pm    Post subject: Reply with quote

I found the dancing code in the executable, and it can be patched!

Code:

00 02 00 01 00 02 00 01
00 01 00 02 00 01 00 02
00 03 00 03 00 03 00 03
00 04 00 04 00 04 00 04
00 05 04 04 00 05 04 04
02 04 02 04 02 04 02 04
01 03 01 03 01 03 01 03
05 06 04 04 06 05 03 03
04 06 04 06 04 06 04 06
03 06 03 05 03 06 03 05


I was able to add a new dance step using smp_patch.pl

The numbers are not keypad numbers, rather, they correspond to these keypad positions:

Code:

   06
01    02
04 05 03


If you look at those positions and the code above, you will recognize your favorite dance moves. 00 is a pause.
Back to top
View user's profile Send private message
Rusty Edge
Rigger
Posts: 1977



2992 Gold -

PostPosted: Mon Sep 23, 2013 2:15 am    Post subject: Reply with quote

A new step? Shocked

So I could be doing fencing type leaps? Razz

It seriously sounds as if you are beginning to understand the complexities of this obtuse code.

I wonder what Rupert would say about a dancing mod?
Back to top
View user's profile Send private message
corsair91
Sailing Master
Posts: 8262



207856 Gold -

PostPosted: Tue Oct 19, 2021 12:14 pm    Post subject: Reply with quote

bump
Back to top
View user's profile Send private message
themodelcitizen
Gunner
Posts: 865



14671 Gold -

PostPosted: Sun Nov 07, 2021 4:00 am    Post subject: Reply with quote

Is parrot.nif used anywhere? I can't recall an actual parrot in the game anywhere although I may be tripping
Back to top
View user's profile Send private message
Pirate
Helmsman
Posts: 5589



109759 Gold -

PostPosted: Sun Nov 07, 2021 4:07 am    Post subject: Reply with quote

No and there is a pirate Captain nif that’s in the fpk packs that isn’t used in the game. It works though like he can be used as a dancer or replacing the Jesuit.
Back to top
View user's profile Send private message
corsair91
Sailing Master
Posts: 8262



207856 Gold -

PostPosted: Sun Nov 07, 2021 4:24 am    Post subject: Reply with quote

This mod makes use of the Parrot

rupertlittlebear - Parrot Mod
http://www.hookedonpirates.com/forums/viewtopic.php?t=8446

Fraxis may have intended to included a Parrot in game
but NIF file is unused
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Customization & Modding All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group