• 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've got a new idea...

We need his coding mastery :bow
:rofl

Mastery... Right.
Anyway? What did you think you needed me for, and were you able to figure it out without me? Sadly enough, I read this whole page of the thread and I'm still not entirely sure what you needed me for xD:
I've been feeling a bit better and could see myself doing some work on this, if needed.
 
Welcome back Darkhymn, glad your feeling a bit better mate! FireBat is on vacation at the moment, not sure for how long, but he should be back shortly I think.

Just to sum it up a bit, FB figured out how to get the books to show up in the store as bullets, they wouldn't show as maps for some reason. It might be better if we could figure out how to actually add a new item class to CoAS, instead of having them appear as bullets. I have absolutely no clue how to do that, or even if it can be done. :shrug

I agree with FB, we need your coding mastery! :yes
 
Welcome Back Buddy!

I am back from my vacation now as well. Here the low down. Giving the leadership book the id of the bullets, yet keeping all other fro the leadership book, i got the book to show in store, but of course, when you bought the book, it turned into a bullet added to your inventory, basically resulting in a 1500 gold bullet...xD:

Thats how close I was able to get the book to show...
 
Welcome back FB! I hope ya had a good one! I spent most of my weekend playing Jolly Rover instead of actually doing anything. :wp
 
r6z246.jpg

Here is the last book required... This means that all books are ready to be put in game, we aside from the samll issue of them not showing up in store.

For the time being that is the way it must stay. I have tried everything I can think of to get them to show up.

Once the ftp has been fixed I will make the Complete Sailor Guide To Privateering version 0.9.9 available
 
You can still attach files to forum posts, right? Or is it too large for that?
You could also upload it to the ModDB, though it'd take a while to show up there. :facepalm
 
At over 30mb it is much too large to attach directly to the forums. However, I do use a file sharing outlet called mediafire.com and it seems to work just fine.

So with no further ado...The Complete Sailors Guide to Privateering v0.9.9


I will be officially releasing CSGtP v0.9.9 in the mods forum either today or tommorrow. It is being released as a 0.9.9 as the books will not show in store for whatever reason, regardless of hours upon hours of attempting to do so.

Special Thanks goes out to all who contributed to this project. Thargarr, Pieter, ModernKnight, and especially Darkhymn, without all of you, this would never have come to light.
 
Looks good FB! Thanks for picking up my slack, sorry my creativity failed on that last one mate. I have a vacation of my own coming up in a couple of weeks, I should have a lot more free time to try and delve into the code a bit. Not sure how much help I will be, but I'll give it a try, that is if Darkhymn hasn't got it all figured out by then. There has got to be a way to add new item classes somehow! :modding
 
I'll take a good hard look at it all and see if I can't come up with something. If it comes down to adding a new item class... I'll give it a shot. First thing's first, I need to install everything again (recently formatted my boot drive). Once that's done, I'll try to find some time to buckle down and finish this. I suggest that for the beta release we make all books lootable, that way they will all be obtainable until we get them into the stores. This will also serve to let us know how people feel about them as loot and we can decide if we want them to stay that way based on the feelings of the players, etc. Try to see this as an opportunity, not a setback :p
 
aw crud. I knew I had forgotten to do something. :facepalm
I had wanted to make all of the books lootable, of course, reflecting what level the character is.

In light of this stupid oversight, I will not release the mod until this much is fixed. Before I do that, we should discuss how rare this books should be, and when they should be made available to the character.

While tier 1 books are found with no limitation on character level, Tier 1 books have a rariety of 0.01 to 0.03

As the mod stands now, Tier 2 books are available for purchase at level 5. They have a rariety factor of 0.005. Tier 3 books are available for purchase at level 10 and have a rariety factor 0.0003 The weapons manuals (the books that offer stat increases to multiple skills) Are available at level 15 and have a rariety factor of 0.0002

The way i see it all of these attributes need to be increased slightly. I think that while tier 1 can remain as it is, tier 2 and 3's values need to be increased. So Tier 2 will be available at level 10 Tier 3 available at 15 and manuals at 20. I propose the rariety gets increased as well. I figure that they need to be about twice as rare.

Of course, these are just suggestions...let me know how you feel about all this :))
 
You won't get any truly good values that you're happy with until some VERY extensive testing is done.
My recommendation: Come up with values that seem more-or-less right, let people play with it, then see if it needs any adjustment still. :shrug
 
You are correct. I will make the necessary adjustments, and release the mod. Perhaps in the meantime while testing is going on we can figure out why the darn books wont show up in stores...................................:facepalm
 
Which is particularly frustrating because, as far as I can tell, there is absolutely nothing stopping them from showing up... It has to have something to do with the map item type...It's the only explanation that makes sense when we apply all applicable data (such as your bullet test). I'm going to look around for references to the map item type and see if there is something I've missed that I need to add them to on that front. I really don't want to think about adding a new item type until I've exhausted my other options because I'm quite lazy and it seems like a lot of effort xD:
 
Perhaps a new item type does not need to be added, maybe they just have to be added to an already exsisting item type, such as the Support item type. I'm not sure.
 
Do I understand correctly that if you make the books NOT of the "map" item type, but of the regular item type, that they DO show up in stores?
 
