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

Executable patch system
Post new topic   Reply to topic     Forum Index -> Customization & Modding Goto page Previous  1, 2, 3  Next
View previous topic :: View next topic  
Author Message
dogcigar
Swabbie
Posts: 82



542 Gold -

PostPosted: Wed Jan 30, 2013 4:55 pm    Post subject: Reply with quote

Just to let you jlangsdo I`m pretty confident if you can find the exact addresses you can change all Pirate,Indian, and Settlement market items, presumably without negative effects. I can easily change them. Ofcourse this is changing memory addresses and wouldn`t work with just a savegame (I think, like I said I just started doing this stuff). You could use it in combination with a cheat table for a memory changer but the offsets would vary between Mac and Windows and different versions. In all these codes there`s a little code C1 F9 1F (sar ecx,1F) the 1F is 31 decimal and you can change it down to about 28 decimal and it will inversely affect that store item.
Back to top
View user's profile Send private message
parksbanyon
Gunner
Posts: 564



13127 Gold -

PostPosted: Wed Mar 20, 2013 2:35 am    Post subject: Reply with quote

u gents are on to golden goose eggs here! I stumbled across ur posts whille reading up on skin mods.....but the ability to change hard coded values would be golden.
I specifcally wish to create and mod 2 items: swords and ships. A real katana (not just skinned) is doable by taking loki's katana skin and giving it the rapiers perfectly balanced attribute.
But to be able to have realistic chinese junks of the era playable or 18th century American/English ships! Mid 19th century American ironsides!
Back to top
View user's profile Send private message
jlangsdo
Cutthroat
Posts: 398



11012 Gold -

PostPosted: Wed Mar 20, 2013 10:49 pm    Post subject: Reply with quote

A realistic chinese junk is far beyond me. That would mainly involve changing the nif files. I wouldn't know how to go about replacing all of the complexity of the sails.

The code where I set the sloop to hold 41 tons also has sailing characteristics for each kind of ship, though I haven't decoded them fully. So that part would be doable. And renaming "brig" to "junk" would be simple.
Back to top
View user's profile Send private message
parksbanyon
Gunner
Posts: 564



13127 Gold -

PostPosted: Thu Mar 21, 2013 6:04 pm    Post subject: Reply with quote

I'm a fairly quick study, thats why I'm reading up on your latest posts and getting familiar or refamiliar with perl, hexedit, nif, kfm, and kf files.

As u said a junk would be a complete remod of the nif as the sail type is completely different. It has the same basic sailing characteriscs as the pinnicles.

My internet is down for a couple of days so I'm netshopping it which is going to slow me down quite a bit
Back to top
View user's profile Send private message
parksbanyon
Gunner
Posts: 564



13127 Gold -

PostPosted: Wed Mar 27, 2013 2:46 pm    Post subject: Reply with quote

SHIP START OFFSET END OFFSET 1 2 3 4 5 6 7 8 9 10 11 12 13
. . . .$ crw- .spd .Wr/Mer .crw+ .can .car Hit? .? .ln pix .wd pix .sail? .?

Pinnacle Mail 325FD00 3260000 3 2 1 50 C 1E 80 2C01 B004 C004 0 8 OE01
Pinnacle Tartane 325B008 325B30B 3 2 0 32 8 14 80 90 8002 6F02 0 8 OE01
Galleon Royal 325F80C 325FB0F 8 C 0 96 20 82 80 4402 2C06 B608 0 1D BC02
Galleon Trade 325D208 325D50B 8 C 0 64 14 78 80 4402 4806 5407 0 1D BC02
Galleon Treasure 3261F00 3262203 8 C 0 C8 28 8C 80 4402 2C06 B608 0 1D BC02
Brig 325DF04 325E207 6 6 1 96 18 46 80 2C01 AC03 6004 0 24 A301
Brig of War 3260508 326080B 6 6 1 C8 20 50 80 2C01 AC03 6004 0 24 A301
Brigantine 325B900 325BC03 6 5 1 7D 14 3C 80 2C01 C503 2404 0 24 A301
Pinnacle 325D60C 325D90F 3 2 0 3C A 19 80 2C01 2B04 2F04 0 49 9B01
Barque Coastal 325BD04 325C007 5 6 0 4B C 3C 80 5401 2D05 4605 0 EBFFFFFF 3F02
Barque 325E308 325E60B 5 6 0 64 10 46 80 4001 4605 7805 0 EBFFFFFF 3F02
Barque Ocean 326090C 3260C0F 5 6 0 7D 10 50 80 4001 4605 7805 0 EBFFFFFF 3F02
Frigate 325CA00 325CD03 8 7 1 C8 20 50 80 4001 1405 BB05 0 EDFFFFFF 3D02
Frigate Lg 325F004 325F307 8 7 1 FA 28 5A 80 4001 1405 A406 0 EDFFFFFF 3D02
Frigate SOL 3261608 326190B 8 8 1 2C01 30 64 80 4001 1405 A406 0 EDFFFFFF 3D02
Galleon Fast 325CE04 325D107 8 7 1 A0 18 50 80 F401 OE06 6807 0 6 1C03
Galleon Flag 3261A0C 3261D0F 8 8 1 FA 28 64 80 F401 4006 AC08 0 6 1C03
Galleon War 325F408 325F70B 8 7 1 C8 20 5A 80 F401 4006 AC08 0 6 1C03
Sloop of War 325DB00 325DE03 4 4 1 64 10 32 80 F0 BC02 FC03 0 2B 4001
Sloop Royal 3260104 3260407 4 4 1 7D 14 3C 80 F0 BC02 FC03 0 2B 4001
Sloop 325B40C 325B70F 4 4 2 4B C 28 80 E6 EE02 2903 0 2B 4001
Merchantman 325C50C 325C80F 8 A 0 7D 10 64 80 AE01 4605 F104 0 25 2302
East Indiaman 3261204 3261507 8 A 0 96 14 8C 80 5401 5005 B004 0 25 2302
Merchantman Lg 325EC00 325EF03 8 A 0 7D 14 78 80 5401 5005 B004 0 25 2302
Fluyt 325C108 325C40B C1 8 0 32 8 50 80 5401 C604 4605 0 E 1802
Fluyt Large 325E70C 325E0F 6 9 0 4B C 64 80 5401 1405 1806 0 E 1802
West Indiaman 3260E00 3261103 6 A 0 64 10 78 80 5401 1405 1806 0 E 1802

Little hard to read in the post but all the ships offsets and codes from a win7 x64 machine.
still playing with Bridgers unk values. Val 2 is weather it is a war or merchant ship EXCEPT the sloop which has a value of 2.
I just use notepad ++ to read and edit the files. Seems easier than cheat engine.
val 12 and 13 are interrelated and I'm sure they have to do with the sailing characteristics. Keeping in mind a ships sailing characteristics are determined by sail rigging fore/aft vs. square, number of sails and masts, with or without oars, and hull characteristics length/width and draft that would explain why such intensive numbers in val 12 and 13. Had it been me I would have coded it with a simple byte flag (0=no 1=yes) for the best points of sailing.
Back to top
View user's profile Send private message
Roland
Helmsman
Posts: 4190



23929 Gold -

PostPosted: Thu Mar 28, 2013 5:26 am    Post subject: Reply with quote

Pinnacle?
Back to top
View user's profile Send private message Send e-mail
jlangsdo
Cutthroat
Posts: 398



11012 Gold -

PostPosted: Thu Mar 28, 2013 11:39 pm    Post subject: Reply with quote

I had decoded the same columns, this is what I called them:

## Ship info
##mincrew/cost TurnRad NameClass MaxCrew Cannon Cargo

The minimum crew, price of a ship, the price of upgrades, the distance that cannon are spaced out along the ship in battle, and the distance between the front and back wakes of the ship are all coupled into that first number, which might best be called ship size. Roland and I exchanged some posts about that one, see "Prices" page 3.

TurnRad might be better described as turning speed. Set it down to a 1 and you get a super war canoe. It doesn't affect top speed, however.

The NameClass determines whether gets a name from the list of naval vessels, civilian vessels, or pirate vessels from the appropriate nation. That's why sloops have a two: pirates sail sloops.

Unfortunately that leaves about 5 more 4-byte columns that are not constant and not understood (and 6 that are constants....) Like you said, those probably set the speed/acceleration under different conditions. One of them goes negative for some classes of ships, which might be a place to start....

Also, there are some very old posts by Airsaw about the sailing characteristics of different ship classes - how larger ships lose some speed while turning, but smaller ships lose turning speed when their forward speed goes down. That might be worth rereading for hints.
Back to top
View user's profile Send private message
parksbanyon
Gunner
Posts: 564



13127 Gold -

PostPosted: Fri Mar 29, 2013 4:02 am    Post subject: Reply with quote

Couple of quick notes her:

1. my $save_dir = "/Users/dell9400/My Documents/My Games/Sid Meier's Pirates!";
Your pirates_savegame_editor.pl. The correct default path in windows 7. the users undefined function didn't want to work so i hard wrote my user name
2. The smp save editor. Absolutely fantastic!
3. The easiest way to locate the ships data is: the first hex reference in the program to 64 00 00 00 64 00 00 00 64 00 00 00 64 00 00 00 seperates the 13 values of ship 1 from ship 2.
4. In my previous post notice the extra digit in the address this is the start address LSD and the end address MSD of actual ships data, ship by ship.
5. BTW I posted the ships hex data is exactly as it is read in notepad++ i.e. hex 12c is read 2c 01.
Back to top
View user's profile Send private message
parksbanyon
Gunner
Posts: 564



13127 Gold -

PostPosted: Fri Mar 29, 2013 4:25 am    Post subject: Reply with quote

Just red the "prices" post. Makes sense and works. Thanks.
Back to top
View user's profile Send private message
parksbanyon
Gunner
Posts: 564



13127 Gold -

PostPosted: Fri Mar 29, 2013 4:26 am    Post subject: Reply with quote

red=read. i don't spell that badly. My keyboard sucks.
Back to top
View user's profile Send private message
jlangsdo
Cutthroat
Posts: 398



11012 Gold -

PostPosted: Sat Jun 08, 2013 12:08 pm    Post subject: Reply with quote

New script:
smp_patch_maker.pl

If you have a hacked executable, this script can compare it to the original executable and write out a patch file in the format preferred by smp_patch.pl

I'm hoping dogcigar can use this to harvest some of the amazing patches he has worked out using the MAC Cheat Engine.
Back to top
View user's profile Send private message
dogcigar
Swabbie
Posts: 82



542 Gold -

PostPosted: Mon Jul 22, 2013 3:10 pm    Post subject: Reply with quote

MAROON INSURANCE. When marooned you keep your less valuable items if you have two. ie 2 items goes to 1, 1 item goes to 0. My thinking being that you store you`re less valuable items somewhere. Note if you start a new game after playing an older one your items may not be reset to zero (from memory). If you load a game, no problem

