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

42 is the answer.

Ah yes, that's the easy one, but what is the question? ;)

Great try anyway mate! Maybe once we really start working on the source code we will be able to figure this one out. 42 is plenty of work for us for now anyway.
 
Mates, I've posted a couple times in the past how much I'd love to see navigation instruments added in COAS CM mods. We could not only have the basic navigation learners guide, but also a several types of sextants from outdated astrolabes to newer fair to really fine ones. Also as Pieter was saying we could have Almanacs and charts. We could have some that are older and less accurate and some that are very advanced/recent. I suggest against having a marine chronometer however. No accurate marine chronometers were produced until well after the age of piracy was at an end (1780s).
In PotC we've got a mod that shows your ship's position on the Archipelago map in your inventory. However, we made it so it will only work if you've got a sextant and chronometer. This to simulate celestial navigation.

Latitude could be accounted for very accurately with celestial readings, but longitude was for the most part guesswork based on a good Almanac, and MOSTLY the Navigators experience with tides, currents, prevailing winds and observable landmass points of reference once you were close enough to see them. Historically longitude was such a problem that many ships were lost due to errors. Several governments (mainly the Dutch and English) offerred substatial rewards/prizes to the person who could solve the longitude problem as far back as the 1670s/80s. After the loss of an entire squadron of large Man o War with nearly all hands lost including a couple high born notables off the Scilly Isles, the British Crown raised the prize to 20,000 pounds (equivalent to about 5 million modern dollars now). John Harrison was the man that finally solved the problem and is considered one of the 50 greatest Englishmen in history for the contribution. If interested pick up Davia Sobel's book "Longitude". It's an excellent read.
The short TV series is good as well. :yes

Mix your and Pieter's knowledge with Thagarr's sense of ridiculous humor and we've got a recipe for gold!
My main knowledge is present-day navigation, so the navigation books I could help with, but the rest not so much... :shrug
 
they cant be re-inited into exsistnace
Why not? I'm pretty sure in PotC we can Reinit items into existance...

Well it seem s that my creativity is only surpassed by my incopetance. After finishing the designs for the new books, and writing out the titles and descriptions, my attention turned to coding them. I figure the problem is the fact that there is no item that increases the PIRATES/SPECIAL attributes. They all influence the self or ship skills. Of course, without an example to work off of, my coding skills are inadequate
You'd need to find where these attributes are stored. For example, regular skills are stored in [char].skill.[skillname] ; there has to be something similar for PIRATES attributes and, if so, you can change them.
 
they cant be re-inited into exsistnace
Why not? I'm pretty sure in PotC we can Reinit items into existance...
Trust me, I pounded on that re-init button, but the books never materialize (i know this as I used the beta testing mode and looked in the store)

Well it seem s that my creativity is only surpassed by my incopetance. After finishing the designs for the new books, and writing out the titles and descriptions, my attention turned to coding them. I figure the problem is the fact that there is no item that increases the PIRATES/SPECIAL attributes. They all influence the self or ship skills. Of course, without an example to work off of, my coding skills are inadequate
You'd need to find where these attributes are stored. For example, regular skills are stored in [char].skill.[skillname] ; there has to be something similar for PIRATES attributes and, if so, you can change them.

There is something similar for PIRATES attributes, instead they are refered to SPECIAL (Strength, Preception, Agility, Charisma, Intellect, Constitution, Luck) Hoever when we attempt to create a book that increases the stats of these attributes, it results in a game breaking issue. Its no suprise that i can't do it, but if Darkhymn cant du it, then, for the time being, it can't be done...xD:

Further down the line perhaps I can set it up to be triggered by 'reading' a book. Pieter posted some code earlier in the thread that may be applicable. I see what you're referring to in that thread, but that simply sets how many distributable attribute points you have. Thanks for the input, though.

I can't do it. There is no defined function for adding attributes via items, and my attempts to define one myself have been woefully inadequate. Looks like for now we're sticking with 42. I should have expected this from the start. 42 is the answer.

42 is plenty. 42 is more stats increasing items that what we had before, and seeing as there never were items that increased the pirates skills, there is no loss in not being able to code them. If the need arises they can be coded later.

However, I think we should bring the number up to 46. What we don't have are book that influence multiple skills. The examples that ModernKnight provided are perfect. I will 'draw' up some covers for these, and see if I can code them. (come on, i should be able to code SOMETHING!) For the covers, I may use the pictures that MK provided just for authenticity.
 
