• 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've been working on the fighting / stunning stuff and I think it's starting to work the way I wanted, although there is still battle music played throughout.

In the meantime - how can I get this guy to fit in with the other soldiers? I've tried several character models but he even has the wrong sword!

guzman.png

Code:
    ch.old.name = "Guzman";
    ch.old.lastname = "";
    ch.name = "Guzman";
    ch.lastname = "";
    ch.id        = "Guzman";
    ch.model = "Soldier_Spa2"; // PB
    ch.sex = "man";
    ch.sound_type = "soldier";
    LAi_CharacterReincarnation(ch, true, false);
    GiveItem2Character(ch, "blade15");
    ch.equip.blade = "blade15";
    ch.location    = "none";
    ch.location.group = "";
    ch.location.locator = "";
    ch.Dialog.Filename = "Guzman_dialog.c";
    ch.nation = FRANCE;
    ch.rank     = 1;
    ch.reputation = "50";
    ch.experience = "0";
    ch.skill.Leadership = "1";
    ch.skill.Fencing = "3";
    ch.skill.Sailing = "1";
    ch.skill.Accuracy = "1";
    ch.skill.Cannons = "1";
    ch.skill.Grappling = "1";
    ch.skill.Repair = "1";
    ch.skill.Defence = "1";
    ch.skill.Commerce = "1";
    ch.skill.Sneak = "1";
    ch.money = "10";
    ch.quest.meeting = "0";
    LAi_SetGuardianType(ch);
    LAi_SetLoginTime(ch, 0.0, 24.0);
    LAi_SetHP(ch, 80.0, 80.0);
    ch.greeting = "Gr_isla muelle soldier";
    AddGameCharacter(n, ch);
 
Maybe it's as easy as adding a new case like this one:
Code:
    case "stunned":
       return CheckAttribute(refCharacter, "stuntime");
   break;
I tried it and it didn't work. Partly because at least half the time the guard wouldn't stun and I ended up beating him to death. But even when he did stun, the quest check didn't trigger unless I talked to him. If we can't figure out how to make it trigger instantly the same way "NPC_Death" does, I'll have to revert to the original method - check for loss of a couple of HP, then stun him by code.
 
I've been working on the fighting / stunning stuff and I think it's starting to work the way I wanted, although there is still battle music played throughout.

In the meantime - how can I get this guy to fit in with the other soldiers? I've tried several character models but he even has the wrong sword!
I believe 'LAi_SetGuardianType(ch)' may be setting him to be a default soldier. You've set his nation to be FRANCE, so he's set up as a French soldier, with a French uniform and default French sword. See what happens if you set his nation to be SPAIN and use 'LAi_SetGuardianTypeNoGroup(ch)' instead.
 
Partly because at least half the time the guard wouldn't stun and I ended up beating him to death.
Ah; that's to be expected.
Stunning is a random event, after all.
I did wonder why you and/or @BathtubPirate wanted to use that as a trigger in the first place...

But even when he did stun, the quest check didn't trigger unless I talked to him.
That's good news; it proves the code at least does do something.

If we can't figure out how to make it trigger instantly the same way "NPC_Death" does, I'll have to revert to the original method - check for loss of a couple of HP, then stun him by code.
The game doesn't check continuously on "quest win conditions" as that would bring the game performance down too much.
So instead, it only checks whenever the 'QuestsCheck()' function is called.
This happened when dialogs are started; when interfaces are opened; when you move between locations; etc.

You can add this call also in PROGRAM\Loc_ai\types\LAi_stunned.c in the 'LAi_Stunned_StunCharacter' function.
Put 'QuestsCheck();' at the bottom of it and whenever a character gets that far, the game will do a one-time check.

In the meantime - how can I get this guy to fit in with the other soldiers? I've tried several character models but he even has the wrong sword!
Soldier weapons are given by the 'GiveSoldierWeapon' function in PROGRAM\Periods.c to any character for which 'isSoldier' is set.
This happens automatically for 'LAi_SetPatrolType' and 'LAi_SetGuardianType' .
The same attribute is used to give soldiers their nation-and-period-specific uniforms.

So before using ''NoGroup' (which bypasses all that), I'd recommend just setting his nation to SPAIN first.
Also, it seems regular soldiers these days have just a number as their character model; rather than a full specific string.
For example:
Code:
    ch.old.name = "";
   ch.old.lastname = "";
   ch.name    = "";
   ch.lastname    = "";
   ch.id       = "Ox_soldier_1";
   ch.model = 1; // PB
 