OK not much of a gameplay mod but this might work using the patch system. In jlansdo`s patch maker create/ alter the file with your patch (xxx.patch) with this.


OLD:
C7 40 04 00 00 00 00 C7 40 08 00 00 00 00 C7 40 0C 00 00 00 00 C6 40 10 00 8B 41 40 C7 81 B0 00 00 00 00 00 00 00 66 89 43 26 8B 41 5C 66 C7 43

NEW:
53 BB 02 02 02 02 51 31 C9 8B 14 08 21 DA D1 FA 89 14 08 83 C1 04 80 F9 11 7C EE 90 90 90 90 90 90 59 5B 8B 41 40 66 89 43 26 8B 41 5C 66 C7 43

I haven`t tested it with any other versions of SMP but hopefully should work.
Back to top
View user's profile Send private message
dogcigar
Swabbie
Posts: 82



542 Gold -

PostPosted: Mon Jul 22, 2013 3:26 pm    Post subject: Reply with quote

DAUGHTERS 1 RANK FUSSIER. Does not change the rank that they ask for (eg "when you reach the rank of..." etc. I also suggest changing the ´text .ini for ranks. eg I change the ranks around so that she might ask for admiral but you actually dance when you`re a rear admiral or something like that.

OLD:
C1 E0 05 89 8D 5C FF FF FF 0F BE 44 18 0C 0F B6 44 41 18 39 85 4C FF FF FF 0F 8E

NEW:
C1 E0 05 89 8D 5C FF FF FF 0F BE 44 18 0C 0F B6 44 41 18 39 85 4C FF FF FF 0F 8C
Back to top
View user's profile Send private message
dogcigar
Swabbie
Posts: 82



542 Gold -

PostPosted: Mon Jul 22, 2013 3:37 pm    Post subject: Reply with quote

DAUGHTERS 2 RANKS FUSSIER. Mutually exclusive from the one rank fussier one. Altering the "text.ini" is problematic as two ranks is the exact difference between the different types of daughters. I actually have another more complicated version which keeps Plain daughter as normal Attractive +1 Beautiful +2 and works great but is difficult to patch.

Anyway

OLD:
C1 E0 05 89 8D 5C FF FF FF 0F BE 44 18 0C 0F B6 44 41 18 39 85 4C FF FF FF 0F 8E

NEW:
C1 E0 05 89 8D 5C FF FF FF 0F BE 44 18 0C 8B 44 41 18 48 38 85 4C FF FF FF 0F 8C

No idea if these will work but please try it out and give feedback
Back to top
View user's profile Send private message
dogcigar
Swabbie
Posts: 82



542 Gold -

PostPosted: Mon Jul 22, 2013 6:01 pm    Post subject: Reply with quote

INDIAN SPICE: Hopefully this will work. I just tested it on mine and it was fine.

OLD:
02 00 00 00 89 C7 F7 EB 89 F9 C1 F9 1F D1 FA 29 CA 8D 14 92 29 D7 89 3D

NEW:
02 00 00 00 89 C7 F7 EB 89 F9 C1 F9 1B D1 FA 29 CA 8D 14 92 29 D7 89 3D

^ this 02 is the price ^decreasing 1F to 1B gives an average of about 50 units 1A is up to about 150 but sometimes about 10 or 20
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 Previous  1, 2, 3  Next
Page 2 of 3

 
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