• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

CoAS Combined Mod Version

Status
Not open for further replies.
Maybe rats are refered to as a different name like the Arabella is not called the Arabella but is refered to by that name in which case the name should be in common configuration located in Age of Pirates 2\RESOURCE\INI\texts\russian. Nope this is the only string of code there.
Code:
string = NoEat_NoRats,"Don't eat and no rats"

What files have referance to the Rats?

Yes i think Pieter is right Powder is listed as the 4th good after balls, knipples, bombs and grape shots which are something that the rats do not eat and the oil is the 30th good all the goods from 4 to 30 i have seen the rats eat everything before 4 and after 30 i haven't seen the rats eat.

Here's is the list of goods from goods.H located in Age of Pirates 2\Program\STORE

Code:
#define GOODS_QUANTITY  62 // boal

#define GOOD_BALLS	    0
#define GOOD_GRAPES	    1
#define GOOD_KNIPPELS	2
#define GOOD_BOMBS	    3
// boal -->
#define GOOD_POWDER     4
#define GOOD_FOOD       5
#define GOOD_WEAPON	    6
#define GOOD_MEDICAMENT 7

#define GOOD_SAILCLOTH  8
#define GOOD_PLANKS     9
#define GOOD_CHOCOLATE	10
#define GOOD_COFFEE	    11
#define GOOD_TOBACCO	12
#define GOOD_SUGAR	    13
#define GOOD_WHEAT      14
#define GOOD_WINE	    15
#define GOOD_RUM	    16
#define GOOD_ALE	    17
#define GOOD_COTTON	    18
#define GOOD_LINEN	    19
#define GOOD_LEATHER	20
#define GOOD_SILK	    21
#define GOOD_CLOTHES	22
#define GOOD_EBONY      23
#define GOOD_MAHOGANY 	24
#define GOOD_SANDAL	    25
#define GOOD_CINNAMON   26
#define GOOD_COPRA      27
#define GOOD_PAPRIKA    28
#define GOOD_FRUITS     29
#define GOOD_OIL        30
#define GOOD_BRICK      31
//
#define GOOD_SLAVES     32
#define GOOD_GOLD       33
#define GOOD_SILVER	    34
//   cannons ............
#define GOOD_CANNON_4   35
#define GOOD_CANNON_6   36
#define GOOD_CANNON_8   37
#define GOOD_CANNON_10   38
#define GOOD_CANNON_12   39
#define GOOD_CANNON_16   40
#define GOOD_CANNON_18   41
#define GOOD_CANNON_20   42
#define GOOD_CANNON_24   43
#define GOOD_CANNON_32   44
#define GOOD_CANNON_36   45
#define GOOD_CANNON_42   46
#define GOOD_CANNON_48   47
#define GOOD_CANNON_68   48
#define GOOD_CANNON_92   49

#define GOOD_CULVERINE_4 50
#define GOOD_CULVERINE_6 51
#define GOOD_CULVERINE_8 52
#define GOOD_CULVERINE_10 53
#define GOOD_CULVERINE_12 54
#define GOOD_CULVERINE_16 55
#define GOOD_CULVERINE_18 56
#define GOOD_CULVERINE_20 57
#define GOOD_CULVERINE_24 58
#define GOOD_CULVERINE_32 59
#define GOOD_CULVERINE_36 60
#define GOOD_CULVERINE_42 61
// boal <--

If the goods could be redifiened so that it looks like this
Code:
#define GOODS_QUANTITY  62 // boal

#define GOOD_BALLS	    0
#define GOOD_GRAPES	    1
#define GOOD_KNIPPELS	2
#define GOOD_BOMBS	    3
// boal -->
#define GOOD_POWDER     4
#define GOOD_FOOD       5
#define GOOD_FRUITS     6
#define GOOD_CHOCOLATE	7
#define GOOD_WHEAT      8
#define GOOD_WEAPON	    9
#define GOOD_MEDICAMENT 10

#define GOOD_SAILCLOTH  11
#define GOOD_PLANKS     12
#define GOOD_COFFEE	    13
#define GOOD_TOBACCO	14
#define GOOD_SUGAR	    15
#define GOOD_WINE	    16
#define GOOD_RUM	    17
#define GOOD_ALE	    18
#define GOOD_COTTON	    19
#define GOOD_LINEN	    20
#define GOOD_LEATHER	221
#define GOOD_SILK	    22
#define GOOD_CLOTHES	23
#define GOOD_EBONY      24
#define GOOD_MAHOGANY 	25
#define GOOD_SANDAL	    26
#define GOOD_CINNAMON   27
#define GOOD_COPRA      28
#define GOOD_PAPRIKA    29
#define GOOD_OIL        30
#define GOOD_BRICK      31
//
#define GOOD_SLAVES     32
#define GOOD_GOLD       33
#define GOOD_SILVER	    34
//   cannons ............
#define GOOD_CANNON_4   35
#define GOOD_CANNON_6   36
#define GOOD_CANNON_8   37
#define GOOD_CANNON_10   38
#define GOOD_CANNON_12   39
#define GOOD_CANNON_16   40
#define GOOD_CANNON_18   41
#define GOOD_CANNON_20   42
#define GOOD_CANNON_24   43
#define GOOD_CANNON_32   44
#define GOOD_CANNON_36   45
#define GOOD_CANNON_42   46
#define GOOD_CANNON_48   47
#define GOOD_CANNON_68   48
#define GOOD_CANNON_92   49