Look what I just found:
Code:
void SetSPECIAL(ref _refCharacter, int _s, int _p, int _e, int _c, int _i, int _a, int _l)
{
_refCharacter.SPECIAL.Strength   = _s;
_refCharacter.SPECIAL.Perception = _p;
_refCharacter.SPECIAL.Endurance  = _e;
_refCharacter.SPECIAL.Charisma   = _c;
_refCharacter.SPECIAL.Intellect  = _i;
_refCharacter.SPECIAL.Agility    = _a;
_refCharacter.SPECIAL.Luck       = _l;
}
Try to use the console to execute this:
Code:
void ExecuteConsole()
{
ref pchar = GetMainCharacter();
pchar.SPECIAL.Strength = pchar.SPECIAL.Strength + 1;
}
This should make the player's Strength value increase by 1.
 
Here's a rewritten SetCharacterSkillByItem to use for setting SPECIAL values instead:
Code:
// PB -->
int SetCharacterSpecialByItem(ref _refCharacter, string _specialName, string _itemSpecialName, string _item, int _addValue)
{
if (_specialName == _itemSpecialName && GetCharacterItem(_refCharacter, _item)>0)
{
return _addValue;
}
return 0;
}
// PB <--
Add this function to PROGRAM\Characters\RPGUtilite.c .
You'd then need to add the code usage for this in this function:
Code:
// ñ ïåíàëüòè è âåùàìè +1
int GetCharacterSPECIAL(ref _refCharacter, string skillName)
{
int skillN;

skillN = GetCharacterSPECIALSimple(_refCharacter, skillName);

skillN = ApplayNavyPenalty(_refCharacter, skillName, skillN);

return skillN;
}
It might look something like this:
Code:
// ñ ïåíàëüòè è âåùàìè +1
int GetCharacterSPECIAL(ref _refCharacter, string skillName)
{
int skillN;

skillN = GetCharacterSPECIALSimple(_refCharacter, skillName);

skillN = ApplayNavyPenalty(_refCharacter, skillName, skillN);

// itmname_bookpower_1
skillN = skillN + SetCharacterSpecialByItem(_refCharacter, skillName, SPECIAL_S, "bookpower_1", 1);

return skillN;
}
From PROGRAM\Characters\characters.c, these are the code names for the SPECIAL settings that you can use:
Code:
#define SPECIAL_S	"Strength"   //15
#define SPECIAL_P	"Perception"
#define SPECIAL_E	"Endurance"
#define SPECIAL_C	"Charisma"
#define SPECIAL_I	"Intellect"
#define SPECIAL_A	"Agility"
#define SPECIAL_L	"Luck"  //21
Although I reckon that the above should work, I didn't test it and I am not particularly familiar with CoAS in the first place. But hopefully it'll jump-start your efforts in achieving your mod. :onya
 
Look what I just found:
Code:
void SetSPECIAL(ref _refCharacter, int _s, int _p, int _e, int _c, int _i, int _a, int _l)
{
_refCharacter.SPECIAL.Strength   = _s;
_refCharacter.SPECIAL.Perception = _p;
_refCharacter.SPECIAL.Endurance  = _e;
_refCharacter.SPECIAL.Charisma   = _c;
_refCharacter.SPECIAL.Intellect  = _i;
_refCharacter.SPECIAL.Agility    = _a;
_refCharacter.SPECIAL.Luck       = _l;
}
Try to use the console to execute this:
Code:
void ExecuteConsole()
{
ref pchar = GetMainCharacter();
pchar.SPECIAL.Strength = pchar.SPECIAL.Strength + 1;
}
This should make the player's Strength value increase by 1.

The Console hasn't been uploaded yet, i will pass it on to them. :onya
 
You should add the console in whatever next release you were planning on. :yes
 
That will be patch 2, but if its going to help these guy's get there work done faster than giving it to them now will benifit the second patch otherwise there work would have to be released in a third patch or have the second patch updated to include changes made by the work these projects these guy's was working on.

Console.C
 
That code that you provided us with looks like it might work with some tweaking, however, i cannot see where the tweaking is required. I tried implementing directly as you wrote it, yet it also ended up with a broken game.
 