Last edited:
I thought there may be some thing going on somewhere with the soldiers being assigned to their countries and time periods. This one of course is 'french' because I've based him on the other soldiers around him, which are Falaise de fleur soldiers, but in EE they're spanish. I just need him to look like the fellow next to him, going to try your tips later.

And another thing that just jumped to mind. It's around noon and I have SetCurrentTime(7.00, 0); in a case - now Blaze travels back in time a few hours, but I want it to jump to next morning instead.
 
And another thing that just jumped to mind. It's around noon and I have SetCurrentTime(7.00, 0); in a case - now Blaze travels back in time a few hours, but I want it to jump to next morning instead.
Add this before the 'SetCurrentTime':
Code:
WaitDate("", 0, 0, 1, 0, 0);
That advances to the next day. Alternatively:
Code:
AddDataToCurrent(0, 0, 1, false);
That also advances to the next day but without any of the normal updates - no effect on your ship, e.g. food consumption, crew morale etc.
 
The first part of the quest is pretty much finished - not very long, not very complicated but hopefully varied and funny.

There may of course be some rough edges, details that could be polished or even potential collisions with eventualities of the gameplay unknown to me, but as a self-contained storyline it pretty much works as intended until now.

A few impressions:
On April 1sr 1576, Beatrice Devlin not only receives a letter and a piece of a treasure map from her long-lost father, but also meets her sister Bonnie for the first time. The twins team up to find their brother Blaze, a scoundrel who sells stolen rum to Toni Haraldo, an important official of the spanish colony on Martinica. The only problem is: Blaze drank most of the rum himself already. The Devlin siblings must first straighten things with Haraldo, which may or may not include Beatrice chasing after his mislaid poetry book, Blaze participating in an underground boxing match and Bonnie making new acquintances at a posh wedding reception - depending on your choice.

DO1.png

DO2.png

DO3.png

DO4.png

do5.png

DO6.png
 
Back in 2016 when someone else was handling updates and my "Ardent" story was under development, I'd upload it whenever a playable section was finished - the earliest version let you escape from prison, rescue your crew, return to Havana, and that was it. :D

So even if your work is not yet finished, if you reckon it's playable, upload it and it can go into the next update. Based on what you've said so far, I'd certainly be willing to play it! :cheers
 
There may of course be some rough edges, details that could be polished or even potential collisions with eventualities of the gameplay unknown to me
That's always how it goes.
Welcome to the club, matey! :cheers

The twins team up to find their brother Blaze, a scoundrel who sells stolen rum to Toni Haraldo, an important official of the spanish colony on Martinica. The only problem is: Blaze drank most of the rum himself already.
I love it already! :rofl

So even if your work is not yet finished, if you reckon it's playable, upload it and it can go into the next update. Based on what you've said so far, I'd certainly be willing to play it! :cheers
Does this mean the storyline could finally stop being an "Unfinished" one and can be made part of the main mod? :woot
 
Back in 2016 when someone else was handling updates and my "Ardent" story was under development, I'd upload it whenever a playable section was finished - the earliest version let you escape from prison, rescue your crew, return to Havana, and that was it. :D

