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

Devlin Opera for the 65742th time

I have finished your questline to where it ends so far, there are two more little details (screenshots attached) First you might want to disable enterance to the jungle where you are supposed to talk trough the door and let the guy in using a key later, as it doesn't make much sense for it to be open in this situation ;)
But that's exactly what happens. In case "Sailor_search_start", both jungle gates (town and port) are closed and the church opened. You get the key from Chorizo, and then when you let Ricardo in, the gate stays open. Church and jungle gate (town) are switched back in "Beatrice_returns_Santiago".

Stupid error file could at least point me to the right line of code. :modding Thanks.
 
But that's exactly what happens. In case "Sailor_search_start", both jungle gates (town and port) are closed and the church opened. You get the key from Chorizo, and then when you let Ricardo in, the gate stays open. Church and jungle gate (town) are switched back in "Beatrice_returns_Santiago".

Stupid error file could at least point me to the right line of code. :modding Thanks.

Then this is odd...
 

Attachments

  • odd.png
    odd.png
    1.6 MB · Views: 77
  • 2.png
    2.png
    1.4 MB · Views: 85
  • 3.png
    3.png
    1.3 MB · Views: 75
@Grey Roger can you help me out again with the "AnimistEdmundo" model? I had one of the following two lines, which didn't do anything. Then I added the other one, but forgot the first one in the code and also forgot which one is which. Right now, this idiot Balboa simply becomes completely invisible when he's supposed to put on the cloak. o_O

Code:
            SetModelfromID(CharacterFromID("Rocoso Balboa"), "AnimistEdmundo");
                        SetModelfromArray(CharacterFromID("Rocoso Balboa"), GetModelIndex("AnimistEdmundo"));
This is odd. I recently tried to improve brothels by making the mistress more easily identifiable. There's a section in "LEnc_monsters.c" which checks if the brothel has a mistress assigned and if not, changes the first inhabitant to be her. So I tried putting a 'SetModelFromID' in there to give her a different model to the rest of the inhabitants and got the same result - she became invisible. (I also tried using the basic 'SetModel', which did the same, not surprising as 'SetModelFromID' just checks that the model is valid and then calls 'SetModelFromArray', which in turn calls 'SetModel' and fills in the arguments with values from the model chosen.)

And yet 'SetModelFromID' works perfectly in other situations. I tried the 'Kapitein of Kralendijk' sidequest in which you get a guard falling down drunk and then steal his uniform:
Code:
SetModelfromID(CharacterFromID("Drunken soldier"), "man5");
The drunk guard appeared in uniform, the quest case to steal the uniform happened, and the guard duly changed to the model without the uniform - he didn't simply vanish. Also, in "Ardent" 'SetModelfromArray' is used to do exactly what you're trying to do, change someone into "AnimistEdmundo" or "AnimistLucia" depending on which Ardent you are.

Can you upload your latest version of "quests_reaction.c" so I can see what's supposed to happen? It will be a while before I get round to playing it because I'm currently trying the extended "Hoist the Colours", but I should be able to check the code for changing Rocoso's model.
 
@Grey Roger there's so much going on in this thread right now and so many things don't work and then are resolved one way or another, I barely get to comment and explain everything in full. Plus during the day I only am able to answer things quickly from the office without access to the code. But right now it seems to be like this:

Code:
SetModel(characterFromID("Rocoso Balboa"), "AnimistEdmundo", "man", "man", 1.8, false);

as suggested by @Jack Rackham above, does work the way I wanted and changes the model. But both

Code:
SetModelfromID(CharacterFromID("Rocoso Balboa"), "AnimistEdmundo");

AND

SetModelfromArray(CharacterFromID("Rocoso Balboa"), GetModelIndex("AnimistEdmundo"));

didn't work. Even though I used one of those two lines. There are other things I don't quite understand, for example an ActorDialog to the player, initiated by an NPC, often doesn't work unless I make two quest cases, the first containing ActorWaitDialog and ActorFollow, the second containing ActorDialog.:shrug

