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

Need Help Enable lower decks during boarding fights

Status
Not open for further replies.

modernknight1

Field Marshall of Hot Tubs
Staff member
Storm Modder
Hello all,

Are there any coder types out there with ideas of how the lower decks can be enabled during boarding in COAS???

This capability exists in POTC and I've seen both screenshots and video of it working in the German Edition and Russian Corsairs mods. So I know it is possible to make it work in COAS and GOF.

I have asked for help before on this problem from these other communities, but have been blown off.

I think the solution is probably very easy to implement, I just don't know where to start looking. I have spent hours comparing code from GOF to the Russian and German mods. I have done searches for abordage deck, abordage location, fight deck, etc... Nothing has stood out to me as different. In the German mod they have a line added to each ship in programs/ships_init that defines which deck, but the line is unused and commented out. That line is not in COAS or GOF.

So I'm begging anyone with any ideas of how to do this to please give me some clues or ideas, so I can bring this wonderful addition to the English speaking fans of COAS. I am willing to trade any of my work for this information.

Thanks! :thumbs1

MK
 
After a boarding you are sent to fight in the cabin. I'd bet that you could add another step in there using similar code. I can take a look around, even though my only experience is in Java. Two people looking is better than one.
 
PC, If you find out how I will finish Module #3 (1735 -1815) in record time. The characters/soldiers/officers are the only things left that I still need to change over to the later era. All the ships and time changes are already done.

start_130206_1042018.JPG

MK
 
Still waiting for a chance to look around. My schedule is interfering again. :modding I will get to it soon, unless some breakthrough is made by someone else first.
 
Still waiting for a chance to look around. My schedule is interfering again. :modding I will get to it soon, unless some breakthrough is made by someone else first.

I think I may be the someone making the breakthrough.

When no one helps me, it doesn't mean I stop looking.

I found this code in Program/Locations/boarding c

There is a whole bunch of code dedicated to "decklow"

LAi_LocationFightDisable(&Locations[n], true); (perhaps it was just disabled - would a "false" change things?)
Locations[n].locators_radius.randitem.randitem1 = 1;
Locations[n].reload.l1.name = "reload1";
Locations[n].reload.l1.go = "My_Deck";
Locations[n].reload.l1.emerge = "reload1";
Locations[n].reload.l1.label = "Deck.";
Locations[n].items.randitem1 = "";

And this...

Locations[n].boarding = "true";
Locations[n].boarding.locatorNum = 11;
Locations[n].boarding.nextdeck = ""; (notice that there is nothing between the quotations. Would a "true" do something?)
Locations[n].UpDeckType = true;

Also in comparing my file to the one in the German Edition, they are identical except everywhere I have "residence", they have "cabine" or "deck"

Locations[n].type = "residence";
Locations[n].boarding = "true";
Locations[n].lockCamAngle = 0.4;
Locations[n].camshuttle = 1;

Going to experiment with this heavily this weekend.

MK
 
If the deck can be installed additionally. Or should the deck be replaced with the old decks MK. The simple question to me would have been enough and I would have done it.
 
Have you made Locations with acquired. Important are the xxxxxxxx_locators.gm
\Age of Pirates 2\RESOURCE\MODELS\Locations\decks\ ...... deckLowVSBig,deckLowVSMedium,deckMediumVSBig
 
No I haven't. Are those in the original German Edition? I will have a look. So if the proper deck models are there, and textures are there, is there any other Program file code changes required besides the Locations/boarding c file? MK
 
Yes MK.

case 7:
iMaxcrew = 24; // 4
break;
case 6:
iMaxcrew = 30; // 5
break;
case 5:
iMaxcrew = 36; // 6
break;
case 4:
iMaxcrew = 42; // 7
break;
case 3:
iMaxcrew = 48; // 8
break;
case 2:
iMaxcrew = 66; // 11
break;
case 1:
iMaxcrew = 78; // 13
break;
 