So even if your work is not yet finished, if you reckon it's playable, upload it and it can go into the next update. Based on what you've said so far, I'd certainly be willing to play it! :cheers
I thought so too! Makes sense to test and polish it step by step. What would be the best method? As I said I prepared a PotC folder structure with just everything Devlin-related in the right folder (if I haven't forgotten anything). Should I just upload it here?

I think I have:
- Program Storyline folder
- INI Texts Storyline folder
- One changed general location file
- A few items
- Character models (missing heads and everything for all the Blaze and Beatrice models, although the newest Beatrice model doesn't have a portrait and description yet and Blaze's head is still wiggly)
- An unfinished loading screen
- A few voice clips and the adjusted greetings file.

I love it already! :rofl
There's certainly some silliness in there. The idea is to mix silly humour with little bits and pieces of the early caribbean history. And some (not so) bold "predictions" about the "future" history of the caribbean.

Does this mean the storyline could finally stop being an "Unfinished" one and can be made part of the main mod? :woot
Most of what I have right now I put into effect over the last ten days or so. So if everything continues to run smoothly - certainly, we could get there. My envisioned story isn't very long, but I rather have a realistic goal and there's always the option to add more stuff later (continuation, more story chapters in between, unique sidequests as subplots to the story).
 
What would be the best method? As I said I prepared a PotC folder structure with just everything Devlin-related in the right folder (if I haven't forgotten anything). Should I just upload it here?
Yes, if it will get past the forum file size limit. (If not, try splitting it - post "PROGRAM" and "RESOURCE" as separate zips in different posts, for example.)

There's certainly some silliness in there. The idea is to mix silly humour with little bits and pieces of the early caribbean history. And some (not so) bold "predictions" about the "future" history of the caribbean.
Good - as you might have noticed in "Ardent", I love mixtures of silly humour and actual history. xD

Most of what I have right now I put into effect over the last ten days or so. So if everything continues to run smoothly - certainly, we could get there. My envisioned story isn't very long, but I rather have a realistic goal and there's always the option to add more stuff later (continuation, more story chapters in between, unique sidequests as subplots to the story).
Having a shorter story might be a good thing anyway. We've had several people who started on storylines, then gave up and were never heard from again, possibly because they felt they had to make a long epic and then lost interest part way through. If others get the idea that short stories are fine as well, perhaps we'll get some more...
 
There's certainly some silliness in there. The idea is to mix silly humour with little bits and pieces of the early caribbean history. And some (not so) bold "predictions" about the "future" history of the caribbean.
Cool idea!
I can see you've got plenty creative juices flowing. :bow

Most of what I have right now I put into effect over the last ten days or so. So if everything continues to run smoothly - certainly, we could get there. My envisioned story isn't very long, but I rather have a realistic goal and there's always the option to add more stuff later (continuation, more story chapters in between, unique sidequests as subplots to the story).
Very very wise.
Simple does the trick. :yes
 
Alright, I'll just leave this here.

Currently included: The search for Blaze and the Rum / Toni Haraldo chapter. The quest currently ends when you're transported back to the Martinica jetty. (There's one more quest case when you go to sea, that should bring you to the cabin, but it hasn't worked yet when I tried it yesterday).

The Rum chapter has several possible routes. For repeated testing there's a jumpstart-storyteller when you follow the Mystery Messenger at the very beginning.

Current issues:
- Storyteller randomly changes name when a new game is started out of another game.
- Blaze's wiggly head
- Voice clip SJGfem doesn't work
- The Boxing scene still has "battle mode" throughout and a short fear animation of the PChar when he's stunned, but it should mostly work for the intended purposes.
 

Attachments

  • Devlin.zip
    6.2 MB · Views: 101
Storyteller randomly changes name when a new game is started out of another game.
Probably because Jamaica is English normally, but Early Explorers changes it to Spanish and therefore applies random Spanish names to all characters in town.
A "questch = true;" attribute might save your Storyteller from being affected by that though.
 
How did you make "SJGfem.WAV"? According to its properties, it has a bit rate of 32kbps. The other voice files have either 352kbps or 705bps. "Gibbs01.wav" also used to have the same problem until @Jack Rackham produced a version with 705kbps.
 
The quest currently ends when you're transported back to the Martinica jetty. (There's one more quest case when you go to sea, that should bring you to the cabin, but it hasn't worked yet when I tried it yesterday).
Preferably @Grey Roger could have a look at exactly those last quest case - "Meet_after_Martinica" and "Martinica_Debriefing". I took what seems to be the standard location for talking scenes in the cabin in various storylines, including Ardent (Cabin2SJG). But when I go to sea directly from the jetty, the loading screen freezes. When I go via ship deck, I get to the location but none of the other characters do. When I change my reload locator I end up somewhere in the ocean. But I'm going to use this cabin several times, so I need it to work.
 
Preferably @Grey Roger could have a look at exactly those last quest case - "Meet_after_Martinica" and "Martinica_Debriefing". I took what seems to be the standard location for talking scenes in the cabin in various storylines, including Ardent (Cabin2SJG). But when I go to sea directly from the jetty, the loading screen freezes. When I go via ship deck, I get to the location but none of the other characters do. When I change my reload locator I end up somewhere in the ocean. But I'm going to use this cabin several times, so I need it to work.
I would've thought that something named "Cabin2SJG" would be in the storyline location init files.
But no, it's in the general "Ship.c"; so that shouldn't be the problem as that one's always loaded...
 
Back
Top