The smartest way to do things would probably be: I guess it takes a week to ten days to roughly finish the Santiago chapter. This still requires Blaze's variation of the quest, which should be the simplest and most straightforward of the three, and a "debriefing" scene in the quest cabin similar to the one on Martinica. Then the story wouldn't end somewhere randomly but a whole chapter would be closed. So we could do a whole separate phase of ironing out details, figuring out eventualities etc. after that. @Sebrian for example already has that weird issue with the town gate. Maybe you'll then have less to do with "Hoist the Colours" and conversely, I'd have to time to play that one myself, or at least the new section (even though I'm also replaying Ardent at the moment as an alternative to coding Devlin). Then you'd have everything I did instead of me uploading snippets of the code every day.
 
Last edited:
@Grey Roger there's so much going on in this thread right now and so many things don't work and then are resolved one way or another, I barely get to comment and explain everything in full. Plus during the day I only am able to answer things quickly from the office without access to the code. But right now it seems to be like this:

Code:
SetModel(characterFromID("Rocoso Balboa"), "AnimistEdmundo", "man", "man", 1.8, false);

as suggested by @Jack Rackham above, does work the way I wanted and changes the model.
I wonder if that 'false' in the last argument is what is making the difference? Here's what 'SetModelFromArray' does:
Code:
void SetModelfromArray(ref refCharacter, int idx)
{
    ref Model = GetModel(idx);
    //DebugLog("SetModel : " + Models[idx].model);
    SetModel(refCharacter, Model.id, Model.ani, Model.sex, stf(Model.height), FindLoadedLocation() != -1); // Nk do bool this way 05-05-01
}
The last bit is true if you're in a valid location, which you probably are.

There are other things I don't quite understand, for example an ActorDialog to the player, initiated by an NPC, often doesn't work unless I make two quest cases, the first containing ActorWaitDialog and ActorFollow, the second containing ActorDialog.
The 'LAi_ActorFollow' line probably needs to be in a separate quest case. Look at "Tales of a Sea Hawk", quest case "Story_First_Meeting_with_Rheims":
Code:
        case "Story_First_Meeting_with_Rheims":
            pchar.quest.first_time_to_redmond_townhall.over = "yes";
            LAi_SetActorType(Pchar);
            LAi_SetActorType(characterFromID("Raoul Rheims"));
            //Âûñòàâëåíèå Ðåéìñó íóæíîé íîäû
            Characters[GetCharacterIndex("Raoul Rheims")].Dialog.CurrentNode = "First_meeting";
            LAi_ActorFollow(pchar, characterFromID("Raoul Rheims"), "", 1.0);
            LAi_ActorFollow(characterFromID("Raoul Rheims"), pchar, "Story_First_Meeting_with_Rheims_2", 1.0);
        break;
The player is in actor mode, which is the only reason I'd use 'LAi_ActorFollow' and 'LAi_ActorWaitDialog' - to nail the player down so he can't wander off or draw a weapon while the NPC is trying to talk. So, this is the first time you're in Silehard's residence, Rheims is just on his way out and introduces himself to you. Under computer control, Rheims and the player walk to each other, and when Rheims gets close enough, case "Story_First_Meeting_with_Rheims_2" triggers:
Code:
        case "Story_First_Meeting_with_Rheims_2":
            LAi_ActorWaitDialog(Pchar, characterFromID("Raoul Rheims"));
            LAi_ActorDialog(characterFromID("Raoul Rheims"), Pchar, "", 5.0, 0);
        break;
It is the player who is set to wait. Rheims then initiates the dialog. After the dialog, Rheims leaves the building, at which point 'LAi_SetPlayerType(pchar)' restores control to the player.

But for normal dialog when the player isn't put under computer control, you can just have:
Code:
LAi_SetActorType(CharacterfromID("Other Character"));
Characters[GetCharacterIndex("Other Character")].dialog.CurrentNode = "something_to_say";
LAi_ActorDialog(characterFromID("Other Character"), PChar, "next_part", 5.0, 5.0);
You may want to take precautions against the player doing something silly such as wandering out of scene before "Other Character" can talk, or having a weapon drawn so "Other Character" can't talk.
 
I see. The thing is, usually setting the player to actor is still the easiest and best option, when I want to properly set the scene for the player getting approached. Otherwise the player would run to God knows where while the NPC is walking or running over. Having the player frozen for the moment often seems like the lesser evil to have a more "cinematic" scene.

When a Spaniard in the year 1576 wants to talk about his king, there's probably some token I can put in the dialogue that gives out the proper name and title and such? Similar to how I just can put #sGreenford# for example.
 
Try 'GetNationRoyalByType(SPAIN)'. That's the function which is used in governor dialog when you want to buy a LoM or receive a promotion. For example, buying a LoM:
Code:
dialog.text = DLG_TEXT[33] + GetNationRoyalByType(iNation) + DLG_TEXT[34] + GetLoMCost(iNation) + DLG_TEXT[35];
 
Maybe you'll then have less to do with "Hoist the Colours" and conversely, I'd have to time to play that one myself, or at least the new section (even though I'm also replaying Ardent at the moment as an alternative to coding Devlin). Then you'd have everything I did instead of me uploading snippets of the code every day.

I doubt that "Hoist the Colours" will be less of a hassle any time soon, as we are almost done with DMC and i'm planning to start At the world's end right after, if all goes well, and while i still have the motivation to do it, the problem is that there is only one Grey Roger to test both storylines... xD

The smartest way to do things would probably be: I guess it takes a week to ten days to roughly finish the Santiago chapter. This still requires Blaze's variation of the quest, which should be the simplest and most straightforward of the three, and a "debriefing" scene in the quest cabin similar to the one on Martinica. Then the story wouldn't end somewhere randomly but a whole chapter would be closed. So we could do a whole separate phase of ironing out details, figuring out eventualities etc.

You can let us know when you are at a good enough spot to test and fix little issues with your quests, and if you don't mind i can run trough your questline again and offer some help in fixing what is left to be fixed in case you will need it. :rolleyes:
 
I'm still struggling a bit with locators. I generated the right spot, but the direction my character is facing is completely wrong. They are supposed to face each other. Perhaps someone who knows locators well could have a look at it? They are goto51 and goto52.
 

Attachments

  • Santiago_locators.zip
    3.6 MB · Views: 67
In your console do:

C:
case 2:
            if (!bSeaActive) {
                float x,y,z,ay,xx,zz,xz,zx;
                GetCharacterPos(GetMainCharacter(), &x, &y, &z);
                GetCharacterAy(pchar, &ay);
                xx = -sin(ay - PId2);
                zz = xx;
                xz = -cos(ay - PId2);
                zx = -xz;
                Logit("Location id: "+pchar.location);
                Logit("Your Coords x: " + x+"  y: "+y+"  z: "+z );
                Logit("Viewangle ay: "+ay+"; xx= "+xx+" xz= "+xz+" zx= "+zx+" zz= "+zz);
                Logit("Curlocator: "+chrWaitReloadLocator);
                trace("rld,loc," +xx+",0,"+xz+",0,1,0,"+zx+",0,"+zz+","+x+","+y+","+z+",1,0,0,0,0,0,0,0,0,");
            //    trace("rld,aloc,"+xx+",0,"+xz+",0,1,0,"+zx+",0,"+zz+","+x+","+y+","+z+",1,0,0,0,0,0,0,0,0,");
            } else {
                Logit("Ship position: x="+pchar.ship.pos.x+", z="+pchar.ship.pos.z);
            }
            //Logit("Ship position: x="+worldMap.playerShipX+", z="+worldMap.playerShipZ);
        break;

And in the switch case set it to 2

C:
                                            // Case 0 = Enable reload (useful when you get stuck on boarding) + Set player type (if you cannot move anymore)
    switch(2)                                // Case 1 = Various test and cheat codes
    {                                        // Case 2 = Location coordinate information
        case 1:                                // Case 3 = Automatic instant cheats in port
                                            // Case 4 = Instant teleport to Hendrick Vanderdecken


Now, go back into the game and press F12. On the screen, the string "Player and enemy locator generated" should appear with some coordinates, and in PROGRAM\compile.log, a line starting with "rld,loc" should appear.
The locator coordinates are compatible with text output from Tool; loc

In tool do:

Open the locator file gm which you want to edit, open locators in top menu, click write to file, the file will be called doc, saved in the same directory as the gm file that you have chosen, open the doc file, add the line from compile to the bottom of the doc file, then open the gm locator file that you want to edit again... click read from a file, choose your edited doc file, save changes.

This way your character / camera will face the direction you see in game when pressing F12.

This is just in case you missed some of the steps
 
Last edited:
I've been typing them manually and might have lost a few decimal points or something like that. I'll try to adjust them using this method, seems to be much more exact.
 
I've been typing them manually and might have lost a few decimal points or something like that. I'll try to adjust them using this method, seems to be much more exact.
Yes, setting the coordinates by hand is quite a chore, this makes it way easier for sure. Hope this helps you.
 
Now, go back into the game and press F12. On the screen, the string "Player and enemy locator generated" should appear with some coordinates, and in PROGRAM\compile.log, a line starting with "rld,loc" should appear.
Actually it doesn't appear in compile.log, plus my compile isn't in PROGRAM but outside of it, plus the screen string doesn't say "Player and enemy locator generated", it says what you see in my screenshots above.
 
Suggestion: in "Emmanuel Devlin_dialog.c", perhaps replace:
Code:
            GiveItem2Character(pchar, "blade13+1");
            EquipCharacterByItem(pchar, "blade13+1");
... with...
Code:
            if(ENABLE_WEAPONSMOD)
            {
                GiveItem2Character(pchar, "blade13+1");
                EquipCharacterByItem(pchar, "blade13+1");
            }
            else
            {
                GiveItem2Character(pchar, "blade13");
                EquipCharacterByItem(pchar, "blade13");
            }
The idea is to only give the "+1" (good) version if the player hasn't disabled weapon qualities and blacksmiths - if he has, "blade13+1" doesn't exist.
 
Last edited:
Of course, I'll do that. That has actually been there since before I took over, so I don't even know why Emmanuel gives her this exact blade which I think isn't much better than the starting one.

Hmm, when WEAPONSMOD is activated and a "blade13" without +1 version appears, what state would the blade be in? "Fine"? Just out of curiosity.
 
Without any + or - modifiers, it's average, or "mediocre", quality.

"Blade13" is the duelling rapier. Its damage values aren't much better than those of the sabre, which is the usual starting blade, but it has better piercing.

Another weapon given from the earliest version is "pistol5+2", which is "fine horse pistol". Emmanuel could perhaps explain that there is something special about this pistol because normally it shouldn't exist in "Early Explorers". Otherwise "pistol2+2" (fine long pistol) is available; or if you want Beatrice to have some serious firepower, "pistol13" is the short musket. (There is no "pistol13+2", the short musket has no variable quality versions even with WEAPONSMOD enabled.)
 
Is the spanish cup hilt rapier available in early explorers and how good is it approximately? Maybe that would be an alternative to the duelling rapier, I'm replaying Ardent and got one from the payroll ship captain, I think it's a stylish weapon.
 
Back
Top