#define GOOD_CULVERINE_4 50
#define GOOD_CULVERINE_6 51
#define GOOD_CULVERINE_8 52
#define GOOD_CULVERINE_10 53
#define GOOD_CULVERINE_12 54
#define GOOD_CULVERINE_16 55
#define GOOD_CULVERINE_18 56
#define GOOD_CULVERINE_20 57
#define GOOD_CULVERINE_24 58
#define GOOD_CULVERINE_32 59
#define GOOD_CULVERINE_36 60
#define GOOD_CULVERINE_42 61
// boal <--

Then the rats code could be changed to something like.
Code:
int iGoods = GOOD_FOOD + rand(GOOD_WHEAT - GOOD_FOOD);

This is only an example but i guess you could add a few other goods like coffee, tobacco and other goods that can be eaten/drunk.
 
Is there no PROGRAM\STORE\goods.h file with some code like this?
Code:
#define GOODS_QUANTITY 33

#define GOOD_WHEAT		0	// PB: Rations first
#define GOOD_RUM		1	// PB: Rations first
#define GOOD_BALLS		2
#define GOOD_GRAPES		3
#define GOOD_KNIPPELS	4
#define GOOD_BOMBS		5

#define GOOD_GUNPOWDER	6
#define GOOD_SAILCLOTH	7
#define GOOD_PLANKS		8	// Numbers below are value index based on cost per cwt, multiply by GOODS_PRICE_SCALAR for actual cost/cwt
#define GOOD_GOLD       9   // 16.67
#define GOOD_SILVER     10  // 14.00
#define GOOD_CINNAMON	11	// 8.00
#define GOOD_CHOCOLATE	12	// 7.00
#define GOOD_COFFEE		13	// 7.00
#define GOOD_FOOD		14
#define GOOD_TREATMENT	15
#define GOOD_PAPRIKA	16	// 6.00
#define GOOD_WINE		17	// 5.00
#define GOOD_SANDAL		18	// 5.00
#define GOOD_EBONY		19  // 4.33
#define GOOD_MAHOGANY	20	// 4.00
#define GOOD_SUGAR		21	// 3.00
#define GOOD_TOBACCO	22	// 3.00
#define GOOD_ALE		23	// 3.00
#define GOOD_SILK		24	// 3.00
#define GOOD_LINEN		25	// 2.67
#define GOOD_FRUITS		26	// 2.67
#define GOOD_CLOTHES	27	// 2.67
#define GOOD_BRICKS     28  // 2.50
#define GOOD_OIL		29	// 2.50
#define GOOD_COTTON		30	// 2.00
#define GOOD_COPRA		31	// 1.50
#define GOOD_LEATHER	32	// 1.00
GOOD_OIL and GOOD_POWDER are just numerical values defined like above.
GOOD_POWDER + rand(GOOD_OIL - GOOD_POWDER) will return a random number between the number of powder and the number of oil.
Any of the goods with a number between those can thus be eaten by rats.
You might want to reorder the goods #defines so that there's only consumables between oil and powder and no weapons.
 
Just like with the other INI files, RESOURCE\INI\TEXTS\ENGLISH\ShipEatGood.txt
contains only good names used when running over goods at sea.
You can probably remove the entire file and the goods will still be there.
They just won't show their name anymore when you run them over.

The definition of what goods can be generated around a sinking ship
will be somewhere in the PROGRAM folder. The PROGRAM folder is where all REAL code is.
RESOURCE\INI is just for translatable texts and some picture and particle definitions.
 
I will ask you people once more: Does anyone need to be given the rights to modify the CoAS CM ModDB Profile?
This Thursday I'm leaving and will be much less available for the coming four months.
If there's anything you need from me for this, be sure to let me know now while there's still some time left. :whipa
 
If the goods could be redifiened so that it looks like this
[...]
Then the rats code could be changed to something like.
[...]
I reckon that should work. There is a chance that the frequency of those goods being eaten will go up though.
After all, while before there were many goods to choose from to be eaten, now there will only be a few.
So you might need to tone down the chance of anything being eaten to compensate for that.
I suppose there's a chance value for that somewhere around.
Might be this line:
Code:
(iQuantity > 10 && rand(5) != 2)
Rand(5) could be any number between 0 and 5, so the chance of that being 2 is 17%.
So every day, there's a 17% chance that something will be eaten. Increase the value of 5 to something higher to decrease the chance.
Judging by the code, I think that's how it works.
 