Do you have error logging enabled? Error.log might explain what's wrong. This is what we do in PotC to enable error logging and I reckon something similar should work in CoAS too:
- Open "engine.ini" in your main game folder.
- Find the "debuginfo = 0" line and change it to "debuginfo = 1".
- Find the "runtimelog = 0" line and change it to "runtimelog = 1".
- Find the "tracefilesoff = 1" line and change it to "tracefilesoff = 0".
- Start the game and wait until the error occurs.
- Now find compile.log, system.log and the possible error.log in your main game folder.
It should look like this:
Code:
tracefilesoff = 0
[script]
debuginfo = 1
codefiles = 0
runtimelog = 1
It could be that I made some mistakes in there somewhere. As I said, I didn't test. :facepalm
 
from error log
Code:
COMPILE ERROR - file: characters\RPGUtilite.c; line: 950
Duplicate variable name: _refCharacter

From system log
Code:
Scanning modules\
Loading modules...
Loaded 45
Reset...
Initializing CORE...
Creating atoms space: 128
done
initializing complete
User Rised Exception
.\Sources\Core.cpp line 603
fail to create program

there was no compile log... I'll take a peek at the rpgutile and see if i can iron out that bugger

Edit:
line 950 is where this starts
Code:
// PB -->
int SetCharacterSpecialByItem(ref _refCharacter, string _specialName, string _itemSpecialName, string _item, int _addValue)
{
if (_specialName == _itemSpecialName && GetCharacterItem(_refCharacter, _item)>0)
{
return _addValue;
}
return 0;
}
// PB <

I HAVE NO CLUE WHAT I AM LOOKING AT!!!! xD:
 
Duplicate variable name? That definitly shouldn't be happening.
Are you sure that you added that code in the right spots?
Could you post your characters\RPGUtilite.c and I'll add my code myself and reupload.

I do have the CoAS files, but can't run it because it's technically not installed and I don't actually have the game's CDs/DVDs either. I also don't have any of the Combined Modpacks installed, if I recall, unless I've got the old v1.8 one. Don't remember.
 
It is most likely the fact that i am not adding the code in the right spot. I will post the file here.
 

Attachments

  • RPGUtilite.c
    73.5 KB · Views: 133
Please try this one and see what happens.
If this works, I recommend you use WinMerge to compare my version with yours.
That should help you to understand what I did.
 
Edit: Well I'll be a monkey's uncle. I had one line of code out of place the whole damn time and that made all the difference. Thanks for the assist, Pieter!
 
Well, the game didnt crash and a nifty (+1) showed up beside the Power stat. So immediatly i thought it worked. However, I thought i would check to see if other stats changed in light of the bonus being added, and to my dismay, they were not

oiu1xj.jpg


dddyfd.jpg


The only increase in stats is the trade, and thats because I bought such an expensive item
 
Didn't effect mine, either. It may be that because the stat boost comes from an item, it doesn't register with the game as permanent. I bet it would effect the speed of skill increase still, but that's hardly worth the effort of coding the books in xD:
 
Definetly. It was a valient effort all the same. I think it would be best just to finish up the 4 last books that Modern Knight put together and call it done (well, then there is still the matter of making the 2 pages for each book of course.

:wp

I do have one last idea up my sleeve however. [sub](dont kill me)[/sub] Why not make the PIRATES books affect each skill that a boost to the PIRATES attributes would. So instead of a boost to "p" the bonus would be given to life points and weight that can be carried.

Just a thought...a passing one...don't even pay attention....move along...forget i said it...dont hurt me :woot
 
Definetly. It was a valient effort all the same. I think it would be best just to finish up the 4 last books that Modern Knight put together and call it done (well, then there is still the matter of making the 2 pages for each book of course.

:wp

I do have one last idea up my sleeve however. [sub](dont kill me)[/sub] Why not make the PIRATES books affect each skill that a boost to the PIRATES attributes would. So instead of a boost to "p" the bonus would be given to life points and weight that can be carried.

Just a thought...a passing one...don't even pay attention....move along...forget i said it...dont hurt me :woot

Not a terrible idea. I'm not exactly sure if / how weight and life points can be modified, mostly because I hadn't thought about it, but I'll give it a look during my next loot rate rebalance (next time I have code::blocks running, basically). Take into consideration that Power also effects Heavy Weapons, Medium Weapons, and Cannons to varying degrees. It may be difficult to justify one book modifying so many differing skills. The same is true of the other attributes.
 
Back
Top