Holy ****! I think I just found out why this whole thing is not working for you.
The function that is used to put items at the traders is GiveItemToTrader and is called in PROGRAM\DIALOGS\russian\Common_ItemTrader.c:
Code:
		case "Trade_exit":
if (CheckNPCQuestDate(npchar, "Item_date"))
{
SetNPCQuestDate(npchar, "Item_date");
GiveItemToTrader(npchar);
}
NextDiag.CurrentNode = NextDiag.TempNode;
DialogExit();
LaunchItemsTrade(npchar);
break;
The function itself can be found in PROGRAM\scripts\utils.c .
Looking at that function, I am again stunned (and NOT impressed) by the simplicity of the CoAS code.
Rather than taking the items array and selecting the items to place at the traders based on rarity values and minlevels and such,
the code for placing items at the traders is ALL FULLY THERE! It seems that the initItems.c values are NOT used AT ALL!
Look at this!!!
Code:
void GiveItemToTrader(aref ch)
{
// PB: SOME CODE TRUNCATED

int irand;

DeleteAttribute(ch, "items");

// PB: SOME CODE TRUNCATED

// boal 270904 êàðòû -->
irand = rand(9);
if (irand == 1) { TakeNItems(ch,"map_bad", 1);}
irand = rand(16);
if (irand == 1 && makeint(pchar.rank) >=3) { TakeNItems(ch,"map_normal", 1);}

irand = rand(19);
if (irand == 2) {TakeNItems(ch,"map_jam", 1);}
irand = rand(39);
if (irand == 2) {TakeNItems(ch,"map_cayman", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"map_barbados", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"map_trinidad", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"map_Curacao", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"map_martiniqua", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"map_dominica", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"map_puerto", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"map_cuba", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"map_hisp", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"map_nevis", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"map_guad", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"map_antigua", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"map_TORTUGA", 1);}
irand = rand(39);
if (irand == 2) {TakeNItems(ch,"map_terks", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"map_sm", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"map_bermudas", 1);}
irand = rand(39);
if (irand == 2) {TakeNItems(ch,"map_Pearl", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"map_beliz", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"map_santa", 1);}
irand = rand(39);
if (irand == 2) {TakeNItems(ch,"map_maine_1", 1);}
irand = rand(39);
if (irand == 2) {TakeNItems(ch,"map_maine_2", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"map_panama", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"map_maracaibo", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"map_cumana", 1);}
// boal 270904 êàðòû <--

// PB: SOME CODE TRUNCATED
}
It appears that the solution to your problem would be to simply stick your new items in there.
 
I'm so sorry Pieter...but we tried that already as well.
Code:
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_bookleader_1", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_booklight_1", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_bookfencing_1", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_bookheavy_1", 1);}

irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_bookleader_2", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_booklight_2", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_bookfencing_2", 1);}

irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_bookheavy_2", 1);}

irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_bookleader_3", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_booklight_3", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_bookfencing_3", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_bookheavy_3", 1);}

irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_bookpistols_1", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_bookluck_1", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_bookstealth_1", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_booknavigation_1", 1);}

irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_bookpistols_2", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_bookluck_2", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_bookstealth_2", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_booknavigation_2", 1);}

irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_bookpistols_3", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_bookluck_3", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_bookstealth_3", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_booknavigation_3", 1);}

irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_bookaccurate_1", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_bookcannon_1", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_bookgrapple_1", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_bookdefend_1", 1);}

irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_bookaccurate_2", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_bookcannon_2", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_bookgrapple_2", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_bookdefend_2", 1);}

irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_bookaccurate_3", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_bookcannon_3", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_bookgrapple_3", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_bookdefend_3", 1);}

irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_bookrepairs_1", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_bookmoney_1", 1);}

irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_bookrepairs_2", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_bookmoney_2", 1);}

irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_bookrepairs_3", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_bookmoney_3", 1);}

irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_bookwrestling", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_booklgtweapman", 1);}

irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_bookmedweapman", 1);}
irand = rand(19);
if (irand == 2) {TakeNItems(ch,"itmname_bookheavweapman", 1);}

That much is already in the mod already...this is why Darkhymn and I are :modding cause by all rights it should be FREAKIN!!! working... (i'm going to cry I swear.)
 
What's that "itmname_" doing in all those lines? Try removing that and see what gives.
 
fdai5i.jpg


PIETER! I could kiss you...ya know, if i was that sorta guy...would you settle for a handshake?

Thanks a lot mate! Now all there is do is to get the books to show in store at the right levels...and all that means, is that i have to undo all the work from before...and this puppy will be ready to be sent out officially.

Thanks again mate!
 
You're welcome, mate. Glad to hear you got it sorted. :doff

If you can find anybody capable of doing it, I reckon it'd be VERY worthwhile
to recode that whole friggin' function into something a bit more sophisticated.
You might be able to get some inspiration from the PotC Build Mod function, though that does look ever so slightly complex.

In any case, it'd be good if the whole thing was handled based fully on initItems.c
and you wouldn't need to edit any other files if ever adding more items into the game.
 
Back
Top