Thank you Jan,

I will try coding everything in tomorrow. If I get it to work I will give you all my new items for GOF Eras so you can use them in the German Edition if you would like.

MK
 
MK, you should still write the following.


// ändern die Klasse des Schiffes hier
int iMaxcrew = func_min(mclass, eclass); // Klasse 1 - sehr viel 7 - wenige
// JM -> kann bis 2-fach erhöht werden , => entsprechende Lokatoren jetzt vorhanden
switch (iMaxcrew)
{
case 7:
iMaxcrew = 6; // 4
break;
case 6:
iMaxcrew = 8; // 5
break;
case 5:
iMaxcrew = 10; // 6
break;
case 4:
iMaxcrew = 12; // 7
break;
case 3:
iMaxcrew = 14; // 8
break;
case 2:
iMaxcrew = 16; // 11
break;
case 1:
iMaxcrew = 18; // 13
break;

--------------------------------------------------------------------------------------------
We are currently still at MK 4 new decks. But it will still take a while.
 
OK Jan,

I think I have everything I need. However the version of the German Edition (MOTCS) I have, only has three decks shown in boarding.c

It also has no GM files for decks, ships, etc. I don't think this is a problem because I assume they are the same as the ones in PO:TEHO. They are named the same names and I have all of those locator files and GMs.

Last question: where do I post/add the switch that you list above? I thought it would be in Seadogs.c with a bunch of the other switches we've put in over the last couple years, but its not in my version of MOTCS there. Does it go into one of the utils files?

Could you please do me a gigantic favor and post or PM the files to me so I can see how you implemented it? How its properly done.

Thank you so much Jan,

MK
 
That code looks strangely familiar; looks similar to some code in the PotC Build Mod, where it is placed in PROGRAM\Loc_ai\LAi_boarding.c ; you can try looking in there. :doff
 
Any luck with this subject? Years ago I tried to do the same thing for CoAS but failed. At most i'd get the load screen for the new deck but then the game would take me straight to the captains cabin.
 
Any luck with this subject? Years ago I tried to do the same thing for CoAS but failed. At most i'd get the load screen for the new deck but then the game would take me straight to the captains cabin.

I know this. I'm still working on a new version of the Musketeers.
But slowly I got success.

 
I have tried everything. Completely changed the models and locators to those in PO:TEHO or SOFS, using the boarding program files from SOFS. It still doesn't work.

On a good note I've found a bunch of locations from POTC in SOFS and I understand how they work. Gonna try to import San Sebastian.

I am so burnt out from failing with the decks though that I think I need to take a long break from all this. SO FRUSTRATING.

For now - I give up.

MK
 
Sounds like it's time to put the feet up on the railing and watch a pretty sunset.
 
So I did yesterday. Not much going on in my life right now. That will change dramatically in June though. Enjoying my ME time.

I am an absolute glutten for punishment. I spent the whole morning this morning hacking away at this problem even more.

It still doesn't work. I am 90% certain I have all of the new locators and gm files in the right places. I am using the German Edition's boarding.c file in Locations/init

I have reviewed the LAi_Boarding file as Pieter said I should and that's indeed the correct file. The switch is already there. It just has different numbers. I noticed that Jan shows two different switches with different numbers in each, so I'm assuming that there are different switches for each class of ship. I would sure like to see the German Edition file. They don't include all their files in their downloads. Very protective I guess. Don't understand why.

SOFS does it completely different. I have tried numerous methods with no results. I am wondering if there are some old locators and gm files/ or whole deck folders I should be deleting that are getting in the way of the new ones taking hold.

I am just not willing to spend anymore time on this without a clue. Jan offered to code it into GOF himself. I wish he would and release that as a mod for us so we could see how its done. As for me I have allowed this problem to fray my nerves again and my heart is broken.

I want nothing more to do with this game now.

MK
 
Status
Not open for further replies.
Back
Top