• 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!

I need a bit of help

FireBat

Landlubber
Storm Modder
Pirate Legend
Hi!

I've been working on adding copper to the items in the default inventory. When making this mod, I adjusted the same files as done in the livestock mod in the same manner. I made copies of the COAS cmv2 files required as shown in the livestock mod, and added the necessary lines of code, description of copper, and neato icon :) and everything that needed to be adjusted as shown in the livestock mod.

My problem seems to be happening when i try to adjust "#define GOODS_QUANTITY 62 // boal" from 62 to 63 and i have added "#define GOOD_COPPER 62" to the bottom of the list. When i do this and load the game, the inventory list in the store shows up as blank. (the same occurs in the cannon purchase list at the shipyard)

I then tried re-organizing the list so that "#define GOOD_COPPER 35" and the following goods afterwards were just cannons numbered 36-62. I had the same results.

Figuring that I screwed up some place, I put the default files back, checked to see if the store inventory showed again (it did) and installed the livestock mod. The above problem came back :(

(I should mention that tho the store goods list, and shipyard cannon list appear blank, the goods on my ship are still there when i check the inventory onboard. However there are no item icons. When checking the Trade Catelog in the 'F2' menu, my item is not seen in any catelog, but there is a blank space at the bottom of the inventory list)

I have a feeling that there is a missing file somewhere that needs to know of the adjusting inventory size, but after about 3 hours of going through all the files i could think of, Im giving up and asking for help (again)

I figure that once i can get the first item added properly, the rest wont be a problem. Once this is figured out I am planning on adding to the trade goods list:

Hemp
Molasses
Salt
Timber
Dyes
Tools
Fish
Iron
Fashionable Clothing
Furs/pelts
(Along with Tea and Livestock from the mod I have been learning from)

If this is something that I can do, then I would love to be the one to do it. This seems to be fairly simple stuff, and if I could do it, then that would mean more time to do the more difficult task for you accomplished modders.

Thank you for your time and help

FB
(A big thanks to OfficerPuppy for the livestock mod!!!!)
 
After you have added the goods are you renumbering all goods bellow the new good?

I'm sure any goods need to be placed above the cannon/caluverine section aswell, so after adding the new goods you will have to renumber all those calibures. :onya
 
After you have added the goods are you renumbering all goods bellow the new good?

I'm sure any goods need to be placed above the cannon/caluverine section aswell, so after adding the new goods you will have to renumber all those calibures. :onya

I tried that as well, and stil, it had the same effect. I stated that in the above mess.
I then tried re-organizing the list so that "#define GOOD_COPPER 35" and the following goods afterwards were just cannons numbered 36-62. I had the same results.
(im not really good at paragraph structure...sorry for that)
 
As i work on this mod, I realise that the only way to find out if this file truly works is for someone else to try it out. As i do not have access to CM v3, and my mod is based off code that is cm V3 based.

Please give my mod a shot, look over the code, see if there is anything wrong with it...and dont forget to back up the original files...

Please help me as I am desperate to make this work
 
I'll give it a try but tomorow since here it's 1:33 AM and my eyes are closing by themselves.
Don't worry Firebat, in coding, everything is logical and everything makes sense.
You'll finish your mod sooner or later, just don't give up :onya

Farewell for today though, I'll look into your mod tomorow, I hope I'll find something you can use :doff
 
As i work on this mod, I realise that the only way to find out if this file truly works is for someone else to try it out. As i do not have access to CM v3, and my mod is based off code that is cm V3 based.

Please give my mod a shot, look over the code, see if there is anything wrong with it...and dont forget to back up the original files...

Please help me as I am desperate to make this work

There is no CMV3 code i can see in there. Although when CMV3 is released you'll have to re-edit it into CMV3 because there are a few changes in some of those files.

In initGoods you have put the added good bellow the cannon section which might not effect game play but it would make things confussing for other's adding new goods over this file at a later date. I can't see any other problems but where did you get the picture from? you haven';t included any file for its image and from what i can see you haven't used the image from another good type.
 
As i work on this mod, I realise that the only way to find out if this file truly works is for someone else to try it out. As i do not have access to CM v3, and my mod is based off code that is cm V3 based.

Please give my mod a shot, look over the code, see if there is anything wrong with it...and dont forget to back up the original files...

Please help me as I am desperate to make this work

There is no CMV3 code i can see in there. Although when CMV3 is released you'll have to re-edit it into CMV3 because there are a few changes in some of those files.

In initGoods you have put the added good bellow the cannon section which might not effect game play but it would make things confussing for other's adding new goods over this file at a later date. I can't see any other problems but where did you get the picture from? you haven';t included any file for its image and from what i can see you haven't used the image from another good type.

23vyd0n.jpg

This is an image of my problem


I found a picture that was taken of copper ( http://4.bp.blogspot.com/_sW65ilskOC8/SsefxmRYRSI/AAAAAAAAayE/3O0eShqUIo8/s400/Copper.jpg ) then with photoshop removed the background and recoloured with photoshop. It is a temporary solution, as my next plan is to take the gold or silver ignot item and recolour it and use that as the copper.

Yes in the livestock mod, there are more cannon types. We go from 62 items to 71....
So what yer saying is that its the image that's causing the problem?

I am still at a loss
( i have re-organized all the lists, changed the grid location slightly in the pictures config file. Btw, I am having the same problem when trying to use the livestock mod...)
(further note: I am wondering if I used the wrong settings when converting goods.tga.tx from a tga to a tga.tx....what settings are we supposed to use?)
(I've also fixed the description as there was a } missing at the bottom of the copper desc.)

In my original post i stated "the goods on my ship are still there when i check the inventory onboard. However there are no item icons"
It seems i have half-assed fixed that problem...but as you can see I am not using the tx converter properly. The icons should be without the black squares no?
2rwstop.jpg



I dont think that the tx converter is the root of my problem....tho i could be wrong

(i should have named this to "I need more than just a bit of help...lol")



245c9id.jpg



This is the trade catelog....note the blank space at the bottom....HELP?!?!
 
I'm not sure if its the picture but i do think its something to do with another file that needs editing. OP has added alot in this area so he'll be the best to ask. The cannons are only in Goods.H and Goods_init so i don't know about adding goods sorry bud. :onya
 
Ya, I'm hoping that OP will give me a hand. I suspected that a file is missing that needs to be edited, but i cant figure out which one it might be. I am giving up for the meantime, cause I have tried everything i can think of.
 
Ok, So i have decided to hang this one up for good. Seeing as there is a trade mod being released for cm v3, all i was doing was wasting everyones time. As is sometimes the case, I can get quite over-zealous, and not think of the big picture. I appologize to you folks, and to Officerpuppy as well, for bombarding you all with irrelavent questions that he has already solved in the next release.

My apologies

FB
 
If it uses CMv3 code then use the program WinMerge to compare the original file with the CMv3 file and see what is the stuff you want to keep and the stuff that is v3 code that is not used by your mod :shrug
 
If it uses CMv3 code then use the program WinMerge to compare the original file with the CMv3 file and see what is the stuff you want to keep and the stuff that is v3 code that is not used by your mod :shrug

That wasnt really the problem...It was that I didnt know how to increase the number of in the line '#define GOODS_QUANTITY ' without the goodlist in the store and cannon buying thingy going completly blank.

No matter...I have stopped working at this endevor. The only thing I couldnt let go to waste were the new trade icons. I will pass them over to OP and perhaps he can use them ( http://www.mediafire.com/?ityi5dnm2ld )

I am going to work at what i do best and that is to provide ideas, research, and possibly retexturing, if I can find something worth retexturing.
 
The reason for the black pictures surrounding the icons is because you are missing the alpha file.

Get the original goods.tga.tx, convert it to tga, then open it with photoshop if you have it. Copy the alpha to your new goods file. Then you'll have to creat new images for the items you created, this is the tricky part.
 
thanks for that...I will give it a shot..

That little issue could be over looked (or worked around..i could grab the POTC icons) if I could actually get the store's good's list to materialize...

23vyd0n.jpg


^^^^^^^^^This is the real problem^^^^^^^
 
Init goods, this line of code is bellow the cannons.

Code:
Goods[GOOD_COPPER].Name		    = "Copper";
Goods[GOOD_COPPER].Weight	    = 1;
Goods[GOOD_COPPER].Cost	        = 120;
Goods[GOOD_COPPER].Units	    = 1;
Goods[GOOD_COPPER].AfraidWater = 0;
Goods[GOOD_COPPER].canbecontraband	= 0;
}

It should be above the cannons and bellow the other goods listings.

In Common config file this line of code is missing a part.

Code:
string = Coppermines, "Copper mines"

Its missing this line of code.
Code:
Acc

The code should look as follows.

Code:
string = CopperminesAcc, "Copper mines"

Thats all i can see OP is better in this area so he might find other problems. :onya
 
Ooops, I guess I should have uploaded the latest files...I accidently uploaded the second try by mistake....I'm on the 4th now. In the 4th I had fixed the above problems...still to no avail.

Here is my latest attempt


russian/common.config there is a line as follows

Code:
string = cannons1,"Copper"
string = cannons2,"Bronze"
string = cannons3,"Cast iron"

I understand that this probably remanents from the old potc code, but I wonder if this could be causing problems as well...
(Scratch that, I tried pulling those lines out and it didnt help)
 
Thanks to the patience of OfficerPuppy, the goods list problem has been fixed! Now, in the effort to move forward, I am working on a trade mod that will add about 20 more items to the trade list...


THANK YOU OP FOR ALL YOUR HELP!!!!!
 
in a nut shell
Code:
#define GOODS_QUANTITY  63 // 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
#define GOOD_COPPER 62
// boal <--

an image of a tiny amount of success

2e6bts4.jpg
 
Back
Top