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

Mod Release Enhanced Dialogs V1 Updated (Need help testing)

Levis

Find(Rum) = false;
Staff member
Administrator
Creative Support
Programmer
Storm Modder
Okay so the player wont notice much about this but from a programming perspective this is so much easier.
Let me explain what this does, but first how it used to work:
A character had a single dialog file assigned to him. In here all the different options etc had to be put. With the storyline the file was overwritten
To make sidequests more accesible and other planned features I needed more flexebility here so this is how it now works:
You can assign as many dialog files to a character as you want. They are all checked for relevant options. They are still overwritten by storyline dialog files.
You can add another another dialog file by adding it to the character like for example this:
Code:
    ch.Dialog.Filename = "Claudio Burrieza_dialog.c";
    ch.Dialog.Filename.tavern = "taverns.c"; //Added by Levis
You can call the extra thing whatever you want. You can also just for example do Filename.Filename1 = "foobar.c". This doesn't matter.

In the future the overwriting by the storylines may be changed.
For now this change only makes sure more files can be loaded, as no extra files are yet assigned to any character you wont notice anything if everything goes right. And here I need your help to see if this is really the case. So please let me know if you encounter dialog errors etc with this change.

The dialog.c goes in the POTC\PROGRAM folder.

These things are planned for next releases:
- Ability to choose if a additional dialog option should overwrite or be added to the options
- Normalising of some of the more common dialog files (like citizen and tavern owners)
- Reinit of (additional) dialog files for characters so new savegames aren't needed when these are added.
- Functions to easy add dialog files and remove them
- Better language system
- Maybe an reorganisation of how the dialog files are stored so they aren't all in the same folder anymore

New version:
http://piratesahoy.net/threads/enhanced-dialogs-v1-need-help-testing.22188/#post-479897
 
Last edited:
To give you a little idea what this opens up for possebilities.
For example say there is a sidequest where you need to speak to a certain person. This person can be chosen at random and the dialog options can just be added to him.
It can even be made in a way when this person dies the dialog file is just reassigned to someone else. So say to start a quest to resque someone you needed to talk to a citizen in La Havana but this one got killed during a fight. Then the dialog file could be assigned to someone new and you can still do the quest.

Also its possible to assign to certain groups. So say you want to add an option to all shipyard owners you can just make this and add this dialog file to all of them, or if there is one assigned to them already (What I plan to make) you can just add it there.
 
Downloaded and installed now. Very interesting! :cheers

So say to start a quest to resque someone you needed to talk to a citizen in La Havana but this one got killed during a fight. Then the dialog file could be assigned to someone new and you can still do the quest.
I thought usually those kind of characters got "reincarnated" and things would still work?
 
It is certainly possible for a character to be killed, thereby scuppering a quest which requires you to talk to that character. This is why it is important to visit the Great Teacher in Bridgetown jail during the "Strange Happenings" quest before you go to get the idol in the main "Tales of a Sea Hawk" quest. Going for the idol ends up with the prison commander dead, which means he can't let you go to see the Teacher. Will his dialog now be assigned to someone else? (Who? You kill all the guards inside the prison as well...) Likewise, there are several reasons why I can't do the "Smuggling for Thomas O'Reilly" quest in my current campaign, one of which is that Andre Juliao is no longer around to do his bit - would someone else get his job if enhanced dialogs were in effect?
 
It doesn't do this yet but it paves the way for it to be possible.
I just need to make sure first this doesn't cause errors.
I already did notice some problems with enc officers but I haven't figured out yet what caused it. but please if you find any strange things let me know.
 
Here is a new version. I noticed a little bug where files where not unloaded correctly when a missing file was introduced. This should be fixed now.
Also added a debug variable which gives more output in the compile.log.
This variable is enabled for now. If it's to be included in a new WIP version please disable it.
If people encounter problems please upload the compile.log and error.log.
 
I also noticed I will need to overhaul the language system which is used now cause it will cause errors else. Cause the languages files load the translations in a array but this array name is static and with two languages files it will be dublicated. so I will need a way to prevent this. This will probally mean everything will be transported to the resources folder and have to be changed. Because I saw they where making a translation I will try to provide a convert tool so this can be done easily.
I will also try to make the format easier to translate. I was thinking of using the same system as which is used in the interface strings etc. But suggestions here are welcome.
 
That sounds like something Pirate_KK once tried. Did I not already send those files to you?
 
That sounds like something Pirate_KK once tried. Did I not already send those files to you?
yes you did.
Altough my laptop crashed so not sure if I still have them.
But probally will do it a bit different so no problem.
Just need to think about what is best and what is easiest and find the balance there ;).
 
It's getting more complex but its working :).
It now can open multiple dialog files without problems. We can still use the old language system. I worked around it.
As far as I tested I can't find any problems but I'm not 100% sure so please test if possible.
Please update if you took the previous version cause that one had a big mistake in it. When you talked to someone who changed his dialog file during the conversation (for later) it took this new dialog file so the dialog got messed up.

If you are testing other stuff also I do strongly sugest to change the debug variable to false cause this will flood your compile.log. But if you are testing for me please keep it on cause I need that info if something goes wrong.
 
It just occurred to me: While you're looking at dialog code anyway, could you possibly have a look at the odd effect that happens after any self dialog?
The problem where time compression doesn't work anymore and neither do a whole bunch of other buttons until you talk to a "regular" character again?
 
It just occurred to me: While you're looking at dialog code anyway, could you possibly have a look at the odd effect that happens after any self dialog?
The problem where time compression doesn't work anymore and neither do a whole bunch of other buttons until you talk to a "regular" character again?
Sure I could take a look at it.
But How do you trigger a self dialog again or where does it get triggered?
 
Here is an example from the Jack Sparrow storyline:
Code:
      Pchar.Temp.self.dialog = Pchar.dialog.currentnode;
       Pchar.dialog.currentnode = "lookingattheInterceptor";
       LAi_ActorSelfDialog(Pchar, "player_back");
You can quickly jump to testing that one with the ENABLE_CHEATMODE Random Drunk during the opening scene.
Use the "Grand Entrance" selection.

Although.... that was reported to crash the game relatively recently. But why, I do not know. :facepalm
 
Ok, i will take a look at it soon.
 
So this is almost finished an glad pieter included it already.
You can't use the feature or double dialog files yet (unless you make a special dialog file for it) cause the Links are erased once 1 dialog file is loaded. I need to fix this and I want to include a option where you can say if it should overwrite or just add.
Say you have 2 dialog files.
the one has 3 options:
l1
l2
l3

now you have nother dialog file and you want to overwrite option 1 and add a new option you can do it like this:
l1
o1

When it sees it starts with a o then it will overwrite the previous option and else it will be added.
I think I will make some kind of sorting here also but I have to look what is best.
But expect this to be done in less then a week.
 
The system now sorts the links and if you use an "a" (instead of o as said above) instead of "l" it will overwrite.
I will write a extensive tutorial later.
Please test it to see if you experience any weird problems.
 

Attachments

  • dialog.c
    28.2 KB · Views: 236
Back
Top