I will ask you people once more: Does anyone need to be given the rights to modify the CoAS CM ModDB Profile?
This Thursday I'm leaving and will be much less available for the coming four months.
If there's anything you need from me for this, be sure to let me know now while there's still some time left. :whipa

Modernknight1 said he would handle the ModDB aspect of things for us.
 
Well its always a good idea to have more than one ;)

I reckon you, Luke and ModernKnight should all have the ability. For the Build its Pieter, Snow White Sorrow and Me who put stuff on there :yes
 
When was MK last on? i haven't seen him since loging back in after new years.

Originally MK said he would take care of the ModDB aspects, but that was a few day's before he went inactive. When i get some time later tonight i will register on the ModDB site and if Officerpuppy does the same, then together we can figure out how to upload things to the site and get all the work trasported to there aswell.

Oh and i did pass some code that refered to rats eating goods, i can't remember how the code was wrote but it was pointing at how much is eaten, there was no value's otherwise i would have put that into the post aswell, but if its there then the value is somewhere too. After all if you can turn it off then there has to be a value with a switch somewhere, perhaps i missed something in Goods.H, at least thats where i would expect it to be. I have gone through most files using the term Rats and only the files i posted in the above post has any referance to rats. Of course these files are only in programs, i didn't check resources but there could be some value's that might need editing there afterwards yoo.
 
ModDB is very easy to use and you can upload files there from a HTTP link.
So files you upload to the FTP, you can quickly upload there too.
http://www.pyratesahoy.com/coas/

Register as soon as possible, I'd say, and let me know your username there.
Then I'll add you to the PiratesAhoy! group and we can set up your rights to do whatever you need.
 
Thanks for the help guys. After several tests, I can safely say rats only eat perishable items now :onya Plus since I've re-enabled the cat item since it finally works now.

The cat is easier to find the rat totem, but as hard to find as a crystal skull. I think the rat totem has 0.0001 chance of appearing in a store, the cat has 0.001 chance of appearing.

Oh and I also found out that the soldier does appear in a quest, he becomes an officer if you find his weapon. So I tweaked the dialog a bit to reflect his new look.
 
Thats great news Officerpuppy. :will

So you got the cat to work and the rats to eat normal things you would expext to be eaten, because the way it was set up in the vanilla code i'm honestly suprissed you could sail from 1 island to onother with a fully intact ship since thats one of very few things the rats did eat even though they could eat wood, mohogany and sandalwood both was part of the rats diat lol.
 
I'm trying to add an intermediate deck between the main deck and the cabin during boarding, so far it seems to want to appear but my problem is there is no crew left alive to fight in the second location so it automatically skips to cabin to fight the captain of the ship.

I'm guessing there is a second file I have to edit but I don't know where it could be.

So far I've edited the boarding file in the locations, I've added the two new locations I want to appear. I just need to edit something so the game knows not to throw everyone one on the deck but to split them between the two locations, if that makes any sense.
 
I haven't noticed any female characters that you can hire as your officers. They used to be in the taverns but I haven't seen any. Can you do that with our present Mod ver 2 patch 2? :shrug

Do you guy's need help fixing the ship and or character profile pictures because i noticed allot missing or messed up? :sail
 
I haven't noticed any female characters that you can hire as your officers. They used to be in the taverns but I haven't seen any. Can you do that with our present Mod ver 2 patch 2? :shrug

Do you guy's need help fixing the ship and or character profile pictures because i noticed allot missing or messed up? :sail

Code:
  if (GetNewMainCharacterParam("sex_" + n) == "man" && n != startHeroType) // òîêî ìóæèêè
That right there determines the gender of the heros, currently only men in the herodescribe appear in the game. If someone is familiar with coding, what can I put there so that it reads both men and women?

Earlier I replaced man with woman and started the game, I got all female officers showing up so I know this is what determines who appears in the game.

If you go to the shipyard you'll see many ships with messed pictures or no pictures at all, if you can fix that for us Craiggo, it would be very much appreciated :yes
 
Try this:
Code:
  if (GetNewMainCharacterParam(n) != startHeroType) // òîêî ìóæèêè
 
Thanks Capt.! Worked just fine, I had to reload a new game a few times but eventually I saw one of the females in the tavern. :keith

Althougth there might be a slight chance of running into a clone of your character, hasn't happend yet but he shows up in the list of captains in the game. Rather amusing if you could hire yourself as an officer.
 
Status
Not open for further replies.
Back
Top